@wg-npm/survey-creator 0.5.172 → 0.5.183

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.
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue';
2
- import _ from 'lodash';
2
+ import _$1 from 'lodash';
3
3
  import { Dropdown, DropdownMenu, DropdownItem, Button, Row, Col, Icon, Input, Tooltip, Badge, Modal, Radio, RadioGroup, Checkbox, CheckboxGroup, Divider, Card, Slider, Form, FormItem, ButtonGroup, InputNumber, Alert, Select, Option, Table, OptionGroup, Message, Drawer, Tabs, TabPane, Scroll } from 'view-design';
4
4
  import deepmerge from 'deepmerge';
5
5
  import draggable from 'vuedraggable';
@@ -348,13 +348,13 @@ class QuestionFactory {
348
348
  return new StarEvaluationItemModel(locale);
349
349
  }
350
350
  static createSelectionQuestionChoices(locale) {
351
- return _.range(4).map(() => this.createDefault(locale));
351
+ return _$1.range(4).map(() => this.createDefault(locale));
352
352
  }
353
353
  static createMatrixQuestionChoices(locale) {
354
- return _.range(5).map(() => this.createDefault(locale));
354
+ return _$1.range(5).map(() => this.createDefault(locale));
355
355
  }
356
356
  static createEvaluationItems(locale) {
357
- return _.range(5).map(() => this.createEvaluationItem(locale));
357
+ return _$1.range(5).map(() => this.createEvaluationItem(locale));
358
358
  }
359
359
  registerQuestion(questionType, questionCreator) {
360
360
  this.creatorHash[questionType] = questionCreator;
@@ -368,7 +368,7 @@ class QuestionFactory {
368
368
  }
369
369
  }
370
370
  const defaultText = function getText(locale) {
371
- return _.set({}, locale, "");
371
+ return _$1.set({}, locale, "");
372
372
  };
