@webitel/ui-sdk 0.1.13 → 0.1.100
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/README.md +29 -29
- 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/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/index.js +120 -0
- package/dist/img/sprite/lock.svg +3 -0
- package/dist/img/sprite/logout.svg +3 -0
- package/dist/img/sprite/menu.svg +3 -0
- package/dist/img/sprite/messenger-facebook.svg +3 -0
- package/dist/img/sprite/messenger-infobip.svg +9 -0
- package/dist/img/sprite/messenger-telegram.svg +6 -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.svg +4 -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/play.svg +4 -0
- package/dist/img/sprite/plus.svg +3 -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/tick.svg +3 -0
- package/dist/img/sprite/upload.svg +5 -0
- package/dist/img/sprite/video-off.svg +4 -0
- package/dist/img/sprite/video.svg +3 -0
- package/dist/img/sprite/widget-avg-hold.svg +3 -0
- package/dist/img/sprite/widget-avg-talk.svg +8 -0
- package/dist/img/sprite/widget-handles.svg +4 -0
- package/dist/img/sprite/widget-inbound.svg +6 -0
- package/dist/img/sprite/widget-missed.svg +5 -0
- package/dist/img/sprite/widget-occupancy.svg +5 -0
- package/dist/img/sprite/widget-utilization.svg +6 -0
- package/dist/img/sprite/zoom-in.svg +3 -0
- package/dist/img/sprite/zoom-out.svg +3 -0
- package/dist/ui-sdk.common.js +8729 -4165
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +8729 -4165
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +3 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +64 -42
- package/src/components/atoms/wt-badge/__tests__/WtBadge.spec.js +19 -0
- package/src/components/atoms/wt-badge/wt-badge.vue +23 -0
- package/src/components/atoms/wt-button/__tests__/WtButton.spec.js +29 -0
- package/src/components/atoms/wt-button/wt-button.vue +211 -0
- package/src/components/atoms/wt-context-menu/__tests__/WtContextMenu.spec.js +43 -0
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +78 -0
- package/src/components/atoms/wt-divider/__tests__/WtDivider.spec.js +9 -0
- package/src/components/atoms/wt-divider/wt-divider.vue +25 -0
- package/src/components/atoms/wt-icon/__tests__/WtIcon.spec.js +24 -0
- package/src/components/atoms/wt-icon/wt-icon.vue +134 -0
- package/src/components/atoms/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
- package/src/components/atoms/wt-indicator/wt-indicator.vue +81 -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 +35 -0
- 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 +189 -0
- package/src/components/atoms/wt-loader/wt-loader.vue +34 -0
- package/src/components/atoms/wt-rounded-action/__tests__/WtRoundedAction.spec.js +20 -0
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +227 -0
- package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +29 -0
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +54 -0
- package/src/components/index.js +102 -0
- package/src/components/molecules/wt-button-select/__tests__/WtButtonSelect.spec.js +63 -0
- package/src/components/molecules/wt-button-select/wt-button-select.vue +187 -0
- package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +175 -0
- package/src/components/molecules/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +209 -0
- package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +67 -0
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +314 -0
- package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +31 -0
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +113 -0
- package/src/components/molecules/wt-input/__tests__/WtInput.spec.js +25 -0
- package/src/components/molecules/wt-input/wt-input.vue +342 -0
- package/src/components/molecules/wt-label/__tests__/WtLabel.spec.js +9 -0
- package/src/components/molecules/wt-label/wt-label.vue +87 -0
- package/src/components/molecules/wt-notification/__tests__/WtNotification.spec.js +21 -0
- package/src/components/molecules/wt-notification/wt-notification.vue +74 -0
- package/src/components/molecules/wt-popup/__tests__/WtPopup.spec.js +47 -0
- package/src/components/molecules/wt-popup/wt-popup.vue +130 -0
- package/src/components/molecules/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
- package/src/components/molecules/wt-progress-bar/wt-progress-bar.vue +80 -0
- package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +42 -0
- package/src/components/molecules/wt-radio/wt-radio.vue +168 -0
- package/src/components/molecules/wt-search-bar/__tests__/WtSearchBar.spec.js +36 -0
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +205 -0
- package/src/components/molecules/wt-select/__tests__/WtSelect.spec.js +53 -0
- package/src/components/molecules/wt-select/wt-select.vue +553 -0
- package/src/components/molecules/wt-slider/__tests__/WtSlider.spec.js +9 -0
- package/src/components/molecules/wt-slider/wt-slider.vue +175 -0
- package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
- package/src/components/molecules/wt-switcher/wt-switcher.vue +177 -0
- package/src/components/molecules/wt-tabs/__tests__/WtTabs.spec.js +36 -0
- package/src/components/molecules/wt-tabs/wt-tabs.vue +127 -0
- package/src/components/molecules/wt-tags-input/__tests__/WtTagsInput.spec.js +45 -0
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +295 -0
- package/src/components/molecules/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
- package/src/components/molecules/wt-textarea/wt-textarea.vue +185 -0
- package/src/components/molecules/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
- package/src/components/molecules/wt-time-input/wt-time-input.vue +192 -0
- package/src/components/molecules/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +176 -0
- 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 +23 -0
- package/src/components/organisms/wt-app-header/wt-app-navigator.vue +245 -0
- package/src/components/organisms/wt-app-header/wt-header-actions.vue +177 -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 +46 -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 +249 -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 +60 -0
- package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +38 -0
- package/src/components/organisms/wt-pagination/wt-pagination.vue +134 -0
- package/src/components/organisms/wt-player/__tests__/WtPlayer.spec.js +9 -0
- package/src/components/organisms/wt-player/wt-player.vue +139 -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 +110 -0
- package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +133 -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 +18 -0
- package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +19 -0
- package/src/components/organisms/wt-table/wt-table.vue +241 -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 +90 -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 +116 -0
- package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
- package/src/components/transitions/expand-transition.vue +70 -0
- package/src/css/colors/_colors.scss +151 -67
- package/src/css/components/_components.scss +41 -25
- package/src/css/components/atoms/wt-badge/_variables.scss +6 -5
- package/src/css/components/atoms/wt-badge/wt-badge.scss +40 -8
- package/src/css/components/atoms/wt-button/_variables.scss +45 -46
- package/src/css/components/atoms/wt-context-menu/_variables.scss +10 -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 +18 -0
- package/src/css/components/atoms/wt-input-info/_variables.scss +6 -5
- package/src/css/components/atoms/wt-label/_variables.scss +4 -4
- package/src/css/components/atoms/wt-loader/_variables.scss +7 -7
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +30 -0
- package/src/css/components/atoms/wt-tooltip/_variables.scss +9 -9
- package/src/css/components/molecules/wt-button-select/_variables.scss +21 -0
- package/src/css/components/molecules/wt-checkbox/_variables.scss +3 -3
- package/src/css/components/molecules/wt-datepicker/_variables.scss +20 -20
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +101 -100
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +11 -11
- 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-notification/_variables.scss +9 -9
- package/src/css/components/molecules/wt-popup/_variables.scss +11 -10
- 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 +3 -3
- package/src/css/components/molecules/wt-select/_variables.scss +25 -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 +13 -13
- package/src/css/components/molecules/wt-tags-input/_variables.scss +25 -0
- package/src/css/components/molecules/wt-textarea/_variables.scss +4 -4
- package/src/css/components/molecules/wt-timepicker/_variables.scss +4 -3
- package/src/css/components/organisms/wt-app-header/_variables.scss +20 -0
- package/src/css/components/organisms/wt-headline/_variables.scss +7 -0
- package/src/css/components/organisms/wt-navigation-bar/_variables.scss +14 -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 +6 -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 +4 -0
- package/src/css/display-helpers/_display-helpers.scss +21 -0
- package/src/css/fonts/_fonts.scss +9 -0
- package/src/css/main.scss +67 -65
- package/src/css/shadows/_shadows.scss +7 -0
- package/src/css/sizes/_sizes.scss +2 -0
- package/src/css/sizes/_spacing.scss +33 -0
- package/src/css/sizes/_viewport-breakpoints.scss +20 -0
- package/src/css/styleguide/{styleguide.scss → _styleguide.scss} +4 -3
- package/src/css/styleguide/scroll.scss +43 -40
- package/src/css/transitions/_transitions.scss +1 -0
- package/src/css/transitions/fade/_fade.scss +8 -0
- package/src/css/typography/_typography.scss +72 -72
- package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +41 -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 +192 -0
- package/src/locale/i18n.js +2 -0
- package/src/locale/ru/ru.js +192 -2
- package/src/locale/ua/ua.js +217 -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 +41 -0
- package/src/modules/CSVExport/CSVExport.js +88 -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/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-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-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 +36 -0
- package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +34 -0
- package/src/modules/QueryFilters/mixins/enumFilterMixin.js +46 -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 +50 -0
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +83 -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 +170 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +57 -0
- package/src/modules/Userinfo/components/the-auth.vue +75 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +112 -0
- package/src/scripts/__tests__/caseConverters.spec.js +72 -0
- package/src/scripts/__tests__/convertDuration.spec.js +21 -0
- package/src/scripts/__tests__/debounce.spec.js +15 -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 +77 -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/dist/img/arrow-down--active--md.7b60f2fb6090366652124f77c543a516.svg +0 -3
- package/dist/img/arrow-down--disabled--md.f58424cd673258365e78863edd1e92cc.svg +0 -3
- package/dist/img/arrow-down--md.1843b60e1c244e066a650e8d19ea83c9.svg +0 -3
- package/dist/img/calendar--active--md.7fd3d949ec7234a4940ea452d95b4165.svg +0 -6
- package/dist/img/calendar--disabled--md.8e7a1e18f93ae8af270060400e6f881c.svg +0 -3
- package/dist/img/calendar--md.9c265581c3a405ff0f0e46e8092f36b8.svg +0 -6
- 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
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
class="wt-rounded-action"
|
|
4
|
+
:class="[
|
|
5
|
+
colorClass,
|
|
6
|
+
`wt-rounded-action--${size}`,
|
|
7
|
+
{
|
|
8
|
+
'wt-rounded-action--disabled': disabled,
|
|
9
|
+
}
|
|
10
|
+
]"
|
|
11
|
+
type="button"
|
|
12
|
+
:disabled="disabled"
|
|
13
|
+
@click="$emit('click', $event)"
|
|
14
|
+
>
|
|
15
|
+
<wt-loader v-if="loading" size="sm" :color="loaderColor"/>
|
|
16
|
+
<slot v-else>
|
|
17
|
+
<wt-icon
|
|
18
|
+
:icon="icon"
|
|
19
|
+
:color="computeIconColor"
|
|
20
|
+
></wt-icon>
|
|
21
|
+
</slot>
|
|
22
|
+
</button>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
name: 'wt-rounded-action',
|
|
28
|
+
props: {
|
|
29
|
+
icon: {
|
|
30
|
+
type: String,
|
|
31
|
+
},
|
|
32
|
+
color: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
iconColor: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'md',
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
loading: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
colorClass() {
|
|
55
|
+
if (!this.disabled) return `${this.color}`;
|
|
56
|
+
return '';
|
|
57
|
+
},
|
|
58
|
+
computeIconColor() {
|
|
59
|
+
if (this.iconColor) return this.iconColor;
|
|
60
|
+
switch (this.colorClass) {
|
|
61
|
+
case 'secondary':
|
|
62
|
+
return 'default';
|
|
63
|
+
case 'success':
|
|
64
|
+
return 'contrast';
|
|
65
|
+
case 'transfer':
|
|
66
|
+
return 'contrast';
|
|
67
|
+
case 'danger':
|
|
68
|
+
return 'contrast';
|
|
69
|
+
default:
|
|
70
|
+
return 'active';
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
loaderColor() {
|
|
74
|
+
if (['success', 'transfer', 'danger'].includes(this.color)) return 'main';
|
|
75
|
+
return 'contrast';
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<!--not scoped to change .icon colors-->
|
|
82
|
+
<style lang="scss" scoped>
|
|
83
|
+
.wt-rounded-action {
|
|
84
|
+
position: relative;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
border: var(--rounded-action-border);
|
|
89
|
+
color: var(--rounded-action-dark-font-color);
|
|
90
|
+
background: var(--rounded-action-primary-color);
|
|
91
|
+
border-color: var(--rounded-action-primary-color);
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
transition: var(--transition);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
|
|
96
|
+
&--sm {
|
|
97
|
+
width: var(--rounded-action-size--sm);
|
|
98
|
+
height: var(--rounded-action-size--sm);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--md {
|
|
102
|
+
width: var(--rounded-action-size--md);
|
|
103
|
+
height: var(--rounded-action-size--md);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--lg {
|
|
107
|
+
width: var(--rounded-action-size--lg);
|
|
108
|
+
height: var(--rounded-action-size--lg);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media screen and (max-width: 1336px) {
|
|
112
|
+
.wt-icon.sm {
|
|
113
|
+
width: 14px;
|
|
114
|
+
height: 14px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.wt-icon.md {
|
|
118
|
+
width: 20px;
|
|
119
|
+
height: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.wt-icon.lg {
|
|
123
|
+
width: 25px;
|
|
124
|
+
height: 25px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&--sm {
|
|
128
|
+
width: calc(var(--rounded-action-size--sm) * 0.8);
|
|
129
|
+
height: calc(var(--rounded-action-size--sm) * 0.8);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&--md {
|
|
133
|
+
width: calc(var(--rounded-action-size--md) * 0.8);
|
|
134
|
+
height: calc(var(--rounded-action-size--md) * 0.8);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&--lg {
|
|
138
|
+
width: calc(var(--rounded-action-size--lg) * 0.8);
|
|
139
|
+
height: calc(var(--rounded-action-size--lg) * 0.8);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&--disabled {
|
|
144
|
+
color: var(--text--disabled-color);
|
|
145
|
+
background: var(--rounded-action-disabled-bg-color);
|
|
146
|
+
border-color: var(--disabled-color);
|
|
147
|
+
cursor: auto;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
|
|
150
|
+
.wt-icon ::v-deep .wt-icon__icon {
|
|
151
|
+
fill: var(--icon-color-disabled);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
background: var(--rounded-action-primary--hover-color);
|
|
157
|
+
border-color: var(--rounded-action-primary--hover-color);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.active,
|
|
161
|
+
&:active {
|
|
162
|
+
background: var(--rounded-action-primary--hover-color);
|
|
163
|
+
border-color: var(--rounded-action-primary--hover-color);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.secondary {
|
|
167
|
+
border-color: var(--rounded-action-secondary-color);
|
|
168
|
+
background: var(--rounded-action-secondary-bg-color);
|
|
169
|
+
|
|
170
|
+
&:hover{
|
|
171
|
+
border-color: var(--rounded-action-secondary--hover-color);
|
|
172
|
+
background: var(--rounded-action-secondary-bg-color);
|
|
173
|
+
|
|
174
|
+
.wt-icon ::v-deep .wt-icon__icon {
|
|
175
|
+
fill: var(--icon-color--hover);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&.active,
|
|
180
|
+
&:active {
|
|
181
|
+
color: var(--text-primary-color);
|
|
182
|
+
border-color: var(--rounded-action-secondary--active-color);
|
|
183
|
+
background: var(--rounded-action-secondary-bg-color);
|
|
184
|
+
|
|
185
|
+
.wt-icon ::v-deep .wt-icon__icon {
|
|
186
|
+
fill: var(--icon-color-active);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&.success {
|
|
192
|
+
color: var(--text-contrast-color);
|
|
193
|
+
background: var(--rounded-action-true-color);
|
|
194
|
+
border-color: var(--rounded-action-true-color);
|
|
195
|
+
|
|
196
|
+
&:hover,
|
|
197
|
+
&:active {
|
|
198
|
+
background: var(--rounded-action-true--hover-color);
|
|
199
|
+
border-color: var(--rounded-action-true--hover-color);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&.transfer {
|
|
204
|
+
color: var(--text-contrast-color);
|
|
205
|
+
background: var(--rounded-action-transfer-color);
|
|
206
|
+
border-color: var(--rounded-action-transfer-color);
|
|
207
|
+
|
|
208
|
+
&:hover,
|
|
209
|
+
&:active {
|
|
210
|
+
background: var(--rounded-action-transfer--hover-color);
|
|
211
|
+
border-color: var(--rounded-action-transfer--hover-color);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&.danger {
|
|
216
|
+
color: var(--text-contrast-color);
|
|
217
|
+
background: var(--rounded-action-false-color);
|
|
218
|
+
border-color: var(--rounded-action-false-color);
|
|
219
|
+
|
|
220
|
+
&:hover,
|
|
221
|
+
&:active {
|
|
222
|
+
background: var(--rounded-action-false--hover-color);
|
|
223
|
+
border-color: var(--rounded-action-false--hover-color);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtTooltip from '../wt-tooltip.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtTooltip', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtTooltip);
|
|
7
|
+
expect(wrapper.classes('wt-tooltip')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders a component text, if passed', () => {
|
|
11
|
+
const content = 'Hello there!';
|
|
12
|
+
const wrapper = shallowMount(WtTooltip, {
|
|
13
|
+
slots: {
|
|
14
|
+
default: content,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-tooltip').text()).toEqual(content);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('changed tooltip color, if prop is passed', () => {
|
|
21
|
+
const wrapper = shallowMount(WtTooltip, {
|
|
22
|
+
propsData: {
|
|
23
|
+
contrast: true,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
expect(wrapper.find('.wt-tooltip').classes())
|
|
27
|
+
.toContain('wt-tooltip--contrast');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="wt-tooltip"
|
|
4
|
+
:class="{
|
|
5
|
+
'wt-tooltip--visible': visible,
|
|
6
|
+
'wt-tooltip--contrast': contrast
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</span>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: 'wt-tooltip',
|
|
16
|
+
props: {
|
|
17
|
+
visible: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
contrast: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped>
|
|
30
|
+
.wt-tooltip {
|
|
31
|
+
@extend %typo-body-lg;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
padding: var(--tooltip-padding);
|
|
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
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import WtIcon from './atoms/wt-icon/wt-icon.vue';
|
|
3
|
+
import WtIndicator from './atoms/wt-indicator/wt-indicator.vue';
|
|
4
|
+
import WtInputInfo from './atoms/wt-input-info/wt-input-info.vue';
|
|
5
|
+
import WtButton from './atoms/wt-button/wt-button.vue';
|
|
6
|
+
import WtBadge from './atoms/wt-badge/wt-badge.vue';
|
|
7
|
+
import WtDivider from './atoms/wt-divider/wt-divider.vue';
|
|
8
|
+
import WtTooltip from './atoms/wt-tooltip/wt-tooltip.vue';
|
|
9
|
+
import WtRoundedAction from './atoms/wt-rounded-action/wt-rounded-action.vue';
|
|
10
|
+
import WtLoader from './atoms/wt-loader/wt-loader.vue';
|
|
11
|
+
import WtContextMenu from './atoms/wt-context-menu/wt-context-menu.vue';
|
|
12
|
+
|
|
13
|
+
import WtCheckbox from './molecules/wt-checkbox/wt-checkbox.vue';
|
|
14
|
+
import WtDatepicker from './molecules/wt-datepicker/wt-datepicker.vue';
|
|
15
|
+
import WtDatetimepicker from './molecules/wt-datetimepicker/wt-datetimepicker.vue';
|
|
16
|
+
import WtIconBtn from './molecules/wt-icon-btn/wt-icon-btn.vue';
|
|
17
|
+
import WtInput from './molecules/wt-input/wt-input.vue';
|
|
18
|
+
import WtNotification from './molecules/wt-notification/wt-notification.vue';
|
|
19
|
+
import WtPopup from './molecules/wt-popup/wt-popup.vue';
|
|
20
|
+
import WtProgressBar from './molecules/wt-progress-bar/wt-progress-bar.vue';
|
|
21
|
+
import WtRadio from './molecules/wt-radio/wt-radio.vue';
|
|
22
|
+
import WtSearchBar from './molecules/wt-search-bar/wt-search-bar.vue';
|
|
23
|
+
import WtSelect from './molecules/wt-select/wt-select.vue';
|
|
24
|
+
import WtSlider from './molecules/wt-slider/wt-slider.vue';
|
|
25
|
+
import WtSwitcher from './molecules/wt-switcher/wt-switcher.vue';
|
|
26
|
+
import WtTabs from './molecules/wt-tabs/wt-tabs.vue';
|
|
27
|
+
import WtTagsInput from './molecules/wt-tags-input/wt-tags-input.vue';
|
|
28
|
+
import WtTimeInput from './molecules/wt-time-input/wt-time-input.vue';
|
|
29
|
+
import WtTextarea from './molecules/wt-textarea/wt-textarea.vue';
|
|
30
|
+
import WtTimepicker from './molecules/wt-timepicker/wt-timepicker.vue';
|
|
31
|
+
import WtLabel from './molecules/wt-label/wt-label.vue';
|
|
32
|
+
import WtButtonSelect from './molecules/wt-button-select/wt-button-select.vue';
|
|
33
|
+
|
|
34
|
+
import WtAppHeader from './organisms/wt-app-header/wt-app-header.vue';
|
|
35
|
+
import WtAppNavigator from './organisms/wt-app-header/wt-app-navigator.vue';
|
|
36
|
+
import WtFiltersPanelWrapper from './organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue';
|
|
37
|
+
import WtHeaderActions from './organisms/wt-app-header/wt-header-actions.vue';
|
|
38
|
+
import WtErrorPage from './organisms/wt-error-page/wt-error-page.vue';
|
|
39
|
+
import WtHeadline from './organisms/wt-headline/wt-headline.vue';
|
|
40
|
+
import WtNavigationBar from './organisms/wt-navigation-bar/wt-navigation-bar.vue';
|
|
41
|
+
import WtNotificationsBar from './organisms/wt-notifications-bar/wt-notifications-bar.vue';
|
|
42
|
+
import WtPageWrapper from './organisms/wt-page-wrapper/wt-page-wrapper.vue';
|
|
43
|
+
import WtPagination from './organisms/wt-pagination/wt-pagination.vue';
|
|
44
|
+
import WtPlayer from './organisms/wt-player/wt-player.vue';
|
|
45
|
+
import WtStatusSelect from './organisms/wt-status-select/wt-status-select.vue';
|
|
46
|
+
import WtTable from './organisms/wt-table/wt-table.vue';
|
|
47
|
+
import WtTableActions from './organisms/wt-table-actions/wt-table-actions.vue';
|
|
48
|
+
import WtTableColumnSelect from './organisms/wt-table-column-select/wt-table-column-select.vue';
|
|
49
|
+
|
|
50
|
+
const Components = {
|
|
51
|
+
WtIcon,
|
|
52
|
+
WtIndicator,
|
|
53
|
+
WtInputInfo,
|
|
54
|
+
WtButton,
|
|
55
|
+
WtBadge,
|
|
56
|
+
WtDivider,
|
|
57
|
+
WtTooltip,
|
|
58
|
+
WtLabel,
|
|
59
|
+
WtLoader,
|
|
60
|
+
WtRoundedAction,
|
|
61
|
+
WtCheckbox,
|
|
62
|
+
WtDatepicker,
|
|
63
|
+
WtDatetimepicker,
|
|
64
|
+
WtIconBtn,
|
|
65
|
+
WtInput,
|
|
66
|
+
WtNotification,
|
|
67
|
+
WtPopup,
|
|
68
|
+
WtProgressBar,
|
|
69
|
+
WtRadio,
|
|
70
|
+
WtSearchBar,
|
|
71
|
+
WtSelect,
|
|
72
|
+
WtSlider,
|
|
73
|
+
WtSwitcher,
|
|
74
|
+
WtTabs,
|
|
75
|
+
WtTagsInput,
|
|
76
|
+
WtTimeInput,
|
|
77
|
+
WtTimepicker,
|
|
78
|
+
WtTextarea,
|
|
79
|
+
WtAppHeader,
|
|
80
|
+
WtHeadline,
|
|
81
|
+
WtNavigationBar,
|
|
82
|
+
WtAppNavigator,
|
|
83
|
+
WtFiltersPanelWrapper,
|
|
84
|
+
WtHeaderActions,
|
|
85
|
+
WtErrorPage,
|
|
86
|
+
WtNotificationsBar,
|
|
87
|
+
WtPageWrapper,
|
|
88
|
+
WtPagination,
|
|
89
|
+
WtPlayer,
|
|
90
|
+
WtStatusSelect,
|
|
91
|
+
WtTable,
|
|
92
|
+
WtTableActions,
|
|
93
|
+
WtTableColumnSelect,
|
|
94
|
+
WtButtonSelect,
|
|
95
|
+
WtContextMenu,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
Object.keys(Components).forEach((name) => {
|
|
99
|
+
Vue.component(name, Components[name]);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export default Components;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtSelectButton from '../wt-button-select.vue';
|
|
3
|
+
import WtContextMenu from '../../../atoms/wt-context-menu/wt-context-menu.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtSelectButton', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtSelectButton);
|
|
8
|
+
expect(wrapper.classes('wt-button-select')).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('renders a button content via default slot', () => {
|
|
12
|
+
const content = 'button content';
|
|
13
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
14
|
+
slots: {
|
|
15
|
+
default: content,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.wt-button-select__button').text()).toBe(content);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('context-menu is invisible at start', () => {
|
|
22
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
23
|
+
stubs: { WtContextMenu },
|
|
24
|
+
});
|
|
25
|
+
expect(wrapper.findComponent(WtContextMenu).classes('wt-context-menu--hidden')).toBe(true);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('toggles isOpened, if select-btn is clicked', async () => {
|
|
29
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
30
|
+
stubs: { WtContextMenu },
|
|
31
|
+
});
|
|
32
|
+
wrapper.find('.wt-button-select__select-btn').vm.$emit('click');
|
|
33
|
+
await wrapper.vm.$nextTick();
|
|
34
|
+
expect(wrapper.findComponent(WtContextMenu).element.classList[1]).toBe(undefined);
|
|
35
|
+
|
|
36
|
+
wrapper.find('.wt-button-select__select-btn').vm.$emit('click');
|
|
37
|
+
await wrapper.vm.$nextTick();
|
|
38
|
+
expect(wrapper.findComponent(WtContextMenu).element.classList[1]).toBe('wt-context-menu--hidden');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('hides context-menu on its click event', async () => {
|
|
42
|
+
const isOpened = true;
|
|
43
|
+
const options = ['1', '2'];
|
|
44
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
45
|
+
stubs: { WtContextMenu },
|
|
46
|
+
data: () => ({ isOpened }),
|
|
47
|
+
propsData: { options },
|
|
48
|
+
});
|
|
49
|
+
wrapper.findComponent({ name: 'WtContextMenu' }).vm.$emit('click', { option: '1' });
|
|
50
|
+
await wrapper.vm.$nextTick();
|
|
51
|
+
expect(wrapper.findComponent({ name: 'WtContextMenu' }).classes()).toContain('wt-context-menu--hidden');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should rotate the arrow', () => {
|
|
55
|
+
const wrapper = shallowMount(WtSelectButton, {
|
|
56
|
+
data: () => ({
|
|
57
|
+
isOpened: true,
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
const wtIcon = wrapper.find('.wt-button-select__select-arrow');
|
|
61
|
+
expect(wtIcon.classes()).toContain('wt-button-select__select-arrow--active');
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,187 @@
|
|
|
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-button
|
|
16
|
+
class="wt-button-select__select-btn"
|
|
17
|
+
v-bind="$attrs"
|
|
18
|
+
:disabled="disabled"
|
|
19
|
+
:loading="false"
|
|
20
|
+
@click="isOpened = !isOpened"
|
|
21
|
+
>
|
|
22
|
+
<wt-icon
|
|
23
|
+
class="wt-button-select__select-arrow"
|
|
24
|
+
:class="{'wt-button-select__select-arrow--active': isOpened}"
|
|
25
|
+
icon="arrow-down"
|
|
26
|
+
:disabled="disabled"
|
|
27
|
+
></wt-icon>
|
|
28
|
+
</wt-button>
|
|
29
|
+
|
|
30
|
+
<wt-context-menu
|
|
31
|
+
:visible="isOpened"
|
|
32
|
+
:options="options"
|
|
33
|
+
@click="selectOption"
|
|
34
|
+
></wt-context-menu>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
export default {
|
|
40
|
+
name: 'wt-button-select',
|
|
41
|
+
data: () => ({
|
|
42
|
+
isOpened: false,
|
|
43
|
+
}),
|
|
44
|
+
props: {
|
|
45
|
+
// all buttons props are passed as "$attrs"
|
|
46
|
+
options: {
|
|
47
|
+
type: Array,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
selectOption({ option, index }) {
|
|
57
|
+
this.$emit('click:option', option, index);
|
|
58
|
+
this.isOpened = false;
|
|
59
|
+
},
|
|
60
|
+
away() {
|
|
61
|
+
this.isOpened = false;
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
</script>
|
|
66
|
+
<style lang="scss" scoped>
|
|
67
|
+
.wt-button-select {
|
|
68
|
+
position: relative;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: var(--button-select-buttons-gap);
|
|
72
|
+
|
|
73
|
+
.wt-context-menu {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: calc(100% + 1px);
|
|
76
|
+
left: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.wt-button-select__button {
|
|
81
|
+
padding: var(--button-select-button-padding);
|
|
82
|
+
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.wt-button-select__select-btn {
|
|
86
|
+
padding: var(--button-select-icon-button-padding);
|
|
87
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
88
|
+
|
|
89
|
+
// NORMAL MODE
|
|
90
|
+
&:not(.wt-button--outline)::v-deep {
|
|
91
|
+
& .wt-icon__icon {
|
|
92
|
+
fill: var(--button-select-icon-color-dark);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// For secondary color, the icon color and icon hover color are the same as in primary color mode
|
|
96
|
+
|
|
97
|
+
&.danger,
|
|
98
|
+
&.success,
|
|
99
|
+
&.transfer {
|
|
100
|
+
.wt-icon__icon {
|
|
101
|
+
fill: var(--button-select-icon-color-ligth);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//OUTLINE MODE
|
|
107
|
+
&.wt-button--outline::v-deep {
|
|
108
|
+
& .wt-icon__icon {
|
|
109
|
+
fill: var(--button-select-icon-color-primary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:hover,
|
|
113
|
+
&:active {
|
|
114
|
+
.wt-icon__icon {
|
|
115
|
+
fill: var(--button-select-icon-color-primary--hover);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.danger {
|
|
120
|
+
& .wt-icon__icon {
|
|
121
|
+
fill: var(--icon-color-danger)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:hover,
|
|
125
|
+
&:active {
|
|
126
|
+
.wt-icon__icon {
|
|
127
|
+
fill: var(--button-select-icon-color-danger--hover);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.success {
|
|
133
|
+
& .wt-icon__icon {
|
|
134
|
+
fill: var(--icon-color-success)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:hover,
|
|
138
|
+
&:active {
|
|
139
|
+
.wt-icon__icon {
|
|
140
|
+
fill: var(--button-select-icon-color-success--hover);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.transfer {
|
|
146
|
+
& .wt-icon__icon {
|
|
147
|
+
fill: var(--icon-color-transfer)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:hover,
|
|
151
|
+
&:active {
|
|
152
|
+
.wt-icon__icon {
|
|
153
|
+
fill: var(--button-select-icon-color-transfer--hover);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.secondary {
|
|
159
|
+
.wt-icon__icon {
|
|
160
|
+
fill: var(--button-select-icon-color-secondary);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:hover,
|
|
164
|
+
&:active {
|
|
165
|
+
.wt-icon__icon {
|
|
166
|
+
fill: var(--button-select-icon-color-secondary--hover);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// DISABLED MODE
|
|
173
|
+
&.wt-button--disabled .wt-icon::v-deep .wt-icon__icon {
|
|
174
|
+
fill: var(--icon-color-disabled);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// OPEN AND SHUT ARROW
|
|
178
|
+
.wt-button-select__select-arrow {
|
|
179
|
+
display: flex;
|
|
180
|
+
transform: rotate(0);
|
|
181
|
+
|
|
182
|
+
&--active {
|
|
183
|
+
transform: rotate(180deg);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
</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__wrapper').trigger('click');
|
|
39
|
+
expect(wrapper.emitted().change.pop()).toEqual([!selected]);
|
|
40
|
+
});
|
|
41
|
+
});
|