@webitel/ui-sdk 26.6.64 → 26.6.66

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 (50) hide show
  1. package/dist/{clients-DtfBVBhI.js → clients-B1AOAvEK.js} +358 -81
  2. package/dist/{components-eoQi5zKf.js → components-C2Y_Q08L.js} +2993 -1402
  3. package/dist/toZonedTime-B8L5kbse.js +308 -0
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.js +12678 -578
  6. package/dist/ui-sdk.umd.cjs +1841 -1838
  7. package/dist/{wt-button-DSxkafVk.js → wt-button-uY5Q1GAg.js} +3 -2
  8. package/dist/{wt-chat-emoji-CROATNmD.js → wt-chat-emoji-B11mhNOu.js} +2 -2
  9. package/dist/wt-datepicker-BGSK1JFI.js +286 -0
  10. package/dist/{wt-display-chip-items-BYkx7GAw.js → wt-display-chip-items-DmQstZ3Y.js} +1 -1
  11. package/dist/{wt-player-C-Ucuchh.js → wt-player-B2SZ_NSb.js} +1 -1
  12. package/dist/{wt-send-message-popup-DuRb4ozr.js → wt-send-message-popup-DHdVFhOt.js} +2 -2
  13. package/dist/{wt-type-extension-value-input-BroXv_Jr.js → wt-type-extension-value-input-3100gKfK.js} +6 -6
  14. package/dist/{wt-vidstack-player-1BqwgHog.js → wt-vidstack-player-BWe7cgoj.js} +2 -2
  15. package/package.json +2 -1
  16. package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +3 -3
  17. package/src/components/wt-button/wt-button.vue +2 -1
  18. package/src/components/wt-datepicker/wt-datepicker.vue +193 -253
  19. package/src/locale/en/en.js +2 -0
  20. package/src/locale/es/es.js +2 -0
  21. package/src/locale/kz/kz.js +2 -0
  22. package/src/locale/pl/pl.js +2 -0
  23. package/src/locale/ro/ro.js +2 -0
  24. package/src/locale/ru/ru.js +2 -0
  25. package/src/locale/uk/uk.js +2 -0
  26. package/src/locale/uz/uz.js +2 -0
  27. package/src/locale/vi/vi.js +2 -0
  28. package/src/modules/Filters/components/filter-datetime.vue +3 -3
  29. package/src/modules/QueryFilters/components/filter-datetime.vue +3 -3
  30. package/src/plugins/primevue/primevue.plugin.js +11 -1
  31. package/src/plugins/primevue/theme/components/button/button.js +1 -1
  32. package/src/plugins/primevue/theme/components/components.js +2 -0
  33. package/src/plugins/primevue/theme/components/datepicker/datepicker.js +8 -0
  34. package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +62 -140
  35. package/types/components/wt-popover/wt-popover.vue.d.ts +1 -1
  36. package/types/locale/en/en.d.ts +2 -0
  37. package/types/locale/es/es.d.ts +2 -0
  38. package/types/locale/i18n.d.ts +18 -0
  39. package/types/locale/index.d.ts +18 -0
  40. package/types/locale/kz/kz.d.ts +2 -0
  41. package/types/locale/pl/pl.d.ts +2 -0
  42. package/types/locale/ro/ro.d.ts +2 -0
  43. package/types/locale/ru/ru.d.ts +2 -0
  44. package/types/locale/uk/uk.d.ts +2 -0
  45. package/types/locale/uz/uz.d.ts +2 -0
  46. package/types/locale/vi/vi.d.ts +2 -0
  47. package/types/plugins/primevue/theme/components/components.d.ts +2 -0
  48. package/types/plugins/primevue/theme/components/datepicker/datepicker.d.ts +214 -0
  49. package/dist/dist-uCh8HaP3.js +0 -1910
  50. package/dist/wt-datepicker-EX4vuaeW.js +0 -5774
@@ -1,43 +1,117 @@
1
1
  <template>
2
2
  <div
