@webitel/ui-sdk 23.12.41 → 23.12.43

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 (144) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/img/sprite/index.js +147 -1
  3. package/dist/plyr.svg +70 -0
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.mjs +22672 -0
  6. package/dist/ui-sdk.umd.js +37 -43322
  7. package/package.json +33 -41
  8. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
  9. package/src/components/transitions/wt-expand-transition.vue +2 -2
  10. package/src/components/wt-app-header/wt-app-header.vue +2 -2
  11. package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
  12. package/src/components/wt-app-header/wt-header-actions.vue +30 -14
  13. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  14. package/src/components/wt-badge/wt-badge.vue +3 -3
  15. package/src/components/wt-button/wt-button.vue +5 -3
  16. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
  17. package/src/components/wt-button-select/wt-button-select.vue +3 -3
  18. package/src/components/wt-checkbox/wt-checkbox.vue +12 -7
  19. package/src/components/wt-chip/wt-chip.vue +6 -3
  20. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  21. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  22. package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
  23. package/src/components/wt-divider/wt-divider.vue +1 -1
  24. package/src/components/wt-dummy/wt-dummy.vue +6 -2
  25. package/src/components/wt-error-page/wt-error-page.vue +10 -4
  26. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  27. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
  28. package/src/components/wt-headline/wt-headline.vue +4 -4
  29. package/src/components/wt-headline-nav/wt-headline-nav.vue +11 -4
  30. package/src/components/wt-hint/wt-hint.vue +4 -4
  31. package/src/components/wt-icon/wt-icon.vue +5 -5
  32. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  33. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  34. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  35. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  36. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  37. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  38. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  39. package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
  40. package/src/components/wt-indicator/wt-indicator.vue +6 -3
  41. package/src/components/wt-input/wt-input.vue +189 -198
  42. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  43. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  44. package/src/components/wt-label/_variables.scss +4 -2
  45. package/src/components/wt-label/wt-label.vue +5 -18
  46. package/src/components/wt-load-bar/wt-load-bar.vue +5 -2
  47. package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
  48. package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
  49. package/src/components/wt-loader/wt-loader.vue +10 -3
  50. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +16 -8
  51. package/src/components/wt-notification/wt-notification.vue +3 -3
  52. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
  53. package/src/components/wt-page-header/wt-page-header.vue +7 -8
  54. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
  55. package/src/components/wt-pagination/wt-pagination.vue +17 -15
  56. package/src/components/wt-player/wt-player.vue +16 -16
  57. package/src/components/wt-popup/wt-popup.vue +13 -7
  58. package/src/components/wt-progress-bar/wt-progress-bar.vue +11 -7
  59. package/src/components/wt-radio/wt-radio.vue +15 -7
  60. package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
  61. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  62. package/src/components/wt-search-bar/wt-search-bar.vue +6 -5
  63. package/src/components/wt-select/_multiselect.scss +1 -2
  64. package/src/components/wt-select/wt-select.vue +33 -19
  65. package/src/components/wt-slider/wt-slider.vue +5 -5
  66. package/src/components/wt-status-select/wt-status-select.vue +9 -9
  67. package/src/components/wt-stepper/wt-stepper.vue +8 -6
  68. package/src/components/wt-switcher/wt-switcher.vue +12 -7
  69. package/src/components/wt-table/wt-table.vue +110 -72
  70. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  71. package/src/components/wt-table-column-select/wt-table-column-select.vue +28 -26
  72. package/src/components/wt-tabs/wt-tabs.vue +7 -7
  73. package/src/components/wt-tags-input/wt-tags-input.vue +23 -15
  74. package/src/components/wt-textarea/wt-textarea.vue +16 -11
  75. package/src/components/wt-time-input/wt-time-input.vue +8 -5
  76. package/src/components/wt-timepicker/wt-timepicker.vue +20 -16
  77. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  78. package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
  79. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  80. package/src/css/styleguide/colors/_colors.scss +9 -8
  81. package/src/css/styleguide/colors/reusable/_text-field.scss +20 -0
  82. package/src/css/styleguide/placeholder/_placeholder.scss +6 -11
  83. package/src/locale/i18n.js +1 -1
  84. package/src/locale/kz/kz.js +74 -78
  85. package/src/mixins/validationMixin/useValidation.js +2 -2
  86. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  87. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
  88. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
  89. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  90. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  91. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +10 -6
  92. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  93. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  94. package/src/modules/AuditForm/components/audit-form.vue +6 -5
  95. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  96. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
  97. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  98. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
  99. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
  100. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +13 -6
  101. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
  102. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  103. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  104. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  105. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  106. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
  107. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  108. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  109. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  110. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  111. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  112. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  113. package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
  114. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  115. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  116. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  117. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  118. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  119. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  120. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  121. package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
  122. package/src/modules/Userinfo/components/the-auth.vue +7 -4
  123. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  124. package/dist/demo.html +0 -1
  125. package/dist/ui-sdk.common.js +0 -43304
  126. package/dist/ui-sdk.common.js.map +0 -1
  127. package/dist/ui-sdk.umd.js.map +0 -1
  128. package/dist/ui-sdk.umd.min.js +0 -35
  129. package/dist/ui-sdk.umd.min.js.map +0 -1
  130. package/src/components/wt-button/Readme.md +0 -23
  131. package/src/components/wt-button-select/Readme.md +0 -13
  132. package/src/components/wt-headline-nav/Readme.md +0 -9
  133. package/src/components/wt-icon/Readme.md +0 -327
  134. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  135. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  136. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  137. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  138. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  139. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  140. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  141. package/src/components/wt-icon-btn/Readme.md +0 -10
  142. package/src/components/wt-rounded-action/Readme.md +0 -68
  143. package/src/validators/variableSearchValidator/Readme.md +0 -13
  144. package/src/validators/websocketValidator/Readme.md +0 -7
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "23.12.41",
3
+ "version": "23.12.43",
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,27 +35,26 @@
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
+ "@vue/compat": "^3.3.8",
39
+ "@vuelidate/core": "^2.0.3",
40
+ "@vuelidate/validators": "^2.0.4",
40
41
  "@vuepic/vue-datepicker": "^4.4.0",
