-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc-app-studycreation-studycreation-module-es2015.js
5604 lines (5301 loc) · 333 KB
/
src-app-studycreation-studycreation-module-es2015.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
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
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["src-app-studycreation-studycreation-module"],{
/***/ "3c42":
/*!**********************************************************************************************!*\
!*** ./src/app/studycreation/vibrationpattern-editing/vibrationpattern-editing.component.ts ***!
\**********************************************************************************************/
/*! exports provided: VibrationPatternEditingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VibrationPatternEditingComponent", function() { return VibrationPatternEditingComponent; });
/* harmony import */ var _raw_loader_vibrationpattern_editing_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./vibrationpattern-editing.component.html */ "lt1v");
/* harmony import */ var _vibrationpattern_editing_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vibrationpattern-editing.component.css */ "qQFY");
/* harmony import */ var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/drag-drop */ "ltgo");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "s7LF");
/* harmony import */ var _src_app_Model_Study_StudyObjects_PauseElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/PauseElement */ "j7zN");
/* harmony import */ var _src_app_Model_Study_StudyObjects_VibrationElement__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/VibrationElement */ "1N3c");
/* harmony import */ var _src_app_Model_Study_StudyObjects_VibrationPattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/VibrationPattern */ "tJs4");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../services/study-wrapper/study-wrapper.service */ "pzGZ");
/* harmony import */ var _error_state_matchers_NumberErrorStateMatcher__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../error-state-matchers/NumberErrorStateMatcher */ "D3xR");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
let VibrationPatternEditingComponent = class VibrationPatternEditingComponent {
constructor(studywrapper) {
this.studywrapper = studywrapper;
/**
* Einfaches vorinitialisiertes VibrationElement
*/
this.compareVibration = new _src_app_Model_Study_StudyObjects_VibrationElement__WEBPACK_IMPORTED_MODULE_6__["VibrationElement"](1, 1);
/**
* Einfaches vorinitialisiertes PauseELement
*/
this.comparePause = new _src_app_Model_Study_StudyObjects_PauseElement__WEBPACK_IMPORTED_MODULE_5__["PauseElement"](0);
/**
* Toolbox in der das compareVibration Element und comparePause Element liegen.
*/
this.toolbox = [this.compareVibration, this.comparePause];
/**
* Array in dem alle VibrationPattern die erstellt wurden liegen.
*/
this.vibrationpatterns = [];
this.formControls = [];
this.matcher = new _error_state_matchers_NumberErrorStateMatcher__WEBPACK_IMPORTED_MODULE_9__["NumberErrorStateMatcher"]();
}
/**
* VibrationPattern aus der Study werden in das vibrationpatterns Array in der Klasse geladen.
*/
ngOnInit() {
this.studywrapper.study.studyObjects.forEach((studyobject) => {
if (studyobject instanceof _src_app_Model_Study_StudyObjects_VibrationPattern__WEBPACK_IMPORTED_MODULE_7__["VibrationPattern"]) {
this.vibrationpatterns.unshift(studyobject);
this.formControls.unshift([[]]);
}
});
let i = 0;
for (let vibPattern of this.vibrationpatterns) {
let j = 0;
for (let vpE of vibPattern.vibrationPatternElements) {
this.addVibrationFormControl(i, j, vpE);
j++;
}
i++;
}
}
/**
*
* @param vibIndex
* @param placeIndex
* @param vibrationPatternElement
*/
addVibrationFormControl(vibIndex, placeIndex, vibrationPatternElement) {
let durationControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormControl"]("", {
validators: [_angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].min(0)]
});
let amplitudeControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormControl"]("", {
validators: [_angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].min(1), _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].max(255)]
});
this.formControls[vibIndex].splice(placeIndex, 0, [
durationControl, amplitudeControl
]);
durationControl.patchValue(vibrationPatternElement.duration);
let toInsert = 1;
if (vibrationPatternElement.amplitude) {
toInsert = vibrationPatternElement.amplitude;
}
amplitudeControl.patchValue(toInsert);
durationControl.valueChanges.subscribe(value => {
let toChange = value;
if (value < 0) {
toChange = 0;
}
if (!Number(value)) {
toChange = 1;
}
vibrationPatternElement.duration = toChange;
});
amplitudeControl.valueChanges.subscribe(value => {
let toChange = value;
if (value < 1) {
toChange = 1;
}
if (value > 255) {
toChange = 255;
}
if (!Number(value)) {
toChange = 1;
}
vibrationPatternElement.amplitude = toChange;
});
}
/**
* Ein neues leeres VibrationPattern wird erstellt.
*/
onAddVibrationPattern() {
let toInsert = new _src_app_Model_Study_StudyObjects_VibrationPattern__WEBPACK_IMPORTED_MODULE_7__["VibrationPattern"](this.studywrapper.lastID, "", "");
this.vibrationpatterns.unshift(toInsert);
this.studywrapper.study.studyObjects.unshift(toInsert);
this.formControls.unshift([[]]);
}
/**
* Beim draggen eines Vibration oder PauseElements wird das VibrationPattern entsprechend editiert
* @param event
* @param vibIndex
*/
onDrop(event, vibIndex) {
if (event.previousContainer.id == "toolbox") {
let toInsert;
if (event.previousContainer.data[event.previousIndex] instanceof _src_app_Model_Study_StudyObjects_VibrationElement__WEBPACK_IMPORTED_MODULE_6__["VibrationElement"]) {
toInsert = new _src_app_Model_Study_StudyObjects_VibrationElement__WEBPACK_IMPORTED_MODULE_6__["VibrationElement"](1, 1);
}
else {
toInsert = new _src_app_Model_Study_StudyObjects_PauseElement__WEBPACK_IMPORTED_MODULE_5__["PauseElement"](1);
}
event.container.data.splice(event.currentIndex, 0, toInsert);
this.addVibrationFormControl(vibIndex, event.currentIndex, toInsert);
}
if (event.previousContainer === event.container) {
Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_2__["moveItemInArray"])(event.container.data, event.previousIndex, event.currentIndex);
Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_2__["moveItemInArray"])(this.formControls[vibIndex], event.previousIndex, event.currentIndex);
}
}
/**
* Das VibrationPattern mit der angegebene id wird aus der Studie und der Webapp entfernt.
* @param index
* @param id
*/
removeFromStudy(index, id) {
this.vibrationpatterns.splice(index, 1);
this.removeFromSectionElement(id);
this.formControls.splice(index, 1);
this.studywrapper.study.studyObjects = this.studywrapper.study.studyObjects.filter(element => element.id != id);
}
/**
* Entfernt ein VibrationPattern von allen SectionElements in der Studie
* @param id
*/
removeFromSectionElement(id) {
for (let sectionelement of this.studywrapper.study.sectionElements) {
let index = 0;
for (let studyObjectRef of sectionelement.studyObjects) {
if (studyObjectRef.ID == id) {
sectionelement.studyObjects.splice(index, 1);
}
index++;
}
}
}
/**
* Entfernt ein Element aus dem Array
* @param targetArray
* @param index
*/
removeFromArray(targetArray, index) {
targetArray.splice(index, 1);
}
/**
* Entfernt ein Vibration oder Pause Element von einem VibrationPattern
* @param vibIndex
* @param elIndex
*/
removeFromVibrationPattern(vibIndex, elIndex) {
this.vibrationpatterns[vibIndex].vibrationPatternElements.splice(elIndex, 1);
this.formControls[vibIndex].splice(elIndex, 1);
}
/**
* Prüft, ob ein Element vom Typ VibrationElement ist.
* @param val
*/
isVibration(val) {
return val instanceof _src_app_Model_Study_StudyObjects_VibrationElement__WEBPACK_IMPORTED_MODULE_6__["VibrationElement"];
}
/**
* Prüft, ob ein Element vom Typ PauseElement ist.
* @param val
*/
isPause(val) {
return val instanceof _src_app_Model_Study_StudyObjects_PauseElement__WEBPACK_IMPORTED_MODULE_5__["PauseElement"];
}
};
VibrationPatternEditingComponent.ctorParameters = () => [
{ type: _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__["StudyWrapperService"] }
];
VibrationPatternEditingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
selector: 'app-vibrationpattern-editing',
template: _raw_loader_vibrationpattern_editing_component_html__WEBPACK_IMPORTED_MODULE_0__["default"],
styles: [_vibrationpattern_editing_component_css__WEBPACK_IMPORTED_MODULE_1__["default"]]
}),
__metadata("design:paramtypes", [_services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__["StudyWrapperService"]])
], VibrationPatternEditingComponent);
/***/ }),
/***/ "4XXs":
/*!******************************************************************************!*\
!*** ./src/app/studycreation/question-editing/question-editing.component.ts ***!
\******************************************************************************/
/*! exports provided: QuestionEditingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionEditingComponent", function() { return QuestionEditingComponent; });
/* harmony import */ var _raw_loader_question_editing_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./question-editing.component.html */ "RFVM");
/* harmony import */ var _question_editing_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question-editing.component.css */ "cbKi");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_AbstractQuestion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/AbstractQuestion */ "zfOo");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../services/study-wrapper/study-wrapper.service */ "pzGZ");
/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/dialog */ "iELJ");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_LinearScaleQuestion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/LinearScaleQuestion */ "Tcgm");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_MultipleChoiceQuestion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/MultipleChoiceQuestion */ "MsGT");
/* harmony import */ var _question_selection_dialog_question_selection_dialog_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./question-selection-dialog/question-selection-dialog.component */ "Uyn7");
/* harmony import */ var _src_app_Model_Study_StudyObjects_VibrationPattern__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/VibrationPattern */ "tJs4");
/* harmony import */ var _src_app_Model_Study_StudyObjects_TextBlock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/TextBlock */ "0HUV");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_DateQuestion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/DateQuestion */ "lGoz");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_TextQuestion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/TextQuestion */ "r8Zv");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/forms */ "s7LF");
/* harmony import */ var _error_state_matchers_NumberErrorStateMatcher__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../error-state-matchers/NumberErrorStateMatcher */ "D3xR");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
let QuestionEditingComponent = class QuestionEditingComponent {
constructor(studywrapper, dialog) {
this.studywrapper = studywrapper;
this.dialog = dialog;
this.questions = [];
this.questionTypes = ["Datum/Zeit", "Lineare Skala", "Multiple Choice", "Text"];
this.formControls = [];
this.matcher = new _error_state_matchers_NumberErrorStateMatcher__WEBPACK_IMPORTED_MODULE_14__["NumberErrorStateMatcher"]();
}
/**
* Überträgt aus einer gegebenen Studie alle Fragen in das questions Array
*/
ngOnInit() {
this.studywrapper.study.studyObjects.forEach((studyobject) => {
if (studyobject instanceof _src_app_Model_Study_StudyObjects_Questions_AbstractQuestion__WEBPACK_IMPORTED_MODULE_3__["AbstractQuestion"]) {
this.questions.unshift(studyobject);
this.addFormControl(studyobject);
}
});
}
/**
* Prüft, ob ein bestimmtes Objekt eine LinearScaleQuestion oder eine
* MultipleChoiceQuestion ist. Der entsprechende Typ wird als string zurückgegeben.
* @param question
*/
isLinearScaleQuestion(question) {
if (question instanceof _src_app_Model_Study_StudyObjects_Questions_LinearScaleQuestion__WEBPACK_IMPORTED_MODULE_6__["LinearScaleQuestion"]) {
return "linearScale";
}
else if (question instanceof _src_app_Model_Study_StudyObjects_Questions_MultipleChoiceQuestion__WEBPACK_IMPORTED_MODULE_7__["MultipleChoiceQuestion"]) {
return "multipleChoice";
}
}
/**
* Ergänzt die übergebene MultipleChoiceQuestion um eine vordefinierte Antwort Option
* @param question
*/
addFormControl(question) {
let maxChoicesControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_13__["FormControl"]("", {
validators: [_angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].min(1), _angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].required]
});
let choicesControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_13__["FormControl"]("", { validators: [_angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].min(2), _angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].max(12), _angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].required] });
this.formControls.unshift([maxChoicesControl, choicesControl]);
maxChoicesControl.patchValue(question.maxChoices);
choicesControl.patchValue(question.numberOfChoices);
maxChoicesControl.valueChanges.subscribe(value => {
let toChange = value;
if (value < 0) {
toChange = 0;
}
if (!Number(value)) {
toChange = 1;
}
question.maxChoices = toChange;
});
choicesControl.valueChanges.subscribe(value => {
let toChange = value;
if (value < 2) {
toChange = 2;
}
if (value > 12) {
toChange = 12;
}
if (!Number(value)) {
toChange = 1;
}
question.numberOfChoices = toChange;
});
}
/**
* Ergänzt die übergebene MultipleChoiceQuestion um eine vordefinierte Antwort Option
* @param question
*/
onAddAnswerChoice(question) {
question.answerOptions.push("");
}
/**
* Fügt die erstellte Frage in die Studie und die questions Liste ein
*/
onAddQuestion() {
let dialogRef = this.dialog.open(_question_selection_dialog_question_selection_dialog_component__WEBPACK_IMPORTED_MODULE_8__["QuestionSelectionDialogComponent"]);
dialogRef.afterClosed().subscribe(result => {
if (result) {
this.questions.unshift(result);
this.studywrapper.study.studyObjects.unshift(result);
this.addFormControl(result);
}
});
}
/**
* Entfernt aus dem Array targetArray an der Stelle index einen Eintrag.
* @param targetArray
* @param index
*/
removeFromArray(targetArray, index) {
targetArray.splice(index, 1);
}
/**
* Die AntwortOption in einer MultipleChoiceQuestion an der Stelle index wird aktualisiert.
* @param question
* @param index
* @param event
*/
valueUpdate(question, index, event) {
question.answerOptions[index] = event.target.value;
}
/**
* Entfernt das Element an der Stelle index aus der Liste questions und entfernt das
* Element mit der id aus der Liste studyObjects in StudyPrototype.
* @param index
* @param id
*/
removeFromStudy(index, id) {
this.questions.splice(index, 1);
this.removeFromSectionElement(id);
this.formControls.splice(index, 1);
this.studywrapper.study.studyObjects = this.studywrapper.study.studyObjects.filter(element => element.id != id);
}
/**
* Entfernt das Element an der Stelle index aus der Liste questions und
* entfernt das Element mit der id aus der Liste studyObjects in StudyPrototype.
* @param id
*/
removeFromSectionElement(id) {
for (let sectionelement of this.studywrapper.study.sectionElements) {
let index = 0;
for (let studyObjectRef of sectionelement.studyObjects) {
if (studyObjectRef.ID == id) {
sectionelement.studyObjects.splice(index, 1);
}
index++;
}
}
}
/**
* Gibt den Text zurück, welchen der User für einen bestimmten Objekttyp sehen soll.
* @param studyObject
*/
getStudyObjectTypeName(studyObject) {
switch (true) {
case studyObject instanceof _src_app_Model_Study_StudyObjects_VibrationPattern__WEBPACK_IMPORTED_MODULE_9__["VibrationPattern"]:
return "VibrationPattern";
case studyObject instanceof _src_app_Model_Study_StudyObjects_TextBlock__WEBPACK_IMPORTED_MODULE_10__["TextBlock"]:
return "TextBlock";
case studyObject instanceof _src_app_Model_Study_StudyObjects_Questions_DateQuestion__WEBPACK_IMPORTED_MODULE_11__["DateQuestion"]:
return "Datum";
case studyObject instanceof _src_app_Model_Study_StudyObjects_Questions_LinearScaleQuestion__WEBPACK_IMPORTED_MODULE_6__["LinearScaleQuestion"]:
return "Lineare Skala";
case studyObject instanceof _src_app_Model_Study_StudyObjects_Questions_MultipleChoiceQuestion__WEBPACK_IMPORTED_MODULE_7__["MultipleChoiceQuestion"]:
return "Multiple Choice";
case studyObject instanceof _src_app_Model_Study_StudyObjects_Questions_TextQuestion__WEBPACK_IMPORTED_MODULE_12__["TextQuestion"]:
return "Freitext";
default:
return "undefined";
}
}
};
QuestionEditingComponent.ctorParameters = () => [
{ type: _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_4__["StudyWrapperService"] },
{ type: _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__["MatDialog"] }
];
QuestionEditingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
selector: 'app-question-editing',
template: _raw_loader_question_editing_component_html__WEBPACK_IMPORTED_MODULE_0__["default"],
styles: [_question_editing_component_css__WEBPACK_IMPORTED_MODULE_1__["default"]]
}),
__metadata("design:paramtypes", [_services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_4__["StudyWrapperService"], _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__["MatDialog"]])
], QuestionEditingComponent);
/***/ }),
/***/ "8/Jw":
/*!*********************************************************************************************************!*\
!*** ./src/app/studycreation/toolboxes/vibrationpattern-toolbox/vibrationpattern-toolbox.component.css ***!
\*********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("mat-card {\r\n text-align: center;\r\n}\r\n\r\nmat-chip {\r\n width: 100%;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3R1ZHljcmVhdGlvbi90b29sYm94ZXMvdmlicmF0aW9ucGF0dGVybi10b29sYm94L3ZpYnJhdGlvbnBhdHRlcm4tdG9vbGJveC5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0ksa0JBQWtCO0FBQ3RCOztBQUVBO0lBQ0ksV0FBVztBQUNmIiwiZmlsZSI6InNyYy9hcHAvc3R1ZHljcmVhdGlvbi90b29sYm94ZXMvdmlicmF0aW9ucGF0dGVybi10b29sYm94L3ZpYnJhdGlvbnBhdHRlcm4tdG9vbGJveC5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsibWF0LWNhcmQge1xyXG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG59XHJcblxyXG5tYXQtY2hpcCB7XHJcbiAgICB3aWR0aDogMTAwJTtcclxufSJdfQ== */");
/***/ }),
/***/ "8CWr":
/*!****************************************************************************!*\
!*** ./src/app/studycreation/general-editing/general-editing.component.ts ***!
\****************************************************************************/
/*! exports provided: GeneralEditingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GeneralEditingComponent", function() { return GeneralEditingComponent; });
/* harmony import */ var _raw_loader_general_editing_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./general-editing.component.html */ "eC3E");
/* harmony import */ var _general_editing_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./general-editing.component.css */ "ycu6");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "s7LF");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_QualificationQuestion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/QualificationQuestion */ "qPq2");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/study-wrapper/study-wrapper.service */ "pzGZ");
/* harmony import */ var _error_state_matchers_ValidErrorStateMatcher__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../error-state-matchers/ValidErrorStateMatcher */ "CQWE");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
let GeneralEditingComponent = class GeneralEditingComponent {
constructor(studywrapper) {
this.studywrapper = studywrapper;
this.shortControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormControl"]("", { validators: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].maxLength(200) });
this.matcher = new _error_state_matchers_ValidErrorStateMatcher__WEBPACK_IMPORTED_MODULE_6__["ValidErrorStateMatcher"]();
}
/**
* Initialisiert den Wert der ShortDescription
*/
ngOnInit() {
this.shortControl.patchValue(this.studywrapper.study.keyData.shortDescription.text);
this.shortControl.valueChanges.subscribe(value => {
let toChange = value;
if (value.length > 200) {
toChange = value.substr(0, 200);
}
this.studywrapper.study.keyData.shortDescription.text = toChange;
});
}
onStateChange() { }
/**
* Erstellt eine neue Ausschlussfrage und fügt sie der Studie hinzu
*/
onAddQualificationQuestion() {
this.studywrapper.study.keyData.qualiQuestions.push(new _src_app_Model_Study_StudyObjects_Questions_QualificationQuestion__WEBPACK_IMPORTED_MODULE_4__["QualificationQuestion"](this.studywrapper.lastID, "", "", "", false));
}
/**
* Entfernt aus dem Array targetArray an der Stelle index einen Eintrag.
* @param targetArray
* @param index
*/
removeFromArray(targetArray, index) {
targetArray.splice(index, 1);
}
};
GeneralEditingComponent.ctorParameters = () => [
{ type: _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__["StudyWrapperService"] }
];
GeneralEditingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
selector: 'app-general-editing',
template: _raw_loader_general_editing_component_html__WEBPACK_IMPORTED_MODULE_0__["default"],
styles: [_general_editing_component_css__WEBPACK_IMPORTED_MODULE_1__["default"]]
}),
__metadata("design:paramtypes", [_services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__["StudyWrapperService"]])
], GeneralEditingComponent);
/***/ }),
/***/ "CQWE":
/*!******************************************************************************!*\
!*** ./src/app/studycreation/error-state-matchers/ValidErrorStateMatcher.ts ***!
\******************************************************************************/
/*! exports provided: ValidErrorStateMatcher */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidErrorStateMatcher", function() { return ValidErrorStateMatcher; });
class ValidErrorStateMatcher {
isErrorState(control, form) {
return !control.valid;
}
}
/***/ }),
/***/ "D3xR":
/*!*******************************************************************************!*\
!*** ./src/app/studycreation/error-state-matchers/NumberErrorStateMatcher.ts ***!
\*******************************************************************************/
/*! exports provided: NumberErrorStateMatcher */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberErrorStateMatcher", function() { return NumberErrorStateMatcher; });
class NumberErrorStateMatcher {
isErrorState(control, form) {
let success = true;
let value = Number(control.value);
if (!value && value != 0) {
success = false;
}
return !success || !control.valid;
}
}
/***/ }),
/***/ "HrJD":
/*!**************************************************************************************************************************************!*\
!*** ./node_modules/raw-loader/dist/cjs.js!./src/app/studycreation/toolboxes/studyobject-toolbox/studyobject-toolbox.component.html ***!
\**************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<mat-card class=\"scrollable\" style=\"background-color: #212121;\"><br>\r\n <mat-card-title>Werkzeugkasten</mat-card-title>\r\n <div style=\"margin-top: 10px;\">\r\n <mat-card-subtitle>Erstellte Objekte per Drag and Drog links einfügen</mat-card-subtitle>\r\n </div>\r\n <mat-card-content [style.overflow]=\"'auto'\" [style.height.vh]=\"'77'\" >\r\n <mat-divider></mat-divider>\r\n <br />\r\n <mat-accordion multi>\r\n <mat-expansion-panel *ngIf=\"getAmount('DateQuestion') > 0\" style=\"background-color: #856e68;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Datumfragen\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('DateQuestion')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'DateQuestion'\">\r\n <mat-card cdkDrag style=\"cursor: move; height: 20px\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('TextQuestion') > 0\" style=\"background-color: #747d80;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Freitextfragen\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('TextQuestion')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'TextQuestion'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('LinearScaleQuestion') > 0\" style=\"background-color: #6f8aab;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Lineare Skalen\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('LinearScaleQuestion')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'LinearScaleQuestion'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('MultipleChoiceQuestion') > 0\" style=\"background-color: #a68a79;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Multiple Choice Fragen\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('MultipleChoiceQuestion')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'MultipleChoiceQuestion'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('TextBlock') > 0\" style=\"background-color: #7da278;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Textblöcke\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('TextBlock')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'TextBlock'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('VibrationPattern') > 0\" style=\"background-color: #A65C4E;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Vibrationsmuster\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('VibrationPattern')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'VibrationPattern'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('SectionElement') > 0\" style=\"background-color: #9dbae1;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Studienseiten\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('SectionElement')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'SectionElement'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n <mat-expansion-panel *ngIf=\"getAmount('Section') > 0\" style=\"background-color: #dd9fb2;\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n Abschnitte\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div cdkDropList id=\"toolbox\" [cdkDropListConnectedTo]=\"connectedLists\" [cdkDropListData]=\"getObjectsPerType('Section')\">\r\n <div *ngFor=\"let element of toolbox\">\r\n <div *ngIf=\"this.colorService.getStudyObjectType(element) == 'Section'\">\r\n <mat-card cdkDrag style=\"cursor: move;\" [style.background-color]=\"this.colorService.getStudyObjectColor(element)\">{{ element.name }}</mat-card>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n\r\n </mat-card-content>\r\n</mat-card>");
/***/ }),
/***/ "J5kB":
/*!*****************************************************************************!*\
!*** ./src/app/studycreation/section-editing/section-editing.component.css ***!
\*****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("mat-sidenav-container {\r\n height: 91vh;\r\n}\r\n\r\n.studyObjectList {\r\n border-style: dashed;\r\n border-width: 5px;\r\n border-radius: 10px;\r\n font-size: 18px;\r\n padding: 15px;\r\n margin-top: 15px;\r\n}\r\n\r\n.toolbox {\r\n width: 250px;\r\n position: fixed;\r\n z-index: 1;\r\n overflow-x: hidden;\r\n right: 15px;\r\n}\r\n\r\n.mainContent {\r\n margin-right: 265px;\r\n}\r\n\r\n.droplistSubtitle {\r\n margin-top: 10px;\r\n font-size: 14px;\r\n text-align: center;\r\n}\r\n\r\n.greenButton {\r\n background-color: #3e753b;\r\n color: white;\r\n}\r\n\r\n.redButton {\r\n color: #6D0000;\r\n background-color: #FF000000;\r\n}\r\n\r\n.trashCan {\r\n font-size: 40px;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZWN0aW9uLWVkaXRpbmcvc2VjdGlvbi1lZGl0aW5nLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxZQUFZO0FBQ2hCOztBQUVBO0lBQ0ksb0JBQW9CO0lBQ3BCLGlCQUFpQjtJQUNqQixtQkFBbUI7SUFDbkIsZUFBZTtJQUNmLGFBQWE7SUFDYixnQkFBZ0I7QUFDcEI7O0FBRUE7SUFDSSxZQUFZO0lBQ1osZUFBZTtJQUNmLFVBQVU7SUFDVixrQkFBa0I7SUFDbEIsV0FBVztBQUNmOztBQUVBO0lBQ0ksbUJBQW1CO0FBQ3ZCOztBQUVBO0lBQ0ksZ0JBQWdCO0lBQ2hCLGVBQWU7SUFDZixrQkFBa0I7QUFDdEI7O0FBRUE7SUFDSSx5QkFBeUI7SUFDekIsWUFBWTtBQUNoQjs7QUFFQTtJQUNJLGNBQWM7SUFDZCwyQkFBMkI7QUFDL0I7O0FBRUE7SUFDSSxlQUFlO0FBQ25CIiwiZmlsZSI6InNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZWN0aW9uLWVkaXRpbmcvc2VjdGlvbi1lZGl0aW5nLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJtYXQtc2lkZW5hdi1jb250YWluZXIge1xyXG4gICAgaGVpZ2h0OiA5MXZoO1xyXG59XHJcblxyXG4uc3R1ZHlPYmplY3RMaXN0IHtcclxuICAgIGJvcmRlci1zdHlsZTogZGFzaGVkO1xyXG4gICAgYm9yZGVyLXdpZHRoOiA1cHg7XHJcbiAgICBib3JkZXItcmFkaXVzOiAxMHB4O1xyXG4gICAgZm9udC1zaXplOiAxOHB4O1xyXG4gICAgcGFkZGluZzogMTVweDtcclxuICAgIG1hcmdpbi10b3A6IDE1cHg7XHJcbn1cclxuXHJcbi50b29sYm94IHtcclxuICAgIHdpZHRoOiAyNTBweDtcclxuICAgIHBvc2l0aW9uOiBmaXhlZDtcclxuICAgIHotaW5kZXg6IDE7XHJcbiAgICBvdmVyZmxvdy14OiBoaWRkZW47XHJcbiAgICByaWdodDogMTVweDtcclxufVxyXG5cclxuLm1haW5Db250ZW50IHtcclxuICAgIG1hcmdpbi1yaWdodDogMjY1cHg7XHJcbn1cclxuXHJcbi5kcm9wbGlzdFN1YnRpdGxlIHtcclxuICAgIG1hcmdpbi10b3A6IDEwcHg7XHJcbiAgICBmb250LXNpemU6IDE0cHg7XHJcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbn1cclxuXHJcbi5ncmVlbkJ1dHRvbiB7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjM2U3NTNiO1xyXG4gICAgY29sb3I6IHdoaXRlO1xyXG59XHJcblxyXG4ucmVkQnV0dG9uIHtcclxuICAgIGNvbG9yOiAjNkQwMDAwO1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogI0ZGMDAwMDAwO1xyXG59XHJcblxyXG4udHJhc2hDYW4ge1xyXG4gICAgZm9udC1zaXplOiA0MHB4O1xyXG59Il19 */");
/***/ }),
/***/ "Ky/Q":
/*!*******************************************************************************************!*\
!*** ./src/app/studycreation/sectionelement-editing/sectionelement-editing.component.css ***!
\*******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".vibration-container {\r\n height: 91vh;\r\n}\r\n\r\n.studyObjectList {\r\n border-style: dashed;\r\n border-width: 5px;\r\n border-radius: 10px;\r\n font-size: 16px;\r\n padding: 15px;\r\n margin-top: 15px;\r\n}\r\n\r\n.toolbox {\r\n width: 300px;\r\n position: fixed;\r\n z-index: 1;\r\n overflow-x: hidden;\r\n right: 15px;\r\n}\r\n\r\n.mainContent {\r\n margin-right: 315px;\r\n}\r\n\r\n.droplistSubtitle {\r\n margin-top: 10px;\r\n font-size: 14px;\r\n text-align: center;\r\n}\r\n\r\n.greenButton {\r\n background-color: #3e753b;\r\n color: white;\r\n}\r\n\r\n.redButton {\r\n color: #6D0000;\r\n background-color: #FF000000;\r\n}\r\n\r\n.grayButton {\r\n color: gray;\r\n background-color: #FF000000;\r\n}\r\n\r\n.trashCan {\r\n font-size: 40px;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZWN0aW9uZWxlbWVudC1lZGl0aW5nL3NlY3Rpb25lbGVtZW50LWVkaXRpbmcuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLFlBQVk7QUFDaEI7O0FBRUE7SUFDSSxvQkFBb0I7SUFDcEIsaUJBQWlCO0lBQ2pCLG1CQUFtQjtJQUNuQixlQUFlO0lBQ2YsYUFBYTtJQUNiLGdCQUFnQjtBQUNwQjs7QUFFQTtJQUNJLFlBQVk7SUFDWixlQUFlO0lBQ2YsVUFBVTtJQUNWLGtCQUFrQjtJQUNsQixXQUFXO0FBQ2Y7O0FBRUE7SUFDSSxtQkFBbUI7QUFDdkI7O0FBRUE7SUFDSSxnQkFBZ0I7SUFDaEIsZUFBZTtJQUNmLGtCQUFrQjtBQUN0Qjs7QUFFQTtJQUNJLHlCQUF5QjtJQUN6QixZQUFZO0FBQ2hCOztBQUVBO0lBQ0ksY0FBYztJQUNkLDJCQUEyQjtBQUMvQjs7QUFFQTtJQUNJLFdBQVc7SUFDWCwyQkFBMkI7QUFDL0I7O0FBRUE7SUFDSSxlQUFlO0FBQ25CIiwiZmlsZSI6InNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZWN0aW9uZWxlbWVudC1lZGl0aW5nL3NlY3Rpb25lbGVtZW50LWVkaXRpbmcuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aWJyYXRpb24tY29udGFpbmVyIHtcclxuICAgIGhlaWdodDogOTF2aDtcclxufVxyXG5cclxuLnN0dWR5T2JqZWN0TGlzdCB7XHJcbiAgICBib3JkZXItc3R5bGU6IGRhc2hlZDtcclxuICAgIGJvcmRlci13aWR0aDogNXB4O1xyXG4gICAgYm9yZGVyLXJhZGl1czogMTBweDtcclxuICAgIGZvbnQtc2l6ZTogMTZweDtcclxuICAgIHBhZGRpbmc6IDE1cHg7XHJcbiAgICBtYXJnaW4tdG9wOiAxNXB4O1xyXG59XHJcblxyXG4udG9vbGJveCB7XHJcbiAgICB3aWR0aDogMzAwcHg7XHJcbiAgICBwb3NpdGlvbjogZml4ZWQ7XHJcbiAgICB6LWluZGV4OiAxO1xyXG4gICAgb3ZlcmZsb3cteDogaGlkZGVuO1xyXG4gICAgcmlnaHQ6IDE1cHg7XHJcbn1cclxuXHJcbi5tYWluQ29udGVudCB7XHJcbiAgICBtYXJnaW4tcmlnaHQ6IDMxNXB4O1xyXG59XHJcblxyXG4uZHJvcGxpc3RTdWJ0aXRsZSB7XHJcbiAgICBtYXJnaW4tdG9wOiAxMHB4O1xyXG4gICAgZm9udC1zaXplOiAxNHB4O1xyXG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG59XHJcblxyXG4uZ3JlZW5CdXR0b24ge1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogIzNlNzUzYjtcclxuICAgIGNvbG9yOiB3aGl0ZTtcclxufVxyXG5cclxuLnJlZEJ1dHRvbiB7XHJcbiAgICBjb2xvcjogIzZEMDAwMDtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNGRjAwMDAwMDtcclxufVxyXG5cclxuLmdyYXlCdXR0b24ge1xyXG4gICAgY29sb3I6IGdyYXk7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjRkYwMDAwMDA7XHJcbn1cclxuXHJcbi50cmFzaENhbiB7XHJcbiAgICBmb250LXNpemU6IDQwcHg7XHJcbn0iXX0= */");
/***/ }),
/***/ "M/E+":
/*!******************************************************************************************************************!*\
!*** ./src/app/studycreation/question-editing/question-selection-dialog/question-selection-dialog.component.css ***!
\******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("button {\r\n margin-bottom: 5px;\r\n color: white;\r\n background-color: #3e753b;\r\n}\r\n\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3R1ZHljcmVhdGlvbi9xdWVzdGlvbi1lZGl0aW5nL3F1ZXN0aW9uLXNlbGVjdGlvbi1kaWFsb2cvcXVlc3Rpb24tc2VsZWN0aW9uLWRpYWxvZy5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0ksa0JBQWtCO0lBQ2xCLFlBQVk7SUFDWix5QkFBeUI7QUFDN0IiLCJmaWxlIjoic3JjL2FwcC9zdHVkeWNyZWF0aW9uL3F1ZXN0aW9uLWVkaXRpbmcvcXVlc3Rpb24tc2VsZWN0aW9uLWRpYWxvZy9xdWVzdGlvbi1zZWxlY3Rpb24tZGlhbG9nLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJidXR0b24ge1xyXG4gICAgbWFyZ2luLWJvdHRvbTogNXB4O1xyXG4gICAgY29sb3I6IHdoaXRlO1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogIzNlNzUzYjtcclxufVxyXG4iXX0= */");
/***/ }),
/***/ "MWis":
/*!**********************************************************************************************************************************!*\
!*** ./node_modules/raw-loader/dist/cjs.js!./src/app/studycreation/sectionelement-editing/sectionelement-editing.component.html ***!
\**********************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"vibration-contianer\">\r\n <div class=\"toolbox\">\r\n <app-studyobject-toolbox [toolbox]=\"this.toolbox\" [playgroundCount]=\"sectionelements.length\">\r\n </app-studyobject-toolbox>\r\n </div>\r\n\r\n <div class=\"mainContent\">\r\n <a mat-fab class=\"greenButton\" (click)=\"onAddPlayground()\" style=\"display: block; margin: auto;\">\r\n <mat-icon>add</mat-icon>\r\n </a><br>\r\n <div *ngFor=\"let sectionelement of sectionelements; let index = index\">\r\n <mat-card>\r\n <mat-card-title>\r\n <mat-form-field class=\"example-full-width\" style=\"width: 50%; font-size:18px\">\r\n <input matInput placeholder=\"Interne Bezeichnung\" [(ngModel)]=\"sectionelement.name\" /> </mat-form-field>\r\n \r\n <mat-form-field class=\"example-full-width\" style=\"width: 50%; font-size:18px\">\r\n <input matInput placeholder=\"Anzeigename\" [(ngModel)]=\"sectionelement.displayName\" /> </mat-form-field>\r\n \r\n <mat-form-field style=\"width: 20%; font-size:18px\">\r\n <mat-label>Randomisierung</mat-label>\r\n <mat-select [(value)]=\"sectionelement.randomStrategy\">\r\n <mat-option *ngFor=\"let randomizer of randomizers; let index = index\" [value]=\"index\">\r\n {{ this.studywrapper.getRandomizerName(index) }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field><button mat-icon-button class=\"redButton\" (click)=\"deleteTest(index, sectionelement.id)\">\r\n <mat-icon class=\"trashCan\">delete</mat-icon>\r\n </button>\r\n </mat-card-title>\r\n Für das Ergebnis relevant? Nein \r\n <mat-slide-toggle [(ngModel)]=\"sectionelement.resultRelevant\"></mat-slide-toggle>\r\n Ja<br>\r\n <hr>\r\n <div cdkDropList class=\"studyObjectList\" id=\"studyObjectList{{ index }}\"\r\n [cdkDropListData]=\"sectionelement.studyObjects\"\r\n (cdkDropListDropped)=\"onDrop($event, sectionelement)\">\r\n <div *ngFor=\"let ref of sectionelement.studyObjects; let index = index\">\r\n <mat-card cdkDrag\r\n [style.background-color]=\"this.colorService.getStudyObjectColor(findStudyObjectById(ref.ID))\"\r\n style=\"font-size:18px; cursor: move;\">{{(index+1) + \". \" + \r\n this.studywrapper.referenceTupleMembershipVerifier.getObject(ref).name\r\n }} <mat-slide-toggle [(ngModel)]=\"ref.isFixed\">Fixiert</mat-slide-toggle><button\r\n mat-icon-button class=\"grayButton\"\r\n (click)=\"removeFromArray(sectionelement.studyObjects, index)\">\r\n <mat-icon class=\"trashCan\">delete</mat-icon>\r\n </button>\r\n </mat-card>\r\n <div *ngIf=\"index+1 != sectionelement.studyObjects.length\">\r\n <br />\r\n </div>\r\n </div>\r\n <div class=\"droplistSubtitle\">Hier Elemente aus dem Wergzeugkasten einfügen, um eine Abfolge\r\n festzulegen.</div>\r\n </div>\r\n </mat-card>\r\n <br>\r\n </div>\r\n </div>\r\n\r\n</div>");
/***/ }),
/***/ "My1a":
/*!********************************************************************************!*\
!*** ./src/app/studycreation/textblock-editing/textblock-editing.component.ts ***!
\********************************************************************************/
/*! exports provided: TextBlockEditingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextBlockEditingComponent", function() { return TextBlockEditingComponent; });
/* harmony import */ var _raw_loader_textblock_editing_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./textblock-editing.component.html */ "lvtZ");
/* harmony import */ var _textblock_editing_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./textblock-editing.component.css */ "wdvh");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "s7LF");
/* harmony import */ var _src_app_Model_Study_StudyObjects_TextBlock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/TextBlock */ "0HUV");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../services/study-wrapper/study-wrapper.service */ "pzGZ");
/* harmony import */ var _error_state_matchers_ValidErrorStateMatcher__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../error-state-matchers/ValidErrorStateMatcher */ "CQWE");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
let TextBlockEditingComponent = class TextBlockEditingComponent {
constructor(studywrapper) {
this.studywrapper = studywrapper;
/**
* In dem Array befinden sich alle Textblöcke die bereits erstellt wurden.
*/
this.textblocks = [];
this.formControls = [];
this.matcher = new _error_state_matchers_ValidErrorStateMatcher__WEBPACK_IMPORTED_MODULE_6__["ValidErrorStateMatcher"]();
}
/**
* Die Methode kopiert alle TextBlöcke die sich bereits in der Studie befinden in das teckblocks array.
*/
ngOnInit() {
this.studywrapper.study.studyObjects.forEach((studyobject) => {
if (studyobject instanceof _src_app_Model_Study_StudyObjects_TextBlock__WEBPACK_IMPORTED_MODULE_4__["TextBlock"]) {
this.textblocks.unshift(studyobject);
this.addFormControl(studyobject);
}
});
}
/**
* Einem TextBlock wird eine FormControl hinzugefügt
* @param textblock
*/
addFormControl(textblock) {
let titleControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormControl"]("", []);
let textControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormControl"]("", []);
this.formControls.unshift([
titleControl,
textControl,
]);
titleControl.patchValue(textblock.name);
textControl.patchValue(textblock.text);
titleControl.valueChanges.subscribe(value => {
textblock.name = value;
});
textControl.valueChanges.subscribe(value => {
textblock.text = value;
});
}
/**
* Ein default TextBlock wird erstellt und in das textblocks Array und die Studie geschrieben.
*/
onAddTextBlock() {
let toInsert = new _src_app_Model_Study_StudyObjects_TextBlock__WEBPACK_IMPORTED_MODULE_4__["TextBlock"](this.studywrapper.lastID, "", "", "");
this.addFormControl(toInsert);
this.textblocks.unshift(toInsert);
this.studywrapper.study.studyObjects.unshift(toInsert);
}
/**
* Der Textblock mit der gegebenen id wird von allen sectionElements entfernt.
* @param id
*/
removeFromSectionElement(id) {
for (let sectionelement of this.studywrapper.study.sectionElements) {
let index = 0;
for (let studyObjectRef of sectionelement.studyObjects) {
if (studyObjectRef.ID == id) {
sectionelement.studyObjects.splice(index, 1);
}
index++;
}
}
}
/**
* Ein Textblock wird aus der Studie und dem textblocks Array entfernt.
* @param index
* @param id
*/
removeFromStudy(index, id) {
this.textblocks.splice(index, 1);
this.formControls.splice(index, 1);
this.removeFromSectionElement(id);
this.studywrapper.study.studyObjects = this.studywrapper.study.studyObjects.filter(element => element.id != id);
}
};
TextBlockEditingComponent.ctorParameters = () => [
{ type: _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__["StudyWrapperService"] }
];
TextBlockEditingComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
selector: 'app-textblock-editing',
template: _raw_loader_textblock_editing_component_html__WEBPACK_IMPORTED_MODULE_0__["default"],
styles: [_textblock_editing_component_css__WEBPACK_IMPORTED_MODULE_1__["default"]]
}),
__metadata("design:paramtypes", [_services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_5__["StudyWrapperService"]])
], TextBlockEditingComponent);
/***/ }),
/***/ "PTz0":
/*!*******************************************************************************!*\
!*** ./src/app/studycreation/sequence-editing/sequence-editing.component.css ***!
\*******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".vibration-container {\r\n height: 91vh;\r\n}\r\n\r\n\r\n.studyObjectList {\r\n border-style: dashed;\r\n border-width: 5px;\r\n border-radius: 10px;\r\n font-size: 16px;\r\n padding: 15px;\r\n margin-top: 15px;\r\n}\r\n\r\n\r\n.toolbox {\r\n width: 250px;\r\n position: fixed;\r\n z-index: 1;\r\n overflow-x: hidden;\r\n right: 15px;\r\n}\r\n\r\n\r\n.mainContent {\r\n margin-right: 265px;\r\n}\r\n\r\n\r\n.droplistSubtitle {\r\n margin-top: 10px;\r\n font-size: 14px;\r\n text-align: center;\r\n}\r\n\r\n\r\n.redButton {\r\n color: #6D0000;\r\n background-color: #FF000000;\r\n}\r\n\r\n\r\n.trashCan {\r\n font-size: 40px;\r\n}\r\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZXF1ZW5jZS1lZGl0aW5nL3NlcXVlbmNlLWVkaXRpbmcuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLFlBQVk7QUFDaEI7OztBQUdBO0lBQ0ksb0JBQW9CO0lBQ3BCLGlCQUFpQjtJQUNqQixtQkFBbUI7SUFDbkIsZUFBZTtJQUNmLGFBQWE7SUFDYixnQkFBZ0I7QUFDcEI7OztBQUVBO0lBQ0ksWUFBWTtJQUNaLGVBQWU7SUFDZixVQUFVO0lBQ1Ysa0JBQWtCO0lBQ2xCLFdBQVc7QUFDZjs7O0FBRUE7SUFDSSxtQkFBbUI7QUFDdkI7OztBQUVBO0lBQ0ksZ0JBQWdCO0lBQ2hCLGVBQWU7SUFDZixrQkFBa0I7QUFDdEI7OztBQUVBO0lBQ0ksY0FBYztJQUNkLDJCQUEyQjtBQUMvQjs7O0FBRUE7SUFDSSxlQUFlO0FBQ25CIiwiZmlsZSI6InNyYy9hcHAvc3R1ZHljcmVhdGlvbi9zZXF1ZW5jZS1lZGl0aW5nL3NlcXVlbmNlLWVkaXRpbmcuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aWJyYXRpb24tY29udGFpbmVyIHtcclxuICAgIGhlaWdodDogOTF2aDtcclxufVxyXG5cclxuXHJcbi5zdHVkeU9iamVjdExpc3Qge1xyXG4gICAgYm9yZGVyLXN0eWxlOiBkYXNoZWQ7XHJcbiAgICBib3JkZXItd2lkdGg6IDVweDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDEwcHg7XHJcbiAgICBmb250LXNpemU6IDE2cHg7XHJcbiAgICBwYWRkaW5nOiAxNXB4O1xyXG4gICAgbWFyZ2luLXRvcDogMTVweDtcclxufVxyXG5cclxuLnRvb2xib3gge1xyXG4gICAgd2lkdGg6IDI1MHB4O1xyXG4gICAgcG9zaXRpb246IGZpeGVkO1xyXG4gICAgei1pbmRleDogMTtcclxuICAgIG92ZXJmbG93LXg6IGhpZGRlbjtcclxuICAgIHJpZ2h0OiAxNXB4O1xyXG59XHJcblxyXG4ubWFpbkNvbnRlbnQge1xyXG4gICAgbWFyZ2luLXJpZ2h0OiAyNjVweDtcclxufVxyXG5cclxuLmRyb3BsaXN0U3VidGl0bGUge1xyXG4gICAgbWFyZ2luLXRvcDogMTBweDtcclxuICAgIGZvbnQtc2l6ZTogMTRweDtcclxuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLnJlZEJ1dHRvbiB7XHJcbiAgICBjb2xvcjogIzZEMDAwMDtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNGRjAwMDAwMDtcclxufVxyXG5cclxuLnRyYXNoQ2FuIHtcclxuICAgIGZvbnQtc2l6ZTogNDBweDtcclxufSJdfQ== */");
/***/ }),
/***/ "Q8vR":
/*!*******************************************************!*\
!*** ./src/app/studycreation/studycreation.module.ts ***!
\*******************************************************/
/*! exports provided: StudycreationModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StudycreationModule", function() { return StudycreationModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "SVse");
/* harmony import */ var _src_app_studycreation_studycreation_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/app/studycreation/studycreation-routing.module */ "a03t");
/* harmony import */ var _src_app_studycreation_general_editing_general_editing_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/app/studycreation/general-editing/general-editing.component */ "8CWr");
/* harmony import */ var _src_material_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/material.module */ "wLiR");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "s7LF");
/* harmony import */ var _src_app_studycreation_question_editing_question_editing_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/app/studycreation/question-editing/question-editing.component */ "4XXs");
/* harmony import */ var _src_app_studycreation_section_editing_section_editing_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @src/app/studycreation/section-editing/section-editing.component */ "jfxa");
/* harmony import */ var _src_app_studycreation_sectionelement_editing_sectionelement_editing_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @src/app/studycreation/sectionelement-editing/sectionelement-editing.component */ "acHD");
/* harmony import */ var _src_app_studycreation_sequence_editing_sequence_editing_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @src/app/studycreation/sequence-editing/sequence-editing.component */ "Zltt");
/* harmony import */ var _src_app_studycreation_textblock_editing_textblock_editing_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @src/app/studycreation/textblock-editing/textblock-editing.component */ "My1a");
/* harmony import */ var _src_app_studycreation_vibrationpattern_editing_vibrationpattern_editing_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @src/app/studycreation/vibrationpattern-editing/vibrationpattern-editing.component */ "3c42");
/* harmony import */ var _src_app_studycreation_question_editing_question_selection_dialog_question_selection_dialog_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @src/app/studycreation/question-editing/question-selection-dialog/question-selection-dialog.component */ "Uyn7");
/* harmony import */ var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/cdk/drag-drop */ "ltgo");
/* harmony import */ var _src_app_studycreation_toolboxes_vibrationpattern_toolbox_vibrationpattern_toolbox_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @src/app/studycreation/toolboxes/vibrationpattern-toolbox/vibrationpattern-toolbox.component */ "lIQF");
/* harmony import */ var _src_app_studycreation_toolboxes_studyobject_toolbox_studyobject_toolbox_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @src/app/studycreation/toolboxes/studyobject-toolbox/studyobject-toolbox.component */ "zVIr");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let StudycreationModule = class StudycreationModule {
};
StudycreationModule = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
declarations: [
_src_app_studycreation_general_editing_general_editing_component__WEBPACK_IMPORTED_MODULE_3__["GeneralEditingComponent"],
_src_app_studycreation_question_editing_question_editing_component__WEBPACK_IMPORTED_MODULE_6__["QuestionEditingComponent"],
_src_app_studycreation_section_editing_section_editing_component__WEBPACK_IMPORTED_MODULE_7__["SectionEditingComponent"],
_src_app_studycreation_sectionelement_editing_sectionelement_editing_component__WEBPACK_IMPORTED_MODULE_8__["SectionElementEditingComponent"],
_src_app_studycreation_sequence_editing_sequence_editing_component__WEBPACK_IMPORTED_MODULE_9__["SequenceEditingComponent"],
_src_app_studycreation_textblock_editing_textblock_editing_component__WEBPACK_IMPORTED_MODULE_10__["TextBlockEditingComponent"],
_src_app_studycreation_vibrationpattern_editing_vibrationpattern_editing_component__WEBPACK_IMPORTED_MODULE_11__["VibrationPatternEditingComponent"],
_src_app_studycreation_question_editing_question_selection_dialog_question_selection_dialog_component__WEBPACK_IMPORTED_MODULE_12__["QuestionSelectionDialogComponent"],
_src_app_studycreation_toolboxes_vibrationpattern_toolbox_vibrationpattern_toolbox_component__WEBPACK_IMPORTED_MODULE_14__["VibrationPatternToolboxComponent"],
_src_app_studycreation_toolboxes_studyobject_toolbox_studyobject_toolbox_component__WEBPACK_IMPORTED_MODULE_15__["StudyObjectToolboxComponent"],
],
imports: [
_angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
_src_app_studycreation_studycreation_routing_module__WEBPACK_IMPORTED_MODULE_2__["StudyCreationRoutingModule"],
_src_material_module__WEBPACK_IMPORTED_MODULE_4__["MaterialModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_5__["ReactiveFormsModule"],
_angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormsModule"],
_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_13__["DragDropModule"]
]
})
], StudycreationModule);
/***/ }),
/***/ "RFVM":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/raw-loader/dist/cjs.js!./src/app/studycreation/question-editing/question-editing.component.html ***!
\**********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<a mat-fab class=\"greenButton\" (click)=\"onAddQuestion()\" style=\"display: block; margin: auto;\">\r\n <mat-icon>add</mat-icon>\r\n</a><br>\r\n<div *ngFor=\"let question of questions; let index = index\">\r\n <mat-card>\r\n <mat-card-title>\r\n <h3>{{this.getStudyObjectTypeName(question)}}</h3>\r\n <mat-form-field class=\"example-full-width\" style=\"width: 50%;font-size:18px\">\r\n <input matInput placeholder=\"Interne Bezeichnung\" [(ngModel)]=\"question.name\" />\r\n </mat-form-field> \r\n <mat-form-field class=\"example-full-width\" style=\"width: 50%;font-size:18px\">\r\n <input matInput placeholder=\"Anzeigename\" [(ngModel)]=\"question.displayName\" />\r\n </mat-form-field> \r\n <button mat-icon-button class=\"redButton\" (click)=\"removeFromStudy(index, question.id)\">\r\n <mat-icon class=\"trashCan\">delete</mat-icon>\r\n </button>\r\n </mat-card-title>\r\n <!--FRAGEINHALT-->\r\n <mat-form-field class=\"example-full-width\" style=\"width: 50%;\">\r\n <input matInput placeholder=\"Fragestellung\" [(ngModel)]=\"question.questionText\" />\r\n </mat-form-field>\r\n\r\n\r\n <div *ngIf=\"isLinearScaleQuestion(question) == 'linearScale'\">\r\n <mat-form-field class=\"example-full-width\" style=\"width: 32%;\">\r\n <input matInput placeholder=\"Anzahl der Wahlmöglichkeiten (2 bis 12)\" [formControl]=\"this.formControls[index][1]\" [errorStateMatcher]=\"this.matcher\" />\r\n <mat-error *ngIf=\"this.formControls[index][1].invalid\">Fehlerhafte Eingabe.</mat-error>\r\n </mat-form-field> \r\n <mat-form-field class=\"example-full-width\" style=\"width: 32%;\">\r\n <input matInput placeholder=\"Linkes Label\" [(ngModel)]=\"question.leftLabel\" />\r\n </mat-form-field> \r\n <mat-form-field class=\"example-full-width\" style=\"width: 32%;\">\r\n <input matInput placeholder=\"Rechtes Label\" [(ngModel)]=\"question.rightLabel\" />\r\n </mat-form-field>\r\n </div>\r\n <div *ngIf=\"isLinearScaleQuestion(question) == 'multipleChoice'\">\r\n <!--<mat-form-field class=\"example-full-width\" style=\"width: 20%;\">\r\n <input matInput placeholder=\"Mindestens auszuwählen\" [(ngModel)]=\"question.minSelectable\" />\r\n </mat-form-field> -->\r\n <mat-form-field class=\"example-full-width\" style=\"width: 20%;\">\r\n <input matInput placeholder=\"Maximal auswählbar\" [formControl]=\"this.formControls[index][0]\" [errorStateMatcher]=\"this.matcher\" />\r\n <mat-error *ngIf=\"this.formControls[index][0].invalid\">Fehlerhafte Eingabe.</mat-error>\r\n </mat-form-field><br>\r\n <label>Antwortmöglichkeiten</label><br><br>\r\n <div *ngFor=\"let answerChoice of question.answerOptions; let index = index\">\r\n <mat-form-field class=\"example-full-width\" style=\"width: 32%;\">\r\n <input matInput placeholder={{index+1}} [ngModel]=\"question.answerOptions[index]\" (change)=\"valueUpdate(question, index, $event)\"/>\r\n </mat-form-field>\r\n <button mat-icon-button class=\"redButton\" (click)=\"removeFromArray(question.answerOptions, index)\">\r\n <mat-icon class=\"trashCan\">delete</mat-icon>\r\n </button>\r\n </div>\r\n <a mat-fab class=\"greenButton\" (click)=\"onAddAnswerChoice(question)\" style=\"display: block; margin: auto;\">\r\n <mat-icon>add</mat-icon>\r\n </a>\r\n </div>\r\n\r\n </mat-card>\r\n <br>\r\n</div>");
/***/ }),
/***/ "Uyn7":
/*!*****************************************************************************************************************!*\
!*** ./src/app/studycreation/question-editing/question-selection-dialog/question-selection-dialog.component.ts ***!
\*****************************************************************************************************************/
/*! exports provided: QuestionSelectionDialogComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSelectionDialogComponent", function() { return QuestionSelectionDialogComponent; });
/* harmony import */ var _raw_loader_question_selection_dialog_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./question-selection-dialog.component.html */ "ypjz");
/* harmony import */ var _question_selection_dialog_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./question-selection-dialog.component.css */ "M/E+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/dialog */ "iELJ");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_DateQuestion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/DateQuestion */ "lGoz");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_LinearScaleQuestion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/LinearScaleQuestion */ "Tcgm");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_MultipleChoiceQuestion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/MultipleChoiceQuestion */ "MsGT");
/* harmony import */ var _src_app_Model_Study_StudyObjects_Questions_TextQuestion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @src/app/Model/Study/StudyObjects/Questions/TextQuestion */ "r8Zv");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../services/study-wrapper/study-wrapper.service */ "pzGZ");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
let QuestionSelectionDialogComponent = class QuestionSelectionDialogComponent {
constructor(studywrapper, dialogRef) {
this.studywrapper = studywrapper;
this.dialogRef = dialogRef;
}
ngOnInit() {
}
/**
* Aus dem Parameter wird der Fragetyp abgeleitet, eine default Frage erstellt und zurückgegeben.
* @param questionType
*/
onButtonClick(questionType) {
let questionResult = undefined;
switch (questionType) {
case 0:
questionResult = new _src_app_Model_Study_StudyObjects_Questions_DateQuestion__WEBPACK_IMPORTED_MODULE_4__["DateQuestion"](this.studywrapper.lastID, "", "", "");
break;
case 1:
questionResult = new _src_app_Model_Study_StudyObjects_Questions_LinearScaleQuestion__WEBPACK_IMPORTED_MODULE_5__["LinearScaleQuestion"](this.studywrapper.lastID, "", "", "", 5, "", "");
break;
case 2:
questionResult = new _src_app_Model_Study_StudyObjects_Questions_MultipleChoiceQuestion__WEBPACK_IMPORTED_MODULE_6__["MultipleChoiceQuestion"](this.studywrapper.lastID, "", "", "", [], 1);
break;
case 3:
questionResult = new _src_app_Model_Study_StudyObjects_Questions_TextQuestion__WEBPACK_IMPORTED_MODULE_7__["TextQuestion"](this.studywrapper.lastID, "", "", "");
break;
}
this.dialogRef.close(questionResult);
}
};
QuestionSelectionDialogComponent.ctorParameters = () => [
{ type: _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__["StudyWrapperService"] },
{ type: _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__["MatDialogRef"] }
];
QuestionSelectionDialogComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
selector: 'app-question-selection-dialog',
template: _raw_loader_question_selection_dialog_component_html__WEBPACK_IMPORTED_MODULE_0__["default"],
styles: [_question_selection_dialog_component_css__WEBPACK_IMPORTED_MODULE_1__["default"]]
}),
__metadata("design:paramtypes", [_services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_8__["StudyWrapperService"], _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__["MatDialogRef"]])
], QuestionSelectionDialogComponent);
/***/ }),
/***/ "Zltt":
/*!******************************************************************************!*\
!*** ./src/app/studycreation/sequence-editing/sequence-editing.component.ts ***!
\******************************************************************************/
/*! exports provided: SequenceEditingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEditingComponent", function() { return SequenceEditingComponent; });
/* harmony import */ var _raw_loader_sequence_editing_component_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raw-loader!./sequence-editing.component.html */ "sbJu");
/* harmony import */ var _sequence_editing_component_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sequence-editing.component.css */ "PTz0");
/* harmony import */ var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/drag-drop */ "ltgo");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "8Y7J");
/* harmony import */ var _src_app_Model_Randomizing_RandomizingStrategies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/app/Model/Randomizing/RandomizingStrategies */ "TQet");
/* harmony import */ var _src_app_Model_Study_ReferenceTuple__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/app/Model/Study/ReferenceTuple */ "HfNz");
/* harmony import */ var _services_study_wrapper_study_wrapper_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../services/study-wrapper/study-wrapper.service */ "pzGZ");
/* harmony import */ var _services_color_color_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../services/color/color.service */ "atCH");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;