@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[{'wt-expansion-panel--opened':open},
|
|
4
|
+
`wt-expansion-panel--${props.size}`]"
|
|
5
|
+
class="wt-expansion-panel"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="wt-expansion-panel-header"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
@click="open = !open"
|
|
11
|
+
@keypress.enter="open = !open"
|
|
12
|
+
>
|
|
13
|
+
<slot name="title"></slot>
|
|
14
|
+
<wt-icon
|
|
15
|
+
icon="arrow-right"
|
|
16
|
+
></wt-icon>
|
|
17
|
+
</div>
|
|
18
|
+
<wt-expand-transition>
|
|
19
|
+
<div v-show="open">
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</wt-expand-transition>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { ref } from 'vue';
|
|
28
|
+
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
size: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'md',
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const open = ref(true);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" scoped>
|
|
40
|
+
.wt-expansion-panel {
|
|
41
|
+
.wt-expansion-panel-header {
|
|
42
|
+
@extend %typo-subtitle-1;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
padding: var(--spacing-2xs) var(--spacing-xs);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
border-radius: var(--spacing-2xs);
|
|
48
|
+
background-color: var(--secondary-color-50);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.wt-icon {
|
|
52
|
+
margin-left: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--sm {
|
|
56
|
+
.wt-expansion-panel-header {
|
|
57
|
+
@extend %typo-subtitle-2;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--opened {
|
|
62
|
+
.wt-icon {
|
|
63
|
+
transform: rotate(90deg);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -93,7 +93,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
93
93
|
& {
|
|
94
94
|
grid-template-columns: repeat(5, 1fr);
|
|
95
95
|
|
|
96
|
-
> *:nth-child(n+6) {
|
|
96
|
+
:deep(> *:nth-child(n+6)) {
|
|
97
97
|
display: none;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -103,7 +103,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
103
103
|
& {
|
|
104
104
|
grid-template-columns: repeat(4, 1fr);
|
|
105
105
|
|
|
106
|
-
> *:nth-child(n+5) {
|
|
106
|
+
:deep(> *:nth-child(n+5)) {
|
|
107
107
|
display: none;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -113,7 +113,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
113
113
|
& {
|
|
114
114
|
grid-template-columns: repeat(3, 1fr);
|
|
115
115
|
|
|
116
|
-
> *:nth-child(n+4) {
|
|
116
|
+
:deep(> *:nth-child(n+4)) {
|
|
117
117
|
display: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -123,7 +123,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
123
123
|
& {
|
|
124
124
|
grid-template-columns: repeat(2, 1fr);
|
|
125
125
|
|
|
126
|
-
> *:nth-child(n+3) {
|
|
126
|
+
:deep(> *:nth-child(n+3)) {
|
|
127
127
|
display: none;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -133,14 +133,14 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
133
133
|
& {
|
|
134
134
|
grid-template-columns: repeat(1, 1fr);
|
|
135
135
|
|
|
136
|
-
> *:nth-child(n+2) {
|
|
136
|
+
:deep(> *:nth-child(n+2)) {
|
|
137
137
|
display: none;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.filters-panel-wrapper--opened .filters-wrap > * {
|
|
143
|
+
.filters-panel-wrapper--opened .filters-wrap :deep(> *) {
|
|
144
144
|
display: block;
|
|
145
145
|
}
|
|
146
146
|
</style>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav class="wt-headline-nav">
|
|
3
3
|
<div
|
|
4
|
-
class="wt-headline-nav__wrapper"
|
|
5
4
|
v-for="(singlePath, key) of path"
|
|
6
5
|
:key="key"
|
|
6
|
+
class="wt-headline-nav__wrapper"
|
|
7
7
|
>
|
|
8
8
|
<span v-if="key !== 0" class="wt-headline-nav__indicator"></span>
|
|
9
9
|
<h1 class="wt-headline-nav__title">
|
|
10
10
|
<router-link
|
|
11
11
|
v-if="singlePath.route"
|
|
12
|
-
class="wt-headline-nav__text wt-headline-nav__title-link"
|
|
13
12
|
:to="singlePath.route"
|
|
13
|
+
class="wt-headline-nav__text wt-headline-nav__text--link"
|
|
14
14
|
>{{ singlePath.name }}
|
|
15
15
|
</router-link>
|
|
16
16
|
<span v-else class="wt-headline-nav__text">{{ singlePath.name }}</span>
|
|
@@ -19,43 +19,57 @@
|
|
|
19
19
|
</nav>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<script>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
22
|
+
<script setup>
|
|
23
|
+
const props = defineProps({
|
|
24
|
+
/**
|
|
25
|
+
* PATH EXAMPLE
|
|
26
|
+
* default: () => [
|
|
27
|
+
* { name: 'directory' },
|
|
28
|
+
* { name: 'users', route: '/directory/users' },
|
|
29
|
+
* { name: 'adm', route: '/directory/users/3' },
|
|
30
|
+
* ],
|
|
31
|
+
*/
|
|
32
|
+
path: {
|
|
33
|
+
type: Array,
|
|
34
|
+
required: true,
|
|
36
35
|
},
|
|
37
|
-
};
|
|
36
|
+
});
|
|
38
37
|
</script>
|
|
39
38
|
|
|
39
|
+
<style lang="scss">
|
|
40
|
+
@import './variables.scss';
|
|
41
|
+
</style>
|
|
42
|
+
|
|
40
43
|
<style lang="scss" scoped>
|
|
41
44
|
.wt-headline-nav {
|
|
42
45
|
display: flex;
|
|
43
46
|
align-items: center;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
gap: var(--headline-nav-gap);
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
.wt-headline-nav__wrapper {
|
|
47
52
|
display: flex;
|
|
48
53
|
align-items: center;
|
|
54
|
+
gap: var(--headline-nav-dot-gap);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.wt-headline-nav__indicator {
|
|
52
|
-
display:
|
|
53
|
-
|
|
54
|
-
height: var(--headline-nav-indicator-size);
|
|
55
|
-
margin: 0 var(--headline-nav-indicator-margin);
|
|
56
|
-
background: var(--icon-color);
|
|
57
|
-
border-radius: 50%;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
58
60
|
flex-shrink: 0;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: var(--icon-md-size);
|
|
63
|
+
height: var(--icon-md-size);
|
|
64
|
+
|
|
65
|
+
&:before {
|
|
66
|
+
display: block;
|
|
67
|
+
width: var(--headline-nav-indicator-size);
|
|
68
|
+
height: var(--headline-nav-indicator-size);
|
|
69
|
+
content: '';
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
background: var(--headline-nav-indicator-color);
|
|
72
|
+
}
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
.wt-headline-nav__title {
|
|
@@ -63,23 +77,21 @@ export default {
|
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
.wt-headline-nav__text {
|
|
66
|
-
color: var(--text-
|
|
80
|
+
color: var(--main-text-color);
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
.wt-headline-nav__wrapper:last-child {
|
|
70
84
|
min-width: 0;
|
|
71
85
|
|
|
72
86
|
.wt-headline-nav__indicator {
|
|
73
|
-
|
|
87
|
+
&:before {
|
|
88
|
+
background: var(--headline-nav-accent-indicator-color);
|
|
89
|
+
}
|
|
74
90
|
}
|
|
75
91
|
|
|
76
92
|
.wt-headline-nav__title {
|
|
77
93
|
overflow: hidden;
|
|
78
94
|
text-overflow: ellipsis;
|
|
79
95
|
}
|
|
80
|
-
|
|
81
|
-
.wt-headline-nav__text {
|
|
82
|
-
color: var(--text-primary-color);
|
|
83
|
-
}
|
|
84
96
|
}
|
|
85
97
|
</style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<template v-slot:activator>
|
|
4
4
|
<wt-icon-btn
|
|
5
5
|
icon="rounded-info"
|
|
6
|
-
color="
|
|
6
|
+
:color="iconColor"
|
|
7
7
|
></wt-icon-btn>
|
|
8
8
|
</template>
|
|
9
9
|
<slot></slot>
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
export default {
|
|
15
15
|
name: 'wt-hint',
|
|
16
|
+
props: {
|
|
17
|
+
iconColor: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'outline',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
16
22
|
};
|
|
17
23
|
</script>
|
|
18
24
|
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
|
|
2
|
+
```vue
|
|
3
|
+
<wt-icon icon="edit"></wt-icon>
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
Different color icons:
|
|
7
|
+
```vue
|
|
8
|
+
const colors = ['default', 'active', 'disabled', 'primary', 'error', 'success', 'warning', 'on-dark', 'on-light', 'on-primary', 'info', 'chat', 'transfer', 'job'];
|
|
9
|
+
|
|
10
|
+
<div
|
|
11
|
+
style="display: flex; align-items: center; gap: 5px;"
|
|
12
|
+
v-for="color of this.colors"
|
|
13
|
+
:key="color"
|
|
14
|
+
>
|
|
15
|
+
<wt-icon
|
|
16
|
+
icon="edit"
|
|
17
|
+
size="lg"
|
|
18
|
+
:color="color"
|
|
19
|
+
></wt-icon>
|
|
20
|
+
{{ color }}
|
|
21
|
+
</div>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## How does it work?
|
|
25
|
+
|
|
26
|
+
Icons are located in <code>assets/icons/sprite</code> directory, in <code>SVG</code> format,
|
|
27
|
+
without <code>width</code> and <code>height</code> attributes, but with <code>
|
|
28
|
+
[viewBox](https://developer.mozilla.org/ru/docs/Web/SVG/Attribute/viewBox)
|
|
29
|
+
</code> attribute.
|
|
30
|
+
(<code>viewBox</code> is provided by designer in svg pic itself - so you just need to check it presence,
|
|
31
|
+
by the way check for `width` `height` absence).
|
|
32
|
+
|
|
33
|
+
For example:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
const img = require('./docs/svg-icon-code-example.png');
|
|
37
|
+
<img :src="this.img" alt="svg icon code example">
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
At build stage, <code><a href="https://github.com/JetBrains/svg-sprite-loader#svg-sprite-loader">svg-sprite-loader</a></code>
|
|
41
|
+
collects all icons (looking for "All files`.svg` in all directories, which names include `sprite`,
|
|
42
|
+
). This rule is described in <code>vue.config.js:</code>
|
|
43
|
+
(from "Quick Start" icons installation section):
|
|
44
|
+
|
|
45
|
+
<pre class="language-javascript"><code>
|
|
46
|
+
config.module
|
|
47
|
+
.rule('svg')
|
|
48
|
+
.exclude.add(/^(.*sprite).*\.svg/); // same as in svg-sprite-loader
|
|
49
|
+
|
|
50
|
+
config.module
|
|
51
|
+
.rule('svg-sprite')
|
|
52
|
+
.test(/^(.*sprite).*\.svg/) // same as in svg-url-loader
|
|
53
|
+
.use('svg-sprite-loader')
|
|
54
|
+
.loader('svg-sprite-loader');
|
|
55
|
+
</code></pre>
|
|
56
|
+
|
|
57
|
+
So that, all these icons are collected in one sprite. This sprite is injected in <code>index.html</code>.
|
|
58
|
+
|
|
59
|
+
For example: (By the way, you can check it if you want to see, which icons were collected in this sprite):
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
const img = require('./docs/svg-sprite-in-dom.png');
|
|
63
|
+
<img :src="this.img" alt="svg-sprite-in-dom">
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then, these icons can be used as:
|
|
67
|
+
|
|
68
|
+
<pre class="language-html"><code>
|
|
69
|
+
<svg><use xlink:href="#attach"></use></svg>
|
|
70
|
+
// or, using wt-icon component:
|
|
71
|
+
<wt-icon icon="attach"></wt-icon>
|
|
72
|
+
</code></pre>
|
|
73
|
+
|
|
74
|
+
## How to install your custom icons to project?
|
|
75
|
+
|
|
76
|
+
`svg-sprite-loader` webpack rule in <code>vue.config.js</code> also collects all icons from `sprite`
|
|
77
|
+
directories in project and adds it to final sprite.
|
|
78
|
+
|
|
79
|
+
*In fact, webitel-ui icons are added to sprite just cause they're imported from
|
|
80
|
+
"sprite" directory - just in <code>node_modules</code>*
|
|
81
|
+
|
|
82
|
+
For stylistic purposes, it's recommended to allocate icons in <code>src/(app?)/assets/icons/sprite/*</code>,
|
|
83
|
+
So that developers and designer could find (and then check or update) them in any project.
|
|
84
|
+
|
|
85
|
+
All icons from this directory should be imported in <code>index.js</code> in this directory
|
|
86
|
+
(create `index.js` if it doesn't exist).
|
|
87
|
+
|
|
88
|
+
Then, `index.html` should be imported in `main.js`:
|
|
89
|
+
<pre class="language-javascript"><code>import './assets/icons/sprite';</code></pre>
|
|
90
|
+
|
|
91
|
+
And, then, if you put some new icons in this directory, and import them in `index.js`,
|
|
92
|
+
they automatically become available in project.
|
|
93
|
+
|
|
94
|
+
### Simple TODO:
|
|
95
|
+
* Create directory `src/(app?)/assets/icons/sprite/` (if doesn't exists)
|
|
96
|
+
* in this folder, create `index.js` (if doesn't exists)
|
|
97
|
+
* Import `index.js` to `>main.js` (if doesn't exists)
|
|
98
|
+
* Put icon to this directory, and import it to `index.js`
|
|
99
|
+
* That's all, you're awesome!
|
|
100
|
+
|
|
101
|
+
## Icon sprites naming convention:
|
|
102
|
+
|
|
103
|
+
App-specific icons are highly recommended to be named with the prefix corresponding to this application.
|
|
104
|
+
|
|
105
|
+
The reason is: when you see an icon usage, you will be able to distinguish `svg` location:
|
|
106
|
+
in this app, or library - and update it, if needed.
|
|
107
|
+
*For example, if you want to move this icon from app to library, you just need to remove `icon-prefix` prop
|
|
108
|
+
from all icon usages (and, of course, rename the icon file)*
|
|
109
|
+
|
|
110
|
+
### Icon prefix corresponding to application:
|
|
111
|
+
* **Webitel UI:** no prefix
|
|
112
|
+
* **Admin:** `adm-`
|
|
113
|
+
* **Workspace:** `ws-`
|
|
114
|
+
* **Supervisor:** `sv-`
|
|
115
|
+
* **History:** `hs-`
|
|
116
|
+
* **Webitel CC UI:** `cc-`
|
|
117
|
+
|
|
118
|
+
## How to clean up icons before adding them to project?
|
|
119
|
+
|
|
120
|
+
After export from Figma, icons should be cleaned up to avoid a few issues.
|
|
121
|
+
|
|
122
|
+
Use this checklist:
|
|
123
|
+
1. **Remove** `width` and `height` from svg-tag
|
|
124
|
+
```
|
|
125
|
+
const img = require('./docs/cleanup-svg-width-height.png');
|
|
126
|
+
<img :src="this.img" alt="Remove width and height">
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
2. **Check** `viewBox`: it's size should be square **(BUT DO NOT DELETE!)**
|
|
130
|
+
|
|
131
|
+
If there's an issue, contact the designer.
|
|
132
|
+
|
|
133
|
+
Incorrect:
|
|
134
|
+
```
|
|
135
|
+
const img = require('./docs/cleanup-svg-viewbox-incorrect.png');
|
|
136
|
+
<img :src="this.img" alt="viewBox is incorrect">
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Correct:
|
|
140
|
+
```
|
|
141
|
+
const img = require('./docs/cleanup-svg-viewbox-correct.png');
|
|
142
|
+
<img :src="this.img" alt="viewBox is correct">
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
4. **Remove** `fill="none"` from svg-tag
|
|
146
|
+
```
|
|
147
|
+
const img = require('./docs/cleanup-svg-fill-none.png');
|
|
148
|
+
<img :src="this.img" alt="Remove "fill=none"">
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
5. **Remove** all `fill=""` with default color
|
|
152
|
+
|
|
153
|
+
*Default "fill" should be cleaned up, cause Figma adds it to icon by default, but we are
|
|
154
|
+
changing this fill in styles to suit our needs.
|
|
155
|
+
But! Specific colors should stay in svg-code. (for instance, red dot in `record` icon)*
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
const img = require('./docs/cleanup-svg-fill.png');
|
|
159
|
+
<img :src="this.img" alt="Remove this fill">
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```vue
|
|
163
|
+
<template>
|
|
164
|
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, 120px); grid-gap: var(--spacing-xs);">
|
|
165
|
+
<div
|
|
166
|
+
style="text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px;"
|
|
167
|
+
v-for="icon of this.icons"
|
|
168
|
+
:key="icon"
|
|
169
|
+
>
|
|
170
|
+
<wt-icon
|
|
171
|
+
:icon="icon"
|
|
172
|
+
size="xl"
|
|
173
|
+
></wt-icon>
|
|
174
|
+
{{ icon }}
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</template>
|
|
178
|
+
|
|
179
|
+
<script setup>
|
|
180
|
+
const icons = [
|
|
181
|
+
'email',
|
|
182
|
+
'adfs',
|
|
183
|
+
'azure',
|
|
184
|
+
'instagram',
|
|
185
|
+
'zoom-in',
|
|
186
|
+
'zoom-out',
|
|
187
|
+
'send-arrow',
|
|
188
|
+
'close',
|
|
189
|
+
'close--filled',
|
|
190
|
+
'attach',
|
|
191
|
+
'mail',
|
|
192
|
+
'mail--color',
|
|
193
|
+
'telegram-bot',
|
|
194
|
+
'messenger-infobip',
|
|
195
|
+
'messenger-telegram',
|
|
196
|
+
'messenger-telegram--filled',
|
|
197
|
+
'messenger-facebook',
|
|
198
|
+
'messenger-facebook--filled',
|
|
199
|
+
'messenger-viber',
|
|
200
|
+
'messenger-viber--filled',
|
|
201
|
+
'messenger-web-chat',
|
|
202
|
+
'messenger-whatsapp',
|
|
203
|
+
'messenger-whatsapp--filled',
|
|
204
|
+
'messenger-messenger',
|
|
205
|
+
'meta',
|
|
206
|
+
'lock',
|
|
207
|
+
'move',
|
|
208
|
+
'queue-member',
|
|
209
|
+
'history',
|
|
210
|
+
'generate',
|
|
211
|
+
'google',
|
|
212
|
+
'rounded-info',
|
|
213
|
+
'copy',
|
|
214
|
+
'menu',
|
|
215
|
+
'clear',
|
|
216
|
+
'video-cam',
|
|
217
|
+
'video-cam-off',
|
|
218
|
+
'bell',
|
|
219
|
+
'bell-badged',
|
|
220
|
+
'star',
|
|
221
|
+
'star--filled',
|
|
222
|
+
'sound-on',
|
|
223
|
+
'sound-off',
|
|
224
|
+
'back',
|
|
225
|
+
'prompter',
|
|
226
|
+
'play',
|
|
227
|
+
'pause',
|
|
228
|
+
'stop',
|
|
229
|
+
'download',
|
|
230
|
+
'upload',
|
|
231
|
+
'filter',
|
|
232
|
+
'column-select',
|
|
233
|
+
'refresh',
|
|
234
|
+
'calendar',
|
|
235
|
+
'radio',
|
|
236
|
+
'radio--checked',
|
|
237
|
+
'checkbox',
|
|
238
|
+
'checkbox--checked',
|
|
239
|
+
'checkbox--checked--filled',
|
|
240
|
+
'eye--closed',
|
|
241
|
+
'eye--opened',
|
|
242
|
+
'numpad',
|
|
243
|
+
'settings',
|
|
244
|
+
'docs',
|
|
245
|
+
'logout',
|
|
246
|
+
'account',
|
|
247
|
+
'app-navigator',
|
|
248
|
+
'collapse',
|
|
249
|
+
'expand',
|
|
250
|
+
'bucket',
|
|
251
|
+
'tick',
|
|
252
|
+
'edit',
|
|
253
|
+
'plus',
|
|
254
|
+
'search',
|
|
255
|
+
'rec-off',
|
|
256
|
+
'rec',
|
|
257
|
+
'note',
|
|
258
|
+
'mic',
|
|
259
|
+
'mic-muted',
|
|
260
|
+
'hold',
|
|
261
|
+
'contacts',
|
|
262
|
+
'done',
|
|
263
|
+
'attention',
|
|
264
|
+
|
|
265
|
+
'call',
|
|
266
|
+
'call--filled',
|
|
267
|
+
'call-end',
|
|
268
|
+
'call-end--filled',
|
|
269
|
+
'call-transfer',
|
|
270
|
+
'call-transfer--filled',
|
|
271
|
+
'call-ringing',
|
|
272
|
+
'call-ringing--filled',
|
|
273
|
+
'call-missed',
|
|
274
|
+
'call-missed--filled',
|
|
275
|
+
'call-add-to',
|
|
276
|
+
'call-add-to--filled',
|
|
277
|
+
'call-disconnect',
|
|
278
|
+
'call-disconnect--filled',
|
|
279
|
+
'call-outbound',
|
|
280
|
+
'call-outbound--filled',
|
|
281
|
+
'call-inbound',
|
|
282
|
+
'call-inbound--filled',
|
|
283
|
+
|
|
284
|
+
'chat',
|
|
285
|
+
'chat--filled',
|
|
286
|
+
'chat-join',
|
|
287
|
+
'chat-transfer',
|
|
288
|
+
'chat-transfer--filled',
|
|
289
|
+
'chat-end',
|
|
290
|
+
'chat-end--filled',
|
|
291
|
+
'chat-group',
|
|
292
|
+
'chat-quick-response',
|
|
293
|
+
'chat-quick-response--filled',
|
|
294
|
+
'chat-send',
|
|
295
|
+
'chat-emoji',
|
|
296
|
+
'chat-reply',
|
|
297
|
+
'chat-message-status-sent',
|
|
298
|
+
'chat-message-status-read',
|
|
299
|
+
|
|
300
|
+
'job',
|
|
301
|
+
'job--accept',
|
|
302
|
+
'job--end',
|
|
303
|
+
|
|
304
|
+
'sort-arrow-down',
|
|
305
|
+
'sort-arrow-up',
|
|
306
|
+
'arrow-down',
|
|
307
|
+
'arrow-left',
|
|
308
|
+
'arrow-mix',
|
|
309
|
+
'arrow-right',
|
|
310
|
+
'arrow-up',
|
|
311
|
+
'tts-download',
|
|
312
|
+
'stt',
|
|
313
|
+
'stt-download',
|
|
314
|
+
'stt-search',
|
|
315
|
+
'scorecard',
|
|
316
|
+
'idle',
|
|
317
|
+
'pin',
|
|
318
|
+
'unpin',
|
|
319
|
+
'options',
|
|
320
|
+
|
|
321
|
+
'preview-tag-video',
|
|
322
|
+
'preview-tag-audio',
|
|
323
|
+
'preview-tag-application',
|
|
324
|
+
'preview-tag-image',
|
|
325
|
+
].sort();
|
|
326
|
+
</script>
|
|
327
|
+
```
|
|
@@ -4,7 +4,7 @@ import WtIcon from '../wt-icon.vue';
|
|
|
4
4
|
describe('WtIcon', () => {
|
|
5
5
|
it('renders a component', () => {
|
|
6
6
|
const wrapper = shallowMount(WtIcon, {
|
|
7
|
-
|
|
7
|
+
props: {
|
|
8
8
|
icon: 'icon-name',
|
|
9
9
|
},
|
|
10
10
|
});
|
|
@@ -13,7 +13,7 @@ describe('WtIcon', () => {
|
|
|
13
13
|
it('correctly computes icon name', () => {
|
|
14
14
|
const iconName = '#jest-bucket';
|
|
15
15
|
const wrapper = shallowMount(WtIcon, {
|
|
16
|
-
|
|
16
|
+
props: {
|
|
17
17
|
icon: 'bucket',
|
|
18
18
|
size: 'sm',
|
|
19
19
|
iconPrefix: 'jest',
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
:root {
|
|
3
|
+
--icon-3xl-size: 56px;
|
|
4
|
+
--icon-2xl-size: 48px;
|
|
5
|
+
--icon-xl-size: 40px;
|
|
6
|
+
--icon-lg-size: 32px;
|
|
7
|
+
--icon-md-size: 24px;
|
|
8
|
+
--icon-sm-size: 16px;
|
|
9
|
+
--icon-xs-size: 8px;
|
|
10
|
+
|
|
11
|
+
--icon-color: var(--grey-darken-2);
|
|
12
|
+
--icon-active-color: var(--grey-darken-4);
|
|
13
|
+
--icon-primary-color: var(--primary-color);
|
|
14
|
+
--icon-error-color: var(--error-color);
|
|
15
|
+
--icon-success-color: var(--success-color);
|
|
16
|
+
--icon-warning-color: var(--warning-color);
|
|
17
|
+
--icon-on-dark-color: var(--white);
|
|
18
|
+
--icon-on-light-color: var(--grey-darken-3);
|
|
19
|
+
--icon-on-primary-color: var(--on-primary-color);
|
|
20
|
+
--icon-info-color: var(--info-color);
|
|
21
|
+
--icon-chat-color: var(--chat-color);
|
|
22
|
+
--icon-transfer-color: var(--transfer-color);
|
|
23
|
+
--icon-job-color: var(--job-color);
|
|
24
|
+
--icon-disabled-color: var(--grey-lighten-4);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:root.theme--dark {
|
|
28
|
+
--icon-color: var(--grey-lighten-2);
|
|
29
|
+
--icon-active-color: var(--grey-lighten-4);
|
|
30
|
+
--icon-disabled-color: var(--grey-darken-2);
|
|
31
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|