@webitel/ui-sdk 23.12.39-vite-6 → 23.12.40

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 (135) hide show
  1. package/dist/demo.html +1 -0
  2. package/dist/img/sprite/index.js +1 -147
  3. package/dist/ui-sdk.common.js +43304 -0
  4. package/dist/ui-sdk.common.js.map +1 -0
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.umd.js +43303 -18
  7. package/dist/ui-sdk.umd.js.map +1 -0
  8. package/dist/ui-sdk.umd.min.js +35 -0
  9. package/dist/ui-sdk.umd.min.js.map +1 -0
  10. package/package.json +38 -20
  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/wt-app-header.vue +2 -2
  16. package/src/components/wt-app-header/wt-app-navigator.vue +5 -6
  17. package/src/components/wt-app-header/wt-header-actions.vue +14 -30
  18. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  19. package/src/components/wt-badge/wt-badge.vue +3 -3
  20. package/src/components/wt-button/wt-button.vue +3 -5
  21. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
  22. package/src/components/wt-button-select/wt-button-select.vue +3 -3
  23. package/src/components/wt-checkbox/wt-checkbox.vue +7 -12
  24. package/src/components/wt-chip/wt-chip.vue +3 -6
  25. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  26. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  27. package/src/components/wt-datepicker/wt-datepicker.vue +12 -14
  28. package/src/components/wt-divider/wt-divider.vue +1 -1
  29. package/src/components/wt-dummy/wt-dummy.vue +2 -6
  30. package/src/components/wt-error-page/wt-error-page.vue +4 -10
  31. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  32. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +4 -7
  33. package/src/components/wt-headline/wt-headline.vue +4 -4
  34. package/src/components/wt-headline-nav/wt-headline-nav.vue +4 -11
  35. package/src/components/wt-hint/wt-hint.vue +4 -4
  36. package/src/components/wt-icon/wt-icon.vue +5 -5
  37. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  38. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  39. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  40. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  41. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  42. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  43. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  44. package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
  45. package/src/components/wt-indicator/wt-indicator.vue +3 -6
  46. package/src/components/wt-input/wt-input.vue +182 -193
  47. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  48. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  49. package/src/components/wt-label/wt-label.vue +2 -2
  50. package/src/components/wt-load-bar/wt-load-bar.vue +2 -5
  51. package/src/components/wt-loader/_internals/wt-loader--md.vue +2 -11
  52. package/src/components/wt-loader/_internals/wt-loader--sm.vue +2 -9
  53. package/src/components/wt-loader/wt-loader.vue +3 -10
  54. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +8 -16
  55. package/src/components/wt-notification/wt-notification.vue +3 -3
  56. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +5 -9
  57. package/src/components/wt-page-header/wt-page-header.vue +8 -7
  58. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +5 -8
  59. package/src/components/wt-pagination/wt-pagination.vue +15 -17
  60. package/src/components/wt-player/wt-player.vue +16 -16
  61. package/src/components/wt-popup/wt-popup.vue +7 -13
  62. package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -11
  63. package/src/components/wt-radio/wt-radio.vue +7 -15
  64. package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
  65. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  66. package/src/components/wt-search-bar/wt-search-bar.vue +5 -6
  67. package/src/components/wt-select/_multiselect.scss +1 -0
  68. package/src/components/wt-select/wt-select.vue +19 -33
  69. package/src/components/wt-slider/wt-slider.vue +5 -5
  70. package/src/components/wt-status-select/wt-status-select.vue +9 -9
  71. package/src/components/wt-stepper/wt-stepper.vue +6 -8
  72. package/src/components/wt-switcher/wt-switcher.vue +7 -12
  73. package/src/components/wt-table/wt-table.vue +72 -110
  74. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  75. package/src/components/wt-table-column-select/wt-table-column-select.vue +26 -28
  76. package/src/components/wt-tabs/wt-tabs.vue +7 -7
  77. package/src/components/wt-tags-input/wt-tags-input.vue +15 -23
  78. package/src/components/wt-textarea/wt-textarea.vue +10 -15
  79. package/src/components/wt-time-input/wt-time-input.vue +4 -7
  80. package/src/components/wt-timepicker/wt-timepicker.vue +15 -19
  81. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  82. package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
  83. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  84. package/src/css/styleguide/colors/_colors.scss +8 -9
  85. package/src/locale/en/en.js +5 -0
  86. package/src/locale/i18n.js +1 -1
  87. package/src/locale/kz/kz.js +5 -0
  88. package/src/locale/ru/ru.js +5 -0
  89. package/src/locale/ua/ua.js +5 -0
  90. package/src/mixins/validationMixin/useValidation.js +2 -2
  91. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  92. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +9 -11
  93. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +5 -6
  94. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  95. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  96. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +6 -10
  97. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  98. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  99. package/src/modules/AuditForm/components/audit-form.vue +5 -6
  100. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  101. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +4 -7
  102. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  103. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +2 -2
  104. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
  105. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -13
  106. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +3 -3
  107. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  108. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  109. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +3 -3
  110. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  111. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
  112. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  113. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  114. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  115. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  116. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  117. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  118. package/src/modules/QueryFilters/components/filter-from-to.vue +10 -12
  119. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  120. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  121. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  122. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  123. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  124. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  125. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  126. package/src/modules/Userinfo/components/__tests__/auth.spec.js +4 -4
  127. package/src/modules/Userinfo/components/the-auth.vue +4 -7
  128. package/src/scripts/saveAsJSON.js +7 -0
  129. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  130. package/dist/favicon.ico +0 -0
  131. package/dist/plyr.svg +0 -70
  132. package/dist/ui-sdk.mjs +0 -22678
  133. package/src/components/wt-input/Readme.md +0 -96
  134. package/src/css/styleguide/colors/reusable/_text-field.scss +0 -20
  135. package/src/locale/.DS_Store +0 -0
