@wg-npm/survey-response 0.5.142 → 0.5.143
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.
|
@@ -1525,6 +1525,7 @@ var script$3 = Vue.extend({
|
|
|
1525
1525
|
Slider,
|
|
1526
1526
|
FormItem,
|
|
1527
1527
|
InputNumber,
|
|
1528
|
+
Col,
|
|
1528
1529
|
},
|
|
1529
1530
|
props: {
|
|
1530
1531
|
question: {
|
|
@@ -1605,36 +1606,39 @@ var script$3 = Vue.extend({
|
|
|
1605
1606
|
const __vue_script__$3 = script$3;
|
|
1606
1607
|
|
|
1607
1608
|
/* template */
|
|
1608
|
-
var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.showQuestionScoreSlider)?_c('Row',[_c('
|
|
1609
|
-
{
|
|
1610
|
-
required: _vm.question.options.required && !_vm.question.options.disabled,
|
|
1611
|
-
message: _vm.t('survey_response.question.question_required'),
|
|
1612
|
-
} ]}},[_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(
|
|
1613
|
-
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".minValue")
|
|
1614
|
-
))+"\n ")]),_vm._v(" "),_c('span',{staticStyle:{"float":"right","align-items":"flex-end","margin-right":"88px"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
1615
|
-
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".maxValue")
|
|
1616
|
-
))+"\n ")])])],1)]):_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('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('FormItem',{staticStyle:{"display":"flex"},attrs:{"prop":_vm.subAnswerProp(subIndex),"rules":[
|
|
1609
|
+
var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.showQuestionScoreSlider)?_c('Row',[_c('Col',{attrs:{"xs":24,"sm":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"xl":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"md":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"lg":_vm.$rootComponent.layout === 'vertical' ? 24 : 12}},[_c('div',{staticClass:"slider-container"},[_c('Slider',{staticClass:"slider",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('FormItem',{staticStyle:{"display":"flex"},attrs:{"prop":_vm.answerProp,"rules":[
|
|
1617
1610
|
{
|
|
1618
1611
|
required:
|
|
1619
1612
|
_vm.question.options.required && !_vm.question.options.disabled,
|
|
1620
1613
|
message: _vm.t('survey_response.question.question_required'),
|
|
1621
|
-
} ]}},[_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.
|
|
1614
|
+
} ]}},[_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)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.extremeValueLabelSelected),expression:"extremeValueLabelSelected"}],staticClass:"text-desc"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t(
|
|
1615
|
+
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".minValue")
|
|
1616
|
+
))+"\n ")]),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t(
|
|
1617
|
+
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".maxValue")
|
|
1618
|
+
))+"\n ")])])])],1):_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('Col',{attrs:{"xs":24,"sm":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"xl":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"md":_vm.$rootComponent.layout === 'vertical' ? 24 : 12,"lg":_vm.$rootComponent.layout === 'vertical' ? 24 : 12}},[_c('div',{staticClass:"slider-container"},[_c('Slider',{staticClass:"slider",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('FormItem',{staticStyle:{"display":"flex"},attrs:{"prop":_vm.subAnswerProp(subIndex),"rules":[
|
|
1619
|
+
{
|
|
1620
|
+
required:
|
|
1621
|
+
_vm.question.options.required && !_vm.question.options.disabled,
|
|
1622
|
+
message: _vm.t('survey_response.question.question_required'),
|
|
1623
|
+
} ]}},[_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)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.extremeValueLabelSelected),expression:"extremeValueLabelSelected"}],staticClass:"text-desc"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t(
|
|
1622
1624
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".minValue")
|
|
1623
|
-
))+"\n ")]),_vm._v(" "),_c('span',
|
|
1625
|
+
))+"\n ")]),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t(
|
|
1624
1626
|
("survey_creator.question.scoring.extreme_value_labels." + (_vm.question.options.extremeValueLabel) + ".maxValue")
|
|
1625
|
-
))+"\n ")])])],1)]
|
|
1627
|
+
))+"\n ")])])])],1)],1)})],2)};
|
|
1626
1628
|
var __vue_staticRenderFns__$3 = [];
|
|
1627
1629
|
|
|
1628
1630
|
/* style */
|
|
1629
|
-
const __vue_inject_styles__$3 =
|
|
1631
|
+
const __vue_inject_styles__$3 = function (inject) {
|
|
1632
|
+
if (!inject) return
|
|
1633
|
+
inject("data-v-7bd4b64c_0", { source: ".slider-container[data-v-7bd4b64c]{margin-top:16px;margin-bottom:16px;width:100%;display:flex}.slider-container[data-v-7bd4b64c] .ivu-form-item{margin-bottom:unset}.slider[data-v-7bd4b64c]{width:100%;margin-left:30px;margin-right:16px}.text-desc[data-v-7bd4b64c]{display:flex;justify-content:space-between;width:100%;padding-left:36px;padding-right:100px}", map: undefined, media: undefined });
|
|
1634
|
+
|
|
1635
|
+
};
|
|
1630
1636
|
/* scoped */
|
|
1631
|
-
const __vue_scope_id__$3 =
|
|
1637
|
+
const __vue_scope_id__$3 = "data-v-7bd4b64c";
|
|
1632
1638
|
/* module identifier */
|
|
1633
1639
|
const __vue_module_identifier__$3 = undefined;
|
|
1634
1640
|
/* functional template */
|
|
1635
1641
|
const __vue_is_functional_template__$3 = false;
|
|
1636
|
-
/* style inject */
|
|
1637
|
-
|
|
1638
1642
|
/* style inject SSR */
|
|
1639
1643
|
|
|
1640
1644
|
/* style inject shadow dom */
|
|
@@ -1649,7 +1653,7 @@ var __vue_staticRenderFns__$3 = [];
|
|
|
1649
1653
|
__vue_is_functional_template__$3,
|
|
1650
1654
|
__vue_module_identifier__$3,
|
|
1651
1655
|
false,
|
|
1652
|
-
|
|
1656
|
+
createInjector,
|
|
1653
1657
|
undefined,
|
|
1654
1658
|
undefined
|
|
1655
1659
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-response",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.143",
|
|
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.5.
|
|
16
|
-
"@wg-npm/survey-service-api": "0.5.
|
|
15
|
+
"@wg-npm/survey-core": "0.5.143",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.5.143",
|
|
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.5.
|
|
38
|
-
"@wg-npm/survey-service-api": "0.5.
|
|
37
|
+
"@wg-npm/survey-core": "0.5.143",
|
|
38
|
+
"@wg-npm/survey-service-api": "0.5.143",
|
|
39
39
|
"acorn": "^7.3.1",
|
|
40
40
|
"axios": "^0.19.2",
|
|
41
41
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -2,44 +2,53 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<!-- question slider -->
|
|
4
4
|
<Row v-if="showQuestionScoreSlider">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<FormItem
|
|
16
|
-
style="display: flex"
|
|
17
|
-
:prop="answerProp"
|
|
18
|
-
:rules="[
|
|
19
|
-
{
|
|
20
|
-
required: question.options.required && !question.options.disabled,
|
|
21
|
-
message: t('survey_response.question.question_required'),
|
|
22
|
-
},
|
|
23
|
-
]"
|
|
24
|
-
>
|
|
25
|
-
<InputNumber
|
|
26
|
-
style="float: left"
|
|
5
|
+
<Col
|
|
6
|
+
:xs="24"
|
|
7
|
+
:sm="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
8
|
+
:xl="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
9
|
+
:md="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
10
|
+
:lg="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
11
|
+
>
|
|
12
|
+
<div class="slider-container">
|
|
13
|
+
<Slider
|
|
14
|
+
class="slider"
|
|
27
15
|
v-model="value.score"
|
|
28
|
-
:precision="question.options.decimalPlaces"
|
|
29
16
|
:min="question.options.minRange"
|
|
30
17
|
:max="question.options.maxRange"
|
|
18
|
+
:step="sliderStep"
|
|
19
|
+
show-tips="always"
|
|
20
|
+
:disabled="question.options.readonly || question.options.disabled"
|
|
21
|
+
></Slider>
|
|
22
|
+
<FormItem
|
|
23
|
+
style="display: flex"
|
|
24
|
+
:prop="answerProp"
|
|
25
|
+
:rules="[
|
|
26
|
+
{
|
|
27
|
+
required:
|
|
28
|
+
question.options.required && !question.options.disabled,
|
|
29
|
+
message: t('survey_response.question.question_required'),
|
|
30
|
+
},
|
|
31
|
+
]"
|
|
31
32
|
>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<InputNumber
|
|
34
|
+
style="float: left"
|
|
35
|
+
v-model="value.score"
|
|
36
|
+
:precision="question.options.decimalPlaces"
|
|
37
|
+
:min="question.options.minRange"
|
|
38
|
+
:max="question.options.maxRange"
|
|
39
|
+
>
|
|
40
|
+
</InputNumber>
|
|
41
|
+
</FormItem>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="text-desc" v-show="extremeValueLabelSelected">
|
|
44
|
+
<span>
|
|
36
45
|
{{
|
|
37
46
|
t(
|
|
38
47
|
`survey_creator.question.scoring.extreme_value_labels.${question.options.extremeValueLabel}.minValue`
|
|
39
48
|
)
|
|
40
49
|
}}
|
|
41
50
|
</span>
|
|
42
|
-
<span
|
|
51
|
+
<span>
|
|
43
52
|
{{
|
|
44
53
|
t(
|
|
45
54
|
`survey_creator.question.scoring.extreme_value_labels.${question.options.extremeValueLabel}.maxValue`
|
|
@@ -47,7 +56,7 @@
|
|
|
47
56
|
}}
|
|
48
57
|
</span>
|
|
49
58
|
</div>
|
|
50
|
-
</
|
|
59
|
+
</Col>
|
|
51
60
|
</Row>
|
|
52
61
|
<div
|
|
53
62
|
v-else
|
|
@@ -61,49 +70,55 @@
|
|
|
61
70
|
<span class="title"> {{ i18nText(subQuestion.text) }} </span>
|
|
62
71
|
<!-- sub question slider -->
|
|
63
72
|
<Row>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
></Slider>
|
|
76
|
-
<FormItem
|
|
77
|
-
style="display: flex"
|
|
78
|
-
:prop="subAnswerProp(subIndex)"
|
|
79
|
-
:rules="[
|
|
80
|
-
{
|
|
81
|
-
required:
|
|
82
|
-
question.options.required && !question.options.disabled,
|
|
83
|
-
message: t('survey_response.question.question_required'),
|
|
84
|
-
},
|
|
85
|
-
]"
|
|
86
|
-
>
|
|
87
|
-
<InputNumber
|
|
88
|
-
style="float: left"
|
|
73
|
+
<Col
|
|
74
|
+
:xs="24"
|
|
75
|
+
:sm="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
76
|
+
:xl="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
77
|
+
:md="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
78
|
+
:lg="$rootComponent.layout === 'vertical' ? 24 : 12"
|
|
79
|
+
>
|
|
80
|
+
<div class="slider-container">
|
|
81
|
+
<Slider
|
|
82
|
+
class="slider"
|
|
89
83
|
v-model="value.answer[subIndex].score"
|
|
90
|
-
:precision="question.options.decimalPlaces"
|
|
91
84
|
:min="question.options.minRange"
|
|
92
85
|
:max="question.options.maxRange"
|
|
86
|
+
:step="sliderStep"
|
|
87
|
+
show-tips="always"
|
|
88
|
+
:disabled="
|
|
89
|
+
subQuestion.options.readonly || question.options.disabled
|
|
90
|
+
"
|
|
91
|
+
></Slider>
|
|
92
|
+
<FormItem
|
|
93
|
+
style="display: flex"
|
|
94
|
+
:prop="subAnswerProp(subIndex)"
|
|
95
|
+
:rules="[
|
|
96
|
+
{
|
|
97
|
+
required:
|
|
98
|
+
question.options.required && !question.options.disabled,
|
|
99
|
+
message: t('survey_response.question.question_required'),
|
|
100
|
+
},
|
|
101
|
+
]"
|
|
93
102
|
>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
<InputNumber
|
|
104
|
+
style="float: left"
|
|
105
|
+
v-model="value.answer[subIndex].score"
|
|
106
|
+
:precision="question.options.decimalPlaces"
|
|
107
|
+
:min="question.options.minRange"
|
|
108
|
+
:max="question.options.maxRange"
|
|
109
|
+
>
|
|
110
|
+
</InputNumber>
|
|
111
|
+
</FormItem>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="text-desc" v-show="extremeValueLabelSelected">
|
|
114
|
+
<span>
|
|
98
115
|
{{
|
|
99
116
|
t(
|
|
100
117
|
`survey_creator.question.scoring.extreme_value_labels.${question.options.extremeValueLabel}.minValue`
|
|
101
118
|
)
|
|
102
119
|
}}
|
|
103
120
|
</span>
|
|
104
|
-
<span
|
|
105
|
-
style="float: right; align-items: flex-end; margin-right: 88px"
|
|
106
|
-
>
|
|
121
|
+
<span>
|
|
107
122
|
{{
|
|
108
123
|
t(
|
|
109
124
|
`survey_creator.question.scoring.extreme_value_labels.${question.options.extremeValueLabel}.maxValue`
|
|
@@ -111,7 +126,7 @@
|
|
|
111
126
|
}}
|
|
112
127
|
</span>
|
|
113
128
|
</div>
|
|
114
|
-
</
|
|
129
|
+
</Col>
|
|
115
130
|
</Row>
|
|
116
131
|
</div>
|
|
117
132
|
</div>
|
|
@@ -120,7 +135,7 @@
|
|
|
120
135
|
<script lang="ts">
|
|
121
136
|
import Vue from "vue";
|
|
122
137
|
import OptionLayoutMixin from "../../../mixins/option-layout-mixin";
|
|
123
|
-
import { Row, Slider, FormItem, InputNumber } from "view-design";
|
|
138
|
+
import { Row, Slider, FormItem, InputNumber, Col } from "view-design";
|
|
124
139
|
import _ from "lodash";
|
|
125
140
|
|
|
126
141
|
export default Vue.extend({
|
|
@@ -133,6 +148,7 @@ export default Vue.extend({
|
|
|
133
148
|
Slider,
|
|
134
149
|
FormItem,
|
|
135
150
|
InputNumber,
|
|
151
|
+
Col,
|
|
136
152
|
},
|
|
137
153
|
props: {
|
|
138
154
|
question: {
|
|
@@ -217,3 +233,29 @@ export default Vue.extend({
|
|
|
217
233
|
},
|
|
218
234
|
});
|
|
219
235
|
</script>
|
|
236
|
+
<style lang="less" scoped>
|
|
237
|
+
.slider-container {
|
|
238
|
+
margin-top: 16px;
|
|
239
|
+
margin-bottom: 16px;
|
|
240
|
+
width: 100%;
|
|
241
|
+
display: flex;
|
|
242
|
+
|
|
243
|
+
/deep/.ivu-form-item {
|
|
244
|
+
margin-bottom: unset;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.slider {
|
|
249
|
+
width: 100%;
|
|
250
|
+
margin-left: 30px;
|
|
251
|
+
margin-right: 16px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.text-desc {
|
|
255
|
+
display: flex;
|
|
256
|
+
justify-content: space-between;
|
|
257
|
+
width: 100%;
|
|
258
|
+
padding-left: 36px;
|
|
259
|
+
padding-right: 100px;
|
|
260
|
+
}
|
|
261
|
+
</style>
|