@webitel/ui-sdk 0.1.2 → 0.1.3-vue3
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-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/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/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/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/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/rounded-info.svg +3 -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/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 +18534 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -0
- package/dist/ui-sdk.umd.js +18553 -0
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +12 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +79 -44
- package/src/components/atoms/wt-avatar/__tests__/wt-avatar.spec.js +9 -0
- package/src/components/atoms/wt-avatar/wt-avatar.vue +102 -0
- package/src/components/atoms/wt-badge/__tests__/wt-badge.spec.js +9 -0
- package/src/components/atoms/wt-badge/wt-badge.vue +44 -7
- package/src/components/atoms/wt-button/__tests__/WtButton.spec.js +29 -0
- package/src/components/atoms/wt-button/wt-button.vue +226 -140
- package/src/components/atoms/wt-chip/__tests__/WtChip.spec.js +19 -0
- package/src/components/atoms/wt-chip/wt-chip.vue +23 -0
- package/src/components/atoms/wt-context-menu/__tests__/WtContextMenu.spec.js +9 -0
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +105 -0
- package/src/components/atoms/wt-divider/__tests__/WtDivider.spec.js +9 -0
- package/src/components/atoms/wt-divider/wt-divider.vue +2 -1
- package/src/components/atoms/wt-icon/__tests__/WtIcon.spec.js +24 -0
- package/src/components/atoms/wt-icon/wt-icon.vue +133 -482
- package/src/components/atoms/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
- package/src/components/atoms/wt-indicator/wt-indicator.vue +119 -0
- package/src/components/atoms/wt-input-info/__tests__/WtInputInfo.spec.js +9 -0
- package/src/components/atoms/wt-input-info/wt-input-info.vue +2 -1
- package/src/components/atoms/wt-loader/__tests__/WtLoader.spec.js +9 -0
- package/src/components/atoms/wt-loader/_internals/wt-loader--md.vue +83 -0
- package/src/components/atoms/wt-loader/_internals/wt-loader--sm.vue +73 -0
- package/src/components/atoms/wt-loader/wt-loader.vue +21 -73
- package/src/components/atoms/wt-rounded-action/__tests__/WtRoundedAction.spec.js +9 -0
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +156 -0
- package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +30 -0
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +35 -41
- package/src/components/index.js +57 -7
- package/src/components/molecules/wt-button-select/__tests__/WtButtonSelect.spec.js +29 -0
- package/src/components/molecules/wt-button-select/wt-button-select.vue +184 -0
- package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +24 -12
- package/src/components/molecules/wt-copy-action/__tests__/WtCopyAction.spec.js +14 -0
- package/src/components/molecules/wt-copy-action/wt-copy-action.vue +63 -0
- package/src/components/molecules/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +156 -153
- package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +79 -0
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +79 -85
- package/src/components/molecules/wt-hint/__tests__/WtHint.spec.js +9 -0
- package/src/components/molecules/wt-hint/wt-hint.vue +21 -0
- package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +15 -0
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +59 -53
- package/src/components/molecules/wt-input/__tests__/WtInput.spec.js +25 -0
- package/src/components/molecules/wt-input/wt-input.vue +248 -225
- package/src/components/molecules/wt-label/__tests__/WtLabel.spec.js +9 -0
- package/src/components/molecules/wt-label/mixins/labelUsageMixin.js +21 -0
- package/src/components/molecules/wt-label/wt-label.vue +72 -0
- package/src/components/molecules/wt-load-bar/__tests__/WtLoadBar.spec.js +9 -0
- package/src/components/molecules/wt-load-bar/wt-load-bar.vue +50 -0
- package/src/components/molecules/wt-notification/__tests__/WtNotification.spec.js +21 -0
- package/src/components/molecules/wt-notification/wt-notification.vue +12 -11
- package/src/components/molecules/wt-popup/__tests__/WtPopup.spec.js +47 -0
- package/src/components/molecules/wt-popup/wt-popup.vue +104 -60
- package/src/components/molecules/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
- package/src/components/molecules/wt-progress-bar/wt-progress-bar.vue +79 -0
- package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +42 -0
- package/src/components/molecules/wt-radio/wt-radio.vue +9 -7
- package/src/components/molecules/wt-search-bar/__tests__/WtSearchBar.spec.js +35 -0
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +91 -83
- package/src/components/molecules/wt-select/__tests__/WtSelect.spec.js +27 -0
- package/src/components/molecules/wt-select/mixins/__tests__/multiselectMixin.spec.js +32 -0
- package/src/components/molecules/wt-select/mixins/multiselectMixin.js +146 -0
- package/src/components/molecules/wt-select/wt-select.vue +211 -331
- package/src/components/molecules/wt-slider/__tests__/WtSlider.spec.js +9 -0
- package/src/components/molecules/wt-slider/wt-slider.vue +174 -0
- package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
- package/src/components/molecules/wt-switcher/wt-switcher.vue +47 -22
- package/src/components/molecules/wt-tabs/__tests__/WtTabs.spec.js +36 -0
- package/src/components/molecules/wt-tabs/wt-tabs.vue +74 -82
- package/src/components/molecules/wt-tags-input/__tests__/WtTagsInput.spec.js +42 -0
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +215 -0
- package/src/components/molecules/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
- package/src/components/molecules/wt-textarea/wt-textarea.vue +114 -40
- package/src/components/molecules/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
- package/src/components/molecules/wt-time-input/wt-time-input.vue +55 -6
- package/src/components/molecules/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +148 -85
- package/src/components/organisms/wt-app-header/__tests__/WtAppHeader.spec.js +19 -0
- package/src/components/organisms/wt-app-header/__tests__/WtAppNavigator.spec.js +23 -0
- package/src/components/organisms/wt-app-header/__tests__/WtHeaderActions.spec.js +21 -0
- package/src/components/organisms/wt-app-header/wt-app-header.vue +24 -0
- package/src/components/organisms/wt-app-header/wt-app-navigator.vue +249 -0
- package/src/components/organisms/wt-app-header/wt-header-actions.vue +183 -0
- package/src/components/organisms/wt-error-page/__tests__/wt-error-page.spec.js +17 -0
- package/src/components/organisms/wt-error-page/wt-error-page.vue +104 -0
- package/src/components/organisms/wt-filters-panel-wrapper/__tests__/wt-filters-panel-wrapper.spec.js +24 -0
- package/src/components/organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +146 -0
- package/src/components/organisms/wt-headline/__tests__/WtHeadline.spec.js +47 -0
- package/src/components/organisms/wt-headline/wt-headline.vue +45 -0
- package/src/components/organisms/wt-headline-nav/__tests__/wt-headline-nav.spec.js +13 -0
- package/src/components/organisms/wt-headline-nav/wt-headline-nav.vue +85 -0
- package/src/components/organisms/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +64 -0
- package/src/components/organisms/wt-navigation-bar/wt-navigation-bar.vue +271 -0
- package/src/components/organisms/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +50 -0
- package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +71 -0
- package/src/components/organisms/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +33 -0
- package/src/components/organisms/wt-page-wrapper/wt-page-wrapper.vue +52 -0
- package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +37 -0
- package/src/components/organisms/wt-pagination/wt-pagination.vue +108 -88
- package/src/components/organisms/wt-player/__tests__/WtPlayer.spec.js +9 -0
- package/src/components/organisms/wt-player/wt-player.vue +203 -0
- package/src/components/organisms/wt-status-select/__tests__/WtStatusSelect.spec.js +25 -0
- package/src/components/organisms/wt-status-select/_internals/StatusOptions.lookup.js +24 -0
- package/src/components/organisms/wt-status-select/wt-status-select.vue +130 -0
- package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +134 -0
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +9 -0
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +9 -0
- package/src/components/organisms/wt-table/_internals/getSortOrder.js +12 -0
- package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +21 -0
- package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +22 -0
- package/src/components/organisms/wt-table/wt-table.vue +252 -0
- package/src/components/organisms/wt-table-actions/__tests__/WtTableActions.spec.js +9 -0
- package/src/components/organisms/wt-table-actions/wt-table-actions.vue +105 -0
- package/src/components/organisms/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +31 -0
- package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +120 -0
- package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
- package/src/components/transitions/wt-expand-transition.vue +70 -0
- package/src/css/components/_components.scss +45 -25
- package/src/css/components/atoms/wt-avatar/_variables.scss +14 -0
- package/src/css/components/atoms/wt-badge/_variables.scss +3 -6
- package/src/css/components/atoms/wt-button/_variables.scss +47 -47
- package/src/css/components/atoms/wt-chip/_variables.scss +7 -0
- package/src/css/components/atoms/wt-chip/wt-chip.scss +41 -0
- package/src/css/components/atoms/wt-context-menu/_variables.scss +7 -0
- package/src/css/components/atoms/wt-divider/_variables.scss +4 -4
- package/src/css/components/atoms/wt-icon/_variables.scss +7 -28
- package/src/css/components/atoms/wt-indicator/_variables.scss +22 -0
- package/src/css/components/atoms/wt-input-info/_variables.scss +6 -5
- package/src/css/components/atoms/wt-label/_variables.scss +3 -4
- package/src/css/components/atoms/wt-loader/_variables.scss +7 -7
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +7 -0
- package/src/css/components/atoms/wt-tooltip/_variables.scss +29 -10
- package/src/css/components/molecules/wt-button-select/_variables.scss +18 -0
- package/src/css/components/molecules/wt-checkbox/_variables.scss +3 -3
- package/src/css/components/molecules/wt-datepicker/_variables.scss +21 -20
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +90 -100
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +11 -12
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +2 -2
- package/src/css/components/molecules/wt-input/_variables.scss +7 -5
- package/src/css/components/molecules/wt-load-bar/_variables.scss +6 -0
- package/src/css/components/molecules/wt-notification/_variables.scss +9 -9
- package/src/css/components/molecules/wt-popup/_variables.scss +20 -11
- package/src/css/components/molecules/wt-progress-bar/_variables.scss +11 -0
- package/src/css/components/molecules/wt-radio/_variables.scss +6 -6
- package/src/css/components/molecules/wt-search-bar/_variables.scss +7 -3
- package/src/css/components/molecules/wt-select/_multiselect.scss +198 -0
- package/src/css/components/molecules/wt-select/_variables.scss +14 -23
- package/src/css/components/molecules/wt-slider/_variables.scss +15 -0
- package/src/css/components/molecules/wt-switcher/_variables.scss +17 -14
- package/src/css/components/molecules/wt-tabs/_variables.scss +14 -14
- package/src/css/components/molecules/wt-tags-input/_variables.scss +24 -0
- package/src/css/components/molecules/wt-textarea/_variables.scss +5 -5
- package/src/css/components/molecules/wt-timepicker/_variables.scss +4 -3
- package/src/css/components/organisms/wt-app-header/_variables.scss +24 -0
- package/src/css/components/organisms/wt-headline/_variables.scss +6 -0
- package/src/css/components/organisms/wt-headline-nav/_variables.scss +5 -0
- package/src/css/components/organisms/wt-navigation-bar/_variables.scss +16 -0
- package/src/css/components/organisms/wt-notifications-bar/_variables.scss +7 -0
- package/src/css/components/organisms/wt-page-wrapper/_variables.scss +5 -0
- package/src/css/components/organisms/wt-pagination/_variables.scss +4 -6
- package/src/css/components/organisms/wt-player/_variables.scss +8 -0
- package/src/css/components/organisms/wt-status-select/_variables.scss +6 -0
- package/src/css/components/organisms/wt-table/_variables.scss +16 -0
- package/src/css/components/organisms/wt-table-actions/_variables.scss +5 -0
- package/src/css/main.scss +75 -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 +150 -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/enums/AbstractUserStatus/AbstractUserStatus.enum.js +8 -0
- package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +46 -0
- package/src/enums/WebitelApplications/SupervisorSections.enum.js +7 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +10 -0
- package/src/locale/en/en.js +250 -0
- package/src/locale/i18n.js +5 -5
- package/src/locale/ru/ru.js +248 -2
- package/src/locale/ua/ua.js +273 -0
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +57 -0
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +66 -0
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +93 -0
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +60 -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/validationMixin.js +21 -10
- 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/FilesExport/FilesExport.js +110 -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/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 +54 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +40 -0
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +49 -0
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +65 -0
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +49 -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 +39 -0
- package/src/modules/QueryFilters/components/filter-from-to.vue +136 -0
- package/src/modules/QueryFilters/components/filter-search.vue +33 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +48 -0
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +70 -0
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +86 -0
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +58 -0
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +48 -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 +48 -0
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +89 -0
- package/src/modules/QueryFilters/store/queryFilters.js +6 -0
- package/src/modules/Userinfo/api/BaseAPIService.js +7 -0
- package/src/modules/Userinfo/api/auth.js +29 -0
- package/src/modules/Userinfo/api/userinfo.js +32 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +190 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +56 -0
- package/src/modules/Userinfo/components/the-auth.vue +76 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +113 -0
- package/src/plugins/breakpoint/breakpoint.plugin.js +136 -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/caseConverters.js +89 -0
- package/src/scripts/convertDuration.js +15 -0
- package/src/scripts/editProxy.js +9 -0
- package/src/scripts/eventBus.js +4 -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/store/BaseStoreModules/BaseStoreModule.js +49 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +104 -0
- package/src/store/helpers/__tests__/getNamespacedState.spec.js +11 -0
- package/src/store/helpers/getNamespacedState.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-label/wt-label.vue +0 -58
- package/src/css/colors/_colors.scss +0 -67
- package/src/css/components/atoms/wt-badge/wt-badge.scss +0 -8
- 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/directives/clickaway/clickaway.js +0 -52
- package/src/directives/index.js +0 -12
- 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
|
@@ -1,54 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
class="wt-tooltip"
|
|
2
|
+
<v-tooltip
|
|
4
3
|
:class="{
|
|
5
|
-
'wt-tooltip--visible': visible,
|
|
6
4
|
'wt-tooltip--contrast': contrast
|
|
7
5
|
}"
|
|
6
|
+
:placement="placement"
|
|
7
|
+
:popper-class="[
|
|
8
|
+
'wt-tooltip__popper',
|
|
9
|
+
{ 'wt-tooltip--contrast__popper': contrast },
|
|
10
|
+
popperClass,
|
|
11
|
+
]"
|
|
12
|
+
:triggers="['hover', 'focus', 'touch']"
|
|
13
|
+
class="wt-tooltip"
|
|
8
14
|
>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
|
|
15
|
+
<slot name="activator"></slot>
|
|
16
|
+
<template #popper>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</template>
|
|
19
|
+
</v-tooltip>
|
|
11
20
|
</template>
|
|
12
21
|
|
|
13
22
|
<script>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
23
|
+
export default {
|
|
24
|
+
name: 'wt-tooltip',
|
|
25
|
+
props: {
|
|
26
|
+
contrast: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
placement: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'auto',
|
|
25
33
|
},
|
|
26
|
-
|
|
34
|
+
popperClass: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: '',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
27
40
|
</script>
|
|
28
41
|
|
|
29
42
|
<style lang="scss" scoped>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
color: var(--tooltip-light-text-color);
|
|
36
|
-
background: var(--tooltip-light-bg-color);
|
|
37
|
-
border-radius: var(--border-radius);
|
|
38
|
-
box-shadow: var(--box-shadow);
|
|
39
|
-
transition: var(--transition);
|
|
40
|
-
opacity: 0;
|
|
41
|
-
pointer-events: none;
|
|
42
|
-
z-index: var(--tooltip-z-index);
|
|
43
|
-
|
|
44
|
-
&--contrast {
|
|
45
|
-
color: var(--tooltip-dark-text-color);
|
|
46
|
-
background: var(--tooltip-dark-bg-color);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&--visible, &:hover {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
pointer-events: auto;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
43
|
+
.wt-tooltip {
|
|
44
|
+
display: inline-block;
|
|
45
|
+
line-height: 0;
|
|
46
|
+
height: fit-content;
|
|
47
|
+
}
|
|
54
48
|
</style>
|
package/src/components/index.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
+
import WtAvatar from './atoms/wt-avatar/wt-avatar.vue';
|
|
3
|
+
import WtBadge from './atoms/wt-badge/wt-badge.vue';
|
|
2
4
|
import WtIcon from './atoms/wt-icon/wt-icon.vue';
|
|
5
|
+
import WtIndicator from './atoms/wt-indicator/wt-indicator.vue';
|
|
3
6
|
import WtInputInfo from './atoms/wt-input-info/wt-input-info.vue';
|
|
4
7
|
import WtButton from './atoms/wt-button/wt-button.vue';
|
|
5
|
-
import
|
|
8
|
+
import WtChip from './atoms/wt-chip/wt-chip.vue';
|
|
6
9
|
import WtDivider from './atoms/wt-divider/wt-divider.vue';
|
|
7
10
|
import WtTooltip from './atoms/wt-tooltip/wt-tooltip.vue';
|
|
8
|
-
import
|
|
11
|
+
import WtRoundedAction from './atoms/wt-rounded-action/wt-rounded-action.vue';
|
|
9
12
|
import WtLoader from './atoms/wt-loader/wt-loader.vue';
|
|
13
|
+
import WtContextMenu from './atoms/wt-context-menu/wt-context-menu.vue';
|
|
10
14
|
|
|
11
15
|
import WtCheckbox from './molecules/wt-checkbox/wt-checkbox.vue';
|
|
12
16
|
import WtDatepicker from './molecules/wt-datepicker/wt-datepicker.vue';
|
|
@@ -15,46 +19,92 @@ import WtIconBtn from './molecules/wt-icon-btn/wt-icon-btn.vue';
|
|
|
15
19
|
import WtInput from './molecules/wt-input/wt-input.vue';
|
|
16
20
|
import WtNotification from './molecules/wt-notification/wt-notification.vue';
|
|
17
21
|
import WtPopup from './molecules/wt-popup/wt-popup.vue';
|
|
22
|
+
import WtProgressBar from './molecules/wt-progress-bar/wt-progress-bar.vue';
|
|
18
23
|
import WtRadio from './molecules/wt-radio/wt-radio.vue';
|
|
19
24
|
import WtSearchBar from './molecules/wt-search-bar/wt-search-bar.vue';
|
|
20
25
|
import WtSelect from './molecules/wt-select/wt-select.vue';
|
|
26
|
+
import WtSlider from './molecules/wt-slider/wt-slider.vue';
|
|
21
27
|
import WtSwitcher from './molecules/wt-switcher/wt-switcher.vue';
|
|
22
28
|
import WtTabs from './molecules/wt-tabs/wt-tabs.vue';
|
|
29
|
+
import WtTagsInput from './molecules/wt-tags-input/wt-tags-input.vue';
|
|
23
30
|
import WtTimeInput from './molecules/wt-time-input/wt-time-input.vue';
|
|
24
31
|
import WtTextarea from './molecules/wt-textarea/wt-textarea.vue';
|
|
25
32
|
import WtTimepicker from './molecules/wt-timepicker/wt-timepicker.vue';
|
|
33
|
+
import WtLabel from './molecules/wt-label/wt-label.vue';
|
|
34
|
+
import WtButtonSelect from './molecules/wt-button-select/wt-button-select.vue';
|
|
35
|
+
import WtHint from './molecules/wt-hint/wt-hint.vue';
|
|
36
|
+
import WtCopyAction from './molecules/wt-copy-action/wt-copy-action.vue';
|
|
37
|
+
import WtLoadBar from './molecules/wt-load-bar/wt-load-bar.vue';
|
|
26
38
|
|
|
39
|
+
import WtAppHeader from './organisms/wt-app-header/wt-app-header.vue';
|
|
40
|
+
import WtAppNavigator from './organisms/wt-app-header/wt-app-navigator.vue';
|
|
41
|
+
import WtFiltersPanelWrapper from './organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue';
|
|
42
|
+
import WtHeaderActions from './organisms/wt-app-header/wt-header-actions.vue';
|
|
43
|
+
import WtErrorPage from './organisms/wt-error-page/wt-error-page.vue';
|
|
44
|
+
import WtHeadline from './organisms/wt-headline/wt-headline.vue';
|
|
45
|
+
import WtHeadlineNav from './organisms/wt-headline-nav/wt-headline-nav.vue';
|
|
46
|
+
import WtNavigationBar from './organisms/wt-navigation-bar/wt-navigation-bar.vue';
|
|
47
|
+
import WtNotificationsBar from './organisms/wt-notifications-bar/wt-notifications-bar.vue';
|
|
48
|
+
import WtPageWrapper from './organisms/wt-page-wrapper/wt-page-wrapper.vue';
|
|
27
49
|
import WtPagination from './organisms/wt-pagination/wt-pagination.vue';
|
|
50
|
+
import WtPlayer from './organisms/wt-player/wt-player.vue';
|
|
51
|
+
import WtStatusSelect from './organisms/wt-status-select/wt-status-select.vue';
|
|
52
|
+
import WtTable from './organisms/wt-table/wt-table.vue';
|
|
53
|
+
import WtTableActions from './organisms/wt-table-actions/wt-table-actions.vue';
|
|
54
|
+
import WtTableColumnSelect from './organisms/wt-table-column-select/wt-table-column-select.vue';
|
|
28
55
|
|
|
29
56
|
const Components = {
|
|
57
|
+
WtAvatar,
|
|
58
|
+
WtBadge,
|
|
30
59
|
WtIcon,
|
|
60
|
+
WtIndicator,
|
|
31
61
|
WtInputInfo,
|
|
32
62
|
WtButton,
|
|
33
|
-
|
|
63
|
+
WtChip,
|
|
34
64
|
WtDivider,
|
|
35
65
|
WtTooltip,
|
|
36
66
|
WtLabel,
|
|
37
67
|
WtLoader,
|
|
68
|
+
WtRoundedAction,
|
|
38
69
|
WtCheckbox,
|
|
39
70
|
WtDatepicker,
|
|
40
71
|
WtDatetimepicker,
|
|
41
72
|
WtIconBtn,
|
|
42
73
|
WtInput,
|
|
74
|
+
WtHint,
|
|
43
75
|
WtNotification,
|
|
44
76
|
WtPopup,
|
|
77
|
+
WtProgressBar,
|
|
45
78
|
WtRadio,
|
|
46
79
|
WtSearchBar,
|
|
47
80
|
WtSelect,
|
|
81
|
+
WtSlider,
|
|
48
82
|
WtSwitcher,
|
|
49
83
|
WtTabs,
|
|
84
|
+
WtTagsInput,
|
|
50
85
|
WtTimeInput,
|
|
51
86
|
WtTimepicker,
|
|
52
87
|
WtTextarea,
|
|
88
|
+
WtAppHeader,
|
|
89
|
+
WtHeadline,
|
|
90
|
+
WtHeadlineNav,
|
|
91
|
+
WtNavigationBar,
|
|
92
|
+
WtAppNavigator,
|
|
93
|
+
WtFiltersPanelWrapper,
|
|
94
|
+
WtHeaderActions,
|
|
95
|
+
WtErrorPage,
|
|
96
|
+
WtNotificationsBar,
|
|
97
|
+
WtPageWrapper,
|
|
53
98
|
WtPagination,
|
|
99
|
+
WtPlayer,
|
|
100
|
+
WtStatusSelect,
|
|
101
|
+
WtTable,
|
|
102
|
+
WtTableActions,
|
|
103
|
+
WtTableColumnSelect,
|
|
104
|
+
WtButtonSelect,
|
|
105
|
+
WtContextMenu,
|
|
106
|
+
WtCopyAction,
|
|
107
|
+
WtLoadBar,
|
|
54
108
|
};
|
|
55
109
|
|
|
56
|
-
Object.keys(Components).forEach((name) => {
|
|
57
|
-
Vue.component(name, Components[name]);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
110
|
export default Components;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { shallowMount, mount } from '@vue/test-utils';
|
|
2
|
+
import WtSelectButton from '../wt-button-select.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtSelectButton', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtSelectButton);
|
|
7
|
+
expect(wrapper.classes('wt-button-select')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders a button content via default slot', () => {
|
|
11
|
+
const content = 'button content';
|
|
12
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
13
|
+
slots: {
|
|
14
|
+
default: content,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-button-select__button').text()).toBe(content);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should rotate the arrow', () => {
|
|
21
|
+
const wrapper = mount(WtSelectButton, {
|
|
22
|
+
data: () => ({
|
|
23
|
+
isOpened: true,
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
const wtIcon = wrapper.find('.wt-button-select__select-arrow');
|
|
27
|
+
expect(wtIcon.classes()).toContain('wt-button-select__select-arrow--active');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="wt-button-select"
|
|
4
|
+
v-clickaway="away">
|
|
5
|
+
|
|
6
|
+
<wt-button
|
|
7
|
+
class="wt-button-select__button"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
@click="$emit('click', $event)"
|
|
11
|
+
>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</wt-button>
|
|
14
|
+
|
|
15
|
+
<wt-context-menu
|
|
16
|
+
:options="options"
|
|
17
|
+
:visible="isOpened"
|
|
18
|
+
@click="selectOption"
|
|
19
|
+
>
|
|
20
|
+
<template v-slot:activator>
|
|
21
|
+
<wt-button
|
|
22
|
+
class="wt-button-select__select-btn"
|
|
23
|
+
v-bind="$attrs"
|
|
24
|
+
:disabled="disabled"
|
|
25
|
+
:loading="false"
|
|
26
|
+
@click="isOpened = !isOpened"
|
|
27
|
+
>
|
|
28
|
+
<wt-icon
|
|
29
|
+
class="wt-button-select__select-arrow"
|
|
30
|
+
:class="{'wt-button-select__select-arrow--active': isOpened}"
|
|
31
|
+
icon="arrow-down"
|
|
32
|
+
:disabled="disabled"
|
|
33
|
+
></wt-icon>
|
|
34
|
+
</wt-button>
|
|
35
|
+
</template>
|
|
36
|
+
</wt-context-menu>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
export default {
|
|
42
|
+
name: 'wt-button-select',
|
|
43
|
+
data: () => ({
|
|
44
|
+
isOpened: false,
|
|
45
|
+
}),
|
|
46
|
+
props: {
|
|
47
|
+
// all buttons props are passed as "$attrs"
|
|
48
|
+
options: {
|
|
49
|
+
type: Array,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
selectOption({ option, index }) {
|
|
59
|
+
this.$emit('click:option', option, index);
|
|
60
|
+
this.isOpened = false;
|
|
61
|
+
},
|
|
62
|
+
away() {
|
|
63
|
+
this.isOpened = false;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.wt-button-select {
|
|
70
|
+
position: relative;
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: var(--button-select-buttons-gap);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.wt-button-select__button {
|
|
77
|
+
padding: var(--button-select-button-padding);
|
|
78
|
+
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.wt-button-select__select-btn {
|
|
82
|
+
min-width: auto;
|
|
83
|
+
padding: var(--button-select-icon-button-padding);
|
|
84
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
85
|
+
|
|
86
|
+
// NORMAL MODE
|
|
87
|
+
&:not(.wt-button--outline)::v-deep {
|
|
88
|
+
& .wt-icon__icon {
|
|
89
|
+
fill: var(--button-select-icon-color-dark);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// For secondary color, the icon color and icon hover color are the same as in primary color mode
|
|
93
|
+
|
|
94
|
+
&.danger,
|
|
95
|
+
&.success,
|
|
96
|
+
&.transfer {
|
|
97
|
+
.wt-icon__icon {
|
|
98
|
+
fill: var(--button-select-icon-color-ligth);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//OUTLINE MODE
|
|
104
|
+
&.wt-button--outline::v-deep {
|
|
105
|
+
& .wt-icon__icon {
|
|
106
|
+
fill: var(--button-select-icon-color-primary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:hover,
|
|
110
|
+
&:active {
|
|
111
|
+
.wt-icon__icon {
|
|
112
|
+
fill: var(--button-select-icon-color-primary--hover);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.danger {
|
|
117
|
+
& .wt-icon__icon {
|
|
118
|
+
fill: var(--icon-color-danger)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:hover,
|
|
122
|
+
&:active {
|
|
123
|
+
.wt-icon__icon {
|
|
124
|
+
fill: var(--button-select-icon-color-danger--hover);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.success {
|
|
130
|
+
& .wt-icon__icon {
|
|
131
|
+
fill: var(--icon-color-success)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:hover,
|
|
135
|
+
&:active {
|
|
136
|
+
.wt-icon__icon {
|
|
137
|
+
fill: var(--button-select-icon-color-success--hover);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.transfer {
|
|
143
|
+
& .wt-icon__icon {
|
|
144
|
+
fill: var(--icon-color-transfer)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:hover,
|
|
148
|
+
&:active {
|
|
149
|
+
.wt-icon__icon {
|
|
150
|
+
fill: var(--button-select-icon-color-transfer--hover);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&.secondary {
|
|
156
|
+
.wt-icon__icon {
|
|
157
|
+
fill: var(--button-select-icon-color-secondary);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:hover,
|
|
161
|
+
&:active {
|
|
162
|
+
.wt-icon__icon {
|
|
163
|
+
fill: var(--button-select-icon-color-secondary--hover);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// DISABLED MODE
|
|
170
|
+
&.wt-button--disabled .wt-icon::v-deep .wt-icon__icon {
|
|
171
|
+
fill: var(--icon-color-secondary-50);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// OPEN AND SHUT ARROW
|
|
175
|
+
.wt-button-select__select-arrow {
|
|
176
|
+
display: flex;
|
|
177
|
+
transform: rotate(0);
|
|
178
|
+
|
|
179
|
+
&--active {
|
|
180
|
+
transform: rotate(180deg);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtCheckbox from '../wt-checkbox.vue';
|
|
3
|
+
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
+
import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
|
|
5
|
+
|
|
6
|
+
describe('WtCheckbox', () => {
|
|
7
|
+
it('renders a component', () => {
|
|
8
|
+
const wrapper = shallowMount(WtCheckbox, {
|
|
9
|
+
stubs: {
|
|
10
|
+
WtLabel,
|
|
11
|
+
WtIcon,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
expect(wrapper.classes('wt-checkbox')).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('renders label text when passed', () => {
|
|
18
|
+
const label = 'Hello there';
|
|
19
|
+
const wrapper = shallowMount(WtCheckbox, {
|
|
20
|
+
stubs: {
|
|
21
|
+
WtLabel,
|
|
22
|
+
WtIcon,
|
|
23
|
+
},
|
|
24
|
+
propsData: { label },
|
|
25
|
+
});
|
|
26
|
+
expect(wrapper.find('.wt-checkbox__label').text()).toBe(label);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('toggles passed value at click', () => {
|
|
30
|
+
const selected = true;
|
|
31
|
+
const wrapper = shallowMount(WtCheckbox, {
|
|
32
|
+
stubs: {
|
|
33
|
+
WtLabel,
|
|
34
|
+
WtIcon,
|
|
35
|
+
},
|
|
36
|
+
propsData: { selected },
|
|
37
|
+
});
|
|
38
|
+
wrapper.find('.wt-checkbox__input').trigger('change');
|
|
39
|
+
expect(wrapper.emitted().change[0]).toEqual([!selected]);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
'wt-checkbox--disabled': disabled,
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
|
-
<wt-label class="wt-checkbox__wrapper">
|
|
10
|
+
<wt-label class="wt-checkbox__wrapper" v-bind="labelProps">
|
|
11
11
|
<input
|
|
12
12
|
class="wt-checkbox__input"
|
|
13
13
|
type="checkbox"
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
@change="inputHandler"
|
|
18
18
|
>
|
|
19
19
|
<span class="wt-checkbox__checkmark">
|
|
20
|
-
<wt-icon
|
|
20
|
+
<wt-icon
|
|
21
|
+
:icon="checkboxIcon"
|
|
22
|
+
:color="iconColor"
|
|
23
|
+
></wt-icon>
|
|
21
24
|
</span>
|
|
22
25
|
<!-- @slot Custom label markup -->
|
|
23
26
|
<slot name="label" v-bind="{ label, isChecked, disabled }">
|
|
@@ -55,6 +58,10 @@
|
|
|
55
58
|
type: Boolean,
|
|
56
59
|
default: false,
|
|
57
60
|
},
|
|
61
|
+
labelProps: {
|
|
62
|
+
type: Object,
|
|
63
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
64
|
+
},
|
|
58
65
|
},
|
|
59
66
|
computed: {
|
|
60
67
|
isChecked() {
|
|
@@ -66,6 +73,11 @@
|
|
|
66
73
|
checkboxIcon() {
|
|
67
74
|
return this.isChecked ? 'checkbox--checked' : 'checkbox';
|
|
68
75
|
},
|
|
76
|
+
iconColor() {
|
|
77
|
+
if (this.disabled) return 'disabled';
|
|
78
|
+
if (this.isChecked) return 'active';
|
|
79
|
+
return null;
|
|
80
|
+
},
|
|
69
81
|
},
|
|
70
82
|
methods: {
|
|
71
83
|
inputHandler() {
|
|
@@ -89,6 +101,10 @@
|
|
|
89
101
|
.wt-checkbox {
|
|
90
102
|
@include width-fit-content;
|
|
91
103
|
box-sizing: border-box;
|
|
104
|
+
|
|
105
|
+
.wt-label {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
92
108
|
}
|
|
93
109
|
|
|
94
110
|
.wt-checkbox__wrapper {
|
|
@@ -96,12 +112,16 @@
|
|
|
96
112
|
display: flex;
|
|
97
113
|
align-items: center;
|
|
98
114
|
user-select: none;
|
|
99
|
-
|
|
115
|
+
|
|
116
|
+
.wt-checkbox__checkmark {
|
|
117
|
+
line-height: 0; // prevent icon height >> content
|
|
118
|
+
}
|
|
100
119
|
}
|
|
101
120
|
|
|
102
121
|
.wt-checkbox__label {
|
|
103
122
|
margin-left: var(--checkbox-icon-margin);
|
|
104
123
|
transition: var(--transition);
|
|
124
|
+
cursor: pointer;
|
|
105
125
|
}
|
|
106
126
|
|
|
107
127
|
/* Hide the browser's default checkbox */
|
|
@@ -119,7 +139,7 @@
|
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
::v-deep .wt-icon__icon {
|
|
122
|
-
fill: var(--icon--hover
|
|
142
|
+
fill: var(--icon-color--hover);
|
|
123
143
|
}
|
|
124
144
|
}
|
|
125
145
|
|
|
@@ -127,10 +147,6 @@
|
|
|
127
147
|
.wt-checkbox__label {
|
|
128
148
|
color: var(--form-label--active-color);
|
|
129
149
|
}
|
|
130
|
-
|
|
131
|
-
::v-deep .wt-icon__icon {
|
|
132
|
-
fill: var(--icon--active-color);
|
|
133
|
-
}
|
|
134
150
|
}
|
|
135
151
|
|
|
136
152
|
.wt-checkbox--outline {
|
|
@@ -159,9 +175,5 @@
|
|
|
159
175
|
.wt-checkbox__label {
|
|
160
176
|
color: var(--form-label--disabled-color);
|
|
161
177
|
}
|
|
162
|
-
|
|
163
|
-
::v-deep .wt-icon__icon {
|
|
164
|
-
fill: var(--icon--disabled-color);
|
|
165
|
-
}
|
|
166
178
|
}
|
|
167
179
|
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtIconBtn from '../../wt-icon-btn/wt-icon-btn.vue';
|
|
3
|
+
import WtCopyAction from '../wt-copy-action.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtCopyAction', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtCopyAction, {
|
|
8
|
+
stubs: {
|
|
9
|
+
WtIconBtn,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
expect(wrapper.classes('wt-copy-action')).toBe(true);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-tooltip class="wt-copy-action">
|
|
3
|
+
<template v-slot:activator>
|
|
4
|
+
<wt-icon-btn
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
:icon="copied ? 'done' : 'copy'"
|
|
7
|
+
class="copy-action"
|
|
8
|
+
@click="copy"
|
|
9
|
+
></wt-icon-btn>
|
|
10
|
+
</template>
|
|
11
|
+
{{ copied ? copiedTooltip : copyTooltip }}
|
|
12
|
+
</wt-tooltip>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import copy from 'clipboard-copy';
|
|
17
|
+
|
|
18
|
+
let copiedIdTimeout = null;
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'wt-copy-action',
|
|
22
|
+
data: () => ({
|
|
23
|
+
copied: false,
|
|
24
|
+
}),
|
|
25
|
+
props: {
|
|
26
|
+
value: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
tooltips: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => ({
|
|
32
|
+
copy: '',
|
|
33
|
+
copied: '',
|
|
34
|
+
}),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
copyTooltip() {
|
|
39
|
+
return this.tooltips.copy || this.$t('webitelUI.copyAction.copy');
|
|
40
|
+
},
|
|
41
|
+
copiedTooltip() {
|
|
42
|
+
return this.tooltips.copied || this.$t('webitelUI.copyAction.copied');
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
async copy() {
|
|
47
|
+
try {
|
|
48
|
+
await copy(this.value);
|
|
49
|
+
this.copied = this.value;
|
|
50
|
+
if (copiedIdTimeout) window.clearTimeout(copiedIdTimeout);
|
|
51
|
+
copiedIdTimeout = setTimeout(() => {
|
|
52
|
+
this.copied = null;
|
|
53
|
+
}, 1500);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
throw err;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style lang="scss" scoped>
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtDatepicker from '../wt-datepicker.vue';
|
|
3
|
+
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
+
import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
|
|
5
|
+
|
|
6
|
+
describe('WtDatepicker', () => {
|
|
7
|
+
it('renders a component', () => {
|
|
8
|
+
const wrapper = shallowMount(WtDatepicker, {
|
|
9
|
+
stubs: {
|
|
10
|
+
WtLabel,
|
|
11
|
+
WtIcon,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
expect(wrapper.classes('wt-datepicker')).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('renders label text when passed', () => {
|
|
18
|
+
const label = 'Hello there';
|
|
19
|
+
const wrapper = shallowMount(WtDatepicker, {
|
|
20
|
+
stubs: {
|
|
21
|
+
WtLabel,
|
|
22
|
+
WtIcon,
|
|
23
|
+
},
|
|
24
|
+
propsData: { label },
|
|
25
|
+
});
|
|
26
|
+
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
27
|
+
});
|
|
28
|
+
});
|