373
373
  class ChoiceOptionModel {
374
374
  constructor() {
@@ -385,14 +385,14 @@ class ChoiceModel {
385
385
  this.options = new ChoiceOptionModel();
386
386
  }
387
387
  static createChoiceId() {
388
- return `Choice-${_.now()}-${_.random(0, 9999999)}`;
388
+ return `Choice-${_$1.now()}-${_$1.random(0, 9999999)}`;
389
389
  }
390
390
  }
391
391
  class ExclusiveChoiceModel extends ChoiceModel {
392
392
  constructor(locale) {
393
393
  super(locale);
394
- if (!_.isEmpty(this.options)) {
395
- _.set(this.options, "exclusiveEnabled", true);
394
+ if (!_$1.isEmpty(this.options)) {
395
+ _$1.set(this.options, "exclusiveEnabled", true);
396
396
  }
397
397
  }
398
398
  }
@@ -402,7 +402,7 @@ class EvaluationItemModel {
402
402
  this.text = defaultText(locale);
403
403
  }
404
404
  static createChoiceId() {
405
- return `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`;
405
+ return `Evaluation-Item-${_$1.now()}-${_$1.random(0, 9999999)}`;
406
406
  }
407
407
  }
408
408
  class StarEvaluationItemModel extends EvaluationItemModel {
@@ -425,12 +425,12 @@ class QuestionHeaderModel {
425
425
  }
426
426
  class SubQuestionModel {
427
427
  constructor(locale) {
428
- this.id = `SubQ-${_.now()}-${_.random(0, 9999999)}`;
428
+ this.id = `SubQ-${_$1.now()}-${_$1.random(0, 9999999)}`;
429
429
  this.text = defaultText(locale);
430
430
  this.number = null;
431
431
  }
432
432
  static createSubPrefixId() {
433
- return `SubQ-${_.now()}-`;
433
+ return `SubQ-${_$1.now()}-`;
434
434
  }
435
435
  }
436
436
  class BaseQuestionModel {
@@ -442,15 +442,15 @@ class BaseQuestionModel {
442
442
  }
443
443
  static getMaxScore(question) {
444
444
  if (question.type == "SINGLE_SELECTION") {
445
- return _.max(_.map(question.choices, choice => parseFloat(_.get(choice, "options.score", 0) || 0))) || 0;
445
+ return _$1.max(_$1.map(question.choices, choice => parseFloat(_$1.get(choice, "options.score", 0) || 0))) || 0;
446
446
  } else if (question.type == "MULTI_SELECTION") {
447
- return _.sumBy(question.choices, item => parseFloat(_.get(item, "options.score") || 0));
447
+ return _$1.sumBy(question.choices, item => parseFloat(_$1.get(item, "options.score") || 0));
448
448
  } else if (question.type == "MATRIX") {
449
- const score = _.max(_.map(question.choices, choice => parseFloat(_.get(choice, "options.score", 0) || 0))) || 0;
449
+ const score = _$1.max(_$1.map(question.choices, choice => parseFloat(_$1.get(choice, "options.score", 0) || 0))) || 0;
450
450
  return score * question.subQuestions.length;
451
451
  } else if (question.type == "SCORING") {
452
452
  const score = question.options.maxRange;
453
- return score * (_.isEmpty(question.subQuestions) ? 1 : question.subQuestions.length);
453
+ return score * (_$1.isEmpty(question.subQuestions) ? 1 : question.subQuestions.length);
454
454
  }
455
455
  return 0;
456
456
  }
@@ -463,7 +463,7 @@ class BaseQuestionModel {
463
463
  return "";
464
464
  }
465
465
  static createQuestionId() {
466
- return `Q-${_.now()}-${_.random(0, 9999999)}`;
466
+ return `Q-${_$1.now()}-${_$1.random(0, 9999999)}`;
467
467
  }
468
468
  static getNumber(preNumber, question) {
469
469
  return preNumber + 1;
@@ -477,8 +477,8 @@ class BaseQuestionModel {
477
477
  static calculationAllQuestionCount(questions) {
478
478
  let count = 0;
479
479
  const exclude = ["TEXT_TITLE"];
480
- _.forEach(questions, question => {
481
- if (!_.includes(exclude, question.type)) {
480
+ _$1.forEach(questions, question => {
481
+ if (!_$1.includes(exclude, question.type)) {
482
482
  count++;
483
483
  }
484
484
  });
@@ -486,13 +486,13 @@ class BaseQuestionModel {
486
486
  }
487
487
  static calculationAllQuestionMaxScore(questions) {
488
488
  let maxScore = 0;
489
- _.forEach(questions, question => {
489
+ _$1.forEach(questions, question => {
490
490
  maxScore += this.getMaxScore(question);
491
491
  });
492
492
  return maxScore;
493
493
  }
494
494
  static setActiveQuestion(currentQuestion, questions) {
495
- _.forEach(questions, question => {
495
+ _$1.forEach(questions, question => {
496
496
  if (question.id == currentQuestion.id) {
497
497
  question.active = true;
498
498
  } else {
@@ -502,7 +502,7 @@ class BaseQuestionModel {
502
502
  }
503
503
  static rebuildQuestionNumber(questions) {
504
504
  let preNumber = 0;
505
- _.forEach(questions, function (question) {
505
+ _$1.forEach(questions, function (question) {
506
506
  let number;
507
507
  if (question.type === "TEXT_TITLE") {
508
508
  number = QuestionTextTitleModel.getNumber(preNumber, question);
@@ -520,7 +520,7 @@ class BaseQuestionModel {
520
520
  });
521
521
  }
522
522
  static deleteUnusedProperties(questions) {
523
- _.forEach(questions, function (question) {
523
+ _$1.forEach(questions, function (question) {
524
524
  if (question.type === "SCORING") {
525
525
  QuestionScoringModel.removeUnusedProperty(question);
526
526
  }
@@ -555,7 +555,7 @@ class QuestionMatrixModel extends BaseQuestionModel {
555
555
  }
556
556
  static getNumber(preNumber, question) {
557
557
  const number = preNumber + 1;
558
- _.forEach(question.subQuestions, (sq, index) => {
558
+ _$1.forEach(question.subQuestions, (sq, index) => {
559
559
  sq.number = index + 1;
560
560
  });
561
561
  return number;
@@ -568,7 +568,7 @@ class QuestionScoringModel extends BaseQuestionModel {
568
568
  }
569
569
  static getNumber(preNumber, question) {
570
570
  const number = preNumber + 1;
571
- _.forEach(question.subQuestions, (sq, index) => {
571
+ _$1.forEach(question.subQuestions, (sq, index) => {
572
572
  sq.number = index + 1;
573
573
  });
574
574
  return number;
@@ -576,24 +576,24 @@ class QuestionScoringModel extends BaseQuestionModel {
576
576
  static removeUnusedProperty(question) {
577
577
  const options = question.options;
578
578
  delete options.sliderValue;
579
- _.forEach(question.subQuestions, subQuestion => {
579
+ _$1.forEach(question.subQuestions, subQuestion => {
580
580
  delete subQuestion.sliderValue;
581
581
  });
582
582
  }
583
583
  }
584
- const ZH_CN = _.camelCase("zh-CN");
585
- const EN_US = _.camelCase("en-US");
586
- const ZH_TW = _.camelCase("zh-TW");
584
+ const ZH_CN = _$1.camelCase("zh-CN");
585
+ const EN_US = _$1.camelCase("en-US");
586
+ const ZH_TW = _$1.camelCase("zh-TW");
587
587
  function getValue(obj, locale) {
588
- const value = _.get(obj, _.camelCase(locale), "");
589
- if (!_.isEmpty(value)) {
588
+ const value = _$1.get(obj, _$1.camelCase(locale), "");
589
+ if (!_$1.isEmpty(value)) {
590
590
  return value;
591
591
  }
592
- return _.get(obj, locale, "");
592
+ return _$1.get(obj, locale, "");
593
593
  }
594
594
  function translate(obj, locale, prettyMath = false) {
595
595
  const value = getValue(obj, locale);
596
- if (!_.isEmpty(value) || !prettyMath) {
596
+ if (!_$1.isEmpty(value) || !prettyMath) {
597
597
  return value;
598
598
  }
599
599
  return obj[ZH_CN] || obj["zh-CN"] || obj[EN_US] || obj["en-US"] || obj[ZH_TW] || obj["zh-TW"];
@@ -601,7 +601,7 @@ function translate(obj, locale, prettyMath = false) {
601
601
  const CUSTOM_INPUT_REG = /(_{5,})/g;
602
602
  function formatTitle(question, locale) {
603
603
  const title = translate(question.header.text, locale, true);
604
- if (!_.get(question, "options.richTextEnabled", false)) {
604
+ if (!_$1.get(question, "options.richTextEnabled", false)) {
605
605
  return [title];
606
606
  }
607
607
  const trimmedTitles = title.split(CUSTOM_INPUT_REG);
@@ -638,8 +638,8 @@ var SurveyTranslatorMixin = Vue.extend({
638
638
  return survey.options.primaryLanguage;
639
639
  },
640
640
  getLanguagesExcludedPrimaryLanguage(survey) {
641
- const languages = _.cloneDeep(survey.options.languages);
642
- _.pull(languages, this.getPrimaryLanguage(survey));
641
+ const languages = _$1.cloneDeep(survey.options.languages);
642
+ _$1.pull(languages, this.getPrimaryLanguage(survey));
643
643
  return languages;
644
644
  },
645
645
  buildQuestionId(question) {
@@ -653,12 +653,12 @@ var SurveyTranslatorMixin = Vue.extend({
653
653
  },
654
654
  buildDataMap(data) {
655
655
  const map = {};
656
- _.forEach(data, (item) => {
656
+ _$1.forEach(data, (item) => {
657
657
  map[item.tempId] = item;
658
- _.forEach(item.children, (sub) => {
658
+ _$1.forEach(item.children, (sub) => {
659
659
  map[sub.tempId] = sub;
660
660
  });
661
- _.forEach(item.subQuestions, (sub) => {
661
+ _$1.forEach(item.subQuestions, (sub) => {
662
662
  map[sub.tempId] = sub;
663
663
  });
664
664
  });
@@ -666,8 +666,8 @@ var SurveyTranslatorMixin = Vue.extend({
666
666
  },
667
667
  allTranslationIsCompleted(survey) {
668
668
  let completed = true;
669
- const languages = _.cloneDeep(survey.options.languages);
670
- _.forEach(languages, (language) => {
669
+ const languages = _$1.cloneDeep(survey.options.languages);
670
+ _$1.forEach(languages, (language) => {
671
671
  if (!this.translationIsCompleted(survey, language)) {
672
672
  completed = false;
673
673
  }
@@ -675,21 +675,21 @@ var SurveyTranslatorMixin = Vue.extend({
675
675
  return completed;
676
676
  },
677
677
  translationIsCompleted(survey, language) {
678
- const locale = _.camelCase(language);
678
+ const locale = _$1.camelCase(language);
679
679
  let completed = true;
680
- _.forEach(survey.questions, function (question) {
681
- if (!_.get(question, `header.text.${locale}`)) {
680
+ _$1.forEach(survey.questions, function (question) {
681
+ if (!_$1.get(question, `header.text.${locale}`)) {
682
682
  completed = false;
683
683
  return completed;
684
684
  }
685
- _.forEach(question.choices, function (choice) {
686
- if (!_.get(choice, `text.${locale}`)) {
685
+ _$1.forEach(question.choices, function (choice) {
686
+ if (!_$1.get(choice, `text.${locale}`)) {
687
687
  completed = false;
688
688
  return completed;
689
689
  }
690
690
  });
691
- _.forEach(question.sub_questions, function (sub_question) {
692
- if (!_.get(sub_question, `text.${locale}`)) {
691
+ _$1.forEach(question.sub_questions, function (sub_question) {
692
+ if (!_$1.get(sub_question, `text.${locale}`)) {
693
693
  completed = false;
694
694
  return completed;
695
695
  }
@@ -726,6 +726,11 @@ var script$N = Vue.extend({
726
726
  };
727
727
  },
728
728
  created() {
729
+ if (!this.surveyExtendOptions.enabledSpeciallyQuestions) {
730
+ _.remove(questionTypes, (index) => {
731
+ return (index == "MATRIX" || index == "EVALUATION");
732
+ });
733
+ }
729
734
  if (this.surveyExtendOptions.enabledScoringQuestion) {
730
735
  questionTypes.push("SCORING");
731
736
  }
@@ -816,7 +821,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
816
821
  const __vue_script__$N = script$N;
817
822
 
818
823
  /* template */
819
- var __vue_render__$M = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Dropdown',{attrs:{"transfer":true}},[_c('Button',{attrs:{"icon":"md-add","type":"primary"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.create")))]),_vm._v(" "),_c('DropdownMenu',{attrs:{"slot":"list"},slot:"list"},_vm._l((_vm.questionTypes),function(questionType){return _c('DropdownItem',{key:questionType,staticClass:"dropdown_item",nativeOn:{"click":function($event){return _vm.onCreate(questionType)}}},[_vm._v(_vm._s(_vm.t(("survey_creator.question.types." + questionType))))])}),1)],1)};
824
+ var __vue_render__$M = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Dropdown',{attrs:{"transfer":true}},[_c('Button',{attrs:{"icon":"md-add","type":"primary"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.create"))+"\n ")]),_vm._v(" "),_c('DropdownMenu',{attrs:{"slot":"list"},slot:"list"},_vm._l((_vm.questionTypes),function(questionType){return _c('DropdownItem',{key:questionType,staticClass:"dropdown_item",nativeOn:{"click":function($event){return _vm.onCreate(questionType)}}},[_vm._v(_vm._s(_vm.t(("survey_creator.question.types." + questionType)))+"\n ")])}),1)],1)};
820
825
  var __vue_staticRenderFns__$M = [];
821
826
 
822
827
  /* style */
@@ -998,9 +1003,9 @@ var script$K = Vue.component("question-title-dynamic", {
998
1003
  render(createElement) {
999
1004
  let childArr = [];
1000
1005
  const self = this;
1001
- _.forEach(this.splitedTitles, (title, index) => {
1006
+ _$1.forEach(this.splitedTitles, (title, index) => {
1002
1007
  if (CUSTOM_INPUT_REG.test(title)) {
1003
- let corespondTitle = _.find(self.customFilledTitle, (title) => {
1008
+ let corespondTitle = _$1.find(self.customFilledTitle, (title) => {
1004
1009
  return title.index === index;
1005
1010
  });
1006
1011
  if (corespondTitle !== undefined) {
@@ -1147,11 +1152,11 @@ var script$J = Vue.extend({
1147
1152
  return BaseQuestionModel.getScoreRange(this.question);
1148
1153
  },
1149
1154
  haveMaxScore() {
1150
- return (_.get(this.question, "options.scoringEnabled", false) &&
1155
+ return (_$1.get(this.question, "options.scoringEnabled", false) &&
1151
1156
  this.question.type != "SCORING");
1152
1157
  },
1153
1158
  haveStar() {
1154
- return _.get(this.question, "options.starEnabled", false);
1159
+ return _$1.get(this.question, "options.starEnabled", false);
1155
1160
  },
1156
1161
  isSingleSelection() {
1157
1162
  return this.question.type == "SINGLE_SELECTION";
@@ -1323,7 +1328,7 @@ var script$H = Vue.extend({
1323
1328
  },
1324
1329
  computed: {
1325
1330
  jumps() {
1326
- return _.get(this.question, "jumps", []);
1331
+ return _$1.get(this.question, "jumps", []);
1327
1332
  },
1328
1333
  },
1329
1334
  methods: {
@@ -1334,9 +1339,9 @@ var script$H = Vue.extend({
1334
1339
  this.$emit("on-copy");
1335
1340
  },
1336
1341
  onDelete() {
1337
- let surveyAllJumpQuestionIds = _.map(_.flatMap(this.survey.questions, (question) => _.get(question, "jumps", [])), "toQuestionId");
1342
+ let surveyAllJumpQuestionIds = _$1.map(_$1.flatMap(this.survey.questions, (question) => _$1.get(question, "jumps", [])), "toQuestionId");
1338
1343
  if (this.jumps.length > 0 ||
1339
- _.includes(surveyAllJumpQuestionIds, this.question.id)) {
1344
+ _$1.includes(surveyAllJumpQuestionIds, this.question.id)) {
1340
1345
  Modal.confirm({
1341
1346
  title: this.t("survey_creator.question.jump.delete_question"),
1342
1347
  content: this.t("survey_creator.question.jump.delete_question_desc"),
@@ -1411,7 +1416,7 @@ var script$G = Vue.extend({
1411
1416
  computed: {
1412
1417
  customQuestion() {
1413
1418
  let input_titles = [];
1414
- _.each(formatTitle(this.question, Vue.$surveyLanguage), (t, index) => {
1419
+ _$1.each(formatTitle(this.question, Vue.$surveyLanguage), (t, index) => {
1415
1420
  if (CUSTOM_INPUT_REG.test(t)) {
1416
1421
  let title = {
1417
1422
  title: "",
@@ -1427,8 +1432,8 @@ var script$G = Vue.extend({
1427
1432
  };
1428
1433
  },
1429
1434
  enabledJump() {
1430
- return (_.get(this.question, "type") === "SINGLE_SELECTION" &&
1431
- _.get(this.$rootComponent, "surveyExtendOptions.enabledJump"));
1435
+ return (_$1.get(this.question, "type") === "SINGLE_SELECTION" &&
1436
+ _$1.get(this.$rootComponent, "surveyExtendOptions.enabledJump"));
1432
1437
  },
1433
1438
  },
1434
1439
  methods: {
@@ -1509,10 +1514,10 @@ var script$F = Vue.extend({
1509
1514
  },
1510
1515
  computed: {
1511
1516
  haveMaxScore() {
1512
- return _.get(this.question, "options.scoringEnabled", false);
1517
+ return _$1.get(this.question, "options.scoringEnabled", false);
1513
1518
  },
1514
1519
  jumps() {
1515
- return _.get(this.question, "jumps", []);
1520
+ return _$1.get(this.question, "jumps", []);
1516
1521
  },
1517
1522
  },
1518
1523
  watch: {
@@ -1526,18 +1531,18 @@ var script$F = Vue.extend({
1526
1531
  buildChoiceClasses() {
1527
1532
  return [
1528
1533
  `question-choice`,
1529
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1534
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1530
1535
  ];
1531
1536
  },
1532
1537
  haveStar(choice) {
1533
1538
  return choice.options?.star ?? false;
1534
1539
  },
1535
1540
  getJumpDesc(choiceId) {
1536
- let jump = _.find(this.jumps, (jump) => jump.choiceId === choiceId);
1537
- if (_.isEmpty(jump)) {
1541
+ let jump = _$1.find(this.jumps, (jump) => jump.choiceId === choiceId);
1542
+ if (_$1.isEmpty(jump)) {
1538
1543
  return null;
1539
1544
  }
1540
- let jumpQuestion = _.find(this.survey.questions, (question) => question.id === jump.toQuestionId);
1545
+ let jumpQuestion = _$1.find(this.survey.questions, (question) => question.id === jump.toQuestionId);
1541
1546
  return this.t(`survey_creator.question.jump.selected_jump`, [
1542
1547
  jumpQuestion.header.number,
1543
1548
  ]);
@@ -1609,7 +1614,7 @@ var script$E = Vue.extend({
1609
1614
  },
1610
1615
  computed: {
1611
1616
  haveMaxScore() {
1612
- return _.get(this.question, "options.scoringEnabled", false);
1617
+ return _$1.get(this.question, "options.scoringEnabled", false);
1613
1618
  },
1614
1619
  },
1615
1620
  watch: {
@@ -1623,13 +1628,13 @@ var script$E = Vue.extend({
1623
1628
  buildChoiceClasses() {
1624
1629
  return [
1625
1630
  `question-choice`,
1626
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1631
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1627
1632
  ];
1628
1633
  },
1629
1634
  setCheckboxStatus() {
1630
1635
  let exclusiveChoiceId = "";
1631
1636
  const notExclusiveChoices = new Array();
1632
- _.each(this.question.choices, (choice) => {
1637
+ _$1.each(this.question.choices, (choice) => {
1633
1638
  if (choice.options.exclusiveEnabled) {
1634
1639
  exclusiveChoiceId = choice.id;
1635
1640
  }
@@ -1637,8 +1642,8 @@ var script$E = Vue.extend({
1637
1642
  notExclusiveChoices.push(choice);
1638
1643
  }
1639
1644
  });
1640
- _.each(notExclusiveChoices, (choice) => {
1641
- if (_.includes(this.value.answer, exclusiveChoiceId)) {
1645
+ _$1.each(notExclusiveChoices, (choice) => {
1646
+ if (_$1.includes(this.value.answer, exclusiveChoiceId)) {
1642
1647
  choice.readonly = true;
1643
1648
  }
1644
1649
  else {
@@ -1647,8 +1652,8 @@ var script$E = Vue.extend({
1647
1652
  });
1648
1653
  },
1649
1654
  selChange(val) {
1650
- _.each(this.question.choices, (choice) => {
1651
- _.each(val, (id) => {
1655
+ _$1.each(this.question.choices, (choice) => {
1656
+ _$1.each(val, (id) => {
1652
1657
  if (choice.id == id) {
1653
1658
  if (choice.options.exclusiveEnabled) {
1654
1659
  this.value.answer = [id];
@@ -1892,16 +1897,16 @@ var script$A = Vue.extend({
1892
1897
  buildChoiceClasses() {
1893
1898
  return [
1894
1899
  `question-choice`,
1895
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1900
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1896
1901
  ];
1897
1902
  },
1898
1903
  },
1899
1904
  computed: {
1900
1905
  haveMaxScore() {
1901
- return _.get(this.question, "options.scoringEnabled", false);
1906
+ return _$1.get(this.question, "options.scoringEnabled", false);
1902
1907
  },
1903
1908
  choiceMaxScore() {
1904
- return _.max(_.map(this.question.choices, (choice) => parseFloat(_.get(choice, "options.score", 0) || 0)));
1909
+ return _$1.max(_$1.map(this.question.choices, (choice) => parseFloat(_$1.get(choice, "options.score", 0) || 0)));
1905
1910
  },
1906
1911
  },
1907
1912
  });
@@ -2031,7 +2036,7 @@ class ExprEvaluationQuestion {
2031
2036
 
2032
2037
  constructor(questions, scope) {
2033
2038
  this.questions = questions;
2034
- this.scope = _.sortBy(scope);
2039
+ this.scope = _$1.sortBy(scope);
2035
2040
 
2036
2041
  this.questionMap = this.buildQuestionMap();
2037
2042
  }
@@ -2046,10 +2051,11 @@ class ExprEvaluationQuestion {
2046
2051
 
2047
2052
  buildQuestionMap() {
2048
2053
  const questionMap = {};
2049
- _.forEach(this.questions, (question) => {
2054
+ _$1.forEach(this.questions, (question) => {
2050
2055
  questionMap[question.id] = question;
2051
2056
  if (question.type == "MATRIX") {
2052
- _.forEach(_.get(question, "subQuestions", []), (subQuestion) => {
2057
+ // @ts-ignore
2058
+ _$1.forEach(_$1.get(question, "subQuestions", []), (subQuestion) => {
2053
2059
  questionMap[subQuestion.id] = subQuestion;
2054
2060
  });
2055
2061
  }
@@ -2059,21 +2065,25 @@ class ExprEvaluationQuestion {
2059
2065
 
2060
2066
  checkedQuestion() {
2061
2067
  const questions = new Array();
2062
- _.forEach(this.questions, (question) => {
2063
- if (_.get(question, "type") == "MATRIX") {
2068
+ _$1.forEach(this.questions, (question) => {
2069
+ // @ts-ignore
2070
+ if (_$1.get(question, "type") == "MATRIX") {
2064
2071
  const markedQuestions = new Array();
2065
- _.forEach(_.get(question, "subQuestions", []), (subQuestion) => {
2066
- if (_.includes(this.scope, subQuestion.id)) {
2067
- const newSubQuestion = _.cloneDeep(subQuestion);
2068
- _.set(newSubQuestion, "type", "MATRIX");
2069
- _.set(newSubQuestion, "parentId", _.get(question, "id"));
2072
+ // @ts-ignore
2073
+ _$1.forEach(_$1.get(question, "subQuestions", []), (subQuestion) => {
2074
+ if (_$1.includes(this.scope, subQuestion.id)) {
2075
+ const newSubQuestion = _$1.cloneDeep(subQuestion);
2076
+ // @ts-ignore
2077
+ _$1.set(newSubQuestion, "type", "MATRIX");
2078
+ // @ts-ignore
2079
+ _$1.set(newSubQuestion, "parentId", _$1.get(question, "id"));
2070
2080
  markedQuestions.push(newSubQuestion);
2071
2081
  }
2072
2082
  });
2073
- if (!_.isEmpty(markedQuestions)) {
2083
+ if (!_$1.isEmpty(markedQuestions)) {
2074
2084
  questions.push(markedQuestions);
2075
2085
  }
2076
- } else if (_.includes(this.scope, question.id)) {
2086
+ } else if (_$1.includes(this.scope, question.id)) {
2077
2087
  questions.push(question);
2078
2088
  }
2079
2089
  });
@@ -2083,7 +2093,7 @@ class ExprEvaluationQuestion {
2083
2093
  recurs(elements, numbers) {
2084
2094
  for (let i = 0; i < elements.length; i++) {
2085
2095
  const element = elements[i];
2086
- if (_.isArray(element)) {
2096
+ if (_$1.isArray(element)) {
2087
2097
  numbers.push(new Array());
2088
2098
  this.recurs(element, numbers[numbers.length - 1]);
2089
2099
  } else {
@@ -2102,7 +2112,7 @@ class ExprEvaluationQuestion {
2102
2112
  i = j - 1;
2103
2113
  break;
2104
2114
  }
2105
- if (_.size(temp) > 1) {
2115
+ if (_$1.size(temp) > 1) {
2106
2116
  temp.pop();
2107
2117
  }
2108
2118
  temp.push(this.getFullNumber(elements[j]));
@@ -2113,7 +2123,7 @@ class ExprEvaluationQuestion {
2113
2123
 
2114
2124
  isContinuous(front, hind) {
2115
2125
  return (
2116
- !_.isArray(hind) && this.getNumber(hind) - this.getNumber(front) == 1
2126
+ !_$1.isArray(hind) && this.getNumber(hind) - this.getNumber(front) == 1
2117
2127
  );
2118
2128
  }
2119
2129
 
@@ -2156,7 +2166,7 @@ var script$y = Vue.extend({
2156
2166
  },
2157
2167
  computed: {
2158
2168
  questions() {
2159
- return _.cloneDeep(this.$rootComponent.currentSurvey.questions);
2169
+ return _$1.cloneDeep(this.$rootComponent.currentSurvey.questions);
2160
2170
  },
2161
2171
  },
2162
2172
  watch: {
@@ -2180,28 +2190,28 @@ var script$y = Vue.extend({
2180
2190
  }
2181
2191
  else {
2182
2192
  let numbers = new ExprEvaluationQuestion(this.questions, payload.scope).calculateNumbers();
2183
- let scope = _.join(_.map(numbers, (number) => {
2184
- if (_.isArray(_.head(number))) {
2185
- return _.join(_.map(number, (e) => _.join(e, "-")), ", ");
2193
+ let scope = _$1.join(_$1.map(numbers, (number) => {
2194
+ if (_$1.isArray(_$1.head(number))) {
2195
+ return _$1.join(_$1.map(number, (e) => _$1.join(e, "-")), ", ");
2186
2196
  }
2187
- return _.join(number, "-");
2197
+ return _$1.join(number, "-");
2188
2198
  }), ", ");
2189
2199
  if (condition.type == "ASSIGN") {
2190
2200
  return this.t("survey_creator.question.evaluation.condition.assign_template", [
2191
2201
  scope,
2192
- _.join(payload.values, "、"),
2193
- _.unescape(payload.operator),
2202
+ _$1.join(payload.values, "、"),
2203
+ _$1.unescape(payload.operator),
2194
2204
  payload.size,
2195
2205
  ]);
2196
2206
  }
2197
2207
  else if (condition.type == "AUTO") {
2198
- return this.t("survey_creator.question.evaluation.condition.auto_template", [scope, _.join(payload.values, "、")]);
2208
+ return this.t("survey_creator.question.evaluation.condition.auto_template", [scope, _$1.join(payload.values, "、")]);
2199
2209
  }
2200
2210
  return "";
2201
2211
  }
2202
2212
  },
2203
2213
  getChineseLength(_str) {
2204
- _str = _.trim(_str);
2214
+ _str = _$1.trim(_str);
2205
2215
  let strLength = _str.length;
2206
2216
  if (!strLength) {
2207
2217
  return 0;
@@ -2211,16 +2221,16 @@ var script$y = Vue.extend({
2211
2221
  },
2212
2222
  initialDesc() {
2213
2223
  let desc = "";
2214
- let ds = _.map(this.conditions, (c) => {
2224
+ let ds = _$1.map(this.conditions, (c) => {
2215
2225
  return this.getDesc(c);
2216
2226
  });
2217
- desc = _.join(ds, "<br>");
2227
+ desc = _$1.join(ds, "<br>");
2218
2228
  this.desc = desc;
2219
2229
  let strLength = desc.length;
2220
2230
  let cLength = this.getChineseLength(desc.substring(0, SPLIT_LENGTH));
2221
2231
  if (strLength > SPLIT_LENGTH) {
2222
2232
  this.desc =
2223
- desc.substring(0, SPLIT_LENGTH - _.ceil(cLength / 2)) + "...";
2233
+ desc.substring(0, SPLIT_LENGTH - _$1.ceil(cLength / 2)) + "...";
2224
2234
  }
2225
2235
  this.descTitle = desc;
2226
2236
  },
@@ -2716,7 +2726,7 @@ var questionFormMixin = Vue.extend({
2716
2726
  this.primaryLanguage = this.$rootComponent.primaryLanguage;
2717
2727
  },
2718
2728
  created() {
2719
- this.editQuestion = _.cloneDeep(this.question);
2729
+ this.editQuestion = _$1.cloneDeep(this.question);
2720
2730
  },
2721
2731
  methods: {},
2722
2732
  });
@@ -2842,11 +2852,13 @@ var script$p = Vue.extend({
2842
2852
  layoutOptions: ["HORIZONTAL", "VERTICAL"],
2843
2853
  enabledInputChoice: false,
2844
2854
  enabledRichText: false,
2855
+ enabledSpeciallyQuestions: true
2845
2856
  };
2846
2857
  },
2847
2858
  created() {
2848
- this.enabledInputChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2849
- this.enabledRichText = _.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2859
+ this.enabledInputChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2860
+ this.enabledRichText = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2861
+ this.enabledSpeciallyQuestions = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledSpeciallyQuestions", true);
2850
2862
  this.editQuestion.options.richTextEnabled = this.enabledRichText;
2851
2863
  },
2852
2864
  methods: {
@@ -2854,7 +2866,7 @@ var script$p = Vue.extend({
2854
2866
  this.editQuestion.choices.push(QuestionFactory.createDefault(this.$rootComponent.primaryLanguage));
2855
2867
  },
2856
2868
  deleteOption(position, choiceId) {
2857
- let jumpIndex = _.findIndex(_.get(this.editQuestion, "jumps", []), (jump) => jump.choiceId === choiceId);
2869
+ let jumpIndex = _$1.findIndex(_$1.get(this.editQuestion, "jumps", []), (jump) => jump.choiceId === choiceId);
2858
2870
  if (jumpIndex > -1) {
2859
2871
  Modal.confirm({
2860
2872
  title: this.t("survey_creator.question.jump.delete_option"),
@@ -2871,14 +2883,14 @@ var script$p = Vue.extend({
2871
2883
  },
2872
2884
  scoringEnabledChange() {
2873
2885
  if (!this.editQuestion.options.scoringEnabled) {
2874
- _.each(this.editQuestion.choices, (choice) => {
2886
+ _$1.each(this.editQuestion.choices, (choice) => {
2875
2887
  choice.options.score = null;
2876
2888
  });
2877
2889
  }
2878
2890
  },
2879
2891
  starEnabledChange() {
2880
2892
  if (!this.editQuestion.options.starEnabled) {
2881
- _.each(this.editQuestion.choices, (choice) => {
2893
+ _$1.each(this.editQuestion.choices, (choice) => {
2882
2894
  choice.options.star = false;
2883
2895
  });
2884
2896
  }
@@ -2891,13 +2903,13 @@ var script$p = Vue.extend({
2891
2903
  this.editQuestion.options.inputMinLength = 10;
2892
2904
  }
2893
2905
  if (!this.editQuestion.options.inputtedEnabled) {
2894
- _.each(this.editQuestion.choices, (choice) => {
2906
+ _$1.each(this.editQuestion.choices, (choice) => {
2895
2907
  choice.options.inputEnabled = false;
2896
2908
  });
2897
2909
  }
2898
2910
  },
2899
2911
  starChange(id) {
2900
- _.each(this.editQuestion.choices, (choice) => {
2912
+ _$1.each(this.editQuestion.choices, (choice) => {
2901
2913
  if (choice.id == id) {
2902
2914
  choice.options.starCount = choice.options.star == true ? 1 : 0;
2903
2915
  }
@@ -2906,7 +2918,7 @@ var script$p = Vue.extend({
2906
2918
  validatedStar(rule, value, callback, source, options) {
2907
2919
  if (this.editQuestion.options.starEnabled) {
2908
2920
  let existStar = false;
2909
- _.each(this.editQuestion.choices, (choice) => {
2921
+ _$1.each(this.editQuestion.choices, (choice) => {
2910
2922
  if (choice.options.star) {
2911
2923
  existStar = true;
2912
2924
  }
@@ -2921,7 +2933,7 @@ var script$p = Vue.extend({
2921
2933
  validatedInput(rule, value, callback, source, options) {
2922
2934
  if (this.editQuestion.options.inputtedEnabled) {
2923
2935
  let existInput = false;
2924
- _.each(this.editQuestion.choices, (choice) => {
2936
+ _$1.each(this.editQuestion.choices, (choice) => {
2925
2937
  if (choice.options.inputEnabled) {
2926
2938
  existInput = true;
2927
2939
  }
@@ -2951,40 +2963,40 @@ var script$p = Vue.extend({
2951
2963
  const __vue_script__$p = script$p;
2952
2964
 
2953
2965
  /* template */
2954
- var __vue_render__$p = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container"},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1)])]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert")))]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":80,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
2966
+ var __vue_render__$p = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.enabledInputChoice?'grid-template-columns: 50% 50%':'grid-template-columns: 100%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()])])]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":80,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
2967
+ required: true,
2968
+ message: _vm.t('survey_creator.question.titleRequiredTip'),
2969
+ }}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[_c('FormItem',{attrs:{"label-width":80,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
2955
2970
  required: true,
2956
- message: _vm.t('survey_creator.question.titleRequiredTip'),
2957
- }}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[_c('FormItem',{attrs:{"label-width":80,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
2958
- required: true,
2959
- message: _vm.t('survey_creator.question.optionalRequiredTip'),
2960
- }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}}),_vm._v(" "),(_vm.editQuestion.choices.length < _vm.choiceLimit.max)?_c('Button',{staticClass:"button",attrs:{"icon":"md-add"},nativeOn:{"click":function($event){return _vm.addOption()}}}):_vm._e(),_vm._v(" "),(_vm.editQuestion.choices.length > _vm.choiceLimit.min)?_c('Button',{staticClass:"button",attrs:{"icon":"md-remove"},nativeOn:{"click":function($event){return _vm.deleteOption(index, option.id)}}}):_vm._e()],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":80,"rules":[
2961
- {
2962
- required: _vm.editQuestion.options.scoringEnabled,
2963
- message: _vm.t('survey_creator.question.scoreRequiredTip'),
2964
- },
2965
- {
2966
- pattern:
2967
- /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
2968
- message: _vm.t('survey_creator.question.scoreErrorTip'),
2969
- } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
2970
- {
2971
- message: _vm.t('survey_creator.question.inputLeastOneTip'),
2972
- validator: _vm.validatedInput,
2973
- } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],attrs:{"prop":'choices.' + index + '.options.star',"label-width":80,"rules":[
2974
- {
2975
- message: _vm.t('survey_creator.question.starLeastOneTip'),
2976
- validator: _vm.validatedStar,
2977
- } ]}},[_c('Checkbox',{on:{"on-change":function($event){return _vm.starChange(option.id)}},model:{value:(option.options.star),callback:function ($$v) {_vm.$set(option.options, "star", $$v);},expression:"option.options.star"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1)}),0)],1)};
2971
+ message: _vm.t('survey_creator.question.optionalRequiredTip'),
2972
+ }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}}),_vm._v(" "),(_vm.editQuestion.choices.length < _vm.choiceLimit.max)?_c('Button',{staticClass:"button",attrs:{"icon":"md-add"},nativeOn:{"click":function($event){return _vm.addOption()}}}):_vm._e(),_vm._v(" "),(_vm.editQuestion.choices.length > _vm.choiceLimit.min)?_c('Button',{staticClass:"button",attrs:{"icon":"md-remove"},nativeOn:{"click":function($event){return _vm.deleteOption(index, option.id)}}}):_vm._e()],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":80,"rules":[
2973
+ {
2974
+ required: _vm.editQuestion.options.scoringEnabled,
2975
+ message: _vm.t('survey_creator.question.scoreRequiredTip'),
2976
+ },
2977
+ {
2978
+ pattern:
2979
+ /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
2980
+ message: _vm.t('survey_creator.question.scoreErrorTip'),
2981
+ } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
2982
+ {
2983
+ message: _vm.t('survey_creator.question.inputLeastOneTip'),
2984
+ validator: _vm.validatedInput,
2985
+ } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],attrs:{"prop":'choices.' + index + '.options.star',"label-width":80,"rules":[
2986
+ {
2987
+ message: _vm.t('survey_creator.question.starLeastOneTip'),
2988
+ validator: _vm.validatedStar,
2989
+ } ]}},[_c('Checkbox',{on:{"on-change":function($event){return _vm.starChange(option.id)}},model:{value:(option.options.star),callback:function ($$v) {_vm.$set(option.options, "star", $$v);},expression:"option.options.star"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1)}),0)],1)};
2978
2990
  var __vue_staticRenderFns__$p = [];
2979
2991
 
2980
2992
  /* style */
2981
2993
  const __vue_inject_styles__$p = function (inject) {
2982
2994
  if (!inject) return
2983
- inject("data-v-31412791_0", { source: ".options-container[data-v-31412791]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid;grid-template-columns:50% 50%}.options-container .options-row[data-v-31412791]{display:flex;flex-direction:row;margin-bottom:16px}.options-container .options-row .options[data-v-31412791]{display:flex;flex-direction:column}.options-container .options-row .options .option[data-v-31412791]{margin-top:24px}.options-container .options-row .options .option-expand[data-v-31412791]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.options-container .options-row .options .option-expand .inputing[data-v-31412791]{width:64px}.options-container .before-border[data-v-31412791]{border-left:1px solid #e8eaec;padding-left:16px}.option-header[data-v-31412791]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.option-header .choice[data-v-31412791]{width:100%}.option-header .scoring[data-v-31412791]{width:100px;display:flex;justify-content:center}.option-header .inputing[data-v-31412791]{width:145px;min-width:42px;display:flex;justify-content:center}.question-choice[data-v-31412791]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.question-choice .choice[data-v-31412791]{display:flex;flex-direction:row;width:100%;margin-right:8px}.question-choice .choice .button[data-v-31412791]{margin-left:8px}.question-choice .scoring[data-v-31412791]{width:85px}.question-choice .inputing[data-v-31412791]{width:145px;text-align:center}.question-choice .inputing .ivu-checkbox-wrapper[data-v-31412791]{margin-right:0}[data-v-31412791] .ivu-form-item{width:100%}.option-input[data-v-31412791]{margin:0 50px 30px 80px}", map: undefined, media: undefined });
2995
+ inject("data-v-63ce12a4_0", { source: ".options-container[data-v-63ce12a4]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid}.options-container .options-row[data-v-63ce12a4]{display:flex;flex-direction:row;margin-bottom:16px}.options-container .options-row .options[data-v-63ce12a4]{display:flex;flex-direction:column}.options-container .options-row .options .option[data-v-63ce12a4]{margin-top:24px}.options-container .options-row .options .option-expand[data-v-63ce12a4]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.options-container .options-row .options .option-expand .inputing[data-v-63ce12a4]{width:64px}.options-container .before-border[data-v-63ce12a4]{border-left:1px solid #e8eaec;padding-left:16px}.option-header[data-v-63ce12a4]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.option-header .choice[data-v-63ce12a4]{width:100%}.option-header .scoring[data-v-63ce12a4]{width:100px;display:flex;justify-content:center}.option-header .inputing[data-v-63ce12a4]{width:145px;min-width:42px;display:flex;justify-content:center}.question-choice[data-v-63ce12a4]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.question-choice .choice[data-v-63ce12a4]{display:flex;flex-direction:row;width:100%;margin-right:8px}.question-choice .choice .button[data-v-63ce12a4]{margin-left:8px}.question-choice .scoring[data-v-63ce12a4]{width:85px}.question-choice .inputing[data-v-63ce12a4]{width:145px;text-align:center}.question-choice .inputing .ivu-checkbox-wrapper[data-v-63ce12a4]{margin-right:0}[data-v-63ce12a4] .ivu-form-item{width:100%}.option-input[data-v-63ce12a4]{margin:0 50px 30px 80px}", map: undefined, media: undefined });
2984
2996
 
2985
2997
  };
2986
2998
  /* scoped */
2987
- const __vue_scope_id__$p = "data-v-31412791";
2999
+ const __vue_scope_id__$p = "data-v-63ce12a4";
2988
3000
  /* module identifier */
2989
3001
  const __vue_module_identifier__$p = undefined;
2990
3002
  /* functional template */
@@ -3042,14 +3054,16 @@ var script$o = Vue.extend({
3042
3054
  enabledExclusiveChoice: false,
3043
3055
  enabledInputChoice: false,
3044
3056
  enabledRichText: false,
3057
+ enabledSpeciallyQuestions: true
3045
3058
  };
3046
3059
  },
3047
3060
  created() {
3048
3061
  this.resetStarList();
3049
- this.enabledExclusiveChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledExclusiveChoice", false);
3050
- this.enabledInputChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
3051
- this.enabledRichText = _.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
3062
+ this.enabledExclusiveChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledExclusiveChoice", false);
3063
+ this.enabledInputChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
3064
+ this.enabledRichText = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
3052
3065
  this.editQuestion.options.richTextEnabled = this.enabledRichText;
3066
+ this.enabledSpeciallyQuestions = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledSpeciallyQuestions", true);
3053
3067
  },
3054
3068
  methods: {
3055
3069
  handleExclusiveChoice(callback) {
@@ -3074,7 +3088,7 @@ var script$o = Vue.extend({
3074
3088
  },
3075
3089
  scoringEnabledChange() {
3076
3090
  if (!this.editQuestion.options.scoringEnabled) {
3077
- _.each(this.editQuestion.choices, (choice) => {
3091
+ _$1.each(this.editQuestion.choices, (choice) => {
3078
3092
  choice.options.score = null;
3079
3093
  });
3080
3094
  }
@@ -3095,14 +3109,14 @@ var script$o = Vue.extend({
3095
3109
  this.editQuestion.options.inputMinLength = 10;
3096
3110
  }
3097
3111
  if (!this.editQuestion.options.inputtedEnabled) {
3098
- _.each(this.editQuestion.choices, (choice) => {
3112
+ _$1.each(this.editQuestion.choices, (choice) => {
3099
3113
  choice.options.inputEnabled = false;
3100
3114
  });
3101
3115
  }
3102
3116
  },
3103
3117
  resetStarList() {
3104
3118
  this.selectStarList = [];
3105
- _.each(this.editQuestion.choices, (choices, index) => {
3119
+ _$1.each(this.editQuestion.choices, (choices, index) => {
3106
3120
  this.selectStarList.push({
3107
3121
  label: index + 1,
3108
3122
  value: index + 1,
@@ -3124,7 +3138,7 @@ var script$o = Vue.extend({
3124
3138
  validatedInput(rule, value, callback, source, options) {
3125
3139
  if (this.editQuestion.options.inputtedEnabled) {
3126
3140
  let existInput = false;
3127
- _.each(this.editQuestion.choices, (choice) => {
3141
+ _$1.each(this.editQuestion.choices, (choice) => {
3128
3142
  if (choice.options.inputEnabled) {
3129
3143
  existInput = true;
3130
3144
  }
@@ -3154,52 +3168,52 @@ var script$o = Vue.extend({
3154
3168
  const __vue_script__$o = script$o;
3155
3169
 
3156
3170
  /* template */
3157
- var __vue_render__$o = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",staticClass:"multi-selection-form",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container"},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountPrefix"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"50px"},attrs:{"size":"small"},model:{value:(_vm.editQuestion.options.starMinCount),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starMinCount", $$v);},expression:"editQuestion.options.starMinCount"}},_vm._l((_vm.selectStarList),function(item){return _c('Option',{key:item.value,attrs:{"value":item.value}},[_vm._v(_vm._s(item.label)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountSuffix"))+"\n ")])],1),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1)]),_vm._v(" "),(_vm.enabledExclusiveChoice)?_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1)]):_vm._e()]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert")))]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":60,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
3158
- required: true,
3159
- message: _vm.t('survey_creator.question.titleRequiredTip'),
3160
- }}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[(!option.options.exclusiveEnabled)?_c('div',{staticClass:"choice-row"},[_c('FormItem',{attrs:{"label-width":60,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
3161
- required: true,
3162
- message: _vm.t('survey_creator.question.optionalRequiredTip'),
3163
- }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}}),_vm._v(" "),(_vm.editQuestion.choices.length < _vm.choiceLimit.max)?_c('Button',{staticClass:"button",attrs:{"icon":"md-add"},nativeOn:{"click":function($event){return _vm.addOption()}}}):_vm._e(),_vm._v(" "),(_vm.editQuestion.choices.length > _vm.choiceLimit.min)?_c('Button',{staticClass:"button",attrs:{"icon":"md-remove"},nativeOn:{"click":function($event){return _vm.deleteOption(index)}}}):_vm._e()],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":60,"rules":[
3164
- {
3165
- required: _vm.editQuestion.options.scoringEnabled,
3166
- message: _vm.t('survey_creator.question.scoreRequiredTip'),
3167
- },
3168
- {
3169
- pattern:
3170
- /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
3171
- message: _vm.t('survey_creator.question.scoreErrorTip'),
3172
- } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
3173
- {
3174
- message: _vm.t('survey_creator.question.inputLeastOneTip'),
3175
- validator: _vm.validatedInput,
3176
- } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1):_c('div',{staticClass:"choice-row exclusive-choice"},[_c('FormItem',{attrs:{"label-width":60,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
3177
- required: true,
3178
- message: _vm.t('survey_creator.question.optionalRequiredTip'),
3179
- }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}})],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":60,"rules":[
3180
- {
3181
- required: _vm.editQuestion.options.scoringEnabled,
3182
- message: _vm.t('survey_creator.question.scoreRequiredTip'),
3183
- },
3184
- {
3185
- pattern:
3186
- /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
3187
- message: _vm.t('survey_creator.question.scoreErrorTip'),
3188
- } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
3189
- {
3190
- message: _vm.t('survey_creator.question.inputLeastOneTip'),
3191
- validator: _vm.validatedInput,
3192
- } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1)])}),0)],1)};
3171
+ var __vue_render__$o = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",staticClass:"multi-selection-form",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.enabledSpeciallyQuestions?'grid-template-columns: 30% 40% 30%':'grid-template-columns: 50% 50%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountPrefix"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"50px"},attrs:{"size":"small"},model:{value:(_vm.editQuestion.options.starMinCount),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starMinCount", $$v);},expression:"editQuestion.options.starMinCount"}},_vm._l((_vm.selectStarList),function(item){return _c('Option',{key:item.value,attrs:{"value":item.value}},[_vm._v(_vm._s(item.label)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountSuffix"))+"\n ")])],1),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e(),_vm._v(" "),_c('Checkbox',{staticClass:"option",style:(_vm.enabledInputChoice?'margin-top: 24px':'margin-top: 0px'),on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1)]),_vm._v(" "),(_vm.enabledExclusiveChoice && _vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1)]):_vm._e()]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":60,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
3172
+ required: true,
3173
+ message: _vm.t('survey_creator.question.titleRequiredTip'),
3174
+ }}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[(!option.options.exclusiveEnabled)?_c('div',{staticClass:"choice-row"},[_c('FormItem',{attrs:{"label-width":60,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
3175
+ required: true,
3176
+ message: _vm.t('survey_creator.question.optionalRequiredTip'),
3177
+ }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}}),_vm._v(" "),(_vm.editQuestion.choices.length < _vm.choiceLimit.max)?_c('Button',{staticClass:"button",attrs:{"icon":"md-add"},nativeOn:{"click":function($event){return _vm.addOption()}}}):_vm._e(),_vm._v(" "),(_vm.editQuestion.choices.length > _vm.choiceLimit.min)?_c('Button',{staticClass:"button",attrs:{"icon":"md-remove"},nativeOn:{"click":function($event){return _vm.deleteOption(index)}}}):_vm._e()],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":60,"rules":[
3178
+ {
3179
+ required: _vm.editQuestion.options.scoringEnabled,
3180
+ message: _vm.t('survey_creator.question.scoreRequiredTip'),
3181
+ },
3182
+ {
3183
+ pattern:
3184
+ /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
3185
+ message: _vm.t('survey_creator.question.scoreErrorTip'),
3186
+ } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
3187
+ {
3188
+ message: _vm.t('survey_creator.question.inputLeastOneTip'),
3189
+ validator: _vm.validatedInput,
3190
+ } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1):_c('div',{staticClass:"choice-row exclusive-choice"},[_c('FormItem',{attrs:{"label-width":60,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
3191
+ required: true,
3192
+ message: _vm.t('survey_creator.question.optionalRequiredTip'),
3193
+ }}},[_c('div',{staticClass:"question-choice"},[_c('div',{staticClass:"choice"},[_c('Input',{model:{value:(option.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(option.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"option.text[primaryLanguage]"}})],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],attrs:{"prop":'choices.' + index + '.options.score',"label-width":60,"rules":[
3194
+ {
3195
+ required: _vm.editQuestion.options.scoringEnabled,
3196
+ message: _vm.t('survey_creator.question.scoreRequiredTip'),
3197
+ },
3198
+ {
3199
+ pattern:
3200
+ /^(([1-9][0-9][0-9]|[1-9][0-9]|[0-9])(\.\d{1,2})?|0\.\d{1,2})$/,
3201
+ message: _vm.t('survey_creator.question.scoreErrorTip'),
3202
+ } ]}},[_c('Input',{attrs:{"type":"number"},model:{value:(option.options.score),callback:function ($$v) {_vm.$set(option.options, "score", $$v);},expression:"option.options.score"}})],1)],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_c('Form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],attrs:{"prop":'choices.' + index + '.options.inputEnabled',"label-width":80,"rules":[
3203
+ {
3204
+ message: _vm.t('survey_creator.question.inputLeastOneTip'),
3205
+ validator: _vm.validatedInput,
3206
+ } ]}},[_c('Checkbox',{model:{value:(option.options.inputEnabled),callback:function ($$v) {_vm.$set(option.options, "inputEnabled", $$v);},expression:"option.options.inputEnabled"}})],1)],1)])]),_vm._v(" "),(option.options.inputEnabled)?_c('div',{staticClass:"option-input"},[_c('Input',{attrs:{"disabled":"","placeholder":_vm.t('survey_creator.question.inputEnabledTip')}})],1):_vm._e()],1)])}),0)],1)};
3193
3207
  var __vue_staticRenderFns__$o = [];
3194
3208
 
3195
3209
  /* style */
3196
3210
  const __vue_inject_styles__$o = function (inject) {
3197
3211
  if (!inject) return
3198
- inject("data-v-038d2390_0", { source: ".multi-selection-form .options-container[data-v-038d2390]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid;grid-template-columns:30% 40% 30%}.multi-selection-form .options-container .options-row[data-v-038d2390]{display:flex;flex-direction:row;margin-bottom:16px}.multi-selection-form .options-container .options-row .options[data-v-038d2390]{display:flex;flex-direction:column}.multi-selection-form .options-container .options-row .options .option[data-v-038d2390]{margin-top:24px}.multi-selection-form .options-container .options-row .options .option-expand[data-v-038d2390]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.multi-selection-form .options-container .options-row .options .option-expand .inputing[data-v-038d2390]{width:64px}.multi-selection-form .options-container .before-border[data-v-038d2390]{border-left:1px solid #e8eaec;padding-left:16px}.multi-selection-form .question-options[data-v-038d2390]{padding-bottom:10px;padding-left:80px}.multi-selection-form[data-v-038d2390] .ivu-form-item{width:100%}.multi-selection-form .option-header[data-v-038d2390]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.multi-selection-form .option-header .choice[data-v-038d2390]{width:100%}.multi-selection-form .option-header .scoring[data-v-038d2390]{width:100px;display:flex;justify-content:center}.multi-selection-form .option-header .inputing[data-v-038d2390]{width:145px;min-width:42px;display:flex;justify-content:center}.multi-selection-form .choice-row .question-choice[data-v-038d2390]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.multi-selection-form .choice-row .question-choice .choice[data-v-038d2390]{display:flex;flex-direction:row;width:100%;margin-right:8px}.multi-selection-form .choice-row .question-choice .choice .button[data-v-038d2390]{margin-left:8px}.multi-selection-form .choice-row .question-choice .scoring[data-v-038d2390]{width:85px}.multi-selection-form .choice-row .question-choice .inputing[data-v-038d2390]{width:145px;text-align:center}.multi-selection-form .choice-row .question-choice .inputing .ivu-checkbox-wrapper[data-v-038d2390]{margin-right:0}.multi-selection-form .exclusive-choice[data-v-038d2390]{border-top:1px solid #e8eaec;padding-top:16px}.multi-selection-form .option-input[data-v-038d2390]{margin:0 50px 30px 60px}", map: undefined, media: undefined });
3212
+ inject("data-v-48e641e8_0", { source: ".multi-selection-form .options-container[data-v-48e641e8]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid}.multi-selection-form .options-container .options-row[data-v-48e641e8]{display:flex;flex-direction:row;margin-bottom:16px}.multi-selection-form .options-container .options-row .options[data-v-48e641e8]{display:flex;flex-direction:column}.multi-selection-form .options-container .options-row .options .option[data-v-48e641e8]{margin-top:24px}.multi-selection-form .options-container .options-row .options .option-expand[data-v-48e641e8]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.multi-selection-form .options-container .options-row .options .option-expand .inputing[data-v-48e641e8]{width:64px}.multi-selection-form .options-container .before-border[data-v-48e641e8]{border-left:1px solid #e8eaec;padding-left:16px}.multi-selection-form .question-options[data-v-48e641e8]{padding-bottom:10px;padding-left:80px}.multi-selection-form[data-v-48e641e8] .ivu-form-item{width:100%}.multi-selection-form .option-header[data-v-48e641e8]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.multi-selection-form .option-header .choice[data-v-48e641e8]{width:100%}.multi-selection-form .option-header .scoring[data-v-48e641e8]{width:100px;display:flex;justify-content:center}.multi-selection-form .option-header .inputing[data-v-48e641e8]{width:145px;min-width:42px;display:flex;justify-content:center}.multi-selection-form .choice-row .question-choice[data-v-48e641e8]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.multi-selection-form .choice-row .question-choice .choice[data-v-48e641e8]{display:flex;flex-direction:row;width:100%;margin-right:8px}.multi-selection-form .choice-row .question-choice .choice .button[data-v-48e641e8]{margin-left:8px}.multi-selection-form .choice-row .question-choice .scoring[data-v-48e641e8]{width:85px}.multi-selection-form .choice-row .question-choice .inputing[data-v-48e641e8]{width:145px;text-align:center}.multi-selection-form .choice-row .question-choice .inputing .ivu-checkbox-wrapper[data-v-48e641e8]{margin-right:0}.multi-selection-form .exclusive-choice[data-v-48e641e8]{border-top:1px solid #e8eaec;padding-top:16px}.multi-selection-form .option-input[data-v-48e641e8]{margin:0 50px 30px 60px}", map: undefined, media: undefined });
3199
3213
 
3200
3214
  };
3201
3215
  /* scoped */
3202
- const __vue_scope_id__$o = "data-v-038d2390";
3216
+ const __vue_scope_id__$o = "data-v-48e641e8";
3203
3217
  /* module identifier */
3204
3218
  const __vue_module_identifier__$o = undefined;
3205
3219
  /* functional template */
@@ -3311,15 +3325,15 @@ var script$m = Vue.extend({
3311
3325
  this.editQuestion.options.level = this.editQuestion.choices.length;
3312
3326
  this.editQuestion.options.scoringEnabled = true;
3313
3327
  this.editQuestion.subQuestions ||
3314
- _.set(this.editQuestion, "subQuestions", []);
3328
+ _$1.set(this.editQuestion, "subQuestions", []);
3315
3329
  this.initDefaultItems(this.editQuestion);
3316
3330
  },
3317
3331
  initDefaultItems(question) {
3318
3332
  const primaryLanguage = this.primaryLanguage;
3319
3333
  const t = this.t;
3320
- _.forEach(question.choices, (choice, index) => {
3321
- if (!_.get(choice.text, primaryLanguage)) {
3322
- _.set(choice.text, primaryLanguage, t(`survey_creator.question.matrixLevel${index + 1}`));
3334
+ _$1.forEach(question.choices, (choice, index) => {
3335
+ if (!_$1.get(choice.text, primaryLanguage)) {
3336
+ _$1.set(choice.text, primaryLanguage, t(`survey_creator.question.matrixLevel${index + 1}`));
3323
3337
  }
3324
3338
  if (!choice.options.score) {
3325
3339
  choice.options.score = index + 1;
@@ -3354,7 +3368,7 @@ var script$m = Vue.extend({
3354
3368
  for (let i = 0; i < diffCount; i++) {
3355
3369
  this.editQuestion.choices.push({
3356
3370
  options: { score: this.editQuestion.choices.length + 1 },
3357
- text: _.set({}, primaryLanguage, _.includes(_.range(1, this.defaultLevel + 1), this.editQuestion.choices.length + 1)
3371
+ text: _$1.set({}, primaryLanguage, _$1.includes(_$1.range(1, this.defaultLevel + 1), this.editQuestion.choices.length + 1)
3358
3372
  ? t(`survey_creator.question.matrixLevel${this.editQuestion.choices.length + 1}`)
3359
3373
  : ""),
3360
3374
  id: ChoiceModel.createChoiceId(),
@@ -3482,7 +3496,7 @@ var script$l = Vue.extend({
3482
3496
  },
3483
3497
  methods: {
3484
3498
  initData() {
3485
- this.scoreRange = _.get(this.$rootComponent, "surveyExtendOptions.scoreRange", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
3499
+ this.scoreRange = _$1.get(this.$rootComponent, "surveyExtendOptions.scoreRange", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
3486
3500
  this.editQuestion.options.extremeValueLabelEnabled ||
3487
3501
  Vue.set(this.editQuestion.options, "extremeValueLabelEnabled", false);
3488
3502
  this.editQuestion.options.extremeValueLabel ||
@@ -3490,12 +3504,12 @@ var script$l = Vue.extend({
3490
3504
  this.editQuestion.options.minRange ||
3491
3505
  Vue.set(this.editQuestion.options, "minRange", 1);
3492
3506
  this.editQuestion.options.maxRange ||
3493
- Vue.set(this.editQuestion.options, "maxRange", _.last(this.scoreRange));
3507
+ Vue.set(this.editQuestion.options, "maxRange", _$1.last(this.scoreRange));
3494
3508
  this.editQuestion.options.decimalPlaces ||
3495
3509
  Vue.set(this.editQuestion.options, "decimalPlaces", 0);
3496
3510
  Vue.set(this.editQuestion.options, "scoringEnabled", true);
3497
3511
  this.editQuestion.subQuestions ||
3498
- _.set(this.editQuestion, "subQuestions", []);
3512
+ _$1.set(this.editQuestion, "subQuestions", []);
3499
3513
  },
3500
3514
  addItem() {
3501
3515
  if (!this.showAddBtn) {
@@ -3523,14 +3537,14 @@ var script$l = Vue.extend({
3523
3537
  watch: {
3524
3538
  "editQuestion.options.maxRange": function () {
3525
3539
  if ((!this.editQuestion.subQuestions ||
3526
- _.isEmpty(this.editQuestion.subQuestions)) &&
3540
+ _$1.isEmpty(this.editQuestion.subQuestions)) &&
3527
3541
  this.editQuestion.options.sliderValue >
3528
3542
  this.editQuestion.options.maxRange) {
3529
3543
  this.editQuestion.options.sliderValue =
3530
3544
  this.editQuestion.options.maxRange;
3531
3545
  }
3532
3546
  else {
3533
- _.forEach(this.editQuestion.subQuestions, (q) => {
3547
+ _$1.forEach(this.editQuestion.subQuestions, (q) => {
3534
3548
  if (q.sliderValue > this.editQuestion.options.maxRange) {
3535
3549
  q.sliderValue = this.editQuestion.options.maxRange;
3536
3550
  }
@@ -3539,7 +3553,7 @@ var script$l = Vue.extend({
3539
3553
  },
3540
3554
  "editQuestion.options.minRange": function () {
3541
3555
  if ((!this.editQuestion.subQuestions ||
3542
- _.isEmpty(this.editQuestion.subQuestions)) &&
3556
+ _$1.isEmpty(this.editQuestion.subQuestions)) &&
3543
3557
  (!this.editQuestion.options.sliderValue ||
3544
3558
  this.editQuestion.options.sliderValue <
3545
3559
  this.editQuestion.options.minRange)) {
@@ -3547,7 +3561,7 @@ var script$l = Vue.extend({
3547
3561
  this.editQuestion.options.minRange;
3548
3562
  }
3549
3563
  else {
3550
- _.forEach(this.editQuestion.subQuestions, (q) => {
3564
+ _$1.forEach(this.editQuestion.subQuestions, (q) => {
3551
3565
  if (!q.sliderValue ||
3552
3566
  q.sliderValue < this.editQuestion.options.minRange) {
3553
3567
  q.sliderValue = this.editQuestion.options.minRange;
@@ -3584,11 +3598,11 @@ var __vue_staticRenderFns__$l = [];
3584
3598
  /* style */
3585
3599
  const __vue_inject_styles__$l = function (inject) {
3586
3600
  if (!inject) return
3587
- inject("data-v-c53972aa_0", { source: "[data-v-c53972aa] .ivu-form-item{width:100%}.btn-container[data-v-c53972aa]{padding-left:8px}.btn-container .icon[data-v-c53972aa]{display:flex;float:left;font-size:18px}.btn-container .label[data-v-c53972aa]{display:flex;float:left;align-items:center;font-weight:500;font-size:14px;line-height:22px}.btn-container .disabled[data-v-c53972aa]{color:#c5c8ce}.btn-container .enabled[data-v-c53972aa]{color:#1890ff;cursor:pointer}", map: undefined, media: undefined });
3601
+ inject("data-v-1e460755_0", { source: "[data-v-1e460755] .ivu-form-item{width:100%}.btn-container[data-v-1e460755]{padding-left:8px}.btn-container .icon[data-v-1e460755]{display:flex;float:left;font-size:18px}.btn-container .label[data-v-1e460755]{display:flex;float:left;align-items:center;font-weight:500;font-size:14px;line-height:22px}.btn-container .disabled[data-v-1e460755]{color:#c5c8ce}.btn-container .enabled[data-v-1e460755]{color:#1890ff;cursor:pointer}", map: undefined, media: undefined });
3588
3602
 
3589
3603
  };
3590
3604
  /* scoped */
3591
- const __vue_scope_id__$l = "data-v-c53972aa";
3605
+ const __vue_scope_id__$l = "data-v-1e460755";
3592
3606
  /* module identifier */
3593
3607
  const __vue_module_identifier__$l = undefined;
3594
3608
  /* functional template */
@@ -3699,32 +3713,32 @@ var script$j = Vue.extend({
3699
3713
  initDefaultChoices() {
3700
3714
  const self = this;
3701
3715
  let primaryLanguage = this.$rootComponent.primaryLanguage;
3702
- _.forEach(this.evaluationItems, (item, index) => {
3716
+ _$1.forEach(this.evaluationItems, (item, index) => {
3703
3717
  let i18nText = self.t(`survey_creator.question.evaluation.level.${index + 1}`);
3704
- if (!_.get(item.text, primaryLanguage) &&
3718
+ if (!_$1.get(item.text, primaryLanguage) &&
3705
3719
  !i18nText.startsWith("survey_creator.question.evaluation.level")) {
3706
- _.set(item.text, primaryLanguage, i18nText);
3720
+ _$1.set(item.text, primaryLanguage, i18nText);
3707
3721
  }
3708
- if (!_.get(item, "level")) {
3709
- _.set(item, "level", 1);
3722
+ if (!_$1.get(item, "level")) {
3723
+ _$1.set(item, "level", 1);
3710
3724
  }
3711
3725
  });
3712
3726
  this.calculationItemLevelRange();
3713
3727
  },
3714
3728
  calculationItemLevelRange() {
3715
- let levels = _.chain(this.evaluationItems)
3729
+ let levels = _$1.chain(this.evaluationItems)
3716
3730
  .map((item) => parseInt(item.level))
3717
3731
  .filter((level) => !isNaN(level))
3718
3732
  .uniq()
3719
3733
  .sortBy()
3720
3734
  .value();
3721
- _.forEach(this.evaluationItems, (item, index) => {
3722
- let currentLevelIndex = _.indexOf(levels, _.get(item, "level"));
3735
+ _$1.forEach(this.evaluationItems, (item, index) => {
3736
+ let currentLevelIndex = _$1.indexOf(levels, _$1.get(item, "level"));
3723
3737
  if (levels.length == currentLevelIndex + 1) {
3724
- _.set(item, "range", { max: null, min: levels[currentLevelIndex] });
3738
+ _$1.set(item, "range", { max: null, min: levels[currentLevelIndex] });
3725
3739
  }
3726
3740
  else {
3727
- _.set(item, "range", {
3741
+ _$1.set(item, "range", {
3728
3742
  max: levels[currentLevelIndex + 1] - 1,
3729
3743
  min: levels[currentLevelIndex],
3730
3744
  });
@@ -3867,17 +3881,17 @@ var ExprMixin = Vue.extend({
3867
3881
  buildChoices(scope) {
3868
3882
  const choices = new Array();
3869
3883
  const questions = this.$rootComponent.currentSurvey.questions;
3870
- _.forEach(questions, (question) => {
3871
- if (_.includes(scope, question.id) ||
3872
- !_.isEmpty(_.intersection(scope, _.map(_.get(question, "subQuestions", []), "id")))) {
3873
- _.forEach(question.choices, (choice) => {
3874
- if (!_.isNil(choice.text[this.primaryLanguage])) {
3884
+ _$1.forEach(questions, (question) => {
3885
+ if (_$1.includes(scope, question.id) ||
3886
+ !_$1.isEmpty(_$1.intersection(scope, _$1.map(_$1.get(question, "subQuestions", []), "id")))) {
3887
+ _$1.forEach(question.choices, (choice) => {
3888
+ if (!_$1.isNil(choice.text[this.primaryLanguage])) {
3875
3889
  choices.push(choice.text[this.primaryLanguage]);
3876
3890
  }
3877
3891
  });
3878
3892
  }
3879
3893
  });
3880
- return _.uniq(choices);
3894
+ return _$1.uniq(choices);
3881
3895
  },
3882
3896
  generateExpr() {
3883
3897
  return "";
@@ -3902,7 +3916,7 @@ var script$i = Vue.extend({
3902
3916
  },
3903
3917
  computed: {
3904
3918
  questions() {
3905
- return _.clone(this.$rootComponent.currentSurvey.questions);
3919
+ return _$1.clone(this.$rootComponent.currentSurvey.questions);
3906
3920
  },
3907
3921
  },
3908
3922
  filters: {
@@ -3919,11 +3933,11 @@ var script$i = Vue.extend({
3919
3933
  },
3920
3934
  numbers(num) {
3921
3935
  let numbers = new ExprEvaluationQuestion(this.questions, this.scope).calculateNumbers();
3922
- return _.join(_.map(numbers, (number) => {
3923
- if (_.isArray(_.head(number))) {
3924
- return _.join(_.map(number, (e) => _.join(e, "-")), ",");
3936
+ return _$1.join(_$1.map(numbers, (number) => {
3937
+ if (_$1.isArray(_$1.head(number))) {
3938
+ return _$1.join(_$1.map(number, (e) => _$1.join(e, "-")), ",");
3925
3939
  }
3926
- return _.join(number, "-");
3940
+ return _$1.join(number, "-");
3927
3941
  }), ",");
3928
3942
  },
3929
3943
  getSingleOptionContent(question) {
@@ -3993,14 +4007,14 @@ var script$h = Vue.extend({
3993
4007
  QuestionSelect,
3994
4008
  },
3995
4009
  created() {
3996
- this.value.operator = _.unescape(this.value.operator);
4010
+ this.value.operator = _$1.unescape(this.value.operator);
3997
4011
  },
3998
4012
  methods: {
3999
4013
  generateExpr() {
4000
- let ids = `${_.map(this.value.scope, (e) => {
4014
+ let ids = `${_$1.map(this.value.scope, (e) => {
4001
4015
  return `"` + e + `"`;
4002
4016
  })}`;
4003
- let answers = `${_.map(this.value.values, (e) => {
4017
+ let answers = `${_$1.map(this.value.values, (e) => {
4004
4018
  return `"` + e + `"`;
4005
4019
  })}`;
4006
4020
  return `$count($[id in [${ids}]][answer in [${answers}]]) ${this.value.operator} ${this.value.size}`;
@@ -4082,13 +4096,13 @@ var script$g = Vue.extend({
4082
4096
  },
4083
4097
  methods: {
4084
4098
  generateExpr() {
4085
- let ids = `${_.map(this.value.scope, (e) => {
4099
+ let ids = `${_$1.map(this.value.scope, (e) => {
4086
4100
  return `"` + e + `"`;
4087
4101
  })}`;
4088
- let answers = `${_.map(this.value.values, (e) => {
4102
+ let answers = `${_$1.map(this.value.values, (e) => {
4089
4103
  return `"` + e + `"`;
4090
4104
  })}`;
4091
- return `$count($[id in [${ids}]][answer in [${answers}]]) = ${_.size(this.value.scope)}`;
4105
+ return `$count($[id in [${ids}]][answer in [${answers}]]) = ${_$1.size(this.value.scope)}`;
4092
4106
  },
4093
4107
  },
4094
4108
  });
@@ -4165,8 +4179,8 @@ var script$f = Vue.extend({
4165
4179
  };
4166
4180
  },
4167
4181
  created() {
4168
- this.value.leftOperator = _.unescape(this.value.leftOperator);
4169
- this.value.rightOperator = _.unescape(this.value.rightOperator);
4182
+ this.value.leftOperator = _$1.unescape(this.value.leftOperator);
4183
+ this.value.rightOperator = _$1.unescape(this.value.rightOperator);
4170
4184
  this.createInitScoresOption();
4171
4185
  },
4172
4186
  computed: {
@@ -4174,23 +4188,23 @@ var script$f = Vue.extend({
4174
4188
  return this.$rootComponent.currentSurvey.statistics.maxScore;
4175
4189
  },
4176
4190
  otherConditions() {
4177
- let otherEvaluationItems = _.filter(_.map(this.evaluationItems, (item, index) => {
4178
- return _.extend({}, item, { index: index });
4191
+ let otherEvaluationItems = _$1.filter(_$1.map(this.evaluationItems, (item, index) => {
4192
+ return _$1.extend({}, item, { index: index });
4179
4193
  }), (item) => item.index != this.itemIndex);
4180
- const conditions = _.flatMap(otherEvaluationItems, (item) => _.get(item, "conditions", []));
4181
- return _.filter(conditions, (item) => _.get(item, "type") == "SCORE");
4194
+ const conditions = _$1.flatMap(otherEvaluationItems, (item) => _$1.get(item, "conditions", []));
4195
+ return _$1.filter(conditions, (item) => _$1.get(item, "type") == "SCORE");
4182
4196
  },
4183
4197
  },
4184
4198
  methods: {
4185
4199
  createInitScoresOption() {
4186
- let otherRange = _.map(this.otherConditions, (item) => {
4200
+ let otherRange = _$1.map(this.otherConditions, (item) => {
4187
4201
  return {
4188
- min: _.get(item, "payload.minScore", 0),
4189
- max: _.get(item, "payload.maxScore", 0),
4202
+ min: _$1.get(item, "payload.minScore", 0),
4203
+ max: _$1.get(item, "payload.maxScore", 0),
4190
4204
  };
4191
4205
  });
4192
- this.leftScores = _.map(_.range(1, this.totalScore + 1, 1), function (num) {
4193
- let disabled = _.some(otherRange, function (o) {
4206
+ this.leftScores = _$1.map(_$1.range(1, this.totalScore + 1, 1), function (num) {
4207
+ let disabled = _$1.some(otherRange, function (o) {
4194
4208
  return num >= o.min && num <= o.max;
4195
4209
  });
4196
4210
  return {
@@ -4199,8 +4213,8 @@ var script$f = Vue.extend({
4199
4213
  disabled: disabled,
4200
4214
  };
4201
4215
  });
4202
- this.rightScores = _.map(_.range(1, this.totalScore + 1, 1), function (num) {
4203
- let disabled = _.some(otherRange, function (o) {
4216
+ this.rightScores = _$1.map(_$1.range(1, this.totalScore + 1, 1), function (num) {
4217
+ let disabled = _$1.some(otherRange, function (o) {
4204
4218
  return num >= o.min && num <= o.max;
4205
4219
  });
4206
4220
  return {
@@ -4211,16 +4225,16 @@ var script$f = Vue.extend({
4211
4225
  });
4212
4226
  },
4213
4227
  resetScoreOptions(options) {
4214
- let otherRange = _.map(this.otherConditions, (item) => {
4228
+ let otherRange = _$1.map(this.otherConditions, (item) => {
4215
4229
  return {
4216
- min: _.get(item, "payload.minScore", 0),
4217
- max: _.get(item, "payload.maxScore", 0),
4230
+ min: _$1.get(item, "payload.minScore", 0),
4231
+ max: _$1.get(item, "payload.maxScore", 0),
4218
4232
  };
4219
4233
  });
4220
4234
  let currentMinScore = this.value.minScore == null ? 0 : this.value.minScore;
4221
4235
  let currentMaxScore = this.value.maxScore == null ? this.totalScore : this.value.maxScore;
4222
- _.forEach(options, function (o) {
4223
- o.disabled = _.some(otherRange, function (or) {
4236
+ _$1.forEach(options, function (o) {
4237
+ o.disabled = _$1.some(otherRange, function (or) {
4224
4238
  let condition_a = o.value >= or.min && o.value <= or.max;
4225
4239
  let condition_b = o.value >= currentMinScore && o.value <= currentMaxScore;
4226
4240
  return condition_a && condition_b;
@@ -4419,18 +4433,18 @@ var script$d = Vue.extend({
4419
4433
  return this.$rootComponent.currentSurvey.statistics.maxScore;
4420
4434
  },
4421
4435
  deletable() {
4422
- return (_.size(_.filter(this.evaluationItems, (item) => item.type == "IF")) > 1);
4436
+ return (_$1.size(_$1.filter(this.evaluationItems, (item) => item.type == "IF")) > 1);
4423
4437
  },
4424
4438
  disableAddConditionBtn() {
4425
4439
  let conditions = this.evaluationItems[this.position].conditions;
4426
- let scoreConditions = _.size(_.filter(conditions, (item) => item.type == "SCORE"));
4440
+ let scoreConditions = _$1.size(_$1.filter(conditions, (item) => item.type == "SCORE"));
4427
4441
  return (this.exprConditionType == "SCORE" && scoreConditions > 0);
4428
4442
  },
4429
4443
  },
4430
4444
  methods: {
4431
4445
  onAdd() {
4432
4446
  this.evaluationItems.splice(this.position + 1, 0, {
4433
- id: `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`,
4447
+ id: `Evaluation-Item-${_$1.now()}-${_$1.random(0, 9999999)}`,
4434
4448
  type: "IF",
4435
4449
  text: {
4436
4450
  "zh-CN": "",
@@ -4469,7 +4483,7 @@ var script$d = Vue.extend({
4469
4483
  this.evaluationItems[this.position].conditions.splice(index, 1);
4470
4484
  },
4471
4485
  expr(index, value) {
4472
- _.set(this.evaluationItems[this.position].conditions[index], "expr", value);
4486
+ _$1.set(this.evaluationItems[this.position].conditions[index], "expr", value);
4473
4487
  },
4474
4488
  },
4475
4489
  });
@@ -4685,10 +4699,10 @@ var script$a = Vue.extend({
4685
4699
  },
4686
4700
  onChange(value) {
4687
4701
  if (value == "EXPR") {
4688
- _.forEach(this.editQuestion.evaluationItems, (item, index) => {
4689
- _.set(item, "type", "IF");
4702
+ _$1.forEach(this.editQuestion.evaluationItems, (item, index) => {
4703
+ _$1.set(item, "type", "IF");
4690
4704
  });
4691
- _.set(this.editQuestion.evaluationItems[_.size(this.editQuestion.evaluationItems) - 1], "type", "ELSE");
4705
+ _$1.set(this.editQuestion.evaluationItems[_$1.size(this.editQuestion.evaluationItems) - 1], "type", "ELSE");
4692
4706
  }
4693
4707
  },
4694
4708
  },
@@ -4803,7 +4817,7 @@ var script$9 = Vue.extend({
4803
4817
  return this.operationType == QUESTION_OPERATION_TYPE_COPY$1;
4804
4818
  },
4805
4819
  questionType() {
4806
- return _.get(this.question, "type");
4820
+ return _$1.get(this.question, "type");
4807
4821
  },
4808
4822
  },
4809
4823
  methods: {
@@ -4877,7 +4891,7 @@ var script$8 = Vue.extend({
4877
4891
  return this.value;
4878
4892
  },
4879
4893
  camelLanguages() {
4880
- return _.map(this.languages, (language) => _.camelCase(language));
4894
+ return _$1.map(this.languages, (language) => _$1.camelCase(language));
4881
4895
  },
4882
4896
  columns() {
4883
4897
  let columns = [
@@ -4887,11 +4901,11 @@ var script$8 = Vue.extend({
4887
4901
  tree: true,
4888
4902
  },
4889
4903
  {
4890
- title: this.t(`survey_creator.translator.table.header_${_.camelCase(this.primaryLanguage)}`) + this.t("survey_creator.translator.table.header_primary_name"),
4904
+ title: this.t(`survey_creator.translator.table.header_${_$1.camelCase(this.primaryLanguage)}`) + this.t("survey_creator.translator.table.header_primary_name"),
4891
4905
  slot: "primaryLanguage",
4892
4906
  },
4893
4907
  ];
4894
- _.forEach(_.map(this.languages, (language) => _.camelCase(language)), (language) => {
4908
+ _$1.forEach(_$1.map(this.languages, (language) => _$1.camelCase(language)), (language) => {
4895
4909
  columns.push({
4896
4910
  title: this.t(`survey_creator.translator.table.header_${language}`),
4897
4911
  slot: language,
@@ -4902,7 +4916,7 @@ var script$8 = Vue.extend({
4902
4916
  },
4903
4917
  methods: {
4904
4918
  onChange(row) {
4905
- _.merge(this.buildDataMap(this.data)[row.tempId], row);
4919
+ _$1.merge(this.buildDataMap(this.data)[row.tempId], row);
4906
4920
  },
4907
4921
  },
4908
4922
  });
@@ -4986,20 +5000,20 @@ var script$7 = Vue.extend({
4986
5000
  },
4987
5001
  methods: {
4988
5002
  buildData() {
4989
- let oldSurvey = _.cloneDeep(this.survey);
4990
- _.forEach(oldSurvey.questions, (question) => {
5003
+ let oldSurvey = _$1.cloneDeep(this.survey);
5004
+ _$1.forEach(oldSurvey.questions, (question) => {
4991
5005
  let item = question.header;
4992
5006
  item["tempId"] = this.buildQuestionId(question);
4993
5007
  item["type"] = question.type;
4994
5008
  item["children"] = [];
4995
5009
  item["_showChildren"] = true;
4996
- _.forEach(question.choices, (choice) => {
5010
+ _$1.forEach(question.choices, (choice) => {
4997
5011
  item.children.push(choice);
4998
5012
  choice["tempId"] = this.buildChoiceId(question, choice);
4999
5013
  item.children["type"] = "";
5000
5014
  });
5001
5015
  if (question.subQuestions) {
5002
- _.forEach(question.subQuestions, (subQuestion) => {
5016
+ _$1.forEach(question.subQuestions, (subQuestion) => {
5003
5017
  subQuestion["type"] = this.SUB_QUESTION_TYPE;
5004
5018
  subQuestion["tempId"] = this.buildSubQuestionId(question, subQuestion);
5005
5019
  item.children.push(subQuestion);
@@ -5010,13 +5024,13 @@ var script$7 = Vue.extend({
5010
5024
  },
5011
5025
  merge(newData) {
5012
5026
  let map = this.buildDataMap(newData);
5013
- _.forEach(this.survey.questions, (question) => {
5027
+ _$1.forEach(this.survey.questions, (question) => {
5014
5028
  question.header.text = map[this.buildQuestionId(question)].text;
5015
- _.forEach(question.choices, (choice) => {
5029
+ _$1.forEach(question.choices, (choice) => {
5016
5030
  choice.text = map[this.buildChoiceId(question, choice)].text;
5017
5031
  });
5018
5032
  if (question.subQuestions) {
5019
- _.forEach(question.subQuestions, (subQuestion) => {
5033
+ _$1.forEach(question.subQuestions, (subQuestion) => {
5020
5034
  subQuestion.text =
5021
5035
  map[this.buildSubQuestionId(question, subQuestion)].text;
5022
5036
  });
@@ -5109,8 +5123,8 @@ var script$6 = Vue.extend({
5109
5123
  };
5110
5124
  },
5111
5125
  created() {
5112
- this.enabledSelectQuestion = _.get(this.$rootComponent, "options.enabledSelectQuestion", false);
5113
- this.enabledQuestionTitleIncompleteTips = _.get(this.$rootComponent, "options.enabledQuestionTitleIncompleteTips", false);
5126
+ this.enabledSelectQuestion = _$1.get(this.$rootComponent, "options.enabledSelectQuestion", false);
5127
+ this.enabledQuestionTitleIncompleteTips = _$1.get(this.$rootComponent, "options.enabledQuestionTitleIncompleteTips", false);
5114
5128
  },
5115
5129
  computed: {
5116
5130
  getClassStyle() {
@@ -5121,11 +5135,11 @@ var script$6 = Vue.extend({
5121
5135
  return true;
5122
5136
  }
5123
5137
  let filledTitle = this.currentCustomQuestion?.filledTitle;
5124
- if (_.isEmpty(filledTitle)) {
5138
+ if (_$1.isEmpty(filledTitle)) {
5125
5139
  return true;
5126
5140
  }
5127
5141
  else {
5128
- return _.every(filledTitle, (t) => t.title !== "");
5142
+ return _$1.every(filledTitle, (t) => t.title !== "");
5129
5143
  }
5130
5144
  },
5131
5145
  },
@@ -5219,7 +5233,7 @@ var script$5 = Vue.extend({
5219
5233
  },
5220
5234
  methods: {
5221
5235
  surveyCustomQuestion(questionId) {
5222
- return _.find(this.surveyCustomQuestions, (q) => q.id === questionId);
5236
+ return _$1.find(this.surveyCustomQuestions, (q) => q.id === questionId);
5223
5237
  },
5224
5238
  setDisabled(item, disabled) {
5225
5239
  this.$set(item.options, "readonly", disabled);
@@ -5298,7 +5312,7 @@ var script$5 = Vue.extend({
5298
5312
  },
5299
5313
  unSelectQuestionHandler(selected, question) {
5300
5314
  this.$refs[`question${question.id}`][0].selectQuestion(selected);
5301
- _.remove(this.selectedQuestions, (q) => q.id === question.id);
5315
+ _$1.remove(this.selectedQuestions, (q) => q.id === question.id);
5302
5316
  this.sortQuestions.forEach((item) => {
5303
5317
  if (Array.isArray(item.jumps) && item.jumps.length > 0) {
5304
5318
  const jumpItem = item.jumps.find((i) => i.toQuestionId === question.id);
@@ -5451,7 +5465,7 @@ var script$3 = Vue.extend({
5451
5465
  },
5452
5466
  computed: {
5453
5467
  choices() {
5454
- return _.map(this.editQuestion.choices, (q) => {
5468
+ return _$1.map(this.editQuestion.choices, (q) => {
5455
5469
  return {
5456
5470
  value: q.id,
5457
5471
  label: q.text[this.$rootComponent.primaryLanguage],
@@ -5459,19 +5473,19 @@ var script$3 = Vue.extend({
5459
5473
  });
5460
5474
  },
5461
5475
  questionChoicesIds() {
5462
- return _.map(this.editQuestion.choices, (choice) => choice.id);
5476
+ return _$1.map(this.editQuestion.choices, (choice) => choice.id);
5463
5477
  },
5464
5478
  hasSettingChoicesIds() {
5465
- return _.map(this.editQuestion.jumps, (jump) => jump.choiceId);
5479
+ return _$1.map(this.editQuestion.jumps, (jump) => jump.choiceId);
5466
5480
  },
5467
5481
  showAddBtn() {
5468
- return !_.isEmpty(_.filter(this.questionChoicesIds, (choiceId) => !_.includes(this.hasSettingChoicesIds, choiceId)));
5482
+ return !_$1.isEmpty(_$1.filter(this.questionChoicesIds, (choiceId) => !_$1.includes(this.hasSettingChoicesIds, choiceId)));
5469
5483
  },
5470
5484
  showDeleteBtn() {
5471
- return _.size(this.editQuestion.jumps) > 1;
5485
+ return _$1.size(this.editQuestion.jumps) > 1;
5472
5486
  },
5473
5487
  firstEnabledChoiceId() {
5474
- return _.find(this.choices, (choice) => !_.includes(this.hasSettingChoicesIds, choice.value)).value;
5488
+ return _$1.find(this.choices, (choice) => !_$1.includes(this.hasSettingChoicesIds, choice.value)).value;
5475
5489
  },
5476
5490
  },
5477
5491
  methods: {
@@ -5485,7 +5499,7 @@ var script$3 = Vue.extend({
5485
5499
  });
5486
5500
  },
5487
5501
  disabledChoice(item) {
5488
- return _.includes(this.hasSettingChoicesIds, item.value);
5502
+ return _$1.includes(this.hasSettingChoicesIds, item.value);
5489
5503
  },
5490
5504
  deleteJumpItem(index) {
5491
5505
  this.editQuestion.jumps.splice(index, 1);
@@ -5600,8 +5614,8 @@ var script$2 = Vue.extend({
5600
5614
  };
5601
5615
  },
5602
5616
  created() {
5603
- let question = _.cloneDeep(this.fromQuestion);
5604
- if (_.size(_.get(question, "jumps", [])) === 0) {
5617
+ let question = _$1.cloneDeep(this.fromQuestion);
5618
+ if (_$1.size(_$1.get(question, "jumps", [])) === 0) {
5605
5619
  question.jumps = [];
5606
5620
  }
5607
5621
  this.selectedQuestion = question;
@@ -5758,18 +5772,18 @@ var script$1 = Vue.extend({
5758
5772
  };
5759
5773
  },
5760
5774
  created() {
5761
- this.originSurvey = _.cloneDeep(this.survey);
5762
- this.currentSurvey = _.cloneDeep(this.survey);
5763
- _.forEach(this.currentSurvey.questions, question => {
5775
+ this.originSurvey = _$1.cloneDeep(this.survey);
5776
+ this.currentSurvey = _$1.cloneDeep(this.survey);
5777
+ _$1.forEach(this.currentSurvey.questions, question => {
5764
5778
  this.$set(question, "active", false);
5765
5779
  });
5766
5780
  if (this.currentSurvey.questions.length > 0) {
5767
5781
  this.currentSurvey.questions[0].active = true;
5768
5782
  }
5769
- this.primaryLanguage = _.camelCase(this.currentSurvey.options.primaryLanguage);
5783
+ this.primaryLanguage = _$1.camelCase(this.currentSurvey.options.primaryLanguage);
5770
5784
  if (this.showQuestionWhenPageLoad) {
5771
- const question = _.find(this.currentSurvey?.questions, questions => { return questions.type === this.showQuestionType; });
5772
- if (_.isUndefined(question)) {
5785
+ const question = _$1.find(this.currentSurvey?.questions, questions => { return questions.type === this.showQuestionType; });
5786
+ if (_$1.isUndefined(question)) {
5773
5787
  this.createQuestion(this.showQuestionType);
5774
5788
  }
5775
5789
  else {
@@ -5793,7 +5807,7 @@ var script$1 = Vue.extend({
5793
5807
  },
5794
5808
  watch: {
5795
5809
  survey(val) {
5796
- this.originSurvey = _.cloneDeep(val);
5810
+ this.originSurvey = _$1.cloneDeep(val);
5797
5811
  }
5798
5812
  },
5799
5813
  methods: {
@@ -5827,8 +5841,8 @@ var script$1 = Vue.extend({
5827
5841
  }
5828
5842
  },
5829
5843
  getPureSurvey(survey) {
5830
- let temp = _.cloneDeep(survey);
5831
- _.forEach(temp.questions, question => {
5844
+ let temp = _$1.cloneDeep(survey);
5845
+ _$1.forEach(temp.questions, question => {
5832
5846
  this.$delete(question, "active");
5833
5847
  });
5834
5848
  return temp;
@@ -5856,10 +5870,10 @@ var script$1 = Vue.extend({
5856
5870
  },
5857
5871
  onLayoutChange(layout) {
5858
5872
  this.currentSurvey.options.layout = layout;
5859
- _.forEach(this.currentSurvey.questions, question => (question.options.layout = layout));
5873
+ _$1.forEach(this.currentSurvey.questions, question => (question.options.layout = layout));
5860
5874
  },
5861
5875
  onQuestionCopy(id) {
5862
- let fromIndex = _.findIndex(this.currentSurvey.questions, { id: id });
5876
+ let fromIndex = _$1.findIndex(this.currentSurvey.questions, { id: id });
5863
5877
  if (fromIndex == -1) {
5864
5878
  return;
5865
5879
  }
@@ -5870,7 +5884,7 @@ var script$1 = Vue.extend({
5870
5884
  this.showQuestionEditDrawer(copiedQuestion);
5871
5885
  },
5872
5886
  onQuestionCreateOrUpdate(newQuestion, operationType) {
5873
- let existQuestionIndex = _.findIndex(this.currentSurvey.questions, {
5887
+ let existQuestionIndex = _$1.findIndex(this.currentSurvey.questions, {
5874
5888
  id: newQuestion.id
5875
5889
  });
5876
5890
  if (existQuestionIndex > -1) {
@@ -5892,36 +5906,36 @@ var script$1 = Vue.extend({
5892
5906
  }
5893
5907
  },
5894
5908
  onQuestionDelete(id) {
5895
- _.forEach(this.currentSurvey.questions, (question, index) => {
5896
- let tempQuestion = _.cloneDeep(question);
5897
- _.remove(tempQuestion.jumps, (jump) => jump.toQuestionId === id);
5909
+ _$1.forEach(this.currentSurvey.questions, (question, index) => {
5910
+ let tempQuestion = _$1.cloneDeep(question);
5911
+ _$1.remove(tempQuestion.jumps, (jump) => jump.toQuestionId === id);
5898
5912
  Vue.set(this.currentSurvey.questions, index, tempQuestion);
5899
5913
  });
5900
- _.remove(this.currentSurvey.questions, function (question) {
5914
+ _$1.remove(this.currentSurvey.questions, function (question) {
5901
5915
  return question.id === id;
5902
5916
  });
5903
- this.currentSurvey.questions = _.clone(this.currentSurvey.questions);
5917
+ this.currentSurvey.questions = _$1.clone(this.currentSurvey.questions);
5904
5918
  BaseQuestionModel.refreshSurvey(this.currentSurvey);
5905
5919
  },
5906
5920
  onQuestionEdit(id) {
5907
- let question = _.cloneDeep(_.find(this.currentSurvey.questions, {
5921
+ let question = _$1.cloneDeep(_$1.find(this.currentSurvey.questions, {
5908
5922
  id: id
5909
5923
  }));
5910
5924
  this.operationType = QUESTION_OPERATION_TYPE_UPDATE;
5911
5925
  this.showQuestionEditDrawer(question);
5912
5926
  },
5913
5927
  onQuestionJump(id) {
5914
- let question = _.cloneDeep(_.find(this.currentSurvey.questions, {
5928
+ let question = _$1.cloneDeep(_$1.find(this.currentSurvey.questions, {
5915
5929
  id: id
5916
5930
  }));
5917
5931
  this.operationType = QUESTION_OPERATION_TYPE_UPDATE;
5918
- let toQuestions = _.cloneDeep(_.filter(this.currentSurvey.questions, (item) => item.id != id
5932
+ let toQuestions = _$1.cloneDeep(_$1.filter(this.currentSurvey.questions, (item) => item.id != id
5919
5933
  && !("TEXT_TITLE" === item.type)
5920
5934
  && !("EVALUATION" === item.type)));
5921
5935
  this.showQuestionJumpDrawer(question, toQuestions);
5922
5936
  },
5923
5937
  createQuestionFrom(survey, fromQuestion) {
5924
- let newQuestion = _.cloneDeep(fromQuestion);
5938
+ let newQuestion = _$1.cloneDeep(fromQuestion);
5925
5939
  newQuestion.id = BaseQuestionModel.createQuestionId();
5926
5940
  if (fromQuestion.type === "MATRIX") {
5927
5941
  const subPrefix = SubQuestionModel.createSubPrefixId();
@@ -6024,7 +6038,7 @@ var script = Vue.extend({
6024
6038
  this.$emit("on-back");
6025
6039
  },
6026
6040
  onChangeLanguage(language) {
6027
- this.currentSurvey = _.cloneDeep(this.survey);
6041
+ this.currentSurvey = _$1.cloneDeep(this.survey);
6028
6042
  Vue.$surveyLanguage = language;
6029
6043
  this.currentLanguage = language;
6030
6044
  },
@@ -6032,18 +6046,18 @@ var script = Vue.extend({
6032
6046
  this.$emit("selected-question-ids", questionIds);
6033
6047
  },
6034
6048
  prepareSurveyCustomQuestions() {
6035
- if (_.isEmpty(this.currentSurveyCustom)) {
6049
+ if (_$1.isEmpty(this.currentSurveyCustom)) {
6036
6050
  this.currentSurveyCustom = {
6037
6051
  surveyId: this.survey.id,
6038
6052
  questions: [],
6039
6053
  };
6040
6054
  }
6041
- if (_.isEmpty(this.currentSurveyCustom?.questions)) {
6042
- _.set(this.currentSurveyCustom, "questions", []);
6043
- _.each(this.survey.questions, (q) => {
6055
+ if (_$1.isEmpty(this.currentSurveyCustom?.questions)) {
6056
+ _$1.set(this.currentSurveyCustom, "questions", []);
6057
+ _$1.each(this.survey.questions, (q) => {
6044
6058
  let input_titles = [];
6045
6059
  let formatTitleStr = formatTitle(q, Vue.$surveyLanguage);
6046
- _.each(formatTitleStr, (t, index) => {
6060
+ _$1.each(formatTitleStr, (t, index) => {
6047
6061
  if (CUSTOM_INPUT_REG.test(t)) {
6048
6062
  let title = {
6049
6063
  title: "",