@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,68 @@
|
|
|
1
|
+
### Different colors
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
5
|
+
<wt-rounded-action icon="call" color="primary"></wt-rounded-action>
|
|
6
|
+
<wt-rounded-action icon="call" color="secondary"></wt-rounded-action>
|
|
7
|
+
<wt-rounded-action icon="call" disabled></wt-rounded-action>
|
|
8
|
+
<wt-rounded-action icon="call" color="success"></wt-rounded-action>
|
|
9
|
+
<wt-rounded-action icon="call" color="error"></wt-rounded-action>
|
|
10
|
+
<wt-rounded-action icon="call" color="transfer"></wt-rounded-action>
|
|
11
|
+
</div>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Active (pressed) buttons
|
|
15
|
+
```vue
|
|
16
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
17
|
+
<wt-rounded-action active icon="call" color="primary"></wt-rounded-action>
|
|
18
|
+
<wt-rounded-action active icon="call" color="secondary"></wt-rounded-action>
|
|
19
|
+
<wt-rounded-action active icon="call" disabled></wt-rounded-action>
|
|
20
|
+
<wt-rounded-action active icon="call" color="success"></wt-rounded-action>
|
|
21
|
+
<wt-rounded-action active icon="call" color="error"></wt-rounded-action>
|
|
22
|
+
<wt-rounded-action active icon="call" color="transfer"></wt-rounded-action>
|
|
23
|
+
</div>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Wide buttons
|
|
27
|
+
```vue
|
|
28
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
29
|
+
<wt-rounded-action wide icon="call" color="secondary"></wt-rounded-action>
|
|
30
|
+
<wt-rounded-action wide rounded icon="call" color="secondary"></wt-rounded-action>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Rounded buttons
|
|
35
|
+
```vue
|
|
36
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
37
|
+
<wt-rounded-action rounded icon="call" color="primary"></wt-rounded-action>
|
|
38
|
+
<wt-rounded-action rounded icon="call" color="secondary"></wt-rounded-action>
|
|
39
|
+
<wt-rounded-action rounded icon="call" disabled></wt-rounded-action>
|
|
40
|
+
<wt-rounded-action rounded icon="call" color="success"></wt-rounded-action>
|
|
41
|
+
<wt-rounded-action rounded icon="call" color="error"></wt-rounded-action>
|
|
42
|
+
<wt-rounded-action rounded icon="call" color="transfer"></wt-rounded-action>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Small (sm) buttons
|
|
47
|
+
```vue
|
|
48
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
49
|
+
<wt-rounded-action size="sm" icon="call" color="primary"></wt-rounded-action>
|
|
50
|
+
<wt-rounded-action size="sm" icon="call" color="secondary"></wt-rounded-action>
|
|
51
|
+
<wt-rounded-action size="sm" icon="call" disabled></wt-rounded-action>
|
|
52
|
+
<wt-rounded-action size="sm" icon="call" color="success"></wt-rounded-action>
|
|
53
|
+
<wt-rounded-action size="sm" icon="call" color="error"></wt-rounded-action>
|
|
54
|
+
<wt-rounded-action size="sm" icon="call" color="transfer"></wt-rounded-action>
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Loading-state buttons
|
|
59
|
+
```vue
|
|
60
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
61
|
+
<wt-rounded-action size="sm" icon="call" color="primary" loading></wt-rounded-action>
|
|
62
|
+
<wt-rounded-action size="sm" icon="call" color="secondary" loading></wt-rounded-action>
|
|
63
|
+
<wt-rounded-action size="sm" icon="call" disabled loading></wt-rounded-action>
|
|
64
|
+
<wt-rounded-action size="sm" icon="call" color="success" loading></wt-rounded-action>
|
|
65
|
+
<wt-rounded-action size="sm" icon="call" color="error" loading></wt-rounded-action>
|
|
66
|
+
<wt-rounded-action size="sm" icon="call" color="transfer" loading></wt-rounded-action>
|
|
67
|
+
</div>
|
|
68
|
+
```
|
|
@@ -3,7 +3,7 @@ import WtRoundedAction from '../wt-rounded-action.vue';
|
|
|
3
3
|
|
|
4
4
|
describe('WtRoundedAction', () => {
|
|
5
5
|
it('renders a component', () => {
|
|
6
|
-
const wrapper = shallowMount(WtRoundedAction, {
|
|
6
|
+
const wrapper = shallowMount(WtRoundedAction, { props: { icon: 'call' } });
|
|
7
7
|
expect(wrapper.classes('wt-rounded-action')).toBe(true);
|
|
8
8
|
});
|
|
9
9
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--rounded-action-border-size: 2px;
|
|
3
|
+
--rounded-action-padding: calc(var(--spacing-xs) - var(--rounded-action-border-size));
|
|
4
|
+
|
|
5
|
+
--rounded-action-rounded-border-radius: var(--border-radius--pill);
|
|
6
|
+
|
|
7
|
+
--rounded-action-bg-color: var(--dp-20-surface-color);
|
|
8
|
+
--rounded-action-bg-hover-color: var(--dp-22-surface-color);
|
|
9
|
+
|
|
10
|
+
--rounded-action-active-color: var(--dp-10-surface-color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root.theme--dark {
|
|
14
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:class="[
|
|
4
|
+
`wt-rounded-action--size-${size}`,
|
|
5
|
+
{ 'wt-rounded-action--active': active },
|
|
6
|
+
{ 'wt-rounded-action--disabled': disabled },
|
|
7
|
+
{ 'wt-rounded-action--rounded': rounded },
|
|
8
|
+
{ 'wt-rounded-action--wide': wide },
|
|
9
|
+
]"
|
|
10
|
+
type="button"
|
|
11
|
+
class="wt-rounded-action"
|
|
12
|
+
@click="emit('click', $event)"
|
|
13
|
+
>
|
|
14
|
+
<wt-loader
|
|
15
|
+
v-if="loading"
|
|
16
|
+
size="sm"
|
|
17
|
+
:color="loaderColor"
|
|
18
|
+
></wt-loader>
|
|
19
|
+
<wt-icon
|
|
20
|
+
v-else
|
|
21
|
+
:color="iColor"
|
|
22
|
+
:icon="icon"
|
|
23
|
+
:size="size"
|
|
24
|
+
></wt-icon>
|
|
25
|
+
</button>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup>
|
|
29
|
+
import { computed } from 'vue';
|
|
30
|
+
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
icon: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @values 'primary', 'secondary', 'success', 'error', 'transfer'
|
|
38
|
+
*/
|
|
39
|
+
color: {
|
|
40
|
+
type: String,
|
|
41
|
+
options: ['primary', 'secondary', 'success', 'error', 'transfer'],
|
|
42
|
+
default: 'secondary',
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* @values 'sm', 'md'
|
|
46
|
+
*/
|
|
47
|
+
size: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: 'md',
|
|
50
|
+
},
|
|
51
|
+
active: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
55
|
+
disabled: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false,
|
|
58
|
+
},
|
|
59
|
+
rounded: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Stretches button to all available width
|
|
65
|
+
*/
|
|
66
|
+
wide: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
loading: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
const emit = defineEmits(['click']);
|
|
76
|
+
|
|
77
|
+
const iColor = computed(() => {
|
|
78
|
+
if (props.disabled) return 'disabled';
|
|
79
|
+
switch (props.color) {
|
|
80
|
+
case 'secondary': return 'default';
|
|
81
|
+
default: return props.color;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const loaderColor = computed(() => {
|
|
85
|
+
// if (['success', 'transfer', 'error'].includes(props.color)) return 'main';
|
|
86
|
+
return 'contrast';
|
|
87
|
+
});
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style lang="scss">
|
|
91
|
+
@import './variables.scss';
|
|
92
|
+
</style>
|
|
93
|
+
|
|
94
|
+
<style lang="scss" scoped>
|
|
95
|
+
.wt-rounded-action {
|
|
96
|
+
display: block;
|
|
97
|
+
width: fit-content;
|
|
98
|
+
line-height: 0;
|
|
99
|
+
padding: var(--rounded-action-padding);
|
|
100
|
+
border: var(--rounded-action-border-size) solid;
|
|
101
|
+
background: var(--rounded-action-bg-color);
|
|
102
|
+
border-color: var(--rounded-action-bg-color);
|
|
103
|
+
border-radius: var(--border-radius);
|
|
104
|
+
transition: var(--transition);
|
|
105
|
+
|
|
106
|
+
&:hover {
|
|
107
|
+
background: var(--rounded-action-bg-hover-color);
|
|
108
|
+
border-color: var(--rounded-action-bg-hover-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&--wide {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--rounded {
|
|
116
|
+
border-radius: var(--rounded-action-rounded-border-radius);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--active {
|
|
120
|
+
border-color: var(--rounded-action-active-color);
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
border-color: var(--rounded-action-active-color);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.wt-rounded-action--disabled {
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&--size {
|
|
132
|
+
&-sm {
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&-md {
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
</style>
|
package/src/components/{molecules/wt-search-bar → wt-search-bar}/__tests__/WtSearchBar.spec.js
RENAMED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
1
2
|
import { shallowMount } from '@vue/test-utils';
|
|
2
3
|
import WtSearchBar from '../wt-search-bar.vue';
|
|
4
|
+
import { useValidation } from '../../../mixins/validationMixin/useValidation';
|
|
5
|
+
|
|
6
|
+
jest.mock('../../../mixins/validationMixin/useValidation');
|
|
7
|
+
useValidation.mockImplementation(() => ({
|
|
8
|
+
isValidation: ref(false),
|
|
9
|
+
invalid: ref(false),
|
|
10
|
+
validationText: ref(''),
|
|
11
|
+
}));
|
|
3
12
|
|
|
4
13
|
describe('WtSearchBar', () => {
|
|
5
14
|
it('renders a component', () => {
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="{
|
|
4
|
+
'wt-search-bar--outline': outline,
|
|
5
|
+
'wt-search-bar--invalid': invalid,
|
|
6
|
+
}"
|
|
7
|
+
class="wt-search-bar"
|
|
8
|
+
>
|
|
9
|
+
<div class="wt-search-bar__wrapper">
|
|
10
|
+
<div class="wt-search-bar__search-icon">
|
|
11
|
+
<slot
|
|
12
|
+
:invalid="invalid"
|
|
13
|
+
name="search-icon"
|
|
14
|
+
>
|
|
15
|
+
<wt-icon
|
|
16
|
+
:color="invalidColorProvider"
|
|
17
|
+
icon="search"
|
|
18
|
+
></wt-icon>
|
|
19
|
+
</slot>
|
|
20
|
+
</div>
|
|
21
|
+
<input
|
|
22
|
+
:placeholder="placeholder || $t('webitelUI.searchBar.placeholder')"
|
|
23
|
+
:value="value"
|
|
24
|
+
class="wt-search-bar__input"
|
|
25
|
+
type="search"
|
|
26
|
+
@input="handleInput($event.target.value)"
|
|
27
|
+
@keyup="handleKeyup"
|
|
28
|
+
>
|
|
29
|
+
<div class="wt-search-bar__icon-controls">
|
|
30
|
+
<wt-icon-btn
|
|
31
|
+
:class="{ 'hidden': !value }"
|
|
32
|
+
class="wt-search-bar__reset-icon-btn"
|
|
33
|
+
icon="close"
|
|
34
|
+
:color="invalidColorProvider"
|
|
35
|
+
@click="handleInput('')"
|
|
36
|
+
></wt-icon-btn>
|
|
37
|
+
<wt-hint
|
|
38
|
+
v-if="hint"
|
|
39
|
+
:iconColor="invalidColorProvider"
|
|
40
|
+
>{{ hint }}
|
|
41
|
+
</wt-hint>
|
|
42
|
+
<slot
|
|
43
|
+
:invalid="invalid"
|
|
44
|
+
name="additional-actions"
|
|
45
|
+
></slot>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { computed, toRefs } from 'vue';
|
|
53
|
+
import debounce from '../../scripts/debounce';
|
|
54
|
+
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
55
|
+
|
|
56
|
+
const props = defineProps({
|
|
57
|
+
v: {
|
|
58
|
+
type: Object,
|
|
59
|
+
},
|
|
60
|
+
customValidators: {
|
|
61
|
+
type: Array,
|
|
62
|
+
default: () => [],
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Current search-bar value (`v-model`)
|
|
66
|
+
*/
|
|
67
|
+
value: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* search-bar placeholder
|
|
73
|
+
*/
|
|
74
|
+
placeholder: {
|
|
75
|
+
type: String,
|
|
76
|
+
},
|
|
77
|
+
outline: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
81
|
+
hint: {
|
|
82
|
+
type: String,
|
|
83
|
+
description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const emit = defineEmits([
|
|
88
|
+
'input',
|
|
89
|
+
'search',
|
|
90
|
+
'enter',
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
const { v, customValidators } = toRefs(props);
|
|
94
|
+
|
|
95
|
+
const { invalid } = useValidation({ v, customValidators });
|
|
96
|
+
|
|
97
|
+
const invalidColorProvider = computed(() => {
|
|
98
|
+
return invalid.value ? 'danger' : null;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const search = debounce((value) => {
|
|
102
|
+
emit('search', value);
|
|
103
|
+
}, 1000);
|
|
104
|
+
|
|
105
|
+
function handleInput(value) {
|
|
106
|
+
emit('input', value);
|
|
107
|
+
search(value);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function handleKeyup(event) {
|
|
111
|
+
if (event.key === 'Enter') {
|
|
112
|
+
search(props.value);
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
} else if (event.key === 'Esc') {
|
|
115
|
+
handleInput('');
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style lang="scss">
|
|
122
|
+
@import './variables.scss';
|
|
123
|
+
</style>
|
|
124
|
+
|
|
125
|
+
<style lang="scss" scoped>
|
|
126
|
+
|
|
127
|
+
.wt-search-bar {
|
|
128
|
+
cursor: text;
|
|
129
|
+
|
|
130
|
+
&.wt-search-bar--invalid {
|
|
131
|
+
.wt-search-bar__wrapper {
|
|
132
|
+
border-color: var(--false-color);
|
|
133
|
+
outline: none; // prevent outline overlapping false color
|
|
134
|
+
}
|
|
135
|
+
.wt-search-bar__input {
|
|
136
|
+
color: var(--false-color);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.wt-search-bar__wrapper {
|
|
141
|
+
border: var(--input-border);
|
|
142
|
+
border-color: var(--form-border-color);
|
|
143
|
+
border-radius: var(--border-radius);
|
|
144
|
+
display: flex;
|
|
145
|
+
padding: calc(var(--spacing-xs) - 1px) var(--spacing-xs);
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: var(--spacing-xs);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.wt-search-bar__search-icon {
|
|
151
|
+
display: flex;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.wt-search-bar__reset-icon-btn {
|
|
155
|
+
.wt-search-bar:not(:focus-within) & {
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
opacity: 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.wt-search-bar__input {
|
|
162
|
+
@extend %typo-body-1;
|
|
163
|
+
@include wt-placeholder;
|
|
164
|
+
|
|
165
|
+
display: block;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
width: 100%;
|
|
168
|
+
padding: 0;
|
|
169
|
+
transition: var(--transition);
|
|
170
|
+
color: var(--form-input-color);
|
|
171
|
+
border: none;
|
|
172
|
+
outline: none;
|
|
173
|
+
|
|
174
|
+
&:focus {
|
|
175
|
+
@include wt-placeholder('focus');
|
|
176
|
+
border-color: var(--form-border--hover-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.wt-search-bar--outline & {
|
|
180
|
+
border-color: var(--form-outline-border-color);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.wt-search-bar--outline:hover &,
|
|
184
|
+
.wt-search-bar--outline &:focus {
|
|
185
|
+
border-color: var(--form-outline-border--hover-color);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* make icons black */
|
|
190
|
+
.wt-search-bar:hover ::v-deep .wt-icon__icon,
|
|
191
|
+
.wt-search-bar:focus-within ::v-deep .wt-icon__icon {
|
|
192
|
+
fill: var(--icon-color--hover);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* clears the 'X' from Internet Explorer */
|
|
196
|
+
.wt-search-bar__input::-ms-clear {
|
|
197
|
+
display: none;
|
|
198
|
+
width: 0;
|
|
199
|
+
height: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.wt-search-bar__input::-ms-reveal {
|
|
203
|
+
display: none;
|
|
204
|
+
width: 0;
|
|
205
|
+
height: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* clears the 'X' from Chrome */
|
|
209
|
+
.wt-search-bar__input::-webkit-search-decoration,
|
|
210
|
+
.wt-search-bar__input::-webkit-search-cancel-button,
|
|
211
|
+
.wt-search-bar__input::-webkit-search-results-button,
|
|
212
|
+
.wt-search-bar__input::-webkit-search-results-decoration {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.wt-search-bar__icon-controls {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: var(--spacing-xs);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
1
|
+
import { mount, shallowMount } from '@vue/test-utils';
|
|
2
2
|
import WtSelect from '../wt-select.vue';
|
|
3
3
|
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
4
|
|
|
@@ -15,12 +15,12 @@ describe('WtSelect', () => {
|
|
|
15
15
|
|
|
16
16
|
it('renders label text when passed', () => {
|
|
17
17
|
const label = 'Hello there';
|
|
18
|
-
const wrapper =
|
|
18
|
+
const wrapper = mount(WtSelect, {
|
|
19
19
|
stubs: {
|
|
20
20
|
WtLabel,
|
|
21
21
|
WtIcon: true,
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
props: { label },
|
|
24
24
|
});
|
|
25
25
|
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
26
26
|
});
|
package/src/components/{molecules/wt-select → wt-select}/mixins/__tests__/multiselectMixin.spec.js
RENAMED
|
@@ -15,18 +15,18 @@ describe('MultiselectMixin', () => {
|
|
|
15
15
|
it('Correctly computes internal search options', () => {
|
|
16
16
|
const options = ['1', '2'];
|
|
17
17
|
const wrapper = shallowMount(Component, {
|
|
18
|
-
|
|
18
|
+
props: { options },
|
|
19
19
|
});
|
|
20
|
-
expect(wrapper.vm.selectOptions).
|
|
20
|
+
expect(wrapper.vm.selectOptions).toEqual(options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
it('Correctly computes internal search options: search case', async () => {
|
|
24
24
|
const options = ['1', '2'];
|
|
25
25
|
const searchOptions = ['1'];
|
|
26
26
|
const wrapper = shallowMount(Component, {
|
|
27
|
-
|
|
27
|
+
props: { options, searchMethod: () => ({ items: searchOptions }) },
|
|
28
28
|
});
|
|
29
29
|
await wrapper.vm.$nextTick();
|
|
30
|
-
expect(wrapper.vm.selectOptions).
|
|
30
|
+
expect(wrapper.vm.selectOptions).toEqual(searchOptions);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import VueMultiselect from 'vue-multiselect';
|
|
2
2
|
import { ObserveVisibility } from 'vue-observe-visibility';
|
|
3
3
|
import validationMixin
|
|
4
|
-
from '
|
|
5
|
-
import debounce from '
|
|
6
|
-
import isEmpty from '
|
|
4
|
+
from '../../../mixins/validationMixin/validationMixin';
|
|
5
|
+
import debounce from '../../../scripts/debounce';
|
|
6
|
+
import isEmpty from '../../../scripts/isEmpty';
|
|
7
7
|
import labelUsageMixin from '../../wt-label/mixins/labelUsageMixin';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
@@ -63,6 +63,11 @@ export default {
|
|
|
63
63
|
searchHasNext: true,
|
|
64
64
|
}),
|
|
65
65
|
computed: {
|
|
66
|
+
selectOptionLabel() {
|
|
67
|
+
// trackBy === null means that options are not objects but primitives
|
|
68
|
+
if (this.trackBy === null) return null;
|
|
69
|
+
return this.optionLabel || this.defaultOptionLabel;
|
|
70
|
+
},
|
|
66
71
|
isApiMode() {
|
|
67
72
|
return !!this.searchMethod;
|
|
68
73
|
},
|
|
@@ -99,7 +104,7 @@ export default {
|
|
|
99
104
|
getOptionLabel({ option, optionLabel }) {
|
|
100
105
|
if (optionLabel && option[optionLabel]) return option[optionLabel];
|
|
101
106
|
if (option.locale) {
|
|
102
|
-
if (Array.isArray(option.locale)) return this.$
|
|
107
|
+
if (Array.isArray(option.locale)) return this.$t(...option.locale);
|
|
103
108
|
return this.$t(option.locale);
|
|
104
109
|
}
|
|
105
110
|
return option[this.defaultOptionLabel] || option;
|
|
@@ -10,21 +10,25 @@
|
|
|
10
10
|
class="wt-select"
|
|
11
11
|
>
|
|
12
12
|
<wt-label
|
|
13
|
+
v-bind="labelProps"
|
|
13
14
|
v-if="hasLabel"
|
|
14
15
|
:disabled="disabled"
|
|
15
16
|
:invalid="invalid"
|
|
16
17
|
class="wt-select__label"
|
|
17
|
-
v-bind="labelProps"
|
|
18
18
|
>
|
|
19
19
|
<!-- @slot Custom input label -->
|
|
20
|
-
<slot
|
|
20
|
+
<slot
|
|
21
|
+
v-bind="{ label }"
|
|
22
|
+
name="label"
|
|
23
|
+
>{{ requiredLabel }}</slot>
|
|
21
24
|
</wt-label>
|
|
22
25
|
<vue-multiselect
|
|
26
|
+
v-bind="$attrs"
|
|
23
27
|
ref="vue-multiselect"
|
|
24
28
|
:allow-empty="allowEmpty"
|
|
25
29
|
:disabled="disabled"
|
|
26
30
|
:internal-search="!searchMethod"
|
|
27
|
-
:label="
|
|
31
|
+
:label="selectOptionLabel"
|
|
28
32
|
:limit="1"
|
|
29
33
|
:loading="false"
|
|
30
34
|
:multiple="multiple"
|
|
@@ -33,7 +37,6 @@
|
|
|
33
37
|
:track-by="trackBy"
|
|
34
38
|
:model-value="selectValue"
|
|
35
39
|
class="wt-select__select"
|
|
36
|
-
v-bind="$attrs"
|
|
37
40
|
@close="isOpened = false"
|
|
38
41
|
@open="isOpened = true"
|
|
39
42
|
v-on="listeners"
|
|
@@ -51,7 +54,10 @@
|
|
|
51
54
|
|
|
52
55
|
<!-- Slot for custom label template for single select-->
|
|
53
56
|
<template v-slot:singleLabel="{ option }">
|
|
54
|
-
<slot
|
|
57
|
+
<slot
|
|
58
|
+
v-bind="{ option, optionLabel }"
|
|
59
|
+
name="singleLabel"
|
|
60
|
+
>
|
|
55
61
|
<span class="multiselect__single-label">
|
|
56
62
|
{{ getOptionLabel({ option, optionLabel }) }}
|
|
57
63
|
</span>
|
|
@@ -60,7 +66,10 @@
|
|
|
60
66
|
|
|
61
67
|
<!-- Slot for custom option template -->
|
|
62
68
|
<template v-slot:option="{ option }">
|
|
63
|
-
<slot
|
|
69
|
+
<slot
|
|
70
|
+
v-bind="{ option, optionLabel }"
|
|
71
|
+
name="option"
|
|
72
|
+
>
|
|
64
73
|
{{ getOptionLabel({ option, optionLabel }) }}
|
|
65
74
|
</slot>
|
|
66
75
|
</template>
|
|
@@ -72,7 +81,7 @@
|
|
|
72
81
|
:disabled="disabled"
|
|
73
82
|
class="multiselect__select"
|
|
74
83
|
icon="arrow-down"
|
|
75
|
-
@mousedown.
|
|
84
|
+
@mousedown.prevent.stop="toggle"
|
|
76
85
|
></wt-icon-btn>
|
|
77
86
|
</template>
|
|
78
87
|
|
|
@@ -94,7 +103,7 @@
|
|
|
94
103
|
</div>
|
|
95
104
|
</template>
|
|
96
105
|
|
|
97
|
-
<template v-if="showIntersectionObserver" slot
|
|
106
|
+
<template v-if="showIntersectionObserver" v-slot:afterList>
|
|
98
107
|
<div v-observe-visibility="handleAfterListIntersect"></div>
|
|
99
108
|
</template>
|
|
100
109
|
</vue-multiselect>
|
|
@@ -125,6 +134,7 @@ export default {
|
|
|
125
134
|
default: true,
|
|
126
135
|
},
|
|
127
136
|
},
|
|
137
|
+
emits: ['reset', 'search-change', 'input', 'closed'],
|
|
128
138
|
data: () => ({
|
|
129
139
|
isOpened: false,
|
|
130
140
|
}),
|
|
@@ -140,8 +150,12 @@ export default {
|
|
|
140
150
|
};
|
|
141
151
|
</script>
|
|
142
152
|
|
|
153
|
+
<style lang="scss">
|
|
154
|
+
@import './variables.scss';
|
|
155
|
+
</style>
|
|
156
|
+
|
|
143
157
|
<style lang="scss" scoped>
|
|
144
|
-
@import '
|
|
158
|
+
@import './multiselect.scss';
|
|
145
159
|
|
|
146
160
|
.wt-select {
|
|
147
161
|
width: 100%;
|
|
@@ -20,11 +20,11 @@ and swapping height/width of this component in order to have the correct output.
|
|
|
20
20
|
'wt-slider--disabled': disabled,
|
|
21
21
|
'wt-slider--vertical': vertical,
|
|
22
22
|
}"
|
|
23
|
-
:style="{ height: verticalHeight }"
|
|
23
|
+
:style="{ height: vertical && verticalHeight }"
|
|
24
24
|
class="wt-slider"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
:style="{ width: verticalHeight }"
|
|
27
|
+
:style="{ width: !vertical && verticalHeight }"
|
|
28
28
|
class="wt-slider__wrapper"
|
|
29
29
|
>
|
|
30
30
|
<!-- The row above is needed in order to set correct component width when slider is vertical -->
|
|
@@ -80,7 +80,7 @@ export default {
|
|
|
80
80
|
computed: {
|
|
81
81
|
progressStyle() { // To achieve the correct color styling:
|
|
82
82
|
const progressPercent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
83
|
-
return `linear-gradient(to right, var(--
|
|
83
|
+
return `linear-gradient(to right, var(--primary-color) ${progressPercent}%, var(--secondary-color) 0%)`;
|
|
84
84
|
},
|
|
85
85
|
verticalHeight() { // in order to have correct parent height after slider rotation
|
|
86
86
|
return this.vertical ? `${this.height}px` : '100%';
|
|
@@ -94,7 +94,12 @@ export default {
|
|
|
94
94
|
};
|
|
95
95
|
</script>
|
|
96
96
|
|
|
97
|
+
<style lang="scss">
|
|
98
|
+
@import './variables.scss';
|
|
99
|
+
</style>
|
|
100
|
+
|
|
97
101
|
<style lang="scss" scoped>
|
|
102
|
+
|
|
98
103
|
.wt-slider__wrapper {
|
|
99
104
|
display: flex;
|
|
100
105
|
align-items: center;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import WtStatusSelect from '../wt-status-select.vue';
|
|
3
|
-
import WtSelect from '
|
|
3
|
+
import WtSelect from '../../wt-select/wt-select.vue';
|
|
4
4
|
|
|
5
5
|
describe('WtStatusSelect', () => {
|
|
6
6
|
it('renders a component', () => {
|