@webitel/ui-sdk 24.4.34 → 24.4.37
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/ui-sdk.css +1 -1
- package/dist/ui-sdk.mjs +824 -821
- package/dist/ui-sdk.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +1 -1
- package/src/components/wt-player/wt-player.vue +9 -7
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +1 -1
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +15 -3
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +6 -3
package/package.json
CHANGED
|
@@ -109,8 +109,8 @@ export default {
|
|
|
109
109
|
if (this.player) this.player.destroy();
|
|
110
110
|
const controls = [
|
|
111
111
|
'play-large', 'play', 'progress', 'current-time',
|
|
112
|
-
'mute', 'volume', 'captions', 'settings',
|
|
113
|
-
'airplay', 'fullscreen'
|
|
112
|
+
'duration', 'mute', 'volume', 'captions', 'settings',
|
|
113
|
+
'pip', 'airplay', 'fullscreen'
|
|
114
114
|
];
|
|
115
115
|
if (this.download) controls.push('download');
|
|
116
116
|
this.player = new Plyr(this.$refs.player, {
|
|
@@ -186,13 +186,15 @@ export default {
|
|
|
186
186
|
box-shadow: var(--elevation-10);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
.plyr__controls .plyr__control
|
|
189
|
+
.plyr__controls > .plyr__control,
|
|
190
|
+
.plyr__controls > .plyr__controls__item > .plyr__control {
|
|
190
191
|
padding: var(--plyr-controls-icon-padding);
|
|
192
|
+
}
|
|
191
193
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
.plyr__controls > .plyr__control > svg,
|
|
195
|
+
.plyr__controls > .plyr__controls__item > .plyr__control > svg {
|
|
196
|
+
height: var(--plyr-controls-icon-size);
|
|
197
|
+
width: var(--plyr-controls-icon-size);
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
.plyr__control--overlaid svg {
|
package/src/locale/en/en.js
CHANGED
package/src/locale/ru/ru.js
CHANGED
package/src/locale/ua/ua.js
CHANGED
|
@@ -16,7 +16,7 @@ describe('AuditFormQuestionOptionsWriteRow', () => {
|
|
|
16
16
|
option: {},
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
|
-
const deleteBtn = wrapper.findComponent(
|
|
19
|
+
const deleteBtn = wrapper.findComponent('.audit-form-question-options-write-row__tooltip .wt-icon-btn');
|
|
20
20
|
expect(deleteBtn.attributes().icon).toBe('bucket');
|
|
21
21
|
deleteBtn.vm.$emit('click');
|
|
22
22
|
expect(wrapper.emitted().delete).toBeTruthy();
|
package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
/>
|
|
10
10
|
<wt-input
|
|
11
11
|
:label="$t('webitelUI.auditForm.score', 1)"
|
|
12
|
+
:label-props="{ hint: $t('scorecards.scoreInputTooltip', { min: minScore, max: maxScore}), hintPosition: 'right' }"
|
|
12
13
|
:value="option.score"
|
|
13
14
|
:v="v$.option.score"
|
|
15
|
+
:number-min="minScore"
|
|
16
|
+
:number-max="maxScore"
|
|
14
17
|
type="number"
|
|
15
|
-
@input="
|
|
18
|
+
@input="changeScore"
|
|
16
19
|
/>
|
|
17
20
|
<wt-tooltip class="audit-form-question-options-write-row__tooltip">
|
|
18
21
|
<template #activator>
|
|
@@ -55,6 +58,9 @@ const emit = defineEmits([
|
|
|
55
58
|
// is needed for useVuelidate, because props.question/props.result isn't reactive
|
|
56
59
|
const { option } = toRefs(props);
|
|
57
60
|
|
|
61
|
+
const minScore = 0;
|
|
62
|
+
const maxScore = 10;
|
|
63
|
+
|
|
58
64
|
const v$ = useVuelidate(
|
|
59
65
|
computed(() => (
|
|
60
66
|
{
|
|
@@ -62,8 +68,8 @@ const v$ = useVuelidate(
|
|
|
62
68
|
name: { required },
|
|
63
69
|
score: {
|
|
64
70
|
required,
|
|
65
|
-
minValue: minValue(
|
|
66
|
-
maxValue: maxValue(
|
|
71
|
+
minValue: minValue(minScore),
|
|
72
|
+
maxValue: maxValue(maxScore),
|
|
67
73
|
decimalValidator: decimalValidator(2),
|
|
68
74
|
},
|
|
69
75
|
},
|
|
@@ -72,6 +78,12 @@ const v$ = useVuelidate(
|
|
|
72
78
|
{ $autoDirty: true },
|
|
73
79
|
);
|
|
74
80
|
|
|
81
|
+
|
|
82
|
+
function changeScore(value) {
|
|
83
|
+
const score = value > maxScore ? maxScore : Number(Math.abs(value)); // to prevent -1, 000 or string value because of this task https://webitel.atlassian.net/browse/WTEL-4505
|
|
84
|
+
emit('update:option', { name: props.option.name, score });
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
// init validation
|
|
76
88
|
onMounted(() => v$.value.$touch());
|
|
77
89
|
</script>
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
:value="question.min"
|
|
9
9
|
:v="v$.question.min"
|
|
10
10
|
:number-min="0"
|
|
11
|
-
:number-max="
|
|
11
|
+
:number-max="9"
|
|
12
12
|
:label="$t('reusable.from')"
|
|
13
|
+
:label-props="{ hint: $t('scorecards.scoreInputTooltip', { min: '0', max: '9'}), hintPosition: 'right' }"
|
|
13
14
|
type="number"
|
|
14
15
|
required
|
|
15
16
|
@input="updateQuestion({ path: 'min', value: $event })"
|
|
@@ -18,8 +19,9 @@
|
|
|
18
19
|
:value="question.max"
|
|
19
20
|
:v="v$.question.max"
|
|
20
21
|
:number-min="1"
|
|
21
|
-
:number-max="
|
|
22
|
+
:number-max="10"
|
|
22
23
|
:label="$t('reusable.to')"
|
|
24
|
+
:label-props="{ hint: $t('scorecards.scoreInputTooltip', { min: '1', max: '10'}), hintPosition: 'right' }"
|
|
23
25
|
type="number"
|
|
24
26
|
required
|
|
25
27
|
@input="updateQuestion({ path: 'max', value: $event })"
|
|
@@ -109,7 +111,8 @@ const scoreRange = computed(() => {
|
|
|
109
111
|
const isResult = computed(() => !isEmpty(props.result));
|
|
110
112
|
|
|
111
113
|
function updateQuestion({ path, value }) {
|
|
112
|
-
|
|
114
|
+
const number = value > 10 ? 10 : Number(Math.abs(value)); // to prevent -1, 000 or string value because of this task https://webitel.atlassian.net/browse/WTEL-4505
|
|
115
|
+
emit('change:question', updateObject({ obj: props.question, path, value: number }));
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
// init validation
|