@webitel/ui-sdk 25.6.8 → 25.6.9
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/CHANGELOG.md +6 -0
- package/dist/types/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue.d.ts +33 -10
- package/package.json +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +3 -4
- package/src/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue +17 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [v25.6.8] - 2025-05-12
|
|
2
|
+
### :bug: Bug Fixes
|
|
3
|
+
- [`7872386`](https://github.com/webitel/webitel-ui-sdk/commit/78723867f12069376e0c6232c7b59e727359ef23) - small audit fixes [WTEL-6873](https://webitel.atlassian.net/browse/WTEL-6873)[WTEL-6875](https://webitel.atlassian.net/browse/WTEL-6875)[WTEL-6876](https://webitel.atlassian.net/browse/WTEL-6876)[WTEL-6879](https://webitel.atlassian.net/browse/WTEL-6879)[WTEL-6880](https://webitel.atlassian.net/browse/WTEL-6880) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
4
|
+
|
|
5
|
+
|
|
1
6
|
## [v25.6.7] - 2025-05-08
|
|
2
7
|
### :sparkles: New Features
|
|
3
8
|
- [`cf7f6a7`](https://github.com/webitel/webitel-ui-sdk/commit/cf7f6a7b15d03779422f0b07ca4a5cc3a6f1acbd) - enhance audit-form components with improved styling and layout [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
@@ -2106,3 +2111,4 @@
|
|
|
2106
2111
|
[v25.6.5]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.4...v25.6.5
|
|
2107
2112
|
[v25.6.6]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.5...v25.6.6
|
|
2108
2113
|
[v25.6.7]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.6...v25.6.7
|
|
2114
|
+
[v25.6.8]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.7...v25.6.8
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { EngineQuestionAnswer } from 'webitel-sdk';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
question: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
mode: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
answer: {
|
|
12
|
+
type: import("vue").PropType<EngineQuestionAnswer>;
|
|
13
|
+
};
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"change:question": (...args: any[]) => void;
|
|
16
|
+
"update:answer": (value: EngineQuestionAnswer) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
question: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
mode: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
answer: {
|
|
27
|
+
type: import("vue").PropType<EngineQuestionAnswer>;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
"onUpdate:answer"?: (value: EngineQuestionAnswer) => any;
|
|
31
|
+
"onChange:question"?: (...args: any[]) => any;
|
|
32
|
+
}>, {
|
|
3
33
|
mode: string;
|
|
4
|
-
|
|
5
|
-
result?: Record<string, any>;
|
|
6
|
-
$props: {
|
|
7
|
-
readonly mode?: string;
|
|
8
|
-
readonly question?: Record<string, any>;
|
|
9
|
-
readonly result?: Record<string, any>;
|
|
10
|
-
};
|
|
11
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
35
|
export default _default;
|
package/package.json
CHANGED
|
@@ -28,9 +28,7 @@
|
|
|
28
28
|
:is="QuestionTypeComponent"
|
|
29
29
|
v-model:answer="answerModel"
|
|
30
30
|
:question="question"
|
|
31
|
-
:result="answerModel /* compat, should use 'answer' */"
|
|
32
31
|
mode="read"
|
|
33
|
-
@change:result="updateAnswer /* compat, should use 'answer' */"
|
|
34
32
|
/>
|
|
35
33
|
<div
|
|
36
34
|
v-show="isAnswer"
|
|
@@ -41,8 +39,9 @@
|
|
|
41
39
|
</div>
|
|
42
40
|
<wt-input
|
|
43
41
|
v-if="answerModel?.createdAt"
|
|
44
|
-
|
|
42
|
+
:model-value="answerModel.comment"
|
|
45
43
|
:label="t('reusable.comment')"
|
|
44
|
+
@update:model-value="updateAnswer({ comment: $event })"
|
|
46
45
|
/>
|
|
47
46
|
</section>
|
|
48
47
|
|
|
@@ -96,7 +95,7 @@ const updateAnswer = (value: EngineQuestionAnswer) => {
|
|
|
96
95
|
if (readonly.value) return; // if ... then in preview mode
|
|
97
96
|
|
|
98
97
|
// coz only some properties of answer may be patched
|
|
99
|
-
const newAnswer =
|
|
98
|
+
const newAnswer = { ...answerModel.value, value };
|
|
100
99
|
answerModel.value = newAnswer;
|
|
101
100
|
};
|
|
102
101
|
|
|
@@ -30,35 +30,34 @@
|
|
|
30
30
|
class="audit-form-question-score-read"
|
|
31
31
|
>
|
|
32
32
|
<wt-radio
|
|
33
|
-
v-for="
|
|
34
|
-
:key="
|
|
35
|
-
:label="`${
|
|
36
|
-
:selected="
|
|
37
|
-
:value="
|
|
38
|
-
@input="
|
|
33
|
+
v-for="score of scoreRange"
|
|
34
|
+
:key="score"
|
|
35
|
+
:label="`${score}`"
|
|
36
|
+
:selected="answerModel?.score"
|
|
37
|
+
:value="score"
|
|
38
|
+
@input="updateAnswer"
|
|
39
39
|
/>
|
|
40
40
|
</div>
|
|
41
41
|
</article>
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
|
-
<script setup>
|
|
44
|
+
<script lang="ts" setup>
|
|
45
45
|
import { useVuelidate } from '@vuelidate/core';
|
|
46
46
|
import { integer, maxValue, minValue, required } from '@vuelidate/validators';
|
|
47
47
|
import { computed, onMounted, toRefs } from 'vue';
|
|
48
|
+
import { EngineQuestionAnswer } from 'webitel-sdk';
|
|
48
49
|
|
|
49
50
|
import WtInput from '../../../../../components/wt-input/wt-input.vue';
|
|
50
51
|
import WtRadio from '../../../../../components/wt-radio/wt-radio.vue';
|
|
51
|
-
import isEmpty from '../../../../../scripts/isEmpty.js';
|
|
52
52
|
import updateObject from '../../../../../scripts/updateObject.js';
|
|
53
53
|
|
|
54
|
+
const answerModel = defineModel<EngineQuestionAnswer | null>('answer');
|
|
55
|
+
|
|
54
56
|
const props = defineProps({
|
|
55
57
|
question: {
|
|
56
58
|
type: Object,
|
|
57
59
|
required: true,
|
|
58
60
|
},
|
|
59
|
-
result: {
|
|
60
|
-
type: Object,
|
|
61
|
-
},
|
|
62
61
|
mode: {
|
|
63
62
|
// options: ['read', 'write']
|
|
64
63
|
type: String,
|
|
@@ -66,7 +65,7 @@ const props = defineProps({
|
|
|
66
65
|
},
|
|
67
66
|
});
|
|
68
67
|
|
|
69
|
-
const emit = defineEmits(['change:question'
|
|
68
|
+
const emit = defineEmits(['change:question']);
|
|
70
69
|
|
|
71
70
|
// is needed for useVuelidate, because props.question/props.result isn't reactive
|
|
72
71
|
const { question } = toRefs(props);
|
|
@@ -103,7 +102,12 @@ const scoreRange = computed(() => {
|
|
|
103
102
|
return result;
|
|
104
103
|
});
|
|
105
104
|
|
|
106
|
-
|
|
105
|
+
function updateAnswer(score) {
|
|
106
|
+
answerModel.value = answerModel.value ? {
|
|
107
|
+
...answerModel.value,
|
|
108
|
+
score,
|
|
109
|
+
} : { score };
|
|
110
|
+
}
|
|
107
111
|
|
|
108
112
|
function updateQuestion({ path, value }) {
|
|
109
113
|
emit('change:question', updateObject({ obj: props.question, path, value }));
|