@wg-npm/survey-response 0.3.22840 → 0.3.22845
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.
|
@@ -1487,7 +1487,7 @@ var script$2 = Vue.extend({
|
|
|
1487
1487
|
},
|
|
1488
1488
|
},
|
|
1489
1489
|
data() {
|
|
1490
|
-
return { value: this.answer
|
|
1490
|
+
return { value: this.answer };
|
|
1491
1491
|
},
|
|
1492
1492
|
created() {
|
|
1493
1493
|
let subAnswers = {};
|
|
@@ -1507,15 +1507,8 @@ var script$2 = Vue.extend({
|
|
|
1507
1507
|
};
|
|
1508
1508
|
this.value.answer.push(_answer);
|
|
1509
1509
|
});
|
|
1510
|
-
_.each(this.value.answer, (a) => {
|
|
1511
|
-
_.set(this.answers, a.questionId, a.score);
|
|
1512
|
-
});
|
|
1513
|
-
},
|
|
1514
|
-
methods: {
|
|
1515
|
-
getScore(subQuestion) {
|
|
1516
|
-
return _.get(this.answers, subQuestion.id, this.question.options.minRange);
|
|
1517
|
-
},
|
|
1518
1510
|
},
|
|
1511
|
+
methods: {},
|
|
1519
1512
|
computed: {
|
|
1520
1513
|
showQuestionScoreSlider() {
|
|
1521
1514
|
return !(this.question.subQuestions && this.question.subQuestions.length > 0);
|
|
@@ -1541,11 +1534,20 @@ var script$2 = Vue.extend({
|
|
|
1541
1534
|
const __vue_script__$2 = script$2;
|
|
1542
1535
|
|
|
1543
1536
|
/* template */
|
|
1544
|
-
var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Row',{directives:[{name:"show",rawName:"v-show",value:(_vm.showQuestionScoreSlider),expression:"showQuestionScoreSlider"}]},[_c('div',{staticStyle:{"margin-right":"134px","margin-bottom":"18px"}},[_c('FormItem',{staticStyle:{"display":"flex"}
|
|
1537
|
+
var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Row',{directives:[{name:"show",rawName:"v-show",value:(_vm.showQuestionScoreSlider),expression:"showQuestionScoreSlider"}]},[_c('div',{staticStyle:{"margin-right":"134px","margin-bottom":"18px"}},[_c('FormItem',{staticStyle:{"display":"flex"},attrs:{"prop":("answers[" + _vm.index + "].score"),"rules":[
|
|
1538
|
+
{
|
|
1539
|
+
required: _vm.question.options.required && !_vm.question.options.disabled,
|
|
1540
|
+
message: _vm.t('survey_response.question.question_required'),
|
|
1541
|
+
} ]}},[_c('Slider',{staticStyle:{"float":"left","width":"562px","margin-right":"16px"},attrs:{"min":_vm.question.options.minRange,"max":_vm.question.options.maxRange,"step":_vm.sliderStep,"show-tips":"always","disabled":_vm.question.options.readonly || _vm.question.options.disabled},model:{value:(_vm.value.score),callback:function ($$v) {_vm.$set(_vm.value, "score", $$v);},expression:"value.score"}}),_vm._v(" "),_c('InputNumber',{staticStyle:{"float":"left"},attrs:{"precision":_vm.question.options.decimalPlaces,"min":_vm.question.options.minRange,"max":_vm.question.options.maxRange},model:{value:(_vm.value.score),callback:function ($$v) {_vm.$set(_vm.value, "score", $$v);},expression:"value.score"}})],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.extremeValueLabelSelected),expression:"extremeValueLabelSelected"}]},[_c('span',{staticStyle:{"float":"left","margin-left":"36px"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
1545
1542
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".minValue")
|
|
1546
1543
|
))+"\n ")]),_vm._v(" "),_c('span',{staticStyle:{"float":"right","align-items":"flex-end","margin-right":"88px"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
1547
1544
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".maxValue")
|
|
1548
|
-
))+"\n ")])])],1)]),_vm._v(" "),_vm._l((_vm.question.subQuestions),function(subQuestion,subIndex){return _c('div',{key:subIndex,staticClass:"sub-question"},[_c('span',{staticClass:"number"},[_vm._v("\n "+_vm._s(_vm.question.header.number)+"-"+_vm._s(subQuestion.number)+".")]),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v(" "+_vm._s(_vm.i18nText(subQuestion.text))+" ")]),_vm._v(" "),_c('Row',[_c('div',{staticStyle:{"margin-right":"134px","margin-bottom":"18px"}},[_c('FormItem',{staticStyle:{"display":"flex"}
|
|
1545
|
+
))+"\n ")])])],1)]),_vm._v(" "),_vm._l((_vm.question.subQuestions),function(subQuestion,subIndex){return _c('div',{key:subIndex,staticClass:"sub-question"},[_c('span',{staticClass:"number"},[_vm._v("\n "+_vm._s(_vm.question.header.number)+"-"+_vm._s(subQuestion.number)+".")]),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v(" "+_vm._s(_vm.i18nText(subQuestion.text))+" ")]),_vm._v(" "),_c('Row',[_c('div',{staticStyle:{"margin-right":"134px","margin-bottom":"18px"}},[_c('FormItem',{staticStyle:{"display":"flex"},attrs:{"prop":("answers[" + _vm.index + "].answer[" + subIndex + "].score"),"rules":[
|
|
1546
|
+
{
|
|
1547
|
+
required:
|
|
1548
|
+
_vm.question.options.required && !_vm.question.options.disabled,
|
|
1549
|
+
message: _vm.t('survey_response.question.question_required'),
|
|
1550
|
+
} ]}},[_c('Slider',{staticStyle:{"float":"left","width":"562px","margin-right":"16px"},attrs:{"min":_vm.question.options.minRange,"max":_vm.question.options.maxRange,"step":_vm.sliderStep,"show-tips":"always","disabled":subQuestion.options.readonly || _vm.question.options.disabled},model:{value:(_vm.value.answer[subIndex].score),callback:function ($$v) {_vm.$set(_vm.value.answer[subIndex], "score", $$v);},expression:"value.answer[subIndex].score"}}),_vm._v(" "),_c('InputNumber',{staticStyle:{"float":"left"},attrs:{"precision":_vm.question.options.decimalPlaces,"min":_vm.question.options.minRange,"max":_vm.question.options.maxRange},model:{value:(_vm.value.answer[subIndex].score),callback:function ($$v) {_vm.$set(_vm.value.answer[subIndex], "score", $$v);},expression:"value.answer[subIndex].score"}})],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.extremeValueLabelSelected),expression:"extremeValueLabelSelected"}]},[_c('span',{staticStyle:{"float":"left","margin-left":"36px"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
1549
1551
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".minValue")
|
|
1550
1552
|
))+"\n ")]),_vm._v(" "),_c('span',{staticStyle:{"float":"right","align-items":"flex-end","margin-right":"88px"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
1551
1553
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".maxValue")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-response",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22845",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"lint-fix": "eslint \"**/*.ts\" \"**/*.vue\" --fix --no-error-on-unmatched-pattern"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@wg-npm/survey-core": "0.3.
|
|
16
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
15
|
+
"@wg-npm/survey-core": "0.3.22845",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.3.22845",
|
|
17
17
|
"axios": "^0.19.2",
|
|
18
18
|
"deepmerge": "^4.2.2",
|
|
19
19
|
"lodash": "^4.17.15",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@typescript-eslint/parser": "^3.6.0",
|
|
35
35
|
"@vue/eslint-config-prettier": "^6.0.0",
|
|
36
36
|
"@vue/eslint-config-typescript": "^5.0.2",
|
|
37
|
-
"@wg-npm/survey-core": "0.3.
|
|
38
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
37
|
+
"@wg-npm/survey-core": "0.3.22845",
|
|
38
|
+
"@wg-npm/survey-service-api": "0.3.22845",
|
|
39
39
|
"acorn": "^7.3.1",
|
|
40
40
|
"axios": "^0.19.2",
|
|
41
41
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "1c4867b3db8d5c50091fc0e0df4845b4ffb3c66f",
|
|
76
76
|
"rollup": {
|
|
77
77
|
"external": [
|
|
78
78
|
"vue",
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
<!-- question slider -->
|
|
4
4
|
<Row v-show="showQuestionScoreSlider">
|
|
5
5
|
<div style="margin-right: 134px; margin-bottom: 18px">
|
|
6
|
-
<FormItem
|
|
6
|
+
<FormItem
|
|
7
|
+
style="display: flex"
|
|
8
|
+
:prop="`answers[${index}].score`"
|
|
9
|
+
:rules="[
|
|
10
|
+
{
|
|
11
|
+
required: question.options.required && !question.options.disabled,
|
|
12
|
+
message: t('survey_response.question.question_required'),
|
|
13
|
+
},
|
|
14
|
+
]"
|
|
15
|
+
>
|
|
7
16
|
<Slider
|
|
8
17
|
style="float: left; width: 562px; margin-right: 16px"
|
|
9
18
|
v-model="value.score"
|
|
@@ -17,6 +26,8 @@
|
|
|
17
26
|
style="float: left"
|
|
18
27
|
v-model="value.score"
|
|
19
28
|
:precision="question.options.decimalPlaces"
|
|
29
|
+
:min="question.options.minRange"
|
|
30
|
+
:max="question.options.maxRange"
|
|
20
31
|
>
|
|
21
32
|
</InputNumber>
|
|
22
33
|
</FormItem>
|
|
@@ -50,7 +61,17 @@
|
|
|
50
61
|
<!-- sub question slider -->
|
|
51
62
|
<Row>
|
|
52
63
|
<div style="margin-right: 134px; margin-bottom: 18px">
|
|
53
|
-
<FormItem
|
|
64
|
+
<FormItem
|
|
65
|
+
style="display: flex"
|
|
66
|
+
:prop="`answers[${index}].answer[${subIndex}].score`"
|
|
67
|
+
:rules="[
|
|
68
|
+
{
|
|
69
|
+
required:
|
|
70
|
+
question.options.required && !question.options.disabled,
|
|
71
|
+
message: t('survey_response.question.question_required'),
|
|
72
|
+
},
|
|
73
|
+
]"
|
|
74
|
+
>
|
|
54
75
|
<Slider
|
|
55
76
|
style="float: left; width: 562px; margin-right: 16px"
|
|
56
77
|
v-model="value.answer[subIndex].score"
|
|
@@ -66,6 +87,8 @@
|
|
|
66
87
|
style="float: left"
|
|
67
88
|
v-model="value.answer[subIndex].score"
|
|
68
89
|
:precision="question.options.decimalPlaces"
|
|
90
|
+
:min="question.options.minRange"
|
|
91
|
+
:max="question.options.maxRange"
|
|
69
92
|
>
|
|
70
93
|
</InputNumber>
|
|
71
94
|
</FormItem>
|
|
@@ -122,7 +145,7 @@ export default Vue.extend({
|
|
|
122
145
|
},
|
|
123
146
|
},
|
|
124
147
|
data() {
|
|
125
|
-
return { value: this.answer
|
|
148
|
+
return { value: this.answer };
|
|
126
149
|
},
|
|
127
150
|
created() {
|
|
128
151
|
let subAnswers = {};
|
|
@@ -146,20 +169,8 @@ export default Vue.extend({
|
|
|
146
169
|
// @ts-ignore
|
|
147
170
|
this.value.answer.push(_answer);
|
|
148
171
|
});
|
|
149
|
-
|
|
150
|
-
_.each(this.value.answer, (a) => {
|
|
151
|
-
_.set(this.answers, a.questionId, a.score);
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
methods: {
|
|
155
|
-
getScore(subQuestion) {
|
|
156
|
-
return _.get(
|
|
157
|
-
this.answers,
|
|
158
|
-
subQuestion.id,
|
|
159
|
-
this.question.options.minRange
|
|
160
|
-
);
|
|
161
|
-
},
|
|
162
172
|
},
|
|
173
|
+
methods: {},
|
|
163
174
|
computed: {
|
|
164
175
|
showQuestionScoreSlider() {
|
|
165
176
|
return !(
|