@webitel/ui-sdk 25.12.17 → 25.12.19
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/img/sprite/attention--filled.svg +3 -0
- package/dist/img/sprite/dislike.svg +3 -0
- package/dist/img/sprite/done--filled.svg +3 -0
- package/dist/img/sprite/index.js +8 -0
- package/dist/img/sprite/like.svg +3 -0
- package/dist/{install-Cofa5LGE.js → install-Cc5v28sQ.js} +11698 -11484
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +289 -202
- package/dist/{vidstack-Bq6c3Bam-Q5nXtJz2.js → vidstack-Bq6c3Bam-DsrzVnIy.js} +2 -2
- package/dist/{vidstack-D2pY00kU-D40uCWAe.js → vidstack-D2pY00kU-CfifXGPD.js} +2 -2
- package/dist/{vidstack-DDXt6fpN-FvFDbAsa.js → vidstack-DDXt6fpN-DLvflmce.js} +1 -1
- package/dist/{vidstack-D_-9AA6_-C-Htwec0.js → vidstack-D_-9AA6_-GJSNStr6.js} +1 -1
- package/dist/{vidstack-DqAw8m9J-BRlVVRQk.js → vidstack-DqAw8m9J-PZilPgEJ.js} +1 -1
- package/dist/{vidstack-audio-7C38pp1_.js → vidstack-audio-DAQFDjfz.js} +2 -2
- package/dist/{vidstack-dash-CxSwyU7C.js → vidstack-dash-Baa-mmY0.js} +3 -3
- package/dist/{vidstack-google-cast-CZozQtbi.js → vidstack-google-cast-BHt8nVcL.js} +3 -3
- package/dist/{vidstack-hls-CQlW-xbx.js → vidstack-hls-Vlmn3t6k.js} +3 -3
- package/dist/{vidstack-video-B0Lpleo1.js → vidstack-video-UBob8Q-T.js} +2 -2
- package/dist/{vidstack-vimeo-C6sbp9kx.js → vidstack-vimeo-DOSdlknH.js} +3 -3
- package/dist/{vidstack-youtube-eXJkySAi.js → vidstack-youtube-BYufexS8.js} +2 -2
- package/package.json +2 -2
- package/src/assets/icons/sprite/attention--filled.svg +3 -0
- package/src/assets/icons/sprite/dislike.svg +3 -0
- package/src/assets/icons/sprite/done--filled.svg +3 -0
- package/src/assets/icons/sprite/index.js +8 -0
- package/src/assets/icons/sprite/like.svg +3 -0
- package/src/components/wt-table/wt-table.vue +23 -18
- package/src/components/wt-textarea/wt-textarea.vue +109 -198
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +1 -2
- package/src/modules/AuditForm/components/audit-form.vue +2 -2
- package/src/modules/Userinfo/v2/api/UserSettingsAPI.ts +38 -0
- package/src/modules/Userinfo/v2/api/UserinfoAPI.ts +6 -1
- package/src/modules/Userinfo/v2/constants/UserSettingsConstants.ts +1 -0
- package/src/modules/Userinfo/v2/stores/settingsStore.ts +33 -0
- package/src/modules/Userinfo/v2/stores/userinfoStore.ts +8 -0
- package/src/plugins/primevue/primevue.plugin.js +3 -1
- package/src/plugins/primevue/theme/components/components.js +2 -0
- package/src/plugins/primevue/theme/components/textarea/textarea.js +14 -0
- package/types/components/wt-table/wt-table.vue.d.ts +14 -9
- package/types/components/wt-textarea/wt-textarea.vue.d.ts +96 -185
- package/types/modules/Userinfo/v2/api/UserSettingsAPI.d.ts +7 -0
- package/types/modules/Userinfo/v2/api/UserinfoAPI.d.ts +1 -1
- package/types/modules/Userinfo/v2/constants/UserSettingsConstants.d.ts +1 -0
- package/types/modules/Userinfo/v2/stores/settingsStore.d.ts +12 -0
- package/types/modules/Userinfo/v2/stores/userinfoStore.d.ts +3 -0
- package/types/plugins/primevue/theme/components/components.d.ts +2 -0
- package/types/plugins/primevue/theme/components/textarea/textarea.d.ts +74 -0
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
+
class="wt-textarea"
|
|
3
4
|
:class="{
|
|
4
|
-
'wt-textarea--
|
|
5
|
-
'wt-textarea--invalid': invalid,
|
|
6
|
-
'wt-textarea--autoresize': autoresize,
|
|
5
|
+
'wt-textarea--hidden-scrollbar': isScrollHidden,
|
|
7
6
|
}"
|
|
8
|
-
class="wt-textarea"
|
|
9
7
|
>
|
|
10
8
|
<wt-label
|
|
11
9
|
:disabled="disabled"
|
|
@@ -23,32 +21,22 @@
|
|
|
23
21
|
</slot>
|
|
24
22
|
</wt-label>
|
|
25
23
|
<div class="wt-textarea__wrapper">
|
|
26
|
-
<textarea
|
|
24
|
+
<p-textarea
|
|
27
25
|
:id="name"
|
|
28
|
-
ref="
|
|
29
|
-
|
|
26
|
+
ref="textarea-wrapper"
|
|
27
|
+
v-model="model"
|
|
30
28
|
:placeholder="placeholder || label"
|
|
31
|
-
:
|
|
29
|
+
:invalid="invalid"
|
|
30
|
+
:disabled="disabled"
|
|
32
31
|
:rows="rows"
|
|
32
|
+
:auto-resize="autoresize"
|
|
33
33
|
:readonly="readonly"
|
|
34
34
|
class="wt-textarea__textarea"
|
|
35
|
-
|
|
36
|
-
@
|
|
35
|
+
@paste="emit('paste', $event)"
|
|
36
|
+
@keydown="handleKeypress"
|
|
37
|
+
@input="handleInput"
|
|
38
|
+
@blur="emit('blur')"
|
|
37
39
|
/>
|
|
38
|
-
<div
|
|
39
|
-
ref="after-wrapper"
|
|
40
|
-
class="wt-textarea__after-wrapper"
|
|
41
|
-
>
|
|
42
|
-
<slot name="after-input" />
|
|
43
|
-
<wt-icon-btn
|
|
44
|
-
:class="{ hidden: !value }"
|
|
45
|
-
:disabled="disabled"
|
|
46
|
-
class="wt-textarea__reset-icon-btn"
|
|
47
|
-
icon="close--filled"
|
|
48
|
-
size="sm"
|
|
49
|
-
@click="$emit('input', '')"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
40
|
</div>
|
|
53
41
|
<wt-input-info
|
|
54
42
|
v-if="isValidation"
|
|
@@ -59,134 +47,108 @@
|
|
|
59
47
|
</div>
|
|
60
48
|
</template>
|
|
61
49
|
|
|
62
|
-
<script>
|
|
63
|
-
import
|
|
64
|
-
import
|
|
50
|
+
<script setup lang="ts">
|
|
51
|
+
import type { TextareaProps } from 'primevue/textarea';
|
|
52
|
+
import { defineModel, onMounted, ref,useTemplateRef } from 'vue';
|
|
53
|
+
|
|
54
|
+
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
55
|
+
|
|
56
|
+
interface Props extends /* @vue-ignore */ TextareaProps {
|
|
57
|
+
/**
|
|
58
|
+
* textarea label
|
|
59
|
+
*/
|
|
60
|
+
label?: string;
|
|
61
|
+
/**
|
|
62
|
+
* textarea placeholder
|
|
63
|
+
*/
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Native textarea readonly attribute
|
|
67
|
+
*/
|
|
68
|
+
readonly?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Native textarea disabled attribute
|
|
71
|
+
*/
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
required?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* textarea name
|
|
76
|
+
*/
|
|
77
|
+
name?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Number of rows in textarea
|
|
80
|
+
*/
|
|
81
|
+
rows?: number;
|
|
82
|
+
labelProps?: Record<string, any>;
|
|
83
|
+
autoresize?: boolean;
|
|
84
|
+
// validation rules
|
|
85
|
+
v?: any;
|
|
86
|
+
customValidators?: Array<{ name: string; text: string }>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
90
|
+
label: '',
|
|
91
|
+
placeholder: undefined,
|
|
92
|
+
readonly: false,
|
|
93
|
+
disabled: false,
|
|
94
|
+
required: false,
|
|
95
|
+
name: '',
|
|
96
|
+
rows: 1,
|
|
97
|
+
labelProps: undefined,
|
|
98
|
+
autoresize: false,
|
|
99
|
+
v: undefined,
|
|
100
|
+
customValidators: () => [],
|
|
101
|
+
});
|
|
65
102
|
|
|
66
|
-
|
|
67
|
-
name: 'WtTextarea',
|
|
68
|
-
components: {
|
|
69
|
-
WtLabel,
|
|
70
|
-
},
|
|
71
|
-
mixins: [validationMixin],
|
|
72
|
-
props: {
|
|
73
|
-
/**
|
|
74
|
-
* Current textarea value (`v-model`)
|
|
75
|
-
*/
|
|
76
|
-
value: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: '',
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* textarea label
|
|
82
|
-
*/
|
|
83
|
-
label: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: '',
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
* textarea placeholder
|
|
89
|
-
*/
|
|
90
|
-
placeholder: {
|
|
91
|
-
type: String,
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* Native textarea disabled attribute
|
|
95
|
-
*/
|
|
96
|
-
readonly: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: false,
|
|
99
|
-
description: 'Native textarea readonly attribute',
|
|
100
|
-
},
|
|
101
|
-
/**
|
|
102
|
-
* Native textarea disabled attribute
|
|
103
|
-
*/
|
|
104
|
-
disabled: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
default: false,
|
|
107
|
-
description: 'Native textarea disabled attribute',
|
|
108
|
-
},
|
|
109
|
-
required: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: false,
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* textarea name
|
|
115
|
-
*/
|
|
116
|
-
name: {
|
|
117
|
-
type: String,
|
|
118
|
-
default: '',
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* Number of rows in textarea
|
|
122
|
-
*/
|
|
123
|
-
rows: {
|
|
124
|
-
type: Number,
|
|
125
|
-
default: 1,
|
|
126
|
-
description: 'Number of rows for textarea',
|
|
127
|
-
},
|
|
128
|
-
labelProps: {
|
|
129
|
-
type: Object,
|
|
130
|
-
description: 'Object with props, passed down to wt-label as props',
|
|
131
|
-
},
|
|
132
|
-
autoresize: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false,
|
|
135
|
-
description: 'enables auto-grow for text-area',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
emits: ['input', 'enter'],
|
|
139
|
-
computed: {
|
|
140
|
-
listeners() {
|
|
141
|
-
return {
|
|
142
|
-
...this.$listeners,
|
|
143
|
-
input: (event) => this.$emit('input', event.target.value),
|
|
144
|
-
keypress: (event) => this.handleKeypress(event),
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
mounted() {
|
|
149
|
-
this.updateInputPaddings();
|
|
150
|
-
},
|
|
151
|
-
updated() {
|
|
152
|
-
if (this.autoresize && !this.value) this.resetGrow();
|
|
153
|
-
},
|
|
103
|
+
const model = defineModel<string>();
|
|
154
104
|
|
|
155
|
-
|
|
156
|
-
handleKeypress(event) {
|
|
157
|
-
if (!this.autoresize) return;
|
|
105
|
+
const textareaWrapperRef = useTemplateRef('textarea-wrapper');
|
|
158
106
|
|
|
159
|
-
|
|
160
|
-
this.$emit('enter');
|
|
161
|
-
event.preventDefault();
|
|
162
|
-
}
|
|
163
|
-
},
|
|
107
|
+
const emit = defineEmits(['enter', 'paste', 'blur', 'keydown']);
|
|
164
108
|
|
|
165
|
-
|
|
166
|
-
if (!this.autoresize) return;
|
|
167
|
-
const inputEl = this.$refs['wt-textarea'];
|
|
168
|
-
const bordersSize = 2; // + 2px for height because of --rounded-action-border-size
|
|
109
|
+
const isScrollHidden = ref(false);
|
|
169
110
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
111
|
+
const { isValidation, invalid, validationText } = useValidation({
|
|
112
|
+
v: props.v,
|
|
113
|
+
customValidators: props.customValidators,
|
|
114
|
+
} as any);
|
|
173
115
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
116
|
+
const handleKeypress = (event: KeyboardEvent) => {
|
|
117
|
+
emit('keydown', event);
|
|
118
|
+
if (!props.autoresize) return;
|
|
178
119
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
120
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
121
|
+
emit('enter');
|
|
122
|
+
event.preventDefault();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const handleInput = () => {
|
|
127
|
+
checkTextareaHeight();
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @author YeHlukhov
|
|
132
|
+
*
|
|
133
|
+
* Primevue by default shows scrollbar for autoresize textarea with overflow: auto,
|
|
134
|
+
* so this function checks textarea height and adds/removes wt-hidden-scrollbar class
|
|
135
|
+
*/
|
|
136
|
+
const checkTextareaHeight = async () => {
|
|
137
|
+
if (!props.autoresize) return;
|
|
138
|
+
|
|
139
|
+
const textareaEl = textareaWrapperRef.value?.$el;
|
|
140
|
+
|
|
141
|
+
// firstly textarea renders widths are equal, then clientHeight changes for 2px by primevue extra space
|
|
142
|
+
if (textareaEl?.scrollHeight === textareaEl?.clientHeight || textareaEl?.scrollHeight === (textareaEl?.clientHeight + 2)) {
|
|
143
|
+
isScrollHidden.value = true;
|
|
144
|
+
} else {
|
|
145
|
+
isScrollHidden.value = false;
|
|
146
|
+
}
|
|
189
147
|
};
|
|
148
|
+
|
|
149
|
+
onMounted(() => {
|
|
150
|
+
checkTextareaHeight()
|
|
151
|
+
})
|
|
190
152
|
</script>
|
|
191
153
|
|
|
192
154
|
<style lang="scss">
|
|
@@ -196,29 +158,8 @@ export default {
|
|
|
196
158
|
<style lang="scss" scoped>
|
|
197
159
|
@use '../../css/styleguide/styleguide' as *;
|
|
198
160
|
|
|
199
|
-
.wt-textarea {
|
|
200
|
-
cursor: text;
|
|
201
|
-
max-height: 100%;
|
|
202
|
-
|
|
203
|
-
&--disabled {
|
|
204
|
-
pointer-events: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
&--autoresize {
|
|
208
|
-
.wt-textarea__textarea {
|
|
209
|
-
transition: none;
|
|
210
|
-
min-height: auto;
|
|
211
|
-
max-height: 100%;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.wt-textarea__wrapper {
|
|
215
|
-
height: 100%;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
161
|
.wt-textarea__wrapper {
|
|
221
|
-
|
|
162
|
+
height: 100%;
|
|
222
163
|
}
|
|
223
164
|
|
|
224
165
|
.wt-textarea__textarea {
|
|
@@ -226,42 +167,12 @@ export default {
|
|
|
226
167
|
@extend %wt-scrollbar;
|
|
227
168
|
@include wt-placeholder;
|
|
228
169
|
|
|
229
|
-
display: block;
|
|
230
|
-
transition: var(--transition);
|
|
231
170
|
box-sizing: border-box;
|
|
232
|
-
border: var(--input-border);
|
|
233
|
-
border-color: var(--wt-text-field-input-border-color);
|
|
234
|
-
border-radius: var(--border-radius);
|
|
235
|
-
background: transparent;
|
|
236
|
-
padding: var(--textarea-padding);
|
|
237
171
|
width: 100%;
|
|
238
|
-
min-height: var(--textarea-min-height);
|
|
239
172
|
resize: none;
|
|
240
|
-
color: var(--wt-text-field-text-color);
|
|
241
|
-
|
|
242
|
-
.wt-textarea--disabled & {
|
|
243
|
-
@include wt-placeholder('disabled');
|
|
244
|
-
|
|
245
|
-
border-color: var(--wt-text-field-input-border-disabled-color);
|
|
246
|
-
background: var(--wt-text-field-input-background-disabled-color);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.wt-textarea--invalid &,
|
|
250
|
-
.wt-textarea--invalid:hover & {
|
|
251
|
-
outline: none; // prevent outline overlapping false color
|
|
252
|
-
border-color: var(--wt-text-field-input-border-error-color);
|
|
253
|
-
color: var(--wt-text-field-error-text-color);
|
|
254
|
-
@include wt-placeholder('error');
|
|
255
|
-
}
|
|
256
173
|
}
|
|
257
174
|
|
|
258
|
-
.wt-
|
|
259
|
-
display:
|
|
260
|
-
position: absolute;
|
|
261
|
-
top: var(--input-icon-margin);
|
|
262
|
-
right: var(--input-icon-margin);
|
|
263
|
-
align-items: center;
|
|
264
|
-
gap: var(--input-after-wrapper-gap);
|
|
265
|
-
pointer-events: auto; // override --disabled p-events none
|
|
175
|
+
.wt-textarea--hidden-scrollbar textarea::-webkit-scrollbar {
|
|
176
|
+
display: none;
|
|
266
177
|
}
|
|
267
178
|
</style>
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
<div v-if="selected && option.id === selected?.id" class="wt-cc-pause-cause-popup-option__comment">
|
|
40
40
|
<wt-textarea
|
|
41
41
|
:label="$t('reusable.comment')"
|
|
42
|
-
:
|
|
43
|
-
@input="selected.statusComment = $event"
|
|
42
|
+
:v-model="selected.statusComment"
|
|
44
43
|
/>
|
|
45
44
|
</div>
|
|
46
45
|
</li>
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
<wt-textarea
|
|
23
23
|
v-if="mode === AuditFormMode.Fill"
|
|
24
|
-
:value="resultCommentModel"
|
|
24
|
+
:model-value="resultCommentModel"
|
|
25
25
|
class="call-evaluation-form__comment"
|
|
26
26
|
:label="$t('reusable.comment')"
|
|
27
|
-
@
|
|
27
|
+
@update:model-value="handleResultCommentUpdate"
|
|
28
28
|
/>
|
|
29
29
|
|
|
30
30
|
<audit-form-footer
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getDefaultInstance } from '@webitel/api-services/api/defaults';
|
|
2
|
+
import {
|
|
3
|
+
applyTransform,
|
|
4
|
+
notify,
|
|
5
|
+
snakeToCamel,
|
|
6
|
+
} from '@webitel/api-services/api/transformers';
|
|
7
|
+
|
|
8
|
+
const instance = getDefaultInstance();
|
|
9
|
+
|
|
10
|
+
const BASE_URL = '/user/settings';
|
|
11
|
+
|
|
12
|
+
const getUserTimezone = async (): Promise<{timezone: string}> => {
|
|
13
|
+
try {
|
|
14
|
+
const response = await instance.get(`${BASE_URL}/timezone`);
|
|
15
|
+
return applyTransform(response.data, [snakeToCamel()]);
|
|
16
|
+
} catch (err) {
|
|
17
|
+
throw applyTransform(err, [notify]);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const setUserTimezone = async (timezone: string) => {
|
|
22
|
+
const url = `${BASE_URL}/timezone`;
|
|
23
|
+
try {
|
|
24
|
+
const response = await instance.put(url, { timezone });
|
|
25
|
+
return applyTransform(response.data, [
|
|
26
|
+
snakeToCamel(),
|
|
27
|
+
]);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
throw applyTransform(err, [
|
|
30
|
+
notify,
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
getUserTimezone,
|
|
37
|
+
setUserTimezone,
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const TIMEZONE_STORAGE_KEY = 'user-timezone-setting';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineStore } from 'pinia';
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
import UserSettingsAPI from '../api/UserSettingsAPI';
|
|
5
|
+
import { TIMEZONE_STORAGE_KEY } from '../constants/UserSettingsConstants';
|
|
6
|
+
|
|
7
|
+
export const createSettingsStore = ({ namespace = 'userinfo' } = {}) => {
|
|
8
|
+
return defineStore(`${namespace}/settings`, () => {
|
|
9
|
+
const timezone = ref<string | null>(null);
|
|
10
|
+
|
|
11
|
+
const initializeTimezone = async () => {
|
|
12
|
+
const storedTimezone = localStorage.getItem(TIMEZONE_STORAGE_KEY);
|
|
13
|
+
if (storedTimezone) {
|
|
14
|
+
timezone.value = storedTimezone;
|
|
15
|
+
} else {
|
|
16
|
+
const { timezone: userTimezone } =
|
|
17
|
+
await UserSettingsAPI.getUserTimezone();
|
|
18
|
+
timezone.value = userTimezone;
|
|
19
|
+
localStorage.setItem(TIMEZONE_STORAGE_KEY, userTimezone);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const initialize = async () => {
|
|
24
|
+
await initializeTimezone();
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
timezone,
|
|
29
|
+
|
|
30
|
+
initialize,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -4,12 +4,16 @@ import { ref } from 'vue';
|
|
|
4
4
|
|
|
5
5
|
import { getSession, getUiVisibilityAccess, logout } from '../api/UserinfoAPI';
|
|
6
6
|
import { createUserAccessStore } from './accessStore';
|
|
7
|
+
import { createSettingsStore } from './settingsStore';
|
|
7
8
|
|
|
8
9
|
export const createUserinfoStore = () => {
|
|
9
10
|
const namespace = 'userinfo';
|
|
10
11
|
const useAccessStore = createUserAccessStore({
|
|
11
12
|
namespace,
|
|
12
13
|
});
|
|
14
|
+
const useSettingsStore = createSettingsStore({
|
|
15
|
+
namespace,
|
|
16
|
+
});
|
|
13
17
|
|
|
14
18
|
const store = defineStore(namespace, () => {
|
|
15
19
|
const accessStore = useAccessStore();
|
|
@@ -24,6 +28,7 @@ export const createUserinfoStore = () => {
|
|
|
24
28
|
hasSectionVisibility,
|
|
25
29
|
hasApplicationVisibility,
|
|
26
30
|
} = accessStore;
|
|
31
|
+
const { initialize: initializeSettingsStore, timezone } = useSettingsStore();
|
|
27
32
|
|
|
28
33
|
const userId = ref();
|
|
29
34
|
const userInfo = ref(null);
|
|
@@ -48,6 +53,8 @@ export const createUserinfoStore = () => {
|
|
|
48
53
|
permissions: session.permissions,
|
|
49
54
|
access,
|
|
50
55
|
});
|
|
56
|
+
|
|
57
|
+
await initializeSettingsStore();
|
|
51
58
|
};
|
|
52
59
|
|
|
53
60
|
const logoutUser = async () => {
|
|
@@ -62,6 +69,7 @@ export const createUserinfoStore = () => {
|
|
|
62
69
|
return {
|
|
63
70
|
userId,
|
|
64
71
|
userInfo,
|
|
72
|
+
timezone,
|
|
65
73
|
initialize,
|
|
66
74
|
|
|
67
75
|
hasReadAccess,
|
|
@@ -14,7 +14,8 @@ import PInputText from 'primevue/inputtext';
|
|
|
14
14
|
import PMenubar from 'primevue/menubar';
|
|
15
15
|
import PPopover from 'primevue/popover';
|
|
16
16
|
import PRadio from 'primevue/radiobutton';
|
|
17
|
-
import PSlider from 'primevue/slider'
|
|
17
|
+
import PSlider from 'primevue/slider';
|
|
18
|
+
import PTextarea from 'primevue/textarea';
|
|
18
19
|
import PToggleSwitch from 'primevue/toggleswitch';
|
|
19
20
|
import PToolbar from 'primevue/toolbar';
|
|
20
21
|
import Tooltip from 'primevue/tooltip';
|
|
@@ -49,6 +50,7 @@ const initPrimevue = (app) => {
|
|
|
49
50
|
app.component('PColumn', changeComponentCompatMode(PColumn));
|
|
50
51
|
app.component('PRadio', changeComponentCompatMode(PRadio));
|
|
51
52
|
app.component('PChip', changeComponentCompatMode(PChip));
|
|
53
|
+
app.component('PTextarea', changeComponentCompatMode(PTextarea));
|
|
52
54
|
app.component('PToggleSwitch', changeComponentCompatMode(PToggleSwitch));
|
|
53
55
|
app.component('PBreadcrumb', changeComponentCompatMode(PBreadcrumb));
|
|
54
56
|
app.component('PSlider', changeComponentCompatMode(PSlider));
|
|
@@ -13,6 +13,7 @@ import radio from './radio/radio.js';
|
|
|
13
13
|
import slider from './slider/slider.js';
|
|
14
14
|
import switcher from './switcher/switcher.js';
|
|
15
15
|
import table from './table/table.js';
|
|
16
|
+
import textarea from './textarea/textarea.js';
|
|
16
17
|
import toolbar from './toolbar/toolbar.js';
|
|
17
18
|
import tooltip from './tooltip/tooltip.js';
|
|
18
19
|
|
|
@@ -23,6 +24,7 @@ const components = {
|
|
|
23
24
|
button,
|
|
24
25
|
chip,
|
|
25
26
|
checkbox,
|
|
27
|
+
textarea,
|
|
26
28
|
toggleswitch: switcher,
|
|
27
29
|
divider,
|
|
28
30
|
image,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TextareaScheme } from '@webitel/styleguide/component-schemes';
|
|
2
|
+
|
|
3
|
+
const textarea = {
|
|
4
|
+
...TextareaScheme.sizes,
|
|
5
|
+
colorScheme: TextareaScheme.colorScheme,
|
|
6
|
+
|
|
7
|
+
css: ({ dt }) => `
|
|
8
|
+
.wt-textarea__textarea {
|
|
9
|
+
min-height: ${dt('textarea.minHeight')};
|
|
10
|
+
}
|
|
11
|
+
`,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default textarea;
|
|
@@ -85,27 +85,32 @@ declare const virtualScroll: import("vue").ComputedRef<{
|
|
|
85
85
|
numToleratedItems: number;
|
|
86
86
|
}>;
|
|
87
87
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
88
|
-
declare var
|
|
88
|
+
declare var __VLS_60: `header-${string}`, __VLS_61: {
|
|
89
|
+
index: number;
|
|
90
|
+
header: WtTableHeader;
|
|
91
|
+
}, __VLS_72: string, __VLS_73: {
|
|
89
92
|
index: any;
|
|
90
93
|
item: any;
|
|
91
|
-
},
|
|
94
|
+
}, __VLS_76: `${string}-footer`, __VLS_77: {}, __VLS_83: {}, __VLS_85: {
|
|
92
95
|
index: any;
|
|
93
96
|
item: any;
|
|
94
|
-
},
|
|
97
|
+
}, __VLS_87: {
|
|
95
98
|
item: any;
|
|
96
|
-
},
|
|
99
|
+
}, __VLS_89: {};
|
|
97
100
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
98
|
-
[K in NonNullable<typeof
|
|
101
|
+
[K in NonNullable<typeof __VLS_60>]?: (props: typeof __VLS_61) => any;
|
|
99
102
|
} & {
|
|
100
103
|
[K in NonNullable<typeof __VLS_72>]?: (props: typeof __VLS_73) => any;
|
|
101
104
|
} & {
|
|
102
|
-
|
|
105
|
+
[K in NonNullable<typeof __VLS_76>]?: (props: typeof __VLS_77) => any;
|
|
103
106
|
} & {
|
|
104
|
-
actions?: (props: typeof
|
|
107
|
+
'actions-header'?: (props: typeof __VLS_83) => any;
|
|
105
108
|
} & {
|
|
106
|
-
|
|
109
|
+
actions?: (props: typeof __VLS_85) => any;
|
|
107
110
|
} & {
|
|
108
|
-
|
|
111
|
+
expansion?: (props: typeof __VLS_87) => any;
|
|
112
|
+
} & {
|
|
113
|
+
footer?: (props: typeof __VLS_89) => any;
|
|
109
114
|
}>;
|
|
110
115
|
declare const __VLS_self: import("vue").DefineComponent<Props, {
|
|
111
116
|
emit: typeof emit;
|