@webitel/ui-sdk 23.12.2 → 23.12.5-1

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.
Files changed (191) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/img/sprite/index.js +148 -1
  3. package/dist/img/sprite/link.svg +8 -0
  4. package/dist/img/sprite/variable-select.svg +9 -0
  5. package/dist/plyr.svg +70 -0
  6. package/dist/ui-sdk.css +1 -1
  7. package/dist/ui-sdk.mjs +22670 -0
  8. package/dist/ui-sdk.umd.js +37 -43084
  9. package/package.json +34 -40
  10. package/src/api/axios/generateInstance.js +1 -1
  11. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
  12. package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
  13. package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
  14. package/src/components/transitions/wt-expand-transition.vue +2 -2
  15. package/src/components/wt-app-header/_variables.scss +1 -1
  16. package/src/components/wt-app-header/wt-app-header.vue +2 -5
  17. package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
  18. package/src/components/wt-app-header/wt-header-actions.vue +30 -14
  19. package/src/components/wt-avatar/_variables.scss +1 -1
  20. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  21. package/src/components/wt-badge/wt-badge.vue +3 -3
  22. package/src/components/wt-button/_variables.scss +2 -32
  23. package/src/components/wt-button/wt-button.vue +5 -3
  24. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +9 -8
  25. package/src/components/wt-button-select/wt-button-select.vue +58 -59
  26. package/src/components/wt-checkbox/wt-checkbox.vue +15 -48
  27. package/src/components/wt-chip/_variables.scss +21 -2
  28. package/src/components/wt-chip/wt-chip.scss +20 -17
  29. package/src/components/wt-chip/wt-chip.vue +10 -5
  30. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  31. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  32. package/src/components/wt-datepicker/_variables.scss +1 -1
  33. package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
  34. package/src/components/wt-divider/wt-divider.vue +1 -1
  35. package/src/components/wt-dummy/wt-dummy.vue +6 -2
  36. package/src/components/wt-error-page/wt-error-page.vue +10 -4
  37. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  38. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
  39. package/src/components/wt-headline/wt-headline.vue +4 -4
  40. package/src/components/wt-headline-nav/_variables.scss +5 -2
  41. package/src/components/wt-headline-nav/wt-headline-nav.vue +46 -33
  42. package/src/components/wt-hint/wt-hint.vue +5 -6
  43. package/src/components/wt-icon/_variables.scss +5 -10
  44. package/src/components/wt-icon/wt-icon.vue +15 -6
  45. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  46. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  47. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  48. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  49. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  50. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  51. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  52. package/src/components/wt-icon-btn/wt-icon-btn.vue +4 -2
  53. package/src/components/wt-indicator/_variables.scss +14 -19
  54. package/src/components/wt-indicator/wt-indicator.vue +26 -27
  55. package/src/components/wt-input/wt-input.vue +200 -219
  56. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  57. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  58. package/src/components/wt-label/_variables.scss +4 -2
  59. package/src/components/wt-label/wt-label.vue +5 -18
  60. package/src/components/wt-load-bar/wt-load-bar.vue +7 -4
  61. package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
  62. package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
  63. package/src/components/wt-loader/_variables.scss +2 -2
  64. package/src/components/wt-loader/wt-loader.vue +10 -3
  65. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +17 -9
  66. package/src/components/wt-notification/wt-notification.vue +4 -4
  67. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
  68. package/src/components/wt-page-header/wt-page-header.vue +7 -8
  69. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
  70. package/src/components/wt-pagination/wt-pagination.vue +17 -15
  71. package/src/components/wt-player/__tests__/WtPlayer.spec.js +1 -1
  72. package/src/components/wt-player/_variables.scss +1 -1
  73. package/src/components/wt-player/wt-player.vue +17 -17
  74. package/src/components/wt-popup/_variables.scss +4 -3
  75. package/src/components/wt-popup/wt-popup.vue +18 -10
  76. package/src/components/wt-progress-bar/_variables.scss +10 -8
  77. package/src/components/wt-progress-bar/wt-progress-bar.vue +27 -18
  78. package/src/components/wt-radio/wt-radio.vue +26 -54
  79. package/src/components/wt-rounded-action/_variables.scss +4 -35
  80. package/src/components/wt-rounded-action/wt-rounded-action.vue +15 -70
  81. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  82. package/src/components/wt-search-bar/wt-search-bar.vue +18 -42
  83. package/src/components/wt-select/_multiselect.scss +48 -53
  84. package/src/components/wt-select/_variables.scss +0 -3
  85. package/src/components/wt-select/mixins/multiselectMixin.js +9 -1
  86. package/src/components/wt-select/wt-select.vue +41 -40
  87. package/src/components/wt-slider/_variables.scss +6 -0
  88. package/src/components/wt-slider/wt-slider.vue +25 -9
  89. package/src/components/wt-status-select/_variables.scss +7 -4
  90. package/src/components/wt-status-select/wt-status-select.vue +18 -12
  91. package/src/components/wt-stepper/_variables.scss +5 -0
  92. package/src/components/wt-stepper/wt-stepper.vue +15 -9
  93. package/src/components/wt-switcher/_variables.scss +30 -7
  94. package/src/components/wt-switcher/wt-switcher.vue +56 -35
  95. package/src/components/wt-table/_variables.scss +8 -5
  96. package/src/components/wt-table/wt-table.vue +123 -90
  97. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  98. package/src/components/wt-table-column-select/wt-table-column-select.vue +33 -28
  99. package/src/components/wt-tabs/_variables.scss +4 -4
  100. package/src/components/wt-tabs/wt-tabs.vue +15 -13
  101. package/src/components/wt-tags-input/wt-tags-input.vue +26 -35
  102. package/src/components/wt-textarea/wt-textarea.vue +37 -54
  103. package/src/components/wt-time-input/wt-time-input.vue +24 -54
  104. package/src/components/wt-timepicker/wt-timepicker.vue +19 -27
  105. package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +0 -10
  106. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  107. package/src/components/wt-tooltip/_variables.scss +2 -4
  108. package/src/components/wt-tooltip/wt-tooltip.vue +6 -18
  109. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  110. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +1 -1
  111. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
  112. package/src/css/styleguide/colors/_colors.scss +45 -29
  113. package/src/css/styleguide/colors/reusable/_text-field.scss +36 -0
  114. package/src/css/styleguide/placeholder/_placeholder.scss +9 -9
  115. package/src/enums/WebitelApplications/AdminSections.enum.js +2 -1
  116. package/src/locale/en/en.js +11 -3
  117. package/src/locale/es/es.js +2 -0
  118. package/src/locale/i18n.js +3 -1
  119. package/src/locale/kz/kz.js +327 -0
  120. package/src/locale/ru/ru.js +11 -3
  121. package/src/locale/ua/ua.js +11 -3
  122. package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +2 -2
  123. package/src/mixins/validationMixin/useValidation.js +19 -4
  124. package/src/mixins/validationMixin/validationMixin.js +1 -0
  125. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  126. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
  127. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
  128. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  129. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  130. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +11 -8
  131. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  132. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  133. package/src/modules/AuditForm/components/audit-form.vue +6 -5
  134. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  135. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
  136. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  137. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
  138. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +77 -0
  139. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +35 -17
  140. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
  141. package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -1
  142. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  143. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  144. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  145. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  146. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +7 -5
  147. package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +3 -1
  148. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  149. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  150. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  151. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  152. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  153. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  154. package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
  155. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  156. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  157. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  158. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  159. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  160. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  161. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  162. package/src/modules/Userinfo/classes/ApplicationsAccess.js +6 -2
  163. package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
  164. package/src/modules/Userinfo/components/the-auth.vue +8 -5
  165. package/src/scripts/debounce.js +1 -1
  166. package/src/scripts/saveAsJSON.js +9 -0
  167. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  168. package/src/validators/variableSearchValidator/__tests__/variableSearchValidator.spec.js +48 -0
  169. package/src/validators/variableSearchValidator/variableSearchValidator.js +10 -0
  170. package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +28 -0
  171. package/src/validators/websocketValidator/websocketValidator.js +9 -0
  172. package/dist/demo.html +0 -1
  173. package/dist/ui-sdk.common.js +0 -43066
  174. package/dist/ui-sdk.common.js.map +0 -1
  175. package/dist/ui-sdk.umd.js.map +0 -1
  176. package/dist/ui-sdk.umd.min.js +0 -35
  177. package/dist/ui-sdk.umd.min.js.map +0 -1
  178. package/src/components/wt-button/Readme.md +0 -23
  179. package/src/components/wt-button-select/Readme.md +0 -13
  180. package/src/components/wt-icon/Readme.md +0 -327
  181. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  182. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  183. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  184. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  185. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  186. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  187. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  188. package/src/components/wt-icon-btn/Readme.md +0 -10
  189. package/src/components/wt-rounded-action/Readme.md +0 -68
  190. package/src/components/wt-tags-input/_variables.scss +0 -24
  191. package/src/locale/.DS_Store +0 -0
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "23.12.2",
3
+ "version": "23.12.5-1",
4
4
  "private": false,