3
- :class="{
4
- 'wt-datepicker--disabled': disabled,
5
- 'wt-datepicker--invalid': invalid,
6
- }" class="wt-datepicker">
7
- <wt-label :disabled="disabled" v-bind="labelProps" :invalid="invalid">
3
+ class="wt-datepicker"
4
+ >
5
+ <wt-label :disabled="disabled" v-bind="labelProps" :for="datepickerId" :invalid="invalid">
8
6
  <!-- @slot Custom input label -->
9
7
  <slot name="label" v-bind="{ label }">
10
8
  {{ requiredLabel }}
11
9
  </slot>
12
10
  </wt-label>
13
- <vue-datepicker
14
- ref="datepicker" :close-on-auto-apply="false"
15
- :format="isDateTime ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy'" :locale="$i18n.locale" :model-value="+value"
16
- :placeholder="placeholder || (isDateTime ? '00/00/00 00:00' : '00/00/0000')
17
- " auto-apply class="wt-datepicker__datepicker" v-bind="{ ...$attrs, ...$props }" @closed="isOpened = false"
18
- @open="isOpened = true" @update:model-value="emit('input', $event.getTime())">
19
- <template #input-icon>
20
- <wt-icon :color="disabled ? 'disabled' : 'default'" icon="calendar" />
21
- </template>
22
- <template #clear-icon>
23
- <wt-icon-btn
24
- v-if="clearable && value" :color="disabled ? 'disabled' : 'default'" icon="close"
25
- @click.stop="clearValue" />
26
- </template>
27
- <template #arrow-left>
28
- <wt-icon-btn icon="arrow-left" />
29
- </template>
30
- <template #arrow-right>
31
- <wt-icon-btn icon="arrow-right" />
32
- </template>
33
- <template v-if="isDateTime" #time-picker="{ time, updateTime }">
34
- <div class="datepicker__timepicker">
35
- <wt-time-input :model-value="time.hours" max-value="23" @update:model-value="updateTime" />
36
- :
37
- <wt-time-input :model-value="time.minutes" max-value="59" @update:model-value="updateTime($event, false)" />
38
- </div>
39
- </template>
40
- </vue-datepicker>
11
+ <p-datepicker
12
+ ref="datepicker"
13
+ :id="datepickerId"
14
+ v-model="modelValue"
15
+ date-format="dd/mm/yy"
16
+ :required="required"
17
+ :disabled="disabled"
18
+ :show-time="showTime"
19
+ :min-date="minDate"
20
+ :max-date="maxDate"
21
+ :placeholder="placholder"
22
+ :show-clear="clearable && modelValue"
23
+ show-button-bar
24
+ fluid
25
+ :pt="{
26
+ selectMonth: {
27
+ class: 'typo-subtitle-1'
28
+ },
29
+ selectYear: {
30
+ class: 'typo-subtitle-1'
31
+ },
32
+ tableHeaderCell: {
33
+ class: 'typo-body-2-bold'
34
+ },
35
+ day: {
36
+ class: 'typo-body-2'
37
+ },
38
+ hour: {
39
+ class: 'typo-body-2'
40
+ },
41
+ minute: {
42
+ class: 'typo-body-2'
43
+ }
44
+ }"
45
+ @show="onPanelShow"
46
+ >
47
+ <template #buttonbar="{ todayCallback, clearCallback }">
48
+ <div class="wt-datepicker__button-bar">
49
+ <wt-button
50
+ :color="ButtonColor.SECONDARY"
51
+ :variant="ButtonVariant.OUTLINED"
52
+ :size="ComponentSize.SM"
53
+ @click="todayCallback"
54
+ >
55
+ {{ t('reusable.today') }}
56
+ </wt-button>
57
+ <wt-button
58
+ v-show="clearable && modelValue"
59
+ :color="ButtonColor.SECONDARY"
60
+ :variant="ButtonVariant.OUTLINED"
61
+ :size="ComponentSize.SM"
62
+ @click="clearCallback"
63
+ >
64
+ {{ t('reusable.clear') }}
65
+ </wt-button>
66
+ </div>
67
+ </template>
68
+
69
+ <template #prevbutton="{ actionCallback }">
70
+ <wt-icon-btn
71
+ icon="arrow-left"
72
+ @click="actionCallback"
73
+ />
74
+ </template>
75
+
76
+ <template #nextbutton="{ actionCallback }">
77
+ <wt-icon-btn
78
+ icon="arrow-right"
79
+ @click="actionCallback"
80
+ />
81
+ </template>
82
+
83
+ <template #clearicon="{ clearCallback }">
84
+ <wt-icon-btn
85
+ icon="close"
86
+ class="wt-datepicker__clear-icon"
87
+ @click="clearCallback"
88
+ />
89
+ </template>
90
+
91
+ <template #hourincrementbutton="{ callbacks }">
92
+ <span @mousedown="callbacks.mousedown" @mouseup="callbacks.mouseup" @mouseleave="callbacks.mouseleave">
93
+ <wt-icon-btn icon="arrow-up" />
94
+ </span>
95
+ </template>
96
+
97
+ <template #hourdecrementbutton="{ callbacks }">
98
+ <span @mousedown="callbacks.mousedown" @mouseup="callbacks.mouseup" @mouseleave="callbacks.mouseleave">
99
+ <wt-icon-btn icon="arrow-down" />
100
+ </span>
101
+ </template>
102
+
103
+ <template #minuteincrementbutton="{ callbacks }">
104
+ <span @mousedown="callbacks.mousedown" @mouseup="callbacks.mouseup" @mouseleave="callbacks.mouseleave">
105
+ <wt-icon-btn icon="arrow-up" />
106
+ </span>
107
+ </template>
108
+
109
+ <template #minutedecrementbutton="{ callbacks }">
110
+ <span @mousedown="callbacks.mousedown" @mouseup="callbacks.mouseup" @mouseleave="callbacks.mouseleave">
111
+ <wt-icon-btn icon="arrow-down" />
112
+ </span>
113
+ </template>
114
+ </p-datepicker>
41
115
  <wt-message
