@webitel/ui-sdk 26.8.21 → 26.8.22

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 (387) hide show
  1. package/dist/{clients-Ba7VhTMH.js → clients-Cgrz-ee-.js} +707 -22
  2. package/dist/{components-ABAwRPPa.js → components-BENKf-0C.js} +882 -846
  3. package/dist/{composables-C_OatTQJ.js → composables-BtWSAI5D.js} +14 -12
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.js +51 -50
  6. package/dist/ui-sdk.umd.cjs +695 -594
  7. package/dist/useEventBus-B-ZeklLu.js +5 -0
  8. package/dist/{useValidation-DgSm80YX.js → useValidation-B4_82RZv.js} +4 -4
  9. package/dist/{useVidstackSrc-B4mUti_c.js → useVidstackSrc-aQcqC_v0.js} +5 -5
  10. package/dist/{vidstack-C6nBVWwn-cKiWT0KJ.js → vidstack-C6nBVWwn-DNsvM1pU.js} +2 -2
  11. package/dist/{vidstack-CI5oafcm-DfWpvayJ.js → vidstack-CI5oafcm-EXmYmdjq.js} +1 -1
  12. package/dist/{vidstack-DUnfBERX2-BJtKHFxc.js → vidstack-DUnfBERX2-jgzDS0Hg.js} +1 -1
  13. package/dist/{vidstack-audio-BCPraiiR.js → vidstack-audio-CPO0A50Q.js} +1 -1
  14. package/dist/{vidstack-dash-MBx5aEEA.js → vidstack-dash-DHt7tTPh.js} +2 -2
  15. package/dist/{vidstack-hls-BbZsbfaO.js → vidstack-hls-WW1jeu5R.js} +2 -2
  16. package/dist/vidstack-video-Bwash4bY.js +2 -0
  17. package/dist/vue-router-Dwey8MMv.js +16 -0
  18. package/dist/{wt-button-G2Q1uf_y.js → wt-button-OZTROX1W.js} +3 -3
  19. package/dist/{wt-chat-emoji-DM6G80G_.js → wt-chat-emoji-ByGj5Mh4.js} +3 -3
  20. package/dist/{wt-datepicker-DTUMTWJK.js → wt-datepicker-OIgnVIpv.js} +38 -34
  21. package/dist/{wt-display-chip-items-3GRXkRfT.js → wt-display-chip-items-BUlu4Pqh.js} +2 -2
  22. package/dist/{wt-dual-panel-Dhj8Eg_y.js → wt-dual-panel-BEGLGU7F.js} +1 -1
  23. package/dist/{wt-expansion-card-BzhcCehz.js → wt-expansion-card-CpmnVJ03.js} +1 -1
  24. package/dist/{wt-galleria-qPHnXPx7.js → wt-galleria-CgY38PPx.js} +3 -6
  25. package/dist/{wt-icon-btn-BJl5VlM9.js → wt-icon-btn-hAWVJdNG.js} +2 -2
  26. package/dist/{wt-navigation-menu-CenQi_-T.js → wt-navigation-menu-BMupOW07.js} +2 -2
  27. package/dist/{wt-notifications-bar-C7cK0wEL.js → wt-notifications-bar-CqVk9cm7.js} +1 -1
  28. package/dist/{wt-player-Ca2x4geU.js → wt-player-vsOVUgi7.js} +17 -15
  29. package/dist/{wt-screen-recordings-action-Dzzo0eqW.js → wt-screen-recordings-action-Dj6ITuhE.js} +1 -1
  30. package/dist/{wt-search-bar-DtJL-csc.js → wt-search-bar-CagDl5av.js} +3 -3
  31. package/dist/wt-send-message-popup-zjxEP-HK.js +1208 -0
  32. package/dist/wt-start-page-BFQExFUj.js +73 -0
  33. package/dist/{wt-status-select-D1hAjCAS.js → wt-status-select-B-N9Fvz4.js} +2 -2
  34. package/dist/{wt-table-DJ3yOWZV.js → wt-table-C4PZJ3rP.js} +49 -47
  35. package/dist/{wt-table-column-select-CgEh5BAF.js → wt-table-column-select-D4c56HPB.js} +2 -2
  36. package/dist/{wt-time-input-u5Ay5_X5.js → wt-time-input-BEBrSugB.js} +9 -2
  37. package/dist/{wt-timepicker-CB8HzUZw.js → wt-timepicker-CQ2TRigf.js} +11 -4
  38. package/dist/{wt-toast-BbaZZWKt.js → wt-toast-Cb15-PN4.js} +1 -1
  39. package/dist/{wt-tree-DZ9ErOGj.js → wt-tree-CMIpbXBo.js} +40 -40
  40. package/dist/{wt-tree-table-C0ZIJXcv.js → wt-tree-table-CVvWMduu.js} +7 -7
  41. package/dist/{wt-type-extension-value-input-kzX2hJY_.js → wt-type-extension-value-input-l3TF0Xtv.js} +14 -9
  42. package/dist/{wt-vidstack-player-DbRHboYo.js → wt-vidstack-player-DV_fxJKW.js} +46 -42
  43. package/package.json +4 -1
  44. package/src/api/clients/_shared/types.ts +30 -0
  45. package/src/api/clients/caseSources/caseSources.ts +17 -8
  46. package/src/api/clients/quickReplies/quickReplies.ts +17 -8
  47. package/src/api/clients/roles/roles.ts +21 -12
  48. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +16 -4
  49. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +27 -9
  50. package/src/api/websocket/WebSocketClientController.ts +13 -5
  51. package/src/api/websocket/{config.js → config.ts} +5 -3
  52. package/src/api/websocket/websocketErrorEventHandler.ts +1 -1
  53. package/src/components/_internals/composables/useExpansion/useExpansion.ts +6 -1
  54. package/src/components/_internals/composables/useGalleriaMaskClick/useGalleriaMaskClick.ts +5 -3
  55. package/src/components/_internals/composables/useInputControl/useInputControl.ts +5 -3
  56. package/src/components/_internals/composables/useSelect/types.ts +69 -0
  57. package/src/components/_internals/composables/useSelect/useSelect.ts +4 -2
  58. package/src/components/_internals/composables/useSelect/useSelectCustomValues.ts +3 -2
  59. package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +4 -3
  60. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +20 -14
  61. package/src/components/_internals/composables/useSelect/useSelectUtils.ts +20 -7
  62. package/src/components/_internals/composables/useTableColumnDrag/useTableColumnDrag.ts +22 -12
  63. package/src/components/_internals/composables/useWtTable/useWtTable.ts +6 -2
  64. package/src/components/_internals/types/PrimevueInstance.ts +15 -0
  65. package/src/components/_shared/settings-panel/components/speed-settings/speed-settings.vue +6 -1
  66. package/src/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue +6 -1
  67. package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue +0 -2
  68. package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue +0 -2
  69. package/src/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue +12 -4
  70. package/src/components/on-demand/wt-send-message-popup/wt-send-message-popup.vue +17 -7
  71. package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +36 -15
  72. package/src/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue +1 -1
  73. package/src/components/wt-badge-new/wt-badge.vue +1 -1
  74. package/src/components/wt-button/wt-button.vue +5 -5
  75. package/src/components/wt-checkbox/wt-checkbox.vue +4 -2
  76. package/src/components/wt-chip/wt-chip.vue +1 -1
  77. package/src/components/wt-datepicker/wt-datepicker.vue +30 -20
  78. package/src/components/wt-dual-panel/wt-dual-panel.vue +1 -1
  79. package/src/components/wt-galleria/wt-galleria.vue +1 -11
  80. package/src/components/wt-image/wt-image.vue +3 -3
  81. package/src/components/wt-input-number/wt-input-number.vue +8 -13
  82. package/src/components/wt-input-text/wt-input-text.vue +15 -17
  83. package/src/components/wt-intersection-observer/wt-intersection-observer.vue +1 -1
  84. package/src/components/wt-message/wt-message.vue +1 -1
  85. package/src/components/wt-multi-select/wt-multi-select.vue +22 -12
  86. package/src/components/wt-navigation-bar/types/WtNavigationBar.ts +3 -1
  87. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +34 -18
  88. package/src/components/wt-password/wt-password.vue +12 -13
  89. package/src/components/wt-player/wt-player.vue +7 -2
  90. package/src/components/wt-popover/wt-popover.vue +5 -1
  91. package/src/components/wt-popup/wt-popup.vue +5 -1
  92. package/src/components/wt-radio/wt-radio.vue +1 -1
  93. package/src/components/wt-search-bar/wt-search-bar.vue +17 -10
  94. package/src/components/wt-single-select/wt-single-select.vue +19 -12
  95. package/src/components/wt-status-select/wt-status-select.vue +2 -2
  96. package/src/components/wt-table/types/WtTable.ts +11 -1
  97. package/src/components/wt-table/wt-table.vue +43 -24
  98. package/src/components/wt-table-column-select/wt-table-column-select.vue +3 -5
  99. package/src/components/wt-textarea/wt-textarea.vue +9 -15
  100. package/src/components/wt-time-input/wt-time-input.vue +7 -4
  101. package/src/components/wt-timepicker/wt-timepicker.vue +6 -3
  102. package/src/components/wt-toast/wt-toast.vue +2 -2
  103. package/src/components/wt-tree/wt-tree.vue +6 -5
  104. package/src/components/wt-tree-line/types/wt-tree-node.ts +6 -0
  105. package/src/components/wt-tree-line/wt-tree-line.vue +29 -15
  106. package/src/components/wt-tree-table/wt-tree-table.vue +16 -18
  107. package/src/components/wt-tree-table-row/wt-tree-table-row.vue +9 -4
  108. package/src/components/wt-vidstack-player/components/buttons/fullscreen-button.vue +2 -3
  109. package/src/components/wt-vidstack-player/components/buttons/play-button.vue +1 -5
  110. package/src/components/wt-vidstack-player/components/controls-group/controls-group.vue +2 -4
  111. package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +2 -4
  112. package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/fullscreen-button.vue +0 -2
  113. package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/play-button.vue +2 -4
  114. package/src/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue +4 -4
  115. package/src/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue +3 -3
  116. package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +4 -4
  117. package/src/components/wt-vidstack-player/components/screenshot-box/screenshot-box.vue +1 -1
  118. package/src/components/wt-vidstack-player/composables/useVidstackPlayerSize.ts +11 -0
  119. package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +27 -6
  120. package/src/components/wt-vidstack-player/wt-vidstack-player.vue +7 -4
  121. package/src/enums/MessageColor/MessageColor.ts +1 -1
  122. package/src/enums/MessageVariant/MessageVariant.ts +2 -1
  123. package/src/install.ts +6 -2
  124. package/src/locale/en/en.js +1 -0
  125. package/src/locale/es/es.js +1 -0
  126. package/src/locale/kz/kz.js +1 -0
  127. package/src/locale/pl/pl.js +1 -0
  128. package/src/locale/ro/ro.js +1 -0
  129. package/src/locale/ru/ru.js +1 -0
  130. package/src/locale/uk/uk.js +1 -0
  131. package/src/locale/uz/uz.js +1 -0
  132. package/src/locale/vi/vi.js +1 -0
  133. package/src/mixins/validationMixin/regle/useRegleValidation.ts +2 -2
  134. package/src/mixins/validationMixin/useValidation.ts +1 -1
  135. package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +23 -8
  136. package/src/modules/CSVExport/CSVExport.js +1 -1
  137. package/src/modules/CallSession/modules/VideoCall/video-call.vue +34 -16
  138. package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +1 -1
  139. package/src/modules/FilesExport/composables/useFilesExport.ts +1 -1
  140. package/src/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue +2 -2
  141. package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +39 -12
  142. package/src/modules/UploadCsvPopup/scripts/normalizeCSVData.ts +20 -17
  143. package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +2 -2
  144. package/src/modules/UploadCsvPopup/scripts/processFile.ts +2 -2
  145. package/src/modules/UploadCsvPopup/scripts/splitAndSaveData.ts +8 -2
  146. package/src/modules/UserNotifications/stores/userNotificationsStore.ts +9 -1
  147. package/src/modules/Userinfo/classes/ApplicationsAccess.ts +12 -6
  148. package/src/modules/Userinfo/mappings/mappings.ts +10 -3
  149. package/src/modules/Userinfo/scripts/utils.ts +8 -4
  150. package/src/modules/Userinfo/stores/accessStore.ts +16 -16
  151. package/src/modules/Userinfo/types/UserAccess.ts +1 -1
  152. package/src/plugins/breakpoint/breakpoint.plugin.ts +1 -1
  153. package/src/scripts/compareSize.ts +4 -4
  154. package/src/scripts/downloadFile/downloadFile.ts +1 -1
  155. package/src/scripts/normalizeDatetime.ts +2 -2
  156. package/src/utils/displayText.ts +1 -1
  157. package/types/.tsbuildinfo +1 -1
  158. package/types/api/clients/_shared/types.d.ts +23 -0
  159. package/types/api/clients/caseSources/caseSources.d.ts +7 -15
  160. package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +1 -1
  161. package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +1 -1
  162. package/types/api/clients/quickReplies/quickReplies.d.ts +7 -15
  163. package/types/api/clients/roles/roles.d.ts +8 -16
  164. package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +11 -12
  165. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +19 -18
  166. package/types/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.d.ts +1 -1
  167. package/types/api/defaults/getDefaultGetParams/getDefaultGetParams.d.ts +2 -2
  168. package/types/api/transformers/applyTransform.d.ts +2 -2
  169. package/types/api/websocket/WebSocketClientController.d.ts +10 -9
  170. package/types/api/websocket/config.d.ts +3 -2
  171. package/types/api/websocket/websocketErrorEventHandler.d.ts +5 -1
  172. package/types/assets/icons/iconsRepository.d.ts +1 -1
  173. package/types/components/_internals/composables/useExpansion/useExpansion.d.ts +6 -1
  174. package/types/components/_internals/composables/useGalleriaMaskClick/useGalleriaMaskClick.d.ts +2 -1
  175. package/types/components/_internals/composables/useInputControl/useInputControl.d.ts +4 -2
  176. package/types/components/_internals/composables/useSelect/types.d.ts +52 -0
  177. package/types/components/_internals/composables/useSelect/useSelect.d.ts +4 -18
  178. package/types/components/_internals/composables/useSelect/useSelectCustomValues.d.ts +2 -12
  179. package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +2 -14
  180. package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +6 -14
  181. package/types/components/_internals/composables/useSelect/useSelectUtils.d.ts +5 -4
  182. package/types/components/_internals/composables/useTableColumnDrag/useTableColumnDrag.d.ts +3 -1
  183. package/types/components/_internals/composables/useWtTable/useWtTable.d.ts +3 -2
  184. package/types/components/_internals/types/PrimevueInstance.d.ts +14 -0
  185. package/types/components/_shared/settings-panel/components/speed-settings/speed-settings.vue.d.ts +2 -2
  186. package/types/components/_shared/settings-panel/settings-panel.vue.d.ts +1 -1
  187. package/types/components/on-demand/wt-call-media-action/wt-call-media-action.vue.d.ts +2 -2
  188. package/types/components/on-demand/wt-chat-emoji/wt-chat-emoji.vue.d.ts +1 -1
  189. package/types/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue.d.ts +6 -2
  190. package/types/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue.d.ts +6 -6
  191. package/types/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue.d.ts +2 -2
  192. package/types/components/on-demand/wt-navigation-menu/components/wt-navigation-menu.vue.d.ts +2 -2
  193. package/types/components/on-demand/wt-route-transition/wt-route-transition.vue.d.ts +1 -1
  194. package/types/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue.d.ts +3 -3
  195. package/types/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue.d.ts +10 -2
  196. package/types/components/on-demand/wt-selection-popup/wt-selection-popup.vue.d.ts +8 -8
  197. package/types/components/on-demand/wt-send-message-popup/wt-send-message-popup.vue.d.ts +1 -1
  198. package/types/components/on-demand/wt-table-transition/wt-table-transition.vue.d.ts +1 -1
  199. package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +18 -11
  200. package/types/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue.d.ts +3 -3
  201. package/types/components/transitions/cases/wt-replace-transition.vue.d.ts +1 -1
  202. package/types/components/transitions/wt-transition.vue.d.ts +1 -1
  203. package/types/components/wt-action-bar/WtActionBarActionsOrder.d.ts +2 -2
  204. package/types/components/wt-action-bar/wt-action-bar.vue.d.ts +64 -64
  205. package/types/components/wt-app-header/wt-app-header.vue.d.ts +1 -1
  206. package/types/components/wt-app-header/wt-header-actions.vue.d.ts +6 -9
  207. package/types/components/wt-badge/wt-badge.vue.d.ts +1 -1
  208. package/types/components/wt-badge-new/wt-badge.vue.d.ts +3 -3
  209. package/types/components/wt-breadcrumb/wt-breadcrumb.vue.d.ts +1 -1
  210. package/types/components/wt-button/wt-button.vue.d.ts +2 -2
  211. package/types/components/wt-button-select/wt-button-select.vue.d.ts +3 -3
  212. package/types/components/wt-call-media-metric/wt-call-media-metric.vue.d.ts +1 -1
  213. package/types/components/wt-checkbox/wt-checkbox.vue.d.ts +3 -3
  214. package/types/components/wt-chip/wt-chip.vue.d.ts +2 -2
  215. package/types/components/wt-confirm-dialog/wt-confirm-dialog.vue.d.ts +5 -5
  216. package/types/components/wt-context-menu/wt-context-menu.vue.d.ts +7 -7
  217. package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +20 -19
  218. package/types/components/wt-divider/wt-divider.vue.d.ts +1 -1
  219. package/types/components/wt-dual-panel/wt-dual-panel.vue.d.ts +5 -5
  220. package/types/components/wt-empty/wt-empty.vue.d.ts +38 -38
  221. package/types/components/wt-expansion-card/wt-expansion-card.vue.d.ts +3 -3
  222. package/types/components/wt-expansion-panel/wt-expansion-panel.vue.d.ts +3 -3
  223. package/types/components/wt-galleria/wt-galleria.vue.d.ts +2 -2
  224. package/types/components/wt-icon/wt-icon.vue.d.ts +1 -1
  225. package/types/components/wt-icon-action/wt-icon-action.vue.d.ts +4 -4
  226. package/types/components/wt-icon-btn/wt-icon-btn.vue.d.ts +3 -3
  227. package/types/components/wt-image/wt-image.vue.d.ts +2 -2
  228. package/types/components/wt-inline-add-panel/wt-inline-add-panel.vue.d.ts +3 -3
  229. package/types/components/wt-input-number/wt-input-number.vue.d.ts +9 -9
  230. package/types/components/wt-input-text/wt-input-text.vue.d.ts +11 -9
  231. package/types/components/wt-intersection-observer/wt-intersection-observer.vue.d.ts +1 -1
  232. package/types/components/wt-item-link/wt-item-link.vue.d.ts +1 -1
  233. package/types/components/wt-label/mixins/labelUsageMixin.d.ts +1 -1
  234. package/types/components/wt-label/wt-label.vue.d.ts +1 -1
  235. package/types/components/wt-menubar/wt-menubar.vue.d.ts +1 -1
  236. package/types/components/wt-message/wt-message.vue.d.ts +1 -1
  237. package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +19 -19
  238. package/types/components/wt-navigation-bar/types/WtNavigationBar.d.ts +2 -1
  239. package/types/components/wt-navigation-bar/wt-navigation-bar.vue.d.ts +22 -45
  240. package/types/components/wt-page-header/wt-page-header.vue.d.ts +4 -4
  241. package/types/components/wt-password/wt-password.vue.d.ts +11 -9
  242. package/types/components/wt-player/wt-player.vue.d.ts +6 -6
  243. package/types/components/wt-popover/wt-popover.vue.d.ts +13 -9
  244. package/types/components/wt-popup/wt-popup.vue.d.ts +8 -4
  245. package/types/components/wt-radio/wt-radio.vue.d.ts +2 -2
  246. package/types/components/wt-search-bar/wt-search-bar.vue.d.ts +25 -18
  247. package/types/components/wt-single-select/wt-single-select.vue.d.ts +18 -15
  248. package/types/components/wt-slider/wt-slider.vue.d.ts +3 -3
  249. package/types/components/wt-status-select/wt-status-select.vue.d.ts +3 -3
  250. package/types/components/wt-stepper/wt-stepper.vue.d.ts +2 -2
  251. package/types/components/wt-switcher/wt-switcher.vue.d.ts +4 -4
  252. package/types/components/wt-table/types/WtTable.d.ts +7 -1
  253. package/types/components/wt-table/wt-table.vue.d.ts +12 -12
  254. package/types/components/wt-table-actions/wt-table-actions.vue.d.ts +2 -2
  255. package/types/components/wt-table-column-select/wt-table-column-select.vue.d.ts +1 -1
  256. package/types/components/wt-tabs/wt-tabs.vue.d.ts +3 -3
  257. package/types/components/wt-textarea/wt-textarea.vue.d.ts +9 -14
  258. package/types/components/wt-time-input/wt-time-input.vue.d.ts +9 -9
  259. package/types/components/wt-timepicker/wt-timepicker.vue.d.ts +8 -8
  260. package/types/components/wt-tooltip/_internals/wt-tooltip-floating.vue.d.ts +5 -5
  261. package/types/components/wt-tooltip/wt-tooltip.vue.d.ts +7 -7
  262. package/types/components/wt-tree/wt-tree.vue.d.ts +5 -3
  263. package/types/components/wt-tree-line/types/wt-tree-node.d.ts +5 -0
  264. package/types/components/wt-tree-line/wt-tree-line.vue.d.ts +8 -18
  265. package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +2 -2
  266. package/types/components/wt-tree-table-row/wt-tree-table-row.vue.d.ts +3 -18
  267. package/types/components/wt-vidstack-player/components/buttons/fullscreen-button.vue.d.ts +1 -1
  268. package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +5 -5
  269. package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/fullscreen-button.vue.d.ts +1 -1
  270. package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/components/time-group.vue.d.ts +1 -1
  271. package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/playback-controls-panel.vue.d.ts +1 -1
  272. package/types/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue.d.ts +3 -3
  273. package/types/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue.d.ts +14 -14
  274. package/types/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue.d.ts +2 -2
  275. package/types/components/wt-vidstack-player/components/screenshot-box/screenshot-box.vue.d.ts +2 -2
  276. package/types/components/wt-vidstack-player/components/toggle-button.vue.d.ts +1 -1
  277. package/types/components/wt-vidstack-player/composables/useVidstackPlayerSize.d.ts +2 -0
  278. package/types/components/wt-vidstack-player/composables/useVidstackSrc.d.ts +11 -4
  279. package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +8 -7
  280. package/types/composables/useCachedInterval/useCachedInterval.d.ts +1 -1
  281. package/types/composables/useCachedItemInstanceName/useCachedItemInstanceName.d.ts +1 -1
  282. package/types/composables/useCard/useCardTabs.d.ts +1 -1
  283. package/types/composables/useClose/useClose.d.ts +1 -1
  284. package/types/enums/MessageColor/MessageColor.d.ts +1 -1
  285. package/types/enums/MessageVariant/MessageVariant.d.ts +1 -1
  286. package/types/locale/en/en.d.ts +3 -2
  287. package/types/locale/es/es.d.ts +3 -2
  288. package/types/locale/i18n.d.ts +27 -18
  289. package/types/locale/index.d.ts +27 -18
  290. package/types/locale/kz/kz.d.ts +3 -2
  291. package/types/locale/pl/pl.d.ts +3 -2
  292. package/types/locale/ro/ro.d.ts +3 -2
  293. package/types/locale/ru/ru.d.ts +3 -2
  294. package/types/locale/uk/uk.d.ts +3 -2
  295. package/types/locale/uz/uz.d.ts +3 -2
  296. package/types/locale/vi/vi.d.ts +3 -2
  297. package/types/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.d.ts +1 -1
  298. package/types/mixins/dataFilterMixins/apiFilterMixin.d.ts +3 -3
  299. package/types/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.d.ts +1 -1
  300. package/types/mixins/dataFilterMixins/enumFilterMixin.d.ts +4 -4
  301. package/types/mixins/dataFilterMixins/paginationFilterMixin.d.ts +2 -2
  302. package/types/mixins/dataFilterMixins/sortFilterMixin.d.ts +1 -1
  303. package/types/mixins/validationMixin/regle/useRegleValidation.d.ts +1 -1
  304. package/types/mixins/validationMixin/useValidation.d.ts +2 -2
  305. package/types/mixins/validationMixin/validationMixin.d.ts +1 -1
  306. package/types/mixins/validationMixin/vuelidate/useVuelidateValidation.d.ts +9 -5
  307. package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +1 -1
  308. package/types/modules/AgentPdfs/components/pdf-status-preview.vue.d.ts +1 -1
  309. package/types/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue.d.ts +4 -4
  310. package/types/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue.d.ts +1 -1
  311. package/types/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue.d.ts +1 -1
  312. package/types/modules/Appearance/components/wt-dark-mode-switcher.vue.d.ts +1 -1
  313. package/types/modules/Appearance/pinia/store/AppearanceStore.d.ts +3 -3
  314. package/types/modules/Appearance/store/AppearanceStoreModule.d.ts +1 -1
  315. package/types/modules/AuditForm/components/audit-form-question-read-wrapper.vue.d.ts +3 -3
  316. package/types/modules/AuditForm/components/audit-form-question-write-wrapper.vue.d.ts +2 -2
  317. package/types/modules/AuditForm/components/audit-form-question.vue.d.ts +7 -7
  318. package/types/modules/AuditForm/components/audit-form.vue.d.ts +6 -6
  319. package/types/modules/AuditForm/components/form/form-footer/audit-form-footer.vue.d.ts +3 -3
  320. package/types/modules/AuditForm/components/form-questions/options/audit-form-question-options-write-row.vue.d.ts +2 -2
  321. package/types/modules/AuditForm/components/form-questions/options/audit-form-question-options.vue.d.ts +4 -4
  322. package/types/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue.d.ts +6 -6
  323. package/types/modules/AuditForm/components/form-questions/yes/audit-form-question-yes.vue.d.ts +2 -2
  324. package/types/modules/CSVExport/CSVExport.d.ts +3 -6
  325. package/types/modules/CSVExport/XLSExport.d.ts +1 -1
  326. package/types/modules/CSVExport/composables/useCSVExport.d.ts +6 -6
  327. package/types/modules/CSVExport/mixins/exportCSVMixin.d.ts +1 -1
  328. package/types/modules/CSVExport/mixins/exportXLSMixin.d.ts +1 -1
  329. package/types/modules/CallSession/modules/ScreenSharing/screen-sharing.vue.d.ts +3 -3
  330. package/types/modules/CallSession/modules/VideoCall/composables/useReceiverLiveStream.d.ts +6 -6
  331. package/types/modules/CallSession/modules/VideoCall/video-call.vue.d.ts +17 -17
  332. package/types/modules/CardStoreModule/store/CardStoreModule.d.ts +1 -1
  333. package/types/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue.d.ts +2 -2
  334. package/types/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.d.ts +1 -1
  335. package/types/modules/Filters/classes/BaseFilterSchema.d.ts +7 -7
  336. package/types/modules/Filters/components/filter-search.vue.d.ts +2 -2
  337. package/types/modules/Filters/components/filter-table-fields.vue.d.ts +3 -3
  338. package/types/modules/Filters/scripts/getters/localStorageGetter.d.ts +1 -1
  339. package/types/modules/Filters/store/FiltersStoreModule.d.ts +1 -1
  340. package/types/modules/Notifications/assets/audio/triggerSound.d.ts +1 -1
  341. package/types/modules/Notifications/store/NotificationsStoreModule.d.ts +9 -9
  342. package/types/modules/ObjectPermissions/components/_internal/permissions-role-row.vue.d.ts +1 -1
  343. package/types/modules/ObjectPermissions/components/_internal/permissions-role-select.vue.d.ts +1 -1
  344. package/types/modules/ObjectPermissions/components/_internal/permissions-tab-content.vue.d.ts +5 -5
  345. package/types/modules/ObjectPermissions/components/_internal/permissions-tab-role-popup.vue.d.ts +2 -2
  346. package/types/modules/ObjectPermissions/headers/headers.d.ts +1 -1
  347. package/types/modules/ObjectPermissions/store/objectPermissionsStoreModule.d.ts +2 -2
  348. package/types/modules/QueryFilters/classes/BaseFilterSchema.d.ts +2 -2
  349. package/types/modules/QueryFilters/components/abstract-api-filter.vue.d.ts +1 -1
  350. package/types/modules/QueryFilters/components/abstract-enum-filter.vue.d.ts +1 -1
  351. package/types/modules/QueryFilters/components/filter-datetime.vue.d.ts +1 -1
  352. package/types/modules/QueryFilters/components/filter-from-to.vue.d.ts +1 -1
  353. package/types/modules/QueryFilters/components/filter-search.vue.d.ts +1 -1
  354. package/types/modules/QueryFilters/components/filter-table-fields.vue.d.ts +3 -3
  355. package/types/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.d.ts +1 -1
  356. package/types/modules/QueryFilters/mixins/apiFilterMixin.d.ts +1 -1
  357. package/types/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.d.ts +1 -1
  358. package/types/modules/QueryFilters/mixins/enumFilterMixin.d.ts +1 -1
  359. package/types/modules/QueryFilters/mixins/paginationFilterMixin.d.ts +2 -2
  360. package/types/modules/QueryFilters/mixins/sortFilterMixin.d.ts +1 -1
  361. package/types/modules/QueryFilters/store/QueryFiltersStoreModule.d.ts +4 -4
  362. package/types/modules/TableComponentModule/composables/useTableEmpty.d.ts +7 -7
  363. package/types/modules/TableStoreModule/store/TableStoreModule.d.ts +5 -5
  364. package/types/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue.d.ts +5 -5
  365. package/types/modules/UploadCsvPopup/composable/useUploadCsv.d.ts +21 -11
  366. package/types/modules/UploadCsvPopup/scripts/normalizeCSVData.d.ts +15 -20
  367. package/types/modules/UploadCsvPopup/scripts/parseCSV.d.ts +2 -1
  368. package/types/modules/UploadCsvPopup/scripts/processFile.d.ts +2 -2
  369. package/types/modules/UploadCsvPopup/scripts/splitAndSaveData.d.ts +3 -3
  370. package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +2 -10
  371. package/types/modules/Userinfo/mappings/mappings.d.ts +12 -24
  372. package/types/modules/Userinfo/scripts/utils.d.ts +2 -2
  373. package/types/modules/Userinfo/stores/settingsStore.d.ts +4 -4
  374. package/types/modules/Userinfo/stores/userinfoStore.d.ts +3 -3
  375. package/types/modules/Userinfo/types/UserAccess.d.ts +1 -1
  376. package/types/scripts/compareSize.d.ts +4 -4
  377. package/types/scripts/debounce.d.ts +1 -1
  378. package/types/scripts/sortQueryAdapters.d.ts +3 -3
  379. package/types/store/BaseStoreModules/BaseStoreModule.d.ts +6 -6
  380. package/types/store/new/modules/apiStoreModule/apiStoreModule.d.ts +12 -12
  381. package/types/store/new/modules/tableStoreModule/tableStoreModule.d.ts +4 -4
  382. package/types/utils/displayText.d.ts +1 -1
  383. package/types/validations/config/errors/customZodErrorsHandler.d.ts +1 -1
  384. package/dist/vidstack-video-DwlbGwN7.js +0 -2
  385. package/dist/wt-send-message-popup-MbV1uq6H.js +0 -77
  386. package/dist/wt-start-page-DMXRhA9E.js +0 -86
  387. package/dist/{wt-popover-ChCN6b1o.js → wt-popover-lP-AhF8l.js} +3 -3
