@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.
- package/dist/{clients-DtfBVBhI.js → clients-B1AOAvEK.js} +358 -81
- package/dist/{components-eoQi5zKf.js → components-C2Y_Q08L.js} +2993 -1402
- package/dist/toZonedTime-B8L5kbse.js +308 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +12678 -578
- package/dist/ui-sdk.umd.cjs +1841 -1838
- package/dist/{wt-button-DSxkafVk.js → wt-button-uY5Q1GAg.js} +3 -2
- package/dist/{wt-chat-emoji-CROATNmD.js → wt-chat-emoji-B11mhNOu.js} +2 -2
- package/dist/wt-datepicker-BGSK1JFI.js +286 -0
- package/dist/{wt-display-chip-items-BYkx7GAw.js → wt-display-chip-items-DmQstZ3Y.js} +1 -1
- package/dist/{wt-player-C-Ucuchh.js → wt-player-B2SZ_NSb.js} +1 -1
- package/dist/{wt-send-message-popup-DuRb4ozr.js → wt-send-message-popup-DHdVFhOt.js} +2 -2
- package/dist/{wt-type-extension-value-input-BroXv_Jr.js → wt-type-extension-value-input-3100gKfK.js} +6 -6
- package/dist/{wt-vidstack-player-1BqwgHog.js → wt-vidstack-player-BWe7cgoj.js} +2 -2
- package/package.json +2 -1
- package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +3 -3
- package/src/components/wt-button/wt-button.vue +2 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +193 -253
- package/src/locale/en/en.js +2 -0
- package/src/locale/es/es.js +2 -0
- package/src/locale/kz/kz.js +2 -0
- package/src/locale/pl/pl.js +2 -0
- package/src/locale/ro/ro.js +2 -0
- package/src/locale/ru/ru.js +2 -0
- package/src/locale/uk/uk.js +2 -0
- package/src/locale/uz/uz.js +2 -0
- package/src/locale/vi/vi.js +2 -0
- package/src/modules/Filters/components/filter-datetime.vue +3 -3
- package/src/modules/QueryFilters/components/filter-datetime.vue +3 -3
- package/src/plugins/primevue/primevue.plugin.js +11 -1
- package/src/plugins/primevue/theme/components/button/button.js +1 -1
- package/src/plugins/primevue/theme/components/components.js +2 -0
- package/src/plugins/primevue/theme/components/datepicker/datepicker.js +8 -0
- package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +62 -140
- package/types/components/wt-popover/wt-popover.vue.d.ts +1 -1
- package/types/locale/en/en.d.ts +2 -0
- package/types/locale/es/es.d.ts +2 -0
- package/types/locale/i18n.d.ts +18 -0
- package/types/locale/index.d.ts +18 -0
- package/types/locale/kz/kz.d.ts +2 -0
- package/types/locale/pl/pl.d.ts +2 -0
- package/types/locale/ro/ro.d.ts +2 -0
- package/types/locale/ru/ru.d.ts +2 -0
- package/types/locale/uk/uk.d.ts +2 -0
- package/types/locale/uz/uz.d.ts +2 -0
- package/types/locale/vi/vi.d.ts +2 -0
- package/types/plugins/primevue/theme/components/components.d.ts +2 -0
- package/types/plugins/primevue/theme/components/datepicker/datepicker.d.ts +214 -0
- package/dist/dist-uCh8HaP3.js +0 -1910
- package/dist/wt-datepicker-EX4vuaeW.js +0 -5774
|
@@ -1,43 +1,117 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
<
|
|
14
|
-
ref="datepicker"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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 '
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
import {
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
109
|
-
type: Object,
|
|
110
|
-
},
|
|
169
|
+
const emit = defineEmits<DatePickerEmitsOptions>();
|
|
111
170
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
171
|
+
const model = defineModel<number | null>({
|
|
172
|
+
default: null,
|
|
173
|
+
});
|
|
115
174
|
|
|
116
|
-
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: false,
|
|
119
|
-
},
|
|
175
|
+
const { t } = useI18n();
|
|
120
176
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
140
|
-
|
|
193
|
+
const datepicker = useTemplateRef<HTMLDivElement>('datepicker');
|
|
194
|
+
|
|
195
|
+
const datepickerId = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
|
|
141
196
|
|
|
142
|
-
|
|
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
|
-
|
|
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-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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>
|
package/src/locale/en/en.js
CHANGED
package/src/locale/es/es.js
CHANGED
package/src/locale/kz/kz.js
CHANGED
package/src/locale/pl/pl.js
CHANGED
package/src/locale/ro/ro.js
CHANGED
package/src/locale/ru/ru.js
CHANGED
package/src/locale/uk/uk.js
CHANGED
package/src/locale/uz/uz.js
CHANGED
package/src/locale/vi/vi.js
CHANGED
|
@@ -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));
|
|
@@ -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,
|