42
116
  v-if="isValidation && validationText"
43
117
  :color="validationTextColor"
@@ -49,99 +123,92 @@ v-if="clearable && value" :color="disabled ? 'disabled' : 'default'" icon="close
49
123
  </div>
50
124
  </template>
51
125
 
52
- <script setup>
53
- import '@vuepic/vue-datepicker/dist/main.css';
54
-
55
- import VueDatepicker from '@vuepic/vue-datepicker';
56
- import { useWindowFocus } from '@vueuse/core';
57
- import { computed, ref, toRefs, watch } from 'vue';
58
- import { ComponentSize, MessageVariant } from '../../enums';
126
+ <script setup lang="ts">
127
+ import { fromZonedTime, toZonedTime } from 'date-fns-tz';
128
+ import PDatepicker, {
129
+ DatePickerEmitsOptions,
130
+ DatePickerProps,
131
+ } from 'primevue/datepicker';
132
+ import {
133
+ computed,
134
+ defineModel,
135
+ defineProps,
136
+ nextTick,
137
+ toRefs,
138
+ useTemplateRef,
139
+ } from 'vue';
140
+ import { useI18n } from 'vue-i18n';
141
+ import {
142
+ ButtonColor,
143
+ ButtonVariant,
144
+ ComponentSize,
145
+ MessageVariant,
146
+ } from '../../enums';
59
147
  import { useValidation } from '../../mixins/validationMixin/useValidation';
60
148
 
