@webitel/ui-sdk 26.8.21 → 26.8.23
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.
- package/dist/{clients-Ba7VhTMH.js → clients-Cgrz-ee-.js} +707 -22
- package/dist/{components-ABAwRPPa.js → components-Q-Lkl5tb.js} +882 -846
- package/dist/{composables-C_OatTQJ.js → composables-BtWSAI5D.js} +14 -12
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +51 -50
- package/dist/ui-sdk.umd.cjs +695 -594
- package/dist/useEventBus-B-ZeklLu.js +5 -0
- package/dist/{useValidation-DgSm80YX.js → useValidation-C_F39G5j.js} +5 -5
- package/dist/{useVidstackSrc-B4mUti_c.js → useVidstackSrc-aQcqC_v0.js} +5 -5
- package/dist/{vidstack-C6nBVWwn-cKiWT0KJ.js → vidstack-C6nBVWwn-DNsvM1pU.js} +2 -2
- package/dist/{vidstack-CI5oafcm-DfWpvayJ.js → vidstack-CI5oafcm-EXmYmdjq.js} +1 -1
- package/dist/{vidstack-DUnfBERX2-BJtKHFxc.js → vidstack-DUnfBERX2-jgzDS0Hg.js} +1 -1
- package/dist/{vidstack-audio-BCPraiiR.js → vidstack-audio-CPO0A50Q.js} +1 -1
- package/dist/{vidstack-dash-MBx5aEEA.js → vidstack-dash-DHt7tTPh.js} +2 -2
- package/dist/{vidstack-hls-BbZsbfaO.js → vidstack-hls-WW1jeu5R.js} +2 -2
- package/dist/vidstack-video-Bwash4bY.js +2 -0
- package/dist/vue-router-Dwey8MMv.js +16 -0
- package/dist/{wt-button-G2Q1uf_y.js → wt-button-OZTROX1W.js} +3 -3
- package/dist/{wt-chat-emoji-DM6G80G_.js → wt-chat-emoji-CiL3CTCQ.js} +3 -3
- package/dist/{wt-datepicker-DTUMTWJK.js → wt-datepicker-BwjMwR9-.js} +38 -34
- package/dist/{wt-display-chip-items-3GRXkRfT.js → wt-display-chip-items-DXfs6aQp.js} +2 -2
- package/dist/{wt-dual-panel-Dhj8Eg_y.js → wt-dual-panel-BEGLGU7F.js} +1 -1
- package/dist/{wt-expansion-card-BzhcCehz.js → wt-expansion-card-CpmnVJ03.js} +1 -1
- package/dist/{wt-galleria-qPHnXPx7.js → wt-galleria-CgY38PPx.js} +3 -6
- package/dist/{wt-icon-btn-BJl5VlM9.js → wt-icon-btn-hAWVJdNG.js} +2 -2
- package/dist/{wt-navigation-menu-CenQi_-T.js → wt-navigation-menu-BMupOW07.js} +2 -2
- package/dist/{wt-notifications-bar-C7cK0wEL.js → wt-notifications-bar-CqVk9cm7.js} +1 -1
- package/dist/{wt-player-Ca2x4geU.js → wt-player-vsOVUgi7.js} +17 -15
- package/dist/{wt-screen-recordings-action-Dzzo0eqW.js → wt-screen-recordings-action-Dj6ITuhE.js} +1 -1
- package/dist/{wt-search-bar-DtJL-csc.js → wt-search-bar-DaBSWvlP.js} +3 -3
- package/dist/wt-send-message-popup-BvnTPEeX.js +1208 -0
- package/dist/wt-start-page-BFQExFUj.js +73 -0
- package/dist/{wt-status-select-D1hAjCAS.js → wt-status-select-B-N9Fvz4.js} +2 -2
- package/dist/{wt-table-DJ3yOWZV.js → wt-table-C4PZJ3rP.js} +49 -47
- package/dist/{wt-table-column-select-CgEh5BAF.js → wt-table-column-select-D4c56HPB.js} +2 -2
- package/dist/{wt-time-input-u5Ay5_X5.js → wt-time-input-BEBrSugB.js} +9 -2
- package/dist/{wt-timepicker-CB8HzUZw.js → wt-timepicker-CS5S9HHJ.js} +11 -4
- package/dist/{wt-toast-BbaZZWKt.js → wt-toast-Cb15-PN4.js} +1 -1
- package/dist/{wt-tree-DZ9ErOGj.js → wt-tree-CMIpbXBo.js} +40 -40
- package/dist/{wt-tree-table-C0ZIJXcv.js → wt-tree-table-CVvWMduu.js} +7 -7
- package/dist/{wt-type-extension-value-input-kzX2hJY_.js → wt-type-extension-value-input-bsEXPInV.js} +14 -9
- package/dist/{wt-vidstack-player-DbRHboYo.js → wt-vidstack-player-BymuGcAX.js} +46 -42
- package/package.json +4 -1
- package/src/api/clients/_shared/types.ts +30 -0
- package/src/api/clients/caseSources/caseSources.ts +17 -8
- package/src/api/clients/quickReplies/quickReplies.ts +17 -8
- package/src/api/clients/roles/roles.ts +21 -12
- package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +16 -4
- package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +27 -9
- package/src/api/websocket/WebSocketClientController.ts +13 -5
- package/src/api/websocket/{config.js → config.ts} +5 -3
- package/src/api/websocket/websocketErrorEventHandler.ts +1 -1
- package/src/components/_internals/composables/useExpansion/useExpansion.ts +6 -1
- package/src/components/_internals/composables/useGalleriaMaskClick/useGalleriaMaskClick.ts +5 -3
- package/src/components/_internals/composables/useInputControl/useInputControl.ts +5 -3
- package/src/components/_internals/composables/useSelect/types.ts +69 -0
- package/src/components/_internals/composables/useSelect/useSelect.ts +4 -2
- package/src/components/_internals/composables/useSelect/useSelectCustomValues.ts +3 -2
- package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +4 -3
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +20 -14
- package/src/components/_internals/composables/useSelect/useSelectUtils.ts +20 -7
- package/src/components/_internals/composables/useTableColumnDrag/useTableColumnDrag.ts +22 -12
- package/src/components/_internals/composables/useWtTable/useWtTable.ts +6 -2
- package/src/components/_internals/types/PrimevueInstance.ts +15 -0
- package/src/components/_shared/settings-panel/components/speed-settings/speed-settings.vue +6 -1
- package/src/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue +6 -1
- package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue +0 -2
- package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue +0 -2
- package/src/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue +12 -4
- package/src/components/on-demand/wt-send-message-popup/wt-send-message-popup.vue +17 -7
- package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +36 -15
- package/src/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue +1 -1
- package/src/components/wt-badge-new/wt-badge.vue +1 -1
- package/src/components/wt-button/wt-button.vue +5 -5
- package/src/components/wt-checkbox/wt-checkbox.vue +4 -2
- package/src/components/wt-chip/wt-chip.vue +1 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +30 -20
- package/src/components/wt-dual-panel/wt-dual-panel.vue +1 -1
- package/src/components/wt-galleria/wt-galleria.vue +1 -11
- package/src/components/wt-image/wt-image.vue +3 -3
- package/src/components/wt-input-number/wt-input-number.vue +8 -13
- package/src/components/wt-input-text/wt-input-text.vue +15 -17
- package/src/components/wt-intersection-observer/wt-intersection-observer.vue +1 -1
- package/src/components/wt-message/wt-message.vue +1 -1
- package/src/components/wt-multi-select/wt-multi-select.vue +22 -12
- package/src/components/wt-navigation-bar/types/WtNavigationBar.ts +3 -1
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +34 -18
- package/src/components/wt-password/wt-password.vue +12 -13
- package/src/components/wt-player/wt-player.vue +7 -2
- package/src/components/wt-popover/wt-popover.vue +5 -1
- package/src/components/wt-popup/wt-popup.vue +5 -1
- package/src/components/wt-radio/wt-radio.vue +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +17 -10
- package/src/components/wt-single-select/wt-single-select.vue +19 -12
- package/src/components/wt-status-select/wt-status-select.vue +2 -2
- package/src/components/wt-table/types/WtTable.ts +11 -1
- package/src/components/wt-table/wt-table.vue +43 -24
- package/src/components/wt-table-column-select/wt-table-column-select.vue +3 -5
- package/src/components/wt-textarea/wt-textarea.vue +9 -15
- package/src/components/wt-time-input/wt-time-input.vue +7 -4
- package/src/components/wt-timepicker/wt-timepicker.vue +6 -3
- package/src/components/wt-toast/wt-toast.vue +2 -2
- package/src/components/wt-tree/wt-tree.vue +6 -5
- package/src/components/wt-tree-line/types/wt-tree-node.ts +6 -0
- package/src/components/wt-tree-line/wt-tree-line.vue +29 -15
- package/src/components/wt-tree-table/wt-tree-table.vue +16 -18
- package/src/components/wt-tree-table-row/wt-tree-table-row.vue +9 -4
- package/src/components/wt-vidstack-player/components/buttons/fullscreen-button.vue +2 -3
- package/src/components/wt-vidstack-player/components/buttons/play-button.vue +1 -5
- package/src/components/wt-vidstack-player/components/controls-group/controls-group.vue +2 -4
- package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +2 -4
- package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/fullscreen-button.vue +0 -2
- package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/play-button.vue +2 -4
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue +4 -4
- package/src/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue +3 -3
- package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +4 -4
- package/src/components/wt-vidstack-player/components/screenshot-box/screenshot-box.vue +1 -1
- package/src/components/wt-vidstack-player/composables/useVidstackPlayerSize.ts +11 -0
- package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +27 -6
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +7 -4
- package/src/enums/MessageColor/MessageColor.ts +1 -1
- package/src/enums/MessageVariant/MessageVariant.ts +2 -1
- package/src/install.ts +6 -2
- package/src/locale/en/en.js +3 -0
- package/src/locale/es/es.js +3 -0
- package/src/locale/kz/kz.js +3 -0
- package/src/locale/pl/pl.js +3 -0
- package/src/locale/ro/ro.js +3 -0
- package/src/locale/ru/ru.js +3 -0
- package/src/locale/uk/uk.js +3 -0
- package/src/locale/uz/uz.js +3 -0
- package/src/locale/vi/vi.js +3 -0
- package/src/mixins/validationMixin/regle/useRegleValidation.ts +2 -2
- package/src/mixins/validationMixin/useValidation.ts +1 -1
- package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +25 -8
- package/src/modules/CSVExport/CSVExport.js +1 -1
- package/src/modules/CallSession/modules/VideoCall/video-call.vue +34 -16
- package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +1 -1
- package/src/modules/FilesExport/composables/useFilesExport.ts +1 -1
- package/src/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue +2 -2
- package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +39 -12
- package/src/modules/UploadCsvPopup/scripts/normalizeCSVData.ts +20 -17
- package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +2 -2
- package/src/modules/UploadCsvPopup/scripts/processFile.ts +2 -2
- package/src/modules/UploadCsvPopup/scripts/splitAndSaveData.ts +8 -2
- package/src/modules/UserNotifications/stores/userNotificationsStore.ts +9 -1
- package/src/modules/Userinfo/classes/ApplicationsAccess.ts +12 -6
- package/src/modules/Userinfo/mappings/mappings.ts +10 -3
- package/src/modules/Userinfo/scripts/utils.ts +8 -4
- package/src/modules/Userinfo/stores/accessStore.ts +16 -16
- package/src/modules/Userinfo/types/UserAccess.ts +1 -1
- package/src/plugins/breakpoint/breakpoint.plugin.ts +1 -1
- package/src/scripts/compareSize.ts +4 -4
- package/src/scripts/downloadFile/downloadFile.ts +1 -1
- package/src/scripts/normalizeDatetime.ts +2 -2
- package/src/utils/displayText.ts +1 -1
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/_shared/types.d.ts +23 -0
- package/types/api/clients/caseSources/caseSources.d.ts +7 -15
- package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +1 -1
- package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +1 -1
- package/types/api/clients/quickReplies/quickReplies.d.ts +7 -15
- package/types/api/clients/roles/roles.d.ts +8 -16
- package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +11 -12
- package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +19 -18
- package/types/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.d.ts +1 -1
- package/types/api/defaults/getDefaultGetParams/getDefaultGetParams.d.ts +2 -2
- package/types/api/transformers/applyTransform.d.ts +2 -2
- package/types/api/websocket/WebSocketClientController.d.ts +10 -9
- package/types/api/websocket/config.d.ts +3 -2
- package/types/api/websocket/websocketErrorEventHandler.d.ts +5 -1
- package/types/assets/icons/iconsRepository.d.ts +1 -1
- package/types/components/_internals/composables/useExpansion/useExpansion.d.ts +6 -1
- package/types/components/_internals/composables/useGalleriaMaskClick/useGalleriaMaskClick.d.ts +2 -1
- package/types/components/_internals/composables/useInputControl/useInputControl.d.ts +4 -2
- package/types/components/_internals/composables/useSelect/types.d.ts +52 -0
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +4 -18
- package/types/components/_internals/composables/useSelect/useSelectCustomValues.d.ts +2 -12
- package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +2 -14
- package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +6 -14
- package/types/components/_internals/composables/useSelect/useSelectUtils.d.ts +5 -4
- package/types/components/_internals/composables/useTableColumnDrag/useTableColumnDrag.d.ts +3 -1
- package/types/components/_internals/composables/useWtTable/useWtTable.d.ts +3 -2
- package/types/components/_internals/types/PrimevueInstance.d.ts +14 -0
- package/types/components/_shared/settings-panel/components/speed-settings/speed-settings.vue.d.ts +2 -2
- package/types/components/_shared/settings-panel/settings-panel.vue.d.ts +1 -1
- package/types/components/on-demand/wt-call-media-action/wt-call-media-action.vue.d.ts +2 -2
- package/types/components/on-demand/wt-chat-emoji/wt-chat-emoji.vue.d.ts +1 -1
- package/types/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue.d.ts +6 -2
- package/types/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue.d.ts +6 -6
- package/types/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue.d.ts +2 -2
- package/types/components/on-demand/wt-navigation-menu/components/wt-navigation-menu.vue.d.ts +2 -2
- package/types/components/on-demand/wt-route-transition/wt-route-transition.vue.d.ts +1 -1
- package/types/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue.d.ts +3 -3
- package/types/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue.d.ts +10 -2
- package/types/components/on-demand/wt-selection-popup/wt-selection-popup.vue.d.ts +8 -8
- package/types/components/on-demand/wt-send-message-popup/wt-send-message-popup.vue.d.ts +1 -1
- package/types/components/on-demand/wt-table-transition/wt-table-transition.vue.d.ts +1 -1
- package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +18 -11
- package/types/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue.d.ts +3 -3
- package/types/components/transitions/cases/wt-replace-transition.vue.d.ts +1 -1
- package/types/components/transitions/wt-transition.vue.d.ts +1 -1
- package/types/components/wt-action-bar/WtActionBarActionsOrder.d.ts +2 -2
- package/types/components/wt-action-bar/wt-action-bar.vue.d.ts +64 -64
- package/types/components/wt-app-header/wt-app-header.vue.d.ts +1 -1
- package/types/components/wt-app-header/wt-header-actions.vue.d.ts +6 -9
- package/types/components/wt-badge/wt-badge.vue.d.ts +1 -1
- package/types/components/wt-badge-new/wt-badge.vue.d.ts +3 -3
- package/types/components/wt-breadcrumb/wt-breadcrumb.vue.d.ts +1 -1
- package/types/components/wt-button/wt-button.vue.d.ts +2 -2
- package/types/components/wt-button-select/wt-button-select.vue.d.ts +3 -3
- package/types/components/wt-call-media-metric/wt-call-media-metric.vue.d.ts +1 -1
- package/types/components/wt-checkbox/wt-checkbox.vue.d.ts +3 -3
- package/types/components/wt-chip/wt-chip.vue.d.ts +2 -2
- package/types/components/wt-confirm-dialog/wt-confirm-dialog.vue.d.ts +5 -5
- package/types/components/wt-context-menu/wt-context-menu.vue.d.ts +7 -7
- package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +20 -19
- package/types/components/wt-divider/wt-divider.vue.d.ts +1 -1
- package/types/components/wt-dual-panel/wt-dual-panel.vue.d.ts +5 -5
- package/types/components/wt-empty/wt-empty.vue.d.ts +38 -38
- package/types/components/wt-expansion-card/wt-expansion-card.vue.d.ts +3 -3
- package/types/components/wt-expansion-panel/wt-expansion-panel.vue.d.ts +3 -3
- package/types/components/wt-galleria/wt-galleria.vue.d.ts +2 -2
- package/types/components/wt-icon/wt-icon.vue.d.ts +1 -1
- package/types/components/wt-icon-action/wt-icon-action.vue.d.ts +4 -4
- package/types/components/wt-icon-btn/wt-icon-btn.vue.d.ts +3 -3
- package/types/components/wt-image/wt-image.vue.d.ts +2 -2
- package/types/components/wt-inline-add-panel/wt-inline-add-panel.vue.d.ts +3 -3
- package/types/components/wt-input-number/wt-input-number.vue.d.ts +9 -9
- package/types/components/wt-input-text/wt-input-text.vue.d.ts +11 -9
- package/types/components/wt-intersection-observer/wt-intersection-observer.vue.d.ts +1 -1
- package/types/components/wt-item-link/wt-item-link.vue.d.ts +1 -1
- package/types/components/wt-label/mixins/labelUsageMixin.d.ts +1 -1
- package/types/components/wt-label/wt-label.vue.d.ts +1 -1
- package/types/components/wt-menubar/wt-menubar.vue.d.ts +1 -1
- package/types/components/wt-message/wt-message.vue.d.ts +1 -1
- package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +19 -19
- package/types/components/wt-navigation-bar/types/WtNavigationBar.d.ts +2 -1
- package/types/components/wt-navigation-bar/wt-navigation-bar.vue.d.ts +22 -45
- package/types/components/wt-page-header/wt-page-header.vue.d.ts +4 -4
- package/types/components/wt-password/wt-password.vue.d.ts +11 -9
- package/types/components/wt-player/wt-player.vue.d.ts +6 -6
- package/types/components/wt-popover/wt-popover.vue.d.ts +13 -9
- package/types/components/wt-popup/wt-popup.vue.d.ts +8 -4
- package/types/components/wt-radio/wt-radio.vue.d.ts +2 -2
- package/types/components/wt-search-bar/wt-search-bar.vue.d.ts +25 -18
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +18 -15
- package/types/components/wt-slider/wt-slider.vue.d.ts +3 -3
- package/types/components/wt-status-select/wt-status-select.vue.d.ts +3 -3
- package/types/components/wt-stepper/wt-stepper.vue.d.ts +2 -2
- package/types/components/wt-switcher/wt-switcher.vue.d.ts +4 -4
- package/types/components/wt-table/types/WtTable.d.ts +7 -1
- package/types/components/wt-table/wt-table.vue.d.ts +12 -12
- package/types/components/wt-table-actions/wt-table-actions.vue.d.ts +2 -2
- package/types/components/wt-table-column-select/wt-table-column-select.vue.d.ts +1 -1
- package/types/components/wt-tabs/wt-tabs.vue.d.ts +3 -3
- package/types/components/wt-textarea/wt-textarea.vue.d.ts +9 -14
- package/types/components/wt-time-input/wt-time-input.vue.d.ts +9 -9
- package/types/components/wt-timepicker/wt-timepicker.vue.d.ts +8 -8
- package/types/components/wt-tooltip/_internals/wt-tooltip-floating.vue.d.ts +5 -5
- package/types/components/wt-tooltip/wt-tooltip.vue.d.ts +7 -7
- package/types/components/wt-tree/wt-tree.vue.d.ts +5 -3
- package/types/components/wt-tree-line/types/wt-tree-node.d.ts +5 -0
- package/types/components/wt-tree-line/wt-tree-line.vue.d.ts +8 -18
- package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +2 -2
- package/types/components/wt-tree-table-row/wt-tree-table-row.vue.d.ts +3 -18
- package/types/components/wt-vidstack-player/components/buttons/fullscreen-button.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +5 -5
- package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/components/buttons/fullscreen-button.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/components/time-group.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/components/panels/playback-controls-panel/playback-controls-panel.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue.d.ts +3 -3
- package/types/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue.d.ts +14 -14
- package/types/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue.d.ts +2 -2
- package/types/components/wt-vidstack-player/components/screenshot-box/screenshot-box.vue.d.ts +2 -2
- package/types/components/wt-vidstack-player/components/toggle-button.vue.d.ts +1 -1
- package/types/components/wt-vidstack-player/composables/useVidstackPlayerSize.d.ts +2 -0
- package/types/components/wt-vidstack-player/composables/useVidstackSrc.d.ts +11 -4
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +8 -7
- package/types/composables/useCachedInterval/useCachedInterval.d.ts +1 -1
- package/types/composables/useCachedItemInstanceName/useCachedItemInstanceName.d.ts +1 -1
- package/types/composables/useCard/useCardTabs.d.ts +1 -1
- package/types/composables/useClose/useClose.d.ts +1 -1
- package/types/enums/MessageColor/MessageColor.d.ts +1 -1
- package/types/enums/MessageVariant/MessageVariant.d.ts +1 -1
- package/types/locale/en/en.d.ts +4 -2
- package/types/locale/es/es.d.ts +4 -2
- package/types/locale/i18n.d.ts +36 -18
- package/types/locale/index.d.ts +36 -18
- package/types/locale/kz/kz.d.ts +4 -2
- package/types/locale/pl/pl.d.ts +4 -2
- package/types/locale/ro/ro.d.ts +4 -2
- package/types/locale/ru/ru.d.ts +4 -2
- package/types/locale/uk/uk.d.ts +4 -2
- package/types/locale/uz/uz.d.ts +4 -2
- package/types/locale/vi/vi.d.ts +4 -2
- package/types/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.d.ts +1 -1
- package/types/mixins/dataFilterMixins/apiFilterMixin.d.ts +3 -3
- package/types/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.d.ts +1 -1
- package/types/mixins/dataFilterMixins/enumFilterMixin.d.ts +4 -4
- package/types/mixins/dataFilterMixins/paginationFilterMixin.d.ts +2 -2
- package/types/mixins/dataFilterMixins/sortFilterMixin.d.ts +1 -1
- package/types/mixins/validationMixin/regle/useRegleValidation.d.ts +1 -1
- package/types/mixins/validationMixin/useValidation.d.ts +2 -2
- package/types/mixins/validationMixin/validationMixin.d.ts +1 -1
- package/types/mixins/validationMixin/vuelidate/useVuelidateValidation.d.ts +9 -5
- package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +1 -1
- package/types/modules/AgentPdfs/components/pdf-status-preview.vue.d.ts +1 -1
- package/types/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue.d.ts +4 -4
- package/types/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue.d.ts +1 -1
- package/types/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue.d.ts +1 -1
- package/types/modules/Appearance/components/wt-dark-mode-switcher.vue.d.ts +1 -1
- package/types/modules/Appearance/pinia/store/AppearanceStore.d.ts +3 -3
- package/types/modules/Appearance/store/AppearanceStoreModule.d.ts +1 -1
- package/types/modules/AuditForm/components/audit-form-question-read-wrapper.vue.d.ts +3 -3
- package/types/modules/AuditForm/components/audit-form-question-write-wrapper.vue.d.ts +2 -2
- package/types/modules/AuditForm/components/audit-form-question.vue.d.ts +7 -7
- package/types/modules/AuditForm/components/audit-form.vue.d.ts +6 -6
- package/types/modules/AuditForm/components/form/form-footer/audit-form-footer.vue.d.ts +3 -3
- package/types/modules/AuditForm/components/form-questions/options/audit-form-question-options-write-row.vue.d.ts +2 -2
- package/types/modules/AuditForm/components/form-questions/options/audit-form-question-options.vue.d.ts +4 -4
- package/types/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue.d.ts +6 -6
- package/types/modules/AuditForm/components/form-questions/yes/audit-form-question-yes.vue.d.ts +2 -2
- package/types/modules/CSVExport/CSVExport.d.ts +3 -6
- package/types/modules/CSVExport/XLSExport.d.ts +1 -1
- package/types/modules/CSVExport/composables/useCSVExport.d.ts +6 -6
- package/types/modules/CSVExport/mixins/exportCSVMixin.d.ts +1 -1
- package/types/modules/CSVExport/mixins/exportXLSMixin.d.ts +1 -1
- package/types/modules/CallSession/modules/ScreenSharing/screen-sharing.vue.d.ts +3 -3
- package/types/modules/CallSession/modules/VideoCall/composables/useReceiverLiveStream.d.ts +6 -6
- package/types/modules/CallSession/modules/VideoCall/video-call.vue.d.ts +17 -17
- package/types/modules/CardStoreModule/store/CardStoreModule.d.ts +1 -1
- package/types/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue.d.ts +2 -2
- package/types/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.d.ts +1 -1
- package/types/modules/Filters/classes/BaseFilterSchema.d.ts +7 -7
- package/types/modules/Filters/components/filter-search.vue.d.ts +2 -2
- package/types/modules/Filters/components/filter-table-fields.vue.d.ts +3 -3
- package/types/modules/Filters/scripts/getters/localStorageGetter.d.ts +1 -1
- package/types/modules/Filters/store/FiltersStoreModule.d.ts +1 -1
- package/types/modules/Notifications/assets/audio/triggerSound.d.ts +1 -1
- package/types/modules/Notifications/store/NotificationsStoreModule.d.ts +9 -9
- package/types/modules/ObjectPermissions/components/_internal/permissions-role-row.vue.d.ts +1 -1
- package/types/modules/ObjectPermissions/components/_internal/permissions-role-select.vue.d.ts +1 -1
- package/types/modules/ObjectPermissions/components/_internal/permissions-tab-content.vue.d.ts +5 -5
- package/types/modules/ObjectPermissions/components/_internal/permissions-tab-role-popup.vue.d.ts +2 -2
- package/types/modules/ObjectPermissions/headers/headers.d.ts +1 -1
- package/types/modules/ObjectPermissions/store/objectPermissionsStoreModule.d.ts +2 -2
- package/types/modules/QueryFilters/classes/BaseFilterSchema.d.ts +2 -2
- package/types/modules/QueryFilters/components/abstract-api-filter.vue.d.ts +1 -1
- package/types/modules/QueryFilters/components/abstract-enum-filter.vue.d.ts +1 -1
- package/types/modules/QueryFilters/components/filter-datetime.vue.d.ts +1 -1
- package/types/modules/QueryFilters/components/filter-from-to.vue.d.ts +1 -1
- package/types/modules/QueryFilters/components/filter-search.vue.d.ts +1 -1
- package/types/modules/QueryFilters/components/filter-table-fields.vue.d.ts +3 -3
- package/types/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.d.ts +1 -1
- package/types/modules/QueryFilters/mixins/apiFilterMixin.d.ts +1 -1
- package/types/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.d.ts +1 -1
- package/types/modules/QueryFilters/mixins/enumFilterMixin.d.ts +1 -1
- package/types/modules/QueryFilters/mixins/paginationFilterMixin.d.ts +2 -2
- package/types/modules/QueryFilters/mixins/sortFilterMixin.d.ts +1 -1
- package/types/modules/QueryFilters/store/QueryFiltersStoreModule.d.ts +4 -4
- package/types/modules/TableComponentModule/composables/useTableEmpty.d.ts +7 -7
- package/types/modules/TableStoreModule/store/TableStoreModule.d.ts +5 -5
- package/types/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue.d.ts +5 -5
- package/types/modules/UploadCsvPopup/composable/useUploadCsv.d.ts +21 -11
- package/types/modules/UploadCsvPopup/scripts/normalizeCSVData.d.ts +15 -20
- package/types/modules/UploadCsvPopup/scripts/parseCSV.d.ts +2 -1
- package/types/modules/UploadCsvPopup/scripts/processFile.d.ts +2 -2
- package/types/modules/UploadCsvPopup/scripts/splitAndSaveData.d.ts +3 -3
- package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +2 -10
- package/types/modules/Userinfo/mappings/mappings.d.ts +12 -24
- package/types/modules/Userinfo/scripts/utils.d.ts +2 -2
- package/types/modules/Userinfo/stores/settingsStore.d.ts +4 -4
- package/types/modules/Userinfo/stores/userinfoStore.d.ts +3 -3
- package/types/modules/Userinfo/types/UserAccess.d.ts +1 -1
- package/types/scripts/compareSize.d.ts +4 -4
- package/types/scripts/debounce.d.ts +1 -1
- package/types/scripts/sortQueryAdapters.d.ts +3 -3
- package/types/store/BaseStoreModules/BaseStoreModule.d.ts +6 -6
- package/types/store/new/modules/apiStoreModule/apiStoreModule.d.ts +12 -12
- package/types/store/new/modules/tableStoreModule/tableStoreModule.d.ts +4 -4
- package/types/utils/displayText.d.ts +1 -1
- package/types/validations/config/errors/customZodErrorsHandler.d.ts +1 -1
- package/dist/vidstack-video-DwlbGwN7.js +0 -2
- package/dist/wt-send-message-popup-MbV1uq6H.js +0 -77
- package/dist/wt-start-page-DMXRhA9E.js +0 -86
- package/dist/{wt-popover-ChCN6b1o.js → wt-popover-lP-AhF8l.js} +3 -3
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
]"
|
|
8
8
|
:hide-video-display-panel="isPiP || props.hideVideoDisplayPanel"
|
|
9
9
|
:size="isPiP ? ComponentSize.MD : props.size"
|
|
10
|
-
:stream="mainStream"
|
|
10
|
+
:stream="mainStream ?? undefined"
|
|
11
11
|
:static="isPiP || props.static"
|
|
12
12
|
:username="props.username"
|
|
13
13
|
:hide-controls-panel="props.hideControlsPanel"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<wt-vidstack-player
|
|
117
117
|
:class="`video-call-sender--${innerSize}`"
|
|
118
118
|
:style="pipContentSizeStyle"
|
|
119
|
-
:stream="props['sender:stream']"
|
|
119
|
+
:stream="props['sender:stream'] ?? undefined"
|
|
120
120
|
autoplay
|
|
121
121
|
class="video-call-sender"
|
|
122
122
|
hide-controls-panel
|
|
@@ -148,16 +148,16 @@
|
|
|
148
148
|
:mic:enabled="props['sender:mic:enabled']"
|
|
149
149
|
:recordings="props.recordings"
|
|
150
150
|
:screenshot:loading="props['screenshot:loading']"
|
|
151
|
-
:screenshot:status="props['screenshot:status']"
|
|
151
|
+
:screenshot:status="props['screenshot:status'] ?? null"
|
|
152
152
|
:video:accessed="props['sender:video:accessed']"
|
|
153
153
|
:video:enabled="props['sender:video:enabled']"
|
|
154
|
-
@[VideoCallAction.Recordings]="(
|
|
155
|
-
@[VideoCallAction.Screenshot]="(
|
|
156
|
-
@[VideoCallAction.Mic]="(
|
|
157
|
-
@[VideoCallAction.Video]="(
|
|
158
|
-
@[VideoCallAction.Settings]="(
|
|
159
|
-
@[VideoCallAction.Chat]="(
|
|
160
|
-
@[VideoCallAction.Hangup]="(
|
|
154
|
+
@[VideoCallAction.Recordings]="forwardAction(VideoCallAction.Recordings)"
|
|
155
|
+
@[VideoCallAction.Screenshot]="forwardAction(VideoCallAction.Screenshot)"
|
|
156
|
+
@[VideoCallAction.Mic]="forwardAction(VideoCallAction.Mic)"
|
|
157
|
+
@[VideoCallAction.Video]="forwardAction(VideoCallAction.Video)"
|
|
158
|
+
@[VideoCallAction.Settings]="forwardAction(VideoCallAction.Settings)"
|
|
159
|
+
@[VideoCallAction.Chat]="forwardAction(VideoCallAction.Chat)"
|
|
160
|
+
@[VideoCallAction.Hangup]="forwardAction(VideoCallAction.Hangup)"
|
|
161
161
|
|
|
162
162
|
/>
|
|
163
163
|
</template>
|
|
@@ -284,6 +284,21 @@ const emitKeys = {
|
|
|
284
284
|
[VideoCallAction.Hangup]: `action:${VideoCallAction.Hangup}`,
|
|
285
285
|
} as const;
|
|
286
286
|
|
|
287
|
+
type VideoCallActionKey = keyof typeof emitKeys;
|
|
288
|
+
|
|
289
|
+
/** dynamic `@[action]` handlers cannot be annotated inline */
|
|
290
|
+
const forwardAction =
|
|
291
|
+
(action: VideoCallActionKey) =>
|
|
292
|
+
(payload?: unknown, options?: ResultCallbacks) =>
|
|
293
|
+
// the per-action emit overloads don't unify over a computed key
|
|
294
|
+
(
|
|
295
|
+
emit as (
|
|
296
|
+
e: (typeof emitKeys)[VideoCallActionKey],
|
|
297
|
+
payload?: unknown,
|
|
298
|
+
options?: ResultCallbacks,
|
|
299
|
+
) => void
|
|
300
|
+
)(emitKeys[action], payload, options);
|
|
301
|
+
|
|
287
302
|
const { t } = useI18n();
|
|
288
303
|
|
|
289
304
|
const playerRef = ref<InstanceType<typeof WtVidstackPlayer> | null>(null);
|
|
@@ -467,17 +482,20 @@ onBeforeUnmount(() => {
|
|
|
467
482
|
stopHoldTimer();
|
|
468
483
|
});
|
|
469
484
|
|
|
470
|
-
const receiverVideoMutedIconSizes
|
|
485
|
+
const receiverVideoMutedIconSizes: Partial<
|
|
486
|
+
Record<ComponentSize, ComponentSize>
|
|
487
|
+
> = {
|
|
471
488
|
[ComponentSize.SM]: ComponentSize.MD,
|
|
472
489
|
[ComponentSize.MD]: ComponentSize.LG,
|
|
473
490
|
[ComponentSize.LG]: ComponentSize.XXL,
|
|
474
491
|
};
|
|
475
492
|
|
|
476
|
-
const senderVideoMutedIconSizes =
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
493
|
+
const senderVideoMutedIconSizes: Partial<Record<ComponentSize, ComponentSize>> =
|
|
494
|
+
{
|
|
495
|
+
[ComponentSize.SM]: ComponentSize.MD,
|
|
496
|
+
[ComponentSize.MD]: ComponentSize['4XL'],
|
|
497
|
+
[ComponentSize.LG]: ComponentSize['8XL'],
|
|
498
|
+
};
|
|
481
499
|
</script>
|
|
482
500
|
|
|
483
501
|
<style scoped>
|
|
@@ -6,7 +6,7 @@ export const useDeleteConfirmationPopup = () => {
|
|
|
6
6
|
const deleteCount = ref(0);
|
|
7
7
|
const deleteCallback = ref(() => {});
|
|
8
8
|
|
|
9
|
-
function askDeleteConfirmation({ deleted, callback }) {
|
|
9
|
+
function askDeleteConfirmation({ deleted = undefined, callback }) {
|
|
10
10
|
if (Array.isArray(deleted)) deleteCount.value = deleted.length;
|
|
11
11
|
else deleteCount.value = 1;
|
|
12
12
|
isVisible.value = true;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
</template>
|
|
141
141
|
|
|
142
142
|
<script setup lang="ts">
|
|
143
|
-
import {
|
|
143
|
+
import { ref, toRefs } from 'vue';
|
|
144
144
|
import { useI18n } from 'vue-i18n';
|
|
145
145
|
|
|
146
146
|
import useUploadCsv from '../composable/useUploadCsv';
|
|
@@ -153,7 +153,7 @@ interface CharsetOption {
|
|
|
153
153
|
|
|
154
154
|
interface Props {
|
|
155
155
|
file: File | null;
|
|
156
|
-
mappingFields:
|
|
156
|
+
mappingFields: CsvMappingField[];
|
|
157
157
|
addBulkItems?: (items: unknown[]) => unknown | Promise<unknown>;
|
|
158
158
|
handlingMode?: string;
|
|
159
159
|
fileUploadHandler?: () => unknown | Promise<unknown>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { computed, ref, watch } from 'vue';
|
|
1
|
+
import { computed, type Ref, ref, watch } from 'vue';
|
|
2
2
|
|
|
3
3
|
import { debounce, isEmpty } from '../../../scripts';
|
|
4
|
-
import normalizeCSVData
|
|
4
|
+
import normalizeCSVData, {
|
|
5
|
+
type CsvDataRow,
|
|
6
|
+
type CsvMappingField,
|
|
7
|
+
} from '../scripts/normalizeCSVData';
|
|
5
8
|
import parseCSV from '../scripts/parseCSV';
|
|
6
9
|
import processFile from '../scripts/processFile';
|
|
7
10
|
import splitAndSaveData from '../scripts/splitAndSaveData';
|
|
@@ -14,12 +17,33 @@ import HandlingCSVMode from '../types/WtUploadCSVHandlingMode.enum';
|
|
|
14
17
|
* @param {import('vue').Ref<boolean>} params.skipHeaders
|
|
15
18
|
* @param {import('vue').Ref<string>} params.separator
|
|
16
19
|
*/
|
|
17
|
-
|
|
20
|
+
export interface UseUploadCsvProps {
|
|
21
|
+
file?: File | null;
|
|
22
|
+
mappingFields?: CsvMappingField[];
|
|
23
|
+
addBulkItems?: (items: unknown[]) => unknown | Promise<unknown>;
|
|
24
|
+
handlingMode?: string;
|
|
25
|
+
fileUploadHandler?: () => unknown | Promise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface UseUploadCsvParams {
|
|
29
|
+
props: UseUploadCsvProps;
|
|
30
|
+
// biome-ignore lint/suspicious/noExplicitAny: receives the component's typed emit
|
|
31
|
+
emit: (event: any, ...args: any[]) => void;
|
|
32
|
+
skipHeaders: Ref<boolean>;
|
|
33
|
+
separator: Ref<string>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const useUploadCsv = ({
|
|
37
|
+
props,
|
|
38
|
+
emit,
|
|
39
|
+
skipHeaders,
|
|
40
|
+
separator,
|
|
41
|
+
}: UseUploadCsvParams) => {
|
|
18
42
|
const isReadingFile = ref(false);
|
|
19
43
|
const isParsingCSV = ref(false);
|
|
20
|
-
const parsedFile = ref(null);
|
|
44
|
+
const parsedFile = ref<unknown>(null);
|
|
21
45
|
const isParsingPreview = ref(false);
|
|
22
|
-
const parseErrorStackTrace = ref('');
|
|
46
|
+
const parseErrorStackTrace = ref<unknown>('');
|
|
23
47
|
const csvPreview = ref<unknown[]>([
|
|
24
48
|
[],
|
|
25
49
|
]);
|
|
@@ -31,7 +55,7 @@ const useUploadCsv = ({ props, emit, skipHeaders, separator }) => {
|
|
|
31
55
|
);
|
|
32
56
|
|
|
33
57
|
const csvColumns = computed(() => {
|
|
34
|
-
const firstRow = csvPreview.value[0] || {};
|
|
58
|
+
const firstRow = (csvPreview.value[0] || {}) as object;
|
|
35
59
|
const columns = Object.keys(firstRow);
|
|
36
60
|
|
|
37
61
|
if (skipHeaders.value) {
|
|
@@ -48,7 +72,7 @@ const useUploadCsv = ({ props, emit, skipHeaders, separator }) => {
|
|
|
48
72
|
const parseCSVOptions = computed(() => ({
|
|
49
73
|
/* docs: https://csv.js.org/parse/options/ */
|
|
50
74
|
delimiter: separator.value,
|
|
51
|
-
columns: (firstLine) => {
|
|
75
|
+
columns: (firstLine: string[]) => {
|
|
52
76
|
if (skipHeaders.value) return firstLine;
|
|
53
77
|
return firstLine.map((_, index) => `${index}`);
|
|
54
78
|
},
|
|
@@ -80,7 +104,7 @@ const useUploadCsv = ({ props, emit, skipHeaders, separator }) => {
|
|
|
80
104
|
async function createCSVPreview(file = parsedFile.value) {
|
|
81
105
|
try {
|
|
82
106
|
parseErrorStackTrace.value = '';
|
|
83
|
-
csvPreview.value = await parseCSV(file, {
|
|
107
|
+
csvPreview.value = await parseCSV(file as string, {
|
|
84
108
|
...parseCSVOptions.value,
|
|
85
109
|
toLine: 4,
|
|
86
110
|
});
|
|
@@ -114,18 +138,21 @@ const useUploadCsv = ({ props, emit, skipHeaders, separator }) => {
|
|
|
114
138
|
|
|
115
139
|
isReadingFile.value = true;
|
|
116
140
|
|
|
117
|
-
parsedFile.value = await processFile(props.file, {});
|
|
141
|
+
parsedFile.value = await processFile(props.file as File, {});
|
|
118
142
|
await createCSVPreview(parsedFile.value);
|
|
119
143
|
|
|
120
144
|
isReadingFile.value = false;
|
|
121
145
|
}
|
|
122
146
|
|
|
123
147
|
async function handleCSVProcessing() {
|
|
124
|
-
const sourceData = await parseCSV(
|
|
148
|
+
const sourceData = await parseCSV(
|
|
149
|
+
parsedFile.value as string,
|
|
150
|
+
parseCSVOptions.value,
|
|
151
|
+
);
|
|
125
152
|
|
|
126
153
|
const normalizedData = normalizeCSVData({
|
|
127
|
-
data: sourceData,
|
|
128
|
-
mappings: props.mappingFields,
|
|
154
|
+
data: sourceData as CsvDataRow[],
|
|
155
|
+
mappings: props.mappingFields ?? [],
|
|
129
156
|
});
|
|
130
157
|
|
|
131
158
|
await splitAndSaveData({
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import isEmpty from '../../../scripts/isEmpty';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
/** maps a webitel field to the csv column(s) it is built from */
|
|
4
|
+
export interface CsvMappingField {
|
|
5
|
+
name: string;
|
|
6
|
+
csv: string | string[];
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/** ui locale key */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** the field maps to several csv columns */
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CsvDataRow = Record<string, unknown>;
|
|
15
|
+
|
|
16
|
+
const normalizeCSVData = ({
|
|
17
|
+
data,
|
|
18
|
+
mappings,
|
|
19
|
+
}: {
|
|
20
|
+
data: CsvDataRow[];
|
|
21
|
+
mappings: CsvMappingField[];
|
|
22
|
+
}) => {
|
|
20
23
|
const nonEmptyMappingFields = mappings.filter((field) => !isEmpty(field.csv));
|
|
21
24
|
|
|
22
25
|
return data.map((dataItem, index) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { parse } from 'csv-parse/browser/esm';
|
|
1
|
+
import { type Options, parse } from 'csv-parse/browser/esm';
|
|
2
2
|
|
|
3
|
-
const parseCSV = (csvStr, options = {}): Promise<unknown[]> =>
|
|
3
|
+
const parseCSV = (csvStr: string, options: Options = {}): Promise<unknown[]> =>
|
|
4
4
|
new Promise((resolve, reject) => {
|
|
5
5
|
parse(
|
|
6
6
|
csvStr,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const processFile = (file, { charset = 'utf-8' } = {}) =>
|
|
1
|
+
const processFile = (file: Blob, { charset = 'utf-8' } = {}) =>
|
|
2
2
|
new Promise((resolve, reject) => {
|
|
3
3
|
const reader = new FileReader();
|
|
4
4
|
reader.addEventListener('load', (e) => {
|
|
5
|
-
const loadedFile = e.target
|
|
5
|
+
const loadedFile = e.target?.result;
|
|
6
6
|
resolve(loadedFile);
|
|
7
7
|
});
|
|
8
8
|
reader.addEventListener('error', (e) => reject(e));
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
const splitAndSaveData = async ({
|
|
1
|
+
const splitAndSaveData = async ({
|
|
2
|
+
data,
|
|
3
|
+
saveCallback,
|
|
4
|
+
}: {
|
|
5
|
+
data: unknown[];
|
|
6
|
+
saveCallback?: (chunk: unknown[]) => unknown | Promise<unknown>;
|
|
7
|
+
}) => {
|
|
2
8
|
const chunkSize = 100;
|
|
3
9
|
const chunksCount = Math.ceil(data.length / chunkSize);
|
|
4
10
|
let processedChunkIndex = 1;
|
|
5
11
|
try {
|
|
6
12
|
for (; processedChunkIndex <= chunksCount; processedChunkIndex += 1) {
|
|
7
|
-
await saveCallback(
|
|
13
|
+
await saveCallback?.(
|
|
8
14
|
data.slice(
|
|
9
15
|
(processedChunkIndex - 1) * chunkSize,
|
|
10
16
|
processedChunkIndex * chunkSize,
|
|
@@ -77,7 +77,15 @@ export const createUserNotificationsStore = () => {
|
|
|
77
77
|
() =>
|
|
78
78
|
eventBus.$emit('notification', {
|
|
79
79
|
type,
|
|
80
|
-
text:
|
|
80
|
+
text: (
|
|
81
|
+
i18n.global.t as (
|
|
82
|
+
key: string,
|
|
83
|
+
named: Record<string, unknown>,
|
|
84
|
+
options: {
|
|
85
|
+
locale: string;
|
|
86
|
+
},
|
|
87
|
+
) => string
|
|
88
|
+
)(
|
|
81
89
|
`systemNotifications.warnings.${localeKey}`,
|
|
82
90
|
{
|
|
83
91
|
...params,
|
|
@@ -303,14 +303,15 @@ export default class ApplicationsAccess {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// minify schema for API sending
|
|
306
|
-
static minify(access) {
|
|
307
|
-
const rmEmptyKeys = (obj) => {
|
|
306
|
+
static minify(access: Record<string, unknown>) {
|
|
307
|
+
const rmEmptyKeys = (obj: Record<string, unknown>) => {
|
|
308
308
|
Object.keys(obj).forEach((key) => {
|
|
309
309
|
if (!obj[key] || key === '_locale') delete obj[key];
|
|
310
310
|
if (typeof obj[key] === 'object') {
|
|
311
|
-
|
|
311
|
+
const nested = obj[key] as Record<string, unknown>;
|
|
312
|
+
rmEmptyKeys(nested);
|
|
312
313
|
|
|
313
|
-
if (!Object.keys(
|
|
314
|
+
if (!Object.keys(nested).length) delete obj[key];
|
|
314
315
|
}
|
|
315
316
|
});
|
|
316
317
|
return obj;
|
|
@@ -319,8 +320,13 @@ export default class ApplicationsAccess {
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
// restore minified schema from API response
|
|
322
|
-
static restore(
|
|
323
|
-
|
|
323
|
+
static restore(
|
|
324
|
+
access: PartialDeep<ApplicationsAccessSchema>,
|
|
325
|
+
): ApplicationsAccessSchema {
|
|
326
|
+
return deepmerge(
|
|
327
|
+
applicationsAccess(false),
|
|
328
|
+
access,
|
|
329
|
+
) as ApplicationsAccessSchema;
|
|
324
330
|
// return deepmerge(access, applicationsAccess(false));
|
|
325
331
|
}
|
|
326
332
|
|
|
@@ -10,8 +10,11 @@ import {
|
|
|
10
10
|
WtObject,
|
|
11
11
|
} from '../../../enums';
|
|
12
12
|
import { CrudGlobalAction, ScopeClass, SpecialGlobalAction } from '../enums';
|
|
13
|
+
import type { GlobalAction } from '../types/UserAccess';
|
|
13
14
|
|
|
14
|
-
export const mapGlobalActionToCrudAction
|
|
15
|
+
export const mapGlobalActionToCrudAction: Partial<
|
|
16
|
+
Record<GlobalAction, CrudAction>
|
|
17
|
+
> = {
|
|
15
18
|
[CrudGlobalAction.Add]: CrudAction.Create,
|
|
16
19
|
[CrudGlobalAction.Read]: CrudAction.Read,
|
|
17
20
|
[CrudGlobalAction.Write]: CrudAction.Update,
|
|
@@ -161,7 +164,9 @@ export const mapScopeClassToWtObjects: Partial<Record<ScopeClass, WtObject[]>> =
|
|
|
161
164
|
],
|
|
162
165
|
};
|
|
163
166
|
|
|
164
|
-
export const wtObjectsWithGlobalCrudActionAccessAsChecksSource
|
|
167
|
+
export const wtObjectsWithGlobalCrudActionAccessAsChecksSource: Partial<
|
|
168
|
+
Record<WtObject, boolean>
|
|
169
|
+
> = {
|
|
165
170
|
[WtObject.License]: true,
|
|
166
171
|
[WtObject.Object]: true,
|
|
167
172
|
};
|
|
@@ -173,7 +178,9 @@ export const wtObjectsWithGlobalSpecialActionAccessAsChecksSource: Partial<
|
|
|
173
178
|
[WtObject.GlobalVariable]: SpecialGlobalAction.SchemeVariables,
|
|
174
179
|
};
|
|
175
180
|
|
|
176
|
-
export const mapScopeClassAccessTokenToCrudAction
|
|
181
|
+
export const mapScopeClassAccessTokenToCrudAction: Partial<
|
|
182
|
+
Record<string, CrudAction>
|
|
183
|
+
> = {
|
|
177
184
|
r: CrudAction.Read,
|
|
178
185
|
w: CrudAction.Update,
|
|
179
186
|
d: CrudAction.Delete,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CrudAction, WtObject } from '../../../enums';
|
|
1
|
+
import type { CrudAction, WtApplication, WtObject } from '../../../enums';
|
|
2
2
|
import { _wtUiLog as wtlog } from '../../../scripts/logger';
|
|
3
3
|
import {
|
|
4
4
|
mapGlobalActionToCrudAction,
|
|
@@ -128,11 +128,15 @@ export const makeLicenseAccessMap = (
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
export const castUiSectionToWtObject = (section: UiSection): WtObject => {
|
|
131
|
-
|
|
131
|
+
// `mapUiSectionToWtObject` is a lodash `invert()` result, so it is untyped
|
|
132
|
+
return mapUiSectionToWtObject[section] as unknown as WtObject;
|
|
132
133
|
};
|
|
133
134
|
|
|
134
|
-
export const castWtObjectToUiSection = (
|
|
135
|
-
|
|
135
|
+
export const castWtObjectToUiSection = (
|
|
136
|
+
app: WtApplication,
|
|
137
|
+
object: WtObject,
|
|
138
|
+
): UiSection | undefined => {
|
|
139
|
+
return mapWtObjectToUiSection[app]?.[object];
|
|
136
140
|
};
|
|
137
141
|
|
|
138
142
|
export const shouldUseGlobalSpecialActionAccessAsChecksSource = (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import type { NavigationGuard } from 'vue-router';
|
|
3
|
+
import type { NavigationGuard, RouteLocationNormalized } from 'vue-router';
|
|
4
4
|
|
|
5
5
|
import { CrudAction, type WtApplication, type WtObject } from '../../../enums';
|
|
6
6
|
import type { SpecialGlobalAction, WebitelLicense } from '../enums';
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
makeScopeAccessMap,
|
|
13
13
|
makeSectionVisibilityMap,
|
|
14
14
|
shouldUseGlobalCrudActionAccessAsChecksSource,
|
|
15
|
-
shouldUseGlobalSpecialActionAccessAsChecksSource,
|
|
16
15
|
} from '../scripts/utils';
|
|
17
16
|
import type {
|
|
18
17
|
AppVisibilityMap,
|
|
@@ -48,23 +47,22 @@ export const createUserAccessStore = ({
|
|
|
48
47
|
|
|
49
48
|
const hasAccess = (
|
|
50
49
|
action: CrudAction | SpecialGlobalAction,
|
|
51
|
-
object
|
|
50
|
+
object?: WtObject,
|
|
52
51
|
) => {
|
|
53
52
|
/* scope exceptions handling */
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
);
|
|
54
|
+
const specialAction =
|
|
55
|
+
object && wtObjectsWithGlobalSpecialActionAccessAsChecksSource[object];
|
|
56
|
+
if (specialAction) {
|
|
57
|
+
return hasSpecialGlobalActionAccess(specialAction);
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
if (shouldUseGlobalCrudActionAccessAsChecksSource(object)) {
|
|
60
|
+
if (object && shouldUseGlobalCrudActionAccessAsChecksSource(object)) {
|
|
62
61
|
return hasGlobalCrudActionAccess(action as CrudAction);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
const allowScopeAccess =
|
|
66
|
-
.get(object)
|
|
67
|
-
?.get(action as CrudAction);
|
|
64
|
+
const allowScopeAccess =
|
|
65
|
+
object && scopeAccess.value.get(object)?.get(action as CrudAction);
|
|
68
66
|
return !!allowScopeAccess;
|
|
69
67
|
};
|
|
70
68
|
|
|
@@ -85,7 +83,7 @@ export const createUserAccessStore = ({
|
|
|
85
83
|
};
|
|
86
84
|
|
|
87
85
|
const hasApplicationVisibility = (app: WtApplication) => {
|
|
88
|
-
return appVisibilityAccess.value.get(app);
|
|
86
|
+
return !!appVisibilityAccess.value.get(app);
|
|
89
87
|
};
|
|
90
88
|
|
|
91
89
|
const hasSectionVisibility = ({
|
|
@@ -102,7 +100,7 @@ export const createUserAccessStore = ({
|
|
|
102
100
|
const objectOfSection = object; /*castUiSectionToWtObject(section)*/
|
|
103
101
|
const hasSectionVisibilityAccess = (section: UiSection) => {
|
|
104
102
|
const fullSectionName: FullUiSectionName = `${appOfSection}/${section}`;
|
|
105
|
-
return sectionVisibilityAccess.value.get(fullSectionName);
|
|
103
|
+
return !!sectionVisibilityAccess.value.get(fullSectionName);
|
|
106
104
|
};
|
|
107
105
|
|
|
108
106
|
const allowAppVisibility = hasApplicationVisibility(appOfSection);
|
|
@@ -117,16 +115,18 @@ export const createUserAccessStore = ({
|
|
|
117
115
|
.toReversed()
|
|
118
116
|
.find(({ meta }) => meta.WtApplication)?.meta?.WtApplication as
|
|
119
117
|
| WtApplication
|
|
120
|
-
| ((RouteLocationNormalized) => WtApplication);
|
|
118
|
+
| ((route: RouteLocationNormalized) => WtApplication);
|
|
121
119
|
|
|
122
120
|
/* find last because "matched" has top=>bottom routes order */
|
|
123
121
|
let uiSection = to.matched.toReversed().find(({ meta }) => meta.UiSection)
|
|
124
122
|
?.meta?.UiSection as
|
|
125
123
|
| UiSection
|
|
126
|
-
| ((RouteLocationNormalized) => UiSection);
|
|
124
|
+
| ((route: RouteLocationNormalized) => UiSection);
|
|
127
125
|
/* find last because "matched" has top=>bottom routes order */
|
|
128
126
|
let wtObject = to.matched.toReversed().find(({ meta }) => meta.UiSection)
|
|
129
|
-
?.meta?.WtObject as
|
|
127
|
+
?.meta?.WtObject as
|
|
128
|
+
| WtObject
|
|
129
|
+
| ((route: RouteLocationNormalized) => WtObject);
|
|
130
130
|
|
|
131
131
|
// if, then compute fn
|
|
132
132
|
if (typeof wtApplication === 'function') {
|
|
@@ -109,7 +109,7 @@ export type AppVisibilityMap = Map<WtApplication, boolean>;
|
|
|
109
109
|
export type SectionVisibilityMap = Map<FullUiSectionName, boolean>;
|
|
110
110
|
|
|
111
111
|
export interface UserAccessStore {
|
|
112
|
-
initialize: (CreateUserAccessStoreRawAccess) => void;
|
|
112
|
+
initialize: (rawAccess: CreateUserAccessStoreRawAccess) => void;
|
|
113
113
|
|
|
114
114
|
hasReadAccess: (object?: WtObject) => boolean;
|
|
115
115
|
hasCreateAccess: (object?: WtObject) => boolean;
|
|
@@ -149,7 +149,7 @@ const onResize = () => {
|
|
|
149
149
|
xl: 4,
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
const current = breakpoints[breakpoint.name];
|
|
152
|
+
const current = breakpoints[breakpoint.name as keyof typeof breakpoints];
|
|
153
153
|
const max = breakpoints[mobileBreakpoint];
|
|
154
154
|
|
|
155
155
|
breakpoint.mobile = current <= max;
|
|
@@ -19,7 +19,7 @@ const numerics = Object.values(ComponentSize).reduce(
|
|
|
19
19
|
* compareSize(ComponentSize.XS, ComponentSize.MD); // true
|
|
20
20
|
* compareSize(ComponentSize.LG, ComponentSize.SM); // false
|
|
21
21
|
*/
|
|
22
|
-
export const compareSize = (s1, s2) => {
|
|
22
|
+
export const compareSize = (s1: ComponentSize, s2: ComponentSize) => {
|
|
23
23
|
return numerics[s1] - numerics[s2];
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ export const compareSize = (s1, s2) => {
|
|
|
30
30
|
* @returns {boolean}
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
export const smallerThen = (s1, s2) => {
|
|
33
|
+
export const smallerThen = (s1: ComponentSize, s2: ComponentSize) => {
|
|
34
34
|
return compareSize(s1, s2) < 0;
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ export const smallerThen = (s1, s2) => {
|
|
|
40
40
|
* @param s2
|
|
41
41
|
* @returns {boolean}
|
|
42
42
|
*/
|
|
43
|
-
export const smallerOrEqual = (s1, s2) => {
|
|
43
|
+
export const smallerOrEqual = (s1: ComponentSize, s2: ComponentSize) => {
|
|
44
44
|
return compareSize(s1, s2) <= 0;
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ export const smallerOrEqual = (s1, s2) => {
|
|
|
50
50
|
* @param s2
|
|
51
51
|
* @returns {boolean}
|
|
52
52
|
*/
|
|
53
|
-
export const greaterThen = (s1, s2) => {
|
|
53
|
+
export const greaterThen = (s1: ComponentSize, s2: ComponentSize) => {
|
|
54
54
|
return compareSize(s1, s2) > 0;
|
|
55
55
|
};
|
|
56
56
|
|
package/src/utils/displayText.ts
CHANGED