@@ -8,8 +8,8 @@
8
8
  }"
9
9
  >
10
10
  <wt-label
11
- v-if="hasLabel"
12
11
  v-bind="labelProps"
12
+ v-if="hasLabel"
13
13
  :for="name"
14
14
  :outline="outline"
15
15
  :disabled="disabled"
@@ -19,9 +19,7 @@
19
19
  <slot
20
20
  v-bind="{ label }"
21
21
  name="label"
22
- >
23
- {{ label }}
24
- </slot>
22
+ >{{ label }}</slot>
25
23
  </wt-label>
26
24
  <div class="wt-time-input__wrapper">
27
25
  <input
@@ -38,8 +36,7 @@
38
36
  <wt-input-info
39
37
  v-if="showInfo"
40
38
  :invalid="invalid"
41
- >
42
- {{ validationText }}
39
+ >{{ validationText }}
43
40
  </wt-input-info>
44
41
  </div>
45
42
  </template>
@@ -48,7 +45,7 @@
48
45
  import validationMixin from '../../mixins/validationMixin/validationMixin';
49
46
 
50
47
  export default {
51
- name: 'WtTimeInput',
48
+ name: 'wt-time-input',
52
49
  mixins: [validationMixin],
53
50
  props: {
54
51
  /**
@@ -1,11 +1,8 @@
1
1
  <template>
2
- <div
3
- class="wt-timepicker"
4
- :class="{'wt-timepicker--invalid': invalid}"
5
- >
2
+ <div class="wt-timepicker" :class="{'wt-timepicker--invalid': invalid}">
6
3
  <wt-label
7
- v-if="label"
8
4
  v-bind="labelProps"
5
+ v-if="label"
9
6
  :invalid="invalid"
10
7
  >
11
8
  {{ `${label} (${format})` }}
@@ -16,37 +13,36 @@
16
13
  :value="hour"
17
14
  :v="v"
18
15
  :label="label ? null : $t('webitelUI.timepicker.hour') "
19
- :max-value="dateMode ? null : 23"
16
+ :maxValue="dateMode ? null : 23"
20
17
  :disabled="disabled"
21
18
  hide-input-info
22
19
  @input="hour = $event"
23
- />
20
+ ></wt-time-input>
24
21
  <wt-time-input
25
22
  v-if="isMin"
26
23
  :value="min"
27
24
  :v="v"
28
25
  :label="label ? null : $t('webitelUI.timepicker.min')"
29
- :max-value="59"
26
+ :maxValue="59"
30
27
  :disabled="disabled"
31
28
  hide-input-info
32
29
  @input="min = $event"
33
- />
30
+ ></wt-time-input>
34
31
  <wt-time-input
35
32
  v-if="isSec"
36
33
  :value="sec"
37
34
  :v="v"
38
- :label="label ? null : $t('webitelUI.timepicker.sec')"
39
- :max-value="59"
35
+ :label="label ? null : $t('webitelUI.timepicker.sec')"
36
+ :maxValue="59"
40
37
  :disabled="disabled"
41
38
  hide-input-info
42
39
  @input="sec = $event"
43
- />
40
+ ></wt-time-input>
44
41
  </div>
45
42
  <wt-input-info
46
43
  v-if="isValidation"
47
44
  :invalid="invalid"
48
- >
49
- {{ validationText }}
45
+ >{{ validationText }}
50
46
  </wt-input-info>
51
47
  </div>
52
48
  </template>
@@ -58,12 +54,8 @@ const SEC_IN_HOUR = 60 * 60;
58
54
  const SEC_IN_MIN = 60;
59
55
 
60
56
  export default {
61
- name: 'WtTimepicker',
57
+ name: 'wt-timepicker',
62
58
  mixins: [validationMixin],
63
- model: {
64
- prop: 'value',
65
- event: 'input',
66
- },
67
59
  props: {
68
60
  value: {
69
61
  type: [String, Number],
@@ -90,6 +82,10 @@ export default {
90
82
  description: 'Object with props, passed down to wt-label as props',
91
83
  },
92
84
  },
85
+ model: {
86
+ prop: 'value',
87
+ event: 'input',
88
+ },
93
89
 
94
90
  computed: {
95
91
  isHour() {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <aside
3
- ref="floating"
4
3
  class="wt-tooltip-floating"
4
+ ref="floating"
5
5
  >
6
- <slot />
6
+ <slot></slot>
7
7
  </aside>
8
8
  </template>
9
9
 
@@ -3,27 +3,27 @@
3
3
  :class="{
4
4
  'wt-tooltip--contrast': contrast,
5
5
  'wt-tooltip--visible': isVisible,
6
- }"
6
+ }"
7
7
  class="wt-tooltip"
8
8
  >
9
9
  <div
10
10
  ref="activator"
11
11
  class="wt-tooltip__activator"
12
12
  >
13
- <slot name="activator" />
13
+ <slot name="activator"></slot>
14
14
  </div>
15
15
  <wt-tooltip-floating
16
16
  v-if="isVisible"
17
17
  ref="floating"
18
- v-clickaway="hideTooltip"
19
18
  class="wt-tooltip__floating"
19
+ v-clickaway="hideTooltip"
20
20
  :class="[popperClass]"
21
21
  :style="floatingStyles"
22
22
  :triggers="popperTriggers"
23
23
  @show="showTooltip"
24
24
  @hide="hideTooltip"
25
25
  >
26
- <slot v-bind="{ hide: hideTooltip }" />
26
+ <slot v-bind="{ hide: hideTooltip }"></slot>
27
27
  </wt-tooltip-floating>
28
28
  </div>
29
29
  </template>
@@ -1,14 +1,14 @@
1
1
  import { useCachedInterval } from '../useCachedInterval';
2
2
 
3
3
  describe('useCachedInterval', () => {
4
- it('subscribe', async () => {
5
- const callback = vi.fn();
4
+ it('subscribe', (done) => {
5
+ const callback = jest.fn();
6
6
  const { subscribe } = useCachedInterval({ timeout: 10 });
7
7
  subscribe(callback);
8
8
  expect(callback).toHaveBeenCalledTimes(1);
9
- return await new Promise((resolve, reject) => setTimeout(() => {
9
+ setTimeout(() => {
10
10
  expect(callback).toHaveBeenCalledTimes(2);
11
- resolve();
12
- }, 10));
11
+ done();
12
+ }, 10);
13
13
  });
14
14
  });
@@ -1,6 +1,5 @@
1
1
  @import './deprecated';
2
2
  @import './palette';
3
- @import './reusable/text-field';
4
3
 
5
4
  :root {
6
5
  // dp colors
@@ -85,10 +84,10 @@
85
84
  --sub-accent-color: var(--indigo-darken-3);
86
85
 
87
86
  // typography colors
88
- --text-main-color: var(--grey-darken-3);
89
- --text-disabled-color: var(--grey-lighten-1);
90
- --text-error-color: var(--error-color);
91
- --text-link-color: var(--info-color);
87
+ --main-text-color: var(--grey-darken-3);
88
+ --main-text-disabled-color: var(--grey-lighten-1);
89
+ --negative-text-color: var(--error-color);
90
+ --link-color: var(--info-color);
92
91
  }
93
92
 
94
93
  :root.theme--dark {
@@ -174,8 +173,8 @@
174
173
  --sub-accent-color: var(--indigo-darken-3);
175
174
 
176
175
  // typography colors
177
- --text-main-color: var(--grey-lighten-3);
178
- --text-disabled-color: var(--grey-darken-1);
179
- --text-error-color: var(--error-color);
180
- --text-link-color: var(--info-color);
176
+ --main-text-color: var(--grey-lighten-3);
177
+ --main-text-disabled-color: var(--grey-darken-1);
178
+ --negative-text-color: var(--error-color);
179
+ --link-color: var(--info-color);
181
180
  }
@@ -359,5 +359,10 @@ export default {
359
359
  message: 'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
360
360
  },
361
361
  },
362
+ saveFailedPopup: {
363
+ title: 'Save failed',
364
+ label: 'Something went wrong, please try again',
365
+ exportToJson: 'Export to JSON',
366
+ },
362
367
  },
363
368
  };
@@ -14,7 +14,7 @@ const messages = {
14
14
  };
15
15
 
16
16
  // eslint-disable-next-line new-cap
17
- export default createI18n({
17
+ export default new createI18n({
18
18
  // legacy: false,
19
19
  locale: 'en',
20
20
  allowComposition: true,
@@ -322,5 +322,10 @@ export default {
322
322
  unlimited: 'Шексіз',
323
323
  },
324
324
  },
325
+ saveFailedPopup: {
326
+ title: 'Қатені сақтау',
327
+ label: 'Бірдеңе дұрыс болмады.',
328
+ exportToJson: 'JSON файлына экспорттау',
329
+ },
325
330
  },
326
331
  };
@@ -357,5 +357,10 @@ export default {
357
357
  message: 'Лимит операторов в паузе превышен. Перерыв сейчас недоступен.',
358
358
  },
359
359
  },
360
+ saveFailedPopup: {
361
+ title: 'Ошибка сохранения',
362
+ label: 'Что-то пошло не так. Пожалуйста, попробуйте еще раз',
363
+ exportToJson: 'Экспортировать в JSON',
364
+ },
360
365
  },
361
366
  };
@@ -357,5 +357,10 @@ export default {
357
357
  message: 'Ліміт операторів в паузі перевищено. Перерва наразі недоступна.',
358
358
  },
359
359
  },
360
+ saveFailedPopup: {
361
+ title: 'Помилка збереження',
362
+ label: 'Щось пішло не так. Будь ласка, спробуйте ще раз',
363
+ exportToJson: 'Експортувати в JSON',
364
+ },
360
365
  },
361
366
  };
@@ -3,12 +3,12 @@ import { useI18n } from 'vue-i18n';
3
3
 
4
4
  export function useValidation({ v, customValidators }) {
5
5
  const { t } = useI18n();
6
- const isValidation = computed(() => !!v && !!v.value && !!Object.keys(v.value).length);
6
+ const isValidation = computed(() => !!v.value && !!Object.keys(v.value).length);
7
7
  const invalid = computed(() => isValidation.value && v.value.$error);
8
8
 
9
9
  const validationText = computed(() => {
10
10
  let validationText = '';
11
- if (isValidation.value && invalid) {
11
+ if (isValidation && invalid) {
12
12
  if (v.value.required?.$invalid) validationText = t('validation.required');
13
13
  else if (v.value.numeric?.$invalid) validationText = t('validation.numeric');
14
14
  else if (v.value.email?.$invalid) validationText = t('validation.email');
@@ -6,13 +6,13 @@ import * as PauseCauseAPIFactory from '../../api/pause-cause';
6
6
  import WtCcAgentStatusSelect from '../wt-cc-agent-status-select.vue';
7
7
 
8
8
  const pauseCauses = [{ name: 'jest1' }, { name: 'jest2' }];
9
- const getAgentPauseCausesMock = vi.fn(() => ({ items: pauseCauses }));
9
+ const getAgentPauseCausesMock = jest.fn(() => ({ items: pauseCauses }));
10
10
  // https://stackoverflow.com/a/63727813
11
- vi.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({ getList: getAgentPauseCausesMock }));
11
+ jest.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({ getList: getAgentPauseCausesMock }));
12
12
 
13
- const agentStatusMock = vi.fn(() => {});
13
+ const agentStatusMock = jest.fn(() => {});
14
14
  // https://stackoverflow.com/a/63727813
15
- vi.spyOn(AgentStatusAPIFactory, 'default').mockImplementation(() => ({ patch: agentStatusMock }));
15
+ jest.spyOn(AgentStatusAPIFactory, 'default').mockImplementation(() => ({ patch: agentStatusMock }));
16
16
 
17
17
  const agent = {
18
18
  status: '',
@@ -4,16 +4,16 @@
4
4
  min-width="480"
5
5
  @close="close"
6
6
  >
7
- <template #title>
7
+ <template v-slot:title>
8
8
  {{ $t('webitelUI.agentStatusSelect.pauseCausePopup.title') }}
9
9
  </template>
10
- <template #main>
10
+ <template v-slot:main>
11
11
  <form @submit.prevent="setPause">
12
12
  <ul>
13
13
  <li
14
+ class="wt-cc-pause-cause-popup-option"
14
15
  v-for="(option) of pauseCause"
15
16
  :key="option.id"
16
- class="wt-cc-pause-cause-popup-option"
17
17
  >
18
18
  <wt-radio
19
19
  class="wt-cc-pause-cause-popup-option__radio"
@@ -21,12 +21,12 @@
21
21
  :value="option.id"
22
22
  :label="option.name"
23
23
  @input="select(option)"
24
- />
24
+ ></wt-radio>
25
25
  <div class="wt-cc-pause-cause-popup-option__limits-wrapper">
26
26
  <span
27
27
  :class="{
28
- 'wt-cc-pause-cause-popup-option__duration--overflow': option.isOverflow,
29
- }"
28
+ 'wt-cc-pause-cause-popup-option__duration--overflow': option.isOverflow,
29
+ }"
30
30
  >
31
31
  {{ option.duration }}
32
32
  </span>
@@ -37,18 +37,16 @@
37
37
  </ul>
38
38
  </form>
39
39
  </template>
40
- <template #actions>
40
+ <template v-slot:actions>
41
41
  <wt-button
42
42
  :disabled="!selected"
43
43
  @click="setPause"
44
- >
45
- {{ $t('reusable.ok') }}
44
+ >{{ $t('reusable.ok') }}
46
45
  </wt-button>
47
46
  <wt-button
48
47
  color="secondary"
49
48
  @click="close"
50
- >
51
- {{ $t('reusable.cancel') }}
49
+ >{{ $t('reusable.cancel') }}
52
50
  </wt-button>
53
51
  </template>
54
52
  </wt-popup>
@@ -4,26 +4,25 @@
4
4
  min-width="480"
5
5
  @close="close"
6
6
  >
7
- <template #header>
7
+ <template v-slot:header>
8
8
  {{ $t('webitelUI.agentStatusSelect.statusSelectErrorPopup.title') }}
9
9
  </template>
10
- <template #main>
10
+ <template v-slot:main>
11
11
  <article class="wt-cc-status-select-error-popup__main-wrapper">
12
12
  <wt-icon
13
13
  icon="attention"
14
14
  color="danger"
15
- />
15
+ ></wt-icon>
16
16
  <p class="wt-cc-status-select-error-popup__message">
17
17
  {{ $t('webitelUI.agentStatusSelect.statusSelectErrorPopup.message') }}
18
18
  </p>
19
19
  </article>
20
20
  </template>
21
- <template #actions>
21
+ <template v-slot:actions>
22
22
  <wt-button
23
23
  color="secondary"
24
24
  @click="close"
25
- >
26
- {{ $t('reusable.ok') }}
25
+ >{{ $t('reusable.ok') }}
27
26
  </wt-button>
28
27
  </template>
29
28
  </wt-popup>
@@ -4,18 +4,18 @@
4
4
  :status="status"
5
5
  :status-duration="statusDuration"
6
6
  @change="handleStatusSelectInput"
7
- />
7
+ ></wt-status-select>
8
8
  <pause-cause-popup
9
9
  v-if="isPauseCausePopup"
10
10
  :options="pauseCauses"
11
11
  @change="handlePauseCauseInput"
12
12
  @close="closePauseCausePopup"
13
- />
13
+ ></pause-cause-popup>
14
14
  <status-select-error-popup
15
15
  v-if="error"
16
16
  :error="error"
17
17
  @close="error = null"
18
- />
18
+ ></status-select-error-popup>
19
19
  </article>
20
20
  </template>
21
21
 
@@ -6,7 +6,7 @@ import {
6
6
  useDestroyableSortable,
7
7
  } from '../../../../composables/useDestroyableSortable/useDestroyableSortable';
8
8
 
9
- vi.mock('../../../../composables/useDestroyableSortable/useDestroyableSortable');
9
+ jest.mock('../../../../composables/useDestroyableSortable/useDestroyableSortable');
10
10
 
11
11
  useDestroyableSortable.mockImplementation(() => ({ reloadSortable: ref(false) }));
12
12
 
@@ -14,14 +14,12 @@
14
14
  :class="{
15
15
  'audit-form-question-read-text--required': question.required,
16
16
  }"
17
- >
18
- {{ question.question }}
19
- </p>
17
+ >{{ question.question }}</p>
20
18
  <wt-icon
21
- v-if="!disableDragging && !first"
22
19
  class="audit-form-question-read__drag-icon"
20
+ v-if="!disableDragging && !first"
23
21
  icon="move"
24
- />
22
+ ></wt-icon>
25
23
  </header>
26
24
  <section class="audit-form-question-read-content">
27
25
  <component
@@ -30,14 +28,12 @@
30
28
  :result="result"
31
29
  mode="read"
32
30
  @change:result="!readonly && emit('change:result', $event)"
33
- />
31
+ ></component>
34
32
  <div
35
33
  v-show="isResult"
36
34
  class="audit-form-question--clear"
37
35
  @click="emit('change:result', {})"
38
- >
39
- {{ $t('webitelUI.auditForm.clearSelection') }}
40
- </div>
36
+ >{{ $t('webitelUI.auditForm.clearSelection') }}</div>
41
37
  </section>
42
38
  </article>
43
39
  </template>
@@ -130,6 +126,6 @@ const isResult = computed(() => !isEmpty(props.result));
130
126
  .audit-form-question--clear {
131
127
  margin-top: var(--spacing-sm);;
132
128
  cursor: pointer;
133
- color: var(--text-link-color);
129
+ color: var(--link-color);
134
130
  }
135
131
  </style>
@@ -6,24 +6,24 @@
6
6
  :label="$t('reusable.required')"
7
7
  :disabled="first"
8
8
  @change="updateQuestion({ path: 'required', value: $event })"
9
- />
9
+ ></wt-switcher>
10
10
  <div class="audit-form-question-write-header__actions">
11
11
  <wt-tooltip>
12
- <template #activator>
12
+ <template v-slot:activator>
13
13
  <wt-icon-btn
14
14
  icon="copy"
15
15
  @click="emit('copy')"
16
- />
16
+ ></wt-icon-btn>
17
17
  </template>
18
18
  {{ $t('reusable.copy') }}
19
19
  </wt-tooltip>
20
20
  <wt-tooltip>
21
- <template #activator>
21
+ <template v-slot:activator>
22
22
  <wt-icon-btn
23
23
  icon="bucket"
24
24
  :disabled="first"
25
25
  @click="emit('delete')"
26
- />
26
+ ></wt-icon-btn>
27
27
  </template>
28
28
  {{ $t('reusable.delete') }}
29
29
  </wt-tooltip>
@@ -38,7 +38,7 @@
38
38
  required
39
39
  prevent-trim
40
40
  @input="updateQuestion({ path: 'question', value: $event })"
41
- />
41
+ ></wt-input>
42
42
  <wt-select
43
43
  :value="prettifiedQuestionType"
44
44
  :options="QuestionType"
@@ -46,14 +46,14 @@
46
46
  :clearable="false"
47
47
  :label="$t('webitelUI.auditForm.answerType')"
48
48
  @input="handleQuestionTypeChange($event.value)"
49
- />
49
+ ></wt-select>
50
50
  </div>
51
51
  <component
52
52
  :is="QuestionTypeComponent"
53
53
  :question="question"
54
54
  mode="write"
55
55
  @change:question="emit('change:question', $event)"
56
- />
56
+ ></component>
57
57
  </section>
58
58
  </article>
59
59
  </template>
@@ -3,13 +3,13 @@
3
3
  :is="component"
4
4
  v-clickaway="saveQuestion"
5
5
  :class="[
6
- `audit-form-question--mode-${mode}`,
7
- {
8
- 'audit-form-question--answered': isResult,
9
- },
10
- {
11
- 'audit-form-question--sort-ignore': first && mode === 'fill'
12
- }
6
+ `audit-form-question--mode-${mode}`,
7
+ {
8
+ 'audit-form-question--answered': isResult,
9
+ },
10
+ {
11
+ 'audit-form-question--sort-ignore': first && mode === 'fill'
12
+ }
13
13
  ]"
14
14
  :disable-dragging="mode === 'fill'"
15
15
  :first="first"
@@ -23,7 +23,7 @@
23
23
  @delete="emits('delete')"
24
24
  @change:question="emits('update:question', $event)"
25
25
  @change:result="emits('update:result', $event)"
26
- />
26
+ ></component>
27
27
  </template>
28
28
 
29
29
  <script setup>
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <section class="audit-form">
3
3
  <div
4
- v-if="!reloadSortable"
5
- ref="sortableWrapper"
6
4
  class="audit-form__sortable-wrapper"
5
+ ref="sortableWrapper"
6
+ v-if="!reloadSortable"
7
7
  >
8
8
  <audit-form-question
9
9
  v-for="(question, key) of questions"
@@ -18,15 +18,14 @@
18
18
  @delete="deleteQuestion({ question, key})"
19
19
  @update:question="handleQuestionUpdate({ key, value: $event })"
20
20
  @update:result="handleResultUpdate({ key, value: $event })"
21
- />
21
+ ></audit-form-question>
22
22
  </div>
23
23
  <wt-button
24
- v-if="mode === 'create' && !readonly"
25
24
  class="audit-form__add-button"
25
+ v-if="mode === 'create' && !readonly"
26
26
  :disabled="isInvalidForm"
27
27
  @click="addQuestion"
28
- >
29
- {{ $t('webitelUI.auditForm.addQuestion') }}
28
+ >{{ $t('webitelUI.auditForm.addQuestion') }}
30
29
  </wt-button>
31
30
  </section>
32
31
  </template>
@@ -6,21 +6,21 @@
6
6
  :v="v$.option.name"
7
7
  prevent-trim
8
8
  @input="emit('update:option', { name: $event, score: option.score })"
9
- />
9
+ ></wt-input>
10
10
  <wt-input
11
11
  :label="$t('webitelUI.auditForm.score', 1)"
12
12
  :value="option.score"
13
13
  :v="v$.option.score"
14
14
  type="number"
15
15
  @input="emit('update:option', { name: option.name, score: $event })"
16
- />
16
+ ></wt-input>
17
17
  <wt-tooltip class="audit-form-question-options-write-row__tooltip">
18
- <template #activator>
18
+ <template v-slot:activator>
19
19
  <wt-icon-btn
20
20
  :disabled="first"
21
21
  icon="bucket"
22
22
  @click="emit('delete')"
23
- />
23
+ ></wt-icon-btn>
24
24
  </template>
25
25
  {{ $t('reusable.delete') }}
26
26
  </wt-tooltip>
@@ -11,12 +11,11 @@
11
11
  :first="key === 0"
12
12
  @update:option="updateQuestion({ path: `options[${key}]`, value: $event })"
13
13
  @delete="deleteQuestionOption({ key })"
14
- />
14
+ ></options-write-row>
15
15
  <wt-button
16
16
  class="audit-form-question-options-write__add-button"
17
17
  @click="addQuestionOption"
18
- >
19
- {{ $t('reusable.add') }}
18
+ >{{ $t('reusable.add') }}
20
19
  </wt-button>
21
20
  </div>
22
21
  <div
@@ -30,11 +29,9 @@
30
29
  :selected="result"
31
30
  :value="opt"
32
31
  @input="emit('change:result', $event)"
33
- />
34
- </div>
35
- <div v-else>
36
- Unknown mode: {{ mode }}
32
+ ></wt-radio>
37
33
  </div>
34
+ <div v-else>Unknown mode: {{ mode }}</div>
38
35
  </article>
39
36
  </template>
40
37