5
5
  "scripts": {
6
- "build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
7
- "test:unit": "vue-cli-service test:unit",
8
- "lint": "vue-cli-service lint --fix",
9
- "build:app": "vue-cli-service build",
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "serve": "vite preview",
9
+ "test:unit": "vitest",
10
+ "lint:fix": "eslint --fix --ext .js,.vue src",
10
11
  "prepare": "husky install",
11
12
  "publish-lib": "npm run test:unit && npm run build && npm publish --access public",
12
13
  "publish-lib:testless": "npm run build && npm publish --access public",
13
- "serve-lib": "vue-cli-service serve",
14
- "styleguide": "vue-cli-service styleguidist",
15
- "styleguide:build": "vue-cli-service styleguidist:build"
14
+ "docs:dev": "vitepress dev docs",
15
+ "docs:build": "vitepress build docs",
16
+ "docs:preview": "vitepress preview docs"
16
17
  },
17
- "main": "./dist/@webitel/ui-sdk.common.js",
18
+ "main": "./dist/@webitel/ui-sdk.umd.js",
18
19
  "files": [
19
20
  "dist/*",
20
21
  "src/api/*",
@@ -34,26 +35,24 @@
34
35
  ],
35
36
  "dependencies": {
36
37
  "@floating-ui/vue": "^1.0.1",
37
- "@vue/compat": "^3.2.47",
38
- "@vuelidate/core": "^2.0.0",
39
- "@vuelidate/validators": "^2.0.0",
38
+ "@vuelidate/core": "^2.0.3",
39
+ "@vuelidate/validators": "^2.0.4",
40
40
  "@vuepic/vue-datepicker": "^4.4.0",
41
41
  "@vueuse/components": "^10.5.0",
42
42
  "clipboard-copy": "^4.0.1",
43
- "core-js": "^3.6.5",
44
43
  "csv-stringify": "^5.5.3",
45
44
  "deep-copy": "^1.4.2",
46
45
  "deep-equal": "^2.0.3",
46
+ "deepmerge": "^4.3.1",
47
47
  "file-saver": "^2.0.2",
48
48
  "is-valid-domain": "^0.1.6",
49
49
  "jszip": "^3.5.0",
50
50
  "jszip-utils": "^0.1.0",
51
- "node-polyfill-webpack-plugin": "^1.1.4",
52
- "plyr": "3.6.2",
51
+ "lodash": "^4.17.21",
52
+ "plyr": "3.6.3",
53
53
  "query-string": "^8.1.0",
54
54
  "sortablejs": "^1.15.0",
55
55
  "tiny-emitter": "^2.1.0",
56
- "vue": "^3.2.47",
57
56
  "vue-i18n": "^9.2.2",
58
57
  "vue-multiselect": "^3.0.0-beta.1",
59
58
  "vue-observe-visibility": "^2.0.0-alpha.1",
@@ -61,34 +60,29 @@
61
60
  "webitel-sdk": "^23.7.5"
62
61
  },