41
42
  "@vueuse/components": "^10.5.0",
42
43
  "clipboard-copy": "^4.0.1",
43
- "core-js": "^3.6.5",
44
44
  "csv-stringify": "^5.5.3",
45
45
  "deep-copy": "^1.4.2",
46
46
  "deep-equal": "^2.0.3",
47
+ "deepmerge": "^4.3.1",
47
48
  "file-saver": "^2.0.2",
48
49
  "is-valid-domain": "^0.1.6",
49
50
  "jszip": "^3.5.0",
50
51
  "jszip-utils": "^0.1.0",
51
52
  "lodash": "^4.17.21",
52
- "node-polyfill-webpack-plugin": "^1.1.4",
53
- "plyr": "3.6.2",
53
+ "plyr": "3.6.3",
54
54
  "query-string": "^8.1.0",
55
55
  "sortablejs": "^1.15.0",
56
56
  "tiny-emitter": "^2.1.0",
57
- "vue": "^3.2.47",
57
+ "vue": "^3.3.8",
58
58
  "vue-i18n": "^9.2.2",
59
59
  "vue-multiselect": "^3.0.0-beta.1",
60
60
  "vue-observe-visibility": "^2.0.0-alpha.1",
@@ -62,35 +62,27 @@
62
62
  "webitel-sdk": "^23.7.5"
63
63
  },
64
64
  "devDependencies": {
65
- "@babel/eslint-parser": "^7.17.0",
66
- "@babel/preset-react": "^7.22.15",
67
- "@testing-library/jest-dom": "^5.16.2",
68
- "@vue/cli-plugin-babel": "~5.0.8",
69
- "@vue/cli-plugin-eslint": "~5.0.8",
70
- "@vue/cli-plugin-router": "^5.0.8",
71
- "@vue/cli-plugin-unit-jest": "^5.0.8",
72
- "@vue/cli-service": "~5.0.8",
65
+ "@vitejs/plugin-vue": "4.4.1",
66
+ "@vitest/coverage-v8": "^0.34.6",
73
67
  "@vue/compiler-sfc": "^3.2.47",
74
- "@vue/eslint-config-airbnb": "^6.0.0",
75
68
  "@vue/test-utils": "^2.3.0",
76
- "@vue/vue3-jest": "^29.2.2",
77
- "babel-preset-vite": "^1.1.0",
78
69
  "bamboo-jest-reporter": "^1.0.3",
79
- "eslint": "^8.14.0",
80
- "eslint-plugin-import": "^2.20.2",
81
- "eslint-plugin-vue": "^8.7.1",
82
- "husky": "^7.0.0",
83
- "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",
84
79
  "sass": "^1.51.0",
85
- "sass-loader": "^12.6.0",
86
- "svg-sprite-loader": "^6.0.11",
87
- "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",
88
86
  "vuex": "^4.1.0"
89
- },
90
- "overrides": {
91
- "@vue/vue3-jest": "^29.2.2",
92
- "vue": "^3.2.47",
93
- "babel-jest": "^29.*",
94
- "jest": "^29.*"
95
87
  }
96
88
  }
@@ -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
 
@@ -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';
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <header class="wt-app-header">
3
- <slot></slot>
3
+ <slot />
4
4
  </header>