@@ -1,5 +1,4 @@
1
1
  import { ExtensionsApiFactory, type WebitelProtoDataStruct } from 'webitel-sdk';
2
-
3
2
  import { getDefaultInstance, getDefaultOpenAPIConfig } from '../../../defaults';
4
3
  import applyTransform, {
5
4
  camelToSnake,
@@ -7,6 +6,7 @@ import applyTransform, {
7
6
  sanitize,
8
7
  snakeToCamel,
9
8
  } from '../../../transformers';
9
+ import type { ApiParams } from '../../_shared/types';
10
10
  import { sortDynamicFields } from '../_shared/utils/sortDynamicFields';
11
11
 
12
12
  const instance = getDefaultInstance();
@@ -25,16 +25,16 @@ const generateIdsFromRepos = (item: WebitelProtoDataStruct) => ({
25
25
  id: item.repo,
26
26
  });
27
27
 
28
- const getTypeExtension = async ({ itemId: typeRepo }) => {
28
+ const getTypeExtension = async ({ itemId: typeRepo }: { itemId: string }) => {
29
29
  const createPositionGenerator = () => {
30
30
  let position = 1;
31
- return (item) => (item.readonly ? null : position++);
31
+ return (item: ApiParams) => (item.readonly ? null : position++);
32
32
  };
33
33
  const getPosition = createPositionGenerator();
34
34
 
35
- const itemResponseHandler = (item) => ({
35
+ const itemResponseHandler = (item: ApiParams) => ({
36
36
  ...item,
37
- fields: item.fields.map((field) => ({
37
+ fields: item.fields.map((field: ApiParams) => ({
38
38
  ...field,
39
39
  position: getPosition(field),
40
40
  })),
@@ -57,7 +57,13 @@ const getTypeExtension = async ({ itemId: typeRepo }) => {
57
57
  }
58
58
  };
59
59
 
60
- const addTypeExtension = async ({ itemInstance, itemId: typeRepo }) => {
60
+ const addTypeExtension = async ({
61
+ itemInstance,
62
+ itemId: typeRepo,
63
+ }: {
64
+ itemInstance: ApiParams;
65
+ itemId: string;
66
+ }) => {
61
67
  const item = applyTransform(itemInstance, [
62
68
  sortDynamicFields,
63
69
  camelToSnake(),
@@ -76,9 +82,15 @@ const addTypeExtension = async ({ itemInstance, itemId: typeRepo }) => {
76
82
  }
77
83
  };
78
84
 
79
- const deleteTypeExtension = async ({ itemId: typeRepo }) => {
85
+ const deleteTypeExtension = async ({
86
+ itemId: typeRepo,
87
+ }: {
88
+ itemId: string;
89
+ }) => {
80
90
  try {
81
- await typeExtensionsService.deleteType(typeRepo);
91
+ await typeExtensionsService.deleteType([
92
+ typeRepo,
93
+ ]);
82
94
  } catch (err) {
83
95
  throw applyTransform(err, [
84
96
  notify,
@@ -86,7 +98,13 @@ const deleteTypeExtension = async ({ itemId: typeRepo }) => {
86
98
  }
87
99
  };
88
100
 
89
- const updateTypeExtension = async ({ itemInstance, itemId: typeRepo }) => {
101
+ const updateTypeExtension = async ({
102
+ itemInstance,
103
+ itemId: typeRepo,
104
+ }: {
105
+ itemInstance: ApiParams;
106
+ itemId: string;
107
+ }) => {
90
108
  if (!itemInstance.fields.length && itemInstance.isNew) {
91
109
  return itemInstance;
92
110
  }
@@ -1,4 +1,4 @@
1
- import { shallowReactive } from 'vue';
1
+ import { type ShallowReactive, shallowReactive } from 'vue';
2
2
  import { Client } from 'webitel-sdk';
3
3
 
4
4
  import eventBus from '../../scripts/eventBus';
@@ -6,12 +6,17 @@ import { endpoint, getConfig } from './config';
6
6
  import { WebSocketClientEvent } from './enums/WebSocketClientEvent';
7
7
  import websocketErrorEventHandler from './websocketErrorEventHandler';
8
8
 
9
+ type CliInstance = ShallowReactive<Client>;
10
+
11
+ // biome-ignore lint/suspicious/noExplicitAny: listener payloads differ per event
12
+ type WebSocketEventCallback = (...payload: any[]) => unknown;
13
+
9
14
  class WebSocketClientController {
10
- cli = null;
15
+ cli: Promise<CliInstance> | null = null;
11
16
  Event = WebSocketClientEvent;
12
17
 
13
18
  _config = getConfig();
14
- _on = {
19
+ _on: Record<WebSocketClientEvent, WebSocketEventCallback[]> = {
15
20
  [WebSocketClientEvent.ERROR]: [
16
21
  websocketErrorEventHandler,
17
22
  ],
@@ -31,7 +36,10 @@ class WebSocketClientController {
31
36
  window.cli = null;
32
37
  }
33
38
 
34
- addEventListener(event, callback) {
39
+ addEventListener(
40
+ event: WebSocketClientEvent,
41
+ callback: WebSocketEventCallback | WebSocketEventCallback[],
42
+ ) {
35
43
  if (Array.isArray(callback))
36
44
  this._on[event] = this._on[event].concat(callback);
37
45
  else this._on[event].push(callback);
@@ -43,7 +51,7 @@ class WebSocketClientController {
43
51
 
44
52
  const config = {
45
53
  endpoint,
46
- token,
54
+ token: token ?? undefined,
47
55
  registerWebDevice: configCli.registerWebDevice,
48
56
  debug: configCli.debug,
49
57
  };
@@ -1,7 +1,9 @@
1
- export const getConfig = () => {
2
- let cliConfig = {};
1
+ import type { Config } from 'webitel-sdk';
2
+
3
+ export const getConfig = (): Partial<Config> => {
4
+ let cliConfig: Partial<Config> = {};
3
5
  try {
4
- const CONFIG = JSON.parse(localStorage.getItem('CONFIG'));
6
+ const CONFIG = JSON.parse(localStorage.getItem('CONFIG') as string);
5
7
  cliConfig = CONFIG.CLI || {};
6
8
  } catch {}
7
9
  return cliConfig;
@@ -1,7 +1,7 @@
1
1
  import i18n from '../../locale/i18n.js';
2
2
  import eventBus from '../../scripts/eventBus.js';
3
3
 
4
- const websocketErrorEventHandler = (error) => {
4
+ const websocketErrorEventHandler = (error: { id?: string }) => {
5
5
  const errLocale = `error.websocket.${error.id?.replaceAll('.', '_')}`;
6
6
  const message = {
7
7
  type: 'error',
@@ -1,6 +1,11 @@
1
1
  import { type Ref, ref, watch } from 'vue';
2
2
 
3
- export function useExpansion(collapsed: Ref<boolean>, emit?) {
3
+ interface ExpansionEmit {
4
+ (event: 'opened'): void;
5
+ (event: 'closed'): void;
6
+ }
7
+
8
+ export function useExpansion(collapsed: Ref<boolean>, emit?: ExpansionEmit) {
4
9
  const opened = ref<boolean>(!collapsed.value);
5
10
 
6
11
  function open(): void {
@@ -1,7 +1,9 @@
1
+ import type { Ref } from 'vue';
2
+
1
3
  // primevue's galleria doesn't support hiding on mask click so there is a custom solution
2
- export const useGalleriaMaskClick = (visible) => {
3
- const onMaskClick = ({ target }) => {
4
- if (target.classList.contains('p-galleria-mask')) {
4
+ export const useGalleriaMaskClick = (visible: Ref<boolean>) => {
5
+ const onMaskClick = ({ target }: Event) => {
6
+ if ((target as HTMLElement)?.classList.contains('p-galleria-mask')) {
5
7
  visible.value = false;
6
8
  }
7
9
  };
@@ -1,6 +1,8 @@
1
- import { computed } from 'vue';
1
+ import { computed, type Ref } from 'vue';
2
2
 
3
- export const useInputControl = (input) => {
3
+ import type { PrimevueInstance } from '../../types/PrimevueInstance';
4
+
5
+ export const useInputControl = (input: Ref<PrimevueInstance | undefined>) => {
4
6
  // inputnumber has span wrapper while inputtext hasnt
5
7
  const inputEl = computed(() => {
6
8
  if (input.value?.$el instanceof HTMLInputElement) {
@@ -19,7 +21,7 @@ export const useInputControl = (input) => {
19
21
  };
20
22
 
21
23
  // prevent double triggering
22
- const handleKeyup = (e) => e.stopPropagation();
24
+ const handleKeyup = (e: Event) => e.stopPropagation();
23
25
 
24
26
  return {
25
27
  focus,
@@ -0,0 +1,69 @@
1
+ import type { Ref } from 'vue';
2
+
3
+ import type { PrimevueOverlayInstance } from '../../types/PrimevueInstance';
4
+
5
+ /** TODO(types): options are indexed by the runtime `dataKey`/`optionLabel`/`optionValue` keys. */
6
+ // biome-ignore lint/suspicious/noExplicitAny: see TODO above
7
+ export type SelectOption = any;
8
+
9
+ export type SelectValue = SelectOption | SelectOption[] | null | undefined;
10
+
11
+ export interface SelectSearchResponse {
12
+ items: SelectOption[];
13
+ next?: boolean;
14
+ }
15
+
16
+ export type SelectSearchMethod = (
17
+ // biome-ignore lint/suspicious/noExplicitAny: consumers declare their own param shapes
18
+ ...params: any[]
19
+ ) => Promise<SelectSearchResponse>;
20
+
21
+ export type SelectComponentRef = PrimevueOverlayInstance;
22
+
23
+ export interface UseSelectOptionsParams {
24
+ selected: Ref<SelectValue>;
25
+ options: Ref<SelectOption[]>;
26
+ optionLabel: Ref<string | undefined>;
27
+ optionValue?: Ref<string | undefined>;
28
+ dataKey: Ref<string>;
29
+ allowCustomValues: Ref<boolean>;
30
+ searchMethod: Ref<SelectSearchMethod | undefined>;
31
+ strictApiOptions?: Ref<boolean | undefined>;
32
+ }
33
+
34
+ export interface UseSelectDropdownParams {
35
+ selectId: Ref<string>;
36
+ selectRef: Ref<SelectComponentRef | undefined>;
37
+ filterInput: Ref<HTMLInputElement | undefined>;
38
+ searchMethod: Ref<SelectSearchMethod | undefined>;
39
+ filteredOptions: Ref<SelectOption[]>;
40
+ filterText: Ref<string>;
41
+ filterOptions: (value: string) => void;
42
+ resetAndFetch: (search?: string) => void;
43
+ sortOptions: (opts: SelectOption[]) => SelectOption[];
44
+ fetchOptions: () => void;
45
+ isLoading: Ref<boolean>;
46
+ searchHasNext: Ref<boolean>;
47
+ }
48
+
49
+ export interface UseSelectCustomValuesParams {
50
+ selected: Ref<SelectValue>;
51
+ filteredOptions: Ref<SelectOption[]>;
52
+ options: Ref<SelectOption[]>;
53
+ dataKey: Ref<string>;
54
+ filterText: Ref<string>;
55
+ filterOptions: (value: string) => void;
56
+ updateSelectedOptionsCache: () => void;
57
+ selectRef: Ref<SelectComponentRef | undefined>;
58
+ allowCustomValues: Ref<boolean>;
59
+ isSingle: boolean;
60
+ }
61
+
62
+ export interface UseSelectParams
63
+ extends UseSelectOptionsParams,
64
+ Pick<UseSelectDropdownParams, 'selectId' | 'selectRef' | 'filterInput'> {
65
+ manualCustomValues?: boolean;
66
+ isSingle: boolean;
67
+ // biome-ignore lint/suspicious/noExplicitAny: receives the component's typed emit
68
+ emit?: (event: any, ...args: any[]) => void;
69
+ }
@@ -1,4 +1,5 @@
1
1
  import { onMounted } from 'vue';
2
+ import type { UseSelectParams } from './types';
2
3
  import { useSelectCustomValues } from './useSelectCustomValues';
3
4
  import { useSelectDropdown } from './useSelectDropdown';
4
5
  import { useSelectLoader } from './useSelectLoader';
@@ -19,8 +20,9 @@ export const useSelect = ({
19
20
  selectId,
20
21
  isSingle,
21
22
  strictApiOptions = undefined,
22
- emit = (_event: string, ..._args: unknown[]) => {},
23
- }) => {
23
+ // biome-ignore lint/suspicious/noExplicitAny: receives the component's typed emit
24
+ emit = (_event: any, ..._args: any[]) => {},
25
+ }: UseSelectParams) => {
24
26
  const {
25
27
  filterText,
26
28
  filteredOptions,
@@ -1,4 +1,5 @@
1
1
  import { nextTick } from 'vue';
2
+ import type { UseSelectCustomValuesParams } from './types';
2
3
  import { isOptionSelected, toArray } from './useSelectUtils';
3
4
 
4
5
  export const useSelectCustomValues = ({
@@ -12,7 +13,7 @@ export const useSelectCustomValues = ({
12
13
  selectRef,
13
14
  allowCustomValues,
14
15
  isSingle,
15
- }) => {
16
+ }: UseSelectCustomValuesParams) => {
16
17
  const makeCustomOption = (text: string) => {
17
18
  const sample = options.value.length
18
19
  ? options.value[0]
@@ -67,7 +68,7 @@ export const useSelectCustomValues = ({
67
68
  }
68
69
 
69
70
  if (isSingle) {
70
- selectRef.value?.hide();
71
+ selectRef.value?.hide?.();
71
72
  selected.value = customOption;
72
73
  } else {
73
74
  // redefine selected value instead of pushing element is for max-selected-labels prop correct work
@@ -1,4 +1,5 @@
1
1
  import { nextTick, ref, watch } from 'vue';
2
+ import type { UseSelectDropdownParams } from './types';
2
3
 
3
4
  export const useSelectDropdown = ({
4
5
  selectId,
@@ -13,7 +14,7 @@ export const useSelectDropdown = ({
13
14
  fetchOptions,
14
15
  isLoading,
15
16
  searchHasNext,
16
- }) => {
17
+ }: UseSelectDropdownParams) => {
17
18
  const isDropdownOpen = ref(false);
18
19
  let overlayResizeObserver: ResizeObserver | null = null;
19
20
  let positionRafId: number | null = null;
@@ -74,7 +75,7 @@ export const useSelectDropdown = ({
74
75
  const overlay = selectRef?.value?.overlay;
75
76
  if (overlay) {
76
77
  overlayResizeObserver = new ResizeObserver(() => {
77
- selectRef.value?.alignOverlay();
78
+ selectRef.value?.alignOverlay?.();
78
79
  });
79
80
  overlayResizeObserver.observe(overlay);
80
81
  }
@@ -97,7 +98,7 @@ export const useSelectDropdown = ({
97
98
  if (rect.top !== lastTop || rect.left !== lastLeft) {
98
99
  lastTop = rect.top;
99
100
  lastLeft = rect.left;
100
- selectRef.value?.alignOverlay();
101
+ selectRef.value?.alignOverlay?.();
101
102
  }
102
103
  positionRafId = requestAnimationFrame(poll);
103
104
  };
@@ -1,6 +1,11 @@
1
1
  import { reactive, ref, watch } from 'vue';
2
2
  import { useI18n } from 'vue-i18n';
3
3
  import debounce from '../../../../scripts/debounce';
4
+ import type {
5
+ SelectOption,
6
+ SelectValue,
7
+ UseSelectOptionsParams,
8
+ } from './types';
4
9
  import {
5
10
  dedupeByKey,
6
11
  filterOptionsBySearchValue,
@@ -17,7 +22,7 @@ export const useSelectOptions = ({
17
22
  allowCustomValues,
18
23
  searchMethod,
19
24
  strictApiOptions,
20
- }) => {
25
+ }: UseSelectOptionsParams) => {
21
26
  const { t } = useI18n();
22
27
  const defaultOptionLabel = 'name';
23
28
  const filterText = ref('');
@@ -34,14 +39,14 @@ export const useSelectOptions = ({
34
39
  selected options first, then other options
35
40
  selected values that are not in the list are prepended as-is
36
41
  */
37
- const sortOptions = (opts) => {
42
+ const sortOptions = (opts: SelectOption[]): SelectOption[] => {
38
43
  const deduped = dedupeByKey(opts, dataKey.value);
39
44
  if (!selected.value) return deduped;
40
45
 
41
46
  const selectedAsArray = toArray(selected.value);
42
47
 
43
- const selectedOptions = [];
44
- const otherOptions = [];
48
+ const selectedOptions: SelectOption[] = [];
49
+ const otherOptions: SelectOption[] = [];
45
50
 
46
51
  for (const option of deduped) {
47
52
  const isSelected = isOptionSelected(
@@ -55,20 +60,21 @@ export const useSelectOptions = ({
55
60
  return selectedOptions.concat(otherOptions);
56
61
  };
57
62
 
58
- const getOptionLabel = (option) => {
63
+ const getOptionLabel = (option: SelectOption): string => {
59
64
  if (option === null || option === undefined) return '';
60
65
  // https://webitel.atlassian.net/browse/WTEL-3181
61
66
  // if allowCustomValue select mode, return label as is
62
67
  if (allowCustomValues.value && option.isTag) return option.label;
63
68
 
64
69
  // when optionValue is used PrimeVue passes the extracted primitive instead of the full object
65
- if (optionValue?.value && typeof option !== 'object') {
70
+ const optionValueKey = optionValue?.value;
71
+ if (optionValueKey && typeof option !== 'object') {
66
72
  const foundOption = (
67
73
  [
68
74
  ...filteredOptions.value,
69
75
  ...selectedOptionsCache.value,
70
76
  ] as Record<string, unknown>[]
71
- ).find((o) => o[optionValue.value] === option);
77
+ ).find((o) => o[optionValueKey] === option);
72
78
  return foundOption ? getOptionLabel(foundOption) : String(option);
73
79
  }
74
80
 
@@ -86,12 +92,12 @@ export const useSelectOptions = ({
86
92
  return option[defaultOptionLabel] || option;
87
93
  };
88
94
 
89
- const filterBySearch = (opts, value) =>
95
+ const filterBySearch = (opts: SelectOption[], value: string) =>
90
96
  filterOptionsBySearchValue(opts, value, getOptionLabel);
91
97
 
92
98
  // Cache of full option objects for currently selected values,
93
99
  // so they can be preserved in filteredOptions after filtering
94
- const selectedOptionsCache = ref([]);
100
+ const selectedOptionsCache = ref<SelectOption[]>([]);
95
101
 
96
102
  const updateSelectedOptionsCache = () => {
97
103
  if (!selected.value) {
@@ -99,7 +105,7 @@ export const useSelectOptions = ({
99
105
  return;
100
106
  }
101
107
  const selectedAsArray = toArray(selected.value);
102
- const isSelected = (option) =>
108
+ const isSelected = (option: SelectOption) =>
103
109
  isOptionSelected(option, selectedAsArray, dataKey.value);
104
110
 
105
111
  // Find full option objects from filteredOptions that match selected values
@@ -157,7 +163,7 @@ export const useSelectOptions = ({
157
163
  : filteredOptions.value.concat(items);
158
164
  filteredOptions.value = sortOptions(baseOptions);
159
165
  addSelectedValueToList(selected.value);
160
- searchHasNext.value = next;
166
+ searchHasNext.value = next ?? false;
161
167
  searchParams.page += 1;
162
168
  isLoading.value = false;
163
169
  };
@@ -168,9 +174,9 @@ export const useSelectOptions = ({
168
174
  fetchOptions();
169
175
  };
170
176
 
171
- const debouncedFetch = debounce((value) => resetAndFetch(value));
177
+ const debouncedFetch = debounce((value: string) => resetAndFetch(value));
172
178
 
173
- const filterOptionsBase = (value) => {
179
+ const filterOptionsBase = (value: string) => {
174
180
  filterText.value = value;
175
181
  if (!searchMethod.value) {
176
182
  const matchingCached = filterBySearch(selectedOptionsCache.value, value);
@@ -189,7 +195,7 @@ export const useSelectOptions = ({
189
195
  }
190
196
  };
191
197
 
192
- const addSelectedValueToList = (newVal) => {
198
+ const addSelectedValueToList = (newVal: SelectValue) => {
193
199
  // If the selected value is not in the list, add it
194
200
  if (!newVal || !searchMethod.value || strictApiOptions?.value) return;
195
201
  const selectedAsArray = toArray(newVal);
@@ -1,4 +1,6 @@
1
- export const toArray = (value) =>
1
+ import type { SelectOption, SelectValue } from './types';
2
+
3
+ export const toArray = (value: SelectValue): SelectOption[] =>
2
4
  Array.isArray(value)
3
5
  ? value
4
6
  : value
@@ -10,9 +12,13 @@ export const toArray = (value) =>
10
12
  // Handles mixed comparisons: when optionValue is used, selected array contains
11
13
  // primitives while filteredOptions contains full objects, so we compare by dataKey
12
14
  // against the primitive directly instead of trying to read dataKey from both sides.
13
- export const isOptionSelected = (option, selectedArray, dataKey) => {
14
- const isObj = (v) => v != null && typeof v === 'object';
15
- return selectedArray.some((s) => {
15
+ export const isOptionSelected = (
16
+ option: SelectOption,
17
+ selectedArray: SelectOption[],
18
+ dataKey: string,
19
+ ) => {
20
+ const isObj = (v: unknown): boolean => v != null && typeof v === 'object';
21
+ return selectedArray.some((s: SelectOption) => {
16
22
  if (!dataKey) return s === option;
17
23
  if (isObj(s) && isObj(option)) return s[dataKey] === option[dataKey]; // both objects
18
24
  if (!isObj(s) && isObj(option)) return s === option[dataKey]; // s is primitive (optionValue)
@@ -21,7 +27,10 @@ export const isOptionSelected = (option, selectedArray, dataKey) => {
21
27
  });
22
28
  };
23
29
 
24
- export const dedupeByKey = (items: unknown[], key: string): unknown[] => {
30
+ export const dedupeByKey = (
31
+ items: SelectOption[],
32
+ key: string,
33
+ ): SelectOption[] => {
25
34
  if (!key) {
26
35
  // no dataKey — fall back to reference dedup via Set
27
36
  return [
@@ -41,8 +50,12 @@ export const dedupeByKey = (items: unknown[], key: string): unknown[] => {
41
50
  ];
42
51
  };
43
52
 
44
- export const filterOptionsBySearchValue = (options, value, getOptionLabel) => {
45
- return options.filter((option) =>
53
+ export const filterOptionsBySearchValue = (
54
+ options: SelectOption[],
55
+ value: string,
56
+ getOptionLabel: (option: SelectOption) => string,
57
+ ) => {
58
+ return options.filter((option: SelectOption) =>
46
59
  getOptionLabel(option).toLowerCase().includes(value.toLowerCase()),
47
60
  );
48
61
  };
@@ -1,7 +1,14 @@
1
- export const useTableColumnDrag = (table, reorderableColumns) => {
2
- let animationFrameId = null;
3
- let containerEl = null;
4
- let currentMouseX = null;
1
+ import type { Ref } from 'vue';
2
+
3
+ import type { PrimevueInstance } from '../../types/PrimevueInstance';
4
+
5
+ export const useTableColumnDrag = (
6
+ table: Ref<PrimevueInstance | undefined>,
7
+ reorderableColumns: boolean,
8
+ ) => {
9
+ let animationFrameId: number | null = null;
10
+ let containerEl: HTMLElement | null = null;
11
+ let currentMouseX: number | null = null;
5
12
  let isDragging = false;
6
13
 
7
14
  const autoScroll = () => {
@@ -16,7 +23,7 @@ export const useTableColumnDrag = (table, reorderableColumns) => {
16
23
  const distanceFromRight = rect.right - currentMouseX;
17
24
 
18
25
  // Easing function for smooth acceleration (ease-in-out cubic)
19
- const easeInOutCubic = (t) => {
26
+ const easeInOutCubic = (t: number) => {
20
27
  return t < 0.5 ? 4 * t * t * t : 1 - (-2 * t + 2) ** 3 / 2;
21
28
  };
22
29
 
@@ -46,13 +53,15 @@ export const useTableColumnDrag = (table, reorderableColumns) => {
46
53
  }
47
54
  };
48
55
 
49
- const tableDragHandler = (event) => {
56
+ const tableDragHandler = (event: DragEvent) => {
57
+ if (!event.dataTransfer) return;
50
58
  event.dataTransfer.effectAllowed = 'move';
51
- const copyEl = event.target.cloneNode(true);
59
+ const target = event.target as HTMLElement;
60
+ const copyEl = target.cloneNode(true) as HTMLElement;
52
61
  copyEl.style.position = 'absolute';
53
62
  copyEl.style.top = '-9999px';
54
63
  copyEl.style.background = 'var(--p-datatable-header-cell-drag-background)';
55
- copyEl.style.width = `${event.target.offsetWidth}px`;
64
+ copyEl.style.width = `${target.offsetWidth}px`;
56
65
  document.body.appendChild(copyEl);
57
66
  event.dataTransfer.setDragImage(copyEl, event.offsetX, event.offsetY);
58
67
  // Clean up after drag starts
@@ -63,13 +72,14 @@ export const useTableColumnDrag = (table, reorderableColumns) => {
63
72
  // Initialize dragging state
64
73
  isDragging = true;
65
74
  if (!containerEl) {
66
- containerEl = table.value?.$el?.querySelector(
67
- '.p-datatable-table-container',
68
- );
75
+ containerEl =
76
+ table.value?.$el?.querySelector<HTMLElement>(
77
+ '.p-datatable-table-container',
78
+ ) ?? null;
69
79
  }
70
80
  };
71
81
 
72
- const tableDragOverHandler = (event) => {
82
+ const tableDragOverHandler = (event: DragEvent) => {
73
83
  // Update mouse position
74
84
  currentMouseX = event.clientX;
75
85
 
@@ -1,9 +1,13 @@
1
- import { computed, unref } from 'vue';
1
+ import { computed, type MaybeRef, unref } from 'vue';
2
2
  import { useI18n } from 'vue-i18n';
3
3
 
4
4
  import type { WtTableHeader } from '../../../wt-table/types/WtTable';
5
5
 
6
- export const useWtTable = ({ headers }) => {
6
+ export const useWtTable = ({
7
+ headers,
8
+ }: {
9
+ headers: MaybeRef<WtTableHeader[] | undefined>;
10
+ }) => {
7
11
  const { t } = useI18n();
8
12
 
9
13
  const tableHeaders = computed<WtTableHeader[]>(() => {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The parts of a PrimeVue component instance the wt-* wrappers reach into.
3
+ * PrimeVue does not publish instance types, so the wrappers describe only what
4
+ * they actually drive.
5
+ */
6
+ export interface PrimevueInstance {
7
+ $el?: HTMLElement;
8
+ }
9
+
10
+ /** A PrimeVue component that renders an overlay panel. */
11
+ export interface PrimevueOverlayInstance extends PrimevueInstance {
12
+ overlay?: HTMLElement;
13
+ alignOverlay?: () => void;
14
+ hide?: () => void;
15
+ }
@@ -36,7 +36,7 @@
36
36
  :min="minSpeed"
37
37
  :max="maxSpeed"
38
38
  :step="speedStep"
39
- @update:model-value="$emit('update:modelValue', $event)"
39
+ @update:model-value="onSliderInput"
40
40
  />
41
41
 
42
42
  <div class="speed-settings__presets">
@@ -79,6 +79,11 @@ const emit = defineEmits<{
79
79
  ];
80
80
  }>();
81
81
 
82
+ /** wt-slider can emit `undefined` when its model is cleared */
83
+ const onSliderInput = (value?: number) => {
84
+ if (value !== undefined) emit('update:modelValue', value);
85
+ };
86
+
82
87
  const minSpeed = 0.25;
83
88
  const maxSpeed = 3;
84
89
  const speedStep = 0.25;
@@ -37,11 +37,16 @@ import { computed } from 'vue';
37
37
 
38
38
  import { displayText, EMPTY_SYMBOL } from '../../../utils';
39
39
 
40
+ interface ChipItem {
41
+ id?: string;
42
+ name?: string;
43
+ }
44
+
40
45
  interface Props {
41
46
  hideFirstItem?: boolean;
42
47
  useEmptySymbol?: boolean;
43
48
  title?: string;
44
- items: unknown[];
49
+ items: ChipItem[];
45
50
  }
46
51
  const props = defineProps<Props>();
47
52
 
@@ -26,8 +26,6 @@
26
26
  </template>
27
27
 
28
28
  <script setup>
29
- import { defineEmits, defineProps } from 'vue';
30
-
31
29
  const props = defineProps({
32
30
  categories: {
33
31
  type: Array,
@@ -10,8 +10,6 @@
10
10
  </template>
11
11
 
12
12
  <script setup>
13
- import { defineProps } from 'vue';
14
-
15
13
  const props = defineProps({
16
14
  categories: {
17
15
  type: Array,