@webitel/ui-sdk 23.12.38 → 23.12.39-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/dist/favicon.ico +0 -0
- package/dist/plyr.svg +70 -0
- package/dist/style.css +1 -0
- package/dist/ui-sdk.mjs +22666 -0
- package/dist/ui-sdk.umd.js +37 -43322
- package/package.json +19 -38
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
- package/src/components/transitions/wt-expand-transition.vue +2 -2
- package/src/components/wt-app-header/wt-app-header.vue +2 -2
- package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
- package/src/components/wt-app-header/wt-header-actions.vue +30 -14
- package/src/components/wt-avatar/wt-avatar.vue +2 -2
- package/src/components/wt-badge/wt-badge.vue +3 -3
- package/src/components/wt-button/wt-button.vue +5 -3
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
- package/src/components/wt-button-select/wt-button-select.vue +3 -3
- package/src/components/wt-checkbox/wt-checkbox.vue +12 -7
- package/src/components/wt-chip/wt-chip.vue +6 -3
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
- package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
- package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
- package/src/components/wt-divider/wt-divider.vue +1 -1
- package/src/components/wt-dummy/wt-dummy.vue +6 -2
- package/src/components/wt-error-page/wt-error-page.vue +10 -4
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
- package/src/components/wt-headline/wt-headline.vue +4 -4
- package/src/components/wt-headline-nav/wt-headline-nav.vue +11 -4
- package/src/components/wt-hint/wt-hint.vue +4 -4
- package/src/components/wt-icon/wt-icon.vue +5 -5
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
- package/src/components/wt-indicator/wt-indicator.vue +6 -3
- package/src/components/wt-input/Readme.md +96 -0
- package/src/components/wt-input/wt-input.vue +193 -182
- package/src/components/wt-input-info/wt-input-info.vue +2 -2
- package/src/components/wt-item-link/wt-item-link.vue +1 -1
- package/src/components/wt-label/wt-label.vue +2 -2
- package/src/components/wt-load-bar/wt-load-bar.vue +5 -2
- package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
- package/src/components/wt-loader/wt-loader.vue +10 -3
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +16 -8
- package/src/components/wt-notification/wt-notification.vue +3 -3
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
- package/src/components/wt-page-header/wt-page-header.vue +7 -8
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
- package/src/components/wt-pagination/wt-pagination.vue +17 -15
- package/src/components/wt-player/wt-player.vue +16 -16
- package/src/components/wt-popup/wt-popup.vue +13 -7
- package/src/components/wt-progress-bar/wt-progress-bar.vue +11 -7
- package/src/components/wt-radio/wt-radio.vue +15 -7
- package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +6 -5
- package/src/components/wt-select/_multiselect.scss +0 -1
- package/src/components/wt-select/wt-select.vue +33 -19
- package/src/components/wt-slider/wt-slider.vue +5 -5
- package/src/components/wt-status-select/wt-status-select.vue +9 -9
- package/src/components/wt-stepper/wt-stepper.vue +8 -6
- package/src/components/wt-switcher/wt-switcher.vue +12 -7
- package/src/components/wt-table/wt-table.vue +110 -72
- package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
- package/src/components/wt-table-column-select/wt-table-column-select.vue +28 -26
- package/src/components/wt-tabs/wt-tabs.vue +7 -7
- package/src/components/wt-tags-input/wt-tags-input.vue +23 -15
- package/src/components/wt-textarea/wt-textarea.vue +15 -10
- package/src/components/wt-time-input/wt-time-input.vue +7 -4
- package/src/components/wt-timepicker/wt-timepicker.vue +19 -15
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
- package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
- package/src/css/styleguide/colors/_colors.scss +9 -8
- package/src/css/styleguide/colors/reusable/_text-field.scss +20 -0
- package/src/locale/en/en.js +1 -0
- package/src/locale/es/es.js +1 -0
- package/src/locale/i18n.js +1 -1
- package/src/locale/kz/kz.js +4 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/mixins/validationMixin/useValidation.js +2 -2
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +10 -6
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
- package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
- package/src/modules/AuditForm/components/audit-form.vue +6 -5
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +2 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +13 -6
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +3 -3
- package/src/modules/Filters/components/filter-pagination.vue +1 -1
- package/src/modules/Filters/components/filter-table-fields.vue +1 -1
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +3 -3
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
- package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
- package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
- package/src/modules/QueryFilters/components/filter-search.vue +2 -2
- package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +4 -4
- package/src/modules/Userinfo/components/the-auth.vue +7 -4
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
- package/dist/demo.html +0 -1
- package/dist/img/plyr.svg +0 -68
- package/dist/img/sprite/account.svg +0 -4
- package/dist/img/sprite/adfs.svg +0 -5
- package/dist/img/sprite/app-navigator.svg +0 -11
- package/dist/img/sprite/arrow-down.svg +0 -3
- package/dist/img/sprite/arrow-left.svg +0 -3
- package/dist/img/sprite/arrow-mix.svg +0 -5
- package/dist/img/sprite/arrow-right.svg +0 -3
- package/dist/img/sprite/arrow-up.svg +0 -3
- package/dist/img/sprite/attach.svg +0 -3
- package/dist/img/sprite/attention.svg +0 -3
- package/dist/img/sprite/azure.svg +0 -19
- package/dist/img/sprite/back.svg +0 -4
- package/dist/img/sprite/bell-badged.svg +0 -4
- package/dist/img/sprite/bell.svg +0 -3
- package/dist/img/sprite/bucket.svg +0 -3
- package/dist/img/sprite/calendar.svg +0 -3
- package/dist/img/sprite/call--filled.svg +0 -3
- package/dist/img/sprite/call-add-to--filled.svg +0 -4
- package/dist/img/sprite/call-add-to.svg +0 -4
- package/dist/img/sprite/call-disconnect--filled.svg +0 -3
- package/dist/img/sprite/call-disconnect.svg +0 -3
- package/dist/img/sprite/call-end--filled.svg +0 -3
- package/dist/img/sprite/call-end.svg +0 -3
- package/dist/img/sprite/call-inbound--filled.svg +0 -4
- package/dist/img/sprite/call-inbound.svg +0 -3
- package/dist/img/sprite/call-missed--filled.svg +0 -4
- package/dist/img/sprite/call-missed.svg +0 -3
- package/dist/img/sprite/call-outbound--filled.svg +0 -3
- package/dist/img/sprite/call-outbound.svg +0 -3
- package/dist/img/sprite/call-ringing--filled.svg +0 -5
- package/dist/img/sprite/call-ringing.svg +0 -3
- package/dist/img/sprite/call-transfer--filled.svg +0 -4
- package/dist/img/sprite/call-transfer.svg +0 -3
- package/dist/img/sprite/call.svg +0 -3
- package/dist/img/sprite/chat--filled.svg +0 -3
- package/dist/img/sprite/chat-emoji.svg +0 -3
- package/dist/img/sprite/chat-end--filled.svg +0 -3
- package/dist/img/sprite/chat-end.svg +0 -4
- package/dist/img/sprite/chat-group.svg +0 -5
- package/dist/img/sprite/chat-join.svg +0 -4
- package/dist/img/sprite/chat-message-status-read.svg +0 -3
- package/dist/img/sprite/chat-message-status-sent.svg +0 -3
- package/dist/img/sprite/chat-quick-response--filled.svg +0 -3
- package/dist/img/sprite/chat-quick-response.svg +0 -3
- package/dist/img/sprite/chat-reply.svg +0 -3
- package/dist/img/sprite/chat-send.svg +0 -6
- package/dist/img/sprite/chat-transfer--filled.svg +0 -3
- package/dist/img/sprite/chat-transfer.svg +0 -4
- package/dist/img/sprite/chat.svg +0 -3
- package/dist/img/sprite/checkbox--checked--filled.svg +0 -3
- package/dist/img/sprite/checkbox--checked.svg +0 -3
- package/dist/img/sprite/checkbox.svg +0 -3
- package/dist/img/sprite/clear.svg +0 -3
- package/dist/img/sprite/close--filled.svg +0 -3
- package/dist/img/sprite/close.svg +0 -3
- package/dist/img/sprite/collapse.svg +0 -5
- package/dist/img/sprite/column-select.svg +0 -4
- package/dist/img/sprite/conference.svg +0 -8
- package/dist/img/sprite/contacts.svg +0 -3
- package/dist/img/sprite/copy.svg +0 -3
- package/dist/img/sprite/docs.svg +0 -6
- package/dist/img/sprite/done.svg +0 -4
- package/dist/img/sprite/download.svg +0 -5
- package/dist/img/sprite/edit.svg +0 -3
- package/dist/img/sprite/email.svg +0 -3
- package/dist/img/sprite/expand.svg +0 -5
- package/dist/img/sprite/eye--closed.svg +0 -5
- package/dist/img/sprite/eye--opened.svg +0 -4
- package/dist/img/sprite/filter.svg +0 -5
- package/dist/img/sprite/generate.svg +0 -4
- package/dist/img/sprite/google.svg +0 -6
- package/dist/img/sprite/history.svg +0 -4
- package/dist/img/sprite/hold.svg +0 -3
- package/dist/img/sprite/idle.svg +0 -4
- package/dist/img/sprite/index.js +0 -1
- package/dist/img/sprite/instagram.svg +0 -28
- package/dist/img/sprite/job--accept.svg +0 -4
- package/dist/img/sprite/job--end.svg +0 -4
- package/dist/img/sprite/job.svg +0 -5
- package/dist/img/sprite/link.svg +0 -8
- package/dist/img/sprite/lock.svg +0 -3
- package/dist/img/sprite/logout.svg +0 -3
- package/dist/img/sprite/mail--color.svg +0 -4
- package/dist/img/sprite/mail.svg +0 -3
- package/dist/img/sprite/menu.svg +0 -3
- package/dist/img/sprite/messenger-facebook--filled.svg +0 -3
- package/dist/img/sprite/messenger-facebook.svg +0 -9
- package/dist/img/sprite/messenger-infobip.svg +0 -5
- package/dist/img/sprite/messenger-messenger.svg +0 -12
- package/dist/img/sprite/messenger-telegram--filled.svg +0 -3
- package/dist/img/sprite/messenger-telegram.svg +0 -10
- package/dist/img/sprite/messenger-viber--filled.svg +0 -3
- package/dist/img/sprite/messenger-viber.svg +0 -3
- package/dist/img/sprite/messenger-web-chat.svg +0 -7
- package/dist/img/sprite/messenger-whatsapp--filled.svg +0 -4
- package/dist/img/sprite/messenger-whatsapp.svg +0 -10
- package/dist/img/sprite/meta.svg +0 -17
- package/dist/img/sprite/mic-muted.svg +0 -6
- package/dist/img/sprite/mic.svg +0 -4
- package/dist/img/sprite/move.svg +0 -6
- package/dist/img/sprite/note.svg +0 -3
- package/dist/img/sprite/numpad.svg +0 -24
- package/dist/img/sprite/options.svg +0 -5
- package/dist/img/sprite/pause.svg +0 -3
- package/dist/img/sprite/pin.svg +0 -3
- package/dist/img/sprite/play.svg +0 -4
- package/dist/img/sprite/plus.svg +0 -3
- package/dist/img/sprite/preview-tag-application.svg +0 -6
- package/dist/img/sprite/preview-tag-audio.svg +0 -4
- package/dist/img/sprite/preview-tag-image.svg +0 -4
- package/dist/img/sprite/preview-tag-video.svg +0 -4
- package/dist/img/sprite/prompter.svg +0 -3
- package/dist/img/sprite/queue-member.svg +0 -3
- package/dist/img/sprite/radio--checked.svg +0 -4
- package/dist/img/sprite/radio.svg +0 -3
- package/dist/img/sprite/rec-off.svg +0 -3
- package/dist/img/sprite/rec.svg +0 -4
- package/dist/img/sprite/refresh.svg +0 -4
- package/dist/img/sprite/role.svg +0 -3
- package/dist/img/sprite/rounded-info.svg +0 -3
- package/dist/img/sprite/scorecard.svg +0 -4
- package/dist/img/sprite/search.svg +0 -3
- package/dist/img/sprite/send-arrow.svg +0 -4
- package/dist/img/sprite/settings.svg +0 -3
- package/dist/img/sprite/sort-arrow-down.svg +0 -4
- package/dist/img/sprite/sort-arrow-up.svg +0 -4
- package/dist/img/sprite/sound-off.svg +0 -4
- package/dist/img/sprite/sound-on.svg +0 -3
- package/dist/img/sprite/star--filled.svg +0 -3
- package/dist/img/sprite/star.svg +0 -3
- package/dist/img/sprite/stop.svg +0 -4
- package/dist/img/sprite/stt-download.svg +0 -4
- package/dist/img/sprite/stt-search.svg +0 -3
- package/dist/img/sprite/stt.svg +0 -4
- package/dist/img/sprite/telegram-bot.svg +0 -6
- package/dist/img/sprite/tick.svg +0 -3
- package/dist/img/sprite/tts-download.svg +0 -5
- package/dist/img/sprite/unpin.svg +0 -5
- package/dist/img/sprite/upload.svg +0 -5
- package/dist/img/sprite/user.svg +0 -3
- package/dist/img/sprite/video-cam-off.svg +0 -4
- package/dist/img/sprite/video-cam.svg +0 -3
- package/dist/img/sprite/zoom-in.svg +0 -3
- package/dist/img/sprite/zoom-out.svg +0 -4
- package/dist/ui-sdk.common.js +0 -43304
- package/dist/ui-sdk.common.js.map +0 -1
- package/dist/ui-sdk.css +0 -1
- package/dist/ui-sdk.umd.js.map +0 -1
- package/dist/ui-sdk.umd.min.js +0 -35
- package/dist/ui-sdk.umd.min.js.map +0 -1
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
:first="key === 0"
|
|
12
12
|
@update:option="updateQuestion({ path: `options[${key}]`, value: $event })"
|
|
13
13
|
@delete="deleteQuestionOption({ key })"
|
|
14
|
-
|
|
14
|
+
/>
|
|
15
15
|
<wt-button
|
|
16
16
|
class="audit-form-question-options-write__add-button"
|
|
17
17
|
@click="addQuestionOption"
|
|
18
|
-
>
|
|
18
|
+
>
|
|
19
|
+
{{ $t('reusable.add') }}
|
|
19
20
|
</wt-button>
|
|
20
21
|
</div>
|
|
21
22
|
<div
|
|
@@ -29,9 +30,11 @@
|
|
|
29
30
|
:selected="result"
|
|
30
31
|
:value="opt"
|
|
31
32
|
@input="emit('change:result', $event)"
|
|
32
|
-
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
<div v-else>
|
|
36
|
+
Unknown mode: {{ mode }}
|
|
33
37
|
</div>
|
|
34
|
-
<div v-else>Unknown mode: {{ mode }}</div>
|
|
35
38
|
</article>
|
|
36
39
|
</template>
|
|
37
40
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
type="number"
|
|
14
14
|
required
|
|
15
15
|
@input="updateQuestion({ path: 'min', value: $event })"
|
|
16
|
-
|
|
16
|
+
/>
|
|
17
17
|
<wt-input
|
|
18
18
|
:value="question.max"
|
|
19
19
|
:v="v$.question.max"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
type="number"
|
|
24
24
|
required
|
|
25
25
|
@input="updateQuestion({ path: 'max', value: $event })"
|
|
26
|
-
|
|
26
|
+
/>
|
|
27
27
|
</div>
|
|
28
28
|
<div
|
|
29
29
|
v-else-if="mode === 'read'"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:value="value"
|
|
37
37
|
:selected="isResult ? result.score : null"
|
|
38
38
|
@input="emit('change:result', { score: value })"
|
|
39
|
-
|
|
39
|
+
/>
|
|
40
40
|
</div>
|
|
41
41
|
</article>
|
|
42
42
|
</template>
|
|
@@ -4,8 +4,8 @@ import stringify from 'csv-stringify/lib/sync';
|
|
|
4
4
|
import CSVExportMixin from '../mixins/exportCSVMixin';
|
|
5
5
|
import '../../../../tests/mocks/localStorageMock';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
vi.mock('csv-stringify/lib/sync');
|
|
8
|
+
vi.mock('file-saver');
|
|
9
9
|
const dataList = [
|
|
10
10
|
{ _isSelected: true, id: 1 },
|
|
11
11
|
{ _isSelected: true, id: 2 },
|
|
@@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|
|
3
3
|
import { useValidation } from '../../../mixins/validationMixin/useValidation';
|
|
4
4
|
import DeleteConfirmationPopup from '../components/delete-confirmation-popup.vue';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
vi.mock('../../../mixins/validationMixin/useValidation');
|
|
7
7
|
|
|
8
8
|
useValidation.mockImplementation(() => ({
|
|
9
9
|
isValidation: ref(false),
|
|
@@ -16,14 +16,14 @@ describe('DeleteConfirmationPopup', () => {
|
|
|
16
16
|
const wrapper = shallowMount(DeleteConfirmationPopup, {
|
|
17
17
|
props: {
|
|
18
18
|
deleteCount: 1,
|
|
19
|
-
callback:
|
|
19
|
+
callback: vi.fn(),
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
expect(wrapper.classes('delete-confirmation-popup')).toBe(true);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
it('yes button called props callback', async () => {
|
|
26
|
-
const callback =
|
|
26
|
+
const callback = vi.fn();
|
|
27
27
|
const wrapper = mount(DeleteConfirmationPopup, {
|
|
28
28
|
props: {
|
|
29
29
|
deleteCount: 1,
|
|
@@ -42,7 +42,7 @@ describe('DeleteConfirmationPopup', () => {
|
|
|
42
42
|
const wrapper = mount(DeleteConfirmationPopup, {
|
|
43
43
|
props: {
|
|
44
44
|
deleteCount,
|
|
45
|
-
callback:
|
|
45
|
+
callback: vi.fn(),
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
expect(wrapper.find('.delete-confirmation-popup__content').text())
|
|
@@ -53,7 +53,7 @@ describe('DeleteConfirmationPopup', () => {
|
|
|
53
53
|
const wrapper = mount(DeleteConfirmationPopup, {
|
|
54
54
|
props: {
|
|
55
55
|
deleteCount: 1,
|
|
56
|
-
callback:
|
|
56
|
+
callback: vi.fn(),
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
59
|
const button = wrapper.findAllComponents({ name: 'wt-button' }).find((btn) => btn.text().includes('Yes'));
|
|
@@ -66,7 +66,7 @@ describe('DeleteConfirmationPopup', () => {
|
|
|
66
66
|
const wrapper = mount(DeleteConfirmationPopup, {
|
|
67
67
|
props: {
|
|
68
68
|
deleteCount: 1,
|
|
69
|
-
callback:
|
|
69
|
+
callback: vi.fn(),
|
|
70
70
|
},
|
|
71
71
|
});
|
|
72
72
|
const button = wrapper.findAllComponents({ name: 'wt-button' }).find((btn) => btn.text().includes('No'));
|
|
@@ -4,26 +4,33 @@
|
|
|
4
4
|
width="500"
|
|
5
5
|
@close="close"
|
|
6
6
|
>
|
|
7
|
-
<template
|
|
8
|
-
|
|
7
|
+
<template #title>
|
|
8
|
+
{{ $t('webitelUI.deleteConfirmationPopup.title') }}
|
|
9
|
+
</template>
|
|
10
|
+
<template #main>
|
|
9
11
|
<div class="delete-confirmation-popup__content">
|
|
10
|
-
<wt-icon
|
|
12
|
+
<wt-icon
|
|
13
|
+
icon="attention"
|
|
14
|
+
color="error"
|
|
15
|
+
/>
|
|
11
16
|
<p class="delete-confirmation-popup__message">
|
|
12
17
|
{{ deleteMessage }}
|
|
13
18
|
</p>
|
|
14
19
|
</div>
|
|
15
20
|
</template>
|
|
16
|
-
<template
|
|
21
|
+
<template #actions>
|
|
17
22
|
<wt-button
|
|
18
23
|
:loading="isDeleting"
|
|
19
24
|
@click="confirm"
|
|
20
|
-
>
|
|
25
|
+
>
|
|
26
|
+
{{ $t('vocabulary.yes') }}
|
|
21
27
|
</wt-button>
|
|
22
28
|
<wt-button
|
|
23
29
|
:disabled="isDeleting"
|
|
24
30
|
color="secondary"
|
|
25
31
|
@click="close"
|
|
26
|
-
>
|
|
32
|
+
>
|
|
33
|
+
{{ $t('vocabulary.no') }}
|
|
27
34
|
</wt-button>
|
|
28
35
|
</template>
|
|
29
36
|
</wt-popup>
|
|
@@ -5,9 +5,9 @@ import jszipUtils from 'jszip-utils';
|
|
|
5
5
|
import FilesExportMixin from '../mixins/exportFilesMixin';
|
|
6
6
|
import '../../../../tests/mocks/localStorageMock';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
vi.mock('jszip');
|
|
9
|
+
vi.mock('jszip-utils');
|
|
10
|
+
vi.mock('file-saver');
|
|
11
11
|
const dataList = [
|
|
12
12
|
{ files: [{ name: 'jest', id: '1', mimeType: 'mime/type' }] },
|
|
13
13
|
];
|
|
@@ -14,8 +14,8 @@ const state = {
|
|
|
14
14
|
|
|
15
15
|
describe('features/notifications store: actions', () => {
|
|
16
16
|
const context = {
|
|
17
|
-
dispatch:
|
|
18
|
-
commit:
|
|
17
|
+
dispatch: vi.fn(),
|
|
18
|
+
commit: vi.fn(),
|
|
19
19
|
getters: {
|
|
20
20
|
IS_MAIN_TAB: () => true,
|
|
21
21
|
IS_SOUND_ALLOWED: () => true,
|
|
@@ -69,7 +69,7 @@ describe('features/notifications store: actions', () => {
|
|
|
69
69
|
it('_SUBSCRIBE_TAB_CLOSING action commits SET_CURRENT_TAB_ID mutation', async () => {
|
|
70
70
|
await notificationsModule.actions._SUBSCRIBE_TAB_CLOSING(context);
|
|
71
71
|
window.dispatchEvent(new Event('storage'));
|
|
72
|
-
expect(context.commit).toHaveBeenCalledWith('SET_CURRENT_TAB_ID',
|
|
72
|
+
expect(context.commit).toHaveBeenCalledWith('SET_CURRENT_TAB_ID', null);
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
it('PLAY_SOUND action commits SET_CURRENTLY_PLAIYNG mutation with sound', async () => {
|
|
@@ -15,10 +15,10 @@ describe('Abstract Api Filter', () => {
|
|
|
15
15
|
const filterSchema = new ApiFilterSchema({
|
|
16
16
|
locale: { label: '' }
|
|
17
17
|
});
|
|
18
|
-
const searchMock =
|
|
19
|
-
const fetchSelectedMock =
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const searchMock = vi.fn();
|
|
19
|
+
const fetchSelectedMock = vi.fn(() => ({ items: [] }));
|
|
20
|
+
vi.spyOn(filterSchema, 'search').mockImplementation(searchMock);
|
|
21
|
+
vi.spyOn(filterSchema, 'fetchSelected').mockImplementation(fetchSelectedMock);
|
|
22
22
|
const store = createStore({
|
|
23
23
|
modules: {
|
|
24
24
|
[namespace]: {
|
|
@@ -41,8 +41,8 @@ describe('DatetimeFilter Filter', () => {
|
|
|
41
41
|
it('initial restoreValue() triggers setValue() method', async () => {
|
|
42
42
|
const value = Date.now();
|
|
43
43
|
await router.replace({ query: { [filterQuery]: value } });
|
|
44
|
-
const setValueMock =
|
|
45
|
-
|
|
44
|
+
const setValueMock = vi.fn();
|
|
45
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(setValueMock);
|
|
46
46
|
shallowMount(DatetimeFilter, mountOptions);
|
|
47
47
|
expect(setValueMock).toHaveBeenCalledWith({ filter: filterQuery, value });
|
|
48
48
|
});
|
|
@@ -39,8 +39,8 @@ describe('FilterFromTo Filter', () => {
|
|
|
39
39
|
it('initial restoreValue() triggers setValue() method: From case', async () => {
|
|
40
40
|
const value = 10;
|
|
41
41
|
await router.replace({ query: { [`${filterQuery}From`]: value } });
|
|
42
|
-
const setValueMock =
|
|
43
|
-
|
|
42
|
+
const setValueMock = vi.fn();
|
|
43
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue')
|
|
44
44
|
.mockImplementation(setValueMock);
|
|
45
45
|
shallowMount(FilterFromTo, mountOptions);
|
|
46
46
|
expect(setValueMock).toHaveBeenNthCalledWith(1, {
|
|
@@ -51,8 +51,8 @@ describe('FilterFromTo Filter', () => {
|
|
|
51
51
|
it('initial restoreValue() triggers setValue() method: To case', async () => {
|
|
52
52
|
const value = 10;
|
|
53
53
|
await router.replace({ query: { [`${filterQuery}To`]: value } });
|
|
54
|
-
const setValueMock =
|
|
55
|
-
|
|
54
|
+
const setValueMock = vi.fn();
|
|
55
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue')
|
|
56
56
|
.mockImplementation(setValueMock);
|
|
57
57
|
shallowMount(FilterFromTo, mountOptions);
|
|
58
58
|
expect(setValueMock).toHaveBeenNthCalledWith(2, {
|
|
@@ -39,8 +39,8 @@ describe('Search Filter', () => {
|
|
|
39
39
|
it('initial restoreValue() triggers setValue() method', async () => {
|
|
40
40
|
const search = 'jest';
|
|
41
41
|
await router.replace({ query: { [filterQuery]: search } });
|
|
42
|
-
const setValueMock =
|
|
43
|
-
|
|
42
|
+
const setValueMock = vi.fn();
|
|
43
|
+
vi.spyOn(baseFilterMixin.methods, 'setValue').mockImplementationOnce(setValueMock);
|
|
44
44
|
shallowMount(SearchFilter, mountOptions);
|
|
45
45
|
expect(setValueMock).toHaveBeenCalledWith({ filter: filterQuery, value: search });
|
|
46
46
|
});
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
@input="setValue({ filter: filterQuery, value: $event })"
|
|
11
11
|
@reset="setValueToQuery({ value, filterQuery, storedProp: filterSchema.storedProp })"
|
|
12
12
|
@closed="setValueToQuery({ value, filterQuery, storedProp: filterSchema.storedProp })"
|
|
13
|
-
|
|
13
|
+
/>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
17
|
import apiFilterMixin from '../mixins/apiFilterMixin';
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
|
-
name: '
|
|
20
|
+
name: 'AbstractApiFilter',
|
|
21
21
|
mixins: [apiFilterMixin],
|
|
22
22
|
props: {
|
|
23
23
|
filterQuery: {
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
@input="setValue({ filter: filterQuery, value: $event })"
|
|
10
10
|
@reset="setValueToQuery({ value, filterQuery, storedProp: filterSchema.storedProp })"
|
|
11
11
|
@closed="setValueToQuery({ value, filterQuery, storedProp: filterSchema.storedProp })"
|
|
12
|
-
|
|
12
|
+
/>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
16
|
import enumFilterMixin from '../mixins/enumFilterMixin';
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
|
-
name: '
|
|
19
|
+
name: 'AbstractEnumFilter',
|
|
20
20
|
mixins: [enumFilterMixin],
|
|
21
21
|
props: {
|
|
22
22
|
filterQuery: {
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
:label="label"
|
|
5
5
|
mode="datetime"
|
|
6
6
|
@input="handleChange"
|
|
7
|
-
|
|
7
|
+
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import baseFilterMixin from '../mixins/baseFilterMixin/baseFilterMixin';
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
|
-
name: '
|
|
14
|
+
name: 'FilterFrom',
|
|
15
15
|
mixins: [baseFilterMixin],
|
|
16
16
|
props: {
|
|
17
17
|
filterQuery: {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<wt-label
|
|
7
7
|
class="filter-from-to__input-label"
|
|
8
8
|
for="filter-from-to-from"
|
|
9
|
-
>
|
|
9
|
+
>
|
|
10
|
+
{{ $t('reusable.from') }}
|
|
10
11
|
</wt-label>
|
|
11
12
|
<wt-input
|
|
12
13
|
class="filter-from-to-input"
|
|
@@ -16,13 +17,14 @@
|
|
|
16
17
|
:number-min="0"
|
|
17
18
|
:number-max="numberMax"
|
|
18
19
|
@input="setFrom"
|
|
19
|
-
|
|
20
|
+
/>
|
|
20
21
|
</div>
|
|
21
22
|
<div class="filter-from-to__input-wrapper">
|
|
22
23
|
<wt-label
|
|
23
24
|
class="filter-from-to__input-label"
|
|
24
25
|
for="filter-from-to-to"
|
|
25
|
-
>
|
|
26
|
+
>
|
|
27
|
+
{{ $t('reusable.to') }}
|
|
26
28
|
</wt-label>
|
|
27
29
|
<wt-input
|
|
28
30
|
class="filter-from-to-input"
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
:number-min="0"
|
|
33
35
|
:number-max="numberMax"
|
|
34
36
|
@input="setTo"
|
|
35
|
-
|
|
37
|
+
/>
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
</div>
|
|
@@ -43,7 +45,7 @@ import debounce from '../../../scripts/debounce';
|
|
|
43
45
|
import baseFilterMixin from '../mixins/baseFilterMixin/baseFilterMixin';
|
|
44
46
|
|
|
45
47
|
export default {
|
|
46
|
-
name: '
|
|
48
|
+
name: 'FilterFromTo',
|
|
47
49
|
mixins: [baseFilterMixin],
|
|
48
50
|
props: {
|
|
49
51
|
filterQuery: {
|
|
@@ -57,6 +59,11 @@ export default {
|
|
|
57
59
|
type: Number,
|
|
58
60
|
},
|
|
59
61
|
},
|
|
62
|
+
|
|
63
|
+
created() {
|
|
64
|
+
this.setFrom = debounce(this.setFrom);
|
|
65
|
+
this.setTo = debounce(this.setTo);
|
|
66
|
+
},
|
|
60
67
|
methods: {
|
|
61
68
|
restore() {
|
|
62
69
|
this.restoreFrom();
|
|
@@ -97,11 +104,6 @@ export default {
|
|
|
97
104
|
});
|
|
98
105
|
},
|
|
99
106
|
},
|
|
100
|
-
|
|
101
|
-
created() {
|
|
102
|
-
this.setFrom = debounce(this.setFrom);
|
|
103
|
-
this.setTo = debounce(this.setTo);
|
|
104
|
-
},
|
|
105
107
|
};
|
|
106
108
|
</script>
|
|
107
109
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<wt-search-bar
|
|
3
3
|
:value="filterSchema.value"
|
|
4
4
|
debounce
|
|
5
|
+
:placeholder="$t('reusable.search')"
|
|
5
6
|
@input="setValue({ filter: filterQuery, value: $event })"
|
|
6
7
|
@search="setValueToQuery({ filterQuery, value: $event })"
|
|
7
|
-
:placeholder="$t('reusable.search')"
|
|
8
8
|
/>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import baseFilterMixin from '../mixins/baseFilterMixin/baseFilterMixin';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
|
-
name: '
|
|
15
|
+
name: 'FilterSearch',
|
|
16
16
|
mixins: [baseFilterMixin],
|
|
17
17
|
props: {
|
|
18
18
|
filterQuery: {
|
|
@@ -3,15 +3,20 @@
|
|
|
3
3
|
:headers="headers"
|
|
4
4
|
:static-headers="staticHeaders"
|
|
5
5
|
@change="change"
|
|
6
|
-
|
|
6
|
+
/>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
import baseFilterMixin from '../mixins/baseFilterMixin/baseFilterMixin';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
|
-
name: '
|
|
13
|
+
name: 'FilterTableFields',
|
|
14
14
|
mixins: [baseFilterMixin],
|
|
15
|
+
|
|
16
|
+
model: {
|
|
17
|
+
prop: 'headers',
|
|
18
|
+
event: 'change',
|
|
19
|
+
},
|
|
15
20
|
props: {
|
|
16
21
|
entity: {
|
|
17
22
|
type: String,
|
|
@@ -31,11 +36,6 @@ export default {
|
|
|
31
36
|
filterQuery: 'fields',
|
|
32
37
|
}),
|
|
33
38
|
|
|
34
|
-
model: {
|
|
35
|
-
prop: 'headers',
|
|
36
|
-
event: 'change',
|
|
37
|
-
},
|
|
38
|
-
|
|
39
39
|
methods: {
|
|
40
40
|
change(headers) {
|
|
41
41
|
this.setValue(headers);
|
|
@@ -17,7 +17,7 @@ const router = createRouter({
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
describe('Enum filter mixin', () => {
|
|
20
|
-
const setValue =
|
|
20
|
+
const setValue = vi.fn();
|
|
21
21
|
const Component = {
|
|
22
22
|
render() {
|
|
23
23
|
},
|
|
@@ -53,7 +53,7 @@ describe('Enum filter mixin', () => {
|
|
|
53
53
|
|
|
54
54
|
it('Attaches locales to options, if they have "locale" key', async () => {
|
|
55
55
|
const options = [{
|
|
56
|
-
locale: '
|
|
56
|
+
locale: 'vi.locale',
|
|
57
57
|
}];
|
|
58
58
|
const expectedOptions = [{
|
|
59
59
|
locale: options[0].locale,
|
|
@@ -11,8 +11,8 @@ const page = 2;
|
|
|
11
11
|
const size = 20;
|
|
12
12
|
|
|
13
13
|
describe('Pagination filter mixin', () => {
|
|
14
|
-
const setPage =
|
|
15
|
-
const setSize =
|
|
14
|
+
const setPage = vi.fn();
|
|
15
|
+
const setSize = vi.fn();
|
|
16
16
|
let wrapper;
|
|
17
17
|
const Component = {
|
|
18
18
|
render() {},
|
|
@@ -33,7 +33,7 @@ describe('QueryFiltersStoreModule getters', () => {
|
|
|
33
33
|
});
|
|
34
34
|
it('GET_FILTERS filters aggregator', () => {
|
|
35
35
|
const { GET_FILTER } = module.getters;
|
|
36
|
-
module.getters.GET_FILTER =
|
|
36
|
+
module.getters.GET_FILTER = vi.fn((filter) => GET_FILTER(state)(filter));
|
|
37
37
|
expect(module.getters.GET_FILTERS(state, module.getters))
|
|
38
38
|
.toEqual({ agent: [1], search: 'jest' });
|
|
39
39
|
});
|
|
@@ -42,7 +42,7 @@ describe('QueryFiltersStoreModule getters', () => {
|
|
|
42
42
|
describe('QueryFiltersStoreModule actions', () => {
|
|
43
43
|
const context = {
|
|
44
44
|
state: { ...state },
|
|
45
|
-
commit:
|
|
45
|
+
commit: vi.fn(),
|
|
46
46
|
};
|
|
47
47
|
const module = new QueryFiltersStoreModule().getModule();
|
|
48
48
|
it('SET_FILTER: single value filter', () => {
|
|
@@ -11,9 +11,9 @@ import '../../../../../tests/mocks/localStorageMock';
|
|
|
11
11
|
|
|
12
12
|
localStorage.setItem('access-token', 'jest');
|
|
13
13
|
|
|
14
|
-
authAPI.setToken =
|
|
15
|
-
userinfoAPI.getSession =
|
|
16
|
-
userinfoAPI.getApplicationsAccess =
|
|
14
|
+
authAPI.setToken = vi.fn();
|
|
15
|
+
userinfoAPI.getSession = vi.fn(() => ({}));
|
|
16
|
+
userinfoAPI.getApplicationsAccess = vi.fn(() => ({}));
|
|
17
17
|
|
|
18
18
|
describe('Auth', () => {
|
|
19
19
|
let store;
|
|
@@ -23,7 +23,7 @@ describe('Auth', () => {
|
|
|
23
23
|
history: createWebHistory(),
|
|
24
24
|
routes: [],
|
|
25
25
|
});
|
|
26
|
-
router.replace =
|
|
26
|
+
router.replace = vi.fn();
|
|
27
27
|
|
|
28
28
|
const userinfo = new UserinfoStoreModule().getModule();
|
|
29
29
|
beforeEach(() => {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="auth-wrap">
|
|
3
|
-
<div
|
|
4
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-show="!isLoaded"
|
|
5
|
+
class="auth-loader"
|
|
6
|
+
>
|
|
7
|
+
<wt-loader />
|
|
5
8
|
</div>
|
|
6
9
|
<iframe
|
|
7
10
|
class="auth"
|
|
@@ -19,7 +22,7 @@ import AuthAPI from '../api/auth';
|
|
|
19
22
|
const authURL = process ? process.env.VUE_APP_AUTH_MODULE_URL : import.meta.env.VITE_AUTH_MODE_URL;
|
|
20
23
|
|
|
21
24
|
export default {
|
|
22
|
-
name: '
|
|
25
|
+
name: 'Auth',
|
|
23
26
|
props: {
|
|
24
27
|
namespace: {
|
|
25
28
|
type: String,
|
|
@@ -34,7 +37,7 @@ export default {
|
|
|
34
37
|
mounted() {
|
|
35
38
|
window.addEventListener('message', this.authMessageHandler, false);
|
|
36
39
|
},
|
|
37
|
-
|
|
40
|
+
unmounted() {
|
|
38
41
|
window.removeEventListener('message', this.authMessageHandler, false);
|
|
39
42
|
},
|
|
40
43
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import BaseStoreModule from '../BaseStoreModule';
|
|
2
2
|
|
|
3
3
|
const APIModule = {
|
|
4
|
-
getList:
|
|
5
|
-
get:
|
|
6
|
-
add:
|
|
7
|
-
update:
|
|
8
|
-
patch:
|
|
9
|
-
delete:
|
|
4
|
+
getList: vi.fn(),
|
|
5
|
+
get: vi.fn(),
|
|
6
|
+
add: vi.fn(),
|
|
7
|
+
update: vi.fn(),
|
|
8
|
+
patch: vi.fn(),
|
|
9
|
+
delete: vi.fn(),
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
describe('Base Store Module', () => {
|
package/dist/demo.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><meta charset="utf-8"><title>ui-sdk demo</title><script src="./ui-sdk.umd.js"></script><link rel="stylesheet" href="./ui-sdk.css"><script>console.log(ui-sdk)</script>
|