@webitel/ui-sdk 0.1.2-vue3 → 0.1.3-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 +36361 -11605
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +36342 -11586
- 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 +2 -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/package.json
CHANGED
|
@@ -1,54 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-vite",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"serve-lib": "vue-cli-service serve",
|
|
7
6
|
"build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
|
|
8
|
-
"build:app": "vue-cli-service build",
|
|
9
7
|
"test:unit": "vue-cli-service test:unit",
|
|
10
8
|
"lint": "vue-cli-service lint --fix",
|
|
9
|
+
"build:app": "vue-cli-service build",
|
|
10
|
+
"prepare": "husky install",
|
|
11
11
|
"publish-lib": "npm run test:unit && npm run build && npm publish --access public",
|
|
12
12
|
"publish-lib:testless": "npm run build && npm publish --access public",
|
|
13
|
-
"
|
|
13
|
+
"serve-lib": "vue-cli-service serve",
|
|
14
|
+
"styleguide": "vue-cli-service styleguidist",
|
|
15
|
+
"styleguide:build": "vue-cli-service styleguidist:build"
|
|
14
16
|
},
|
|
15
17
|
"main": "./dist/@webitel/ui-sdk.common.js",
|
|
16
18
|
"files": [
|
|
17
19
|
"dist/*",
|
|
20
|
+
"src/api/*",
|
|
18
21
|
"src/locale/*",
|
|
22
|
+
"src/composables/*",
|
|
19
23
|
"src/css/*",
|
|
20
24
|
"src/components/*",
|
|
25
|
+
"src/directives/*",
|
|
21
26
|
"src/enums/*",
|
|
22
27
|
"src/mixins/*",
|
|
23
28
|
"src/scripts/*",
|
|
29
|
+
"src/validators/*",
|
|
24
30
|
"src/modules/*",
|
|
25
31
|
"src/plugins/*",
|
|
26
32
|
"src/store/*",
|
|
27
33
|
"CHANGELOG.md"
|
|
28
34
|
],
|
|
29
35
|
"dependencies": {
|
|
36
|
+
"@floating-ui/vue": "^1.0.1",
|
|
30
37
|
"@vue/compat": "^3.2.47",
|
|
38
|
+
"@vuelidate/core": "^2.0.0",
|
|
39
|
+
"@vuelidate/validators": "^2.0.0",
|
|
40
|
+
"@vuepic/vue-datepicker": "^4.4.0",
|
|
41
|
+
"@vueuse/components": "^10.5.0",
|
|
31
42
|
"clipboard-copy": "^4.0.1",
|
|
32
43
|
"core-js": "^3.6.5",
|
|
33
44
|
"csv-stringify": "^5.5.3",
|
|
34
45
|
"deep-copy": "^1.4.2",
|
|
35
46
|
"deep-equal": "^2.0.3",
|
|
36
47
|
"file-saver": "^2.0.2",
|
|
37
|
-
"
|
|
48
|
+
"is-valid-domain": "^0.1.6",
|
|
38
49
|
"jszip": "^3.5.0",
|
|
39
50
|
"jszip-utils": "^0.1.0",
|
|
51
|
+
"lodash": "^4.17.21",
|
|
40
52
|
"node-polyfill-webpack-plugin": "^1.1.4",
|
|
41
53
|
"plyr": "3.6.2",
|
|
54
|
+
"query-string": "^8.1.0",
|
|
55
|
+
"sortablejs": "^1.15.0",
|
|
56
|
+
"tiny-emitter": "^2.1.0",
|
|
42
57
|
"vue": "^3.2.47",
|
|
43
58
|
"vue-i18n": "^9.2.2",
|
|
44
59
|
"vue-multiselect": "^3.0.0-beta.1",
|
|
45
|
-
"vue-observe-visibility": "^
|
|
60
|
+
"vue-observe-visibility": "^2.0.0-alpha.1",
|
|
46
61
|
"vue-router": "^4.1.6",
|
|
47
|
-
"
|
|
48
|
-
"webitel-sdk": "^0.1.157"
|
|
62
|
+
"webitel-sdk": "^23.7.5"
|
|
49
63
|
},
|
|
50
64
|
"devDependencies": {
|
|
51
65
|
"@babel/eslint-parser": "^7.17.0",
|
|
66
|
+
"@babel/preset-react": "^7.22.15",
|
|
52
67
|
"@testing-library/jest-dom": "^5.16.2",
|
|
53
68
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
54
69
|
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
@@ -68,6 +83,7 @@
|
|
|
68
83
|
"sass": "^1.51.0",
|
|
69
84
|
"sass-loader": "^12.6.0",
|
|
70
85
|
"svg-sprite-loader": "^6.0.11",
|
|
86
|
+
"vue-cli-plugin-styleguidist": "~4.72.4",
|
|
71
87
|
"vuex": "^4.1.0"
|
|
72
88
|
},
|
|
73
89
|
"overrides": {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
// 'X-Webitel-Access' ~ 'X-Access-Token'
|
|
4
|
+
const generateInstance = ({ interceptors } = {}) => {
|
|
5
|
+
const instance = axios.create({
|
|
6
|
+
baseURL: process?.env?.VUE_APP_API_URL || import.meta.env.VITE_API_URL,
|
|
7
|
+
headers: {
|
|
8
|
+
'X-Webitel-Access': localStorage.getItem('access-token') || '',
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
if (interceptors) {
|
|
13
|
+
const { request, response } = interceptors;
|
|
14
|
+
if (request) {
|
|
15
|
+
request.forEach((interceptor) => instance.interceptors.request.use(...interceptor));
|
|
16
|
+
}
|
|
17
|
+
if (response) {
|
|
18
|
+
response.forEach((interceptor) => instance.interceptors.response.use(...interceptor));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return instance;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default generateInstance;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const handleUnauthorizedInterceptor = [
|
|
2
|
+
(response) => response,
|
|
3
|
+
(error) => {
|
|
4
|
+
if (error.response && error.response.status === 401) {
|
|
5
|
+
console.warn('intercepted 401');
|
|
6
|
+
localStorage.removeItem('access-token');
|
|
7
|
+
}
|
|
8
|
+
return Promise.reject(error);
|
|
9
|
+
},
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export default handleUnauthorizedInterceptor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const applyTransform = (target, transformers, { debug = false } = {}) => {
|
|
2
|
+
return transformers.reduce((result, transformer, index) => {
|
|
3
|
+
if (debug) console.info(`applyTransform debug on step ${index}`, result);
|
|
4
|
+
return transformer(result);
|
|
5
|
+
}, target);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default applyTransform;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import qs from 'query-string';
|
|
2
|
+
|
|
3
|
+
const generateUrlTransformer = (baseUrl) => (params) => {
|
|
4
|
+
const stringifyOptions = {
|
|
5
|
+
skipEmptyString: true,
|
|
6
|
+
skipNull: true,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const url = `${baseUrl}?${qs.stringify(params, stringifyOptions)}`;
|
|
10
|
+
return url;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default generateUrlTransformer;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import applyTransform from './applyTransform';
|
|
2
|
+
import log from './log/log.transformer';
|
|
3
|
+
import merge from './merge/merge.transformer';
|
|
4
|
+
import starToSearch from './starToSearch/starToSearch.transformer';
|
|
5
|
+
import camelToSnake from './camelToSnake/camelToSnake.transformer';
|
|
6
|
+
import snakeToCamel from './snakeToCamel/snakeToCamel.transformer';
|
|
7
|
+
import notify from './notify/notify.transformer';
|
|
8
|
+
import sanitize from './sanitize/sanitize.transformer';
|
|
9
|
+
import generateUrl from './generateUrl/generateUrl.transformer';
|
|
10
|
+
import mergeEach from './mergeEach/mergeEach.transformer';
|
|
11
|
+
|
|
12
|
+
export default applyTransform;
|
|
13
|
+
export {
|
|
14
|
+
log,
|
|
15
|
+
merge,
|
|
16
|
+
notify,
|
|
17
|
+
starToSearch,
|
|
18
|
+
camelToSnake,
|
|
19
|
+
snakeToCamel,
|
|
20
|
+
sanitize,
|
|
21
|
+
generateUrl,
|
|
22
|
+
mergeEach,
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import eventBus from '../../../scripts/eventBus';
|
|
2
|
+
|
|
3
|
+
const notifyTransformer = (notificationObject) => {
|
|
4
|
+
/*
|
|
5
|
+
if passed arg is function, then this notification - static content,
|
|
6
|
+
predefined before actual transformer is called in applyTransform flow
|
|
7
|
+
*/
|
|
8
|
+
if (typeof notificationObject === 'function') {
|
|
9
|
+
/*
|
|
10
|
+
so, create a callback which will send notification with params, passed to it
|
|
11
|
+
*/
|
|
12
|
+
const callback = ({ type, text }) => eventBus.$emit('notification', { type, text });
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
and, then, return a function, which will be called in main applyTransform flow,
|
|
16
|
+
calling passed arg function with callback, and returning actual notify payload
|
|
17
|
+
*/
|
|
18
|
+
return (payload) => {
|
|
19
|
+
notificationObject({ callback });
|
|
20
|
+
return payload;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (notificationObject instanceof Error) {
|
|
24
|
+
eventBus.$emit('notification', {
|
|
25
|
+
type: 'error',
|
|
26
|
+
text: notificationObject.response?.data?.detail || notificationObject.response?.data?.message || notificationObject,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return notificationObject;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default notifyTransformer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const sanitizeTransformer = (fieldsToSend) => (item) => {
|
|
2
|
+
return Object.keys(item).reduce((sanitizedItem, key) => {
|
|
3
|
+
if (fieldsToSend.indexOf(key) === -1) return sanitizedItem;
|
|
4
|
+
|
|
5
|
+
return {
|
|
6
|
+
...sanitizedItem,
|
|
7
|
+
[key]: item[key],
|
|
8
|
+
};
|
|
9
|
+
}, {});
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default sanitizeTransformer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import deepcopy from 'deep-copy';
|
|
2
|
+
import get from 'lodash/get';
|
|
3
|
+
import updateObject from '../../../scripts/updateObject';
|
|
4
|
+
|
|
5
|
+
const starToSearchTransformer = (path = 'search') => (params) => {
|
|
6
|
+
const copy = deepcopy(params);
|
|
7
|
+
const value = get(copy, path);
|
|
8
|
+
if (!value || value.slice(-1) === '*') return copy;
|
|
9
|
+
return updateObject({ obj: copy, path, value: `${value}*` });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default starToSearchTransformer;
|
package/src/components/index.js
CHANGED
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
1
|
+
import WtAvatar from './wt-avatar/wt-avatar.vue';
|
|
2
|
+
import WtBadge from './wt-badge/wt-badge.vue';
|
|
3
|
+
import WtIcon from './wt-icon/wt-icon.vue';
|
|
4
|
+
import WtIndicator from './wt-indicator/wt-indicator.vue';
|
|
5
|
+
import WtInputInfo from './wt-input-info/wt-input-info.vue';
|
|
6
|
+
import WtButton from './wt-button/wt-button.vue';
|
|
7
|
+
import WtChip from './wt-chip/wt-chip.vue';
|
|
8
|
+
import WtDivider from './wt-divider/wt-divider.vue';
|
|
9
|
+
import WtTooltip from './wt-tooltip/wt-tooltip.vue';
|
|
10
|
+
import WtRoundedAction from './wt-rounded-action/wt-rounded-action.vue';
|
|
11
|
+
import WtLoader from './wt-loader/wt-loader.vue';
|
|
12
|
+
import WtContextMenu from './wt-context-menu/wt-context-menu.vue';
|
|
13
|
+
import WtCheckbox from './wt-checkbox/wt-checkbox.vue';
|
|
14
|
+
import WtDatepicker from './wt-datepicker/wt-datepicker.vue';
|
|
15
|
+
import WtIconBtn from './wt-icon-btn/wt-icon-btn.vue';
|
|
16
|
+
import WtInput from './wt-input/wt-input.vue';
|
|
17
|
+
import WtNotification from './wt-notification/wt-notification.vue';
|
|
18
|
+
import WtPopup from './wt-popup/wt-popup.vue';
|
|
19
|
+
import WtProgressBar from './wt-progress-bar/wt-progress-bar.vue';
|
|
20
|
+
import WtRadio from './wt-radio/wt-radio.vue';
|
|
21
|
+
import WtSearchBar from './wt-search-bar/wt-search-bar.vue';
|
|
22
|
+
import WtSelect from './wt-select/wt-select.vue';
|
|
23
|
+
import WtSlider from './wt-slider/wt-slider.vue';
|
|
24
|
+
import WtSwitcher from './wt-switcher/wt-switcher.vue';
|
|
25
|
+
import WtTabs from './wt-tabs/wt-tabs.vue';
|
|
26
|
+
import WtTagsInput from './wt-tags-input/wt-tags-input.vue';
|
|
27
|
+
import WtTimeInput from './wt-time-input/wt-time-input.vue';
|
|
28
|
+
import WtTextarea from './wt-textarea/wt-textarea.vue';
|
|
29
|
+
import WtTimepicker from './wt-timepicker/wt-timepicker.vue';
|
|
30
|
+
import WtLabel from './wt-label/wt-label.vue';
|
|
31
|
+
import WtButtonSelect from './wt-button-select/wt-button-select.vue';
|
|
32
|
+
import WtHint from './wt-hint/wt-hint.vue';
|
|
33
|
+
import WtCopyAction from './wt-copy-action/wt-copy-action.vue';
|
|
34
|
+
import WtLoadBar from './wt-load-bar/wt-load-bar.vue';
|
|
35
|
+
import WtItemLink from './wt-item-link/wt-item-link.vue';
|
|
36
|
+
import WtDummy from './wt-dummy/wt-dummy.vue';
|
|
37
|
+
import WtAppHeader from './wt-app-header/wt-app-header.vue';
|
|
38
|
+
import WtAppNavigator from './wt-app-header/wt-app-navigator.vue';
|
|
39
|
+
import WtFiltersPanelWrapper from './wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue';
|
|
40
|
+
import WtHeaderActions from './wt-app-header/wt-header-actions.vue';
|
|
41
|
+
import WtErrorPage from './wt-error-page/wt-error-page.vue';
|
|
42
|
+
import WtHeadline from './wt-headline/wt-headline.vue';
|
|
43
|
+
import WtHeadlineNav from './wt-headline-nav/wt-headline-nav.vue';
|
|
44
|
+
import WtNavigationBar from './wt-navigation-bar/wt-navigation-bar.vue';
|
|
45
|
+
import WtNotificationsBar from './wt-notifications-bar/wt-notifications-bar.vue';
|
|
46
|
+
import WtPageWrapper from './wt-page-wrapper/wt-page-wrapper.vue';
|
|
47
|
+
import WtPagination from './wt-pagination/wt-pagination.vue';
|
|
48
|
+
import WtPlayer from './wt-player/wt-player.vue';
|
|
49
|
+
import WtStatusSelect from './wt-status-select/wt-status-select.vue';
|
|
50
|
+
import WtTable from './wt-table/wt-table.vue';
|
|
51
|
+
import WtTableActions from './wt-table-actions/wt-table-actions.vue';
|
|
52
|
+
import WtTableColumnSelect from './wt-table-column-select/wt-table-column-select.vue';
|
|
53
|
+
import WtIconAction from './wt-icon-action/wt-icon-action.vue';
|
|
54
|
+
import WtPageHeader from './wt-page-header/wt-page-header.vue';
|
|
55
|
+
import WtStepper from './wt-stepper/wt-stepper.vue';
|
|
56
|
+
import WtExpansionPanel
|
|
57
|
+
from './wt-expansion-panel/wt-expansion-panel.vue';
|
|
55
58
|
|
|
56
59
|
const Components = {
|
|
57
60
|
WtAvatar,
|
|
@@ -68,7 +71,6 @@ const Components = {
|
|
|
68
71
|
WtRoundedAction,
|
|
69
72
|
WtCheckbox,
|
|
70
73
|
WtDatepicker,
|
|
71
|
-
WtDatetimepicker,
|
|
72
74
|
WtIconBtn,
|
|
73
75
|
WtInput,
|
|
74
76
|
WtHint,
|
|
@@ -105,6 +107,12 @@ const Components = {
|
|
|
105
107
|
WtContextMenu,
|
|
106
108
|
WtCopyAction,
|
|
107
109
|
WtLoadBar,
|
|
110
|
+
WtIconAction,
|
|
111
|
+
WtPageHeader,
|
|
112
|
+
WtItemLink,
|
|
113
|
+
WtDummy,
|
|
114
|
+
WtStepper,
|
|
115
|
+
WtExpansionPanel,
|
|
108
116
|
};
|
|
109
117
|
|
|
110
118
|
export default Components;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtCcAgentStatusTimers from '../wt-cc-agent-status-timers.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtCcAgentStatusTimers', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtCcAgentStatusTimers, {
|
|
7
|
+
props: {
|
|
8
|
+
status: {
|
|
9
|
+
online: 123,
|
|
10
|
+
pause: 123,
|
|
11
|
+
offline: 123,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
expect(wrapper.exists())
|
|
16
|
+
.toBe(true);
|
|
17
|
+
});
|
|
18
|
+
it('renders component with empty status prop', () => {
|
|
19
|
+
const wrapper = shallowMount(WtCcAgentStatusTimers, {
|
|
20
|
+
props: { status: {} },
|
|
21
|
+
});
|
|
22
|
+
expect(wrapper.exists())
|
|
23
|
+
.toBe(true);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="wt-cc-agent-status-timers">
|
|
3
|
+
<wt-indicator
|
|
4
|
+
color="disabled"
|
|
5
|
+
:text="status.offline"
|
|
6
|
+
:size="size"
|
|
7
|
+
></wt-indicator>
|
|
8
|
+
<wt-indicator
|
|
9
|
+
color="success"
|
|
10
|
+
:text="status.online"
|
|
11
|
+
:size="size"
|
|
12
|
+
></wt-indicator>
|
|
13
|
+
<wt-indicator
|
|
14
|
+
color="primary"
|
|
15
|
+
:text="status.pause"
|
|
16
|
+
:size="size"
|
|
17
|
+
></wt-indicator>
|
|
18
|
+
</article>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
/**
|
|
24
|
+
* @description Status object
|
|
25
|
+
* @type {Object}
|
|
26
|
+
* @property {String} offline
|
|
27
|
+
* @property {String} online
|
|
28
|
+
* @property {String} pause
|
|
29
|
+
*/
|
|
30
|
+
status: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'md',
|
|
37
|
+
options: ['sm', 'md'],
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
.wt-cc-agent-status-timers {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--spacing-sm);
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -1,51 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<transition
|
|
3
|
+
name="expand"
|
|
4
|
+
@after-enter="afterEnter"
|
|
5
|
+
@enter="enter"
|
|
6
|
+
@leave="leave"
|
|
7
|
+
>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</transition>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
1
12
|
<script>
|
|
2
13
|
/* eslint-disable no-param-reassign */
|
|
3
14
|
// https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
|
|
4
15
|
export default {
|
|
5
16
|
name: 'wt-expand-transition',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enter(element) {
|
|
17
|
-
const { width } = getComputedStyle(element);
|
|
18
|
-
element.style.width = width;
|
|
19
|
-
element.style.position = 'absolute';
|
|
20
|
-
element.style.visibility = 'hidden';
|
|
21
|
-
element.style.height = 'auto';
|
|
17
|
+
methods: {
|
|
18
|
+
afterEnter(element) {
|
|
19
|
+
element.style.height = 'auto';
|
|
20
|
+
},
|
|
21
|
+
enter(element) {
|
|
22
|
+
const { width } = getComputedStyle(element);
|
|
23
|
+
element.style.width = width;
|
|
24
|
+
element.style.position = 'absolute';
|
|
25
|
+
element.style.visibility = 'hidden';
|
|
26
|
+
element.style.height = 'auto';
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
const { height } = getComputedStyle(element);
|
|
29
|
+
element.style.width = null;
|
|
30
|
+
element.style.position = null;
|
|
31
|
+
element.style.visibility = null;
|
|
32
|
+
element.style.height = 0;
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
// Force repaint to make sure the
|
|
35
|
+
// animation is triggered correctly.
|
|
36
|
+
// eslint-disable-next-line no-unused-expressions
|
|
37
|
+
getComputedStyle(element).height;
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
// eslint-disable-next-line no-return-assign
|
|
40
|
+
requestAnimationFrame(() => element.style.height = height);
|
|
41
|
+
},
|
|
42
|
+
leave(element) {
|
|
43
|
+
const { height } = getComputedStyle(element);
|
|
44
|
+
element.style.height = height;
|
|
45
|
+
// eslint-disable-next-line no-unused-expressions
|
|
46
|
+
getComputedStyle(element).height;
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
return createElement('transition', data, context.children);
|
|
48
|
+
// eslint-disable-next-line no-return-assign
|
|
49
|
+
requestAnimationFrame(() => element.style.height = 0);
|
|
50
|
+
},
|
|
49
51
|
},
|
|
50
52
|
};
|
|
51
53
|
</script>
|
package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtAppNavigator.spec.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import WebitelApplications from '
|
|
2
|
+
import WebitelApplications from '../../../enums/WebitelApplications/WebitelApplications.enum';
|
|
3
3
|
import WtAppNavigator from '../wt-app-navigator.vue';
|
|
4
4
|
|
|
5
5
|
const apps = [
|
|
@@ -14,7 +14,7 @@ describe('WtAppNavigator', () => {
|
|
|
14
14
|
});
|
|
15
15
|
it('renders specified app cards', () => {
|
|
16
16
|
const wrapper = shallowMount(WtAppNavigator, {
|
|
17
|
-
|
|
17
|
+
props: {
|
|
18
18
|
apps,
|
|
19
19
|
},
|
|
20
20
|
});
|
package/src/components/{organisms/wt-app-header → wt-app-header}/__tests__/WtHeaderActions.spec.js
RENAMED
|
@@ -13,7 +13,7 @@ describe('WtHeaderActions', () => {
|
|
|
13
13
|
account: 'acc@ou.nt',
|
|
14
14
|
};
|
|
15
15
|
const wrapper = shallowMount(WtHeaderActions, {
|
|
16
|
-
|
|
16
|
+
props: { user },
|
|
17
17
|
});
|
|
18
18
|
expect(wrapper.find('.wt-header-actions__name').text()).toBe(user.name);
|
|
19
19
|
expect(wrapper.find('.wt-header-actions__account').text()).toBe(user.account);
|