@webitel/ui-sdk 0.1.3-vue3 → 0.1.4-vite
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/img/sprite/arrow-mix.svg +5 -0
- package/dist/img/sprite/azure.svg +19 -0
- package/dist/img/sprite/email.svg +3 -0
- package/dist/img/sprite/index.js +1 -1
- package/dist/img/sprite/meta.svg +17 -0
- package/dist/img/sprite/options.svg +5 -0
- package/dist/img/sprite/role.svg +3 -0
- package/dist/img/sprite/scorecard.svg +4 -0
- package/dist/img/sprite/user.svg +3 -0
- package/dist/ui-sdk.common.js +36397 -11631
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +36402 -11636
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +27 -4
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +24 -8
- package/src/api/axios/generateInstance.js +25 -0
- package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.js +6 -0
- package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +9 -0
- package/src/api/defaults/index.js +7 -0
- package/src/api/interceptors/request/updateToken.interceptor.js +10 -0
- package/src/api/interceptors/response/handleUnauthorized.interceptor.js +12 -0
- package/src/api/transformers/applyTransform.js +8 -0
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +4 -0
- package/src/api/transformers/generateUrl/generateUrl.transformer.js +13 -0
- package/src/api/transformers/index.js +23 -0
- package/src/api/transformers/log/log.transformer.js +6 -0
- package/src/api/transformers/merge/merge.transformer.js +5 -0
- package/src/api/transformers/mergeEach/mergeEach.transformer.js +8 -0
- package/src/api/transformers/notify/notify.transformer.js +32 -0
- package/src/api/transformers/sanitize/sanitize.transformer.js +12 -0
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +4 -0
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +12 -0
- package/src/components/index.js +63 -55
- package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +48 -0
- package/src/components/transitions/wt-expand-transition.vue +41 -39
- package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppNavigator.spec.js +2 -2
- package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtHeaderActions.spec.js +1 -1
- package/src/{css/components/organisms → components}/wt-app-header/_variables.scss +3 -2
- package/src/components/wt-app-header/wt-app-header.vue +29 -0
- package/src/components/{organisms/wt-app-header → wt-app-header}/wt-app-navigator.vue +69 -40
- package/src/components/wt-avatar/_variables.scss +32 -0
- package/src/components/wt-avatar/wt-avatar.vue +187 -0
- package/src/components/{atoms/wt-badge → wt-badge}/wt-badge.vue +20 -13
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/{atoms/wt-button → wt-button}/__tests__/WtButton.spec.js +1 -1
- package/src/components/wt-button/_variables.scss +41 -0
- package/src/components/wt-button/wt-button.vue +205 -0
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/{molecules/wt-button-select → wt-button-select}/__tests__/WtButtonSelect.spec.js +16 -5
- package/src/components/wt-button-select/_variables.scss +7 -0
- package/src/components/wt-button-select/wt-button-select.vue +130 -0
- package/src/components/{molecules/wt-checkbox → wt-checkbox}/__tests__/WtCheckbox.spec.js +6 -6
- package/src/components/wt-checkbox/wt-checkbox.vue +191 -0
- package/src/{css/components/atoms → components}/wt-chip/wt-chip.scss +1 -1
- package/src/components/wt-chip/wt-chip.vue +24 -0
- package/src/components/{atoms/wt-context-menu → wt-context-menu}/__tests__/WtContextMenu.spec.js +1 -1
- package/src/{css/components/atoms → components}/wt-context-menu/_variables.scss +2 -0
- package/src/components/{atoms/wt-context-menu → wt-context-menu}/wt-context-menu.vue +68 -42
- package/src/components/{molecules/wt-datepicker → wt-datepicker}/__tests__/WtDatepicker.spec.js +4 -4
- package/src/components/wt-datepicker/_variables.scss +56 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +240 -0
- package/src/components/wt-divider/wt-divider.vue +30 -0
- package/src/components/wt-dummy/__tests__/WtDummy.spec.js +9 -0
- package/src/components/wt-dummy/wt-dummy.vue +73 -0
- package/src/components/{organisms/wt-error-page → wt-error-page}/__tests__/wt-error-page.spec.js +3 -3
- package/src/components/{organisms/wt-error-page → wt-error-page}/wt-error-page.vue +2 -2
- package/src/components/wt-expansion-panel/__tests__/WtExpansionPanel.spec.js +9 -0
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +67 -0
- package/src/components/{organisms/wt-filters-panel-wrapper → wt-filters-panel-wrapper}/wt-filters-panel-wrapper.vue +6 -6
- package/src/components/{organisms/wt-headline → wt-headline}/wt-headline.vue +5 -0
- package/src/components/wt-headline-nav/Readme.md +9 -0
- package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/__tests__/wt-headline-nav.spec.js +1 -1
- package/src/components/wt-headline-nav/_variables.scss +8 -0
- package/src/components/{organisms/wt-headline-nav → wt-headline-nav}/wt-headline-nav.vue +41 -29
- package/src/components/{molecules/wt-hint → wt-hint}/wt-hint.vue +7 -1
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/{atoms/wt-icon → wt-icon}/__tests__/WtIcon.spec.js +2 -2
- package/src/components/wt-icon/_variables.scss +31 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon/wt-icon.vue +172 -0
- package/src/components/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtAddIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtDownloadIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtHistoryIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/__tests__/WtRefreshIconAction.spec.js +9 -0
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +27 -0
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +27 -0
- package/src/components/wt-icon-action/wt-icon-action.vue +54 -0
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/{molecules/wt-icon-btn → wt-icon-btn}/__tests__/WtIconBtn.spec.js +2 -2
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +47 -0
- package/src/components/{atoms/wt-indicator → wt-indicator}/__tests__/WtIndicator.spec.js +2 -2
- package/src/{css/components/atoms → components}/wt-indicator/_variables.scss +3 -3
- package/src/components/{atoms/wt-indicator → wt-indicator}/wt-indicator.vue +5 -0
- package/src/components/{molecules/wt-input → wt-input}/__tests__/WtInput.spec.js +3 -3
- package/src/components/{molecules/wt-input → wt-input}/wt-input.vue +40 -20
- package/src/{css/components/atoms → components}/wt-input-info/_variables.scss +2 -2
- package/src/components/wt-input-info/wt-input-info.vue +40 -0
- package/src/components/wt-item-link/__tests__/WtItemLink.spec.js +9 -0
- package/src/components/wt-item-link/wt-item-link.vue +57 -0
- package/src/components/{molecules/wt-label → wt-label}/wt-label.vue +5 -0
- package/src/components/{molecules/wt-load-bar → wt-load-bar}/wt-load-bar.vue +7 -2
- package/src/{css/components/atoms → components}/wt-loader/_variables.scss +2 -2
- package/src/components/{atoms/wt-loader → wt-loader}/wt-loader.vue +22 -17
- package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/__tests__/WtNavigationBar.spec.js +22 -18
- package/src/components/{organisms/wt-navigation-bar → wt-navigation-bar}/wt-navigation-bar.vue +27 -16
- package/src/components/{molecules/wt-notification → wt-notification}/__tests__/WtNotification.spec.js +1 -1
- package/src/components/wt-notification/wt-notification.vue +86 -0
- package/src/components/{organisms/wt-notifications-bar → wt-notifications-bar}/__tests__/WtNotificationsBar.spec.js +6 -6
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +78 -0
- package/src/components/wt-page-header/__tests__/wt-page-header.spec.js +9 -0
- package/src/components/wt-page-header/wt-page-header.vue +83 -0
- package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/wt-page-wrapper.vue +6 -0
- package/src/components/{organisms/wt-pagination → wt-pagination}/__tests__/WtPagination.spec.js +2 -1
- package/src/components/{organisms/wt-pagination → wt-pagination}/wt-pagination.vue +7 -1
- package/src/{css/components/organisms → components}/wt-player/_variables.scss +1 -1
- package/src/components/{organisms/wt-player → wt-player}/wt-player.vue +10 -5
- package/src/components/{molecules/wt-popup → wt-popup}/wt-popup.vue +5 -0
- package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/__tests__/WtProgressBar.spec.js +2 -2
- package/src/{css/components/molecules → components}/wt-progress-bar/_variables.scss +2 -2
- package/src/components/{molecules/wt-progress-bar → wt-progress-bar}/wt-progress-bar.vue +13 -3
- package/src/components/{molecules/wt-radio → wt-radio}/__tests__/WtRadio.spec.js +6 -6
- package/src/components/wt-radio/wt-radio.vue +180 -0
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/{atoms/wt-rounded-action → wt-rounded-action}/__tests__/WtRoundedAction.spec.js +1 -1
- package/src/components/wt-rounded-action/_variables.scss +14 -0
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -0
- package/src/components/{molecules/wt-search-bar → wt-search-bar}/__tests__/WtSearchBar.spec.js +9 -0
- package/src/components/wt-search-bar/wt-search-bar.vue +222 -0
- package/src/components/{molecules/wt-select → wt-select}/__tests__/WtSelect.spec.js +3 -3
- package/src/components/{molecules/wt-select → wt-select}/mixins/__tests__/multiselectMixin.spec.js +4 -4
- package/src/components/{molecules/wt-select → wt-select}/mixins/multiselectMixin.js +9 -4
- package/src/components/{molecules/wt-select → wt-select}/wt-select.vue +23 -9
- package/src/components/{molecules/wt-slider → wt-slider}/wt-slider.vue +8 -3
- package/src/components/{organisms/wt-status-select → wt-status-select}/__tests__/WtStatusSelect.spec.js +1 -1
- package/src/components/{organisms/wt-status-select → wt-status-select}/_internals/StatusOptions.lookup.js +1 -1
- package/src/components/{organisms/wt-status-select → wt-status-select}/wt-status-select.vue +27 -23
- package/src/components/wt-stepper/__tests__/WtStepper.spec.vue.js +18 -0
- package/src/components/wt-stepper/wt-stepper.vue +89 -0
- package/src/components/{molecules/wt-switcher → wt-switcher}/__tests__/WtSwitcher.spec.js +5 -5
- package/src/components/wt-switcher/wt-switcher.vue +191 -0
- package/src/components/{organisms/wt-table → wt-table}/__tests__/WtTable.spec.js +11 -11
- package/src/components/{organisms/wt-table → wt-table}/wt-table.vue +20 -3
- package/src/components/{organisms/wt-table-actions → wt-table-actions}/wt-table-actions.vue +5 -0
- package/src/components/{organisms/wt-table-column-select → wt-table-column-select}/__tests__/WtTableColumnSelect.spec.js +3 -3
- package/src/components/wt-table-column-select/wt-table-column-select.vue +178 -0
- package/src/components/{molecules/wt-tabs → wt-tabs}/__tests__/WtTabs.spec.js +3 -3
- package/src/{css/components/molecules → components}/wt-tabs/_variables.scss +1 -1
- package/src/components/{molecules/wt-tabs → wt-tabs}/wt-tabs.vue +9 -1
- package/src/components/{molecules/wt-tags-input → wt-tags-input}/__tests__/WtTagsInput.spec.js +7 -7
- package/src/components/{molecules/wt-tags-input → wt-tags-input}/wt-tags-input.vue +18 -7
- package/src/components/{molecules/wt-textarea → wt-textarea}/__tests__/WtTextarea.spec.js +4 -4
- package/src/components/wt-textarea/wt-textarea.vue +223 -0
- package/src/components/{molecules/wt-time-input → wt-time-input}/__tests__/WtTimeInput.spec.js +3 -3
- package/src/components/wt-time-input/wt-time-input.vue +187 -0
- package/src/components/{molecules/wt-timepicker → wt-timepicker}/__tests__/WtTimepicker.spec.js +13 -13
- package/src/components/{molecules/wt-timepicker → wt-timepicker}/wt-timepicker.vue +13 -5
- package/src/components/{atoms/wt-tooltip → wt-tooltip}/__tests__/WtTooltip.spec.js +1 -1
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +68 -0
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +48 -0
- package/src/components/wt-tooltip/_variables.scss +11 -0
- package/src/components/wt-tooltip/wt-tooltip.vue +150 -0
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +14 -0
- package/src/composables/useCachedInterval/useCachedInterval.js +21 -0
- package/src/composables/useDestroyableSortable/useDestroyableSortable.js +66 -0
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +83 -0
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +37 -0
- package/src/css/main.scss +0 -3
- package/src/css/styleguide/colors/_colors.scss +177 -147
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +358 -0
- package/src/directives/clickaway/clickaway.js +3 -0
- package/src/directives/index.js +7 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +4 -0
- package/src/enums/WebitelApplications/AuditorSections.enum.js +5 -0
- package/src/enums/WebitelApplications/CrmSections.enum.js +5 -0
- package/src/enums/WebitelApplications/WebitelApplications.enum.js +1 -0
- package/src/locale/.DS_Store +0 -0
- package/src/locale/en/en.js +96 -13
- package/src/locale/es/es.js +282 -0
- package/src/locale/i18n.js +4 -0
- package/src/locale/ru/ru.js +97 -12
- package/src/locale/ua/ua.js +98 -13
- package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +5 -7
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +17 -13
- package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +23 -31
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +12 -15
- package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +12 -12
- package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +3 -3
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +2 -2
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +5 -5
- package/src/mixins/validationMixin/useValidation.js +41 -0
- package/src/mixins/validationMixin/validationMixin.js +17 -12
- package/src/modules/AgentStatusSelect/api/agent-status.js +24 -0
- package/src/modules/AgentStatusSelect/api/pause-cause.js +47 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +83 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +18 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +122 -0
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +55 -0
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +107 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +60 -0
- package/src/modules/AuditForm/components/__tests__/audit-form-question.spec.js +14 -0
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +70 -0
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +132 -0
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +154 -0
- package/src/modules/AuditForm/components/audit-form-question.vue +136 -0
- package/src/modules/AuditForm/components/audit-form.vue +183 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +24 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +45 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +89 -0
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +97 -0
- package/src/modules/AuditForm/components/questions/score/__tests__/audit-form-question-score.spec.js +30 -0
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +132 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +13 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionSchema.js +8 -0
- package/src/modules/AuditForm/schemas/AuditFormQuestionScoreSchema.js +8 -0
- package/src/modules/CardStoreModule/composables/useCardStore.js +55 -0
- package/src/modules/CardStoreModule/store/CardStoreModule.js +84 -0
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +87 -0
- package/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js +28 -0
- package/src/modules/FilesExport/FilesExport.js +4 -1
- package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -1
- package/src/modules/Filters/classes/BaseFilterSchema.js +13 -0
- package/src/modules/Filters/components/filter-pagination.vue +61 -0
- package/src/modules/Filters/components/filter-table-fields.vue +61 -0
- package/src/modules/Filters/composables/useTableFilters.js +17 -0
- package/src/modules/Filters/restores/filterFieldsRestore.js +9 -0
- package/src/modules/Filters/restores/readme.md +1 -0
- package/src/modules/Filters/store/FiltersStoreModule.js +181 -0
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +12 -12
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +10 -12
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +10 -12
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +1 -1
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +1 -1
- package/src/modules/QueryFilters/components/filter-datetime.vue +4 -3
- package/src/modules/QueryFilters/components/filter-from-to.vue +15 -8
- package/src/modules/QueryFilters/components/filter-table-fields.vue +101 -0
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +11 -11
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +11 -13
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +18 -25
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +14 -9
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +12 -14
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +4 -4
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +21 -8
- package/src/modules/TableStoreModule/composables/useTableStore.js +58 -0
- package/src/modules/TableStoreModule/store/TableStoreModule.js +207 -0
- package/src/modules/Userinfo/api/auth.js +6 -4
- package/src/modules/Userinfo/api/userinfo.js +16 -4
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +27 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +11 -12
- package/src/modules/Userinfo/components/the-auth.vue +1 -1
- package/src/modules/Userinfo/enums/Permissions.enum.js +7 -0
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +41 -1
- package/src/plugins/breakpoint/breakpoint.plugin.js +5 -4
- package/src/scripts/__tests__/updateObject.spec.js +19 -0
- package/src/scripts/caseConverters.js +2 -2
- package/src/scripts/debounce.js +3 -9
- package/src/scripts/eventBus.js +7 -3
- package/src/scripts/updateObject.js +6 -0
- package/src/store/BaseStoreModules/ApiStoreModule.js +93 -0
- package/src/store/ReactiveNowStoreModule/ReactiveNowStoreModule.js +27 -0
- package/src/validators/decimalValidator.js +9 -0
- package/src/validators/domainValidator.js +5 -0
- package/src/components/atoms/wt-avatar/wt-avatar.vue +0 -102
- package/src/components/atoms/wt-button/wt-button.vue +0 -288
- package/src/components/atoms/wt-chip/wt-chip.vue +0 -23
- package/src/components/atoms/wt-divider/wt-divider.vue +0 -25
- package/src/components/atoms/wt-icon/wt-icon.vue +0 -150
- package/src/components/atoms/wt-input-info/wt-input-info.vue +0 -35
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +0 -156
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +0 -48
- package/src/components/molecules/wt-button-select/wt-button-select.vue +0 -184
- package/src/components/molecules/wt-checkbox/wt-checkbox.vue +0 -179
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +0 -203
- package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +0 -79
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +0 -300
- package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +0 -75
- package/src/components/molecules/wt-notification/wt-notification.vue +0 -75
- package/src/components/molecules/wt-radio/wt-radio.vue +0 -170
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +0 -194
- package/src/components/molecules/wt-switcher/wt-switcher.vue +0 -182
- package/src/components/molecules/wt-textarea/wt-textarea.vue +0 -215
- package/src/components/molecules/wt-time-input/wt-time-input.vue +0 -190
- package/src/components/organisms/wt-app-header/wt-app-header.vue +0 -24
- package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +0 -71
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +0 -9
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +0 -9
- package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +0 -21
- package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +0 -22
- package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +0 -120
- package/src/css/components/_components.scss +0 -45
- package/src/css/components/atoms/wt-avatar/_variables.scss +0 -14
- package/src/css/components/atoms/wt-button/_variables.scss +0 -47
- package/src/css/components/atoms/wt-icon/_variables.scss +0 -8
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +0 -7
- package/src/css/components/atoms/wt-tooltip/_variables.scss +0 -29
- package/src/css/components/molecules/wt-button-select/_variables.scss +0 -18
- package/src/css/components/molecules/wt-datepicker/_variables.scss +0 -21
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +0 -90
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +0 -11
- package/src/css/components/molecules/wt-icon-btn/_variables.scss +0 -3
- package/src/css/components/organisms/wt-headline-nav/_variables.scss +0 -5
- /package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppHeader.spec.js +0 -0
- /package/src/components/{organisms/wt-app-header → wt-app-header}/wt-header-actions.vue +0 -0
- /package/src/components/{atoms/wt-avatar → wt-avatar}/__tests__/wt-avatar.spec.js +0 -0
- /package/src/components/{atoms/wt-badge → wt-badge}/__tests__/wt-badge.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-badge/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-checkbox/_variables.scss +0 -0
- /package/src/components/{atoms/wt-chip → wt-chip}/__tests__/WtChip.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-chip/_variables.scss +0 -0
- /package/src/components/{molecules/wt-copy-action → wt-copy-action}/__tests__/WtCopyAction.spec.js +0 -0
- /package/src/components/{molecules/wt-copy-action → wt-copy-action}/wt-copy-action.vue +0 -0
- /package/src/components/{atoms/wt-divider → wt-divider}/__tests__/WtDivider.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-divider/_variables.scss +0 -0
- /package/src/components/{organisms/wt-filters-panel-wrapper/__tests__/wt-filters-panel-wrapper.spec.js → wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js} +0 -0
- /package/src/components/{organisms/wt-headline → wt-headline}/__tests__/WtHeadline.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-headline/_variables.scss +0 -0
- /package/src/components/{molecules/wt-hint → wt-hint}/__tests__/WtHint.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-input/_variables.scss +0 -0
- /package/src/components/{atoms/wt-input-info → wt-input-info}/__tests__/WtInputInfo.spec.js +0 -0
- /package/src/components/{molecules/wt-label → wt-label}/__tests__/WtLabel.spec.js +0 -0
- /package/src/{css/components/atoms → components}/wt-label/_variables.scss +0 -0
- /package/src/components/{molecules/wt-label → wt-label}/mixins/labelUsageMixin.js +0 -0
- /package/src/components/{molecules/wt-load-bar → wt-load-bar}/__tests__/WtLoadBar.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-load-bar/_variables.scss +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/__tests__/WtLoader.spec.js +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--md.vue +0 -0
- /package/src/components/{atoms/wt-loader → wt-loader}/_internals/wt-loader--sm.vue +0 -0
- /package/src/{css/components/organisms → components}/wt-navigation-bar/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-notification/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-notifications-bar/_variables.scss +0 -0
- /package/src/components/{organisms/wt-page-wrapper → wt-page-wrapper}/__tests__/WtPageWrapper.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-page-wrapper/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-pagination/_variables.scss +0 -0
- /package/src/components/{organisms/wt-player → wt-player}/__tests__/WtPlayer.spec.js +0 -0
- /package/src/components/{molecules/wt-popup → wt-popup}/__tests__/WtPopup.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-popup/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-radio/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-search-bar/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-select/_multiselect.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-select/_variables.scss +0 -0
- /package/src/components/{molecules/wt-slider → wt-slider}/__tests__/WtSlider.spec.js +0 -0
- /package/src/{css/components/molecules → components}/wt-slider/_variables.scss +0 -0
- /package/src/{css/components/organisms → components}/wt-status-select/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-switcher/_variables.scss +0 -0
- /package/src/components/{organisms/wt-table → wt-table}/_internals/getSortOrder.js +0 -0
- /package/src/{css/components/organisms → components}/wt-table/_variables.scss +0 -0
- /package/src/components/{organisms/wt-table-actions → wt-table-actions}/__tests__/WtTableActions.spec.js +0 -0
- /package/src/{css/components/organisms → components}/wt-table-actions/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-tags-input/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-textarea/_variables.scss +0 -0
- /package/src/{css/components/molecules → components}/wt-timepicker/_variables.scss +0 -0
package/src/locale/ua/ua.js
CHANGED
|
@@ -2,12 +2,18 @@ import {
|
|
|
2
2
|
AgentStatus,
|
|
3
3
|
CallDirection,
|
|
4
4
|
ChannelState,
|
|
5
|
-
ChannelType,
|
|
5
|
+
ChannelType,
|
|
6
|
+
EngineRoutingSchemaType,
|
|
6
7
|
} from 'webitel-sdk';
|
|
7
8
|
import { QueueType } from 'webitel-sdk/esm2015/enums';
|
|
8
9
|
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
|
|
9
|
-
import
|
|
10
|
-
|
|
10
|
+
import AuditorSections
|
|
11
|
+
from '../../enums/WebitelApplications/AuditorSections.enum';
|
|
12
|
+
import CrmSections from '../../enums/WebitelApplications/CrmSections.enum';
|
|
13
|
+
import SupervisorSections
|
|
14
|
+
from '../../enums/WebitelApplications/SupervisorSections.enum';
|
|
15
|
+
import WebitelApplications
|
|
16
|
+
from '../../enums/WebitelApplications/WebitelApplications.enum';
|
|
11
17
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
12
18
|
|
|
13
19
|
export default {
|
|
@@ -16,6 +22,10 @@ export default {
|
|
|
16
22
|
total: 'Всього',
|
|
17
23
|
ok: 'Ок',
|
|
18
24
|
save: 'Зберегти',
|
|
25
|
+
saveAs: 'Зберегти як',
|
|
26
|
+
saved: 'Збережено',
|
|
27
|
+
send: 'Надіслати',
|
|
28
|
+
start: 'Почати',
|
|
19
29
|
close: 'Закрити',
|
|
20
30
|
add: 'Додати',
|
|
21
31
|
cancel: 'Відмінити',
|
|
@@ -25,12 +35,13 @@ export default {
|
|
|
25
35
|
delete: 'Видалити',
|
|
26
36
|
search: 'Пошук',
|
|
27
37
|
open: 'Відкрити',
|
|
28
|
-
name: '
|
|
38
|
+
name: 'Назва',
|
|
29
39
|
expand: 'Розгорнути',
|
|
30
40
|
collapse: 'Згорнути',
|
|
31
41
|
generate: 'Згенерувати',
|
|
32
42
|
lang: {
|
|
33
43
|
en: 'English',
|
|
44
|
+
es: 'Español',
|
|
34
45
|
ru: 'Русский',
|
|
35
46
|
ua: 'Українська',
|
|
36
47
|
},
|
|
@@ -44,6 +55,20 @@ export default {
|
|
|
44
55
|
downloadAll: 'Завантажити все',
|
|
45
56
|
warning: 'Попередження',
|
|
46
57
|
doNotSave: 'Не зберігати',
|
|
58
|
+
required: 'Обов\'язковий',
|
|
59
|
+
copy: 'Скопіювати',
|
|
60
|
+
new: 'Новий',
|
|
61
|
+
createdAt: 'Створено',
|
|
62
|
+
createdBy: 'Ким створено',
|
|
63
|
+
modifiedAt: 'Змінено',
|
|
64
|
+
modifiedBy: 'Ким змінено',
|
|
65
|
+
general: 'Загальне',
|
|
66
|
+
generalInfo: 'Загальна інформація',
|
|
67
|
+
all: 'Всі {entity}',
|
|
68
|
+
upload: 'Завантажити',
|
|
69
|
+
edit: 'Редагувати',
|
|
70
|
+
back: 'Назад',
|
|
71
|
+
step: 'Крок { count }',
|
|
47
72
|
},
|
|
48
73
|
vocabulary: {
|
|
49
74
|
language: 'Мова',
|
|
@@ -68,6 +93,13 @@ export default {
|
|
|
68
93
|
keys: 'Ключ | Ключі',
|
|
69
94
|
duration: 'Тривалість',
|
|
70
95
|
errors: 'Помилка | Помилки',
|
|
96
|
+
labels: 'Мітка | Мітки',
|
|
97
|
+
permissions: 'Дозвіл | Дозволи',
|
|
98
|
+
options: 'Опція | Опції',
|
|
99
|
+
emails: 'Електронна адреса | Електронні адреси',
|
|
100
|
+
phones: 'Телефон | Телефони',
|
|
101
|
+
messaging: 'Повідомлення',
|
|
102
|
+
emptyResultSearch: 'Пошук не дав результатів',
|
|
71
103
|
},
|
|
72
104
|
// date-related texts
|
|
73
105
|
date: {
|
|
@@ -80,6 +112,8 @@ export default {
|
|
|
80
112
|
supervisor: 'Супервізор | Супервізори',
|
|
81
113
|
auditor: 'Аудитор | Аудитори',
|
|
82
114
|
region: 'Регіон | Регіони',
|
|
115
|
+
communicationType: 'Тип зв\'язку | Типи зв\'язку',
|
|
116
|
+
grantee: 'Отримувач | Отримувачі',
|
|
83
117
|
queue: {
|
|
84
118
|
type: {
|
|
85
119
|
[QueueType.INBOUND_QUEUE]: 'Вхідна черга',
|
|
@@ -139,7 +173,18 @@ export default {
|
|
|
139
173
|
// describes Webitel FRONTEND applications + their navs
|
|
140
174
|
WebitelApplications: {
|
|
141
175
|
[WebitelApplications.AGENT]: { name: 'Agent Workspace' },
|
|
142
|
-
[WebitelApplications.AUDIT]: {
|
|
176
|
+
[WebitelApplications.AUDIT]: {
|
|
177
|
+
name: 'Audit',
|
|
178
|
+
sections: {
|
|
179
|
+
[AuditorSections.SCORECARDS]: 'Анкети',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
[WebitelApplications.CRM]: {
|
|
183
|
+
name: 'CRM',
|
|
184
|
+
sections: {
|
|
185
|
+
[CrmSections.CONTACTS]: 'Контакти',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
143
188
|
[WebitelApplications.HISTORY]: { name: 'Call History' },
|
|
144
189
|
[WebitelApplications.ANALYTICS]: { name: 'Data Visualisation Tool' },
|
|
145
190
|
[WebitelApplications.SUPERVISOR]: {
|
|
@@ -164,7 +209,7 @@ export default {
|
|
|
164
209
|
[AdminSections.SKILLS]: 'Навички оператора',
|
|
165
210
|
[AdminSections.BUCKETS]: 'Кошики',
|
|
166
211
|
[AdminSections.MEDIA]: 'Медіафайли',
|
|
167
|
-
[AdminSections.BLACKLIST]: 'Cписки
|
|
212
|
+
[AdminSections.BLACKLIST]: 'Cписки',
|
|
168
213
|
[AdminSections.CALENDARS]: 'Календарі',
|
|
169
214
|
[AdminSections.REGIONS]: 'Розташування',
|
|
170
215
|
[AdminSections.COMMUNICATIONS]: 'Типи зв\'язку',
|
|
@@ -181,6 +226,8 @@ export default {
|
|
|
181
226
|
[AdminSections.TRIGGERS]: 'Тригери',
|
|
182
227
|
[AdminSections.ROLES]: 'Ролі',
|
|
183
228
|
[AdminSections.OBJECTS]: 'Розділи',
|
|
229
|
+
[AdminSections.CHANGELOGS]: 'Журнал змін',
|
|
230
|
+
[AdminSections.SETTINGS]: 'Налаштування',
|
|
184
231
|
},
|
|
185
232
|
},
|
|
186
233
|
},
|
|
@@ -198,10 +245,15 @@ export default {
|
|
|
198
245
|
requiredArrayValue: 'Поле не повинно бути пустим',
|
|
199
246
|
minLength: 'Кількість символів повинна бути не меншою, ніж',
|
|
200
247
|
url: 'Необхідно ввести правильну url-адресу',
|
|
248
|
+
regExpValidator: 'Не правильний регулярний вираз',
|
|
249
|
+
domainValidator: 'Невірний домен',
|
|
250
|
+
decimalValidator: 'Кількість десяткових знаків не повинна бути більше { count }',
|
|
251
|
+
integer: 'Поле повинно містити лише цілі числа',
|
|
201
252
|
},
|
|
202
253
|
webitelUI: {
|
|
203
254
|
searchBar: {
|
|
204
255
|
placeholder: 'Пошук',
|
|
256
|
+
settingsHint: 'Налаштування пошуку',
|
|
205
257
|
},
|
|
206
258
|
timepicker: {
|
|
207
259
|
hour: 'Год:',
|
|
@@ -215,7 +267,7 @@ export default {
|
|
|
215
267
|
pagination: {
|
|
216
268
|
sizeText: 'Записів на сторінці:',
|
|
217
269
|
prev: 'Назад',
|
|
218
|
-
next: '
|
|
270
|
+
next: 'Далі',
|
|
219
271
|
},
|
|
220
272
|
appNavigator: {
|
|
221
273
|
title: 'Застосунки Webitel',
|
|
@@ -240,7 +292,7 @@ export default {
|
|
|
240
292
|
expandFilters: 'Розкрити фільтри',
|
|
241
293
|
},
|
|
242
294
|
tableColumnSelect: {
|
|
243
|
-
title: 'Виберіть
|
|
295
|
+
title: 'Виберіть колонки',
|
|
244
296
|
},
|
|
245
297
|
statusSelect: {
|
|
246
298
|
online: 'Онлайн',
|
|
@@ -248,11 +300,12 @@ export default {
|
|
|
248
300
|
offline: 'Оффлайн',
|
|
249
301
|
breakOut: 'Примусова перерва',
|
|
250
302
|
},
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
303
|
+
iconAction: {
|
|
304
|
+
deleteActionHint: 'Видалити',
|
|
305
|
+
editActionHint: 'Редагувати',
|
|
306
|
+
addActionHint: 'Додати',
|
|
307
|
+
historyActionHint: 'Історія',
|
|
308
|
+
downloadActionHint: 'Скачати',
|
|
256
309
|
},
|
|
257
310
|
errorPages: {
|
|
258
311
|
goBack: 'Повернутись назад',
|
|
@@ -269,5 +322,37 @@ export default {
|
|
|
269
322
|
copy: 'Копіювати',
|
|
270
323
|
copied: 'Скопійовано!',
|
|
271
324
|
},
|
|
325
|
+
auditForm: {
|
|
326
|
+
question: 'Критерій',
|
|
327
|
+
option: 'Варіант | Варіанти',
|
|
328
|
+
score: 'Бал | Бали',
|
|
329
|
+
addQuestion: 'Додати критерій',
|
|
330
|
+
answerType: 'Тип відповіді',
|
|
331
|
+
type: {
|
|
332
|
+
options: 'Варіант',
|
|
333
|
+
score: 'Бал',
|
|
334
|
+
},
|
|
335
|
+
clearSelection: 'Очистити вибір',
|
|
336
|
+
},
|
|
337
|
+
deleteConfirmationPopup: {
|
|
338
|
+
title: 'Підтвердіть видалення',
|
|
339
|
+
askingAlert: 'Ви впевнені, що хочете видалити {count} запис? | Ви впевнені, що хочете видалити {count} записів?',
|
|
340
|
+
undoneActionAlert: 'Дана дія не може бути скасована.',
|
|
341
|
+
deleteAll: 'ВСІ',
|
|
342
|
+
},
|
|
343
|
+
dummy: {
|
|
344
|
+
text: 'Записи у розділі ще не створені',
|
|
345
|
+
},
|
|
346
|
+
agentStatusSelect: {
|
|
347
|
+
pauseCausePopup: {
|
|
348
|
+
title: 'Виберіть причину паузи',
|
|
349
|
+
min: 'Хв',
|
|
350
|
+
unlimited: 'Безліміт',
|
|
351
|
+
},
|
|
352
|
+
statusSelectErrorPopup: {
|
|
353
|
+
title: 'Увага',
|
|
354
|
+
message: 'Ліміт операторів в паузі перевищено. Перерва наразі недоступна.',
|
|
355
|
+
},
|
|
356
|
+
},
|
|
272
357
|
},
|
|
273
358
|
};
|
|
@@ -2,9 +2,9 @@ import { shallowMount } from '@vue/test-utils';
|
|
|
2
2
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
3
3
|
import apiFilterMixin from '../apiFilterMixin';
|
|
4
4
|
|
|
5
|
-
const router =
|
|
5
|
+
const router = createRouter({
|
|
6
6
|
history: createWebHistory(),
|
|
7
|
-
routes: [],
|
|
7
|
+
routes: [{ path: '/', name: 'jest' }],
|
|
8
8
|
});
|
|
9
9
|
const team = ['1', '2'];
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ describe('API filter mixin', () => {
|
|
|
25
25
|
it('Correctly sets value from $route query', async () => {
|
|
26
26
|
await router.replace({ query: { team } });
|
|
27
27
|
wrapper = shallowMount(Component, {
|
|
28
|
-
plugins: [router],
|
|
28
|
+
global: { plugins: [router] },
|
|
29
29
|
});
|
|
30
30
|
await wrapper.vm.$nextTick();
|
|
31
31
|
expect(wrapper.vm.value).toEqual(team);
|
|
@@ -33,8 +33,7 @@ describe('API filter mixin', () => {
|
|
|
33
33
|
|
|
34
34
|
it('Sets empty array value if $route query is empty', async () => {
|
|
35
35
|
wrapper = shallowMount(Component, {
|
|
36
|
-
|
|
37
|
-
router,
|
|
36
|
+
global: { plugins: [router] },
|
|
38
37
|
data: () => ({
|
|
39
38
|
filterQuery: 'queue',
|
|
40
39
|
}),
|
|
@@ -45,8 +44,7 @@ describe('API filter mixin', () => {
|
|
|
45
44
|
it('Resets value after $route query reset', async () => {
|
|
46
45
|
await router.replace({ query: { team } });
|
|
47
46
|
wrapper = shallowMount(Component, {
|
|
48
|
-
|
|
49
|
-
router,
|
|
47
|
+
global: { plugins: [router] },
|
|
50
48
|
});
|
|
51
49
|
await wrapper.vm.$nextTick();
|
|
52
50
|
expect(wrapper.vm.value).toEqual(team);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
3
3
|
import enumFilterMixin from '../enumFilterMixin';
|
|
4
4
|
|
|
5
5
|
const options = [{
|
|
@@ -11,9 +11,10 @@ const options = [{
|
|
|
11
11
|
value: 'outbound',
|
|
12
12
|
}];
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const router = createRouter({
|
|
15
|
+
history: createWebHistory(),
|
|
16
|
+
routes: [{ path: '/', name: 'jest' }],
|
|
17
|
+
});
|
|
17
18
|
|
|
18
19
|
describe('Enum filter mixin', () => {
|
|
19
20
|
let wrapper;
|
|
@@ -28,14 +29,15 @@ describe('Enum filter mixin', () => {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
beforeEach(() => {
|
|
31
|
-
|
|
32
|
+
router.replace({ query: null });
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
it('Correctly sets value from $route query', async () => {
|
|
35
36
|
await router.replace({ query: { type: [options[0].value] } });
|
|
36
37
|
wrapper = shallowMount(Component, {
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
global: {
|
|
39
|
+
plugins: [router],
|
|
40
|
+
},
|
|
39
41
|
});
|
|
40
42
|
await wrapper.vm.$nextTick();
|
|
41
43
|
expect(wrapper.vm.value).toEqual([options[0]]);
|
|
@@ -44,18 +46,20 @@ describe('Enum filter mixin', () => {
|
|
|
44
46
|
it('Correctly sets single value from $route query', async () => {
|
|
45
47
|
await router.replace({ query: { type: options[0].value } });
|
|
46
48
|
wrapper = shallowMount(Component, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
global: {
|
|
50
|
+
plugins: [router],
|
|
51
|
+
},
|
|
49
52
|
});
|
|
50
53
|
await wrapper.vm.$nextTick();
|
|
51
|
-
expect(wrapper.vm.value).toEqual(options[0]);
|
|
54
|
+
expect(wrapper.vm.value).toEqual([options[0]]);
|
|
52
55
|
});
|
|
53
56
|
|
|
54
57
|
it('Resets value after $route query reset', async () => {
|
|
55
58
|
await router.replace({ query: { type: [options[0].value] } });
|
|
56
59
|
wrapper = shallowMount(Component, {
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
global: {
|
|
61
|
+
plugins: [router],
|
|
62
|
+
},
|
|
59
63
|
});
|
|
60
64
|
await wrapper.vm.$nextTick();
|
|
61
65
|
expect(wrapper.vm.value).toEqual([options[0]]);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
3
3
|
import paginationFilterMixin from '../paginationFilterMixin';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const router = createRouter({
|
|
6
|
+
history: createWebHistory(),
|
|
7
|
+
routes: [{ path: '/', name: 'jest' }],
|
|
8
|
+
});
|
|
8
9
|
const page = '2';
|
|
9
10
|
const size = '20';
|
|
10
11
|
|
|
@@ -15,15 +16,14 @@ describe('Pagination filter mixin', () => {
|
|
|
15
16
|
mixins: [paginationFilterMixin],
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
beforeEach(() => {
|
|
19
|
-
|
|
19
|
+
beforeEach(async () => {
|
|
20
|
+
await router.replace({ path: '/', query: null });
|
|
20
21
|
});
|
|
21
22
|
|
|
22
23
|
it('Correctly sets value from $route query', async () => {
|
|
23
|
-
await router.replace({ query: { page, size } });
|
|
24
|
+
await router.replace({ path: '/', query: { page, size } });
|
|
24
25
|
wrapper = shallowMount(Component, {
|
|
25
|
-
|
|
26
|
-
router,
|
|
26
|
+
global: { plugins: [router] },
|
|
27
27
|
});
|
|
28
28
|
await wrapper.vm.$nextTick();
|
|
29
29
|
expect(wrapper.vm.page).toEqual(page);
|
|
@@ -32,8 +32,7 @@ describe('Pagination filter mixin', () => {
|
|
|
32
32
|
|
|
33
33
|
it('Sets initial value if $route query is empty', async () => {
|
|
34
34
|
wrapper = shallowMount(Component, {
|
|
35
|
-
|
|
36
|
-
router,
|
|
35
|
+
global: { plugins: [router] },
|
|
37
36
|
data: () => ({
|
|
38
37
|
filterQuery: 'queue',
|
|
39
38
|
}),
|
|
@@ -43,50 +42,43 @@ describe('Pagination filter mixin', () => {
|
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
it('Resets value after $route query reset', async () => {
|
|
46
|
-
await router.replace({ query: { page, size } });
|
|
45
|
+
await router.replace({ path: '/', query: { page, size } });
|
|
47
46
|
wrapper = shallowMount(Component, {
|
|
48
|
-
|
|
49
|
-
router,
|
|
47
|
+
global: { plugins: [router] },
|
|
50
48
|
});
|
|
51
|
-
await wrapper.vm.$router.replace({ query: null });
|
|
49
|
+
await wrapper.vm.$router.replace({ path: '/', query: null });
|
|
52
50
|
await wrapper.vm.$nextTick();
|
|
53
51
|
expect(wrapper.vm.page).toEqual('1');
|
|
54
52
|
expect(wrapper.vm.size).toEqual('10');
|
|
55
53
|
});
|
|
56
54
|
|
|
57
55
|
it('At "prev" page, changes query and emits event', async () => {
|
|
58
|
-
await router.replace({ query: { page, size } });
|
|
56
|
+
await router.replace({ path: '/', query: { page, size } });
|
|
59
57
|
wrapper = shallowMount(Component, {
|
|
60
|
-
|
|
61
|
-
router,
|
|
58
|
+
global: { plugins: [router] },
|
|
62
59
|
});
|
|
63
|
-
wrapper.
|
|
64
|
-
wrapper.vm.prev();
|
|
60
|
+
await wrapper.vm.prev();
|
|
65
61
|
expect(wrapper.emitted().input).toBeTruthy();
|
|
66
62
|
expect(wrapper.vm.$route.query.page).toBe(`${page - 1}`);
|
|
67
63
|
});
|
|
68
64
|
|
|
69
65
|
it('At "next" page, changes query and emits event', async () => {
|
|
70
|
-
await router.replace({ query: { page, size } });
|
|
66
|
+
await router.replace({ path: '/', query: { page, size } });
|
|
71
67
|
wrapper = shallowMount(Component, {
|
|
72
|
-
|
|
73
|
-
router,
|
|
68
|
+
global: { plugins: [router] },
|
|
74
69
|
});
|
|
75
|
-
wrapper.
|
|
76
|
-
wrapper.vm.next();
|
|
70
|
+
await wrapper.vm.next();
|
|
77
71
|
expect(wrapper.emitted().input).toBeTruthy();
|
|
78
72
|
expect(wrapper.vm.$route.query.page).toBe(`${+page + 1}`);
|
|
79
73
|
});
|
|
80
74
|
|
|
81
75
|
it('At "sizeChange", changes query and emits event', async () => {
|
|
82
76
|
const newSize = '40';
|
|
83
|
-
await router.replace({ query: { page, size } });
|
|
77
|
+
await router.replace({ path: '/', query: { page, size } });
|
|
84
78
|
wrapper = shallowMount(Component, {
|
|
85
|
-
|
|
86
|
-
router,
|
|
79
|
+
global: { plugins: [router] },
|
|
87
80
|
});
|
|
88
|
-
wrapper.
|
|
89
|
-
wrapper.vm.sizeChange(newSize);
|
|
81
|
+
await wrapper.vm.sizeChange(newSize);
|
|
90
82
|
expect(wrapper.emitted().input).toBeTruthy();
|
|
91
83
|
expect(wrapper.vm.$route.query.size).toBe(newSize);
|
|
92
84
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { shallowMount
|
|
2
|
-
import
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
3
3
|
import sortFilterMixin from '../sortFilterMixin';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const router = createRouter({
|
|
6
|
+
history: createWebHistory(),
|
|
7
|
+
routes: [{ path: '/', name: 'jest' }],
|
|
8
|
+
});
|
|
8
9
|
|
|
9
10
|
const headers = [{
|
|
10
11
|
value: 'queue',
|
|
@@ -18,8 +19,6 @@ const headers = [{
|
|
|
18
19
|
field: 'online',
|
|
19
20
|
}];
|
|
20
21
|
|
|
21
|
-
const $t = () => {};
|
|
22
|
-
|
|
23
22
|
describe('Sort filter mixin', () => {
|
|
24
23
|
let wrapper;
|
|
25
24
|
const Component = {
|
|
@@ -28,12 +27,10 @@ describe('Sort filter mixin', () => {
|
|
|
28
27
|
data: () => ({ headers }),
|
|
29
28
|
};
|
|
30
29
|
|
|
31
|
-
beforeEach(() => {
|
|
32
|
-
router.replace('/');
|
|
30
|
+
beforeEach(async () => {
|
|
31
|
+
await router.replace('/');
|
|
33
32
|
wrapper = shallowMount(Component, {
|
|
34
|
-
|
|
35
|
-
router,
|
|
36
|
-
mocks: { $t },
|
|
33
|
+
global: { plugins: [router] },
|
|
37
34
|
});
|
|
38
35
|
});
|
|
39
36
|
|
|
@@ -43,10 +40,10 @@ describe('Sort filter mixin', () => {
|
|
|
43
40
|
expect(queue.sort).toEqual('asc');
|
|
44
41
|
});
|
|
45
42
|
|
|
46
|
-
it('After "sort" trigger, header column sort value changes properly', () => {
|
|
43
|
+
it('After "sort" trigger, header column sort value changes properly', async () => {
|
|
47
44
|
let queue;
|
|
48
45
|
queue = wrapper.vm.headers.find((header) => header.value === 'queue');
|
|
49
|
-
wrapper.vm.sort(queue);
|
|
46
|
+
await wrapper.vm.sort(queue);
|
|
50
47
|
queue = wrapper.vm.headers.find((header) => header.value === 'queue');
|
|
51
48
|
expect(queue.sort).toEqual('asc');
|
|
52
49
|
});
|
|
@@ -54,7 +51,7 @@ describe('Sort filter mixin', () => {
|
|
|
54
51
|
it('After "sort" trigger, url query changes properly', async () => {
|
|
55
52
|
await router.replace({ path: '/', query: { sort: '+queue' } });
|
|
56
53
|
const queue = wrapper.vm.headers.find((header) => header.value === 'queue');
|
|
57
|
-
wrapper.vm.sort(queue);
|
|
54
|
+
await wrapper.vm.sort(queue);
|
|
58
55
|
expect(wrapper.vm.$route.query.sort).toEqual('-queue');
|
|
59
56
|
});
|
|
60
57
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { shallowMount
|
|
2
|
-
import
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
3
3
|
import _urlControllerMixin from '../_urlControllerMixin/_urlControllerMixin';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const router = createRouter({
|
|
6
|
+
history: createWebHistory(),
|
|
7
|
+
routes: [{ path: '/', name: 'jest' }],
|
|
8
|
+
});
|
|
8
9
|
|
|
9
|
-
const $t = () => {};
|
|
10
10
|
const filterQuery = 'team';
|
|
11
11
|
|
|
12
12
|
describe('URL Controller mixin Set and Get operations', () => {
|
|
@@ -19,29 +19,29 @@ describe('URL Controller mixin Set and Get operations', () => {
|
|
|
19
19
|
beforeEach(() => {
|
|
20
20
|
router.replace('/');
|
|
21
21
|
wrapper = shallowMount(Component, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
global: {
|
|
23
|
+
plugins: [router],
|
|
24
|
+
},
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it('Array of objects', async () => {
|
|
29
29
|
const value = [{ name: 'team 1', id: '1' }, { name: 'team 2', id: '2' }];
|
|
30
|
-
wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
30
|
+
await wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
31
31
|
const queryValue = wrapper.vm.getValueFromQuery({ filterQuery });
|
|
32
32
|
expect(queryValue).toEqual(['1', '2']);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it('Array of values', async () => {
|
|
36
36
|
const value = ['hello', '1'];
|
|
37
|
-
wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
37
|
+
await wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
38
38
|
const queryValue = wrapper.vm.getValueFromQuery({ filterQuery });
|
|
39
39
|
expect(queryValue).toEqual(value);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it('String value', async () => {
|
|
43
43
|
const value = 'hello there';
|
|
44
|
-
wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
44
|
+
await wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
45
45
|
const queryValue = wrapper.vm.getValueFromQuery({ filterQuery });
|
|
46
46
|
expect(queryValue).toEqual(value);
|
|
47
47
|
});
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
});
|
|
12
12
|
},
|
|
13
13
|
|
|
14
|
-
setValueToQuery({ filterQuery, value, storedProp = 'id' }) {
|
|
14
|
+
async setValueToQuery({ filterQuery, value, storedProp = 'id' }) {
|
|
15
15
|
let newValue = '';
|
|
16
16
|
if (Array.isArray(value)) {
|
|
17
17
|
if (value.length && typeof value[0] !== 'object') {
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
newValue = value;
|
|
24
24
|
}
|
|
25
25
|
if (!deepEqual(this.$route.query[filterQuery], newValue)) {
|
|
26
|
-
this.changeRouteQuery({
|
|
26
|
+
await this.changeRouteQuery({
|
|
27
27
|
value: newValue,
|
|
28
28
|
filterQuery,
|
|
29
29
|
});
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
this.$emit('input');
|
|
53
53
|
const value = `${+this.page + 1}`;
|
|
54
54
|
this.page = value;
|
|
55
|
-
this.setValueToQuery({
|
|
55
|
+
return this.setValueToQuery({
|
|
56
56
|
filterQuery: 'page',
|
|
57
57
|
value,
|
|
58
58
|
});
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
this.$emit('input');
|
|
63
63
|
const value = `${+this.page - 1}`;
|
|
64
64
|
this.page = value;
|
|
65
|
-
this.setValueToQuery({
|
|
65
|
+
return this.setValueToQuery({
|
|
66
66
|
filterQuery: 'page',
|
|
67
67
|
value,
|
|
68
68
|
});
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
|
|
71
71
|
sizeChange(value) {
|
|
72
72
|
this.$emit('input');
|
|
73
|
-
this.setValueToQuery({
|
|
73
|
+
return this.setValueToQuery({
|
|
74
74
|
filterQuery: 'size',
|
|
75
75
|
value,
|
|
76
76
|
});
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
methods: {
|
|
50
50
|
sort(column) {
|
|
51
51
|
const order = getNextSortOrder(column.sort);
|
|
52
|
-
this.setValue({ column, order });
|
|
52
|
+
return this.setValue({ column, order });
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
setValue({ column, order }) {
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
sort: col === column ? order : null,
|
|
59
59
|
}));
|
|
60
60
|
const value = encodeSortQuery({ column, order });
|
|
61
|
-
this.setValueToQuery({
|
|
61
|
+
return this.setValueToQuery({
|
|
62
62
|
value,
|
|
63
63
|
filterQuery: this.filterQuery,
|
|
64
64
|
});
|
|
@@ -11,7 +11,7 @@ describe('Validation mixin', () => {
|
|
|
11
11
|
|
|
12
12
|
it('detects validation prop', () => {
|
|
13
13
|
wrapper = shallowMount(Component, {
|
|
14
|
-
|
|
14
|
+
props: {
|
|
15
15
|
v: {
|
|
16
16
|
$error: true,
|
|
17
17
|
},
|
|
@@ -23,10 +23,10 @@ describe('Validation mixin', () => {
|
|
|
23
23
|
|
|
24
24
|
it('computes error message on validation error', () => {
|
|
25
25
|
wrapper = shallowMount(Component, {
|
|
26
|
-
|
|
26
|
+
props: {
|
|
27
27
|
v: {
|
|
28
28
|
$error: true,
|
|
29
|
-
email:
|
|
29
|
+
email: { $invalid: true },
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
});
|
|
@@ -35,10 +35,10 @@ describe('Validation mixin', () => {
|
|
|
35
35
|
|
|
36
36
|
it('prioritizes error messages', () => {
|
|
37
37
|
wrapper = shallowMount(Component, {
|
|
38
|
-
|
|
38
|
+
props: {
|
|
39
39
|
v: {
|
|
40
40
|
$error: true,
|
|
41
|
-
required:
|
|
41
|
+
required: { $invalid: true },
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
});
|