63
62
  "devDependencies": {
64
- "@babel/eslint-parser": "^7.17.0",
65
- "@babel/preset-react": "^7.22.15",
66
- "@testing-library/jest-dom": "^5.16.2",
67
- "@vue/cli-plugin-babel": "~5.0.8",
68
- "@vue/cli-plugin-eslint": "~5.0.8",
69
- "@vue/cli-plugin-router": "^5.0.8",
70
- "@vue/cli-plugin-unit-jest": "^5.0.8",
71
- "@vue/cli-service": "~5.0.8",
63
+ "@vitejs/plugin-vue": "4.4.1",
64
+ "@vue/compat": "^3.3.8",
65
+ "vue": "^3.3.8",
66
+ "@vitest/coverage-v8": "^0.34.6",
72
67
  "@vue/compiler-sfc": "^3.2.47",
73
- "@vue/eslint-config-airbnb": "^6.0.0",
74
68
  "@vue/test-utils": "^2.3.0",
75
- "@vue/vue3-jest": "^29.2.2",
76
69
  "bamboo-jest-reporter": "^1.0.3",
77
- "eslint": "^8.14.0",
78
- "eslint-plugin-import": "^2.20.2",
79
- "eslint-plugin-vue": "^8.7.1",
80
- "husky": "^7.0.0",
81
- "jest-environment-jsdom": "^29.4.3",
70
+ "eslint": "^8.53.0",
71
+ "eslint-plugin-vue": "^9.18.1",
72
+ "globby": "^14.0.0",
73
+ "happy-dom": "^12.9.1",
74
+ "husky": "^8.0.3",
75
+ "markdown-it": "^13.0.2",
76
+ "postcss": "^8.4.31",
77
+ "postcss-prefix-selector": "^1.16.0",
78
+ "prismjs": "^1.29.0",
82
79
  "sass": "^1.51.0",
83
- "sass-loader": "^12.6.0",
84
- "svg-sprite-loader": "^6.0.11",
85
- "vue-cli-plugin-styleguidist": "~4.72.4",
80
+ "vite": "^4.5.0",
81
+ "vite-plugin-node-polyfills": "^0.15.0",
82
+ "vite-plugin-static-copy": "^0.17.0",
83
+ "vite-plugin-svg-sprite": "^0.5.0",
84
+ "vitepress": "^1.0.0-rc.29",
85
+ "vitest": "^0.34.6",
86
86
  "vuex": "^4.1.0"
87
- },
88
- "overrides": {
89
- "@vue/vue3-jest": "^29.2.2",
90
- "vue": "^3.2.47",
91
- "babel-jest": "^29.*",
92
- "jest": "^29.*"
93
87
  }
