@webitel/ui-sdk 0.1.2 → 0.1.3-vite
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/CHANGELOG.md +9 -0
- package/README.md +29 -29
- package/dist/demo.html +1 -10
- package/dist/img/plyr.svg +68 -0
- package/dist/img/sprite/account.svg +4 -0
- package/dist/img/sprite/adfs.svg +5 -0
- package/dist/img/sprite/app-navigator.svg +11 -0
- package/dist/img/sprite/arrow-down.svg +3 -0
- package/dist/img/sprite/arrow-left.svg +3 -0
- package/dist/img/sprite/arrow-mix.svg +5 -0
- package/dist/img/sprite/arrow-right.svg +3 -0
- package/dist/img/sprite/arrow-up.svg +3 -0
- package/dist/img/sprite/attach.svg +3 -0
- package/dist/img/sprite/attention.svg +3 -0
- package/dist/img/sprite/azure.svg +19 -0
- package/dist/img/sprite/back.svg +4 -0
- package/dist/img/sprite/bell-badged.svg +4 -0
- package/dist/img/sprite/bell.svg +3 -0
- package/dist/img/sprite/bucket.svg +3 -0
- package/dist/img/sprite/calendar.svg +3 -0
- package/dist/img/sprite/call--filled.svg +3 -0
- package/dist/img/sprite/call-add-to--filled.svg +4 -0
- package/dist/img/sprite/call-add-to.svg +4 -0
- package/dist/img/sprite/call-disconnect--filled.svg +3 -0
- package/dist/img/sprite/call-disconnect.svg +3 -0
- package/dist/img/sprite/call-end--filled.svg +3 -0
- package/dist/img/sprite/call-end.svg +3 -0
- package/dist/img/sprite/call-inbound--filled.svg +4 -0
- package/dist/img/sprite/call-inbound.svg +3 -0
- package/dist/img/sprite/call-missed--filled.svg +4 -0
- package/dist/img/sprite/call-missed.svg +3 -0
- package/dist/img/sprite/call-outbound--filled.svg +3 -0
- package/dist/img/sprite/call-outbound.svg +3 -0
- package/dist/img/sprite/call-ringing--filled.svg +5 -0
- package/dist/img/sprite/call-ringing.svg +3 -0
- package/dist/img/sprite/call-transfer--filled.svg +4 -0
- package/dist/img/sprite/call-transfer.svg +3 -0
- package/dist/img/sprite/call.svg +3 -0
- package/dist/img/sprite/chat--filled.svg +3 -0
- package/dist/img/sprite/chat-emoji.svg +3 -0
- package/dist/img/sprite/chat-end--filled.svg +3 -0
- package/dist/img/sprite/chat-end.svg +4 -0
- package/dist/img/sprite/chat-group.svg +5 -0
- package/dist/img/sprite/chat-join.svg +4 -0
- package/dist/img/sprite/chat-message-status-read.svg +3 -0
- package/dist/img/sprite/chat-message-status-sent.svg +3 -0
- package/dist/img/sprite/chat-quick-response--filled.svg +3 -0
- package/dist/img/sprite/chat-quick-response.svg +3 -0
- package/dist/img/sprite/chat-reply.svg +3 -0
- package/dist/img/sprite/chat-send.svg +6 -0
- package/dist/img/sprite/chat-transfer--filled.svg +3 -0
- package/dist/img/sprite/chat-transfer.svg +4 -0
- package/dist/img/sprite/chat.svg +3 -0
- package/dist/img/sprite/checkbox--checked--filled.svg +3 -0
- package/dist/img/sprite/checkbox--checked.svg +3 -0
- package/dist/img/sprite/checkbox.svg +3 -0
- package/dist/img/sprite/clear.svg +3 -0
- package/dist/img/sprite/close--filled.svg +3 -0
- package/dist/img/sprite/close.svg +3 -0
- package/dist/img/sprite/collapse.svg +5 -0
- package/dist/img/sprite/column-select.svg +4 -0
- package/dist/img/sprite/conference.svg +8 -0
- package/dist/img/sprite/contacts.svg +3 -0
- package/dist/img/sprite/copy.svg +3 -0
- package/dist/img/sprite/docs.svg +6 -0
- package/dist/img/sprite/done.svg +4 -0
- package/dist/img/sprite/download.svg +5 -0
- package/dist/img/sprite/edit.svg +3 -0
- package/dist/img/sprite/email.svg +3 -0
- package/dist/img/sprite/expand.svg +5 -0
- package/dist/img/sprite/eye--closed.svg +5 -0
- package/dist/img/sprite/eye--opened.svg +4 -0
- package/dist/img/sprite/filter.svg +5 -0
- package/dist/img/sprite/generate.svg +4 -0
- package/dist/img/sprite/google.svg +6 -0
- package/dist/img/sprite/history.svg +4 -0
- package/dist/img/sprite/hold.svg +3 -0
- package/dist/img/sprite/idle.svg +4 -0
- package/dist/img/sprite/index.js +1 -0
- package/dist/img/sprite/instagram.svg +28 -0
- package/dist/img/sprite/job--accept.svg +4 -0
- package/dist/img/sprite/job--end.svg +4 -0
- package/dist/img/sprite/job.svg +5 -0
- package/dist/img/sprite/lock.svg +3 -0
- package/dist/img/sprite/logout.svg +3 -0
- package/dist/img/sprite/mail--color.svg +4 -0
- package/dist/img/sprite/mail.svg +3 -0
- package/dist/img/sprite/menu.svg +3 -0
- package/dist/img/sprite/messenger-facebook--filled.svg +3 -0
- package/dist/img/sprite/messenger-facebook.svg +9 -0
- package/dist/img/sprite/messenger-infobip.svg +5 -0
- package/dist/img/sprite/messenger-messenger.svg +12 -0
- package/dist/img/sprite/messenger-telegram--filled.svg +3 -0
- package/dist/img/sprite/messenger-telegram.svg +10 -0
- package/dist/img/sprite/messenger-viber--filled.svg +3 -0
- package/dist/img/sprite/messenger-viber.svg +3 -0
- package/dist/img/sprite/messenger-web-chat.svg +7 -0
- package/dist/img/sprite/messenger-whatsapp--filled.svg +4 -0
- package/dist/img/sprite/messenger-whatsapp.svg +10 -0
- package/dist/img/sprite/meta.svg +17 -0
- package/dist/img/sprite/mic-muted.svg +6 -0
- package/dist/img/sprite/mic.svg +4 -0
- package/dist/img/sprite/move.svg +6 -0
- package/dist/img/sprite/note.svg +3 -0
- package/dist/img/sprite/numpad.svg +24 -0
- package/dist/img/sprite/options.svg +5 -0
- package/dist/img/sprite/pause.svg +3 -0
- package/dist/img/sprite/pin.svg +3 -0
- package/dist/img/sprite/play.svg +4 -0
- package/dist/img/sprite/plus.svg +3 -0
- package/dist/img/sprite/preview-tag-application.svg +6 -0
- package/dist/img/sprite/preview-tag-audio.svg +4 -0
- package/dist/img/sprite/preview-tag-image.svg +4 -0
- package/dist/img/sprite/preview-tag-video.svg +4 -0
- package/dist/img/sprite/prompter.svg +3 -0
- package/dist/img/sprite/queue-member.svg +3 -0
- package/dist/img/sprite/radio--checked.svg +4 -0
- package/dist/img/sprite/radio.svg +3 -0
- package/dist/img/sprite/rec-off.svg +3 -0
- package/dist/img/sprite/rec.svg +4 -0
- package/dist/img/sprite/refresh.svg +4 -0
- package/dist/img/sprite/role.svg +3 -0
- package/dist/img/sprite/rounded-info.svg +3 -0
- package/dist/img/sprite/scorecard.svg +4 -0
- package/dist/img/sprite/search.svg +3 -0
- package/dist/img/sprite/send-arrow.svg +4 -0
- package/dist/img/sprite/settings.svg +3 -0
- package/dist/img/sprite/sort-arrow-down.svg +4 -0
- package/dist/img/sprite/sort-arrow-up.svg +4 -0
- package/dist/img/sprite/sound-off.svg +4 -0
- package/dist/img/sprite/sound-on.svg +3 -0
- package/dist/img/sprite/star--filled.svg +3 -0
- package/dist/img/sprite/star.svg +3 -0
- package/dist/img/sprite/stop.svg +4 -0
- package/dist/img/sprite/stt-download.svg +4 -0
- package/dist/img/sprite/stt-search.svg +3 -0
- package/dist/img/sprite/stt.svg +4 -0
- package/dist/img/sprite/telegram-bot.svg +6 -0
- package/dist/img/sprite/tick.svg +3 -0
- package/dist/img/sprite/tts-download.svg +5 -0
- package/dist/img/sprite/unpin.svg +5 -0
- package/dist/img/sprite/upload.svg +5 -0
- package/dist/img/sprite/user.svg +3 -0
- package/dist/img/sprite/video-cam-off.svg +4 -0
- package/dist/img/sprite/video-cam.svg +3 -0
- package/dist/img/sprite/zoom-in.svg +3 -0
- package/dist/img/sprite/zoom-out.svg +4 -0
- package/dist/ui-sdk.common.js +43300 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -0
- package/dist/ui-sdk.umd.js +43319 -0
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +35 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +95 -44
- package/src/api/axios/generateInstance.js +25 -0
- package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +6 -0
- package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +9 -0
- package/src/api/defaults/index.js +7 -0
- package/src/api/interceptors/request/updateToken.interceptor.js +10 -0
- package/src/api/interceptors/response/handleUnauthorized.interceptor.js +12 -0
- package/src/api/transformers/applyTransform.js +8 -0
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +4 -0
- package/src/api/transformers/generateUrl/generateUrl.transformer.js +13 -0
- package/src/api/transformers/index.js +23 -0
- package/src/api/transformers/log/log.transformer.js +6 -0
- package/src/api/transformers/merge/merge.transformer.js +5 -0
- package/src/api/transformers/mergeEach/mergeEach.transformer.js +8 -0
- package/src/api/transformers/notify/notify.transformer.js +32 -0
- package/src/api/transformers/sanitize/sanitize.transformer.js +12 -0
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +4 -0
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +12 -0
- package/src/components/index.js +91 -33
- package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +48 -0
- package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
- package/src/components/transitions/wt-expand-transition.vue +72 -0
- package/src/components/wt-app-header/__tests__/WtAppHeader.spec.js +19 -0
- package/src/components/wt-app-header/__tests__/WtAppNavigator.spec.js +23 -0
- package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +21 -0
- package/src/components/wt-app-header/_variables.scss +25 -0
- package/src/components/wt-app-header/wt-app-header.vue +29 -0
- package/src/components/wt-app-header/wt-app-navigator.vue +278 -0
- package/src/components/wt-app-header/wt-header-actions.vue +183 -0
- package/src/components/wt-avatar/__tests__/wt-avatar.spec.js +9 -0
- package/src/components/wt-avatar/_variables.scss +32 -0
- package/src/components/wt-avatar/wt-avatar.vue +187 -0
- package/src/components/wt-badge/__tests__/wt-badge.spec.js +9 -0
- package/src/components/wt-badge/_variables.scss +3 -0
- package/src/components/wt-badge/wt-badge.vue +59 -0
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/wt-button/__tests__/WtButton.spec.js +29 -0
- package/src/components/wt-button/_variables.scss +41 -0
- package/src/components/wt-button/wt-button.vue +205 -0
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +40 -0
- package/src/components/wt-button-select/_variables.scss +7 -0
- package/src/components/wt-button-select/wt-button-select.vue +130 -0
- package/src/components/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
- package/src/components/wt-checkbox/_variables.scss +4 -0
- package/src/components/wt-checkbox/wt-checkbox.vue +191 -0
- package/src/components/wt-chip/__tests__/WtChip.spec.js +19 -0
- package/src/components/wt-chip/_variables.scss +7 -0
- package/src/components/wt-chip/wt-chip.scss +41 -0
- package/src/components/wt-chip/wt-chip.vue +24 -0
- package/src/components/wt-context-menu/__tests__/WtContextMenu.spec.js +9 -0
- package/src/components/wt-context-menu/_variables.scss +9 -0
- package/src/components/wt-context-menu/wt-context-menu.vue +131 -0
- package/src/components/wt-copy-action/__tests__/WtCopyAction.spec.js +14 -0
- package/src/components/wt-copy-action/wt-copy-action.vue +63 -0
- package/src/components/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
- package/src/components/wt-datepicker/_variables.scss +56 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +240 -0
- package/src/components/wt-divider/__tests__/WtDivider.spec.js +9 -0
- package/src/components/wt-divider/_variables.scss +5 -0
- package/src/components/wt-divider/wt-divider.vue +30 -0
- package/src/components/wt-dummy/__tests__/WtDummy.spec.js +9 -0
- package/src/components/wt-dummy/wt-dummy.vue +73 -0
- package/src/components/wt-error-page/__tests__/wt-error-page.spec.js +17 -0
- package/src/components/wt-error-page/wt-error-page.vue +104 -0
- package/src/components/wt-expansion-panel/__tests__/WtExpansionPanel.spec.js +9 -0
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +67 -0
- package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +24 -0
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +146 -0
- package/src/components/wt-headline/__tests__/WtHeadline.spec.js +47 -0
- package/src/components/wt-headline/_variables.scss +6 -0
- package/src/components/wt-headline/wt-headline.vue +50 -0
- package/src/components/wt-headline-nav/Readme.md +9 -0
- package/src/components/wt-headline-nav/__tests__/wt-headline-nav.spec.js +13 -0
- package/src/components/wt-headline-nav/_variables.scss +8 -0
- package/src/components/wt-headline-nav/wt-headline-nav.vue +97 -0
- package/src/components/wt-hint/__tests__/WtHint.spec.js +9 -0
- package/src/components/wt-hint/wt-hint.vue +27 -0
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/wt-icon/__tests__/WtIcon.spec.js +24 -0
- package/src/components/wt-icon/_variables.scss +31 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon/wt-icon.vue +172 -0
- package/src/components/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtAddIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDownloadIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtHistoryIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtRefreshIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +27 -0
- package/src/components/wt-icon-action/wt-icon-action.vue +54 -0
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/wt-icon-btn/__tests__/WtIconBtn.spec.js +15 -0
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +47 -0
- package/src/components/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
- package/src/components/wt-indicator/_variables.scss +22 -0
- package/src/components/wt-indicator/wt-indicator.vue +124 -0
- package/src/components/wt-input/__tests__/WtInput.spec.js +25 -0
- package/src/components/wt-input/_variables.scss +8 -0
- package/src/components/wt-input/wt-input.vue +343 -0
- package/src/components/wt-input-info/__tests__/WtInputInfo.spec.js +9 -0
- package/src/{css/components/atoms → components}/wt-input-info/_variables.scss +7 -6
- package/src/components/wt-input-info/wt-input-info.vue +40 -0
- package/src/components/wt-item-link/__tests__/WtItemLink.spec.js +9 -0
- package/src/components/wt-item-link/wt-item-link.vue +57 -0
- package/src/components/wt-label/__tests__/WtLabel.spec.js +9 -0
- package/src/{css/components/atoms → components}/wt-label/_variables.scss +3 -4
- package/src/components/wt-label/mixins/labelUsageMixin.js +21 -0
- package/src/components/wt-label/wt-label.vue +77 -0
- package/src/components/wt-load-bar/__tests__/WtLoadBar.spec.js +9 -0
- package/src/components/wt-load-bar/_variables.scss +6 -0
- package/src/components/wt-load-bar/wt-load-bar.vue +55 -0
- package/src/components/wt-loader/__tests__/WtLoader.spec.js +9 -0
- package/src/components/{atoms/wt-loader/wt-loader.vue → wt-loader/_internals/wt-loader--md.vue} +5 -6
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +73 -0
- package/src/components/wt-loader/_variables.scss +8 -0
- package/src/components/wt-loader/wt-loader.vue +37 -0
- package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +68 -0
- package/src/components/wt-navigation-bar/_variables.scss +16 -0
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +282 -0
- package/src/components/wt-notification/__tests__/WtNotification.spec.js +21 -0
- package/src/components/wt-notification/_variables.scss +10 -0
- package/src/components/wt-notification/wt-notification.vue +86 -0
- package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +50 -0
- package/src/components/wt-notifications-bar/_variables.scss +7 -0
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +78 -0
- package/src/components/wt-page-header/__tests__/wt-page-header.spec.js +9 -0
- package/src/components/wt-page-header/wt-page-header.vue +83 -0
- package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +33 -0
- package/src/components/wt-page-wrapper/_variables.scss +5 -0
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +58 -0
- package/src/components/wt-pagination/__tests__/WtPagination.spec.js +38 -0
- package/src/components/wt-pagination/_variables.scss +5 -0
- package/src/components/wt-pagination/wt-pagination.vue +148 -0
- package/src/components/wt-player/__tests__/WtPlayer.spec.js +9 -0
- package/src/components/wt-player/_variables.scss +8 -0
- package/src/components/wt-player/wt-player.vue +208 -0
- package/src/components/wt-popup/__tests__/WtPopup.spec.js +47 -0
- package/src/components/wt-popup/_variables.scss +20 -0
- package/src/components/wt-popup/wt-popup.vue +138 -0
- package/src/components/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
- package/src/components/wt-progress-bar/_variables.scss +11 -0
- package/src/components/wt-progress-bar/wt-progress-bar.vue +89 -0
- package/src/components/wt-radio/__tests__/WtRadio.spec.js +42 -0
- package/src/{css/components/molecules → components}/wt-radio/_variables.scss +6 -6
- package/src/components/wt-radio/wt-radio.vue +180 -0
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/wt-rounded-action/__tests__/WtRoundedAction.spec.js +9 -0
- package/src/components/wt-rounded-action/_variables.scss +14 -0
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -0
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +44 -0
- package/src/components/wt-search-bar/_variables.scss +8 -0
- package/src/components/wt-search-bar/wt-search-bar.vue +222 -0
- package/src/components/wt-select/__tests__/WtSelect.spec.js +27 -0
- package/src/components/wt-select/_multiselect.scss +198 -0
- package/src/components/wt-select/_variables.scss +14 -0
- package/src/components/wt-select/mixins/__tests__/multiselectMixin.spec.js +32 -0
- package/src/components/wt-select/mixins/multiselectMixin.js +151 -0
- package/src/components/wt-select/wt-select.vue +288 -0
- package/src/components/wt-slider/__tests__/WtSlider.spec.js +9 -0
- package/src/components/wt-slider/_variables.scss +15 -0
- package/src/components/wt-slider/wt-slider.vue +179 -0
- package/src/components/wt-status-select/__tests__/WtStatusSelect.spec.js +25 -0
- package/src/components/wt-status-select/_internals/StatusOptions.lookup.js +24 -0
- package/src/components/wt-status-select/_variables.scss +6 -0
- package/src/components/wt-status-select/wt-status-select.vue +134 -0
- package/src/components/wt-stepper/__tests__/WtStepper.spec.vue.js +18 -0
- package/src/components/wt-stepper/wt-stepper.vue +89 -0
- package/src/components/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
- package/src/components/wt-switcher/_variables.scss +17 -0
- package/src/components/wt-switcher/wt-switcher.vue +191 -0
- package/src/components/wt-table/__tests__/WtTable.spec.js +134 -0
- package/src/components/wt-table/_internals/getSortOrder.js +12 -0
- package/src/components/wt-table/_variables.scss +16 -0
- package/src/components/wt-table/wt-table.vue +269 -0
- package/src/components/wt-table-actions/__tests__/WtTableActions.spec.js +9 -0
- package/src/components/wt-table-actions/_variables.scss +5 -0
- package/src/components/wt-table-actions/wt-table-actions.vue +110 -0
- package/src/components/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +31 -0
- package/src/components/wt-table-column-select/wt-table-column-select.vue +178 -0
- package/src/components/wt-tabs/__tests__/WtTabs.spec.js +36 -0
- package/src/{css/components/molecules → components}/wt-tabs/_variables.scss +14 -14
- package/src/components/wt-tabs/wt-tabs.vue +125 -0
- package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +42 -0
- package/src/components/wt-tags-input/_variables.scss +24 -0
- package/src/components/wt-tags-input/wt-tags-input.vue +226 -0
- package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
- package/src/components/wt-textarea/_variables.scss +5 -0
- package/src/components/wt-textarea/wt-textarea.vue +223 -0
- package/src/components/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
- package/src/components/wt-time-input/wt-time-input.vue +187 -0
- package/src/components/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
- package/src/components/wt-timepicker/_variables.scss +5 -0
- package/src/components/wt-timepicker/wt-timepicker.vue +181 -0
- package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +30 -0
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +68 -0
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +48 -0
- package/src/components/wt-tooltip/_variables.scss +11 -0
- package/src/components/wt-tooltip/wt-tooltip.vue +150 -0
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +14 -0
- package/src/composables/useCachedInterval/useCachedInterval.js +21 -0
- package/src/composables/useDestroyableSortable/useDestroyableSortable.js +66 -0
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +83 -0
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +37 -0
- package/src/css/main.scss +72 -69
- package/src/css/styleguide/_styleguide.scss +9 -0
- package/src/css/styleguide/border-radius/_border-radius.scss +4 -0
- package/src/css/styleguide/colors/_colors.scss +180 -0
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +358 -0
- package/src/css/styleguide/display-helpers/_display-helpers.scss +23 -0
- package/src/css/styleguide/elevations/_elevations.scss +13 -0
- package/src/css/styleguide/fonts/_fonts.scss +126 -0
- package/src/css/styleguide/placeholder/_placeholder.scss +49 -0
- package/src/css/styleguide/scroll.scss +43 -40
- package/src/css/styleguide/spacings/_spacings.scss +15 -0
- package/src/css/styleguide/transitions/_transitions.scss +1 -0
- package/src/css/styleguide/transitions/fade/_fade.scss +8 -0
- package/src/css/styleguide/typography/_typography.scss +113 -0
- package/src/css/styleguide/viewport-breakpoints/_viewport-breakpoints.scss +25 -0
- package/src/directives/clickaway/clickaway.js +3 -52
- package/src/directives/index.js +0 -5
- package/src/enums/AbstractUserStatus/AbstractUserStatus.enum.js +8 -0
- package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +50 -0
- package/src/enums/WebitelApplications/AuditorSections.enum.js +5 -0
- package/src/enums/WebitelApplications/CrmSections.enum.js +5 -0
- package/src/enums/WebitelApplications/SupervisorSections.enum.js +7 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +11 -0
- package/src/locale/.DS_Store +0 -0
- package/src/locale/en/en.js +333 -0
- package/src/locale/es/es.js +282 -0
- package/src/locale/i18n.js +9 -5
- package/src/locale/ru/ru.js +334 -3
- package/src/locale/ua/ua.js +358 -0
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +55 -0
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +70 -0
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +85 -0
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +57 -0
- package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +48 -0
- package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +37 -0
- package/src/mixins/dataFilterMixins/apiFilterMixin.js +23 -0
- package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +29 -0
- package/src/mixins/dataFilterMixins/enumFilterMixin.js +30 -0
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +79 -0
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +75 -0
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +47 -0
- package/src/mixins/validationMixin/useValidation.js +41 -0
- package/src/mixins/validationMixin/validationMixin.js +26 -10
- package/src/modules/AgentStatusSelect/api/agent-status.js +24 -0
- package/src/modules/AgentStatusSelect/api/pause-cause.js +47 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +83 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +18 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +122 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +55 -0
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +107 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +60 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +70 -0
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +132 -0
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +154 -0
- package/src/modules/AuditForm/components/audit-form-question.vue +136 -0
- package/src/modules/AuditForm/components/audit-form.vue +183 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +24 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +45 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +89 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +97 -0
- package/src/modules/AuditForm/components/questions/score/__tests__/audit-form-question-score.spec.js +30 -0
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +132 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +13 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionSchema.js +8 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionScoreSchema.js +8 -0
- package/src/modules/CSVExport/CSVExport.js +89 -0
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +63 -0
- package/src/modules/CSVExport/mixins/exportCSVMixin.js +46 -0
- package/src/modules/CardStoreModule/composables/useCardStore.js +55 -0
- package/src/modules/CardStoreModule/store/CardStoreModule.js +84 -0
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +87 -0
- package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +28 -0
- package/src/modules/FilesExport/FilesExport.js +113 -0
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +66 -0
- package/src/modules/FilesExport/mixins/exportFilesMixin.js +46 -0
- package/src/modules/FilesExport/scripts/generateMediaURL.js +7 -0
- package/src/modules/Filters/classes/BaseFilterSchema.js +13 -0
- package/src/modules/Filters/components/filter-pagination.vue +61 -0
- package/src/modules/Filters/components/filter-table-fields.vue +61 -0
- package/src/modules/Filters/composables/useTableFilters.js +17 -0
- package/src/modules/Filters/restores/filterFieldsRestore.js +9 -0
- package/src/modules/Filters/restores/readme.md +1 -0
- package/src/modules/Filters/store/FiltersStoreModule.js +181 -0
- package/src/modules/Notifications/assets/audio/end-chat.wav +0 -0
- package/src/modules/Notifications/assets/audio/new-chat.wav +0 -0
- package/src/modules/Notifications/assets/audio/new-message.wav +0 -0
- package/src/modules/Notifications/assets/audio/ringing.mp3 +0 -0
- package/src/modules/Notifications/assets/img/notification-icon.png +0 -0
- package/src/modules/Notifications/store/NotificationsStoreModule.js +185 -0
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +130 -0
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.mutations.spec.js +49 -0
- package/src/modules/QueryFilters/api/__tests__/defaults.spec.js +18 -0
- package/src/modules/QueryFilters/api/defaults.js +16 -0
- package/src/modules/QueryFilters/classes/ApiFilterSchema.js +32 -0
- package/src/modules/QueryFilters/classes/BaseFilterSchema.js +6 -0
- package/src/modules/QueryFilters/classes/EnumFilterSchema.js +23 -0
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +25 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +52 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +38 -0
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +49 -0
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +63 -0
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +47 -0
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +42 -0
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +32 -0
- package/src/modules/QueryFilters/components/filter-datetime.vue +40 -0
- package/src/modules/QueryFilters/components/filter-from-to.vue +143 -0
- package/src/modules/QueryFilters/components/filter-search.vue +33 -0
- package/src/modules/QueryFilters/components/filter-table-fields.vue +101 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +48 -0
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +68 -0
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +79 -0
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +63 -0
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +46 -0
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +39 -0
- package/src/modules/QueryFilters/mixins/apiFilterMixin.js +41 -0
- package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +34 -0
- package/src/modules/QueryFilters/mixins/enumFilterMixin.js +51 -0
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +76 -0
- package/src/modules/QueryFilters/mixins/sortFilterMixin.js +56 -0
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +61 -0
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +89 -0
- package/src/modules/QueryFilters/store/queryFilters.js +6 -0
- package/src/modules/TableStoreModule/composables/useTableStore.js +58 -0
- package/src/modules/TableStoreModule/store/TableStoreModule.js +207 -0
- package/src/modules/Userinfo/api/BaseAPIService.js +7 -0
- package/src/modules/Userinfo/api/auth.js +31 -0
- package/src/modules/Userinfo/api/userinfo.js +44 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +217 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +55 -0
- package/src/modules/Userinfo/components/the-auth.vue +76 -0
- package/src/modules/Userinfo/enums/Permissions.enum.js +7 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +153 -0
- package/src/plugins/breakpoint/breakpoint.plugin.js +137 -0
- package/src/scripts/__tests__/caseConverters.spec.js +81 -0
- package/src/scripts/__tests__/convertDuration.spec.js +21 -0
- package/src/scripts/__tests__/debounce.spec.js +14 -0
- package/src/scripts/__tests__/editProxy.spec.js +9 -0
- package/src/scripts/__tests__/isEmpty.spec.js +16 -0
- package/src/scripts/__tests__/prettifyFileSize.spec.js +18 -0
- package/src/scripts/__tests__/prettifyTime.spec.js +18 -0
- package/src/scripts/__tests__/preventHiddenPageCallsDecorator.spec.js +16 -0
- package/src/scripts/__tests__/sortQueryAdapters.spec.js +12 -0
- package/src/scripts/__tests__/updateObject.spec.js +19 -0
- package/src/scripts/caseConverters.js +89 -0
- package/src/scripts/convertDuration.js +15 -0
- package/src/scripts/debounce.js +3 -9
- package/src/scripts/editProxy.js +9 -0
- package/src/scripts/eventBus.js +8 -0
- package/src/scripts/isEmpty.js +9 -0
- package/src/scripts/prettifyFileSize.js +11 -0
- package/src/scripts/prettifyTime.js +9 -0
- package/src/scripts/preventHiddenPageCallsDecorator.js +6 -0
- package/src/scripts/sortQueryAdapters.js +21 -0
- package/src/scripts/updateObject.js +6 -0
- package/src/store/BaseStoreModules/ApiStoreModule.js +93 -0
- package/src/store/BaseStoreModules/BaseStoreModule.js +49 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +104 -0
- package/src/store/ReactiveNowStoreModule/ReactiveNowStoreModule.js +27 -0
- package/src/store/helpers/__tests__/getNamespacedState.spec.js +11 -0
- package/src/store/helpers/getNamespacedState.js +5 -0
- package/src/validators/decimalValidator.js +9 -0
- package/src/validators/domainValidator.js +5 -0
- package/.eslintrc.js +0 -34
- package/babel.config.js +0 -5
- package/dist/@webitel/ui-sdk.common.js +0 -11586
- package/dist/@webitel/ui-sdk.common.js.map +0 -1
- package/dist/@webitel/ui-sdk.css +0 -1
- package/dist/@webitel/ui-sdk.umd.js +0 -11596
- package/dist/@webitel/ui-sdk.umd.js.map +0 -1
- package/dist/@webitel/ui-sdk.umd.min.js +0 -2
- package/dist/@webitel/ui-sdk.umd.min.js.map +0 -1
- package/dist/fonts/Montserrat-Regular.ee653992.ttf +0 -0
- package/dist/fonts/Montserrat-SemiBold.c641dbee.ttf +0 -0
- package/dist/img/arrow-down--active--md.06c6b9a1.svg +0 -3
- package/dist/img/arrow-down--disabled--md.8dd31dcb.svg +0 -3
- package/dist/img/arrow-down--md.907c231e.svg +0 -3
- package/dist/img/calendar--active--md.b649abe2.svg +0 -6
- package/dist/img/calendar--disabled--md.ff268289.svg +0 -3
- package/dist/img/calendar--md.d0280382.svg +0 -6
- package/jest.config.js +0 -3
- package/package-lock.json +0 -15072
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/assets/icons/arrow-down--active--md.svg +0 -3
- package/src/assets/icons/arrow-down--disabled--md.svg +0 -3
- package/src/assets/icons/arrow-down--md.svg +0 -3
- package/src/assets/icons/calendar--active--md.svg +0 -6
- package/src/assets/icons/calendar--disabled--md.svg +0 -3
- package/src/assets/icons/calendar--md.svg +0 -6
- package/src/components/atoms/wt-badge/wt-badge.vue +0 -15
- package/src/components/atoms/wt-button/wt-button.vue +0 -202
- package/src/components/atoms/wt-divider/wt-divider.vue +0 -24
- package/src/components/atoms/wt-icon/wt-icon.vue +0 -499
- package/src/components/atoms/wt-input-info/wt-input-info.vue +0 -34
- package/src/components/atoms/wt-label/wt-label.vue +0 -58
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +0 -54
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +0 -167
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +0 -200
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +0 -306
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +0 -69
- package/src/components/molecules/wt-input/wt-input.vue +0 -300
- package/src/components/molecules/wt-notification/wt-notification.vue +0 -74
- package/src/components/molecules/wt-popup/wt-popup.vue +0 -89
- package/src/components/molecules/wt-radio/wt-radio.vue +0 -168
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +0 -186
- package/src/components/molecules/wt-select/wt-select.vue +0 -394
- package/src/components/molecules/wt-switcher/wt-switcher.vue +0 -157
- package/src/components/molecules/wt-tabs/wt-tabs.vue +0 -125
- package/src/components/molecules/wt-textarea/wt-textarea.vue +0 -141
- package/src/components/molecules/wt-time-input/wt-time-input.vue +0 -141
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +0 -110
- package/src/components/organisms/wt-pagination/wt-pagination.vue +0 -122
- package/src/css/colors/_colors.scss +0 -67
- package/src/css/components/_components.scss +0 -25
- package/src/css/components/atoms/wt-badge/_variables.scss +0 -6
- package/src/css/components/atoms/wt-badge/wt-badge.scss +0 -8
- package/src/css/components/atoms/wt-button/_variables.scss +0 -47
- package/src/css/components/atoms/wt-divider/_variables.scss +0 -5
- package/src/css/components/atoms/wt-icon/_variables.scss +0 -29
- package/src/css/components/atoms/wt-loader/_variables.scss +0 -8
- package/src/css/components/atoms/wt-tooltip/_variables.scss +0 -10
- package/src/css/components/molecules/wt-checkbox/_variables.scss +0 -4
- package/src/css/components/molecules/wt-datepicker/_variables.scss +0 -20
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +0 -100
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +0 -12
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +0 -3
- package/src/css/components/molecules/wt-input/_variables.scss +0 -6
- package/src/css/components/molecules/wt-notification/_variables.scss +0 -10
- package/src/css/components/molecules/wt-popup/_variables.scss +0 -11
- package/src/css/components/molecules/wt-search-bar/_variables.scss +0 -4
- package/src/css/components/molecules/wt-select/_variables.scss +0 -23
- package/src/css/components/molecules/wt-switcher/_variables.scss +0 -14
- package/src/css/components/molecules/wt-textarea/_variables.scss +0 -5
- package/src/css/components/molecules/wt-timepicker/_variables.scss +0 -4
- package/src/css/components/organisms/wt-pagination/_variables.scss +0 -7
- package/src/css/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/src/css/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/src/css/fonts.scss +0 -9
- package/src/css/styleguide/styleguide.scss +0 -3
- package/src/css/typography/_typography.scss +0 -72
- package/src/install.js +0 -15
- package/src/main.js +0 -14
- package/src/playground.vue +0 -451
- package/src/the-app.vue +0 -20
- package/vue.config.js +0 -11
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<transition
|
|
3
|
+
name="expand"
|
|
4
|
+
@after-enter="afterEnter"
|
|
5
|
+
@enter="enter"
|
|
6
|
+
@leave="leave"
|
|
7
|
+
>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</transition>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
/* eslint-disable no-param-reassign */
|
|
14
|
+
// https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
|
|
15
|
+
export default {
|
|
16
|
+
name: 'wt-expand-transition',
|
|
17
|
+
methods: {
|
|
18
|
+
afterEnter(element) {
|
|
19
|
+
element.style.height = 'auto';
|
|
20
|
+
},
|
|
21
|
+
enter(element) {
|
|
22
|
+
const { width } = getComputedStyle(element);
|
|
23
|
+
element.style.width = width;
|
|
24
|
+
element.style.position = 'absolute';
|
|
25
|
+
element.style.visibility = 'hidden';
|
|
26
|
+
element.style.height = 'auto';
|
|
27
|
+
|
|
28
|
+
const { height } = getComputedStyle(element);
|
|
29
|
+
element.style.width = null;
|
|
30
|
+
element.style.position = null;
|
|
31
|
+
element.style.visibility = null;
|
|
32
|
+
element.style.height = 0;
|
|
33
|
+
|
|
34
|
+
// Force repaint to make sure the
|
|
35
|
+
// animation is triggered correctly.
|
|
36
|
+
// eslint-disable-next-line no-unused-expressions
|
|
37
|
+
getComputedStyle(element).height;
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line no-return-assign
|
|
40
|
+
requestAnimationFrame(() => element.style.height = height);
|
|
41
|
+
},
|
|
42
|
+
leave(element) {
|
|
43
|
+
const { height } = getComputedStyle(element);
|
|
44
|
+
element.style.height = height;
|
|
45
|
+
// eslint-disable-next-line no-unused-expressions
|
|
46
|
+
getComputedStyle(element).height;
|
|
47
|
+
|
|
48
|
+
// eslint-disable-next-line no-return-assign
|
|
49
|
+
requestAnimationFrame(() => element.style.height = 0);
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style lang="scss">
|
|
56
|
+
.expand-enter-active,
|
|
57
|
+
.expand-leave-active {
|
|
58
|
+
transition: height var(--transition);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.expand-enter,
|
|
63
|
+
.expand-leave-to {
|
|
64
|
+
height: 0;
|
|
65
|
+
}
|
|
66
|
+
/*
|
|
67
|
+
// expand animation optimization
|
|
68
|
+
transform: translateZ(0);
|
|
69
|
+
backface-visibility: hidden;
|
|
70
|
+
perspective: 1000px;
|
|
71
|
+
*/
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtAppHeader from '../wt-app-header.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtAppHeader', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtAppHeader);
|
|
7
|
+
expect(wrapper.classes('wt-app-header')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders a app-header content via default slot', () => {
|
|
11
|
+
const content = 'app header content';
|
|
12
|
+
const wrapper = shallowMount(WtAppHeader, {
|
|
13
|
+
slots: {
|
|
14
|
+
default: content,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-app-header').text()).toBe(content);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WebitelApplications from '../../../enums/WebitelApplications/WebitelApplications.enum';
|
|
3
|
+
import WtAppNavigator from '../wt-app-navigator.vue';
|
|
4
|
+
|
|
5
|
+
const apps = [
|
|
6
|
+
{ name: WebitelApplications.ADMIN, href: '' },
|
|
7
|
+
{ name: WebitelApplications.HISTORY, href: '' },
|
|
8
|
+
{ name: WebitelApplications.SUPERVISOR, href: '' },
|
|
9
|
+
];
|
|
10
|
+
describe('WtAppNavigator', () => {
|
|
11
|
+
it('renders a component', () => {
|
|
12
|
+
const wrapper = shallowMount(WtAppNavigator);
|
|
13
|
+
expect(wrapper.classes('wt-app-navigator')).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
it('renders specified app cards', () => {
|
|
16
|
+
const wrapper = shallowMount(WtAppNavigator, {
|
|
17
|
+
props: {
|
|
18
|
+
apps,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
expect(wrapper.findAll('.wt-app-navigator__card').length).toBe(3);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtHeaderActions from '../wt-header-actions.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtHeaderActions', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtHeaderActions);
|
|
7
|
+
expect(wrapper.classes('wt-header-actions')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders user data', () => {
|
|
11
|
+
const user = {
|
|
12
|
+
name: 'user nanme',
|
|
13
|
+
account: 'acc@ou.nt',
|
|
14
|
+
};
|
|
15
|
+
const wrapper = shallowMount(WtHeaderActions, {
|
|
16
|
+
props: { user },
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.wt-header-actions__name').text()).toBe(user.name);
|
|
19
|
+
expect(wrapper.find('.wt-header-actions__account').text()).toBe(user.account);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
:root {
|
|
3
|
+
--wt-app-header-min-height: 56px;
|
|
4
|
+
--wt-app-header-padding: var(--spacing-sm);
|
|
5
|
+
--wt-app-header-background: var(--dp-9-surface-color);
|
|
6
|
+
|
|
7
|
+
--wt-app-header-content-gap: var(--spacing-sm);
|
|
8
|
+
--wt-app-header-content-panel-margin: var(--spacing-2xs);
|
|
9
|
+
--wt-app-header-content-bg-color: var(--main-color);
|
|
10
|
+
--wt-app-header-content-z-index: 11;
|
|
11
|
+
|
|
12
|
+
--wt-app-navigator-max-height: 80vh;
|
|
13
|
+
--wt-app-navigator-padding: var(--wt-app-header-content-gap);
|
|
14
|
+
--wt-app-navigator-item-size: 120px;
|
|
15
|
+
--wt-app-navigator-item-gap: var(--wt-app-header-content-gap);
|
|
16
|
+
--wt-app-navigator-item-border: 1px solid;
|
|
17
|
+
--wt-app-navigator-item-border-color: var(--secondary-color);
|
|
18
|
+
--wt-app-navigator-item-border-color--hover: var(--primary-color);
|
|
19
|
+
|
|
20
|
+
--wt-header-actions-min-width: 120px;
|
|
21
|
+
--wt-header-actions-content-sections-gap: var(--spacing-lg);
|
|
22
|
+
--wt-header-actions-padding: var(--wt-app-header-content-gap);
|
|
23
|
+
--wt-header-actions-action-bg-color--hover: var(--secondary-color);
|
|
24
|
+
--wt-header-actions-action-link-padding: var(--spacing-xs);
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="wt-app-header">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</header>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'wt-app-header',
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style lang="scss">
|
|
14
|
+
@import './variables.scss';
|
|
15
|
+
</style>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
|
|
19
|
+
.wt-app-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
gap: var(--wt-app-header-content-gap);
|
|
24
|
+
min-height: var(--wt-app-header-min-height); // fixed height because anything can be put inside slot, so padding won't work properly
|
|
25
|
+
padding: var(--wt-app-header-padding);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
background: var(--wt-app-header-background);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-clickaway="close" class="wt-app-navigator">
|
|
3
|
+
<wt-tooltip>
|
|
4
|
+
<template v-slot:activator>
|
|
5
|
+
<wt-icon-btn
|
|
6
|
+
:class="{'active': isOpened}"
|
|
7
|
+
class="wt-app-navigator__btn"
|
|
8
|
+
icon="app-navigator"
|
|
9
|
+
@click="isOpened = !isOpened"
|
|
10
|
+
></wt-icon-btn>
|
|
11
|
+
</template>
|
|
12
|
+
{{ $t('webitelUI.appNavigator.title') }}
|
|
13
|
+
</wt-tooltip>
|
|
14
|
+
|
|
15
|
+
<transition name="fade">
|
|
16
|
+
<nav
|
|
17
|
+
v-show="isOpened"
|
|
18
|
+
class="wt-app-navigator__nav-wrapper"
|
|
19
|
+
>
|
|
20
|
+
<h3 class="wt-app-navigator__nav-title">
|
|
21
|
+
{{ $t('webitelUI.appNavigator.title') }}
|
|
22
|
+
</h3>
|
|
23
|
+
<ul class="wt-app-navigator__nav">
|
|
24
|
+
|
|
25
|
+
<li
|
|
26
|
+
v-if="formattedApps[WebitelApplications.AGENT]"
|
|
27
|
+
:class="{'active': formattedApps[WebitelApplications.AGENT].currentApp }"
|
|
28
|
+
class="wt-app-navigator__card"
|
|
29
|
+
>
|
|
30
|
+
<a
|
|
31
|
+
:href="formattedApps[WebitelApplications.AGENT].href"
|
|
32
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.AGENT]}`)"
|
|
33
|
+
class="wt-app-navigator__card__link"
|
|
34
|
+
target="_blank"
|
|
35
|
+
>
|
|
36
|
+
<img
|
|
37
|
+
:alt="`${[WebitelApplications.AGENT]}-pic`"
|
|
38
|
+
class="wt-app-navigator__card__img"
|
|
39
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-agent.svg"
|
|
40
|
+
>
|
|
41
|
+
</a>
|
|
42
|
+
</li>
|
|
43
|
+
|
|
44
|
+
<li
|
|
45
|
+
v-if="formattedApps[WebitelApplications.SUPERVISOR]"
|
|
46
|
+
:class="{'active': formattedApps[WebitelApplications.SUPERVISOR].currentApp }"
|
|
47
|
+
class="wt-app-navigator__card"
|
|
48
|
+
>
|
|
49
|
+
<a
|
|
50
|
+
:href="formattedApps[WebitelApplications.SUPERVISOR].href"
|
|
51
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.SUPERVISOR]}`)"
|
|
52
|
+
class="wt-app-navigator__card__link"
|
|
53
|
+
target="_blank"
|
|
54
|
+
>
|
|
55
|
+
<img
|
|
56
|
+
:alt="`${[WebitelApplications.SUPERVISOR]}-pic`"
|
|
57
|
+
class="wt-app-navigator__card__img"
|
|
58
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-supervisor.svg"
|
|
59
|
+
>
|
|
60
|
+
</a>
|
|
61
|
+
</li>
|
|
62
|
+
|
|
63
|
+
<li
|
|
64
|
+
v-if="formattedApps[WebitelApplications.HISTORY]"
|
|
65
|
+
:class="{'active': formattedApps[WebitelApplications.HISTORY].currentApp }"
|
|
66
|
+
class="wt-app-navigator__card"
|
|
67
|
+
>
|
|
68
|
+
<a
|
|
69
|
+
:href="formattedApps[WebitelApplications.HISTORY].href"
|
|
70
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.HISTORY]}`)"
|
|
71
|
+
class="wt-app-navigator__card__link"
|
|
72
|
+
target="_blank"
|
|
73
|
+
>
|
|
74
|
+
<img
|
|
75
|
+
:alt="`${[WebitelApplications.HISTORY]}-pic`"
|
|
76
|
+
class="wt-app-navigator__card__img"
|
|
77
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-history.svg"
|
|
78
|
+
>
|
|
79
|
+
</a>
|
|
80
|
+
</li>
|
|
81
|
+
|
|
82
|
+
<li
|
|
83
|
+
v-if="false && formattedApps[WebitelApplications.AUDIT]"
|
|
84
|
+
:class="{'active': formattedApps[WebitelApplications.AUDIT].currentApp }"
|
|
85
|
+
class="wt-app-navigator__card"
|
|
86
|
+
>
|
|
87
|
+
<a
|
|
88
|
+
:href="formattedApps[WebitelApplications.AUDIT].href"
|
|
89
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.AUDIT]}`)"
|
|
90
|
+
class="wt-app-navigator__card__link"
|
|
91
|
+
target="_blank"
|
|
92
|
+
>
|
|
93
|
+
<img
|
|
94
|
+
:alt="`${[WebitelApplications.AUDIT]}-pic`"
|
|
95
|
+
class="wt-app-navigator__card__img"
|
|
96
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-audit.svg"
|
|
97
|
+
>
|
|
98
|
+
</a>
|
|
99
|
+
</li>
|
|
100
|
+
|
|
101
|
+
<li
|
|
102
|
+
v-if="formattedApps[WebitelApplications.ADMIN]"
|
|
103
|
+
:class="{'active': formattedApps[WebitelApplications.ADMIN].currentApp }"
|
|
104
|
+
class="wt-app-navigator__card"
|
|
105
|
+
>
|
|
106
|
+
<a
|
|
107
|
+
:href="formattedApps[WebitelApplications.ADMIN].href"
|
|
108
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.ADMIN]}`)"
|
|
109
|
+
class="wt-app-navigator__card__link"
|
|
110
|
+
target="_blank"
|
|
111
|
+
>
|
|
112
|
+
<img
|
|
113
|
+
:alt="`${[WebitelApplications.ADMIN]}-pic`"
|
|
114
|
+
class="wt-app-navigator__card__img"
|
|
115
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-admin.svg"
|
|
116
|
+
>
|
|
117
|
+
</a>
|
|
118
|
+
</li>
|
|
119
|
+
|
|
120
|
+
<li
|
|
121
|
+
v-if="formattedApps[WebitelApplications.ANALYTICS]"
|
|
122
|
+
:class="{'active': formattedApps[WebitelApplications.ANALYTICS].currentApp }"
|
|
123
|
+
class="wt-app-navigator__card"
|
|
124
|
+
>
|
|
125
|
+
<a
|
|
126
|
+
:href="formattedApps[WebitelApplications.ANALYTICS].href"
|
|
127
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.ANALYTICS]}`)"
|
|
128
|
+
class="wt-app-navigator__card__link"
|
|
129
|
+
target="_blank"
|
|
130
|
+
>
|
|
131
|
+
<img
|
|
132
|
+
:alt="`${[WebitelApplications.ANALYTICS]}-pic`"
|
|
133
|
+
class="wt-app-navigator__card__img"
|
|
134
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-analytics.svg"
|
|
135
|
+
>
|
|
136
|
+
</a>
|
|
137
|
+
</li>
|
|
138
|
+
|
|
139
|
+
<li
|
|
140
|
+
v-if="formattedApps[WebitelApplications.AUDIT]"
|
|
141
|
+
:class="{'active': formattedApps[WebitelApplications.AUDIT].currentApp }"
|
|
142
|
+
class="wt-app-navigator__card"
|
|
143
|
+
>
|
|
144
|
+
<a
|
|
145
|
+
:href="formattedApps[WebitelApplications.AUDIT].href"
|
|
146
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.AUDIT]}`)"
|
|
147
|
+
class="wt-app-navigator__card__link"
|
|
148
|
+
target="_blank"
|
|
149
|
+
>
|
|
150
|
+
<img
|
|
151
|
+
:alt="`${[WebitelApplications.AUDIT]}-pic`"
|
|
152
|
+
class="wt-app-navigator__card__img"
|
|
153
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-audit.svg"
|
|
154
|
+
>
|
|
155
|
+
</a>
|
|
156
|
+
</li>
|
|
157
|
+
|
|
158
|
+
<li
|
|
159
|
+
v-if="formattedApps[WebitelApplications.CRM]"
|
|
160
|
+
:class="{'active': formattedApps[WebitelApplications.CRM].currentApp }"
|
|
161
|
+
class="wt-app-navigator__card"
|
|
162
|
+
>
|
|
163
|
+
<a
|
|
164
|
+
:href="formattedApps[WebitelApplications.CRM].href"
|
|
165
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.CRM]}`)"
|
|
166
|
+
class="wt-app-navigator__card__link"
|
|
167
|
+
target="_blank"
|
|
168
|
+
>
|
|
169
|
+
<img
|
|
170
|
+
:alt="`${[WebitelApplications.CRM]}-pic`"
|
|
171
|
+
class="wt-app-navigator__card__img"
|
|
172
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-crm.svg"
|
|
173
|
+
>
|
|
174
|
+
</a>
|
|
175
|
+
</li>
|
|
176
|
+
|
|
177
|
+
</ul>
|
|
178
|
+
</nav>
|
|
179
|
+
</transition>
|
|
180
|
+
</div>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<script setup>
|
|
184
|
+
import { computed, ref } from 'vue';
|
|
185
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum';
|
|
186
|
+
|
|
187
|
+
const props = defineProps({
|
|
188
|
+
currentApp: {
|
|
189
|
+
type: String,
|
|
190
|
+
},
|
|
191
|
+
apps: {
|
|
192
|
+
type: Array,
|
|
193
|
+
default: () => [],
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
const isOpened = ref(false);
|
|
198
|
+
|
|
199
|
+
const formattedApps = computed(() => props.apps.reduce((apps, app) => ({
|
|
200
|
+
...apps,
|
|
201
|
+
[app.name]: {
|
|
202
|
+
...app,
|
|
203
|
+
currentApp: props.currentApp === app.name,
|
|
204
|
+
},
|
|
205
|
+
}), {}));
|
|
206
|
+
|
|
207
|
+
function close() {
|
|
208
|
+
isOpened.value = false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
<style lang="scss" scoped>
|
|
214
|
+
.wt-app-navigator {
|
|
215
|
+
position: relative;
|
|
216
|
+
z-index: var(--wt-app-header-content-z-index);
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// dropdown part
|
|
222
|
+
.wt-app-navigator__nav-wrapper {
|
|
223
|
+
@extend %wt-scrollbar;
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 100%; // icon
|
|
226
|
+
right: 0;
|
|
227
|
+
overflow: auto;
|
|
228
|
+
max-height: var(--wt-app-navigator-max-height);
|
|
229
|
+
margin-top: var(--wt-app-header-content-panel-margin);
|
|
230
|
+
padding: var(--wt-app-header-content-gap);
|
|
231
|
+
transition: var(--transition);
|
|
232
|
+
border-radius: var(--border-radius);
|
|
233
|
+
background: var(--wt-app-header-content-bg-color);
|
|
234
|
+
box-shadow: var(--elevation-10);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.wt-app-navigator__nav-title {
|
|
238
|
+
@extend %typo-subtitle-1;
|
|
239
|
+
margin-bottom: var(--wt-app-header-content-gap);
|
|
240
|
+
text-align: center;
|
|
241
|
+
text-transform: uppercase;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ul with li apps
|
|
245
|
+
.wt-app-navigator__nav {
|
|
246
|
+
display: grid;
|
|
247
|
+
grid-template-columns: 1fr 1fr;
|
|
248
|
+
grid-gap: var(--wt-app-navigator-item-gap);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.wt-app-navigator__card {
|
|
252
|
+
box-sizing: border-box;
|
|
253
|
+
width: var(--wt-app-navigator-item-size);
|
|
254
|
+
height: var(--wt-app-navigator-item-size);
|
|
255
|
+
transition: var(--transition);
|
|
256
|
+
border: var(--wt-app-navigator-item-border);
|
|
257
|
+
border-color: var(--wt-app-navigator-item-border-color);
|
|
258
|
+
border-radius: var(--border-radius);
|
|
259
|
+
|
|
260
|
+
&.active, &:hover {
|
|
261
|
+
border-color: var(--wt-app-navigator-item-border-color--hover);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// a tag
|
|
266
|
+
.wt-app-navigator__card__link {
|
|
267
|
+
display: inline-block;
|
|
268
|
+
width: 100%;
|
|
269
|
+
height: 100%;
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// img inside a
|
|
274
|
+
.wt-app-navigator__card__img {
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 100%;
|
|
277
|
+
}
|
|
278
|
+
</style>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wt-header-actions">
|
|
3
|
+
<wt-tooltip>
|
|
4
|
+
<template v-slot:activator>
|
|
5
|
+
<wt-icon-btn
|
|
6
|
+
v-clickaway="close"
|
|
7
|
+
:class="{'active': isOpened}"
|
|
8
|
+
class="wt-header-actions__btn"
|
|
9
|
+
icon="account"
|
|
10
|
+
@click="isOpened = !isOpened"
|
|
11
|
+
></wt-icon-btn>
|
|
12
|
+
</template>
|
|
13
|
+
{{ $t('webitelUI.headerActions.account') }}
|
|
14
|
+
</wt-tooltip>
|
|
15
|
+
|
|
16
|
+
<transition name="fade">
|
|
17
|
+
<section v-show="isOpened" class="wt-header-actions__panel-wrapper">
|
|
18
|
+
<header v-if="isHeader" class="wt-header-actions__header">
|
|
19
|
+
<h3
|
|
20
|
+
class="wt-header-actions__name"
|
|
21
|
+
>{{ userName }}</h3>
|
|
22
|
+
<p
|
|
23
|
+
class="wt-header-actions__account"
|
|
24
|
+
>{{ userAccount }}</p>
|
|
25
|
+
</header>
|
|
26
|
+
<ul class="wt-header-actions__actions-wrapper">
|
|
27
|
+
<li class="wt-header-actions__action">
|
|
28
|
+
<a
|
|
29
|
+
class="wt-header-actions__action__link"
|
|
30
|
+
href="https://docs.webitel.com/display/WEP/Webitel+Elastic+Platform"
|
|
31
|
+
target="_blank"
|
|
32
|
+
@click="close"
|
|
33
|
+
>
|
|
34
|
+
<wt-icon icon="docs"></wt-icon>
|
|
35
|
+
<span>{{ $t('webitelUI.headerActions.docs') }}</span>
|
|
36
|
+
</a>
|
|
37
|
+
</li>
|
|
38
|
+
<li class="wt-header-actions__action">
|
|
39
|
+
<a
|
|
40
|
+
class="wt-header-actions__action__link"
|
|
41
|
+
@click.prevent="settings"
|
|
42
|
+
>
|
|
43
|
+
<wt-icon icon="settings"></wt-icon>
|
|
44
|
+
<span>{{ $t('webitelUI.headerActions.settings') }}</span>
|
|
45
|
+
</a>
|
|
46
|
+
</li>
|
|
47
|
+
<li class="wt-header-actions__action wt-header-actions__action--logout">
|
|
48
|
+
<a
|
|
49
|
+
class="wt-header-actions__action__link"
|
|
50
|
+
@click.prevent="logout"
|
|
51
|
+
>
|
|
52
|
+
<wt-icon color="danger" icon="logout"></wt-icon>
|
|
53
|
+
<span>{{ $t('webitelUI.headerActions.logout') }}</span>
|
|
54
|
+
</a>
|
|
55
|
+
</li>
|
|
56
|
+
</ul>
|
|
57
|
+
<footer v-if="isFooter" class="wt-header-actions__footer">
|
|
58
|
+
<p class="wt-header-actions__build__version">
|
|
59
|
+
{{ buildVersion }}
|
|
60
|
+
</p>
|
|
61
|
+
</footer>
|
|
62
|
+
</section>
|
|
63
|
+
</transition>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
export default {
|
|
69
|
+
name: 'wt-header-actions',
|
|
70
|
+
data: () => ({
|
|
71
|
+
isOpened: false,
|
|
72
|
+
}),
|
|
73
|
+
props: {
|
|
74
|
+
user: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default: () => ({}),
|
|
77
|
+
},
|
|
78
|
+
buildInfo: {
|
|
79
|
+
type: Object,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
computed: {
|
|
84
|
+
isHeader() {
|
|
85
|
+
return !!(this.userName || this.userAccount);
|
|
86
|
+
},
|
|
87
|
+
isFooter() {
|
|
88
|
+
return this.buildInfo;
|
|
89
|
+
},
|
|
90
|
+
userName() {
|
|
91
|
+
return this.user.name || this.user.username;
|
|
92
|
+
},
|
|
93
|
+
userAccount() {
|
|
94
|
+
return this.user.preferredUsername || this.user.account;
|
|
95
|
+
},
|
|
96
|
+
buildVersion() {
|
|
97
|
+
return `${this.$t('webitelUI.headerActions.buildVersion')}: v${this.buildInfo.release}-${this.buildInfo.build}`;
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
methods: {
|
|
102
|
+
settings() {
|
|
103
|
+
this.$emit('settings');
|
|
104
|
+
this.close();
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
logout() {
|
|
108
|
+
this.$emit('logout');
|
|
109
|
+
this.close();
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
close() {
|
|
113
|
+
this.isOpened = false;
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style lang="scss" scoped>
|
|
120
|
+
.wt-header-actions {
|
|
121
|
+
position: relative;
|
|
122
|
+
z-index: var(--wt-app-header-content-z-index);
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.wt-header-actions__panel-wrapper {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 100%; // icon
|
|
130
|
+
right: 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
gap: var(--wt-header-actions-content-sections-gap);
|
|
134
|
+
min-width: var(--wt-header-actions-min-width);
|
|
135
|
+
margin-top: var(--wt-app-header-content-panel-margin);
|
|
136
|
+
padding: var(--wt-header-actions-padding);
|
|
137
|
+
transition: var(--transition);
|
|
138
|
+
border-radius: var(--border-radius);
|
|
139
|
+
background: var(--wt-app-header-content-bg-color);
|
|
140
|
+
box-shadow: var(--elevation-10);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.wt-header-actions__name {
|
|
144
|
+
@extend %typo-subtitle-1;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.wt-header-actions__account {
|
|
149
|
+
@extend %typo-body-1;
|
|
150
|
+
white-space: nowrap;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.wt-header-actions__action {
|
|
154
|
+
display: flex;
|
|
155
|
+
transition: var(--transition);
|
|
156
|
+
|
|
157
|
+
&:hover {
|
|
158
|
+
background: var(--wt-header-actions-action-bg-color--hover);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.wt-header-actions__action__link {
|
|
162
|
+
@extend %typo-body-1;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
width: 100%;
|
|
166
|
+
padding: var(--wt-header-actions-action-link-padding);
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
|
|
169
|
+
.wt-icon {
|
|
170
|
+
margin-right: var(--wt-header-actions-action-link-padding);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&--logout .wt-header-actions__action__link {
|
|
175
|
+
color: var(--false-color);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.wt-header-actions__build__version {
|
|
180
|
+
@extend %typo-caption;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
}
|
|
183
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--avatar-size--size-xs: calc(var(--_spacing-multiplicator) * 3);
|
|
3
|
+
--avatar-size--size-sm: calc(var(--_spacing-multiplicator) * 4);
|
|
4
|
+
--avatar-size--size-md: calc(var(--_spacing-multiplicator) * 5);
|
|
5
|
+
--avatar-size--size-lg: calc(var(--_spacing-multiplicator) * 7);
|
|
6
|
+
--avatar-size--size-xl: calc(var(--_spacing-multiplicator) * 9);
|
|
7
|
+
--avatar-size--size-2xl: calc(var(--_spacing-multiplicator) * 12);
|
|
8
|
+
--avatar-size--size-3xl: calc(var(--_spacing-multiplicator) * 16);
|
|
9
|
+
|
|
10
|
+
--avatar-size: var(--avatar-size--size-md);
|
|
11
|
+
|
|
12
|
+
--online-color: var(--true-color);
|
|
13
|
+
--dnd-color: var(--primary-color);
|
|
14
|
+
--busy-color: var(--false-color);
|
|
15
|
+
--offline-color: var(--secondary-color);
|
|
16
|
+
|
|
17
|
+
--avatar-font-color: var(--main-color);
|
|
18
|
+
|
|
19
|
+
--avatar-letters-p1-color: var(--red-lighten-2);
|
|
20
|
+
--avatar-letters-p2-color: var(--purple-lighten-2);
|
|
21
|
+
--avatar-letters-p3-color: var(--deep-purple-lighten-2);
|
|
22
|
+
--avatar-letters-p4-color: var(--indigo-lighten-2);
|
|
23
|
+
--avatar-letters-p5-color: var(--blue-lighten-1);
|
|
24
|
+
--avatar-letters-p6-color: var(--cyan-lighten-1);
|
|
25
|
+
--avatar-letters-p7-color: var(--teal-darken-3);
|
|
26
|
+
--avatar-letters-p8-color: var(--green-darken-2);
|
|
27
|
+
--avatar-letters-p9-color: var(--lime-darken-3);
|
|
28
|
+
--avatar-letters-p10-color: var(--yellow-darken-3);
|
|
29
|
+
--avatar-letters-p11-color: var(--amber-lighten-2);
|
|
30
|
+
--avatar-letters-p12-color: var(--orange-darken-1);
|
|
31
|
+
--avatar-letters-p13-color: var(--deep-purple-lighten-1);
|
|
32
|
+
}
|