@wg-npm/survey-creator 0.3.24149 → 0.4.129

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';
@@ -347,13 +347,13 @@ class QuestionFactory {
347
347
  return new StarEvaluationItemModel(locale);
348
348
  }
349
349
  static createSelectionQuestionChoices(locale) {
350
- return _.range(4).map(() => this.createDefault(locale));
350
+ return _$1.range(4).map(() => this.createDefault(locale));
351
351
  }
352
352
  static createMatrixQuestionChoices(locale) {
353
- return _.range(5).map(() => this.createDefault(locale));
353
+ return _$1.range(5).map(() => this.createDefault(locale));
354
354
  }
355
355
  static createEvaluationItems(locale) {
356
- return _.range(5).map(() => this.createEvaluationItem(locale));
356
+ return _$1.range(5).map(() => this.createEvaluationItem(locale));
357
357
  }
358
358
  registerQuestion(questionType, questionCreator) {
359
359
  this.creatorHash[questionType] = questionCreator;
@@ -367,7 +367,7 @@ class QuestionFactory {
367
367
  }
368
368
  }
369
369
  const defaultText = function getText(locale) {
370
- return _.set({}, locale, "");
370
+ return _$1.set({}, locale, "");
371
371
  };
372
372
  class ChoiceOptionModel {
373
373
  constructor() {
@@ -384,14 +384,14 @@ class ChoiceModel {
384
384
  this.options = new ChoiceOptionModel();
385
385
  }
386
386
  static createChoiceId() {
387
- return `Choice-${_.now()}-${_.random(0, 9999999)}`;
387
+ return `Choice-${_$1.now()}-${_$1.random(0, 9999999)}`;
388
388
  }
389
389
  }
390
390
  class ExclusiveChoiceModel extends ChoiceModel {
391
391
  constructor(locale) {
392
392
  super(locale);
393
- if (!_.isEmpty(this.options)) {
394
- _.set(this.options, "exclusiveEnabled", true);
393
+ if (!_$1.isEmpty(this.options)) {
394
+ _$1.set(this.options, "exclusiveEnabled", true);
395
395
  }
396
396
  }
397
397
  }
@@ -401,7 +401,7 @@ class EvaluationItemModel {
401
401
  this.text = defaultText(locale);
402
402
  }
403
403
  static createChoiceId() {
404
- return `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`;
404
+ return `Evaluation-Item-${_$1.now()}-${_$1.random(0, 9999999)}`;
405
405
  }
406
406
  }
407
407
  class StarEvaluationItemModel extends EvaluationItemModel {
@@ -424,7 +424,7 @@ class QuestionHeaderModel {
424
424
  }
425
425
  class SubQuestionModel {
426
426
  constructor(locale) {
427
- this.id = `SubQ-${_.now()}-${_.random(0, 9999999)}`;
427
+ this.id = `SubQ-${_$1.now()}-${_$1.random(0, 9999999)}`;
428
428
  this.text = defaultText(locale);
429
429
  this.number = null;
430
430
  }
@@ -438,15 +438,15 @@ class BaseQuestionModel {
438
438
  }
439
439
  static getMaxScore(question) {
440
440
  if (question.type == "SINGLE_SELECTION") {
441
- return _.max(_.map(question.choices, choice => parseFloat(_.get(choice, "options.score", 0) || 0))) || 0;
441
+ return _$1.max(_$1.map(question.choices, choice => parseFloat(_$1.get(choice, "options.score", 0) || 0))) || 0;
442
442
  } else if (question.type == "MULTI_SELECTION") {
443
- return _.sumBy(question.choices, item => parseFloat(_.get(item, "options.score") || 0));
443
+ return _$1.sumBy(question.choices, item => parseFloat(_$1.get(item, "options.score") || 0));
444
444
  } else if (question.type == "MATRIX") {
445
- const score = _.max(_.map(question.choices, choice => parseFloat(_.get(choice, "options.score", 0) || 0))) || 0;
445
+ const score = _$1.max(_$1.map(question.choices, choice => parseFloat(_$1.get(choice, "options.score", 0) || 0))) || 0;
446
446
  return score * question.subQuestions.length;
447
447
  } else if (question.type == "SCORING") {
448
448
  const score = question.options.maxRange;
449
- return score * (_.isEmpty(question.subQuestions) ? 1 : question.subQuestions.length);
449
+ return score * (_$1.isEmpty(question.subQuestions) ? 1 : question.subQuestions.length);
450
450
  }
451
451
  return 0;
452
452
  }
@@ -459,7 +459,7 @@ class BaseQuestionModel {
459
459
  return "";
460
460
  }
461
461
  static createQuestionId() {
462
- return `Q-${_.now()}-${_.random(0, 9999999)}`;
462
+ return `Q-${_$1.now()}-${_$1.random(0, 9999999)}`;
463
463
  }
464
464
  static getNumber(preNumber, question) {
465
465
  return preNumber + 1;
@@ -473,8 +473,8 @@ class BaseQuestionModel {
473
473
  static calculationAllQuestionCount(questions) {
474
474
  let count = 0;
475
475
  const exclude = ["TEXT_TITLE"];
476
- _.forEach(questions, question => {
477
- if (!_.includes(exclude, question.type)) {
476
+ _$1.forEach(questions, question => {
477
+ if (!_$1.includes(exclude, question.type)) {
478
478
  count++;
479
479
  }
480
480
  });
@@ -482,13 +482,13 @@ class BaseQuestionModel {
482
482
  }
483
483
  static calculationAllQuestionMaxScore(questions) {
484
484
  let maxScore = 0;
485
- _.forEach(questions, question => {
485
+ _$1.forEach(questions, question => {
486
486
  maxScore += this.getMaxScore(question);
487
487
  });
488
488
  return maxScore;
489
489
  }
490
490
  static setActiveQuestion(currentQuestion, questions) {
491
- _.forEach(questions, question => {
491
+ _$1.forEach(questions, question => {
492
492
  if (question.id == currentQuestion.id) {
493
493
  question.active = true;
494
494
  } else {
@@ -498,7 +498,7 @@ class BaseQuestionModel {
498
498
  }
499
499
  static rebuildQuestionNumber(questions) {
500
500
  let preNumber = 0;
501
- _.forEach(questions, function (question) {
501
+ _$1.forEach(questions, function (question) {
502
502
  let number;
503
503
  if (question.type === "TEXT_TITLE") {
504
504
  number = QuestionTextTitleModel.getNumber(preNumber, question);
@@ -516,7 +516,7 @@ class BaseQuestionModel {
516
516
  });
517
517
  }
518
518
  static deleteUnusedProperties(questions) {
519
- _.forEach(questions, function (question) {
519
+ _$1.forEach(questions, function (question) {
520
520
  if (question.type === "SCORING") {
521
521
  QuestionScoringModel.removeUnusedProperty(question);
522
522
  }
@@ -551,7 +551,7 @@ class QuestionMatrixModel extends BaseQuestionModel {
551
551
  }
552
552
  static getNumber(preNumber, question) {
553
553
  const number = preNumber + 1;
554
- _.forEach(question.subQuestions, (sq, index) => {
554
+ _$1.forEach(question.subQuestions, (sq, index) => {
555
555
  sq.number = index + 1;
556
556
  });
557
557
  return number;
@@ -564,7 +564,7 @@ class QuestionScoringModel extends BaseQuestionModel {
564
564
  }
565
565
  static getNumber(preNumber, question) {
566
566
  const number = preNumber + 1;
567
- _.forEach(question.subQuestions, (sq, index) => {
567
+ _$1.forEach(question.subQuestions, (sq, index) => {
568
568
  sq.number = index + 1;
569
569
  });
570
570
  return number;
@@ -572,24 +572,24 @@ class QuestionScoringModel extends BaseQuestionModel {
572
572
  static removeUnusedProperty(question) {
573
573
  const options = question.options;
574
574
  delete options.sliderValue;
575
- _.forEach(question.subQuestions, subQuestion => {
575
+ _$1.forEach(question.subQuestions, subQuestion => {
576
576
  delete subQuestion.sliderValue;
577
577
  });
578
578
  }
579
579
  }
580
- const ZH_CN = _.camelCase("zh-CN");
581
- const EN_US = _.camelCase("en-US");
582
- const ZH_TW = _.camelCase("zh-TW");
580
+ const ZH_CN = _$1.camelCase("zh-CN");
581
+ const EN_US = _$1.camelCase("en-US");
582
+ const ZH_TW = _$1.camelCase("zh-TW");
583
583
  function getValue(obj, locale) {
584
- const value = _.get(obj, _.camelCase(locale), "");
585
- if (!_.isEmpty(value)) {
584
+ const value = _$1.get(obj, _$1.camelCase(locale), "");
585
+ if (!_$1.isEmpty(value)) {
586
586
  return value;
587
587
  }
588
- return _.get(obj, locale, "");
588
+ return _$1.get(obj, locale, "");
589
589
  }
590
590
  function translate(obj, locale, prettyMath = false) {
591
591
  const value = getValue(obj, locale);
592
- if (!_.isEmpty(value) || !prettyMath) {
592
+ if (!_$1.isEmpty(value) || !prettyMath) {
593
593
  return value;
594
594
  }
595
595
  return obj[ZH_CN] || obj["zh-CN"] || obj[EN_US] || obj["en-US"] || obj[ZH_TW] || obj["zh-TW"];
@@ -625,8 +625,8 @@ var SurveyTranslatorMixin = Vue.extend({
625
625
  return survey.options.primaryLanguage;
626
626
  },
627
627
  getLanguagesExcludedPrimaryLanguage(survey) {
628
- const languages = _.cloneDeep(survey.options.languages);
629
- _.pull(languages, this.getPrimaryLanguage(survey));
628
+ const languages = _$1.cloneDeep(survey.options.languages);
629
+ _$1.pull(languages, this.getPrimaryLanguage(survey));
630
630
  return languages;
631
631
  },
632
632
  buildQuestionId(question) {
@@ -640,12 +640,12 @@ var SurveyTranslatorMixin = Vue.extend({
640
640
  },
641
641
  buildDataMap(data) {
642
642
  const map = {};
643
- _.forEach(data, (item) => {
643
+ _$1.forEach(data, (item) => {
644
644
  map[item.tempId] = item;
645
- _.forEach(item.children, (sub) => {
645
+ _$1.forEach(item.children, (sub) => {
646
646
  map[sub.tempId] = sub;
647
647
  });
648
- _.forEach(item.subQuestions, (sub) => {
648
+ _$1.forEach(item.subQuestions, (sub) => {
649
649
  map[sub.tempId] = sub;
650
650
  });
651
651
  });
@@ -653,8 +653,8 @@ var SurveyTranslatorMixin = Vue.extend({
653
653
  },
654
654
  allTranslationIsCompleted(survey) {
655
655
  let completed = true;
656
- const languages = _.cloneDeep(survey.options.languages);
657
- _.forEach(languages, (language) => {
656
+ const languages = _$1.cloneDeep(survey.options.languages);
657
+ _$1.forEach(languages, (language) => {
658
658
  if (!this.translationIsCompleted(survey, language)) {
659
659
  completed = false;
660
660
  }
@@ -662,21 +662,21 @@ var SurveyTranslatorMixin = Vue.extend({
662
662
  return completed;
663
663
  },
664
664
  translationIsCompleted(survey, language) {
665
- const locale = _.camelCase(language);
665
+ const locale = _$1.camelCase(language);
666
666
  let completed = true;
667
- _.forEach(survey.questions, function (question) {
668
- if (!_.get(question, `header.text.${locale}`)) {
667
+ _$1.forEach(survey.questions, function (question) {
668
+ if (!_$1.get(question, `header.text.${locale}`)) {
669
669
  completed = false;
670
670
  return completed;
671
671
  }
672
- _.forEach(question.choices, function (choice) {
673
- if (!_.get(choice, `text.${locale}`)) {
672
+ _$1.forEach(question.choices, function (choice) {
673
+ if (!_$1.get(choice, `text.${locale}`)) {
674
674
  completed = false;
675
675
  return completed;
676
676
  }
677
677
  });
678
- _.forEach(question.sub_questions, function (sub_question) {
679
- if (!_.get(sub_question, `text.${locale}`)) {
678
+ _$1.forEach(question.sub_questions, function (sub_question) {
679
+ if (!_$1.get(sub_question, `text.${locale}`)) {
680
680
  completed = false;
681
681
  return completed;
682
682
  }
@@ -997,17 +997,17 @@ var script$J = Vue.extend({
997
997
  return BaseQuestionModel.getScoreRange(this.question);
998
998
  },
999
999
  haveMaxScore() {
1000
- return (_.get(this.question, "options.scoringEnabled", false) &&
1000
+ return (_$1.get(this.question, "options.scoringEnabled", false) &&
1001
1001
  this.question.type != "SCORING");
1002
1002
  },
1003
1003
  haveStar() {
1004
- return _.get(this.question, "options.starEnabled", false);
1004
+ return _$1.get(this.question, "options.starEnabled", false);
1005
1005
  },
1006
1006
  isSingleSelection() {
1007
1007
  return this.question.type == "SINGLE_SELECTION";
1008
1008
  },
1009
1009
  isRichText() {
1010
- return _.get(this.question, "options.richTextEnabled", false);
1010
+ return _$1.get(this.question, "options.richTextEnabled", false);
1011
1011
  },
1012
1012
  },
1013
1013
  methods: {
@@ -1015,7 +1015,7 @@ var script$J = Vue.extend({
1015
1015
  if (!this.isRichText) {
1016
1016
  return title;
1017
1017
  }
1018
- const inputHtml = `<Input style="border: 1px solid #dcdee2;border-radius: 3px;" placeholder="${this.t("survey_creator.question.rich_text.input_placeholder")}" />`;
1018
+ const inputHtml = `<Input style="border: 1px solid #dcdee2;border-radius: 3px;font-size: 12px;margin: 0 16px 8px;padding: 4px;" placeholder="${this.t("survey_creator.question.rich_text.input_placeholder")}" />`;
1019
1019
  return title.replace(/_{5,}/g, inputHtml);
1020
1020
  },
1021
1021
  },
@@ -1231,7 +1231,7 @@ var script$H = Vue.extend({
1231
1231
  },
1232
1232
  computed: {
1233
1233
  jumps() {
1234
- return _.get(this.question, "jumps", []);
1234
+ return _$1.get(this.question, "jumps", []);
1235
1235
  },
1236
1236
  },
1237
1237
  methods: {
@@ -1242,9 +1242,9 @@ var script$H = Vue.extend({
1242
1242
  this.$emit("on-copy");
1243
1243
  },
1244
1244
  onDelete() {
1245
- let surveyAllJumpQuestionIds = _.map(_.flatMap(this.survey.questions, (question) => _.get(question, "jumps", [])), "toQuestionId");
1245
+ let surveyAllJumpQuestionIds = _$1.map(_$1.flatMap(this.survey.questions, (question) => _$1.get(question, "jumps", [])), "toQuestionId");
1246
1246
  if (this.jumps.length > 0 ||
1247
- _.includes(surveyAllJumpQuestionIds, this.question.id)) {
1247
+ _$1.includes(surveyAllJumpQuestionIds, this.question.id)) {
1248
1248
  Modal.confirm({
1249
1249
  title: this.t("survey_creator.question.jump.delete_question"),
1250
1250
  content: this.t("survey_creator.question.jump.delete_question_desc"),
@@ -1318,8 +1318,8 @@ var script$G = Vue.extend({
1318
1318
  },
1319
1319
  computed: {
1320
1320
  enabledJump() {
1321
- return (_.get(this.question, "type") === "SINGLE_SELECTION" &&
1322
- _.get(this.$rootComponent, "surveyExtendOptions.enabledJump"));
1321
+ return (_$1.get(this.question, "type") === "SINGLE_SELECTION" &&
1322
+ _$1.get(this.$rootComponent, "surveyExtendOptions.enabledJump"));
1323
1323
  },
1324
1324
  },
1325
1325
  methods: {
@@ -1398,10 +1398,10 @@ var script$F = Vue.extend({
1398
1398
  },
1399
1399
  computed: {
1400
1400
  haveMaxScore() {
1401
- return _.get(this.question, "options.scoringEnabled", false);
1401
+ return _$1.get(this.question, "options.scoringEnabled", false);
1402
1402
  },
1403
1403
  jumps() {
1404
- return _.get(this.question, "jumps", []);
1404
+ return _$1.get(this.question, "jumps", []);
1405
1405
  },
1406
1406
  },
1407
1407
  watch: {
@@ -1415,18 +1415,18 @@ var script$F = Vue.extend({
1415
1415
  buildChoiceClasses() {
1416
1416
  return [
1417
1417
  `question-choice`,
1418
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1418
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1419
1419
  ];
1420
1420
  },
1421
1421
  haveStar(choice) {
1422
1422
  return choice.options?.star ?? false;
1423
1423
  },
1424
1424
  getJumpDesc(choiceId) {
1425
- let jump = _.find(this.jumps, (jump) => jump.choiceId === choiceId);
1426
- if (_.isEmpty(jump)) {
1425
+ let jump = _$1.find(this.jumps, (jump) => jump.choiceId === choiceId);
1426
+ if (_$1.isEmpty(jump)) {
1427
1427
  return null;
1428
1428
  }
1429
- let jumpQuestion = _.find(this.survey.questions, (question) => question.id === jump.toQuestionId);
1429
+ let jumpQuestion = _$1.find(this.survey.questions, (question) => question.id === jump.toQuestionId);
1430
1430
  return this.t(`survey_creator.question.jump.selected_jump`, [
1431
1431
  jumpQuestion.header.number,
1432
1432
  ]);
@@ -1498,7 +1498,7 @@ var script$E = Vue.extend({
1498
1498
  },
1499
1499
  computed: {
1500
1500
  haveMaxScore() {
1501
- return _.get(this.question, "options.scoringEnabled", false);
1501
+ return _$1.get(this.question, "options.scoringEnabled", false);
1502
1502
  },
1503
1503
  },
1504
1504
  watch: {
@@ -1512,13 +1512,13 @@ var script$E = Vue.extend({
1512
1512
  buildChoiceClasses() {
1513
1513
  return [
1514
1514
  `question-choice`,
1515
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1515
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1516
1516
  ];
1517
1517
  },
1518
1518
  setCheckboxStatus() {
1519
1519
  let exclusiveChoiceId = "";
1520
1520
  const notExclusiveChoices = new Array();
1521
- _.each(this.question.choices, (choice) => {
1521
+ _$1.each(this.question.choices, (choice) => {
1522
1522
  if (choice.options.exclusiveEnabled) {
1523
1523
  exclusiveChoiceId = choice.id;
1524
1524
  }
@@ -1526,8 +1526,8 @@ var script$E = Vue.extend({
1526
1526
  notExclusiveChoices.push(choice);
1527
1527
  }
1528
1528
  });
1529
- _.each(notExclusiveChoices, (choice) => {
1530
- if (_.includes(this.value.answer, exclusiveChoiceId)) {
1529
+ _$1.each(notExclusiveChoices, (choice) => {
1530
+ if (_$1.includes(this.value.answer, exclusiveChoiceId)) {
1531
1531
  choice.readonly = true;
1532
1532
  }
1533
1533
  else {
@@ -1536,8 +1536,8 @@ var script$E = Vue.extend({
1536
1536
  });
1537
1537
  },
1538
1538
  selChange(val) {
1539
- _.each(this.question.choices, (choice) => {
1540
- _.each(val, (id) => {
1539
+ _$1.each(this.question.choices, (choice) => {
1540
+ _$1.each(val, (id) => {
1541
1541
  if (choice.id == id) {
1542
1542
  if (choice.options.exclusiveEnabled) {
1543
1543
  this.value.answer = [id];
@@ -1781,16 +1781,16 @@ var script$A = Vue.extend({
1781
1781
  buildChoiceClasses() {
1782
1782
  return [
1783
1783
  `question-choice`,
1784
- `question-choice-${_.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1784
+ `question-choice-${_$1.lowerCase(this.question.options.layout || "HORIZONTAL")}`,
1785
1785
  ];
1786
1786
  },
1787
1787
  },
1788
1788
  computed: {
1789
1789
  haveMaxScore() {
1790
- return _.get(this.question, "options.scoringEnabled", false);
1790
+ return _$1.get(this.question, "options.scoringEnabled", false);
1791
1791
  },
1792
1792
  choiceMaxScore() {
1793
- return _.max(_.map(this.question.choices, (choice) => parseFloat(_.get(choice, "options.score", 0) || 0)));
1793
+ return _$1.max(_$1.map(this.question.choices, (choice) => parseFloat(_$1.get(choice, "options.score", 0) || 0)));
1794
1794
  },
1795
1795
  },
1796
1796
  });
@@ -1920,7 +1920,7 @@ class ExprEvaluationQuestion {
1920
1920
 
1921
1921
  constructor(questions, scope) {
1922
1922
  this.questions = questions;
1923
- this.scope = _.sortBy(scope);
1923
+ this.scope = _$1.sortBy(scope);
1924
1924
 
1925
1925
  this.questionMap = this.buildQuestionMap();
1926
1926
  }
@@ -1935,10 +1935,10 @@ class ExprEvaluationQuestion {
1935
1935
 
1936
1936
  buildQuestionMap() {
1937
1937
  const questionMap = {};
1938
- _.forEach(this.questions, (question) => {
1938
+ _$1.forEach(this.questions, (question) => {
1939
1939
  questionMap[question.id] = question;
1940
1940
  if (question.type == "MATRIX") {
1941
- _.forEach(_.get(question, "subQuestions", []), (subQuestion) => {
1941
+ _$1.forEach(_$1.get(question, "subQuestions", []), (subQuestion) => {
1942
1942
  questionMap[subQuestion.id] = subQuestion;
1943
1943
  });
1944
1944
  }
@@ -1948,21 +1948,21 @@ class ExprEvaluationQuestion {
1948
1948
 
1949
1949
  checkedQuestion() {
1950
1950
  const questions = new Array();
1951
- _.forEach(this.questions, (question) => {
1952
- if (_.get(question, "type") == "MATRIX") {
1951
+ _$1.forEach(this.questions, (question) => {
1952
+ if (_$1.get(question, "type") == "MATRIX") {
1953
1953
  const markedQuestions = new Array();
1954
- _.forEach(_.get(question, "subQuestions", []), (subQuestion) => {
1955
- if (_.includes(this.scope, subQuestion.id)) {
1956
- const newSubQuestion = _.cloneDeep(subQuestion);
1957
- _.set(newSubQuestion, "type", "MATRIX");
1958
- _.set(newSubQuestion, "parentId", _.get(question, "id"));
1954
+ _$1.forEach(_$1.get(question, "subQuestions", []), (subQuestion) => {
1955
+ if (_$1.includes(this.scope, subQuestion.id)) {
1956
+ const newSubQuestion = _$1.cloneDeep(subQuestion);
1957
+ _$1.set(newSubQuestion, "type", "MATRIX");
1958
+ _$1.set(newSubQuestion, "parentId", _$1.get(question, "id"));
1959
1959
  markedQuestions.push(newSubQuestion);
1960
1960
  }
1961
1961
  });
1962
- if (!_.isEmpty(markedQuestions)) {
1962
+ if (!_$1.isEmpty(markedQuestions)) {
1963
1963
  questions.push(markedQuestions);
1964
1964
  }
1965
- } else if (_.includes(this.scope, question.id)) {
1965
+ } else if (_$1.includes(this.scope, question.id)) {
1966
1966
  questions.push(question);
1967
1967
  }
1968
1968
  });
@@ -1972,7 +1972,7 @@ class ExprEvaluationQuestion {
1972
1972
  recurs(elements, numbers) {
1973
1973
  for (let i = 0; i < elements.length; i++) {
1974
1974
  const element = elements[i];
1975
- if (_.isArray(element)) {
1975
+ if (_$1.isArray(element)) {
1976
1976
  numbers.push(new Array());
1977
1977
  this.recurs(element, numbers[numbers.length - 1]);
1978
1978
  } else {
@@ -1991,7 +1991,7 @@ class ExprEvaluationQuestion {
1991
1991
  i = j - 1;
1992
1992
  break;
1993
1993
  }
1994
- if (_.size(temp) > 1) {
1994
+ if (_$1.size(temp) > 1) {
1995
1995
  temp.pop();
1996
1996
  }
1997
1997
  temp.push(this.getFullNumber(elements[j]));
@@ -2002,7 +2002,7 @@ class ExprEvaluationQuestion {
2002
2002
 
2003
2003
  isContinuous(front, hind) {
2004
2004
  return (
2005
- !_.isArray(hind) && this.getNumber(hind) - this.getNumber(front) == 1
2005
+ !_$1.isArray(hind) && this.getNumber(hind) - this.getNumber(front) == 1
2006
2006
  );
2007
2007
  }
2008
2008
 
@@ -2045,7 +2045,7 @@ var script$y = Vue.extend({
2045
2045
  },
2046
2046
  computed: {
2047
2047
  questions() {
2048
- return _.cloneDeep(this.$rootComponent.currentSurvey.questions);
2048
+ return _$1.cloneDeep(this.$rootComponent.currentSurvey.questions);
2049
2049
  },
2050
2050
  },
2051
2051
  watch: {
@@ -2069,28 +2069,28 @@ var script$y = Vue.extend({
2069
2069
  }
2070
2070
  else {
2071
2071
  let numbers = new ExprEvaluationQuestion(this.questions, payload.scope).calculateNumbers();
2072
- let scope = _.join(_.map(numbers, (number) => {
2073
- if (_.isArray(_.head(number))) {
2074
- return _.join(_.map(number, (e) => _.join(e, "-")), ", ");
2072
+ let scope = _$1.join(_$1.map(numbers, (number) => {
2073
+ if (_$1.isArray(_$1.head(number))) {
2074
+ return _$1.join(_$1.map(number, (e) => _$1.join(e, "-")), ", ");
2075
2075
  }
2076
- return _.join(number, "-");
2076
+ return _$1.join(number, "-");
2077
2077
  }), ", ");
2078
2078
  if (condition.type == "ASSIGN") {
2079
2079
  return this.t("survey_creator.question.evaluation.condition.assign_template", [
2080
2080
  scope,
2081
- _.join(payload.values, "、"),
2082
- _.unescape(payload.operator),
2081
+ _$1.join(payload.values, "、"),
2082
+ _$1.unescape(payload.operator),
2083
2083
  payload.size,
2084
2084
  ]);
2085
2085
  }
2086
2086
  else if (condition.type == "AUTO") {
2087
- return this.t("survey_creator.question.evaluation.condition.auto_template", [scope, _.join(payload.values, "、")]);
2087
+ return this.t("survey_creator.question.evaluation.condition.auto_template", [scope, _$1.join(payload.values, "、")]);
2088
2088
  }
2089
2089
  return "";
2090
2090
  }
2091
2091
  },
2092
2092
  getChineseLength(_str) {
2093
- _str = _.trim(_str);
2093
+ _str = _$1.trim(_str);
2094
2094
  let strLength = _str.length;
2095
2095
  if (!strLength) {
2096
2096
  return 0;
@@ -2100,16 +2100,16 @@ var script$y = Vue.extend({
2100
2100
  },
2101
2101
  initialDesc() {
2102
2102
  let desc = "";
2103
- let ds = _.map(this.conditions, (c) => {
2103
+ let ds = _$1.map(this.conditions, (c) => {
2104
2104
  return this.getDesc(c);
2105
2105
  });
2106
- desc = _.join(ds, "<br>");
2106
+ desc = _$1.join(ds, "<br>");
2107
2107
  this.desc = desc;
2108
2108
  let strLength = desc.length;
2109
2109
  let cLength = this.getChineseLength(desc.substring(0, SPLIT_LENGTH));
2110
2110
  if (strLength > SPLIT_LENGTH) {
2111
2111
  this.desc =
2112
- desc.substring(0, SPLIT_LENGTH - _.ceil(cLength / 2)) + "...";
2112
+ desc.substring(0, SPLIT_LENGTH - _$1.ceil(cLength / 2)) + "...";
2113
2113
  }
2114
2114
  this.descTitle = desc;
2115
2115
  },
@@ -2603,7 +2603,7 @@ var questionFormMixin = Vue.extend({
2603
2603
  this.primaryLanguage = this.$rootComponent.primaryLanguage;
2604
2604
  },
2605
2605
  created() {
2606
- this.editQuestion = _.cloneDeep(this.question);
2606
+ this.editQuestion = _$1.cloneDeep(this.question);
2607
2607
  },
2608
2608
  methods: {},
2609
2609
  });
@@ -2732,8 +2732,8 @@ var script$p = Vue.extend({
2732
2732
  };
2733
2733
  },
2734
2734
  created() {
2735
- this.enabledInputChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2736
- this.enabledRichText = _.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2735
+ this.enabledInputChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2736
+ this.enabledRichText = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2737
2737
  this.editQuestion.options.richTextEnabled = this.enabledRichText;
2738
2738
  },
2739
2739
  methods: {
@@ -2741,7 +2741,7 @@ var script$p = Vue.extend({
2741
2741
  this.editQuestion.choices.push(QuestionFactory.createDefault(this.$rootComponent.primaryLanguage));
2742
2742
  },
2743
2743
  deleteOption(position, choiceId) {
2744
- let jumpIndex = _.findIndex(_.get(this.editQuestion, "jumps", []), (jump) => jump.choiceId === choiceId);
2744
+ let jumpIndex = _$1.findIndex(_$1.get(this.editQuestion, "jumps", []), (jump) => jump.choiceId === choiceId);
2745
2745
  if (jumpIndex > -1) {
2746
2746
  Modal.confirm({
2747
2747
  title: this.t("survey_creator.question.jump.delete_option"),
@@ -2758,14 +2758,14 @@ var script$p = Vue.extend({
2758
2758
  },
2759
2759
  scoringEnabledChange() {
2760
2760
  if (!this.editQuestion.options.scoringEnabled) {
2761
- _.each(this.editQuestion.choices, (choice) => {
2761
+ _$1.each(this.editQuestion.choices, (choice) => {
2762
2762
  choice.options.score = null;
2763
2763
  });
2764
2764
  }
2765
2765
  },
2766
2766
  starEnabledChange() {
2767
2767
  if (!this.editQuestion.options.starEnabled) {
2768
- _.each(this.editQuestion.choices, (choice) => {
2768
+ _$1.each(this.editQuestion.choices, (choice) => {
2769
2769
  choice.options.star = false;
2770
2770
  });
2771
2771
  }
@@ -2778,13 +2778,13 @@ var script$p = Vue.extend({
2778
2778
  this.editQuestion.options.inputMinLength = 10;
2779
2779
  }
2780
2780
  if (!this.editQuestion.options.inputtedEnabled) {
2781
- _.each(this.editQuestion.choices, (choice) => {
2781
+ _$1.each(this.editQuestion.choices, (choice) => {
2782
2782
  choice.options.inputEnabled = false;
2783
2783
  });
2784
2784
  }
2785
2785
  },
2786
2786
  starChange(id) {
2787
- _.each(this.editQuestion.choices, (choice) => {
2787
+ _$1.each(this.editQuestion.choices, (choice) => {
2788
2788
  if (choice.id == id) {
2789
2789
  choice.options.starCount = choice.options.star == true ? 1 : 0;
2790
2790
  }
@@ -2793,7 +2793,7 @@ var script$p = Vue.extend({
2793
2793
  validatedStar(rule, value, callback, source, options) {
2794
2794
  if (this.editQuestion.options.starEnabled) {
2795
2795
  let existStar = false;
2796
- _.each(this.editQuestion.choices, (choice) => {
2796
+ _$1.each(this.editQuestion.choices, (choice) => {
2797
2797
  if (choice.options.star) {
2798
2798
  existStar = true;
2799
2799
  }
@@ -2808,7 +2808,7 @@ var script$p = Vue.extend({
2808
2808
  validatedInput(rule, value, callback, source, options) {
2809
2809
  if (this.editQuestion.options.inputtedEnabled) {
2810
2810
  let existInput = false;
2811
- _.each(this.editQuestion.choices, (choice) => {
2811
+ _$1.each(this.editQuestion.choices, (choice) => {
2812
2812
  if (choice.options.inputEnabled) {
2813
2813
  existInput = true;
2814
2814
  }
@@ -2933,9 +2933,9 @@ var script$o = Vue.extend({
2933
2933
  },
2934
2934
  created() {
2935
2935
  this.resetStarList();
2936
- this.enabledExclusiveChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledExclusiveChoice", false);
2937
- this.enabledInputChoice = _.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2938
- this.enabledRichText = _.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2936
+ this.enabledExclusiveChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledExclusiveChoice", false);
2937
+ this.enabledInputChoice = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledInputChoice", false);
2938
+ this.enabledRichText = _$1.get(this.$rootComponent, "surveyExtendOptions.enabledPlanSurveyTeacherSetting", false);
2939
2939
  this.editQuestion.options.richTextEnabled = this.enabledRichText;
2940
2940
  },
2941
2941
  methods: {
@@ -2961,7 +2961,7 @@ var script$o = Vue.extend({
2961
2961
  },
2962
2962
  scoringEnabledChange() {
2963
2963
  if (!this.editQuestion.options.scoringEnabled) {
2964
- _.each(this.editQuestion.choices, (choice) => {
2964
+ _$1.each(this.editQuestion.choices, (choice) => {
2965
2965
  choice.options.score = null;
2966
2966
  });
2967
2967
  }
@@ -2982,14 +2982,14 @@ var script$o = Vue.extend({
2982
2982
  this.editQuestion.options.inputMinLength = 10;
2983
2983
  }
2984
2984
  if (!this.editQuestion.options.inputtedEnabled) {
2985
- _.each(this.editQuestion.choices, (choice) => {
2985
+ _$1.each(this.editQuestion.choices, (choice) => {
2986
2986
  choice.options.inputEnabled = false;
2987
2987
  });
2988
2988
  }
2989
2989
  },
2990
2990
  resetStarList() {
2991
2991
  this.selectStarList = [];
2992
- _.each(this.editQuestion.choices, (choices, index) => {
2992
+ _$1.each(this.editQuestion.choices, (choices, index) => {
2993
2993
  this.selectStarList.push({
2994
2994
  label: index + 1,
2995
2995
  value: index + 1,
@@ -3011,7 +3011,7 @@ var script$o = Vue.extend({
3011
3011
  validatedInput(rule, value, callback, source, options) {
3012
3012
  if (this.editQuestion.options.inputtedEnabled) {
3013
3013
  let existInput = false;
3014
- _.each(this.editQuestion.choices, (choice) => {
3014
+ _$1.each(this.editQuestion.choices, (choice) => {
3015
3015
  if (choice.options.inputEnabled) {
3016
3016
  existInput = true;
3017
3017
  }
@@ -3198,15 +3198,15 @@ var script$m = Vue.extend({
3198
3198
  this.editQuestion.options.level = this.editQuestion.choices.length;
3199
3199
  this.editQuestion.options.scoringEnabled = true;
3200
3200
  this.editQuestion.subQuestions ||
3201
- _.set(this.editQuestion, "subQuestions", []);
3201
+ _$1.set(this.editQuestion, "subQuestions", []);
3202
3202
  this.initDefaultItems(this.editQuestion);
3203
3203
  },
3204
3204
  initDefaultItems(question) {
3205
3205
  const primaryLanguage = this.primaryLanguage;
3206
3206
  const t = this.t;
3207
- _.forEach(question.choices, (choice, index) => {
3208
- if (!_.get(choice.text, primaryLanguage)) {
3209
- _.set(choice.text, primaryLanguage, t(`survey_creator.question.matrixLevel${index + 1}`));
3207
+ _$1.forEach(question.choices, (choice, index) => {
3208
+ if (!_$1.get(choice.text, primaryLanguage)) {
3209
+ _$1.set(choice.text, primaryLanguage, t(`survey_creator.question.matrixLevel${index + 1}`));
3210
3210
  }
3211
3211
  if (!choice.options.score) {
3212
3212
  choice.options.score = index + 1;
@@ -3241,7 +3241,7 @@ var script$m = Vue.extend({
3241
3241
  for (let i = 0; i < diffCount; i++) {
3242
3242
  this.editQuestion.choices.push({
3243
3243
  options: { score: this.editQuestion.choices.length + 1 },
3244
- text: _.set({}, primaryLanguage, _.includes(_.range(1, this.defaultLevel + 1), this.editQuestion.choices.length + 1)
3244
+ text: _$1.set({}, primaryLanguage, _$1.includes(_$1.range(1, this.defaultLevel + 1), this.editQuestion.choices.length + 1)
3245
3245
  ? t(`survey_creator.question.matrixLevel${this.editQuestion.choices.length + 1}`)
3246
3246
  : ""),
3247
3247
  id: ChoiceModel.createChoiceId(),
@@ -3381,7 +3381,7 @@ var script$l = Vue.extend({
3381
3381
  Vue.set(this.editQuestion.options, "decimalPlaces", 0);
3382
3382
  Vue.set(this.editQuestion.options, "scoringEnabled", true);
3383
3383
  this.editQuestion.subQuestions ||
3384
- _.set(this.editQuestion, "subQuestions", []);
3384
+ _$1.set(this.editQuestion, "subQuestions", []);
3385
3385
  },
3386
3386
  addItem() {
3387
3387
  if (!this.showAddBtn) {
@@ -3409,14 +3409,14 @@ var script$l = Vue.extend({
3409
3409
  watch: {
3410
3410
  "editQuestion.options.maxRange": function () {
3411
3411
  if ((!this.editQuestion.subQuestions ||
3412
- _.isEmpty(this.editQuestion.subQuestions)) &&
3412
+ _$1.isEmpty(this.editQuestion.subQuestions)) &&
3413
3413
  this.editQuestion.options.sliderValue >
3414
3414
  this.editQuestion.options.maxRange) {
3415
3415
  this.editQuestion.options.sliderValue =
3416
3416
  this.editQuestion.options.maxRange;
3417
3417
  }
3418
3418
  else {
3419
- _.forEach(this.editQuestion.subQuestions, (q) => {
3419
+ _$1.forEach(this.editQuestion.subQuestions, (q) => {
3420
3420
  if (q.sliderValue > this.editQuestion.options.maxRange) {
3421
3421
  q.sliderValue = this.editQuestion.options.maxRange;
3422
3422
  }
@@ -3425,7 +3425,7 @@ var script$l = Vue.extend({
3425
3425
  },
3426
3426
  "editQuestion.options.minRange": function () {
3427
3427
  if ((!this.editQuestion.subQuestions ||
3428
- _.isEmpty(this.editQuestion.subQuestions)) &&
3428
+ _$1.isEmpty(this.editQuestion.subQuestions)) &&
3429
3429
  (!this.editQuestion.options.sliderValue ||
3430
3430
  this.editQuestion.options.sliderValue <
3431
3431
  this.editQuestion.options.minRange)) {
@@ -3433,7 +3433,7 @@ var script$l = Vue.extend({
3433
3433
  this.editQuestion.options.minRange;
3434
3434
  }
3435
3435
  else {
3436
- _.forEach(this.editQuestion.subQuestions, (q) => {
3436
+ _$1.forEach(this.editQuestion.subQuestions, (q) => {
3437
3437
  if (!q.sliderValue ||
3438
3438
  q.sliderValue < this.editQuestion.options.minRange) {
3439
3439
  q.sliderValue = this.editQuestion.options.minRange;
@@ -3585,32 +3585,32 @@ var script$j = Vue.extend({
3585
3585
  initDefaultChoices() {
3586
3586
  const self = this;
3587
3587
  let primaryLanguage = this.$rootComponent.primaryLanguage;
3588
- _.forEach(this.evaluationItems, (item, index) => {
3588
+ _$1.forEach(this.evaluationItems, (item, index) => {
3589
3589
  let i18nText = self.t(`survey_creator.question.evaluation.level.${index + 1}`);
3590
- if (!_.get(item.text, primaryLanguage) &&
3590
+ if (!_$1.get(item.text, primaryLanguage) &&
3591
3591
  !i18nText.startsWith("survey_creator.question.evaluation.level")) {
3592
- _.set(item.text, primaryLanguage, i18nText);
3592
+ _$1.set(item.text, primaryLanguage, i18nText);
3593
3593
  }
3594
- if (!_.get(item, "level")) {
3595
- _.set(item, "level", 1);
3594
+ if (!_$1.get(item, "level")) {
3595
+ _$1.set(item, "level", 1);
3596
3596
  }
3597
3597
  });
3598
3598
  this.calculationItemLevelRange();
3599
3599
  },
3600
3600
  calculationItemLevelRange() {
3601
- let levels = _.chain(this.evaluationItems)
3601
+ let levels = _$1.chain(this.evaluationItems)
3602
3602
  .map((item) => parseInt(item.level))
3603
3603
  .filter((level) => !isNaN(level))
3604
3604
  .uniq()
3605
3605
  .sortBy()
3606
3606
  .value();
3607
- _.forEach(this.evaluationItems, (item, index) => {
3608
- let currentLevelIndex = _.indexOf(levels, _.get(item, "level"));
3607
+ _$1.forEach(this.evaluationItems, (item, index) => {
3608
+ let currentLevelIndex = _$1.indexOf(levels, _$1.get(item, "level"));
3609
3609
  if (levels.length == currentLevelIndex + 1) {
3610
- _.set(item, "range", { max: null, min: levels[currentLevelIndex] });
3610
+ _$1.set(item, "range", { max: null, min: levels[currentLevelIndex] });
3611
3611
  }
3612
3612
  else {
3613
- _.set(item, "range", {
3613
+ _$1.set(item, "range", {
3614
3614
  max: levels[currentLevelIndex + 1] - 1,
3615
3615
  min: levels[currentLevelIndex],
3616
3616
  });
@@ -3753,17 +3753,17 @@ var ExprMixin = Vue.extend({
3753
3753
  buildChoices(scope) {
3754
3754
  const choices = new Array();
3755
3755
  const questions = this.$rootComponent.currentSurvey.questions;
3756
- _.forEach(questions, (question) => {
3757
- if (_.includes(scope, question.id) ||
3758
- !_.isEmpty(_.intersection(scope, _.map(_.get(question, "subQuestions", []), "id")))) {
3759
- _.forEach(question.choices, (choice) => {
3760
- if (!_.isNil(choice.text[this.primaryLanguage])) {
3756
+ _$1.forEach(questions, (question) => {
3757
+ if (_$1.includes(scope, question.id) ||
3758
+ !_$1.isEmpty(_$1.intersection(scope, _$1.map(_$1.get(question, "subQuestions", []), "id")))) {
3759
+ _$1.forEach(question.choices, (choice) => {
3760
+ if (!_$1.isNil(choice.text[this.primaryLanguage])) {
3761
3761
  choices.push(choice.text[this.primaryLanguage]);
3762
3762
  }
3763
3763
  });
3764
3764
  }
3765
3765
  });
3766
- return _.uniq(choices);
3766
+ return _$1.uniq(choices);
3767
3767
  },
3768
3768
  generateExpr() {
3769
3769
  return "";
@@ -3788,7 +3788,7 @@ var script$i = Vue.extend({
3788
3788
  },
3789
3789
  computed: {
3790
3790
  questions() {
3791
- return _.clone(this.$rootComponent.currentSurvey.questions);
3791
+ return _$1.clone(this.$rootComponent.currentSurvey.questions);
3792
3792
  },
3793
3793
  },
3794
3794
  filters: {
@@ -3805,11 +3805,11 @@ var script$i = Vue.extend({
3805
3805
  },
3806
3806
  numbers(num) {
3807
3807
  let numbers = new ExprEvaluationQuestion(this.questions, this.scope).calculateNumbers();
3808
- return _.join(_.map(numbers, (number) => {
3809
- if (_.isArray(_.head(number))) {
3810
- return _.join(_.map(number, (e) => _.join(e, "-")), ",");
3808
+ return _$1.join(_$1.map(numbers, (number) => {
3809
+ if (_$1.isArray(_$1.head(number))) {
3810
+ return _$1.join(_$1.map(number, (e) => _$1.join(e, "-")), ",");
3811
3811
  }
3812
- return _.join(number, "-");
3812
+ return _$1.join(number, "-");
3813
3813
  }), ",");
3814
3814
  },
3815
3815
  getSingleOptionContent(question) {
@@ -3879,14 +3879,14 @@ var script$h = Vue.extend({
3879
3879
  QuestionSelect,
3880
3880
  },
3881
3881
  created() {
3882
- this.value.operator = _.unescape(this.value.operator);
3882
+ this.value.operator = _$1.unescape(this.value.operator);
3883
3883
  },
3884
3884
  methods: {
3885
3885
  generateExpr() {
3886
- let ids = `${_.map(this.value.scope, (e) => {
3886
+ let ids = `${_$1.map(this.value.scope, (e) => {
3887
3887
  return `"` + e + `"`;
3888
3888
  })}`;
3889
- let answers = `${_.map(this.value.values, (e) => {
3889
+ let answers = `${_$1.map(this.value.values, (e) => {
3890
3890
  return `"` + e + `"`;
3891
3891
  })}`;
3892
3892
  return `$count($[id in [${ids}]][answer in [${answers}]]) ${this.value.operator} ${this.value.size}`;
@@ -3968,13 +3968,13 @@ var script$g = Vue.extend({
3968
3968
  },
3969
3969
  methods: {
3970
3970
  generateExpr() {
3971
- let ids = `${_.map(this.value.scope, (e) => {
3971
+ let ids = `${_$1.map(this.value.scope, (e) => {
3972
3972
  return `"` + e + `"`;
3973
3973
  })}`;
3974
- let answers = `${_.map(this.value.values, (e) => {
3974
+ let answers = `${_$1.map(this.value.values, (e) => {
3975
3975
  return `"` + e + `"`;
3976
3976
  })}`;
3977
- return `$count($[id in [${ids}]][answer in [${answers}]]) = ${_.size(this.value.scope)}`;
3977
+ return `$count($[id in [${ids}]][answer in [${answers}]]) = ${_$1.size(this.value.scope)}`;
3978
3978
  },
3979
3979
  },
3980
3980
  });
@@ -4051,8 +4051,8 @@ var script$f = Vue.extend({
4051
4051
  };
4052
4052
  },
4053
4053
  created() {
4054
- this.value.leftOperator = _.unescape(this.value.leftOperator);
4055
- this.value.rightOperator = _.unescape(this.value.rightOperator);
4054
+ this.value.leftOperator = _$1.unescape(this.value.leftOperator);
4055
+ this.value.rightOperator = _$1.unescape(this.value.rightOperator);
4056
4056
  this.createInitScoresOption();
4057
4057
  },
4058
4058
  computed: {
@@ -4060,23 +4060,23 @@ var script$f = Vue.extend({
4060
4060
  return this.$rootComponent.currentSurvey.statistics.maxScore;
4061
4061
  },
4062
4062
  otherConditions() {
4063
- let otherEvaluationItems = _.filter(_.map(this.evaluationItems, (item, index) => {
4064
- return _.extend({}, item, { index: index });
4063
+ let otherEvaluationItems = _$1.filter(_$1.map(this.evaluationItems, (item, index) => {
4064
+ return _$1.extend({}, item, { index: index });
4065
4065
  }), (item) => item.index != this.itemIndex);
4066
- const conditions = _.flatMap(otherEvaluationItems, (item) => _.get(item, "conditions", []));
4067
- return _.filter(conditions, (item) => _.get(item, "type") == "SCORE");
4066
+ const conditions = _$1.flatMap(otherEvaluationItems, (item) => _$1.get(item, "conditions", []));
4067
+ return _$1.filter(conditions, (item) => _$1.get(item, "type") == "SCORE");
4068
4068
  },
4069
4069
  },
4070
4070
  methods: {
4071
4071
  createInitScoresOption() {
4072
- let otherRange = _.map(this.otherConditions, (item) => {
4072
+ let otherRange = _$1.map(this.otherConditions, (item) => {
4073
4073
  return {
4074
- min: _.get(item, "payload.minScore", 0),
4075
- max: _.get(item, "payload.maxScore", 0),
4074
+ min: _$1.get(item, "payload.minScore", 0),
4075
+ max: _$1.get(item, "payload.maxScore", 0),
4076
4076
  };
4077
4077
  });
4078
- this.leftScores = _.map(_.range(1, this.totalScore + 1, 1), function (num) {
4079
- let disabled = _.some(otherRange, function (o) {
4078
+ this.leftScores = _$1.map(_$1.range(1, this.totalScore + 1, 1), function (num) {
4079
+ let disabled = _$1.some(otherRange, function (o) {
4080
4080
  return num >= o.min && num <= o.max;
4081
4081
  });
4082
4082
  return {
@@ -4085,8 +4085,8 @@ var script$f = Vue.extend({
4085
4085
  disabled: disabled,
4086
4086
  };
4087
4087
  });
4088
- this.rightScores = _.map(_.range(1, this.totalScore + 1, 1), function (num) {
4089
- let disabled = _.some(otherRange, function (o) {
4088
+ this.rightScores = _$1.map(_$1.range(1, this.totalScore + 1, 1), function (num) {
4089
+ let disabled = _$1.some(otherRange, function (o) {
4090
4090
  return num >= o.min && num <= o.max;
4091
4091
  });
4092
4092
  return {
@@ -4098,16 +4098,16 @@ var script$f = Vue.extend({
4098
4098
  },
4099
4099
  resetScoreOptions(options) {
4100
4100
  debugger;
4101
- let otherRange = _.map(this.otherConditions, (item) => {
4101
+ let otherRange = _$1.map(this.otherConditions, (item) => {
4102
4102
  return {
4103
- min: _.get(item, "payload.minScore", 0),
4104
- max: _.get(item, "payload.maxScore", 0),
4103
+ min: _$1.get(item, "payload.minScore", 0),
4104
+ max: _$1.get(item, "payload.maxScore", 0),
4105
4105
  };
4106
4106
  });
4107
4107
  let currentMinScore = this.value.minScore == null ? 0 : this.value.minScore;
4108
4108
  let currentMaxScore = this.value.maxScore == null ? this.totalScore : this.value.maxScore;
4109
- _.forEach(options, function (o) {
4110
- o.disabled = _.some(otherRange, function (or) {
4109
+ _$1.forEach(options, function (o) {
4110
+ o.disabled = _$1.some(otherRange, function (or) {
4111
4111
  let condition_a = o.value >= or.min && o.value <= or.max;
4112
4112
  let condition_b = o.value >= currentMinScore && o.value <= currentMaxScore;
4113
4113
  return condition_a && condition_b;
@@ -4306,18 +4306,18 @@ var script$d = Vue.extend({
4306
4306
  return this.$rootComponent.currentSurvey.statistics.maxScore;
4307
4307
  },
4308
4308
  deletable() {
4309
- return (_.size(_.filter(this.evaluationItems, (item) => item.type == "IF")) > 1);
4309
+ return (_$1.size(_$1.filter(this.evaluationItems, (item) => item.type == "IF")) > 1);
4310
4310
  },
4311
4311
  disableAddConditionBtn() {
4312
4312
  let conditions = this.evaluationItems[this.position].conditions;
4313
- let scoreConditions = _.size(_.filter(conditions, (item) => item.type == "SCORE"));
4313
+ let scoreConditions = _$1.size(_$1.filter(conditions, (item) => item.type == "SCORE"));
4314
4314
  return (this.exprConditionType == "SCORE" && scoreConditions > 0);
4315
4315
  },
4316
4316
  },
4317
4317
  methods: {
4318
4318
  onAdd() {
4319
4319
  this.evaluationItems.splice(this.position + 1, 0, {
4320
- id: `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`,
4320
+ id: `Evaluation-Item-${_$1.now()}-${_$1.random(0, 9999999)}`,
4321
4321
  type: "IF",
4322
4322
  text: {
4323
4323
  "zh-CN": "",
@@ -4356,7 +4356,7 @@ var script$d = Vue.extend({
4356
4356
  this.evaluationItems[this.position].conditions.splice(index, 1);
4357
4357
  },
4358
4358
  expr(index, value) {
4359
- _.set(this.evaluationItems[this.position].conditions[index], "expr", value);
4359
+ _$1.set(this.evaluationItems[this.position].conditions[index], "expr", value);
4360
4360
  },
4361
4361
  },
4362
4362
  });
@@ -4572,10 +4572,10 @@ var script$a = Vue.extend({
4572
4572
  },
4573
4573
  onChange(value) {
4574
4574
  if (value == "EXPR") {
4575
- _.forEach(this.editQuestion.evaluationItems, (item, index) => {
4576
- _.set(item, "type", "IF");
4575
+ _$1.forEach(this.editQuestion.evaluationItems, (item, index) => {
4576
+ _$1.set(item, "type", "IF");
4577
4577
  });
4578
- _.set(this.editQuestion.evaluationItems[_.size(this.editQuestion.evaluationItems) - 1], "type", "ELSE");
4578
+ _$1.set(this.editQuestion.evaluationItems[_$1.size(this.editQuestion.evaluationItems) - 1], "type", "ELSE");
4579
4579
  }
4580
4580
  },
4581
4581
  },
@@ -4690,7 +4690,7 @@ var script$9 = Vue.extend({
4690
4690
  return this.operationType == QUESTION_OPERATION_TYPE_COPY$1;
4691
4691
  },
4692
4692
  questionType() {
4693
- return _.get(this.question, "type");
4693
+ return _$1.get(this.question, "type");
4694
4694
  },
4695
4695
  },
4696
4696
  methods: {
@@ -4764,7 +4764,7 @@ var script$8 = Vue.extend({
4764
4764
  return this.value;
4765
4765
  },
4766
4766
  camelLanguages() {
4767
- return _.map(this.languages, (language) => _.camelCase(language));
4767
+ return _$1.map(this.languages, (language) => _$1.camelCase(language));
4768
4768
  },
4769
4769
  columns() {
4770
4770
  let columns = [
@@ -4774,11 +4774,11 @@ var script$8 = Vue.extend({
4774
4774
  tree: true,
4775
4775
  },
4776
4776
  {
4777
- title: this.t(`survey_creator.translator.table.header_${_.camelCase(this.primaryLanguage)}`) + this.t("survey_creator.translator.table.header_primary_name"),
4777
+ title: this.t(`survey_creator.translator.table.header_${_$1.camelCase(this.primaryLanguage)}`) + this.t("survey_creator.translator.table.header_primary_name"),
4778
4778
  slot: "primaryLanguage",
4779
4779
  },
4780
4780
  ];
4781
- _.forEach(_.map(this.languages, (language) => _.camelCase(language)), (language) => {
4781
+ _$1.forEach(_$1.map(this.languages, (language) => _$1.camelCase(language)), (language) => {
4782
4782
  columns.push({
4783
4783
  title: this.t(`survey_creator.translator.table.header_${language}`),
4784
4784
  slot: language,
@@ -4789,7 +4789,7 @@ var script$8 = Vue.extend({
4789
4789
  },
4790
4790
  methods: {
4791
4791
  onChange(row) {
4792
- _.merge(this.buildDataMap(this.data)[row.tempId], row);
4792
+ _$1.merge(this.buildDataMap(this.data)[row.tempId], row);
4793
4793
  },
4794
4794
  },
4795
4795
  });
@@ -4873,20 +4873,20 @@ var script$7 = Vue.extend({
4873
4873
  },
4874
4874
  methods: {
4875
4875
  buildData() {
4876
- let oldSurvey = _.cloneDeep(this.survey);
4877
- _.forEach(oldSurvey.questions, (question) => {
4876
+ let oldSurvey = _$1.cloneDeep(this.survey);
4877
+ _$1.forEach(oldSurvey.questions, (question) => {
4878
4878
  let item = question.header;
4879
4879
  item["tempId"] = this.buildQuestionId(question);
4880
4880
  item["type"] = question.type;
4881
4881
  item["children"] = [];
4882
4882
  item["_showChildren"] = true;
4883
- _.forEach(question.choices, (choice) => {
4883
+ _$1.forEach(question.choices, (choice) => {
4884
4884
  item.children.push(choice);
4885
4885
  choice["tempId"] = this.buildChoiceId(question, choice);
4886
4886
  item.children["type"] = "";
4887
4887
  });
4888
4888
  if (question.subQuestions) {
4889
- _.forEach(question.subQuestions, (subQuestion) => {
4889
+ _$1.forEach(question.subQuestions, (subQuestion) => {
4890
4890
  subQuestion["type"] = this.SUB_QUESTION_TYPE;
4891
4891
  subQuestion["tempId"] = this.buildSubQuestionId(question, subQuestion);
4892
4892
  item.children.push(subQuestion);
@@ -4897,13 +4897,13 @@ var script$7 = Vue.extend({
4897
4897
  },
4898
4898
  merge(newData) {
4899
4899
  let map = this.buildDataMap(newData);
4900
- _.forEach(this.survey.questions, (question) => {
4900
+ _$1.forEach(this.survey.questions, (question) => {
4901
4901
  question.header.text = map[this.buildQuestionId(question)].text;
4902
- _.forEach(question.choices, (choice) => {
4902
+ _$1.forEach(question.choices, (choice) => {
4903
4903
  choice.text = map[this.buildChoiceId(question, choice)].text;
4904
4904
  });
4905
4905
  if (question.subQuestions) {
4906
- _.forEach(question.subQuestions, (subQuestion) => {
4906
+ _$1.forEach(question.subQuestions, (subQuestion) => {
4907
4907
  subQuestion.text =
4908
4908
  map[this.buildSubQuestionId(question, subQuestion)].text;
4909
4909
  });
@@ -4957,6 +4957,7 @@ var __vue_staticRenderFns__$7 = [];
4957
4957
  var script$6 = Vue.extend({
4958
4958
  name: "previewer-question-row",
4959
4959
  components: {
4960
+ Checkbox,
4960
4961
  Row,
4961
4962
  Col,
4962
4963
  Divider,
@@ -4983,10 +4984,25 @@ var script$6 = Vue.extend({
4983
4984
  required: true,
4984
4985
  },
4985
4986
  },
4987
+ data() {
4988
+ return {
4989
+ enabledSelectQuestion: false,
4990
+ isSelectedQuestion: false
4991
+ };
4992
+ },
4993
+ created() {
4994
+ this.enabledSelectQuestion = _.get(this.$rootComponent, "options.enabledSelectQuestion", false);
4995
+ },
4986
4996
  methods: {
4987
4997
  getJumpRules(val) {
4988
4998
  this.$emit("singleQuestion", val);
4989
4999
  },
5000
+ selectQuestion(val) {
5001
+ this.isSelectedQuestion = val;
5002
+ },
5003
+ onSelectQuestion(seleccted) {
5004
+ this.$emit("onSelectQuestion", seleccted, this.question);
5005
+ },
4990
5006
  },
4991
5007
  });
4992
5008
 
@@ -4994,10 +5010,10 @@ var script$6 = Vue.extend({
4994
5010
  const __vue_script__$6 = script$6;
4995
5011
 
4996
5012
  /* template */
4997
- var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Card',{staticClass:"question-row",attrs:{"padding":0,"bordered":false,"dis-hover":true}},[_c('Divider',{staticClass:"question-type-desc",attrs:{"orientation":"left"}},[_vm._v("\n "+_vm._s(_vm.t(
4998
- ("survey_creator.question.types." + (_vm.question.type)),
4999
- _vm.$rootComponent.currentLanguage
5000
- ))+"\n ")]),_vm._v(" "),_c('question-title',{attrs:{"question":_vm.question,"max-score":true}}),_vm._v(" "),_c('div',{staticClass:"question-row-content"},[_c(_vm.question.type,{tag:"component",staticClass:"question",attrs:{"question":_vm.question,"survey":_vm.survey},on:{"singleQuestion":_vm.getJumpRules}})],1)],1)};
5013
+ var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Card',{staticClass:"question-row",attrs:{"padding":0,"bordered":false,"dis-hover":true}},[_c('div',{staticClass:"question-row-container"},[(_vm.enabledSelectQuestion)?_c('div',{staticClass:"question-row-container-left"},[_c('Checkbox',{on:{"on-change":_vm.onSelectQuestion},model:{value:(_vm.isSelectedQuestion),callback:function ($$v) {_vm.isSelectedQuestion=$$v;},expression:"isSelectedQuestion"}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"question-row-container-right"},[_c('Divider',{staticClass:"question-type-desc",attrs:{"orientation":"left"}},[_vm._v("\n "+_vm._s(_vm.t(
5014
+ ("survey_creator.question.types." + (_vm.question.type)),
5015
+ _vm.$rootComponent.currentLanguage
5016
+ ))+"\n ")]),_vm._v(" "),_c('question-title',{attrs:{"question":_vm.question,"max-score":true}}),_vm._v(" "),_c('div',{staticClass:"question-row-content"},[_c(_vm.question.type,{tag:"component",staticClass:"question",attrs:{"question":_vm.question,"survey":_vm.survey},on:{"singleQuestion":_vm.getJumpRules}})],1)],1)])])};
5001
5017
  var __vue_staticRenderFns__$6 = [];
5002
5018
 
5003
5019
  /* style */
@@ -5039,16 +5055,27 @@ var script$5 = Vue.extend({
5039
5055
  type: Object,
5040
5056
  required: true,
5041
5057
  },
5058
+ initQuestionIds: {
5059
+ type: Array,
5060
+ required: false,
5061
+ },
5042
5062
  },
5043
5063
  data() {
5044
5064
  return {
5045
5065
  sortQuestions: this.survey.questions,
5066
+ selectedQuestions: [],
5046
5067
  };
5047
5068
  },
5069
+ mounted() {
5070
+ this.initSelectedQuestions();
5071
+ },
5048
5072
  computed: {
5049
5073
  questionsSort() {
5050
5074
  return this.sortQuestions;
5051
5075
  },
5076
+ questionIds() {
5077
+ return this.selectedQuestions.map((question) => question.id);
5078
+ },
5052
5079
  },
5053
5080
  methods: {
5054
5081
  setDisabled(item, disabled) {
@@ -5091,6 +5118,64 @@ var script$5 = Vue.extend({
5091
5118
  this.recordQuestionId = selected.questionId;
5092
5119
  }
5093
5120
  },
5121
+ initSelectedQuestions() {
5122
+ if (Array.isArray(this.initQuestionIds) &&
5123
+ this.initQuestionIds.length > 0) {
5124
+ this.initQuestionIds.forEach((id) => {
5125
+ const question = this.sortQuestions.find((item) => item.id === id);
5126
+ question && this.selectQuestionHandler(true, question);
5127
+ });
5128
+ this.sortSelectedQuestions();
5129
+ this.$emit("selected-question-ids", this.questionIds);
5130
+ }
5131
+ },
5132
+ onSelectQuestion(selected, question) {
5133
+ if (selected) {
5134
+ this.selectQuestionHandler(selected, question);
5135
+ }
5136
+ else {
5137
+ this.unSelectQuestionHandler(selected, question);
5138
+ }
5139
+ this.sortSelectedQuestions();
5140
+ this.$emit("selected-question-ids", this.questionIds);
5141
+ },
5142
+ selectQuestionHandler(selected, question) {
5143
+ this.$refs[`question${question.id}`][0].selectQuestion(selected);
5144
+ this.selectedQuestions.push(question);
5145
+ if (Array.isArray(question.jumps) && question.jumps.length > 0) {
5146
+ question.jumps.forEach((item) => {
5147
+ const jumpItem = this.sortQuestions.find((i) => item.toQuestionId === i.id);
5148
+ if (jumpItem &&
5149
+ !this.selectedQuestions.find((i) => i.id === jumpItem.id)) {
5150
+ this.selectQuestionHandler(selected, jumpItem);
5151
+ }
5152
+ });
5153
+ }
5154
+ },
5155
+ unSelectQuestionHandler(selected, question) {
5156
+ this.$refs[`question${question.id}`][0].selectQuestion(selected);
5157
+ _.remove(this.selectedQuestions, (q) => q.id === question.id);
5158
+ this.sortQuestions.forEach((item) => {
5159
+ if (Array.isArray(item.jumps) && item.jumps.length > 0) {
5160
+ const jumpItem = item.jumps.find((i) => i.toQuestionId === question.id);
5161
+ if (jumpItem &&
5162
+ this.selectedQuestions.find((i) => i.id === item.id)) {
5163
+ this.unSelectQuestionHandler(selected, item);
5164
+ }
5165
+ }
5166
+ });
5167
+ },
5168
+ sortSelectedQuestions() {
5169
+ this.selectedQuestions.sort((first, second) => {
5170
+ if (first.header.number > second.header.number) {
5171
+ return 1;
5172
+ }
5173
+ if (first.header.number < second.header.number) {
5174
+ return -1;
5175
+ }
5176
+ return 0;
5177
+ });
5178
+ },
5094
5179
  },
5095
5180
  });
5096
5181
 
@@ -5098,7 +5183,7 @@ var script$5 = Vue.extend({
5098
5183
  const __vue_script__$5 = script$5;
5099
5184
 
5100
5185
  /* template */
5101
- var __vue_render__$5 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"survey-internal-previewer-wrapper"},_vm._l((_vm.sortQuestions),function(question){return _c('previewer-question-row',{key:question.id,attrs:{"question":question,"survey":_vm.survey},on:{"singleQuestion":_vm.handleSelected}})}),1)};
5186
+ var __vue_render__$5 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"survey-internal-previewer-wrapper"},_vm._l((_vm.sortQuestions),function(question){return _c('previewer-question-row',{key:question.id,ref:("question" + (question.id)),refInFor:true,attrs:{"question":question,"survey":_vm.survey},on:{"singleQuestion":_vm.handleSelected,"onSelectQuestion":_vm.onSelectQuestion}})}),1)};
5102
5187
  var __vue_staticRenderFns__$5 = [];
5103
5188
 
5104
5189
  /* style */
@@ -5222,7 +5307,7 @@ var script$3 = Vue.extend({
5222
5307
  },
5223
5308
  computed: {
5224
5309
  choices() {
5225
- return _.map(this.editQuestion.choices, (q) => {
5310
+ return _$1.map(this.editQuestion.choices, (q) => {
5226
5311
  return {
5227
5312
  value: q.id,
5228
5313
  label: q.text[this.$rootComponent.primaryLanguage],
@@ -5230,19 +5315,19 @@ var script$3 = Vue.extend({
5230
5315
  });
5231
5316
  },
5232
5317
  questionChoicesIds() {
5233
- return _.map(this.editQuestion.choices, (choice) => choice.id);
5318
+ return _$1.map(this.editQuestion.choices, (choice) => choice.id);
5234
5319
  },
5235
5320
  hasSettingChoicesIds() {
5236
- return _.map(this.editQuestion.jumps, (jump) => jump.choiceId);
5321
+ return _$1.map(this.editQuestion.jumps, (jump) => jump.choiceId);
5237
5322
  },
5238
5323
  showAddBtn() {
5239
- return !_.isEmpty(_.filter(this.questionChoicesIds, (choiceId) => !_.includes(this.hasSettingChoicesIds, choiceId)));
5324
+ return !_$1.isEmpty(_$1.filter(this.questionChoicesIds, (choiceId) => !_$1.includes(this.hasSettingChoicesIds, choiceId)));
5240
5325
  },
5241
5326
  showDeleteBtn() {
5242
- return _.size(this.editQuestion.jumps) > 1;
5327
+ return _$1.size(this.editQuestion.jumps) > 1;
5243
5328
  },
5244
5329
  firstEnabledChoiceId() {
5245
- return _.find(this.choices, (choice) => !_.includes(this.hasSettingChoicesIds, choice.value)).value;
5330
+ return _$1.find(this.choices, (choice) => !_$1.includes(this.hasSettingChoicesIds, choice.value)).value;
5246
5331
  },
5247
5332
  },
5248
5333
  methods: {
@@ -5256,7 +5341,7 @@ var script$3 = Vue.extend({
5256
5341
  });
5257
5342
  },
5258
5343
  disabledChoice(item) {
5259
- return _.includes(this.hasSettingChoicesIds, item.value);
5344
+ return _$1.includes(this.hasSettingChoicesIds, item.value);
5260
5345
  },
5261
5346
  deleteJumpItem(index) {
5262
5347
  this.editQuestion.jumps.splice(index, 1);
@@ -5371,8 +5456,8 @@ var script$2 = Vue.extend({
5371
5456
  };
5372
5457
  },
5373
5458
  created() {
5374
- let question = _.cloneDeep(this.fromQuestion);
5375
- if (_.size(_.get(question, "jumps", [])) === 0) {
5459
+ let question = _$1.cloneDeep(this.fromQuestion);
5460
+ if (_$1.size(_$1.get(question, "jumps", [])) === 0) {
5376
5461
  question.jumps = [];
5377
5462
  }
5378
5463
  this.selectedQuestion = question;
@@ -5529,18 +5614,18 @@ var script$1 = Vue.extend({
5529
5614
  };
5530
5615
  },
5531
5616
  created() {
5532
- this.originSurvey = _.cloneDeep(this.survey);
5533
- this.currentSurvey = _.cloneDeep(this.survey);
5534
- _.forEach(this.currentSurvey.questions, question => {
5617
+ this.originSurvey = _$1.cloneDeep(this.survey);
5618
+ this.currentSurvey = _$1.cloneDeep(this.survey);
5619
+ _$1.forEach(this.currentSurvey.questions, question => {
5535
5620
  this.$set(question, "active", false);
5536
5621
  });
5537
5622
  if (this.currentSurvey.questions.length > 0) {
5538
5623
  this.currentSurvey.questions[0].active = true;
5539
5624
  }
5540
- this.primaryLanguage = _.camelCase(this.currentSurvey.options.primaryLanguage);
5625
+ this.primaryLanguage = _$1.camelCase(this.currentSurvey.options.primaryLanguage);
5541
5626
  if (this.showQuestionWhenPageLoad) {
5542
- const question = _.find(this.currentSurvey?.questions, questions => { return questions.type === this.showQuestionType; });
5543
- if (_.isUndefined(question)) {
5627
+ const question = _$1.find(this.currentSurvey?.questions, questions => { return questions.type === this.showQuestionType; });
5628
+ if (_$1.isUndefined(question)) {
5544
5629
  this.createQuestion(this.showQuestionType);
5545
5630
  }
5546
5631
  else {
@@ -5564,7 +5649,7 @@ var script$1 = Vue.extend({
5564
5649
  },
5565
5650
  watch: {
5566
5651
  survey(val) {
5567
- this.originSurvey = _.cloneDeep(val);
5652
+ this.originSurvey = _$1.cloneDeep(val);
5568
5653
  }
5569
5654
  },
5570
5655
  methods: {
@@ -5598,8 +5683,8 @@ var script$1 = Vue.extend({
5598
5683
  }
5599
5684
  },
5600
5685
  getPureSurvey(survey) {
5601
- let temp = _.cloneDeep(survey);
5602
- _.forEach(temp.questions, question => {
5686
+ let temp = _$1.cloneDeep(survey);
5687
+ _$1.forEach(temp.questions, question => {
5603
5688
  this.$delete(question, "active");
5604
5689
  });
5605
5690
  return temp;
@@ -5627,10 +5712,10 @@ var script$1 = Vue.extend({
5627
5712
  },
5628
5713
  onLayoutChange(layout) {
5629
5714
  this.currentSurvey.options.layout = layout;
5630
- _.forEach(this.currentSurvey.questions, question => (question.options.layout = layout));
5715
+ _$1.forEach(this.currentSurvey.questions, question => (question.options.layout = layout));
5631
5716
  },
5632
5717
  onQuestionCopy(id) {
5633
- let fromIndex = _.findIndex(this.currentSurvey.questions, { id: id });
5718
+ let fromIndex = _$1.findIndex(this.currentSurvey.questions, { id: id });
5634
5719
  if (fromIndex == -1) {
5635
5720
  return;
5636
5721
  }
@@ -5641,7 +5726,7 @@ var script$1 = Vue.extend({
5641
5726
  this.showQuestionEditDrawer(copiedQuestion);
5642
5727
  },
5643
5728
  onQuestionCreateOrUpdate(newQuestion, operationType) {
5644
- let existQuestionIndex = _.findIndex(this.currentSurvey.questions, {
5729
+ let existQuestionIndex = _$1.findIndex(this.currentSurvey.questions, {
5645
5730
  id: newQuestion.id
5646
5731
  });
5647
5732
  if (existQuestionIndex > -1) {
@@ -5663,36 +5748,36 @@ var script$1 = Vue.extend({
5663
5748
  }
5664
5749
  },
5665
5750
  onQuestionDelete(id) {
5666
- _.forEach(this.currentSurvey.questions, (question, index) => {
5667
- let tempQuestion = _.cloneDeep(question);
5668
- _.remove(tempQuestion.jumps, (jump) => jump.toQuestionId === id);
5751
+ _$1.forEach(this.currentSurvey.questions, (question, index) => {
5752
+ let tempQuestion = _$1.cloneDeep(question);
5753
+ _$1.remove(tempQuestion.jumps, (jump) => jump.toQuestionId === id);
5669
5754
  Vue.set(this.currentSurvey.questions, index, tempQuestion);
5670
5755
  });
5671
- _.remove(this.currentSurvey.questions, function (question) {
5756
+ _$1.remove(this.currentSurvey.questions, function (question) {
5672
5757
  return question.id === id;
5673
5758
  });
5674
- this.currentSurvey.questions = _.clone(this.currentSurvey.questions);
5759
+ this.currentSurvey.questions = _$1.clone(this.currentSurvey.questions);
5675
5760
  BaseQuestionModel.refreshSurvey(this.currentSurvey);
5676
5761
  },
5677
5762
  onQuestionEdit(id) {
5678
- let question = _.cloneDeep(_.find(this.currentSurvey.questions, {
5763
+ let question = _$1.cloneDeep(_$1.find(this.currentSurvey.questions, {
5679
5764
  id: id
5680
5765
  }));
5681
5766
  this.operationType = QUESTION_OPERATION_TYPE_UPDATE;
5682
5767
  this.showQuestionEditDrawer(question);
5683
5768
  },
5684
5769
  onQuestionJump(id) {
5685
- let question = _.cloneDeep(_.find(this.currentSurvey.questions, {
5770
+ let question = _$1.cloneDeep(_$1.find(this.currentSurvey.questions, {
5686
5771
  id: id
5687
5772
  }));
5688
5773
  this.operationType = QUESTION_OPERATION_TYPE_UPDATE;
5689
- let toQuestions = _.cloneDeep(_.filter(this.currentSurvey.questions, (item) => item.id != id
5774
+ let toQuestions = _$1.cloneDeep(_$1.filter(this.currentSurvey.questions, (item) => item.id != id
5690
5775
  && !("TEXT_TITLE" === item.type)
5691
5776
  && !("EVALUATION" === item.type)));
5692
5777
  this.showQuestionJumpDrawer(question, toQuestions);
5693
5778
  },
5694
5779
  createQuestionFrom(survey, fromQuestion) {
5695
- let newQuestion = _.cloneDeep(fromQuestion);
5780
+ let newQuestion = _$1.cloneDeep(fromQuestion);
5696
5781
  newQuestion.id = BaseQuestionModel.createQuestionId();
5697
5782
  return newQuestion;
5698
5783
  },
@@ -5764,6 +5849,10 @@ var script = Vue.extend({
5764
5849
  type: Object,
5765
5850
  required: true,
5766
5851
  },
5852
+ initQuestionIds: {
5853
+ type: Array,
5854
+ required: false,
5855
+ },
5767
5856
  },
5768
5857
  data() {
5769
5858
  return {
@@ -5779,10 +5868,13 @@ var script = Vue.extend({
5779
5868
  this.$emit("on-back");
5780
5869
  },
5781
5870
  onChangeLanguage(language) {
5782
- this.currentSurvey = _.cloneDeep(this.survey);
5871
+ this.currentSurvey = _$1.cloneDeep(this.survey);
5783
5872
  Vue.$surveyLanguage = language;
5784
5873
  this.currentLanguage = language;
5785
5874
  },
5875
+ selectedQuestionIds(questionIds) {
5876
+ this.$emit("selected-question-ids", questionIds);
5877
+ },
5786
5878
  },
5787
5879
  });
5788
5880
 
@@ -5790,7 +5882,7 @@ var script = Vue.extend({
5790
5882
  const __vue_script__ = script;
5791
5883
 
5792
5884
  /* template */
5793
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.currentSurvey)?_c('div',{staticClass:"survey-preview-wrapper"},[_c('Row',{attrs:{"type":"flex","justify":"space-between","align":"middle"}},[_c('Col',[(_vm.options.back)?_c('Button',{attrs:{"icon":"ios-arrow-back"},on:{"click":_vm.onBack}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.common.back"))+"\n ")]):_vm._e()],1),_vm._v(" "),_c('Col',[_c('toolbar',{attrs:{"survey":_vm.currentSurvey,"create-question":false,"translate":true,"preview":false,"change-language":true}})],1)],1),_vm._v(" "),_c('div',{staticClass:"survey-editor-wrapper"},[_c('survey-internal-previewer',{attrs:{"survey":_vm.currentSurvey}})],1)],1):_vm._e()};
5885
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.currentSurvey)?_c('div',{staticClass:"survey-preview-wrapper"},[_c('Row',{attrs:{"type":"flex","justify":"space-between","align":"middle"}},[_c('Col',[(_vm.options.back)?_c('Button',{attrs:{"icon":"ios-arrow-back"},on:{"click":_vm.onBack}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.common.back"))+"\n ")]):_vm._e()],1),_vm._v(" "),_c('Col',[_c('toolbar',{attrs:{"survey":_vm.currentSurvey,"create-question":false,"translate":true,"preview":false,"change-language":_vm.options.changeLanguage}})],1)],1),_vm._v(" "),_c('div',{staticClass:"survey-editor-wrapper"},[_c('survey-internal-previewer',{attrs:{"survey":_vm.currentSurvey,"init-question-ids":_vm.initQuestionIds},on:{"selected-question-ids":_vm.selectedQuestionIds}})],1)],1):_vm._e()};
5794
5886
  var __vue_staticRenderFns__ = [];
5795
5887
 
5796
5888
  /* style */