@webitel/ui-sdk 26.6.70 → 26.6.72
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-DjB6nJHf.js +36735 -0
- package/dist/{components-BGDAdIES.js → components-Dk5QOwBa.js} +324 -325
- package/dist/{composables-Bo5trL7l.js → composables-CmpLKArq.js} +6 -6
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +773 -566
- package/dist/ui-sdk.umd.cjs +649 -575
- package/dist/{useValidation-CBCP45gh.js → useValidation-DMp_AiNP.js} +1 -1
- package/dist/{useWtTable-DrrvvB6k.js → useWtTable-D_PxqVHO.js} +1 -1
- package/dist/{vue-i18n-lTFLGg_9.js → vue-i18n-Db_oYfO8.js} +14 -8
- package/dist/{wt-action-bar-2y3MlEvJ.js → wt-action-bar-CSdnxT_s.js} +1 -1
- package/dist/{wt-button-uY5Q1GAg.js → wt-button-BVX4GDCP.js} +1 -1
- package/dist/{wt-chat-emoji-CIzpVaAo.js → wt-chat-emoji-LewqM4p6.js} +14 -9
- package/dist/{wt-datepicker-OeVFA-Z3.js → wt-datepicker-DYJGuWH2.js} +88 -54
- package/dist/{wt-display-chip-items-DwXiAC9Q.js → wt-display-chip-items-Cfo-ztuH.js} +1 -1
- package/dist/{wt-expansion-card-Ket3vepN.js → wt-expansion-card-C4ratcs-.js} +1 -1
- package/dist/{wt-galleria-C-0duByw.js → wt-galleria-BiVy4aMN.js} +2 -2
- package/dist/{wt-icon-CU2jtYw1.js → wt-icon-CXZgq3LL.js} +6 -3
- package/dist/{wt-icon-action-DH_n0oGT.js → wt-icon-action-SuNhSnx4.js} +1 -1
- package/dist/{wt-icon-btn-eDHK__L_.js → wt-icon-btn-gkyWWthY.js} +1 -1
- package/dist/{wt-notifications-bar-BXO9pr7l.js → wt-notifications-bar-kewyyshr.js} +1 -1
- package/dist/{wt-player-CZ1X2qkK.js → wt-player-CP_9u3G3.js} +2 -2
- package/dist/{wt-search-bar-CxrtffQv.js → wt-search-bar-DmwAjznv.js} +1 -1
- package/dist/{wt-selection-popup-Bh9D7VtA.js → wt-selection-popup-CjYw4ppb.js} +1 -1
- package/dist/{wt-send-message-popup-Ca0k3qYD.js → wt-send-message-popup-q4ES4jcI.js} +3 -3
- package/dist/{wt-status-select-DEbX08g3.js → wt-status-select-D20EwR17.js} +1 -1
- package/dist/{wt-table-B4zb6RDo.js → wt-table-B7rn2iAF.js} +94 -92
- package/dist/{wt-table-column-select-C3ma6jxK.js → wt-table-column-select-CgEh5BAF.js} +1 -1
- package/dist/{wt-timepicker-BEj18WiL.js → wt-timepicker-BivkZpXq.js} +8 -5
- package/dist/{wt-toast-CS54GhLJ.js → wt-toast-Dufgfee5.js} +22 -22
- package/dist/{wt-tree-table-4C0-68hY.js → wt-tree-table-BFvSXadM.js} +5 -3
- package/dist/{wt-type-extension-value-input-i4J1iGaf.js → wt-type-extension-value-input-BbMEDpAD.js} +3 -3
- package/dist/{wt-vidstack-player-DaImpTZt.js → wt-vidstack-player-CfO0nbvr.js} +464 -464
- package/package.json +1 -1
- package/src/assets/icons/sprite/error.svg +3 -3
- package/src/components/wt-datepicker/_internals/composables/usePreventZeroPad.ts +72 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +3 -0
- package/src/components/wt-toast/wt-toast.vue +4 -1
- package/src/plugins/primevue/theme/components/toast/toast.js +1 -1
- package/types/components/wt-datepicker/_internals/composables/usePreventZeroPad.d.ts +15 -0
- package/types/plugins/primevue/theme/components/toast/toast.d.ts +12 -0
- package/dist/clients-B1AOAvEK.js +0 -36702
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24"
|
|
2
|
-
<path d="M14.2422 8.58594C14.6327 8.19541 15.2657 8.19541 15.6562 8.58594C16.0468 8.97646 16.0468 9.60948 15.6562 10L13.5352 12.1211L15.6562 14.2432C16.0466 14.6337 16.0467 15.2668 15.6562 15.6572C15.2658 16.0475 14.6327 16.0475 14.2422 15.6572L12.1211 13.5352L9.99902 15.6572C9.60847 16.0474 8.97536 16.0476 8.58496 15.6572C8.19456 15.2668 8.19481 14.6337 8.58496 14.2432L10.707 12.1211L8.58496 10C8.19468 9.60952 8.19468 8.97641 8.58496 8.58594C8.97542 8.19548 9.60848 8.1956 9.99902 8.58594L12.1211 10.707L14.2422 8.58594Z"
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z"
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14.2422 8.58594C14.6327 8.19541 15.2657 8.19541 15.6562 8.58594C16.0468 8.97646 16.0468 9.60948 15.6562 10L13.5352 12.1211L15.6562 14.2432C16.0466 14.6337 16.0467 15.2668 15.6562 15.6572C15.2658 16.0475 14.6327 16.0475 14.2422 15.6572L12.1211 13.5352L9.99902 15.6572C9.60847 16.0474 8.97536 16.0476 8.58496 15.6572C8.19456 15.2668 8.19481 14.6337 8.58496 14.2432L10.707 12.1211L8.58496 10C8.19468 9.60952 8.19468 8.97641 8.58496 8.58594C8.97542 8.19548 9.60848 8.1956 9.99902 8.58594L12.1211 10.707L14.2422 8.58594Z" />
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" />
|
|
4
4
|
</svg>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { onMounted, onUnmounted } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author @HlukhovYe
|
|
5
|
+
*
|
|
6
|
+
* https://webitel.atlassian.net/browse/WTEL-9865
|
|
7
|
+
*
|
|
8
|
+
* Prevents PrimeVue's DatePicker from zero-padding a dd/mm segment while the user
|
|
9
|
+
* is mid-typing. Without this, typing "2" into a cleared two-digit slot immediately
|
|
10
|
+
* reformats to "02", forcing the user to delete the leading zero before the second digit.
|
|
11
|
+
*
|
|
12
|
+
* Works by registering two listeners on the same input event:
|
|
13
|
+
* - capture phase (before PrimeVue): snapshots the partial single-digit value
|
|
14
|
+
* - bubble phase (after PrimeVue): if PrimeVue zero-padded the value, restores the
|
|
15
|
+
* snapshot and cancels further propagation so the model is not updated yet
|
|
16
|
+
*/
|
|
17
|
+
export function usePreventZeroPad(getInput: () => HTMLInputElement | null) {
|
|
18
|
+
let pendingPartial: {
|
|
19
|
+
value: string;
|
|
20
|
+
cursor: number;
|
|
21
|
+
} | null = null;
|
|
22
|
+
|
|
23
|
+
function onInputCapture(event: Event) {
|
|
24
|
+
const input = event.target as HTMLInputElement;
|
|
25
|
+
const raw = input.value;
|
|
26
|
+
const cursor = input.selectionStart ?? 0;
|
|
27
|
+
const parts = raw.split('/');
|
|
28
|
+
let offset = 0;
|
|
29
|
+
for (let i = 0; i < Math.min(parts.length, 2); i++) {
|
|
30
|
+
const seg = parts[i];
|
|
31
|
+
const segEnd = offset + seg.length;
|
|
32
|
+
if (cursor <= segEnd && seg.length === 1 && /^\d$/.test(seg)) {
|
|
33
|
+
pendingPartial = {
|
|
34
|
+
value: raw,
|
|
35
|
+
cursor,
|
|
36
|
+
};
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
offset = segEnd + 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function onInputBubble(event: Event) {
|
|
44
|
+
if (!pendingPartial) return;
|
|
45
|
+
const input = event.target as HTMLInputElement;
|
|
46
|
+
const { value, cursor } = pendingPartial;
|
|
47
|
+
pendingPartial = null;
|
|
48
|
+
if (input.value !== value) {
|
|
49
|
+
input.value = value;
|
|
50
|
+
input.setSelectionRange(cursor, cursor);
|
|
51
|
+
event.stopImmediatePropagation();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onMounted(() => {
|
|
56
|
+
const input = getInput();
|
|
57
|
+
if (!input) return;
|
|
58
|
+
input.addEventListener('input', onInputCapture, {
|
|
59
|
+
capture: true,
|
|
60
|
+
});
|
|
61
|
+
input.addEventListener('input', onInputBubble);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
onUnmounted(() => {
|
|
65
|
+
const input = getInput();
|
|
66
|
+
if (!input) return;
|
|
67
|
+
input.removeEventListener('input', onInputCapture, {
|
|
68
|
+
capture: true,
|
|
69
|
+
});
|
|
70
|
+
input.removeEventListener('input', onInputBubble);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -150,6 +150,7 @@ import {
|
|
|
150
150
|
MessageVariant,
|
|
151
151
|
} from '../../enums';
|
|
152
152
|
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
153
|
+
import { usePreventZeroPad } from './_internals/composables/usePreventZeroPad';
|
|
153
154
|
|
|
154
155
|
interface Props extends DatePickerProps {
|
|
155
156
|
showTime?: boolean;
|
|
@@ -199,6 +200,8 @@ const datepicker = useTemplateRef<HTMLDivElement>('datepicker');
|
|
|
199
200
|
|
|
200
201
|
const datepickerId = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
|
|
201
202
|
|
|
203
|
+
usePreventZeroPad(() => datepicker.value?.$el?.querySelector('input'));
|
|
204
|
+
|
|
202
205
|
const getPlaceholder = computed(() => {
|
|
203
206
|
return props.placholder || `dd/mm/yyyy ${props.showTime ? 'hh:mm' : ''}`;
|
|
204
207
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<template v-if="message">
|
|
5
5
|
<wt-icon
|
|
6
6
|
:icon="severityToIconNameMap[message.severity] ?? ''"
|
|
7
|
-
:
|
|
7
|
+
:style="getIconColor(message)"
|
|
8
8
|
class="p-toast-message-icon"
|
|
9
9
|
/>
|
|
10
10
|
<div class="p-toast-message-text">
|
|
@@ -46,6 +46,9 @@ const severityToIconColorMap: Record<string, string> = {
|
|
|
46
46
|
contrast: MessageColor.CONTRAST,
|
|
47
47
|
secondary: MessageColor.SECONDARY,
|
|
48
48
|
};
|
|
49
|
+
|
|
50
|
+
const getIconColor = (message) =>
|
|
51
|
+
`fill: var(--p-toast-${severityToIconColorMap[message.severity]}-icon-color)`;
|
|
49
52
|
</script>
|
|
50
53
|
|
|
51
54
|
<style>
|
|
@@ -4,7 +4,7 @@ import { MessageColor } from '../../../../../enums';
|
|
|
4
4
|
|
|
5
5
|
const generateCloseIconCss = ({ colorName, dt }) => `
|
|
6
6
|
.p-toast-message-${colorName} .p-toast-close-button svg {
|
|
7
|
-
fill: ${dt(`toast.${colorName}.color`)};
|
|
7
|
+
fill: ${dt(`toast.${colorName}.icon-color`)};
|
|
8
8
|
}
|
|
9
9
|
`;
|
|
10
10
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @HlukhovYe
|
|
3
|
+
*
|
|
4
|
+
* https://webitel.atlassian.net/browse/WTEL-9865
|
|
5
|
+
*
|
|
6
|
+
* Prevents PrimeVue's DatePicker from zero-padding a dd/mm segment while the user
|
|
7
|
+
* is mid-typing. Without this, typing "2" into a cleared two-digit slot immediately
|
|
8
|
+
* reformats to "02", forcing the user to delete the leading zero before the second digit.
|
|
9
|
+
*
|
|
10
|
+
* Works by registering two listeners on the same input event:
|
|
11
|
+
* - capture phase (before PrimeVue): snapshots the partial single-digit value
|
|
12
|
+
* - bubble phase (after PrimeVue): if PrimeVue zero-padded the value, restores the
|
|
13
|
+
* snapshot and cancels further propagation so the model is not updated yet
|
|
14
|
+
*/
|
|
15
|
+
export declare function usePreventZeroPad(getInput: () => HTMLInputElement | null): void;
|
|
@@ -9,6 +9,7 @@ declare const toast: {
|
|
|
9
9
|
background: string;
|
|
10
10
|
borderColor: string;
|
|
11
11
|
color: string;
|
|
12
|
+
iconColor: string;
|
|
12
13
|
detailColor: string;
|
|
13
14
|
shadow: string;
|
|
14
15
|
closeButton: {
|
|
@@ -23,6 +24,7 @@ declare const toast: {
|
|
|
23
24
|
background: string;
|
|
24
25
|
borderColor: string;
|
|
25
26
|
color: string;
|
|
27
|
+
iconColor: string;
|
|
26
28
|
detailColor: string;
|
|
27
29
|
shadow: string;
|
|
28
30
|
closeButton: {
|
|
@@ -37,6 +39,7 @@ declare const toast: {
|
|
|
37
39
|
background: string;
|
|
38
40
|
borderColor: string;
|
|
39
41
|
color: string;
|
|
42
|
+
iconColor: string;
|
|
40
43
|
detailColor: string;
|
|
41
44
|
shadow: string;
|
|
42
45
|
closeButton: {
|
|
@@ -51,6 +54,7 @@ declare const toast: {
|
|
|
51
54
|
background: string;
|
|
52
55
|
borderColor: string;
|
|
53
56
|
color: string;
|
|
57
|
+
iconColor: string;
|
|
54
58
|
detailColor: string;
|
|
55
59
|
shadow: string;
|
|
56
60
|
closeButton: {
|
|
@@ -65,6 +69,7 @@ declare const toast: {
|
|
|
65
69
|
background: string;
|
|
66
70
|
borderColor: string;
|
|
67
71
|
color: string;
|
|
72
|
+
iconColor: string;
|
|
68
73
|
detailColor: string;
|
|
69
74
|
shadow: string;
|
|
70
75
|
closeButton: {
|
|
@@ -79,6 +84,7 @@ declare const toast: {
|
|
|
79
84
|
background: string;
|
|
80
85
|
borderColor: string;
|
|
81
86
|
color: string;
|
|
87
|
+
iconColor: string;
|
|
82
88
|
detailColor: string;
|
|
83
89
|
shadow: string;
|
|
84
90
|
closeButton: {
|
|
@@ -98,6 +104,7 @@ declare const toast: {
|
|
|
98
104
|
background: string;
|
|
99
105
|
borderColor: string;
|
|
100
106
|
color: string;
|
|
107
|
+
iconColor: string;
|
|
101
108
|
detailColor: string;
|
|
102
109
|
shadow: string;
|
|
103
110
|
closeButton: {
|
|
@@ -112,6 +119,7 @@ declare const toast: {
|
|
|
112
119
|
background: string;
|
|
113
120
|
borderColor: string;
|
|
114
121
|
color: string;
|
|
122
|
+
iconColor: string;
|
|
115
123
|
detailColor: string;
|
|
116
124
|
shadow: string;
|
|
117
125
|
closeButton: {
|
|
@@ -126,6 +134,7 @@ declare const toast: {
|
|
|
126
134
|
background: string;
|
|
127
135
|
borderColor: string;
|
|
128
136
|
color: string;
|
|
137
|
+
iconColor: string;
|
|
129
138
|
detailColor: string;
|
|
130
139
|
shadow: string;
|
|
131
140
|
closeButton: {
|
|
@@ -140,6 +149,7 @@ declare const toast: {
|
|
|
140
149
|
background: string;
|
|
141
150
|
borderColor: string;
|
|
142
151
|
color: string;
|
|
152
|
+
iconColor: string;
|
|
143
153
|
detailColor: string;
|
|
144
154
|
shadow: string;
|
|
145
155
|
closeButton: {
|
|
@@ -154,6 +164,7 @@ declare const toast: {
|
|
|
154
164
|
background: string;
|
|
155
165
|
borderColor: string;
|
|
156
166
|
color: string;
|
|
167
|
+
iconColor: string;
|
|
157
168
|
detailColor: string;
|
|
158
169
|
shadow: string;
|
|
159
170
|
closeButton: {
|
|
@@ -168,6 +179,7 @@ declare const toast: {
|
|
|
168
179
|
background: string;
|
|
169
180
|
borderColor: string;
|
|
170
181
|
color: string;
|
|
182
|
+
iconColor: string;
|
|
171
183
|
detailColor: string;
|
|
172
184
|
shadow: string;
|
|
173
185
|
closeButton: {
|