61
- const props = defineProps({
62
- /**
63
- * [`'date'`, `'datetime'`]
64
- * */
65
-
66
- mode: {
67
- type: String,
68
- default: 'date',
69
- options: [
70
- 'date',
71
- 'datetime',
72
- ],
73
- },
74
- value: {
75
- type: [
76
- String,
77
- Number,
78
- ],
79
- default: 'Date.now()',
80
- },
81
- /**
82
- * label above calendar input
83
- */
84
- label: {
85
- type: String,
86
- default: '',
87
- },
88
- placeholder: {
89
- type: String,
90
- default: '',
91
- },
92
- disabled: {
93
- type: Boolean,
94
- default: false,
95
- },
96
- disabledDates: {
97
- type: Object,
98
- },
99
- lang: {
100
- type: String,
101
- default: 'en',
102
- },
103
-
104
- /**
105
- * Object with props, passed down to wt-label as props
106
- */
149
+ interface Props extends DatePickerProps {
150
+ showTime?: boolean;
151
+ minDate?: Date;
152
+ maxDate?: Date;
153
+ label?: string;
154
+ labelProps?: Record<string, unknown>;
155
+ placholder?: string;
156
+ disabled?: boolean;
157
+ required?: boolean;
158
+ clearable?: boolean;
159
+ timezone?: string;
160
+ v?: Record<string, unknown>;
161
+ customValidators?: unknown[];
162
+ }
163
+
164
+ const props = withDefaults(defineProps<Props>(), {
165
+ labelProps: () => ({}),
166
+ customValidators: () => [],
167
+ });
107
168
 
108
- labelProps: {
109
- type: Object,
110
- },
169
+ const emit = defineEmits<DatePickerEmitsOptions>();
111
170
 
112
- /**
113
- * Native input required attribute
114
- */
171
+ const model = defineModel<number | null>({
172
+ default: null,
173
+ });
115
174
 
116
- required: {
117
- type: Boolean,
118
- default: false,
119
- },
175
+ const { t } = useI18n();
120
176
 
121
- // validation rules
122
- // TODO: move to separate file to make it reusable
123
- v: {
124
- type: Object,
177
+ const modelValue = computed({
178
+ get() {
179
+ if (!model.value) return null;
180
+ const date = new Date(+model.value);
181
+ return props.timezone ? toZonedTime(date, props.timezone) : date;
125
182
  },
126
- customValidators: {
127
- type: Array,
128
- default: () => [],
129
- },
130
- clearable: {
131
- type: Boolean,
132
- default: false,
183
+ set(value) {
184
+ if (!value) {
185
+ model.value = null;
186
+ return;
187
+ }
188
+ const utc = props.timezone ? fromZonedTime(value, props.timezone) : value;
189
+ model.value = utc.getTime();
133
190
  },
134
191
  });
135
- const emit = defineEmits([
136
- 'input',
137
- ]);
138
192
 
139
- const isOpened = ref(false);
140
- const datepicker = ref(null); // template ref
193
+ const datepicker = useTemplateRef<HTMLDivElement>('datepicker');
194
+
195
+ const datepickerId = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
141
196
 
142
- const winFocused = useWindowFocus();
197
+ // PrimeVue initializes its internal currentHour/currentMinute from new Date() when the
198
+ // overlay opens, ignoring the model value. Re-assigning the same value forces a re-sync.
199
+ const onPanelShow = () => {
200
+ if (props.showTime && modelValue.value) {
201
+ const currentDate = modelValue.value as Date;
202
+ nextTick(() => {
203
+ modelValue.value = new Date(currentDate.getTime());
204
+ });
205
+ }
143
206
 
144
- const isDateTime = props.mode === 'datetime';
207
+ // align overlay, because on first render it is not aligned correctly
208
+ setTimeout(() => {
209
+ datepicker.value?.alignOverlay();
210
+ }, 0);
211
+ };
145
212
 
146
213
  const requiredLabel = computed(() => {
147
214
  return props.required ? `${props.label}*` : props.label;
@@ -155,147 +222,20 @@ const { isValidation, invalid, validationText, validationTextColor } =
155
222
  v,
156
223
  customValidators,
157
224
  });
158
-
159
- const clearValue = () => {
160
- emit('input', null);
161
-
162
- closePicker();
163
- };
164
-
165
- const closePicker = () => {
166
- if (isOpened.value) {
167
- datepicker?.value.closeMenu();
168
- }
169
-
170
- isOpened.value = false;
171
- };
172
-
173
- // close picker when window loses focus(when clicking to iframe)
174
- // https://webitel.atlassian.net/browse/WTEL-5794
175
- watch(winFocused, (focused) => {
176
- if (!focused && isOpened.value) closePicker();
177
- });
178
225
  </script>
179
226
 
180
227
  <style scoped>
181
- .wt-datepicker :deep(.dp__main) .dp__input_icon {
182
- left: var(--spacing-xs);
183
- line-height: 0;
184
- }
185
-
186
- .wt-datepicker :deep(.dp__main) .dp__clear_icon {
187
- right: var(--spacing-xs);
188
- line-height: 0;
189
- }
190
-
191
- .wt-datepicker :deep(.dp__main) .dp__input {
192
- /* Typography: typo-body-1 (14px/400/24px) - cannot add utility class to third-party component */
193
- font-family: 'Montserrat', monospace;
194
- font-size: 14px;
195
- font-weight: 400;
196
- line-height: 24px;
197
- text-transform: none;
198
- }
199
-
200
- .wt-datepicker :deep(.dp__main) .dp__arrow_top {
201
- display: none;
202
- }
203
-
204
- /* don't know why but month or year selection doesn't work
205
- suppose its related to compatibility build */
206
- .wt-datepicker :deep(.dp__main) .dp__month_year_wrap {
207
- pointer-events: none;
208
- }
209
-
210
- .wt-datepicker :deep(.dp__main) .dp__month_year_select,
211
- .wt-datepicker :deep(.dp__main) .dp__cell_inner {
212
- /* Typography: typo-body-2 (12px/400/16px) - cannot add utility class to third-party component */
213
- font-family: 'Montserrat', monospace;
214
- font-size: 12px;
215
- font-weight: 400;
216
- line-height: 16px;
217
- text-transform: none;
218
- }
219
-
220
- /* reset right/left arrow hover */
221
- .wt-datepicker :deep(.dp__main) .dp__inner_nav:hover {
222
- background: inherit;
223
- }
224
-
225
- .wt-datepicker :deep(.dp__main) .dp__menu {
226
- box-sizing: border-box;
227
- box-shadow: var(--elevation-10);
228
- border-radius: var(--border-radius);
229
- padding: var(--spacing-xs);
230
- width: 196px;
231
- min-width: 196px;
232
- }
233
-
234
- .wt-datepicker :deep(.dp__main) .dp__calendar_wrap {
235
- gap: var(--spacing-2xs);
236
- }
237
-
238
- .wt-datepicker :deep(.dp__main) .dp__calendar_header_item {
239
- /* Typography: typo-subtitle-2 (12px/500/20px) - cannot add utility class to third-party component */
240
- font-family: 'Montserrat', monospace;
241
- font-size: 12px;
242
- font-weight: 500;
243
- line-height: 20px;
244
- text-transform: none;
245
- }
246
-
247
- .wt-datepicker :deep(.dp__main) .dp__calendar_header_separator {
248
- background: var(--secondary-color);
249
- }
250
-
251
- .wt-datepicker :deep(.dp__main) .dp__calendar_header,
252
- .wt-datepicker :deep(.dp__main) .dp__calendar_row {
253
- gap: var(--spacing-3xs);
254
- }
255
-
256
- /* switch to time view */
257
- .wt-datepicker :deep(.dp__main) .dp__button {
258
- display: none;
259
- }
260
-
261
- .wt-datepicker :deep(.dp__main) .dp__action_row {
262
- flex-direction: column;
263
- gap: var(--spacing-xs);
264
- }
265
-
266
- .wt-datepicker :deep(.dp__main) .dp__selection_preview,
267
- .wt-datepicker :deep(.dp__main) .dp__action_buttons {
268
- width: 100%;
269
- }
270
-
271
- .wt-datepicker :deep(.dp__main) .dp__selection_preview {
272
- text-align: center;
273
- }
274
-
275
- .wt-datepicker :deep(.dp__main) .dp__action_buttons {
276
- display: flex;
277
- gap: var(--spacing-xs);
278
- }
279
-
280
- .wt-datepicker--invalid :deep(.dp__main) .dp__input {
281
- /* prevent outline overlapping false color */
282
- outline: none;
283
- border-color: var(--wt-text-field-input-border-error-color);
284
- color: var(--wt-text-field-error-text-color);
285
- }
286
-
287
- .wt-datepicker--invalid :deep(.dp__main) .dp__input_icon {
288
- --icon-color: var(--wt-text-field-input-border-error-color);
289
- }
290
-
291
- .datepicker__timepicker {
292
- display: flex;
293
- align-items: center;
294
- gap: var(--spacing-xs);
295
- margin-top: var(--spacing-xs);
296
- }
297
-
298
- .datepicker__timepicker .wt-time-input {
299
- flex-grow: 1;
228
+ .wt-datepicker__clear-icon {
229
+ position: absolute;
230
+ top: 50%;
231
+ transform: translateY(-50%);
232
+ inset-inline-end: var(--p-form-field-padding-x);
233
+ cursor: pointer;
234
+ }
235
+
236
+ .wt-datepicker__button-bar {
237
+ width: 100%;
238
+ display: flex;
239
+ justify-content: space-between;
300
240
  }
301
241
  </style>
@@ -67,6 +67,8 @@ export default deepmerge(
67
67
  generate: 'Generate',
68
68
  from: 'From',
69
69
  to: 'To',
70
+ today: 'Today',
71
+ clear: 'Clear',
70
72
  tts: 'Text-to-Speech',
71
73
  state: 'State',
72
74
  status: 'Status',
@@ -63,6 +63,8 @@ export default {
63
63
  generate: 'Generar',
64
64
  from: 'Desde',
65
65
  to: 'Hasta',
66
+ today: 'Hoy',
67
+ clear: 'Borrar',
66
68
  tts: 'Texto a Voz',
67
69
  state: 'Estado',
68
70
  status: 'Estado',
@@ -64,6 +64,8 @@ export default {
64
64
  generate: 'Жасау',
65
65
  from: 'Бастап',
66
66
  to: 'Дейін',
67
+ today: 'Бүгін',
68
+ clear: 'Тазарту',
67
69
  tts: 'Мәтін-дауыс',
68
70
  state: 'Күй',
69
71
  status: 'Күй',
@@ -64,6 +64,8 @@ export default {
64
64
  generate: 'Generuj',
65
65
  from: 'Od',
66
66
  to: 'Do',
67
+ today: 'Dzisiaj',
68
+ clear: 'Wyczyść',
67
69
  tts: 'Tekst na mowę',
68
70
  state: 'Stan',
69
71
  status: 'Status',
@@ -64,6 +64,8 @@ export default {
64
64
  generate: 'Generează',
65
65
  from: 'De la',
66
66
  to: 'Până la',
67
+ today: 'Astăzi',
68
+ clear: 'Șterge',
67
69
  tts: 'Text-to-Speech',
68
70
  state: 'Stare',
69
71
  status: 'Status',
@@ -60,6 +60,8 @@ export default {
60
60
  generate: 'Сгенерировать',
61
61
  from: 'От',
62
62
  to: 'До',
63
+ today: 'Сегодня',
64
+ clear: 'Очистить',
63
65
  tts: 'Text-to-Speech',
64
66
  state: 'Состояние',
65
67
  status: 'Статус',
@@ -60,6 +60,8 @@ export default {
60
60
  generate: 'Згенерувати',
61
61
  from: 'Від',
62
62
  to: 'До',
63
+ today: 'Сьогодні',
64
+ clear: 'Очистити',
63
65
  tts: 'Text-to-Speech',
64
66
  state: 'Стан',
65
67
  status: 'Статус',
@@ -64,6 +64,8 @@ export default {
64
64
  generate: 'Generatsiya',
65
65
  from: 'Dan',
66
66
  to: 'Gacha',
67
+ today: 'Bugun',
68
+ clear: 'Tozalash',
67
69
  tts: 'Matnni ovozga aylantirish',
68
70
  state: 'Holat',
69
71
  status: 'Holat',
@@ -64,6 +64,8 @@ export default {
64
64
  generate: 'Tạo',
65
65
  from: 'Từ',
66
66
  to: 'Đến',
67
+ today: 'Hôm nay',
68
+ clear: 'Xóa',
67
69
  tts: 'Chuyển văn bản thành giọng nói',
68
70
  state: 'Trạng thái',
69
71
  status: 'Trạng thái',
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <wt-datepicker
3
3
  :label="filterSchema.label"
4
- :value="value"
5
- mode="datetime"
6
- @input="setValue"
4
+ :model-value="value"
5
+ show-time
6
+ @update:model-value="setValue"
7
7
  />
8
8
  </template>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <wt-datepicker
3
3
  :label="label"
4
- :value="filterSchema.value"
5
- mode="datetime"
6
- @input="handleChange"
4
+ :model-value="filterSchema.value"
5
+ show-time
6
+ @update:model-value="handleChange"
7
7
  />
8
8
  </template>
9
9
 
@@ -1,3 +1,5 @@
1
+ import { all } from 'primelocale';
2
+
1
3
  import PAutoComplete from 'primevue/autocomplete';
2
4
  import PAvatar from 'primevue/avatar';
3
5
  import PBadge from 'primevue/badge';
@@ -8,6 +10,7 @@ import PChip from 'primevue/chip';
8
10
  import PColumn from 'primevue/column';
9
11
  import PrimeVue from 'primevue/config';
10
12
  import PTable from 'primevue/datatable';
13
+ import PDatepicker from 'primevue/datepicker';
11
14
  import PDivider from 'primevue/divider';
12
15
  import PGalleria from 'primevue/galleria';
13
16
  import PImage from 'primevue/image';
@@ -29,11 +32,16 @@ import ToastService from 'primevue/toastservice';
29
32
  import PToggleSwitch from 'primevue/toggleswitch';
30
33
  import PToolbar from 'primevue/toolbar';
31
34
  import Tooltip from 'primevue/tooltip';
32
-
35
+ import { computed } from 'vue';
33
36
  import WebitelTheme from './theme/webitel-theme.js';
34
37
 
35
38
  import './primevue.css';
36
39
 
40
+ const currentLocale = computed(() => {
41
+ const locale = localStorage.getItem('lang');
42
+ return locale === 'kz' ? 'kk' : locale;
43
+ });
44
+
37
45
  const changeComponentCompatMode = (component) => {
38
46
  component.compatConfig = {
39
47
  MODE: 3,
@@ -55,6 +63,7 @@ const initPrimevue = (app) => {
55
63
  },
56
64
  },
57
65
  },
66
+ locale: all[currentLocale.value] || all.en,
58
67
  });
59
68
 
60
69
  app.component('PButton', changeComponentCompatMode(PButton));
@@ -85,6 +94,7 @@ const initPrimevue = (app) => {
85
94
  changeComponentCompatMode(PInputGroupAddon),
86
95
  );
87
96
  app.component('PMessage', changeComponentCompatMode(PMessage));
97
+ app.component('PDatepicker', changeComponentCompatMode(PDatepicker));
88
98
  app.component('PToast', changeComponentCompatMode(PToast));
89
99
  app.component('PMultiSelect', changeComponentCompatMode(PMultiSelect));
90
100
  app.component('PSelect', changeComponentCompatMode(PSelect));
@@ -145,7 +145,7 @@ const button = {
145
145
  .p-button {
146
146
  ${generateWtTypographyCustomCss({
147
147
  dt,
148
- typo: WtTypography.Button,
148
+ typo: WtTypography.ButtonMD,
149
149
  })}
150
150
  }
151
151
  .p-button:disabled {
@@ -5,6 +5,7 @@ import breadcrumb from './breadcrumb/breadcrumb.js';
5
5
  import button from './button/button.js';
6
6
  import checkbox from './checkbox/checkbox.js';
7
7
  import chip from './chip/chip.js';
8
+ import datepicker from './datepicker/datepicker.js';
8
9
  import divider from './divider/divider.js';
9
10
  import galleria from './galleria/galleria.js';
10
11
  import image from './image/image.js';
@@ -34,6 +35,7 @@ const components = {
34
35
  badge,
35
36
  chip,
36
37
  checkbox,
38
+ datepicker,
37
39
  textarea,
38
40
  toast,
39
41
  toggleswitch: switcher,