@webitel/ui-sdk 0.1.3 → 0.1.4-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 +18538 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -0
- package/dist/ui-sdk.umd.js +18557 -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 -45
- 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 +62 -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 -15091
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wt-load-bar">
|
|
3
|
+
<span :style="`width: ${this.progressWidth}%;`" class="wt-load-bar__progress"></span>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'wt-load-bar',
|
|
10
|
+
props: {
|
|
11
|
+
max: {
|
|
12
|
+
type: [Number, String],
|
|
13
|
+
default: 100,
|
|
14
|
+
},
|
|
15
|
+
value: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 0,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
progress() {
|
|
22
|
+
return (this.value * 100) / this.max;
|
|
23
|
+
},
|
|
24
|
+
progressWidth() {
|
|
25
|
+
return this.isOverflow ? 100 : this.progress;
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
.wt-load-bar {
|
|
33
|
+
position: relative;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
width: 100%;
|
|
36
|
+
padding: var(--load-bar-padding);
|
|
37
|
+
line-height: 0;
|
|
38
|
+
border: 1px solid var(--accent-color);
|
|
39
|
+
border-radius: var(--border-radius);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.wt-load-bar__progress {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
height: var(--load-bar-height);
|
|
45
|
+
transition: var(--transition);
|
|
46
|
+
border-radius: var(--load-bar-border-radius);
|
|
47
|
+
background: var(--accent-color);
|
|
48
|
+
will-change: width;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtNotification from '../wt-notification.vue';
|
|
3
|
+
import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtNotification', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtNotification, {
|
|
8
|
+
stubs: { WtIcon },
|
|
9
|
+
});
|
|
10
|
+
expect(wrapper.classes('wt-notification')).toBe(true);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('renders message via default slot', () => {
|
|
14
|
+
const content = 'Hello there';
|
|
15
|
+
const wrapper = shallowMount(WtNotification, {
|
|
16
|
+
stubs: { WtIcon },
|
|
17
|
+
slots: { default: content },
|
|
18
|
+
});
|
|
19
|
+
expect(wrapper.find('.wt-notification__text').text()).toBe(content);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
></wt-icon>
|
|
11
11
|
|
|
12
12
|
<p class="wt-notification__text">
|
|
13
|
-
|
|
13
|
+
<slot></slot>
|
|
14
14
|
</p>
|
|
15
15
|
</article>
|
|
16
16
|
</template>
|
|
@@ -20,23 +20,23 @@
|
|
|
20
20
|
export default {
|
|
21
21
|
name: 'wt-notification',
|
|
22
22
|
props: {
|
|
23
|
-
|
|
24
|
-
type:
|
|
25
|
-
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'info',
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
29
|
notificationIcon() {
|
|
30
|
-
switch (this.
|
|
31
|
-
case 'info': return '
|
|
30
|
+
switch (this.type) {
|
|
31
|
+
case 'info': return 'done';
|
|
32
32
|
case 'error': return 'attention';
|
|
33
33
|
default: return '';
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
notificationIconColor() {
|
|
37
|
-
switch (this.
|
|
38
|
-
case 'info': return '
|
|
39
|
-
case 'error': return '
|
|
37
|
+
switch (this.type) {
|
|
38
|
+
case 'info': return 'success';
|
|
39
|
+
case 'error': return 'danger';
|
|
40
40
|
default: return '';
|
|
41
41
|
}
|
|
42
42
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
<style lang="scss" scoped>
|
|
48
48
|
.wt-notification {
|
|
49
|
-
@extend %typo-body-
|
|
49
|
+
@extend %typo-body-1;
|
|
50
50
|
@include width-fit-content;
|
|
51
51
|
|
|
52
52
|
position: relative;
|
|
@@ -58,11 +58,12 @@
|
|
|
58
58
|
color: var(--notification-text-color);
|
|
59
59
|
background: var(--notification-bg-color);
|
|
60
60
|
border-radius: var(--border-radius);
|
|
61
|
-
box-shadow: var(--
|
|
61
|
+
box-shadow: var(--elevation-1);
|
|
62
62
|
cursor: pointer;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.wt-notification__icon {
|
|
66
|
+
flex: 0 0 var(--icon-md-size);
|
|
66
67
|
margin-right: var(--notification-icon-margin);
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtPopup from '../wt-popup.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtPopup', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtPopup, {
|
|
7
|
+
stubs: { WtIconBtn: true },
|
|
8
|
+
});
|
|
9
|
+
expect(wrapper.classes('wt-popup')).toBe(true);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('renders popup header via header slot', () => {
|
|
13
|
+
const content = 'Popup header';
|
|
14
|
+
const wrapper = shallowMount(WtPopup, {
|
|
15
|
+
stubs: { WtIconBtn: true },
|
|
16
|
+
slots: { header: content },
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.wt-popup__header').text()).toBe(content);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('renders popup header via title slot', () => {
|
|
22
|
+
const content = 'Popup title';
|
|
23
|
+
const wrapper = shallowMount(WtPopup, {
|
|
24
|
+
stubs: { WtIconBtn: true },
|
|
25
|
+
slots: { title: content },
|
|
26
|
+
});
|
|
27
|
+
expect(wrapper.find('.wt-popup__title').text()).toBe(content);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('renders popup main via main slot', () => {
|
|
31
|
+
const content = 'Popup main content';
|
|
32
|
+
const wrapper = shallowMount(WtPopup, {
|
|
33
|
+
stubs: { WtIconBtn: true },
|
|
34
|
+
slots: { main: content },
|
|
35
|
+
});
|
|
36
|
+
expect(wrapper.find('.wt-popup__main').text()).toBe(content);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('renders popup actions via actions slot', () => {
|
|
40
|
+
const content = 'Popup actions';
|
|
41
|
+
const wrapper = shallowMount(WtPopup, {
|
|
42
|
+
stubs: { WtIconBtn: true },
|
|
43
|
+
slots: { actions: content },
|
|
44
|
+
});
|
|
45
|
+
expect(wrapper.find('.wt-popup__actions').text()).toBe(content);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div
|
|
3
|
+
:class="{ 'wt-popup--overflow': overflow }"
|
|
4
|
+
class="wt-popup"
|
|
5
|
+
>
|
|
6
|
+
<aside
|
|
7
|
+
:style="popupStyle"
|
|
8
|
+
class="wt-popup__popup"
|
|
9
|
+
>
|
|
5
10
|
<header class="wt-popup__header">
|
|
6
|
-
<slot name="header"
|
|
11
|
+
<slot name="header">
|
|
12
|
+
<h3 class="wt-popup__title">
|
|
13
|
+
<slot name="title"></slot>
|
|
14
|
+
</h3>
|
|
15
|
+
</slot>
|
|
7
16
|
<wt-icon-btn
|
|
8
17
|
class="wt-popup__close-btn"
|
|
9
|
-
icon="
|
|
10
|
-
|
|
11
|
-
color="outline"
|
|
12
|
-
@click.native="$emit('close')"
|
|
18
|
+
icon="close"
|
|
19
|
+
@click="$emit('close')"
|
|
13
20
|
></wt-icon-btn>
|
|
14
21
|
</header>
|
|
15
|
-
<section class="wt-popup__main">
|
|
22
|
+
<section v-if="$slots.main" class="wt-popup__main">
|
|
16
23
|
<slot name="main"></slot>
|
|
17
24
|
</section>
|
|
18
|
-
<footer class="wt-popup__actions">
|
|
25
|
+
<footer v-if="$slots.actions" class="wt-popup__actions">
|
|
19
26
|
<slot name="actions"></slot>
|
|
20
27
|
</footer>
|
|
21
28
|
</aside>
|
|
@@ -23,67 +30,104 @@
|
|
|
23
30
|
</template>
|
|
24
31
|
|
|
25
32
|
<script>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
export default {
|
|
34
|
+
name: 'wt-popup',
|
|
35
|
+
props: {
|
|
36
|
+
minWidth: {
|
|
37
|
+
type: [Number, String],
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
type: [Number, String],
|
|
41
|
+
},
|
|
42
|
+
overflow: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
popupStyle() {
|
|
49
|
+
let style = '';
|
|
50
|
+
style += this.minWidth ? `min-width: ${this.minWidth}px;` : '';
|
|
51
|
+
style += this.width ? `width: ${this.width}px;` : '';
|
|
52
|
+
return style;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
29
56
|
</script>
|
|
30
57
|
|
|
31
58
|
<style lang="scss" scoped>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
.wt-popup {
|
|
60
|
+
position: fixed;
|
|
61
|
+
z-index: var(--popup-wrapper-z-index);
|
|
62
|
+
top: 0;
|
|
63
|
+
right: 0;
|
|
64
|
+
bottom: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
background: var(--popup-shadow-color);
|
|
70
|
+
}
|
|
39
71
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
72
|
+
.wt-popup__popup {
|
|
73
|
+
z-index: 1;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
max-height: var(--popup-max-height);
|
|
77
|
+
margin: var(--popup-padding);
|
|
78
|
+
padding: var(--popup-padding);
|
|
79
|
+
border-radius: var(--border-radius);
|
|
80
|
+
background: var(--popup-bg-color);
|
|
81
|
+
box-shadow: var(--elevation-10);
|
|
82
|
+
gap: var(--popup-sections-gap);
|
|
83
|
+
}
|
|
51
84
|
|
|
52
|
-
|
|
53
|
-
|
|
85
|
+
.wt-popup__header {
|
|
86
|
+
@extend %typo-subtitle-1;
|
|
87
|
+
position: relative;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
padding: var(--popup-header-padding);
|
|
92
|
+
border-radius: var(--border-radius);
|
|
93
|
+
background: var(--popup-header-bg-color);
|
|
94
|
+
gap: var(--popup-header-padding);
|
|
54
95
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
max-height: var(--popup-max-height);
|
|
59
|
-
padding: var(--popup-padding);
|
|
60
|
-
background: var(--popup-bg-color);
|
|
61
|
-
transform: translate(-50%, -50%);
|
|
62
|
-
border-radius: var(--border-radius);
|
|
63
|
-
box-shadow: var(--box-shadow);
|
|
64
|
-
overflow-y: auto;
|
|
65
|
-
z-index: 1;
|
|
96
|
+
.wt-popup__title {
|
|
97
|
+
flex-grow: 1;
|
|
98
|
+
font: inherit;
|
|
66
99
|
}
|
|
67
100
|
|
|
68
|
-
.wt-
|
|
69
|
-
|
|
70
|
-
padding: var(--popup-header-padding);
|
|
71
|
-
|
|
72
|
-
.wt-popup__close-btn {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
}
|
|
101
|
+
.wt-popup__close-btn {
|
|
102
|
+
flex: 0 0 var(--icon-md-size);
|
|
77
103
|
}
|
|
104
|
+
}
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
106
|
+
.wt-popup__main {
|
|
107
|
+
@extend %wt-scrollbar;
|
|
108
|
+
@extend %typo-body-1;
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
min-height: 0;
|
|
112
|
+
padding-right: var(--popup-main-section-padding-right);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.wt-popup__actions {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
padding: var(--popup-actions-padding);
|
|
120
|
+
gap: var(--popup-actions-padding);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.wt-popup--overflow {
|
|
124
|
+
.wt-popup__popup {
|
|
125
|
+
overflow: visible;
|
|
81
126
|
}
|
|
82
127
|
|
|
83
|
-
.wt-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
align-items: center;
|
|
87
|
-
padding: var(--popup-actions-padding);
|
|
128
|
+
.wt-popup__main {
|
|
129
|
+
overflow: visible;
|
|
130
|
+
padding-right: 0;
|
|
88
131
|
}
|
|
132
|
+
}
|
|
89
133
|
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtProgressBar from '../wt-progress-bar.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtProgressBar', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtProgressBar);
|
|
7
|
+
expect(wrapper.exists()).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
it('isOverflow correctly computes overflow=true', () => {
|
|
10
|
+
const wrapper = shallowMount(WtProgressBar, { propsData: { value: 2, max: 1 } });
|
|
11
|
+
expect(wrapper.vm.isOverflow).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
it('isOverflow correctly computes overflow=false', () => {
|
|
14
|
+
const wrapper = shallowMount(WtProgressBar, { propsData: { value: 0.99, max: 1 } });
|
|
15
|
+
expect(wrapper.vm.isOverflow).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wt-progress-bar" :class="[{
|
|
3
|
+
'wt-progress-bar--overflow': isOverflow,
|
|
4
|
+
},
|
|
5
|
+
`wt-progress-bar--${color}`
|
|
6
|
+
]">
|
|
7
|
+
<span class="wt-progress-bar__progress" :style="`width: ${this.progressWidth}%;`"></span>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'wt-progress-bar',
|
|
14
|
+
props: {
|
|
15
|
+
max: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 100,
|
|
18
|
+
},
|
|
19
|
+
value: {
|
|
20
|
+
type: [Number, String],
|
|
21
|
+
default: 0,
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'primary',
|
|
26
|
+
options: ['primary', 'secondary', 'success', 'danger'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
progress() {
|
|
31
|
+
return (this.value * 100) / this.max;
|
|
32
|
+
},
|
|
33
|
+
isOverflow() {
|
|
34
|
+
return this.progress >= 100;
|
|
35
|
+
},
|
|
36
|
+
progressWidth() {
|
|
37
|
+
return this.isOverflow ? 100 : this.progress;
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
.wt-progress-bar {
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
width: 100%;
|
|
47
|
+
position: relative;
|
|
48
|
+
padding: var(--progress-bar-padding);
|
|
49
|
+
line-height: 0;
|
|
50
|
+
border-radius: var(--border-radius);
|
|
51
|
+
box-shadow: var(--elevation-1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.wt-progress-bar__progress {
|
|
55
|
+
display: inline-block;
|
|
56
|
+
height: var(--progress-bar-height);
|
|
57
|
+
will-change: width;
|
|
58
|
+
background: var(--accent-color);
|
|
59
|
+
border-radius: var(--progress-bar-border-radius) 0 0 var(--progress-bar-border-radius);
|
|
60
|
+
transition: var(--transition);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wt-progress-bar--primary .wt-progress-bar__progress {
|
|
64
|
+
background: var(--progress-bar-bg-color--primary);
|
|
65
|
+
}
|
|
66
|
+
.wt-progress-bar--secondary .wt-progress-bar__progress {
|
|
67
|
+
background: var(--progress-bar-bg-color--secondary);
|
|
68
|
+
}
|
|
69
|
+
.wt-progress-bar--success .wt-progress-bar__progress {
|
|
70
|
+
background: var(--progress-bar-bg-color--success);
|
|
71
|
+
}
|
|
72
|
+
.wt-progress-bar--danger .wt-progress-bar__progress {
|
|
73
|
+
background: var(--progress-bar-bg-color--danger);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.wt-progress-bar--overflow .wt-progress-bar__progress {
|
|
77
|
+
border-radius: var(--progress-bar-border-radius);
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtRadio from '../wt-radio.vue';
|
|
3
|
+
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
+
import WtIcon from '../../../atoms/wt-icon/wt-icon.vue';
|
|
5
|
+
|
|
6
|
+
describe('WtRadio', () => {
|
|
7
|
+
it('renders a component', () => {
|
|
8
|
+
const wrapper = shallowMount(WtRadio, {
|
|
9
|
+
stubs: {
|
|
10
|
+
WtLabel,
|
|
11
|
+
WtIcon,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
expect(wrapper.classes('wt-radio')).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('renders label text when passed', () => {
|
|
18
|
+
const label = 'Hello there';
|
|
19
|
+
const wrapper = shallowMount(WtRadio, {
|
|
20
|
+
stubs: {
|
|
21
|
+
WtLabel,
|
|
22
|
+
WtIcon,
|
|
23
|
+
},
|
|
24
|
+
propsData: { label },
|
|
25
|
+
});
|
|
26
|
+
expect(wrapper.find('.wt-radio__label').text()).toBe(label);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('toggles passed value at click', () => {
|
|
30
|
+
const selected = '';
|
|
31
|
+
const value = 'jest';
|
|
32
|
+
const wrapper = shallowMount(WtRadio, {
|
|
33
|
+
stubs: {
|
|
34
|
+
WtLabel,
|
|
35
|
+
WtIcon,
|
|
36
|
+
},
|
|
37
|
+
propsData: { selected, value },
|
|
38
|
+
});
|
|
39
|
+
wrapper.find('.wt-radio__input').trigger('input');
|
|
40
|
+
expect(wrapper.emitted().input[0]).toEqual([value]);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
:disabled="disabled"
|
|
17
17
|
@input="inputHandler"
|
|
18
18
|
>
|
|
19
|
-
<span class="wt-radio__checkmark">
|
|
20
19
|
<wt-icon :icon="radioIcon"></wt-icon>
|
|
21
|
-
</span>
|
|
22
20
|
<!-- @slot Custom input label -->
|
|
23
21
|
<slot name="label" v-bind="{ label, isChecked, disabled }">
|
|
24
22
|
<div v-if="label" class="wt-radio__label">{{ label }}</div>
|
|
@@ -33,12 +31,12 @@
|
|
|
33
31
|
props: {
|
|
34
32
|
// value, set by radio
|
|
35
33
|
value: {
|
|
36
|
-
type: String,
|
|
34
|
+
type: [String, Number, Boolean],
|
|
37
35
|
default: '',
|
|
38
36
|
},
|
|
39
37
|
// currently selected value
|
|
40
38
|
selected: {
|
|
41
|
-
type: String,
|
|
39
|
+
type: [String, Number, Boolean],
|
|
42
40
|
default: '',
|
|
43
41
|
},
|
|
44
42
|
label: {
|
|
@@ -83,6 +81,10 @@
|
|
|
83
81
|
.wt-radio {
|
|
84
82
|
@include width-fit-content;
|
|
85
83
|
box-sizing: border-box;
|
|
84
|
+
|
|
85
|
+
.wt-label {
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
}
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
.wt-radio__wrapper {
|
|
@@ -113,7 +115,7 @@
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
::v-deep .wt-icon__icon {
|
|
116
|
-
fill: var(--icon--hover
|
|
118
|
+
fill: var(--icon-color--hover);
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -123,7 +125,7 @@
|
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
::v-deep .wt-icon__icon {
|
|
126
|
-
fill: var(--icon
|
|
128
|
+
fill: var(--icon-color-active);
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
|
|
@@ -162,7 +164,7 @@
|
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
::v-deep .wt-icon__icon {
|
|
165
|
-
fill: var(--icon
|
|
167
|
+
fill: var(--icon-color-disabled);
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtSearchBar from '../wt-search-bar.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtSearchBar', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtSearchBar, {
|
|
7
|
+
stubs: {
|
|
8
|
+
WtIcon: true,
|
|
9
|
+
WtIconBtn: true,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
expect(wrapper.classes('wt-search-bar')).toBe(true);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('debounces search event when debounce prop is true', async () => {
|
|
16
|
+
const props = {
|
|
17
|
+
value: '',
|
|
18
|
+
debounce: true,
|
|
19
|
+
debounceDelay: 100,
|
|
20
|
+
};
|
|
21
|
+
const wrapper = shallowMount(WtSearchBar, {
|
|
22
|
+
stubs: {
|
|
23
|
+
WtIcon: true,
|
|
24
|
+
WtIconBtn: true,
|
|
25
|
+
},
|
|
26
|
+
props,
|
|
27
|
+
});
|
|
28
|
+
props.value = 'val';
|
|
29
|
+
wrapper.setProps(props);
|
|
30
|
+
expect(wrapper.emitted().search).toBeFalsy();
|
|
31
|
+
await setTimeout(() => {
|
|
32
|
+
expect(wrapper.emitted().search[0].length).toBe(1);
|
|
33
|
+
}, 1000);
|
|
34
|
+
});
|
|
35
|
+
});
|