@wg-npm/survey-response 0.5.158 → 0.5.159

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.
@@ -352,29 +352,11 @@ var script$f = Vue.extend({
352
352
  computed: {
353
353
  flexOrBlock() {
354
354
  if (this.isMobile()) {
355
- _.each(document.querySelectorAll(".ivu-radio-group-item"), (ele) => {
356
- ele.style.display = "inline-block";
357
- });
358
355
  return "inline-block";
359
356
  }
360
357
  else {
361
- _.each(document.querySelectorAll(".ivu-row-flex-start"), (ele) => {
362
- ele.style.alignItems = "center";
363
- });
364
- _.each(document.querySelectorAll(".ivu-radio-group-item"), (ele) => {
365
- ele.style.display = "flex";
366
- ele.style.flexDirection = "row";
367
- });
368
358
  return "flex";
369
359
  }
370
- },
371
- flexOrBlockStyle() {
372
- if (this.isMobile()) {
373
- return "display: inline-block";
374
- }
375
- else {
376
- return "display: flex";
377
- }
378
360
  }
379
361
  },
380
362
  methods: {
@@ -440,7 +422,7 @@ var __vue_render__$f = function () {var _vm=this;var _h=_vm.$createElement;var _
440
422
  type: 'array',
441
423
  min: 1,
442
424
  message: _vm.t('survey_response.question.question_required'),
443
- }}},[_c('CheckboxGroup',{on:{"on-change":_vm.selChange},model:{value:(_vm.value.answer),callback:function ($$v) {_vm.$set(_vm.value, "answer", $$v);},expression:"value.answer"}},[_c('Row',{attrs:{"type":_vm.flexOrBlock,"justify":"start","gutter":60}},_vm._l((_vm.question.choices),function(choice){return _c('Col',{key:choice.id,class:_vm.optionLayout,style:(_vm.flexOrBlockStyle)},[_c('Checkbox',{key:choice.id,attrs:{"label":choice.id,"disabled":_vm.question.options.readonly ||
425
+ }}},[_c('CheckboxGroup',{on:{"on-change":_vm.selChange},model:{value:(_vm.value.answer),callback:function ($$v) {_vm.$set(_vm.value, "answer", $$v);},expression:"value.answer"}},[_c('Row',{style:({'display':(_vm.isMobile()?'inline-block':'flex')}),attrs:{"type":_vm.flexOrBlock,"justify":"start","gutter":60}},_vm._l((_vm.question.choices),function(choice){return _c('Col',{key:choice.id,class:_vm.optionLayout,style:({'display':(_vm.isMobile()?'inline-block':'flex')})},[_c('Checkbox',{key:choice.id,style:({'display':(_vm.isMobile()?'inline-block':'flex'),'align-items':(_vm.isMobile()?'':'center')}),attrs:{"label":choice.id,"disabled":_vm.question.options.readonly ||
444
426
  choice.readonly ||
445
427
  _vm.question.options.disabled}},[_c('span',[_vm._v(_vm._s(_vm.i18nText(choice.text)))])]),_vm._v(" "),_vm._l((_vm.value.inputAnswers),function(inputAnswer,inputIndex){return _c('div',{key:inputIndex},[(
446
428
  choice.id === inputAnswer.choiceId &&
@@ -463,11 +445,11 @@ var __vue_staticRenderFns__$f = [];
463
445
  /* style */
464
446
  const __vue_inject_styles__$f = function (inject) {
465
447
  if (!inject) return
466
- inject("data-v-778a2db7_0", { source: ".ivu-row[data-v-778a2db7]{display:inline-block}.choice-title[data-v-778a2db7]{margin-left:8px;margin-right:8px}.choice-score[data-v-778a2db7]{margin-right:8px}.ivu-checkbox-wrapper[data-v-778a2db7]{white-space:nowrap}", map: undefined, media: undefined });
448
+ inject("data-v-7b3b232e_0", { source: ".choice-title[data-v-7b3b232e]{margin-left:8px;margin-right:8px}.choice-score[data-v-7b3b232e]{margin-right:8px}.ivu-checkbox-wrapper[data-v-7b3b232e]{white-space:nowrap}", map: undefined, media: undefined });
467
449
 
468
450
  };
469
451
  /* scoped */
470
- const __vue_scope_id__$f = "data-v-778a2db7";
452
+ const __vue_scope_id__$f = "data-v-7b3b232e";
471
453
  /* module identifier */
472
454
  const __vue_module_identifier__$f = undefined;
473
455
  /* functional template */
@@ -689,33 +671,33 @@ const __vue_script__$d = script$d;
689
671
 
690
672
  /* template */
691
673
  var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FormItem',{attrs:{"prop":_vm.answerProp,"rules":{
692
- required: _vm.question.options.required && !_vm.question.options.disabled,
693
- message: _vm.t('survey_response.question.question_required'),
694
- }}},[_c('RadioGroup',{staticClass:"question-choice",on:{"on-change":_vm.selChange},model:{value:(_vm.value.answer),callback:function ($$v) {_vm.$set(_vm.value, "answer", $$v);},expression:"value.answer"}},[_c('Row',{style:({'display':(_vm.isMobile()?'inline-block':'flex')}),attrs:{"type":_vm.flexOrBlock,"justify":"start","gutter":60}},_vm._l((_vm.question.choices),function(choice){return _c('Col',{key:choice.id,class:_vm.optionLayout,style:({'display':(_vm.isMobile()?'inline-block':'flex')})},[_c('Radio',{key:choice.id,style:({'display':(_vm.isMobile()?'inline-block':'flex'),'align-items':(_vm.isMobile()?'':'center')}),attrs:{"disabled":_vm.question.options.readonly || _vm.question.options.disabled,"label":choice.id},nativeOn:{"click":function($event){return _vm.toggleAnswer($event, choice.id, _vm.question.options.disabled)}}},[(_vm.haveStar(choice))?_c('span',[_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1):_vm._e(),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.i18nText(choice.text)))])]),_vm._v(" "),_vm._l((_vm.value.inputAnswers),function(inputAnswer,inputIndex){return _c('div',{key:inputIndex},[(
695
- choice.id === inputAnswer.choiceId && choice.id === _vm.value.answer
696
- )?_c('FormItem',{attrs:{"prop":_vm.inputAnswerProp(inputIndex),"rules":[
697
- {
698
- required: true,
699
- message: _vm.t('survey_response.question.choice_required'),
700
- },
701
- {
702
- type: 'string',
703
- min: _vm.question.options.inputMinLength,
704
- max: 999,
705
- message: _vm.t('survey_response.question.input_text_limit', [
706
- _vm.question.options.inputMinLength ]),
707
- trigger: 'blur',
708
- } ]}},[_c('Span',[_vm._v("\n "+_vm._s(inputAnswer.inputText))])],1):_vm._e()],1)})],2)}),1)],1)],1)};
674
+ required: _vm.question.options.required && !_vm.question.options.disabled,
675
+ message: _vm.t('survey_response.question.question_required'),
676
+ }}},[_c('RadioGroup',{staticClass:"question-choice",on:{"on-change":_vm.selChange},model:{value:(_vm.value.answer),callback:function ($$v) {_vm.$set(_vm.value, "answer", $$v);},expression:"value.answer"}},[_c('Row',{style:({'display':(_vm.isMobile()?'inline-block':'flex')}),attrs:{"type":_vm.flexOrBlock,"justify":"start","gutter":60}},_vm._l((_vm.question.choices),function(choice){return _c('Col',{key:choice.id,class:_vm.optionLayout,style:({'display':(_vm.isMobile()?'inline-block':'flex')})},[_c('Radio',{key:choice.id,style:({'display':(_vm.isMobile()?'inline-block':'flex'),'align-items':(_vm.isMobile()?'':'center')}),attrs:{"disabled":_vm.question.options.readonly || _vm.question.options.disabled,"label":choice.id},nativeOn:{"click":function($event){return _vm.toggleAnswer($event, choice.id, _vm.question.options.disabled)}}},[(_vm.haveStar(choice))?_c('span',[_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1):_vm._e(),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.i18nText(choice.text)))])]),_vm._v(" "),_vm._l((_vm.value.inputAnswers),function(inputAnswer,inputIndex){return _c('div',{key:inputIndex},[(
677
+ choice.id === inputAnswer.choiceId && choice.id === _vm.value.answer
678
+ )?_c('FormItem',{attrs:{"prop":_vm.inputAnswerProp(inputIndex),"rules":[
679
+ {
680
+ required: true,
681
+ message: _vm.t('survey_response.question.choice_required'),
682
+ },
683
+ {
684
+ type: 'string',
685
+ min: _vm.question.options.inputMinLength,
686
+ max: 999,
687
+ message: _vm.t('survey_response.question.input_text_limit', [
688
+ _vm.question.options.inputMinLength ]),
689
+ trigger: 'blur',
690
+ } ]}},[(_vm.responseStatus=='ENABLED')?_c('Span',[_vm._v("\n "+_vm._s(inputAnswer.inputText))]):_vm._e(),_vm._v(" "),(_vm.responseStatus=='DRAFT')?_c('Input',{model:{value:(inputAnswer.inputText),callback:function ($$v) {_vm.$set(inputAnswer, "inputText", (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"inputAnswer.inputText"}}):_vm._e()],1):_vm._e()],1)})],2)}),1)],1)],1)};
709
691
  var __vue_staticRenderFns__$d = [];
710
692
 
711
693
  /* style */
712
694
  const __vue_inject_styles__$d = function (inject) {
713
695
  if (!inject) return
714
- inject("data-v-25eb6794_0", { source: ".choice-title[data-v-25eb6794]{margin-left:8px;margin-right:8px}", map: undefined, media: undefined });
696
+ inject("data-v-02ccf75f_0", { source: ".choice-title[data-v-02ccf75f]{margin-left:8px;margin-right:8px}", map: undefined, media: undefined });
715
697
 
716
698
  };
717
699
  /* scoped */
718
- const __vue_scope_id__$d = "data-v-25eb6794";
700
+ const __vue_scope_id__$d = "data-v-02ccf75f";
719
701
  /* module identifier */
720
702
  const __vue_module_identifier__$d = undefined;
721
703
  /* functional template */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wg-npm/survey-response",
3
- "version": "0.5.158",
3
+ "version": "0.5.159",
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.158",
16
- "@wg-npm/survey-service-api": "0.5.158",
15
+ "@wg-npm/survey-core": "0.5.159",
16
+ "@wg-npm/survey-service-api": "0.5.159",
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.158",
38
- "@wg-npm/survey-service-api": "0.5.158",
37
+ "@wg-npm/survey-core": "0.5.159",
38
+ "@wg-npm/survey-service-api": "0.5.159",
39
39
  "acorn": "^7.3.1",
40
40
  "axios": "^0.19.2",
41
41
  "babelrc-rollup": "^3.0.0",
@@ -9,14 +9,15 @@
9
9
  }"
10
10
  >
11
11
  <CheckboxGroup v-model="value.answer" @on-change="selChange">
12
- <Row :type="flexOrBlock" justify="start" :gutter="60">
12
+ <Row :type="flexOrBlock" justify="start" :gutter="60" :style="{'display':(isMobile()?'inline-block':'flex')}">
13
13
  <Col
14
14
  v-for="choice in question.choices"
15
15
  :key="choice.id"
16
16
  :class="optionLayout"
17
- :style="flexOrBlockStyle"
17
+ :style="{'display':(isMobile()?'inline-block':'flex')}"
18
18
  >
19
19
  <Checkbox
20
+ :style="{'display':(isMobile()?'inline-block':'flex'),'align-items':(isMobile()?'':'center')}"
20
21
  :label="choice.id"
21
22
  :key="choice.id"
22
23
  :disabled="
@@ -116,27 +117,10 @@
116
117
  computed: {
117
118
  flexOrBlock() {
118
119
  if (this.isMobile()) {
119
- _.each(document.querySelectorAll(".ivu-radio-group-item") as NodeListOf<HTMLElement>, (ele) => {
120
- ele.style.display = "inline-block";
121
- });
122
120
  return "inline-block";
123
121
  } else {
124
- _.each(document.querySelectorAll(".ivu-row-flex-start") as NodeListOf<HTMLElement>, (ele) => {
125
- ele.style.alignItems = "center";
126
- });
127
- _.each(document.querySelectorAll(".ivu-radio-group-item") as NodeListOf<HTMLElement>, (ele) => {
128
- ele.style.display = "flex";
129
- ele.style.flexDirection = "row";
130
- });
131
122
  return "flex";
132
123
  }
133
- },
134
- flexOrBlockStyle() {
135
- if (this.isMobile()) {
136
- return "display: inline-block";
137
- } else {
138
- return "display: flex";
139
- }
140
124
  }
141
125
  },
142
126
  methods: {
@@ -203,10 +187,6 @@
203
187
  </script>
204
188
 
205
189
  <style lang="less" scoped>
206
- .ivu-row {
207
- display: "inline-block";
208
- }
209
-
210
190
  .choice-title {
211
191
  margin-left: 8px;
212
192
  margin-right: 8px;
@@ -56,13 +56,11 @@
56
56
  },
57
57
  ]"
58
58
  >
59
- <Span>
60
- {{ inputAnswer.inputText }}</Span>
61
- <!-- <Span v-if="responseStatus=='ENABLED'">-->
62
- <!-- {{ inputAnswer.inputText }}</Span>-->
63
- <!-- <Input v-if="responseStatus=='DRAFT'"-->
64
- <!-- v-model.trim="inputAnswer.inputText"-->
65
- <!-- />-->
59
+ <Span v-if="responseStatus=='ENABLED'">
60
+ {{ inputAnswer.inputText }}</Span>
61
+ <Input v-if="responseStatus=='DRAFT'"
62
+ v-model.trim="inputAnswer.inputText"
63
+ />
66
64
  </FormItem>
67
65
  </div>
68
66
  </Col>