@wg-npm/survey-creator 0.3.22845 → 0.3.23193
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.
|
@@ -326,58 +326,44 @@ class QuestionFactory {
|
|
|
326
326
|
return new QuestionEvaluationModel("EVALUATION", locale);
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
|
|
330
329
|
static getInstance(locale) {
|
|
331
330
|
if (!QuestionFactory.instance) {
|
|
332
331
|
QuestionFactory.instance = new QuestionFactory(locale);
|
|
333
332
|
}
|
|
334
|
-
|
|
335
333
|
return QuestionFactory.instance;
|
|
336
334
|
}
|
|
337
|
-
|
|
338
335
|
static createDefault(locale) {
|
|
339
336
|
return new ChoiceModel(locale);
|
|
340
337
|
}
|
|
341
|
-
|
|
342
338
|
static createSubQuestion(locale) {
|
|
343
339
|
return new SubQuestionModel(locale);
|
|
344
340
|
}
|
|
345
|
-
|
|
346
341
|
static createEvaluationItem(locale) {
|
|
347
342
|
return new StarEvaluationItemModel(locale);
|
|
348
343
|
}
|
|
349
|
-
|
|
350
344
|
static createSelectionQuestionChoices(locale) {
|
|
351
345
|
return _.range(4).map(() => this.createDefault(locale));
|
|
352
346
|
}
|
|
353
|
-
|
|
354
347
|
static createMatrixQuestionChoices(locale) {
|
|
355
348
|
return _.range(5).map(() => this.createDefault(locale));
|
|
356
349
|
}
|
|
357
|
-
|
|
358
350
|
static createEvaluationItems(locale) {
|
|
359
351
|
return _.range(5).map(() => this.createEvaluationItem(locale));
|
|
360
352
|
}
|
|
361
|
-
|
|
362
353
|
registerQuestion(questionType, questionCreator) {
|
|
363
354
|
this.creatorHash[questionType] = questionCreator;
|
|
364
355
|
}
|
|
365
|
-
|
|
366
356
|
createQuestion(questionType) {
|
|
367
357
|
const creator = this.creatorHash[questionType];
|
|
368
358
|
return creator(this.locale);
|
|
369
359
|
}
|
|
370
|
-
|
|
371
360
|
static createExclusiveChoice(locale) {
|
|
372
361
|
return new ExclusiveChoiceModel(locale);
|
|
373
362
|
}
|
|
374
|
-
|
|
375
363
|
}
|
|
376
|
-
|
|
377
364
|
const defaultText = function getText(locale) {
|
|
378
365
|
return _.set({}, locale, "");
|
|
379
366
|
};
|
|
380
|
-
|
|
381
367
|
class ChoiceOptionModel {
|
|
382
368
|
constructor() {
|
|
383
369
|
this.score = null;
|
|
@@ -385,78 +371,59 @@ class ChoiceOptionModel {
|
|
|
385
371
|
this.starCount = null;
|
|
386
372
|
this.exclusiveEnabled = false;
|
|
387
373
|
}
|
|
388
|
-
|
|
389
374
|
}
|
|
390
|
-
|
|
391
375
|
class ChoiceModel {
|
|
392
376
|
constructor(locale) {
|
|
393
377
|
this.id = ChoiceModel.createChoiceId();
|
|
394
378
|
this.text = defaultText(locale);
|
|
395
379
|
this.options = new ChoiceOptionModel();
|
|
396
380
|
}
|
|
397
|
-
|
|
398
381
|
static createChoiceId() {
|
|
399
382
|
return `Choice-${_.now()}-${_.random(0, 9999999)}`;
|
|
400
383
|
}
|
|
401
|
-
|
|
402
384
|
}
|
|
403
|
-
|
|
404
385
|
class ExclusiveChoiceModel extends ChoiceModel {
|
|
405
386
|
constructor(locale) {
|
|
406
387
|
super(locale);
|
|
407
|
-
|
|
408
388
|
if (!_.isEmpty(this.options)) {
|
|
409
389
|
_.set(this.options, "exclusiveEnabled", true);
|
|
410
390
|
}
|
|
411
391
|
}
|
|
412
|
-
|
|
413
392
|
}
|
|
414
|
-
|
|
415
393
|
class EvaluationItemModel {
|
|
416
394
|
constructor(locale) {
|
|
417
395
|
this.id = EvaluationItemModel.createChoiceId();
|
|
418
396
|
this.text = defaultText(locale);
|
|
419
397
|
}
|
|
420
|
-
|
|
421
398
|
static createChoiceId() {
|
|
422
399
|
return `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`;
|
|
423
400
|
}
|
|
424
|
-
|
|
425
401
|
}
|
|
426
|
-
|
|
427
402
|
class StarEvaluationItemModel extends EvaluationItemModel {
|
|
428
403
|
constructor(locale) {
|
|
429
404
|
super(locale);
|
|
430
405
|
}
|
|
431
|
-
|
|
432
406
|
}
|
|
433
|
-
|
|
434
407
|
class QuestionOptionsModel {
|
|
435
408
|
constructor(required) {
|
|
436
409
|
this.inputMinLength = 10;
|
|
437
410
|
this.required = required;
|
|
438
411
|
this.visible = true;
|
|
439
412
|
}
|
|
440
|
-
|
|
441
413
|
}
|
|
442
|
-
|
|
443
414
|
class QuestionHeaderModel {
|
|
444
415
|
constructor(locale) {
|
|
445
416
|
this.text = defaultText(locale);
|
|
446
417
|
this.number = null;
|
|
447
418
|
}
|
|
448
|
-
|
|
449
419
|
}
|
|
450
|
-
|
|
451
420
|
class SubQuestionModel {
|
|
452
421
|
constructor(locale) {
|
|
453
422
|
this.id = `SubQ-${_.now()}-${_.random(0, 9999999)}`;
|
|
454
423
|
this.text = defaultText(locale);
|
|
455
424
|
this.number = null;
|
|
456
425
|
}
|
|
457
|
-
|
|
458
426
|
}
|
|
459
|
-
|
|
460
427
|
class BaseQuestionModel {
|
|
461
428
|
constructor(type, locale) {
|
|
462
429
|
this.id = BaseQuestionModel.createQuestionId();
|
|
@@ -464,7 +431,6 @@ class BaseQuestionModel {
|
|
|
464
431
|
this.header = new QuestionHeaderModel(locale);
|
|
465
432
|
this.options = new QuestionOptionsModel(false);
|
|
466
433
|
}
|
|
467
|
-
|
|
468
434
|
static getMaxScore(question) {
|
|
469
435
|
if (question.type == "SINGLE_SELECTION") {
|
|
470
436
|
return _.max(_.map(question.choices, choice => parseFloat(_.get(choice, "options.score", 0) || 0))) || 0;
|
|
@@ -477,57 +443,44 @@ class BaseQuestionModel {
|
|
|
477
443
|
const score = question.options.maxRange;
|
|
478
444
|
return score * (_.isEmpty(question.subQuestions) ? 1 : question.subQuestions.length);
|
|
479
445
|
}
|
|
480
|
-
|
|
481
446
|
return 0;
|
|
482
447
|
}
|
|
483
|
-
|
|
484
448
|
static getScoreRange(question) {
|
|
485
449
|
if (question.type == "SCORING") {
|
|
486
450
|
const minRange = question.options.minRange;
|
|
487
451
|
const maxRange = question.options.maxRange;
|
|
488
452
|
return minRange + " - " + maxRange;
|
|
489
453
|
}
|
|
490
|
-
|
|
491
454
|
return "";
|
|
492
455
|
}
|
|
493
|
-
|
|
494
456
|
static createQuestionId() {
|
|
495
457
|
return `Q-${_.now()}-${_.random(0, 9999999)}`;
|
|
496
458
|
}
|
|
497
|
-
|
|
498
459
|
static getNumber(preNumber, question) {
|
|
499
460
|
return preNumber + 1;
|
|
500
461
|
}
|
|
501
|
-
|
|
502
462
|
static refreshSurvey(survey) {
|
|
503
463
|
this.rebuildQuestionNumber(survey.questions);
|
|
504
464
|
survey.statistics.maxScore = this.calculationAllQuestionMaxScore(survey.questions);
|
|
505
465
|
survey.statistics.questionCount = this.calculationAllQuestionCount(survey.questions);
|
|
506
466
|
}
|
|
507
|
-
|
|
508
467
|
static calculationAllQuestionCount(questions) {
|
|
509
468
|
let count = 0;
|
|
510
469
|
const exclude = ["TEXT_TITLE"];
|
|
511
|
-
|
|
512
470
|
_.forEach(questions, question => {
|
|
513
471
|
if (!_.includes(exclude, question.type)) {
|
|
514
472
|
count++;
|
|
515
473
|
}
|
|
516
474
|
});
|
|
517
|
-
|
|
518
475
|
return count;
|
|
519
476
|
}
|
|
520
|
-
|
|
521
477
|
static calculationAllQuestionMaxScore(questions) {
|
|
522
478
|
let maxScore = 0;
|
|
523
|
-
|
|
524
479
|
_.forEach(questions, question => {
|
|
525
480
|
maxScore += this.getMaxScore(question);
|
|
526
481
|
});
|
|
527
|
-
|
|
528
482
|
return maxScore;
|
|
529
483
|
}
|
|
530
|
-
|
|
531
484
|
static setActiveQuestion(currentQuestion, questions) {
|
|
532
485
|
_.forEach(questions, question => {
|
|
533
486
|
if (question.id == currentQuestion.id) {
|
|
@@ -537,13 +490,10 @@ class BaseQuestionModel {
|
|
|
537
490
|
}
|
|
538
491
|
});
|
|
539
492
|
}
|
|
540
|
-
|
|
541
493
|
static rebuildQuestionNumber(questions) {
|
|
542
494
|
let preNumber = 0;
|
|
543
|
-
|
|
544
495
|
_.forEach(questions, function (question) {
|
|
545
496
|
let number;
|
|
546
|
-
|
|
547
497
|
if (question.type === "TEXT_TITLE") {
|
|
548
498
|
number = QuestionTextTitleModel.getNumber(preNumber, question);
|
|
549
499
|
} else if (question.type === "MATRIX") {
|
|
@@ -553,104 +503,75 @@ class BaseQuestionModel {
|
|
|
553
503
|
} else {
|
|
554
504
|
number = BaseQuestionModel.getNumber(preNumber, question);
|
|
555
505
|
}
|
|
556
|
-
|
|
557
506
|
question.header.number = number;
|
|
558
|
-
|
|
559
507
|
if (number) {
|
|
560
508
|
preNumber = number;
|
|
561
509
|
}
|
|
562
510
|
});
|
|
563
511
|
}
|
|
564
|
-
|
|
565
512
|
}
|
|
566
|
-
|
|
567
513
|
class QuestionCheckBoxModel extends BaseQuestionModel {
|
|
568
514
|
constructor(type, locale) {
|
|
569
515
|
super(type, locale);
|
|
570
516
|
this.choices = QuestionFactory.createSelectionQuestionChoices(locale);
|
|
571
517
|
}
|
|
572
|
-
|
|
573
518
|
}
|
|
574
|
-
|
|
575
519
|
class QuestionEvaluationModel extends BaseQuestionModel {
|
|
576
520
|
constructor(type, locale) {
|
|
577
521
|
super(type, locale);
|
|
578
522
|
this.evaluationItems = QuestionFactory.createEvaluationItems(locale);
|
|
579
523
|
}
|
|
580
|
-
|
|
581
524
|
}
|
|
582
|
-
|
|
583
525
|
class QuestionTextTitleModel extends BaseQuestionModel {
|
|
584
526
|
constructor(type, locale) {
|
|
585
527
|
super(type, locale);
|
|
586
528
|
}
|
|
587
|
-
|
|
588
529
|
static getNumber(preNumber, question) {
|
|
589
530
|
return null;
|
|
590
531
|
}
|
|
591
|
-
|
|
592
532
|
}
|
|
593
|
-
|
|
594
533
|
class QuestionMatrixModel extends BaseQuestionModel {
|
|
595
534
|
constructor(type, locale) {
|
|
596
535
|
super(type, locale);
|
|
597
536
|
this.choices = QuestionFactory.createMatrixQuestionChoices(locale);
|
|
598
537
|
this.subQuestions = [QuestionFactory.createSubQuestion(locale)];
|
|
599
538
|
}
|
|
600
|
-
|
|
601
539
|
static getNumber(preNumber, question) {
|
|
602
540
|
const number = preNumber + 1;
|
|
603
|
-
|
|
604
541
|
_.forEach(question.subQuestions, (sq, index) => {
|
|
605
542
|
sq.number = index + 1;
|
|
606
543
|
});
|
|
607
|
-
|
|
608
544
|
return number;
|
|
609
545
|
}
|
|
610
|
-
|
|
611
546
|
}
|
|
612
|
-
|
|
613
547
|
class QuestionScoringModel extends BaseQuestionModel {
|
|
614
548
|
constructor(type, locale) {
|
|
615
549
|
super(type, locale);
|
|
616
550
|
this.subQuestions = [];
|
|
617
551
|
}
|
|
618
|
-
|
|
619
552
|
static getNumber(preNumber, question) {
|
|
620
553
|
const number = preNumber + 1;
|
|
621
|
-
|
|
622
554
|
_.forEach(question.subQuestions, (sq, index) => {
|
|
623
555
|
sq.number = index + 1;
|
|
624
556
|
});
|
|
625
|
-
|
|
626
557
|
return number;
|
|
627
558
|
}
|
|
628
|
-
|
|
629
559
|
}
|
|
630
|
-
|
|
631
560
|
const ZH_CN = _.camelCase("zh-CN");
|
|
632
|
-
|
|
633
561
|
const EN_US = _.camelCase("en-US");
|
|
634
|
-
|
|
635
562
|
const ZH_TW = _.camelCase("zh-TW");
|
|
636
|
-
|
|
637
563
|
function getValue(obj, locale) {
|
|
638
564
|
const value = _.get(obj, _.camelCase(locale), "");
|
|
639
|
-
|
|
640
565
|
if (!_.isEmpty(value)) {
|
|
641
566
|
return value;
|
|
642
567
|
}
|
|
643
|
-
|
|
644
568
|
return _.get(obj, locale, "");
|
|
645
569
|
}
|
|
646
|
-
|
|
647
570
|
function translate(obj, locale, prettyMath = false) {
|
|
648
571
|
const value = getValue(obj, locale);
|
|
649
|
-
|
|
650
572
|
if (!_.isEmpty(value) || !prettyMath) {
|
|
651
573
|
return value;
|
|
652
574
|
}
|
|
653
|
-
|
|
654
575
|
return obj[ZH_CN] || obj["zh-CN"] || obj[EN_US] || obj["en-US"] || obj[ZH_TW] || obj["zh-TW"];
|
|
655
576
|
}
|
|
656
577
|
|
|
@@ -780,87 +701,79 @@ var script$L = Vue.extend({
|
|
|
780
701
|
},
|
|
781
702
|
});
|
|
782
703
|
|
|
783
|
-
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
} else {
|
|
857
|
-
// inject component registration as beforeCreate hook
|
|
858
|
-
const existing = options.beforeCreate;
|
|
859
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
return script;
|
|
704
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
705
|
+
if (typeof shadowMode !== 'boolean') {
|
|
706
|
+
createInjectorSSR = createInjector;
|
|
707
|
+
createInjector = shadowMode;
|
|
708
|
+
shadowMode = false;
|
|
709
|
+
}
|
|
710
|
+
// Vue.extend constructor export interop.
|
|
711
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
712
|
+
// render functions
|
|
713
|
+
if (template && template.render) {
|
|
714
|
+
options.render = template.render;
|
|
715
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
716
|
+
options._compiled = true;
|
|
717
|
+
// functional template
|
|
718
|
+
if (isFunctionalTemplate) {
|
|
719
|
+
options.functional = true;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
// scopedId
|
|
723
|
+
if (scopeId) {
|
|
724
|
+
options._scopeId = scopeId;
|
|
725
|
+
}
|
|
726
|
+
let hook;
|
|
727
|
+
if (moduleIdentifier) {
|
|
728
|
+
// server build
|
|
729
|
+
hook = function (context) {
|
|
730
|
+
// 2.3 injection
|
|
731
|
+
context =
|
|
732
|
+
context || // cached call
|
|
733
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
734
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
735
|
+
// 2.2 with runInNewContext: true
|
|
736
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
737
|
+
context = __VUE_SSR_CONTEXT__;
|
|
738
|
+
}
|
|
739
|
+
// inject component styles
|
|
740
|
+
if (style) {
|
|
741
|
+
style.call(this, createInjectorSSR(context));
|
|
742
|
+
}
|
|
743
|
+
// register component module identifier for async chunk inference
|
|
744
|
+
if (context && context._registeredComponents) {
|
|
745
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
// used by ssr in case component is cached and beforeCreate
|
|
749
|
+
// never gets called
|
|
750
|
+
options._ssrRegister = hook;
|
|
751
|
+
}
|
|
752
|
+
else if (style) {
|
|
753
|
+
hook = shadowMode
|
|
754
|
+
? function (context) {
|
|
755
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
756
|
+
}
|
|
757
|
+
: function (context) {
|
|
758
|
+
style.call(this, createInjector(context));
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
if (hook) {
|
|
762
|
+
if (options.functional) {
|
|
763
|
+
// register for functional component in vue file
|
|
764
|
+
const originalRender = options.render;
|
|
765
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
766
|
+
hook.call(context);
|
|
767
|
+
return originalRender(h, context);
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
// inject component registration as beforeCreate hook
|
|
772
|
+
const existing = options.beforeCreate;
|
|
773
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
return script;
|
|
864
777
|
}
|
|
865
778
|
|
|
866
779
|
/* script */
|
|
@@ -1155,57 +1068,57 @@ var script$H = Vue.extend({
|
|
|
1155
1068
|
},
|
|
1156
1069
|
});
|
|
1157
1070
|
|
|
1158
|
-
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1159
|
-
|
|
1160
|
-
function createInjector(context) {
|
|
1161
|
-
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1071
|
+
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1072
|
+
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
1073
|
+
function createInjector(context) {
|
|
1074
|
+
return (id, style) => addStyle(id, style);
|
|
1075
|
+
}
|
|
1076
|
+
let HEAD;
|
|
1077
|
+
const styles = {};
|
|
1078
|
+
function addStyle(id, css) {
|
|
1079
|
+
const group = isOldIE ? css.media || 'default' : id;
|
|
1080
|
+
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
1081
|
+
if (!style.ids.has(id)) {
|
|
1082
|
+
style.ids.add(id);
|
|
1083
|
+
let code = css.source;
|
|
1084
|
+
if (css.map) {
|
|
1085
|
+
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
1086
|
+
// this makes source maps inside style tags work properly in Chrome
|
|
1087
|
+
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
1088
|
+
// http://stackoverflow.com/a/26603875
|
|
1089
|
+
code +=
|
|
1090
|
+
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
1091
|
+
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
1092
|
+
' */';
|
|
1093
|
+
}
|
|
1094
|
+
if (!style.element) {
|
|
1095
|
+
style.element = document.createElement('style');
|
|
1096
|
+
style.element.type = 'text/css';
|
|
1097
|
+
if (css.media)
|
|
1098
|
+
style.element.setAttribute('media', css.media);
|
|
1099
|
+
if (HEAD === undefined) {
|
|
1100
|
+
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
1101
|
+
}
|
|
1102
|
+
HEAD.appendChild(style.element);
|
|
1103
|
+
}
|
|
1104
|
+
if ('styleSheet' in style.element) {
|
|
1105
|
+
style.styles.push(code);
|
|
1106
|
+
style.element.styleSheet.cssText = style.styles
|
|
1107
|
+
.filter(Boolean)
|
|
1108
|
+
.join('\n');
|
|
1109
|
+
}
|
|
1110
|
+
else {
|
|
1111
|
+
const index = style.ids.size - 1;
|
|
1112
|
+
const textNode = document.createTextNode(code);
|
|
1113
|
+
const nodes = style.element.childNodes;
|
|
1114
|
+
if (nodes[index])
|
|
1115
|
+
style.element.removeChild(nodes[index]);
|
|
1116
|
+
if (nodes.length)
|
|
1117
|
+
style.element.insertBefore(textNode, nodes[index]);
|
|
1118
|
+
else
|
|
1119
|
+
style.element.appendChild(textNode);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1209
1122
|
}
|
|
1210
1123
|
|
|
1211
1124
|
/* script */
|
|
@@ -1760,6 +1673,7 @@ var __vue_staticRenderFns__$B = [];
|
|
|
1760
1673
|
//
|
|
1761
1674
|
//
|
|
1762
1675
|
//
|
|
1676
|
+
|
|
1763
1677
|
var script$A = {
|
|
1764
1678
|
name: "text-title"
|
|
1765
1679
|
};
|
|
@@ -3335,8 +3249,8 @@ var script$l = Vue.extend({
|
|
|
3335
3249
|
},
|
|
3336
3250
|
watch: {
|
|
3337
3251
|
"editQuestion.options.maxRange": function () {
|
|
3338
|
-
|
|
3339
|
-
|
|
3252
|
+
if ((!this.editQuestion.subQuestions ||
|
|
3253
|
+
_.isEmpty(this.editQuestion.subQuestions)) &&
|
|
3340
3254
|
this.editQuestion.options.sliderValue >
|
|
3341
3255
|
this.editQuestion.options.maxRange) {
|
|
3342
3256
|
this.editQuestion.options.sliderValue =
|
|
@@ -3351,7 +3265,6 @@ var script$l = Vue.extend({
|
|
|
3351
3265
|
}
|
|
3352
3266
|
},
|
|
3353
3267
|
"editQuestion.options.minRange": function () {
|
|
3354
|
-
debugger;
|
|
3355
3268
|
if ((!this.editQuestion.subQuestions ||
|
|
3356
3269
|
_.isEmpty(this.editQuestion.subQuestions)) &&
|
|
3357
3270
|
(!this.editQuestion.options.sliderValue ||
|
|
@@ -3398,11 +3311,11 @@ var __vue_staticRenderFns__$l = [];
|
|
|
3398
3311
|
/* style */
|
|
3399
3312
|
const __vue_inject_styles__$l = function (inject) {
|
|
3400
3313
|
if (!inject) return
|
|
3401
|
-
inject("data-v-
|
|
3314
|
+
inject("data-v-ae3686b8_0", { source: "[data-v-ae3686b8] .ivu-form-item{width:100%}.btn-container[data-v-ae3686b8]{padding-left:8px}.btn-container .icon[data-v-ae3686b8]{display:flex;float:left;font-size:18px}.btn-container .label[data-v-ae3686b8]{display:flex;float:left;align-items:center;font-weight:500;font-size:14px;line-height:22px}.btn-container .disabled[data-v-ae3686b8]{color:#c5c8ce}.btn-container .enabled[data-v-ae3686b8]{color:#1890ff;cursor:pointer}", map: undefined, media: undefined });
|
|
3402
3315
|
|
|
3403
3316
|
};
|
|
3404
3317
|
/* scoped */
|
|
3405
|
-
const __vue_scope_id__$l = "data-v-
|
|
3318
|
+
const __vue_scope_id__$l = "data-v-ae3686b8";
|
|
3406
3319
|
/* module identifier */
|
|
3407
3320
|
const __vue_module_identifier__$l = undefined;
|
|
3408
3321
|
/* functional template */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-creator",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23193",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"lint-fix": "eslint \"**/*.ts\" \"**/*.vue\" --fix --no-error-on-unmatched-pattern"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@wg-npm/survey-core": "0.3.
|
|
16
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
15
|
+
"@wg-npm/survey-core": "0.3.23193",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.3.23193",
|
|
17
17
|
"axios": "^0.19.2",
|
|
18
18
|
"camelcase": "^6.0.0",
|
|
19
19
|
"deepmerge": "^4.2.2",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^3.6.0",
|
|
39
39
|
"@typescript-eslint/parser": "^3.6.0",
|
|
40
40
|
"@vue/eslint-config-prettier": "^6.0.0",
|
|
41
|
-
"@wg-npm/survey-core": "0.3.
|
|
42
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
41
|
+
"@wg-npm/survey-core": "0.3.23193",
|
|
42
|
+
"@wg-npm/survey-service-api": "0.3.23193",
|
|
43
43
|
"acorn": "^7.3.1",
|
|
44
44
|
"axios": "^0.19.2",
|
|
45
45
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "bbb5d08de82e836bf283f80ea67529b3c3449748",
|
|
83
83
|
"rollup": {
|
|
84
84
|
"external": [
|
|
85
85
|
"vue",
|
|
@@ -364,9 +364,9 @@ export default Vue.extend({
|
|
|
364
364
|
},
|
|
365
365
|
watch: {
|
|
366
366
|
"editQuestion.options.maxRange": function () {
|
|
367
|
-
debugger;
|
|
368
367
|
if (
|
|
369
|
-
!this.editQuestion.subQuestions
|
|
368
|
+
(!this.editQuestion.subQuestions ||
|
|
369
|
+
_.isEmpty(this.editQuestion.subQuestions)) &&
|
|
370
370
|
this.editQuestion.options.sliderValue >
|
|
371
371
|
this.editQuestion.options.maxRange
|
|
372
372
|
) {
|
|
@@ -381,7 +381,6 @@ export default Vue.extend({
|
|
|
381
381
|
}
|
|
382
382
|
},
|
|
383
383
|
"editQuestion.options.minRange": function () {
|
|
384
|
-
debugger;
|
|
385
384
|
if (
|
|
386
385
|
(!this.editQuestion.subQuestions ||
|
|
387
386
|
_.isEmpty(this.editQuestion.subQuestions)) &&
|