@webitel/ui-sdk 23.12.37 → 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/_variables.scss +2 -2
- 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/_variables.scss +1 -1
- 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 +25 -24
- package/src/css/styleguide/colors/reusable/_text-field.scss +20 -0
- package/src/locale/.DS_Store +0 -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
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
<slot
|
|
20
20
|
name="label"
|
|
21
21
|
v-bind="{ label }"
|
|
22
|
-
>
|
|
22
|
+
>
|
|
23
|
+
{{ requiredLabel }}
|
|
23
24
|
</slot>
|
|
24
25
|
</wt-label>
|
|
25
26
|
<div class="wt-input__wrapper">
|
|
26
27
|
<input
|
|
27
28
|
:id="name"
|
|
28
|
-
ref="
|
|
29
|
+
ref="WtInput"
|
|
29
30
|
:class="{
|
|
30
31
|
'wt-input--is-password': isPassword,
|
|
31
32
|
}"
|
|
@@ -41,212 +42,234 @@
|
|
|
41
42
|
@keyup="$emit('keyup', $event)"
|
|
42
43
|
>
|
|
43
44
|
<div
|
|
44
|
-
ref="
|
|
45
|
+
ref="AfterWrapper"
|
|
45
46
|
class="wt-input__after-wrapper"
|
|
46
47
|
>
|
|
47
48
|
<slot
|
|
48
49
|
name="after-input"
|
|
49
|
-
|
|
50
|
+
/>
|
|
50
51
|
<slot
|
|
51
52
|
v-if="isPassword"
|
|
52
53
|
name="show-password"
|
|
53
54
|
v-bind="{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
isPasswordVisible,
|
|
56
|
+
switchVisibilityPassword,
|
|
57
|
+
}"
|
|
57
58
|
>
|
|
58
59
|
<wt-icon-btn
|
|
59
60
|
:disabled="disabled"
|
|
60
61
|
:icon="showPasswordIcon"
|
|
61
62
|
@click="switchVisibilityPassword"
|
|
62
|
-
|
|
63
|
+
/>
|
|
63
64
|
</slot>
|
|
64
65
|
</div>
|
|
65
66
|
</div>
|
|
66
67
|
<wt-input-info
|
|
67
68
|
v-if="isValidation"
|
|
68
69
|
:invalid="invalid"
|
|
69
|
-
>
|
|
70
|
+
>
|
|
71
|
+
{{ validationText }}
|
|
70
72
|
</wt-input-info>
|
|
71
73
|
</div>
|
|
72
74
|
</template>
|
|
73
75
|
|
|
74
|
-
<script>
|
|
75
|
-
import
|
|
76
|
+
<script setup>
|
|
77
|
+
import {
|
|
78
|
+
ref, computed, useSlots, onMounted,
|
|
79
|
+
} from 'vue';
|
|
80
|
+
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
76
81
|
|
|
77
82
|
/*
|
|
78
83
|
* IMPORTANT: WT-INPUT SHOULD SUPPORT VUE 3 AND VUE 2 V-MODEL INTERFACES SO THAT THERE'S
|
|
79
84
|
* TWO PROPS: VALUE AND MODELVALUE, AND 2 EVENTS: @UPDATE:MODELVALUE AND @INPUT
|
|
80
85
|
* */
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false,
|
|
135
|
-
description: 'Native input disabled attribute',
|
|
136
|
-
},
|
|
137
|
-
/**
|
|
138
|
-
* Status of show password icon display
|
|
139
|
-
*/
|
|
140
|
-
hasShowPassword: {
|
|
141
|
-
type: Boolean,
|
|
142
|
-
default: false,
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Native number input restrictions
|
|
147
|
-
*/
|
|
148
|
-
numberMin: {
|
|
149
|
-
type: Number,
|
|
150
|
-
default: 0,
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Native number input restrictions
|
|
155
|
-
*/
|
|
156
|
-
numberMax: {
|
|
157
|
-
type: Number,
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
outline: {
|
|
161
|
-
type: Boolean,
|
|
162
|
-
default: false,
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
labelProps: {
|
|
166
|
-
type: Object,
|
|
167
|
-
description: 'Object with props, passed down to wt-label as props',
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
preventTrim: {
|
|
171
|
-
type: Boolean,
|
|
172
|
-
default: false,
|
|
173
|
-
},
|
|
86
|
+
const props = defineProps({
|
|
87
|
+
value: {
|
|
88
|
+
type: [String, Number],
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Current input modelValue (`v-model`)
|
|
92
|
+
*/
|
|
93
|
+
modelValue: {
|
|
94
|
+
type: [String, Number],
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Form input label
|
|
98
|
+
*/
|
|
99
|
+
label: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: '',
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Form input placeholder
|
|
105
|
+
*/
|
|
106
|
+
placeholder: {
|
|
107
|
+
type: String,
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* Form input name
|
|
111
|
+
*/
|
|
112
|
+
name: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: '',
|
|
115
|
+
},
|
|
116
|
+
/**
|
|
117
|
+
* Form input type
|
|
118
|
+
*/
|
|
119
|
+
type: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: 'text',
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Native input required attribute
|
|
125
|
+
*/
|
|
126
|
+
required: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false,
|
|
129
|
+
description: 'Native input required attribute',
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Native input disabled attribute
|
|
133
|
+
*/
|
|
134
|
+
disabled: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: false,
|
|
137
|
+
description: 'Native input disabled attribute',
|
|
174
138
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
watch: {
|
|
182
|
-
type: {
|
|
183
|
-
immediate: true,
|
|
184
|
-
handler(type) {
|
|
185
|
-
let inputType = type;
|
|
186
|
-
// Safari has bug for number input
|
|
187
|
-
if (typeof window !== 'undefined' || typeof document !== 'undefined') {
|
|
188
|
-
const ua = navigator.userAgent.toLocaleLowerCase();
|
|
189
|
-
if (
|
|
190
|
-
ua.indexOf('safari') !== -1
|
|
191
|
-
&& ua.indexOf('chrome') === -1
|
|
192
|
-
&& type === 'number'
|
|
193
|
-
) {
|
|
194
|
-
this.isNumberTypeSafari = true;
|
|
195
|
-
inputType = 'text';
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
this.inputType = inputType;
|
|
199
|
-
},
|
|
200
|
-
},
|
|
139
|
+
/**
|
|
140
|
+
* Status of show password icon display
|
|
141
|
+
*/
|
|
142
|
+
hasShowPassword: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: false,
|
|
201
145
|
},
|
|
202
146
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Native number input restrictions
|
|
149
|
+
*/
|
|
150
|
+
numberMin: {
|
|
151
|
+
type: Number,
|
|
152
|
+
default: 0,
|
|
153
|
+
},
|
|
207
154
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Native number input restrictions
|
|
157
|
+
*/
|
|
158
|
+
numberMax: {
|
|
159
|
+
type: Number,
|
|
160
|
+
},
|
|
211
161
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
162
|
+
outline: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: false,
|
|
165
|
+
},
|
|
215
166
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
167
|
+
labelProps: {
|
|
168
|
+
type: Object,
|
|
169
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
170
|
+
},
|
|
219
171
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
172
|
+
preventTrim: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false,
|
|
223
175
|
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
switchVisibilityPassword() {
|
|
232
|
-
this.isPasswordVisible = !this.isPasswordVisible;
|
|
233
|
-
this.inputType = this.isPasswordVisible ? 'text' : 'password';
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
async updateInputPaddings() {
|
|
237
|
-
// cant test this thing cause vue test utils doesnt render elements width :/
|
|
238
|
-
const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
|
|
239
|
-
const inputEl = this.$refs['wt-input'];
|
|
240
|
-
const defaultInputPadding = getComputedStyle(document.documentElement)
|
|
241
|
-
.getPropertyValue('--input-padding');
|
|
242
|
-
if (afterWrapperWidth >= inputEl.offsetWidth) return; // fixes https://my.webitel.com/browse/WTEL-2635
|
|
243
|
-
inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
|
|
244
|
-
},
|
|
176
|
+
|
|
177
|
+
// validation rules
|
|
178
|
+
// TODO: move to separate file to make it reusable
|
|
179
|
+
v: {
|
|
180
|
+
type: Object,
|
|
245
181
|
},
|
|
246
|
-
|
|
247
|
-
|
|
182
|
+
customValidators: {
|
|
183
|
+
type: Array,
|
|
184
|
+
default: () => [],
|
|
248
185
|
},
|
|
249
|
-
};
|
|
186
|
+
});
|
|
187
|
+
const emit = defineEmits(['update:modelValue', 'input', 'keyup']);
|
|
188
|
+
|
|
189
|
+
const slots = useSlots();
|
|
190
|
+
const {
|
|
191
|
+
isValidation,
|
|
192
|
+
invalid,
|
|
193
|
+
validationText,
|
|
194
|
+
} = useValidation({ v: props.v, customValidators: props.customValidators });
|
|
195
|
+
|
|
196
|
+
// toggles password <-> text at showPassword
|
|
197
|
+
const inputType = ref('');
|
|
198
|
+
inputType.value = props.type;
|
|
199
|
+
|
|
200
|
+
// template ref
|
|
201
|
+
const AfterWrapper = ref(null);
|
|
202
|
+
// template ref
|
|
203
|
+
const WtInput = ref(null);
|
|
204
|
+
|
|
205
|
+
const isPasswordVisible = ref(false);
|
|
206
|
+
|
|
207
|
+
// FIXME: uncomment and test, because this code was copy-pasted from vue-storefront long ago
|
|
208
|
+
// watch: {
|
|
209
|
+
// type: {
|
|
210
|
+
// immediate: true,
|
|
211
|
+
// handler(type) {
|
|
212
|
+
// let inputType = type;
|
|
213
|
+
// // Safari has bug for number input
|
|
214
|
+
// if (typeof window !== 'undefined' || typeof document !== 'undefined') {
|
|
215
|
+
// const ua = navigator.userAgent.toLocaleLowerCase();
|
|
216
|
+
// if (
|
|
217
|
+
// ua.indexOf('safari') !== -1
|
|
218
|
+
// && ua.indexOf('chrome') === -1
|
|
219
|
+
// && type === 'number'
|
|
220
|
+
// ) {
|
|
221
|
+
// inputType = 'text';
|
|
222
|
+
// }
|
|
223
|
+
// }
|
|
224
|
+
// this.inputType = inputType;
|
|
225
|
+
// },
|
|
226
|
+
// },
|
|
227
|
+
// },
|
|
228
|
+
|
|
229
|
+
const inputValue = computed(() => {
|
|
230
|
+
return props.value !== undefined ? props.value : props.modelValue;
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
const hasLabel = computed(() => {
|
|
234
|
+
return !!(props.label || slots.label);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const requiredLabel = computed(() => {
|
|
238
|
+
return props.required ? `${props.label}*` : props.label;
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
const isPassword = computed(() => {
|
|
242
|
+
return props.type === 'password' && props.hasShowPassword;
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
const showPasswordIcon = computed(() => {
|
|
246
|
+
return isPasswordVisible.value ? 'eye--closed' : 'eye--opened';
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
function inputHandler(event) {
|
|
250
|
+
const value = props.preventTrim ? event.target.value : event.target.value.trim();
|
|
251
|
+
emit('update:modelValue', value);
|
|
252
|
+
emit('input', value);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function switchVisibilityPassword() {
|
|
256
|
+
isPasswordVisible.value = !isPasswordVisible.value;
|
|
257
|
+
inputType.value = isPasswordVisible.value ? 'text' : 'password';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function updateInputPaddings() {
|
|
261
|
+
// cant test this thing cause vue test utils doesnt render elements width :/
|
|
262
|
+
const afterWrapperWidth = AfterWrapper.value.offsetWidth;
|
|
263
|
+
const inputEl = WtInput.value;
|
|
264
|
+
const defaultInputPadding = getComputedStyle(document.documentElement)
|
|
265
|
+
.getPropertyValue('--input-padding');
|
|
266
|
+
if (afterWrapperWidth >= inputEl.offsetWidth) return; // fixes https://my.webitel.com/browse/WTEL-2635
|
|
267
|
+
inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
onMounted(() => {
|
|
271
|
+
updateInputPaddings();
|
|
272
|
+
});
|
|
250
273
|
</script>
|
|
251
274
|
|
|
252
275
|
<style lang="scss">
|
|
@@ -267,18 +290,6 @@ export default {
|
|
|
267
290
|
position: relative;
|
|
268
291
|
}
|
|
269
292
|
|
|
270
|
-
.wt-label {
|
|
271
|
-
.wt-input:hover &,
|
|
272
|
-
.wt-input:focus-within & {
|
|
273
|
-
color: var(--form-label--hover-color);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.wt-input--invalid:hover &,
|
|
277
|
-
.wt-input--invalid:focus-within & {
|
|
278
|
-
color: var(--label--invalid-color);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
293
|
.wt-input__input {
|
|
283
294
|
@extend %typo-body-1;
|
|
284
295
|
@include wt-placeholder;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wt-load-bar">
|
|
3
|
-
<span
|
|
3
|
+
<span
|
|
4
|
+
:style="`width: ${progressWidth}%;`"
|
|
5
|
+
class="wt-load-bar__progress"
|
|
6
|
+
/>
|
|
4
7
|
</div>
|
|
5
8
|
</template>
|
|
6
9
|
|
|
7
10
|
<script>
|
|
8
11
|
export default {
|
|
9
|
-
name: '
|
|
12
|
+
name: 'WtLoadBar',
|
|
10
13
|
props: {
|
|
11
14
|
max: {
|
|
12
15
|
type: [Number, String],
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wt-loader wt-loader--md">
|
|
3
|
-
<svg
|
|
4
|
-
|
|
3
|
+
<svg
|
|
4
|
+
class="wt-loader--md__svg"
|
|
5
|
+
viewBox="0 0 80 80"
|
|
6
|
+
>
|
|
7
|
+
<rect
|
|
8
|
+
class="wt-loader--md__svg__rect"
|
|
9
|
+
x="8"
|
|
10
|
+
y="8"
|
|
11
|
+
width="64"
|
|
12
|
+
height="64"
|
|
13
|
+
/>
|
|
5
14
|
</svg>
|
|
6
15
|
</div>
|
|
7
16
|
</template>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<!--https://codepen.io/zapdev/pen/MYJRaj-->
|
|
2
2
|
|
|
3
3
|
<template>
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="wt-loader--sm"
|
|
6
|
+
:class="`wt-loader--sm--${color}`"
|
|
7
|
+
>
|
|
5
8
|
<svg viewBox="0 0 24 24">
|
|
6
|
-
<circle
|
|
9
|
+
<circle
|
|
10
|
+
cx="12"
|
|
11
|
+
cy="12"
|
|
12
|
+
r="8"
|
|
13
|
+
/>
|
|
7
14
|
</svg>
|
|
8
15
|
</div>
|
|
9
16
|
</template>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<wt-loader-sm
|
|
3
|
-
|
|
2
|
+
<wt-loader-sm
|
|
3
|
+
v-if="size === 'sm'"
|
|
4
|
+
class="wt-loader"
|
|
5
|
+
:color="color"
|
|
6
|
+
/>
|
|
7
|
+
<wt-loader-md
|
|
8
|
+
v-else-if="size === 'md'"
|
|
9
|
+
class="wt-loader"
|
|
10
|
+
/>
|
|
4
11
|
</template>
|
|
5
12
|
|
|
6
13
|
<script>
|
|
@@ -8,7 +15,7 @@ import WtLoaderSm from './_internals/wt-loader--sm.vue';
|
|
|
8
15
|
import WtLoaderMd from './_internals/wt-loader--md.vue';
|
|
9
16
|
|
|
10
17
|
export default {
|
|
11
|
-
name: '
|
|
18
|
+
name: 'WtLoader',
|
|
12
19
|
components: {
|
|
13
20
|
WtLoaderSm,
|
|
14
21
|
WtLoaderMd,
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<aside
|
|
2
|
+
<aside
|
|
3
|
+
v-clickaway="close"
|
|
4
|
+
class="wt-navigation-bar"
|
|
5
|
+
>
|
|
3
6
|
<wt-icon-btn
|
|
4
7
|
:class="{'active': isOpened}"
|
|
5
8
|
class="wt-navigation-bar__menu-btn"
|
|
6
9
|
icon="menu"
|
|
7
10
|
@click="isOpened = !isOpened"
|
|
8
|
-
|
|
11
|
+
/>
|
|
9
12
|
<transition name="fade">
|
|
10
|
-
<nav
|
|
13
|
+
<nav
|
|
14
|
+
v-show="isOpened"
|
|
15
|
+
class="wt-navigation-bar__nav"
|
|
16
|
+
>
|
|
11
17
|
<header class="wt-navigation-bar__nav-header">
|
|
12
18
|
<!-- vue cli build target lib cant handle dynamic require :( -->
|
|
13
19
|
<img
|
|
@@ -50,7 +56,7 @@
|
|
|
50
56
|
class="wt-navigation-bar__nav-close"
|
|
51
57
|
icon="close"
|
|
52
58
|
@click="isOpened = false"
|
|
53
|
-
|
|
59
|
+
/>
|
|
54
60
|
</header>
|
|
55
61
|
<wt-divider />
|
|
56
62
|
<ul class="wt-navigation-bar__nav-list">
|
|
@@ -66,7 +72,8 @@
|
|
|
66
72
|
:to="navItem.route"
|
|
67
73
|
class="wt-navigation-bar__nav-item-link"
|
|
68
74
|
@click="close"
|
|
69
|
-
>
|
|
75
|
+
>
|
|
76
|
+
{{ navItem.name || navItem.value }}
|
|
70
77
|
</router-link>
|
|
71
78
|
</div>
|
|
72
79
|
</div>
|
|
@@ -85,7 +92,7 @@
|
|
|
85
92
|
class="wt-navigation-bar__expansion-arrow"
|
|
86
93
|
color="active"
|
|
87
94
|
icon="arrow-right"
|
|
88
|
-
|
|
95
|
+
/>
|
|
89
96
|
</button>
|
|
90
97
|
<expand-transition>
|
|
91
98
|
<ul v-if="isExpanded(navItem)">
|
|
@@ -100,7 +107,8 @@
|
|
|
100
107
|
:to="nestedRoute(subNavItem, navItem)"
|
|
101
108
|
class="wt-navigation-bar__nav-item-link wt-navigation-bar__nav-item-link--subnav"
|
|
102
109
|
@click="close"
|
|
103
|
-
>
|
|
110
|
+
>
|
|
111
|
+
{{ subNavItem.name || subNavItem.value }}
|
|
104
112
|
</router-link>
|
|
105
113
|
</div>
|
|
106
114
|
</li>
|
|
@@ -118,7 +126,7 @@
|
|
|
118
126
|
import ExpandTransition from '../transitions/wt-expand-transition.vue';
|
|
119
127
|
|
|
120
128
|
export default {
|
|
121
|
-
name: '
|
|
129
|
+
name: 'WtNavigationBar',
|
|
122
130
|
components: { ExpandTransition },
|
|
123
131
|
props: {
|
|
124
132
|
currentApp: {
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
class="wt-notification__icon"
|
|
8
8
|
:icon="notificationIcon"
|
|
9
9
|
:color="notificationIconColor"
|
|
10
|
-
|
|
10
|
+
/>
|
|
11
11
|
|
|
12
12
|
<p class="wt-notification__text">
|
|
13
|
-
<slot
|
|
13
|
+
<slot />
|
|
14
14
|
</p>
|
|
15
15
|
</article>
|
|
16
16
|
</template>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<script>
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
|
-
name: '
|
|
21
|
+
name: 'WtNotification',
|
|
22
22
|
props: {
|
|
23
23
|
type: {
|
|
24
24
|
type: String,
|