94
88
  }
@@ -3,7 +3,7 @@ import axios from 'axios';
3
3
  // 'X-Webitel-Access' ~ 'X-Access-Token'
4
4
  const generateInstance = ({ interceptors } = {}) => {
5
5
  const instance = axios.create({
6
- baseURL: process.env.VUE_APP_API_URL,
6
+ baseURL: process ? process.env.VUE_APP_API_URL : import.meta.env.VITE_API_URL,
7
7
  headers: {
8
8
  'X-Webitel-Access': localStorage.getItem('access-token') || '',
9
9
  },
@@ -4,17 +4,17 @@
4
4
  color="disabled"
5
5
  :text="status.offline"
6
6
  :size="size"
7
- ></wt-indicator>
7
+ />
8
8
  <wt-indicator
9
9
  color="success"
10
10
  :text="status.online"
11
11
  :size="size"
12
- ></wt-indicator>
12
+ />
13
13
  <wt-indicator
14
14
  color="primary"
15
15
  :text="status.pause"
16
16
  :size="size"
17
- ></wt-indicator>
17
+ />
18
18
  </article>
19
19
  </template>
20
20
 
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtSaveFailedPopup from '../wt-save-failed-popup.vue';
3
+
4
+ describe('WtSaveFailedPopup', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtSaveFailedPopup);
7
+ expect(wrapper.classes('wt-save-failed-popup')).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <wt-popup
3
+ class="wt-save-failed-popup"
4
+ :width="500"
5
+ @close="closePopup"
6
+ >
7
+ <template #title>
8
+ {{ $t('webitelUI.saveFailedPopup.title') }}
9
+ </template>
10
+ <template #main>
11
+ <div class="flow-save-filed-popup__wrapper">
12
+ <wt-icon
13
+ color="error"
14
+ icon="attention"
15
+ />
16
+ <p>{{ $t('webitelUI.saveFailedPopup.label') }}</p>
17
+ </div>
18
+ </template>
19
+ <template #actions>
20
+ <wt-button
21
+ @click="save"
22
+ >
23
+ {{ $t('reusable.retry') }}
24
+ </wt-button>
25
+ <wt-button
26
+ color="secondary"
27
+ @click="download"
28
+ >
29
+ {{ $t('webitelUI.saveFailedPopup.exportToJson') }}
30
+ </wt-button>
31
+ <wt-button
32
+ color="secondary"
33
+ @click="closePopup"
34
+ >
35
+ {{ $t('reusable.close') }}
36
+ </wt-button>
37
+ </template>
38
+ </wt-popup>
39
+ </template>
40
+
41
+ <script>
42
+ export default {
43
+ name: 'FlowSaveFailedPopup',
44
+ emits: ['close-popup', 'save', 'download'],
45
+ methods: {
46
+ closePopup() {
47
+ this.$emit('close-popup');
48
+ },
49
+ save() {
50
+ this.$emit('save');
51
+ },
52
+ download() {
53
+ this.$emit('download');
54
+ },
55
+ },
56
+ };
57
+ </script>
58
+
59
+ <style lang="scss" scoped>
60
+ .flow-save-filed-popup__wrapper {
61
+ display: flex;
62
+ align-items: center;
63
+ flex-direction: column;
64
+ text-align: center;
65
+
66
+ .wt-icon {
67
+ margin-bottom: var(--spacing-sm);
68
+ }
69
+ }
70
+ </style>
@@ -5,7 +5,7 @@
5
5
  @enter="enter"
6
6
  @leave="leave"
7
7
  >
8
- <slot></slot>
8
+ <slot />
9
9
  </transition>
10
10
  </template>
11
11
 
@@ -13,7 +13,7 @@
13
13
  /* eslint-disable no-param-reassign */
14
14
  // https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
15
15
  export default {
16
- name: 'wt-expand-transition',
16
+ name: 'WtExpandTransition',
17
17
  methods: {
18
18
  afterEnter(element) {
19
19
  element.style.height = 'auto';
@@ -15,7 +15,7 @@
15
15
  --wt-app-navigator-item-gap: var(--wt-app-header-content-gap);
16
16
  --wt-app-navigator-item-border: 1px solid;
17
17
  --wt-app-navigator-item-border-color: var(--secondary-color);
18
- --wt-app-navigator-item-border-color--hover: var(--accent-color);
18
+ --wt-app-navigator-item-border-color--hover: var(--primary-color);
19
19
 
20
20
  --wt-header-actions-min-width: 120px;
21
21
  --wt-header-actions-content-sections-gap: var(--spacing-lg);
@@ -1,13 +1,10 @@
1
1
  <template>
2
2
  <header class="wt-app-header">
3
- <slot></slot>
3
+ <slot />
4
4
  </header>
5
5
  </template>
6
6
 
7
- <script>
8
- export default {
9
- name: 'wt-app-header',
10
- };
7
+ <script setup>
11
8
  </script>
12
9
 
13
10
  <style lang="scss">
@@ -1,13 +1,16 @@
1
1
  <template>
2
- <div v-clickaway="close" class="wt-app-navigator">
2
+ <div
3
+ v-clickaway="close"
4
+ class="wt-app-navigator"
5
+ >
3
6
  <wt-tooltip>
4
- <template v-slot:activator>
7
+ <template #activator>
5
8
  <wt-icon-btn
6
9
  :class="{'active': isOpened}"
7
10
  class="wt-app-navigator__btn"
8
11
  icon="app-navigator"
9
12
  @click="isOpened = !isOpened"
10
- ></wt-icon-btn>
13
+ />
11
14
  </template>
12
15
  {{ $t('webitelUI.appNavigator.title') }}
13
16
  </wt-tooltip>
@@ -21,7 +24,6 @@
21
24
  {{ $t('webitelUI.appNavigator.title') }}
22
25
  </h3>
23
26
  <ul class="wt-app-navigator__nav">
24
-
25
27
  <li
26
28
  v-if="formattedApps[WebitelApplications.AGENT]"
27
29
  :class="{'active': formattedApps[WebitelApplications.AGENT].currentApp }"
@@ -173,7 +175,6 @@
173
175
  >
174
176
  </a>
175
177
  </li>
176
-
177
178
  </ul>
178
179
  </nav>
179
180
  </transition>
@@ -1,27 +1,37 @@
1
1
  <template>
2
2
  <div class="wt-header-actions">
3
3
  <wt-tooltip>
4
- <template v-slot:activator>
4
+ <template #activator>
5
5
  <wt-icon-btn
6
6
  v-clickaway="close"
7
7
  :class="{'active': isOpened}"
8
8
  class="wt-header-actions__btn"
9
9
  icon="account"
10
10
  @click="isOpened = !isOpened"
11
- ></wt-icon-btn>
11
+ />
12
12
  </template>
13
13
  {{ $t('webitelUI.headerActions.account') }}
14
14
  </wt-tooltip>
15
15
 
16
16
  <transition name="fade">
17
- <section v-show="isOpened" class="wt-header-actions__panel-wrapper">
18
- <header v-if="isHeader" class="wt-header-actions__header">
17
+ <section
18
+ v-show="isOpened"
19
+ class="wt-header-actions__panel-wrapper"
20
+ >
21
+ <header
22
+ v-if="isHeader"
23
+ class="wt-header-actions__header"
24
+ >
19
25
  <h3
20
26
  class="wt-header-actions__name"
21
- >{{ userName }}</h3>
27
+ >
28
+ {{ userName }}
29
+ </h3>
22
30
  <p
23
31
  class="wt-header-actions__account"
24
- >{{ userAccount }}</p>
32
+ >
33
+ {{ userAccount }}
34
+ </p>
25
35
  </header>
26
36
  <ul class="wt-header-actions__actions-wrapper">
27
37
  <li class="wt-header-actions__action">
@@ -31,7 +41,7 @@
31
41
  target="_blank"
32
42
  @click="close"
33
43
  >
34
- <wt-icon icon="docs"></wt-icon>
44
+ <wt-icon icon="docs" />
35
45
  <span>{{ $t('webitelUI.headerActions.docs') }}</span>
36
46
  </a>
37
47
  </li>
@@ -40,7 +50,7 @@
40
50
  class="wt-header-actions__action__link"
41
51
  @click.prevent="settings"
42
52
  >
43
- <wt-icon icon="settings"></wt-icon>
53
+ <wt-icon icon="settings" />
44
54
  <span>{{ $t('webitelUI.headerActions.settings') }}</span>
45
55
  </a>
46
56
  </li>
@@ -49,12 +59,18 @@
49
59
  class="wt-header-actions__action__link"
50
60
  @click.prevent="logout"
51
61
  >
52
- <wt-icon color="danger" icon="logout"></wt-icon>
62
+ <wt-icon
63
+ color="error"
64
+ icon="logout"
65
+ />
53
66
  <span>{{ $t('webitelUI.headerActions.logout') }}</span>
54
67
  </a>
55
68
  </li>
56
69
  </ul>
57
- <footer v-if="isFooter" class="wt-header-actions__footer">
70
+ <footer
71
+ v-if="isFooter"
72
+ class="wt-header-actions__footer"
73
+ >
58
74
  <p class="wt-header-actions__build__version">
59
75
  {{ buildVersion }}
60
76
  </p>
@@ -66,10 +82,7 @@
66
82
 
67
83
  <script>
68
84
  export default {
69
- name: 'wt-header-actions',
70
- data: () => ({
71
- isOpened: false,
72
- }),
85
+ name: 'WtHeaderActions',
73
86
  props: {
74
87
  user: {
75
88
  type: Object,
@@ -79,6 +92,9 @@ export default {
79
92
  type: Object,
80
93
  },
81
94
  },
95
+ data: () => ({
96
+ isOpened: false,
97
+ }),
82
98
 
83
99
  computed: {
84
100
  isHeader() {
@@ -10,7 +10,7 @@
10
10
  --avatar-size: var(--avatar-size--size-md);
11
11
 
12
12
  --online-color: var(--true-color);
13
- --dnd-color: var(--accent-color);
13
+ --dnd-color: var(--primary-color);
14
14
  --busy-color: var(--false-color);
15
15
  --offline-color: var(--secondary-color);
16
16
 
@@ -7,10 +7,10 @@
7
7
  v-if="badge"
8
8
  :color-variable="badgeColorVar"
9
9
  :icon-badge="isDnd ? 'dnd' : null"
10
- ></wt-badge>
10
+ />
11
11
  <div
12
- class="wt-avatar__letters"
13
12
  v-if="isLetterAvatar"
13
+ class="wt-avatar__letters"
14
14
  :style="{ background: `var(${avatarLettersBackground})` }"
15
15
  >
16
16
  {{ avatarLetters }}
@@ -2,15 +2,15 @@
2
2
  <aside
3
3
  class="wt-badge"
4
4
  :class="{ 'wt-badge--outside': outside }"
5
- :style="{ background: iconBadge ? `url(${this.showIconBadge})` : `var(--${colorVariable})` }"
6
- ></aside>
5
+ :style="{ background: iconBadge ? `url(${showIconBadge})` : `var(--${colorVariable})` }"
6
+ />
7
7
  </template>
8
8
 
9
9
  <script>
10
10
  import BadgeDnd from '../../assets/icons/badge-dnd.svg';
11
11
 
12
12
  export default {
13
- name: 'wt-badge',
13
+ name: 'WtBadge',
14
14
  props: {
15
15
  colorVariable: {
16
16
  type: String,
@@ -6,7 +6,7 @@
6
6
  // COLORS
7
7
  --btn-primary-color: var(--primary-color);
8
8
  --btn-primary-hover-color: var(--primary-hover-color);
9
- --btn-primary-text-color: var(--on-primary-color);
9
+ --btn-primary-text-color: var(--primary-on-color);
10
10
 
11
11
  --btn-secondary-color: var(--dp-10-surface-color);
12
12
  --btn-secondary-hover-color: var(--dp-14-surface-color);
@@ -30,42 +30,12 @@
30
30
 
31
31
  --btn-transfer-color: var(--transfer-color);
32
32
  --btn-transfer-hover-color: var(--transfer-hover-color);
33
- --btn-transfer-text-color: var(--on-transfer-color);
33
+ --btn-transfer-text-color: var(--transfer-on-color);
34
34
 
35
35
  --btn-disabled-color: var(--dp-16-surface-color);
36
36
  --btn-disabled-text-color: var(--grey-darken-1);
37
37
  }
38
38
 
39
39
  :root.theme--dark {
40
- // COLORS
41
- --btn-primary-color: var(--primary-color);
42
- --btn-primary-hover-color: var(--primary-hover-color);
43
- --btn-primary-text-color: var(--on-primary-color);
44
-
45
- --btn-secondary-color: var(--dp-10-surface-color);
46
- --btn-secondary-hover-color: var(--dp-14-surface-color);
47
40
  --btn-secondary-text-color: var(--grey-lighten-4);
48
-
49
- --btn-success-color: var(--success-color);
50
- --btn-success-hover-color: var(--success-hover-color);
51
- --btn-success-text-color: var(--grey-lighten-5);
52
-
53
- --btn-info-color: var(--info-color);
54
- --btn-info-hover-color: var(--info-hover-color);
55
- --btn-info-text-color: var(--grey-lighten-5);
56
-
57
- --btn-job-color: var(--job-color);
58
- --btn-job-hover-color: var(--job-hover-color);
59
- --btn-job-text-color: var(--grey-lighten-5);
60
-
61
- --btn-error-color: var(--error-color);
62
- --btn-error-hover-color: var(--error-hover-color);
63
- --btn-error-text-color: var(--grey-lighten-5);
64
-
65
- --btn-transfer-color: var(--transfer-color);
66
- --btn-transfer-hover-color: var(--transfer-hover-color);
67
- --btn-transfer-text-color: var(--on-transfer-color);
68
-
69
- --btn-disabled-color: var(--dp-16-surface-color);
70
- --btn-disabled-text-color: var(--grey-lighten-1);
71
41
  }
@@ -19,14 +19,16 @@
19
19
  v-if="loading"
20
20
  size="sm"
21
21
  :color="loaderColor"
22
- ></wt-loader>
23
- <slot v-else>no content provided</slot>
22
+ />
23
+ <slot v-else>
24
+ no content provided
25
+ </slot>
24
26
  </button>
25
27
  </template>
26
28
 
27
29
  <script>
28
30
  export default {
29
- name: 'wt-button',
31
+ name: 'WtButton',
30
32
  props: {
31
33
  /**
32
34
  * @values 'primary', 'secondary', 'success', 'error', 'transfer', 'job', 'info'
@@ -2,10 +2,10 @@ import { shallowMount, mount } from '@vue/test-utils';
2
2
  import WtSelectButton from '../wt-button-select.vue';
3
3
 
4
4
  // helps to mock @floating-ui/vue autoUpdate method
5
- global.ResizeObserver = jest.fn().mockImplementation(() => ({
6
- observe: jest.fn(),
7
- unobserve: jest.fn(),
8
- disconnect: jest.fn(),
5
+ global.ResizeObserver = vi.fn().mockImplementation(() => ({
6
+ observe: vi.fn(),
7
+ unobserve: vi.fn(),
8
+ disconnect: vi.fn(),
9
9
  }));
10
10
 
11
11
  describe('WtSelectButton', () => {
@@ -24,15 +24,16 @@ describe('WtSelectButton', () => {
24
24
  expect(wrapper.find('.wt-button-select__button').text()).toBe(content);
25
25
  });
26
26
 
27
- it('should rotate the arrow', () => {
27
+ it('should rotate the arrow', async () => {
28
28
  const wrapper = mount(WtSelectButton, {
29
- data: () => ({
30
- isOpened: true,
31
- }),
32
29
  props: {
33
30
  options: [],
34
31
  },
35
32
  });
33
+ const arrowBtn = wrapper.findAllComponents({ name: 'wt-button' })
34
+ .find((component) => component.classes().includes('wt-button-select__select-btn'));
35
+ arrowBtn.vm.$emit('click');
36
+ await wrapper.vm.$nextTick();
36
37
  const wtIcon = wrapper.find('.wt-button-select__select-arrow');
37
38
  expect(wtIcon.classes()).toContain('wt-button-select__select-arrow--active');
38
39
  });