@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
:root {
|
|
3
3
|
--wt-app-header-min-height: 56px;
|
|
4
4
|
--wt-app-header-padding: var(--spacing-sm);
|
|
5
|
+
--wt-app-header-background: var(--dp-9-surface-color);
|
|
5
6
|
|
|
6
7
|
--wt-app-header-content-gap: var(--spacing-sm);
|
|
7
8
|
--wt-app-header-content-panel-margin: var(--spacing-2xs);
|
|
@@ -14,11 +15,11 @@
|
|
|
14
15
|
--wt-app-navigator-item-gap: var(--wt-app-header-content-gap);
|
|
15
16
|
--wt-app-navigator-item-border: 1px solid;
|
|
16
17
|
--wt-app-navigator-item-border-color: var(--secondary-color);
|
|
17
|
-
--wt-app-navigator-item-border-color--hover: var(--
|
|
18
|
+
--wt-app-navigator-item-border-color--hover: var(--primary-color);
|
|
18
19
|
|
|
19
20
|
--wt-header-actions-min-width: 120px;
|
|
20
21
|
--wt-header-actions-content-sections-gap: var(--spacing-lg);
|
|
21
22
|
--wt-header-actions-padding: var(--wt-app-header-content-gap);
|
|
22
23
|
--wt-header-actions-action-bg-color--hover: var(--secondary-color);
|
|
23
24
|
--wt-header-actions-action-link-padding: var(--spacing-xs);
|
|
24
|
-
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="wt-app-header">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</header>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'wt-app-header',
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style lang="scss">
|
|
14
|
+
@import './variables.scss';
|
|
15
|
+
</style>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
|
|
19
|
+
.wt-app-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
gap: var(--wt-app-header-content-gap);
|
|
24
|
+
min-height: var(--wt-app-header-min-height); // fixed height because anything can be put inside slot, so padding won't work properly
|
|
25
|
+
padding: var(--wt-app-header-padding);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
background: var(--wt-app-header-background);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<img
|
|
37
37
|
:alt="`${[WebitelApplications.AGENT]}-pic`"
|
|
38
38
|
class="wt-app-navigator__card__img"
|
|
39
|
-
src="
|
|
39
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-agent.svg"
|
|
40
40
|
>
|
|
41
41
|
</a>
|
|
42
42
|
</li>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<img
|
|
56
56
|
:alt="`${[WebitelApplications.SUPERVISOR]}-pic`"
|
|
57
57
|
class="wt-app-navigator__card__img"
|
|
58
|
-
src="
|
|
58
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-supervisor.svg"
|
|
59
59
|
>
|
|
60
60
|
</a>
|
|
61
61
|
</li>
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<img
|
|
75
75
|
:alt="`${[WebitelApplications.HISTORY]}-pic`"
|
|
76
76
|
class="wt-app-navigator__card__img"
|
|
77
|
-
src="
|
|
77
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-history.svg"
|
|
78
78
|
>
|
|
79
79
|
</a>
|
|
80
80
|
</li>
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<img
|
|
94
94
|
:alt="`${[WebitelApplications.AUDIT]}-pic`"
|
|
95
95
|
class="wt-app-navigator__card__img"
|
|
96
|
-
src="
|
|
96
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-audit.svg"
|
|
97
97
|
>
|
|
98
98
|
</a>
|
|
99
99
|
</li>
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<img
|
|
113
113
|
:alt="`${[WebitelApplications.ADMIN]}-pic`"
|
|
114
114
|
class="wt-app-navigator__card__img"
|
|
115
|
-
src="
|
|
115
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-admin.svg"
|
|
116
116
|
>
|
|
117
117
|
</a>
|
|
118
118
|
</li>
|
|
@@ -131,7 +131,45 @@
|
|
|
131
131
|
<img
|
|
132
132
|
:alt="`${[WebitelApplications.ANALYTICS]}-pic`"
|
|
133
133
|
class="wt-app-navigator__card__img"
|
|
134
|
-
src="
|
|
134
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-analytics.svg"
|
|
135
|
+
>
|
|
136
|
+
</a>
|
|
137
|
+
</li>
|
|
138
|
+
|
|
139
|
+
<li
|
|
140
|
+
v-if="formattedApps[WebitelApplications.AUDIT]"
|
|
141
|
+
:class="{'active': formattedApps[WebitelApplications.AUDIT].currentApp }"
|
|
142
|
+
class="wt-app-navigator__card"
|
|
143
|
+
>
|
|
144
|
+
<a
|
|
145
|
+
:href="formattedApps[WebitelApplications.AUDIT].href"
|
|
146
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.AUDIT]}`)"
|
|
147
|
+
class="wt-app-navigator__card__link"
|
|
148
|
+
target="_blank"
|
|
149
|
+
>
|
|
150
|
+
<img
|
|
151
|
+
:alt="`${[WebitelApplications.AUDIT]}-pic`"
|
|
152
|
+
class="wt-app-navigator__card__img"
|
|
153
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-audit.svg"
|
|
154
|
+
>
|
|
155
|
+
</a>
|
|
156
|
+
</li>
|
|
157
|
+
|
|
158
|
+
<li
|
|
159
|
+
v-if="formattedApps[WebitelApplications.CRM]"
|
|
160
|
+
:class="{'active': formattedApps[WebitelApplications.CRM].currentApp }"
|
|
161
|
+
class="wt-app-navigator__card"
|
|
162
|
+
>
|
|
163
|
+
<a
|
|
164
|
+
:href="formattedApps[WebitelApplications.CRM].href"
|
|
165
|
+
:title="$t(`webitelUI.appNavigator.${[WebitelApplications.CRM]}`)"
|
|
166
|
+
class="wt-app-navigator__card__link"
|
|
167
|
+
target="_blank"
|
|
168
|
+
>
|
|
169
|
+
<img
|
|
170
|
+
:alt="`${[WebitelApplications.CRM]}-pic`"
|
|
171
|
+
class="wt-app-navigator__card__img"
|
|
172
|
+
src="../../assets/components/organisms/wt-app-header/app-navigator/app-crm.svg"
|
|
135
173
|
>
|
|
136
174
|
</a>
|
|
137
175
|
</li>
|
|
@@ -142,44 +180,34 @@
|
|
|
142
180
|
</div>
|
|
143
181
|
</template>
|
|
144
182
|
|
|
145
|
-
<script>
|
|
146
|
-
import
|
|
147
|
-
|
|
148
|
-
export default {
|
|
149
|
-
name: 'wt-app-navigator',
|
|
150
|
-
data: () => ({
|
|
151
|
-
WebitelApplications,
|
|
152
|
-
isOpened: false,
|
|
153
|
-
}),
|
|
154
|
-
|
|
155
|
-
props: {
|
|
156
|
-
currentApp: {
|
|
157
|
-
type: String,
|
|
158
|
-
},
|
|
159
|
-
apps: {
|
|
160
|
-
type: Array,
|
|
161
|
-
default: () => [],
|
|
162
|
-
},
|
|
163
|
-
},
|
|
183
|
+
<script setup>
|
|
184
|
+
import { computed, ref } from 'vue';
|
|
185
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum';
|
|
164
186
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
}), {});
|
|
174
|
-
},
|
|
187
|
+
const props = defineProps({
|
|
188
|
+
currentApp: {
|
|
189
|
+
type: String,
|
|
190
|
+
},
|
|
191
|
+
apps: {
|
|
192
|
+
type: Array,
|
|
193
|
+
default: () => [],
|
|
175
194
|
},
|
|
195
|
+
});
|
|
176
196
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
197
|
+
const isOpened = ref(false);
|
|
198
|
+
|
|
199
|
+
const formattedApps = computed(() => props.apps.reduce((apps, app) => ({
|
|
200
|
+
...apps,
|
|
201
|
+
[app.name]: {
|
|
202
|
+
...app,
|
|
203
|
+
currentApp: props.currentApp === app.name,
|
|
181
204
|
},
|
|
182
|
-
};
|
|
205
|
+
}), {}));
|
|
206
|
+
|
|
207
|
+
function close() {
|
|
208
|
+
isOpened.value = false;
|
|
209
|
+
}
|
|
210
|
+
|
|
183
211
|
</script>
|
|
184
212
|
|
|
185
213
|
<style lang="scss" scoped>
|
|
@@ -239,6 +267,7 @@ export default {
|
|
|
239
267
|
display: inline-block;
|
|
240
268
|
width: 100%;
|
|
241
269
|
height: 100%;
|
|
270
|
+
cursor: pointer;
|
|
242
271
|
}
|
|
243
272
|
|
|
244
273
|
// img inside a
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--avatar-size--size-xs: calc(var(--_spacing-multiplicator) * 3);
|
|
3
|
+
--avatar-size--size-sm: calc(var(--_spacing-multiplicator) * 4);
|
|
4
|
+
--avatar-size--size-md: calc(var(--_spacing-multiplicator) * 5);
|
|
5
|
+
--avatar-size--size-lg: calc(var(--_spacing-multiplicator) * 7);
|
|
6
|
+
--avatar-size--size-xl: calc(var(--_spacing-multiplicator) * 9);
|
|
7
|
+
--avatar-size--size-2xl: calc(var(--_spacing-multiplicator) * 12);
|
|
8
|
+
--avatar-size--size-3xl: calc(var(--_spacing-multiplicator) * 16);
|
|
9
|
+
|
|
10
|
+
--avatar-size: var(--avatar-size--size-md);
|
|
11
|
+
|
|
12
|
+
--online-color: var(--true-color);
|
|
13
|
+
--dnd-color: var(--primary-color);
|
|
14
|
+
--busy-color: var(--false-color);
|
|
15
|
+
--offline-color: var(--secondary-color);
|
|
16
|
+
|
|
17
|
+
--avatar-font-color: var(--main-color);
|
|
18
|
+
|
|
19
|
+
--avatar-letters-p1-color: var(--red-lighten-2);
|
|
20
|
+
--avatar-letters-p2-color: var(--purple-lighten-2);
|
|
21
|
+
--avatar-letters-p3-color: var(--deep-purple-lighten-2);
|
|
22
|
+
--avatar-letters-p4-color: var(--indigo-lighten-2);
|
|
23
|
+
--avatar-letters-p5-color: var(--blue-lighten-1);
|
|
24
|
+
--avatar-letters-p6-color: var(--cyan-lighten-1);
|
|
25
|
+
--avatar-letters-p7-color: var(--teal-darken-3);
|
|
26
|
+
--avatar-letters-p8-color: var(--green-darken-2);
|
|
27
|
+
--avatar-letters-p9-color: var(--lime-darken-3);
|
|
28
|
+
--avatar-letters-p10-color: var(--yellow-darken-3);
|
|
29
|
+
--avatar-letters-p11-color: var(--amber-lighten-2);
|
|
30
|
+
--avatar-letters-p12-color: var(--orange-darken-1);
|
|
31
|
+
--avatar-letters-p13-color: var(--deep-purple-lighten-1);
|
|
32
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="wt-avatar"
|
|
4
|
+
:class="[`wt-avatar--size-${size}`]"
|
|
5
|
+
>
|
|
6
|
+
<wt-badge
|
|
7
|
+
v-if="badge"
|
|
8
|
+
:color-variable="badgeColorVar"
|
|
9
|
+
:icon-badge="isDnd ? 'dnd' : null"
|
|
10
|
+
></wt-badge>
|
|
11
|
+
<div
|
|
12
|
+
class="wt-avatar__letters"
|
|
13
|
+
v-if="isLetterAvatar"
|
|
14
|
+
:style="{ background: `var(${avatarLettersBackground})` }"
|
|
15
|
+
>
|
|
16
|
+
{{ avatarLetters }}
|
|
17
|
+
</div>
|
|
18
|
+
<img
|
|
19
|
+
v-else
|
|
20
|
+
class="wt-avatar__img"
|
|
21
|
+
:src="imgSrc"
|
|
22
|
+
alt="avatar"
|
|
23
|
+
>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed } from 'vue';
|
|
29
|
+
import defaultAvatar from '../../assets/components/atoms/wt-avatar/default-avatar.svg';
|
|
30
|
+
import AbstractUserStatus from '../../enums/AbstractUserStatus/AbstractUserStatus.enum';
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
src: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'md',
|
|
39
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
|
|
40
|
+
},
|
|
41
|
+
badge: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
username: {
|
|
46
|
+
type: String,
|
|
47
|
+
description: 'If passed, avatar is letter-based (if not passed src)',
|
|
48
|
+
},
|
|
49
|
+
status: {
|
|
50
|
+
type: String,
|
|
51
|
+
options: AbstractUserStatus,
|
|
52
|
+
default: AbstractUserStatus.OFFLINE,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const isLetterAvatar = computed(() => !props.src && props.username);
|
|
57
|
+
|
|
58
|
+
const avatarLetters = computed(() => {
|
|
59
|
+
if (!props.username) return false;
|
|
60
|
+
const abbreviation = props.username.split(' ').map((word) => word.at(0).toUpperCase()).join('');
|
|
61
|
+
return abbreviation.length > 2 ? abbreviation.at(0).concat(abbreviation.at(-1)) : abbreviation;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const avatarLettersBackground = computed(() => {
|
|
65
|
+
// en.concat(uk)
|
|
66
|
+
const letterList = [
|
|
67
|
+
{ letters: 'AB'.concat('АБВ'), color: '--avatar-letters-p1-color' },
|
|
68
|
+
{ letters: 'CD'.concat('ГҐД'), color: '--avatar-letters-p2-color' },
|
|
69
|
+
{ letters: 'EF'.concat('ЕЄЖ'), color: '--avatar-letters-p3-color' },
|
|
70
|
+
{ letters: 'GH'.concat('ЗИІ'), color: '--avatar-letters-p4-color' },
|
|
71
|
+
{ letters: 'IJ'.concat('ЇЙК'), color: '--avatar-letters-p5-color' },
|
|
72
|
+
{ letters: 'KL'.concat('ЛМН'), color: '--avatar-letters-p6-color' },
|
|
73
|
+
{ letters: 'MN'.concat('ОПР'), color: '--avatar-letters-p7-color' },
|
|
74
|
+
{ letters: 'OP'.concat('СТУ'), color: '--avatar-letters-p8-color' },
|
|
75
|
+
{ letters: 'QR'.concat('ФХЦ'), color: '--avatar-letters-p9-color' },
|
|
76
|
+
{ letters: 'ST'.concat('ЧШЩ'), color: '--avatar-letters-p10-color' },
|
|
77
|
+
{ letters: 'UV'.concat('ЬЮЯ'), color: '--avatar-letters-p11-color' },
|
|
78
|
+
{ letters: 'WX'.concat(''), color: '--avatar-letters-p12-color' },
|
|
79
|
+
{ letters: 'YZ'.concat(''), color: '--avatar-letters-p13-color' },
|
|
80
|
+
];
|
|
81
|
+
const searchedLetter = letterList.find(({ letters }) => letters.includes(avatarLetters.value.at(0).toUpperCase()));
|
|
82
|
+
return (searchedLetter && searchedLetter.color) || '--avatar-letters-p1-color';
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const imgSrc = computed(() => props.src || defaultAvatar);
|
|
86
|
+
|
|
87
|
+
const isDnd = computed(() => props.status === AbstractUserStatus.DND);
|
|
88
|
+
|
|
89
|
+
const badgeColorVar = computed(() => {
|
|
90
|
+
switch (props.status) {
|
|
91
|
+
case AbstractUserStatus.ACTIVE:
|
|
92
|
+
return 'online-color';
|
|
93
|
+
case AbstractUserStatus.DND:
|
|
94
|
+
return 'dnd-color';
|
|
95
|
+
case AbstractUserStatus.BUSY:
|
|
96
|
+
return 'busy-color';
|
|
97
|
+
case AbstractUserStatus.OFFLINE:
|
|
98
|
+
return 'offline-color';
|
|
99
|
+
default:
|
|
100
|
+
return 'offline-color';
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="scss">
|
|
106
|
+
@import './variables.scss';
|
|
107
|
+
</style>
|
|
108
|
+
|
|
109
|
+
<style lang="scss" scoped>
|
|
110
|
+
|
|
111
|
+
%wt-avatar-typo-sm {
|
|
112
|
+
font-size: 12px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
%wt-avatar-typo-lg {
|
|
116
|
+
font-size: 20px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
%wt-avatar-typo-2xl {
|
|
120
|
+
font-size: 36px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
%wt-avatar-typo-3xl {
|
|
124
|
+
font-size: 48px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.wt-avatar {
|
|
128
|
+
position: relative;
|
|
129
|
+
width: var(--avatar-size);
|
|
130
|
+
height: var(--avatar-size);
|
|
131
|
+
user-select: none;
|
|
132
|
+
border-radius: 50%;
|
|
133
|
+
|
|
134
|
+
&__letters {
|
|
135
|
+
height: 100%;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
color: var(--avatar-font-color);
|
|
140
|
+
border-radius: 50%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__img {
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--size-xs {
|
|
149
|
+
width: var(--avatar-size--size-xs);
|
|
150
|
+
height: var(--avatar-size--size-xs);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&--size-sm {
|
|
154
|
+
@extend %wt-avatar-typo-sm;
|
|
155
|
+
width: var(--avatar-size--size-sm);
|
|
156
|
+
height: var(--avatar-size--size-sm);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&--size-md {
|
|
160
|
+
width: var(--avatar-size--size-md);
|
|
161
|
+
height: var(--avatar-size--size-md);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&--size-lg {
|
|
165
|
+
@extend %wt-avatar-typo-lg;
|
|
166
|
+
width: var(--avatar-size--size-lg);
|
|
167
|
+
height: var(--avatar-size--size-lg);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&--size-xl {
|
|
171
|
+
width: var(--avatar-size--size-xl);
|
|
172
|
+
height: var(--avatar-size--size-xl);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&--size-2xl {
|
|
176
|
+
@extend %wt-avatar-typo-2xl;
|
|
177
|
+
width: var(--avatar-size--size-2xl);
|
|
178
|
+
height: var(--avatar-size--size-2xl);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&--size-3xl {
|
|
182
|
+
@extend %wt-avatar-typo-3xl;
|
|
183
|
+
width: var(--avatar-size--size-3xl);
|
|
184
|
+
height: var(--avatar-size--size-3xl);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
</style>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
import BadgeDnd from '
|
|
10
|
+
import BadgeDnd from '../../assets/icons/badge-dnd.svg';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
name: 'wt-badge',
|
|
@@ -28,25 +28,32 @@ export default {
|
|
|
28
28
|
computed: {
|
|
29
29
|
showIconBadge() {
|
|
30
30
|
switch (this.iconBadge) {
|
|
31
|
-
case 'dnd':
|
|
32
|
-
|
|
31
|
+
case 'dnd':
|
|
32
|
+
return BadgeDnd;
|
|
33
|
+
default:
|
|
34
|
+
return null;
|
|
33
35
|
}
|
|
34
36
|
},
|
|
35
37
|
},
|
|
36
38
|
};
|
|
37
39
|
</script>
|
|
38
40
|
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
@import './variables.scss';
|
|
43
|
+
</style>
|
|
44
|
+
|
|
39
45
|
<style lang="scss" scoped>
|
|
40
|
-
.wt-badge {
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
right: 0;
|
|
44
|
-
width: var(--wt-badge-size);
|
|
45
|
-
height: var(--wt-badge-size);
|
|
46
|
-
border-radius: 50%;
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
.wt-badge {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
width: var(--wt-badge-size);
|
|
52
|
+
height: var(--wt-badge-size);
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
|
|
55
|
+
&--outside {
|
|
56
|
+
transform: translate(100%, -100%);
|
|
51
57
|
}
|
|
58
|
+
}
|
|
52
59
|
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
### Different colors:
|
|
2
|
+
```vue
|
|
3
|
+
<div style="display: grid; grid-template-columns: 140px; gap: var(--spacing-xs);">
|
|
4
|
+
<wt-button>Primary</wt-button>
|
|
5
|
+
<wt-button color="secondary">Secondary</wt-button>
|
|
6
|
+
<wt-button disabled>Disabled</wt-button>
|
|
7
|
+
<wt-button color="success">Success</wt-button>
|
|
8
|
+
<wt-button color="error">Error</wt-button>
|
|
9
|
+
<wt-button color="transfer">Transfer</wt-button>
|
|
10
|
+
<wt-button color="job">Job</wt-button>
|
|
11
|
+
<wt-button color="info">info</wt-button>
|
|
12
|
+
</div>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Small button:
|
|
16
|
+
```vue
|
|
17
|
+
<wt-button size="sm">Small button</wt-button>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Wide button:
|
|
21
|
+
```vue
|
|
22
|
+
<wt-button wide>Wide button</wt-button>
|
|
23
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--btn-min-width: 90px;
|
|
3
|
+
--btn-padding: var(--spacing-xs) var(--spacing-sm);
|
|
4
|
+
--btn-padding--size-sm: var(--spacing-2xs) var(--spacing-xs);
|
|
5
|
+
|
|
6
|
+
// COLORS
|
|
7
|
+
--btn-primary-color: var(--primary-color);
|
|
8
|
+
--btn-primary-hover-color: var(--primary-hover-color);
|
|
9
|
+
--btn-primary-text-color: var(--on-primary-color);
|
|
10
|
+
|
|
11
|
+
--btn-secondary-color: var(--dp-10-surface-color);
|
|
12
|
+
--btn-secondary-hover-color: var(--dp-14-surface-color);
|
|
13
|
+
--btn-secondary-text-color: var(--grey-darken-4);
|
|
14
|
+
|
|
15
|
+
--btn-success-color: var(--success-color);
|
|
16
|
+
--btn-success-hover-color: var(--success-hover-color);
|
|
17
|
+
--btn-success-text-color: var(--grey-lighten-5);
|
|
18
|
+
|
|
19
|
+
--btn-info-color: var(--info-color);
|
|
20
|
+
--btn-info-hover-color: var(--info-hover-color);
|
|
21
|
+
--btn-info-text-color: var(--grey-lighten-5);
|
|
22
|
+
|
|
23
|
+
--btn-job-color: var(--job-color);
|
|
24
|
+
--btn-job-hover-color: var(--job-hover-color);
|
|
25
|
+
--btn-job-text-color: var(--grey-lighten-5);
|
|
26
|
+
|
|
27
|
+
--btn-error-color: var(--error-color);
|
|
28
|
+
--btn-error-hover-color: var(--error-hover-color);
|
|
29
|
+
--btn-error-text-color: var(--grey-lighten-5);
|
|
30
|
+
|
|
31
|
+
--btn-transfer-color: var(--transfer-color);
|
|
32
|
+
--btn-transfer-hover-color: var(--transfer-hover-color);
|
|
33
|
+
--btn-transfer-text-color: var(--on-transfer-color);
|
|
34
|
+
|
|
35
|
+
--btn-disabled-color: var(--dp-16-surface-color);
|
|
36
|
+
--btn-disabled-text-color: var(--grey-darken-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:root.theme--dark {
|
|
40
|
+
--btn-secondary-text-color: var(--grey-lighten-4);
|
|
41
|
+
}
|