@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,192 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="wt-time-input"
|
|
4
|
+
:class="{
|
|
5
|
+
'wt-time-input--outline': outline,
|
|
6
|
+
'wt-time-input--disabled': disabled,
|
|
7
|
+
'wt-time-input--invalid': invalid,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<wt-label
|
|
11
|
+
v-if="hasLabel"
|
|
12
|
+
:for="name"
|
|
13
|
+
:outline="outline"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
:invalid="invalid"
|
|
16
|
+
v-bind="labelProps"
|
|
17
|
+
>
|
|
18
|
+
<!-- @slot Custom input label -->
|
|
19
|
+
<slot name="label" v-bind="{ label }">{{ label }}</slot>
|
|
20
|
+
</wt-label>
|
|
21
|
+
<div class="wt-time-input__wrapper">
|
|
22
|
+
<input
|
|
23
|
+
:id="name"
|
|
24
|
+
class="wt-time-input__input"
|
|
25
|
+
:value="value"
|
|
26
|
+
:min="0"
|
|
27
|
+
:max="maxValue"
|
|
28
|
+
:disabled="disabled"
|
|
29
|
+
type="number"
|
|
30
|
+
v-on="listeners"
|
|
31
|
+
>
|
|
32
|
+
</div>
|
|
33
|
+
<wt-input-info
|
|
34
|
+
v-if="showInfo"
|
|
35
|
+
:invalid="invalid"
|
|
36
|
+
>{{ validationText }}
|
|
37
|
+
</wt-input-info>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import validationMixin from '../../../mixins/validationMixin/validationMixin';
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: 'wt-time-input',
|
|
46
|
+
mixins: [validationMixin],
|
|
47
|
+
props: {
|
|
48
|
+
/**
|
|
49
|
+
* Current input value (`v-model`)
|
|
50
|
+
*/
|
|
51
|
+
value: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 0,
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Form input label
|
|
57
|
+
*/
|
|
58
|
+
label: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Form input name
|
|
64
|
+
*/
|
|
65
|
+
name: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Time type: day, minute, second
|
|
71
|
+
*/
|
|
72
|
+
maxValue: {
|
|
73
|
+
type: Number,
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Native input required attribute
|
|
77
|
+
*/
|
|
78
|
+
required: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false,
|
|
81
|
+
description: 'Native input required attribute',
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Native input disabled attribute
|
|
85
|
+
*/
|
|
86
|
+
disabled: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false,
|
|
89
|
+
description: 'Native input disabled attribute',
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
outline: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
labelProps: {
|
|
98
|
+
type: Object,
|
|
99
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
hideInputInfo: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
computed: {
|
|
108
|
+
hasLabel() {
|
|
109
|
+
return !!(this.label || this.$slots.label);
|
|
110
|
+
},
|
|
111
|
+
listeners() {
|
|
112
|
+
return {
|
|
113
|
+
...this.$listeners,
|
|
114
|
+
input: (event) => this.$emit('input', event.target.value),
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
showInfo() {
|
|
118
|
+
return this.isValidation && !this.hideInputInfo;
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<style lang="scss" scoped>
|
|
125
|
+
.wt-time-input {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
cursor: text;
|
|
128
|
+
|
|
129
|
+
&--disabled {
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.wt-time-input__wrapper {
|
|
135
|
+
position: relative;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.wt-label {
|
|
139
|
+
text-align: center;
|
|
140
|
+
margin-bottom: var(--label-margin);
|
|
141
|
+
cursor: text;
|
|
142
|
+
|
|
143
|
+
.wt-time-input:hover &,
|
|
144
|
+
.wt-time-input:focus-within & {
|
|
145
|
+
color: var(--form-label--hover-color);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.wt-time-input--invalid:hover &,
|
|
149
|
+
.wt-time-input--invalid:focus-within & {
|
|
150
|
+
color: var(--label--invalid-color);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.wt-time-input__input {
|
|
155
|
+
@extend %typo-body-lg;
|
|
156
|
+
|
|
157
|
+
display: block;
|
|
158
|
+
width: 100%;
|
|
159
|
+
box-sizing: border-box;
|
|
160
|
+
padding: var(--input-padding);
|
|
161
|
+
color: var(--form-input-color);
|
|
162
|
+
border: var(--input-border);
|
|
163
|
+
border-color: var(--form-border-color);
|
|
164
|
+
border-radius: var(--border-radius);
|
|
165
|
+
transition: var(--transition);
|
|
166
|
+
|
|
167
|
+
.wt-time-input:hover &,
|
|
168
|
+
&:focus {
|
|
169
|
+
border-color: var(--form-border--hover-color);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.wt-time-input--outline & {
|
|
173
|
+
border-color: var(--form-outline-border-color);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.wt-time-input--outline:hover &,
|
|
177
|
+
.wt-time-input--outline &:focus {
|
|
178
|
+
border-color: var(--form-outline-border--hover-color);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.wt-time-input--disabled & {
|
|
182
|
+
background: var(--form-border--disabled-color);
|
|
183
|
+
border-color: var(--form-border--disabled-color);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.wt-time-input--invalid &,
|
|
187
|
+
.wt-time-input--invalid:hover & {
|
|
188
|
+
border-color: var(--false-color);
|
|
189
|
+
outline: none; // prevent outline overlapping false color
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtTimepicker from '../wt-timepicker.vue';
|
|
3
|
+
import WtTimeInput from '../../wt-time-input/wt-time-input.vue';
|
|
4
|
+
|
|
5
|
+
describe('WtTimepicker', () => {
|
|
6
|
+
it('renders a component', () => {
|
|
7
|
+
const wrapper = shallowMount(WtTimepicker, {
|
|
8
|
+
stubs: {
|
|
9
|
+
WtTimeInput: true,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
expect(wrapper.classes('wt-timepicker')).toBe(true);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('renders only specified by format time inputs', () => {
|
|
16
|
+
const wrapper = shallowMount(WtTimepicker, {
|
|
17
|
+
stubs: {
|
|
18
|
+
WtTimeInput,
|
|
19
|
+
},
|
|
20
|
+
propsData: { format: 'mm' },
|
|
21
|
+
});
|
|
22
|
+
expect(wrapper.findAllComponents(WtTimeInput).length).toBe(1);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('Correctly converts value from MIN time-input to output', () => {
|
|
26
|
+
const value = 0;
|
|
27
|
+
const wrapper = shallowMount(WtTimepicker, {
|
|
28
|
+
stubs: {
|
|
29
|
+
WtTimeInput,
|
|
30
|
+
},
|
|
31
|
+
propsData: { value },
|
|
32
|
+
});
|
|
33
|
+
wrapper.findAllComponents(WtTimeInput).at(0).vm.$emit('input', 21);
|
|
34
|
+
expect(wrapper.emitted().input[0]).toEqual([21 * 60 * 60]);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('Correctly converts value from HOUR time-input to output', () => {
|
|
38
|
+
const value = 0;
|
|
39
|
+
const wrapper = shallowMount(WtTimepicker, {
|
|
40
|
+
stubs: {
|
|
41
|
+
WtTimeInput,
|
|
42
|
+
},
|
|
43
|
+
propsData: { value },
|
|
44
|
+
});
|
|
45
|
+
wrapper.findAllComponents(WtTimeInput).at(1).vm.$emit('input', 21);
|
|
46
|
+
expect(wrapper.emitted().input[0]).toEqual([21 * 60]);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('Correctly converts value from SEC time-input to output', () => {
|
|
50
|
+
const value = 0;
|
|
51
|
+
const wrapper = shallowMount(WtTimepicker, {
|
|
52
|
+
stubs: {
|
|
53
|
+
WtTimeInput,
|
|
54
|
+
},
|
|
55
|
+
propsData: { value },
|
|
56
|
+
});
|
|
57
|
+
wrapper.findAllComponents(WtTimeInput).at(2).vm.$emit('input', 21);
|
|
58
|
+
expect(wrapper.emitted().input[0]).toEqual([21]);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wt-timepicker" :class="{'wt-timepicker--invalid': invalid}">
|
|
3
|
+
<wt-label
|
|
4
|
+
v-if="label"
|
|
5
|
+
:invalid="invalid"
|
|
6
|
+
v-bind="labelProps"
|
|
7
|
+
>
|
|
8
|
+
{{ `${label} (${format})` }}
|
|
9
|
+
</wt-label>
|
|
10
|
+
<div class="wt-timepicker__wrapper">
|
|
11
|
+
<wt-time-input
|
|
12
|
+
v-if="isHour"
|
|
13
|
+
v-model="hour"
|
|
14
|
+
:v="v"
|
|
15
|
+
:label="label ? null : $t('webitelUI.timepicker.hour') "
|
|
16
|
+
:maxValue="dateMode ? null : 23"
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
hide-input-info
|
|
19
|
+
></wt-time-input>
|
|
20
|
+
<wt-time-input
|
|
21
|
+
v-if="isMin"
|
|
22
|
+
v-model="min"
|
|
23
|
+
:v="v"
|
|
24
|
+
:label="label ? null : $t('webitelUI.timepicker.min')"
|
|
25
|
+
:maxValue="59"
|
|
26
|
+
:disabled="disabled"
|
|
27
|
+
hide-input-info
|
|
28
|
+
></wt-time-input>
|
|
29
|
+
<wt-time-input
|
|
30
|
+
v-if="isSec"
|
|
31
|
+
v-model="sec"
|
|
32
|
+
:v="v"
|
|
33
|
+
:label="label ? null : $t('webitelUI.timepicker.sec')"
|
|
34
|
+
:maxValue="59"
|
|
35
|
+
:disabled="disabled"
|
|
36
|
+
hide-input-info
|
|
37
|
+
></wt-time-input>
|
|
38
|
+
</div>
|
|
39
|
+
<wt-input-info
|
|
40
|
+
v-if="isValidation"
|
|
41
|
+
:invalid="invalid"
|
|
42
|
+
>{{ validationText }}
|
|
43
|
+
</wt-input-info>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import validationMixin from '../../../mixins/validationMixin/validationMixin';
|
|
49
|
+
|
|
50
|
+
const SEC_IN_HOUR = 60 * 60;
|
|
51
|
+
const SEC_IN_MIN = 60;
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
name: 'wt-timepicker',
|
|
55
|
+
mixins: [validationMixin],
|
|
56
|
+
props: {
|
|
57
|
+
value: {
|
|
58
|
+
type: [String, Number],
|
|
59
|
+
default: 0,
|
|
60
|
+
},
|
|
61
|
+
dateMode: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
label: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
format: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: 'hh:mm:ss',
|
|
72
|
+
},
|
|
73
|
+
disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false,
|
|
76
|
+
},
|
|
77
|
+
labelProps: {
|
|
78
|
+
type: Object,
|
|
79
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
model: {
|
|
83
|
+
prop: 'value',
|
|
84
|
+
event: 'input',
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
computed: {
|
|
88
|
+
isHour() {
|
|
89
|
+
return this.format.includes('hh');
|
|
90
|
+
},
|
|
91
|
+
isMin() {
|
|
92
|
+
return this.format.includes('mm');
|
|
93
|
+
},
|
|
94
|
+
isSec() {
|
|
95
|
+
return this.format.includes('ss');
|
|
96
|
+
},
|
|
97
|
+
hour: {
|
|
98
|
+
get() {
|
|
99
|
+
return this.dateMode
|
|
100
|
+
? new Date(+this.value).getHours()
|
|
101
|
+
: Math.floor(this.value / SEC_IN_HOUR);
|
|
102
|
+
},
|
|
103
|
+
set(value) {
|
|
104
|
+
const newValue = this.dateMode
|
|
105
|
+
? new Date(this.value).setHours(value)
|
|
106
|
+
: this.value - this.hour * SEC_IN_HOUR + value * SEC_IN_HOUR;
|
|
107
|
+
this.$emit('input', newValue);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
min: {
|
|
111
|
+
get() {
|
|
112
|
+
return this.dateMode
|
|
113
|
+
? new Date(+this.value).getMinutes()
|
|
114
|
+
: Math.floor((this.value / SEC_IN_MIN) % 60);
|
|
115
|
+
},
|
|
116
|
+
set(value) {
|
|
117
|
+
const newValue = this.dateMode
|
|
118
|
+
? new Date(this.value).setMinutes(value)
|
|
119
|
+
: this.value - this.min * SEC_IN_MIN + value * SEC_IN_MIN;
|
|
120
|
+
this.$emit('input', newValue);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
sec: {
|
|
124
|
+
get() {
|
|
125
|
+
return this.dateMode
|
|
126
|
+
? new Date(+this.value).getSeconds()
|
|
127
|
+
: Math.floor(this.value % 60);
|
|
128
|
+
},
|
|
129
|
+
set(value) {
|
|
130
|
+
const newValue = this.dateMode
|
|
131
|
+
? new Date(this.value).setSeconds(value)
|
|
132
|
+
: this.value - this.sec + +value;
|
|
133
|
+
this.$emit('input', newValue);
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
methods: {},
|
|
139
|
+
};
|
|
140
|
+
</script>
|
|
141
|
+
|
|
142
|
+
<style lang="scss" scoped>
|
|
143
|
+
.wt-timepicker {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.wt-label {
|
|
149
|
+
margin-bottom: var(--label-margin);
|
|
150
|
+
cursor: text;
|
|
151
|
+
|
|
152
|
+
.wt-timepicker:hover &,
|
|
153
|
+
.wt-timepicker:focus-within & {
|
|
154
|
+
color: var(--form-label--hover-color);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.wt-timepicker--invalid:hover &,
|
|
158
|
+
.wt-timepicker--invalid:focus-within & {
|
|
159
|
+
color: var(--label--invalid-color);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.wt-timepicker__wrapper {
|
|
164
|
+
display: flex;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.wt-time-input {
|
|
168
|
+
width: var(--timepicker-input-width);
|
|
169
|
+
margin-right: var(--timepicker-input-margin);
|
|
170
|
+
|
|
171
|
+
&:last-child {
|
|
172
|
+
margin-right: 0;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtAppHeader from '../wt-app-header.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtAppHeader', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtAppHeader);
|
|
7
|
+
expect(wrapper.classes('wt-app-header')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders a app-header content via default slot', () => {
|
|
11
|
+
const content = 'app header content';
|
|
12
|
+
const wrapper = shallowMount(WtAppHeader, {
|
|
13
|
+
slots: {
|
|
14
|
+
default: content,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-app-header').text()).toBe(content);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WebitelApplications from '../../../../enums/WebitelApplications/WebitelApplications.enum';
|
|
3
|
+
import WtAppNavigator from '../wt-app-navigator.vue';
|
|
4
|
+
|
|
5
|
+
const apps = [
|
|
6
|
+
{ name: WebitelApplications.ADMIN, href: '' },
|
|
7
|
+
{ name: WebitelApplications.HISTORY, href: '' },
|
|
8
|
+
{ name: WebitelApplications.SUPERVISOR, href: '' },
|
|
9
|
+
];
|
|
10
|
+
describe('WtAppNavigator', () => {
|
|
11
|
+
it('renders a component', () => {
|
|
12
|
+
const wrapper = shallowMount(WtAppNavigator);
|
|
13
|
+
expect(wrapper.classes('wt-app-navigator')).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
it('renders specified app cards', () => {
|
|
16
|
+
const wrapper = shallowMount(WtAppNavigator, {
|
|
17
|
+
propsData: {
|
|
18
|
+
apps,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
expect(wrapper.findAll('.wt-app-navigator__card').length).toBe(3);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtHeaderActions from '../wt-header-actions.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtHeaderActions', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtHeaderActions);
|
|
7
|
+
expect(wrapper.classes('wt-header-actions')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders user data', () => {
|
|
11
|
+
const user = {
|
|
12
|
+
name: 'user nanme',
|
|
13
|
+
account: 'acc@ou.nt',
|
|
14
|
+
};
|
|
15
|
+
const wrapper = shallowMount(WtHeaderActions, {
|
|
16
|
+
propsData: { user },
|
|
17
|
+
});
|
|
18
|
+
expect(wrapper.find('.wt-header-actions__name').text()).toBe(user.name);
|
|
19
|
+
expect(wrapper.find('.wt-header-actions__account').text()).toBe(user.account);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="wt-app-header">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</header>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'wt-app-header',
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style lang="scss" scoped>
|
|
14
|
+
.wt-app-header {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: flex-end;
|
|
18
|
+
min-height: var(--wt-app-header-min-height); // fixed height because anything can be put inside slot, so padding won't work properly
|
|
19
|
+
padding: var(--wt-app-header-padding);
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
background: var(--header-color);
|
|
22
|
+
}
|
|
23
|
+
</style>
|