5
5
  </template>
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: 'wt-app-header',
9
+ name: 'WtAppHeader',
10
10
  };
11
11
  </script>
12
12
 
@@ -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="error" 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() {
@@ -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,
@@ -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', () => {
@@ -10,7 +10,7 @@
10
10
  class="wt-button-select__button"
11
11
  @click="$emit('click', $event)"
12
12
  >
13
- <slot></slot>
13
+ <slot />
14
14
  </wt-button>
15
15
 
16
16
  <wt-context-menu
@@ -18,7 +18,7 @@
18
18
  :visible="isOpened"
19
19
  @click="selectOption"
20
20
  >
21
- <template v-slot:activator>
21
+ <template #activator>
22
22
  <wt-button
23
23
  v-bind="$attrs"
24
24
  :color="color"
@@ -33,7 +33,7 @@
33
33
  :disabled="disabled"
34
34
  class="wt-button-select__select-arrow"
35
35
  icon="arrow-down"
36
- ></wt-icon>
36
+ />
37
37
  </wt-button>
38
38
  </template>
39
39
  </wt-context-menu>
@@ -20,17 +20,22 @@
20
20
  @change="inputHandler"
21
21
  >
22
22
  <span class="wt-checkbox__checkmark">
23
- <wt-icon
24
- :icon="checkboxIcon"
25
- :color="iconColor"
26
- ></wt-icon>
27
- </span>
23
+ <wt-icon
24
+ :icon="checkboxIcon"
25
+ :color="iconColor"
26
+ />
27
+ </span>
28
28
  <!-- @slot Custom label markup -->
29
29
  <slot
30
30
  v-bind="{ label, isChecked, disabled }"
31
31
  name="label"
32
32
  >
33
- <div v-if="label" class="wt-checkbox__label">{{ label }}</div>
33
+ <div
34
+ v-if="label"
35
+ class="wt-checkbox__label"
36
+ >
37
+ {{ label }}
38
+ </div>
34
39
  </slot>
35
40
  </wt-label>
36
41
  </div>
@@ -38,7 +43,7 @@
38
43
 
39
44
  <script>
40
45
  export default {
41
- name: 'wt-checkbox',
46
+ name: 'WtCheckbox',
42
47
  model: {
43
48
  prop: 'selected',
44
49
  event: 'change',
@@ -1,12 +1,15 @@
1
1
  <template>
2
- <span class="wt-chip" :class="`wt-chip--${color}-color`">
3
- <slot></slot>
2
+ <span
3
+ class="wt-chip"
4
+ :class="`wt-chip--${color}-color`"
5
+ >
6
+ <slot />
4
7
  </span>
5
8
  </template>
6
9
 
7
10
  <script>
8
11
  export default {
9
- name: 'wt-chip',
12
+ name: 'WtChip',
10
13
  props: {
11
14
  color: {
12
15
  type: String,
@@ -6,18 +6,18 @@
6
6
  placement="bottom-end"
7
7
  popper-class="wt-context-menu__floating-wrapper"
8
8
  >
9
- <template v-slot:activator>
10
- <slot name="activator"></slot>
9
+ <template #activator>
10
+ <slot name="activator" />
11
11
  </template>
12
- <template v-slot:default="{ hide }">
12
+ <template #default="{ hide }">
13
13
  <ul
14
14
  class="wt-context-menu__menu"
15
15
  :style="`width: ${width}; min-width: ${minWidth}; max-width: ${maxWidth};`"
16
16
  >
17
17
  <li
18
- class="wt-context-menu__option-wrapper"
19
18
  v-for="(option, index) of options"
20
19
  :key="index"
20
+ class="wt-context-menu__option-wrapper"
21
21
  >
22
22
  <!-- <a> click.prevent prevents redirect to # -->
23
23
  <a
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <wt-tooltip class="wt-copy-action">
3
- <template v-slot:activator>
3
+ <template #activator>
4
4
  <wt-icon-btn
5
5
  v-bind="$attrs"
6
6
  :icon="copied ? 'done' : 'copy'"
7
7
  class="copy-action"
8
8
  @click="copy"
9
- ></wt-icon-btn>
9
+ />
10
10
  </template>
11
11
  {{ copied ? copiedTooltip : copyTooltip }}
12
12
  </wt-tooltip>
@@ -18,10 +18,7 @@ import copy from 'clipboard-copy';
18
18
  let copiedIdTimeout = null;
19
19
 
20
20
  export default {
21
- name: 'wt-copy-action',
22
- data: () => ({
23
- copied: false,
24
- }),
21
+ name: 'WtCopyAction',
25
22
  props: {
26
23
  value: {
27
24
  type: String,
@@ -34,6 +31,9 @@ export default {
34
31
  }),
35
32
  },
36
33
  },
34
+ data: () => ({
35
+ copied: false,
36
+ }),
37
37
  computed: {
38
38
  copyTooltip() {
39
39
  return this.tooltips.copy || this.$t('webitelUI.copyAction.copy');
@@ -13,7 +13,9 @@
13
13
  <slot
14
14
  v-bind="{ label }"
15
15
  name="label"
16
- >{{ label }}</slot>
16
+ >
17
+ {{ label }}
18
+ </slot>
17
19
  </wt-label>
18
20
  <vue-datepicker
19
21
  v-bind="{ ...$attrs, ...$props }"
@@ -29,46 +31,46 @@
29
31
  @open="isOpened = true"
30
32
  @update:model-value="emit('input', $event.getTime())"
31
33
  >
32
- <template v-slot:input-icon>
34
+ <template #input-icon>
33
35
  <wt-icon
34
36
  :color="disabled ? 'disabled' : 'default'"
35
37
  icon="calendar"
36
- ></wt-icon>
38
+ />
37
39
  </template>
38
- <template v-slot:clear-icon>
40
+ <template #clear-icon>
39
41
  <wt-icon
40
42
  :class="{ 'wt-datepicker__open-arrow--opened': isOpened }"
41
43
  :color="disabled ? 'disabled' : 'default'"
42
44
  class="wt-datepicker__open-arrow"
43
45
  icon="arrow-down"
44
- ></wt-icon>
46
+ />
45
47
  </template>
46
- <template v-slot:arrow-left>
48
+ <template #arrow-left>
47
49
  <wt-icon-btn
48
50
  icon="arrow-left"
49
- ></wt-icon-btn>
51
+ />
50
52
  </template>
51
- <template v-slot:arrow-right>
53
+ <template #arrow-right>
52
54
  <wt-icon-btn
53
55
  icon="arrow-right"
54
- ></wt-icon-btn>
56
+ />
55
57
  </template>
56
58
  <template
57
59
  v-if="isDateTime"
58
- v-slot:time-picker="{ time, updateTime }"
60
+ #time-picker="{ time, updateTime }"
59
61
  >
60
62
  <div class="datepicker__timepicker">
61
63
  <wt-time-input
62
64
  :value="time.hours"
63
65
  max-value="23"
64
66
  @input="updateTime"
65
- ></wt-time-input>
67
+ />
66
68
  :
67
69
  <wt-time-input
68
70
  :value="time.minutes"
69
71
  max-value="59"
70
72
  @input="updateTime($event, false)"
71
- ></wt-time-input>
73
+ />
72
74
  </div>
73
75
  </template>
74
76
  </vue-datepicker>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'wt-divider',
7
+ name: 'WtDivider',
8
8
  };
9
9
  </script>
10
10
 
@@ -10,11 +10,15 @@
10
10
  </div>
11
11
  <p
12
12
  v-if="!hiddenText"
13
- class="wt-dummy__text">{{ text || $t('webitelUI.dummy.text') }}</p>
13
+ class="wt-dummy__text"
14
+ >
15
+ {{ text || $t('webitelUI.dummy.text') }}
16
+ </p>
14
17
  <wt-button
15
18
  v-if="showAction"
16
19
  @click="emits('create')"
17
- >{{ buttonText || $t('reusable.add') }}
20
+ >
21
+ {{ buttonText || $t('reusable.add') }}
18
22
  </wt-button>
19
23
  </div>
20
24
  </template>
@@ -7,12 +7,18 @@
7
7
  :alt="errorPic.alt"
8
8
  >
9
9
  <h2
10
- class="wt-error-page__title">{{ errorTitle }}</h2>
11
- <p class="wt-error-page__text">{{ errorText }}</p>
10
+ class="wt-error-page__title"
11
+ >
12
+ {{ errorTitle }}
13
+ </h2>
14
+ <p class="wt-error-page__text">
15
+ {{ errorText }}
16
+ </p>
12
17
  <wt-button
13
18
  class="wt-error-page__action"
14
19
  @click="$emit('back')"
15
- >{{ $t('webitelUI.errorPages.goBack') }}
20
+ >
21
+ {{ $t('webitelUI.errorPages.goBack') }}
16
22
  </wt-button>
17
23
  </article>
18
24
  </section>
@@ -23,7 +29,7 @@ import pic403 from '../../assets/components/organisms/wt-error-page/403.svg';
23
29
  import pic404 from '../../assets/components/organisms/wt-error-page/404.svg';
24
30
 
25
31
  export default {
26
- name: 'wt-error-page',
32
+ name: 'WtErrorPage',
27
33
  props: {
28
34
  type: {
29
35
  type: String,