Built motion from commit (unavailable).|2.5.30
[motion2.git] / public / assets / plugins / angular-material-form-builder / dist / angular-material-form-builder.js
1 (function webpackUniversalModuleDefinition(root, factory) {
2         if(typeof exports === 'object' && typeof module === 'object')
3                 module.exports = factory();
4         else if(typeof define === 'function' && define.amd)
5                 define([], factory);
6         else if(typeof exports === 'object')
7                 exports["angular-material-form-builder"] = factory();
8         else
9                 root["angular-material-form-builder"] = factory();
10 })(self, function() {
11 return /******/ (() => { // webpackBootstrap
12 /******/        "use strict";
13 /******/        var __webpack_modules__ = ({
14
15 /***/ "./src/lib/directives/agreement-item/agreement-item.controller.js":
16 /*!************************************************************************!*\
17   !*** ./src/lib/directives/agreement-item/agreement-item.controller.js ***!
18   \************************************************************************/
19 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
21 __webpack_require__.r(__webpack_exports__);
22 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23 /* harmony export */   "AgreementItemCtrl": () => /* binding */ AgreementItemCtrl
24 /* harmony export */ });
25 AgreementItemCtrl.$inject = ["Utils", "$element"];
26
27 /**
28  * @ngInject
29  *
30  * @param {import('../../utils/utils.service').Utils} Utils
31  * @param {JQLite} $element
32  */
33 function AgreementItemCtrl(Utils, $element) {
34   this.Element = $element;
35   this.item = Utils.extend(this.item || {}, {
36     config: {
37       maxSelections: null
38     },
39     options: [{
40       value: '',
41       selected: false
42     }]
43   });
44 }
45
46
47
48 /***/ }),
49
50 /***/ "./src/lib/directives/agreement-item/agreement-item.directive.js":
51 /*!***********************************************************************!*\
52   !*** ./src/lib/directives/agreement-item/agreement-item.directive.js ***!
53   \***********************************************************************/
54 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
55
56 __webpack_require__.r(__webpack_exports__);
57 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58 /* harmony export */   "AgreementItem": () => /* binding */ AgreementItem
59 /* harmony export */ });
60 /* harmony import */ var _agreement_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./agreement-item.controller */ "./src/lib/directives/agreement-item/agreement-item.controller.js");
61  // import AgreementItemTemplate from './agreement-item.tpl.html'
62
63 /**
64  * @implements {ng.IDirective}
65  */
66
67 class AgreementItem {
68   /**
69    * @ngInject
70    */
71   constructor() {
72     this.restrict = 'E';
73     this.scope = {
74       item: '='
75     };
76     this.controller = _agreement_item_controller__WEBPACK_IMPORTED_MODULE_0__.AgreementItemCtrl;
77     this.controllerAs = 'Agreement';
78     this.bindToController = true;
79   }
80
81 }
82
83 AgreementItem.$inject = [];
84
85
86 /***/ }),
87
88 /***/ "./src/lib/directives/agreement-item/agreement-view.controller.js":
89 /*!************************************************************************!*\
90   !*** ./src/lib/directives/agreement-item/agreement-view.controller.js ***!
91   \************************************************************************/
92 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
93
94 __webpack_require__.r(__webpack_exports__);
95 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
96 /* harmony export */   "AgreementViewCtrl": () => /* binding */ AgreementViewCtrl
97 /* harmony export */ });
98 class AgreementViewCtrl {
99   /**
100    * @ngInject
101    * @param {ng.IScope} $scope
102    * @param {import('../../utils/utils.service').Utils} Utils
103    */
104   constructor($scope, Utils) {
105     this.Scope = $scope;
106     this.Utils = Utils;
107     this.formItem = {};
108   }
109
110   init() {
111     this.formItem = this.Utils.extend(this.formItem || {}, {
112       config: {},
113       options: [{
114         value: '',
115         selected: false
116       }]
117     });
118     this.selectedOptions = this._getSelectedOptions();
119     this.disableOptions = false;
120     this.isValid = true;
121
122     this._updateView();
123
124     this._updateValidity();
125
126     if (this.isPreview()) {
127       this._enableWatchers();
128     }
129   }
130
131   toggleSelectedOption() {
132     this.selectedOptions = this._getSelectedOptions();
133
134     this._updateView();
135
136     this._updateValidity();
137   }
138
139   _getSelectedOptions() {
140     return this.formItem.options.filter(option => {
141       return option.selected;
142     });
143   }
144
145   _updateView() {
146     if (!this.formItem.config.maxSelections) {
147       this.disableOptions = false;
148     } else if (this.selectedOptions.length === this.formItem.config.maxSelections) {
149       this.disableOptions = true;
150     } else {
151       this.disableOptions = false;
152     }
153   }
154
155   _updateValidity() {
156     if (this.formItem.config.required) {
157       this.isValid = this.selectedOptions.length > 0;
158     } else {
159       this.isValid = true;
160     }
161
162     this.form.$setValidity('minSelections', this.isValid);
163   }
164
165   _enableWatchers() {
166     this.Scope.$watch('AgreementView.formItem.config.required', newVal => {
167       if (newVal !== undefined) {
168         this._updateView();
169
170         this._updateValidity();
171       }
172     });
173   }
174
175 }
176
177 AgreementViewCtrl.$inject = ["$scope", "Utils"];
178
179
180 /***/ }),
181
182 /***/ "./src/lib/directives/agreement-item/agreement-view.directive.js":
183 /*!***********************************************************************!*\
184   !*** ./src/lib/directives/agreement-item/agreement-view.directive.js ***!
185   \***********************************************************************/
186 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
187
188 __webpack_require__.r(__webpack_exports__);
189 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
190 /* harmony export */   "AgreementView": () => /* binding */ AgreementView
191 /* harmony export */ });
192 /* harmony import */ var _agreement_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./agreement-view.controller */ "./src/lib/directives/agreement-item/agreement-view.controller.js");
193 /* harmony import */ var _agreement_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./agreement-view.tpl.html */ "./src/lib/directives/agreement-item/agreement-view.tpl.html");
194
195
196
197 class AgreementView {
198   /**
199    * @ngInject
200    * @param {ng.ITimeoutService} $timeout
201    */
202   constructor($timeout) {
203     this.$timeout = $timeout;
204     this.template = _agreement_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
205     this.restrict = 'E';
206     this.scope = {
207       formItem: '=',
208       isPreview: '&',
209       form: '='
210     };
211     this.controller = _agreement_view_controller__WEBPACK_IMPORTED_MODULE_0__.AgreementViewCtrl;
212     this.controllerAs = 'AgreementView';
213     this.bindToController = true;
214   }
215   /**
216    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
217    * @param {ng.IScope} scope - scope
218    * @param {JQLite} element - element
219    * @param {ng.IAttributes} attrs - attributes
220    * @param {AgreementViewCtrl} ctrl - this instance controller
221    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
222    */
223
224
225   link(scope, element, attrs, ctrl) {
226     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
227     this.$timeout(function () {
228       ctrl.init();
229     }, 50);
230   }
231
232 }
233
234 AgreementView.$inject = ["$timeout"];
235
236
237 /***/ }),
238
239 /***/ "./src/lib/directives/checkboxes-item/checkboxes-item.controller.js":
240 /*!**************************************************************************!*\
241   !*** ./src/lib/directives/checkboxes-item/checkboxes-item.controller.js ***!
242   \**************************************************************************/
243 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
244
245 __webpack_require__.r(__webpack_exports__);
246 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
247 /* harmony export */   "CheckboxesItemCtrl": () => /* binding */ CheckboxesItemCtrl
248 /* harmony export */ });
249 class CheckboxesItemCtrl {
250   /**
251    * @ngInject
252    *
253    * @param {import('../../utils/utils.service').Utils} Utils
254    * @param {JQLite} $element
255    */
256   constructor(Utils, $element) {
257     this.Element = $element;
258     this.item = Utils.extend(this.item || {}, {
259       config: {
260         maxSelections: null
261       },
262       options: [{
263         value: '',
264         selected: false
265       }]
266     });
267   }
268
269   deleteOption(index) {
270     this.item.options.splice(index, 1);
271   }
272
273   addOption() {
274     this.item.options.push({
275       value: '',
276       selected: false
277     }); // Focus new element
278
279     setTimeout(() => {
280       const options = this.Element.find('input');
281       const addedOption = options[options.length - 1];
282       addedOption.focus();
283     }, 0);
284   }
285
286 }
287
288 CheckboxesItemCtrl.$inject = ["Utils", "$element"];
289
290
291 /***/ }),
292
293 /***/ "./src/lib/directives/checkboxes-item/checkboxes-item.directive.js":
294 /*!*************************************************************************!*\
295   !*** ./src/lib/directives/checkboxes-item/checkboxes-item.directive.js ***!
296   \*************************************************************************/
297 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
298
299 __webpack_require__.r(__webpack_exports__);
300 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
301 /* harmony export */   "CheckboxesItem": () => /* binding */ CheckboxesItem
302 /* harmony export */ });
303 /* harmony import */ var _checkboxes_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkboxes-item.tpl.html */ "./src/lib/directives/checkboxes-item/checkboxes-item.tpl.html");
304 /* harmony import */ var _checkboxes_item_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./checkboxes-item.controller */ "./src/lib/directives/checkboxes-item/checkboxes-item.controller.js");
305
306
307 /**
308  * @implements {ng.IDirective}
309  */
310
311 function CheckboxesItem() {
312   const directive = {
313     restrict: 'E',
314     template: _checkboxes_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default,
315     scope: {
316       item: '='
317     },
318     controller: _checkboxes_item_controller__WEBPACK_IMPORTED_MODULE_1__.CheckboxesItemCtrl,
319     controllerAs: 'Checkboxes',
320     bindToController: true
321   };
322   return directive;
323 }
324
325
326
327 /***/ }),
328
329 /***/ "./src/lib/directives/checkboxes-item/checkboxes-view.controller.js":
330 /*!**************************************************************************!*\
331   !*** ./src/lib/directives/checkboxes-item/checkboxes-view.controller.js ***!
332   \**************************************************************************/
333 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
334
335 __webpack_require__.r(__webpack_exports__);
336 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
337 /* harmony export */   "CheckboxesViewCtrl": () => /* binding */ CheckboxesViewCtrl
338 /* harmony export */ });
339 class CheckboxesViewCtrl {
340   /**
341    * @ngInject
342    * @param {ng.IScope} $scope
343    * @param {import('../../utils/utils.service').Utils} Utils
344    */
345   constructor($scope, Utils) {
346     this.Scope = $scope;
347     this.Utils = Utils;
348     this.formItem = {};
349   }
350
351   init() {
352     this.formItem = this.Utils.extend(this.formItem || {}, {
353       config: {},
354       options: []
355     });
356     this.selectedOptions = this._getSelectedOptions();
357     this.disableOptions = false;
358     this.isValid = true;
359
360     this._updateView();
361
362     this._updateValidity();
363
364     if (this.isPreview()) {
365       this._enableWatchers();
366     }
367   }
368
369   toggleSelectedOption() {
370     this.selectedOptions = this._getSelectedOptions();
371
372     this._updateView();
373
374     this._updateValidity();
375   }
376
377   _getSelectedOptions() {
378     return this.formItem.options.filter(option => {
379       return option.selected;
380     });
381   }
382
383   _updateView() {
384     if (!this.formItem.config.maxSelections) {
385       this.disableOptions = false;
386     } else if (this.selectedOptions.length === this.formItem.config.maxSelections) {
387       this.disableOptions = true;
388     } else {
389       this.disableOptions = false;
390     }
391   }
392
393   _updateValidity() {
394     if (this.formItem.config.required) {
395       this.isValid = this.selectedOptions.length > 0;
396     } else {
397       this.isValid = true;
398     }
399
400     this.form.$setValidity('minSelections', this.isValid);
401   }
402
403   _enableWatchers() {
404     this.Scope.$watch('CheckboxesView.formItem.config.required', newVal => {
405       if (newVal !== undefined) {
406         this._updateView();
407
408         this._updateValidity();
409       }
410     });
411   }
412
413 }
414
415 CheckboxesViewCtrl.$inject = ["$scope", "Utils"];
416
417
418 /***/ }),
419
420 /***/ "./src/lib/directives/checkboxes-item/checkboxes-view.directive.js":
421 /*!*************************************************************************!*\
422   !*** ./src/lib/directives/checkboxes-item/checkboxes-view.directive.js ***!
423   \*************************************************************************/
424 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
425
426 __webpack_require__.r(__webpack_exports__);
427 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
428 /* harmony export */   "CheckboxesView": () => /* binding */ CheckboxesView
429 /* harmony export */ });
430 /* harmony import */ var _checkboxes_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkboxes-view.tpl.html */ "./src/lib/directives/checkboxes-item/checkboxes-view.tpl.html");
431 /* harmony import */ var _checkboxes_view_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./checkboxes-view.controller */ "./src/lib/directives/checkboxes-item/checkboxes-view.controller.js");
432
433
434 /**
435  * @implements {ng.IDirective}
436  */
437
438 class CheckboxesView {
439   /**
440    * @ngInject
441    * @param {ng.ITimeoutService} $timeout
442    */
443   constructor($timeout) {
444     this.$timeout = $timeout;
445     this.restrict = 'E';
446     this.template = _checkboxes_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
447     this.scope = {
448       formItem: '=',
449       isPreview: '&',
450       form: '='
451     };
452     this.controller = _checkboxes_view_controller__WEBPACK_IMPORTED_MODULE_1__.CheckboxesViewCtrl;
453     this.controllerAs = 'CheckboxesView';
454     this.bindToController = true;
455   }
456   /**
457    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
458    * @param {ng.IScope} scope - scope
459    * @param {JQLite} element - element
460    * @param {ng.IAttributes} attrs - attributes
461    * @param {CheckboxesViewCtrl} ctrl - this instance controller
462    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
463    */
464
465
466   link(scope, element, attrs, ctrl) {
467     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
468     this.$timeout(function () {
469       ctrl.init();
470     }, 50);
471   }
472
473 }
474
475 CheckboxesView.$inject = ["$timeout"];
476
477
478 /***/ }),
479
480 /***/ "./src/lib/directives/form-item/form-item.controller.js":
481 /*!**************************************************************!*\
482   !*** ./src/lib/directives/form-item/form-item.controller.js ***!
483   \**************************************************************/
484 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
485
486 __webpack_require__.r(__webpack_exports__);
487 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
488 /* harmony export */   "FormItemCtrl": () => /* binding */ FormItemCtrl
489 /* harmony export */ });
490 const DEFAULT_TITLE = {
491   upload: 'Attachment',
492   agreement: 'Agreement',
493   input: 'Field',
494   chooseFromList: 'Select',
495   label: 'Label',
496   multipleChoices: 'Choice',
497   matrix: 'Matrix',
498   checkboxes: 'Options',
499   textarea: 'Text'
500 };
501
502 class FormItemCtrl {
503   /**
504    * @ngInject
505    * @param {ng.IScope} $scope
506    * @param {ng.IAttributes} $attrs
507    * @param {import('../../utils/utils.service').Utils} Utils
508    */
509   constructor($scope, $attrs, Utils) {
510     this.Attrs = $attrs;
511     this.Utils = Utils;
512     this.templates = {
513       upload: '<upload-item item="FormItem.item"></upload-item>',
514       agreement: '<agreement-item item="FormItem.item"></agreement-item>',
515       input: '<input-item item="FormItem.item"></input-item>',
516       chooseFromList: '<bet-form-choose-from-list item="FormItem.item"></bet-form-choose-from-list>',
517       label: '<label-item item="FormItem.item"></label-item>',
518       multipleChoices: '<radio-button-item item="FormItem.item"></radio-button-item>',
519       matrix: '<matrix-item item="FormItem.item"></matrix-item>',
520       checkboxes: '<checkboxes-item item="FormItem.item"></checkboxes-item>',
521       textarea: '<textarea-item item="FormItem.item"></textarea-item>'
522     };
523     this.item = {};
524     this.scope = $scope;
525   }
526
527   init() {
528     this.item = this.Utils.extend(this.item || {}, {
529       type: this.Attrs.type,
530       props: {
531         title: DEFAULT_TITLE[this.Attrs.type],
532         helpText: ''
533       },
534       config: {
535         required: false
536       }
537     });
538   }
539
540   deleteClicked() {
541     this.onDelete({
542       item: this.item,
543       index: this.index()
544     });
545   }
546   /**
547    *
548    * @param {string} type
549    */
550
551
552   _getItemTemplate(type) {
553     const prefix = '' + '<div class="form-item-container">' + '<div class="form-item-actions">' + '<md-button class="md-button" ng-if="FormItem.Attrs.onDelete" ng-click="FormItem.deleteClicked()"> ' + '<md-icon class="material-icons small">delete</md-icon>' + '</md-button>' + '<md-button class="md-button" ng-if="FormItem.Attrs.onUp" ng-click="FormItem.onUp({item: FormItem.item, index: FormItem.index()})"> ' + '<md-icon class="material-icons small">arrow_drop_up</md-icon>' + '</md-button>' + '<md-button class="md-button" ng-if="FormItem.Attrs.onDown" ng-click="FormItem.onDown({item: FormItem.item, index: FormItem.index()})"> ' + '<md-icon class="material-icons small">arrow_drop_down</md-icon>' + '</md-button>' + '</div>' + '<md-input-container>' + '<label>Field Title</label>' + '<input ng-model="FormItem.item.props.title"/>' + '</md-input-container>' + '<md-input-container>' + '<label>Help Text</label>' + '<input ng-model="FormItem.item.props.helpText" />' + '</md-input-container>';
554     const suffix = '' + '<md-input-container>' + '<md-checkbox ng-model="FormItem.item.config.required">Required field</md-checkbox>' + '</md-input-container>' + '</div>';
555     return prefix + this.templates[type] + suffix;
556   }
557
558 }
559
560 FormItemCtrl.$inject = ["$scope", "$attrs", "Utils"];
561
562
563 /***/ }),
564
565 /***/ "./src/lib/directives/form-item/form-item.directive.js":
566 /*!*************************************************************!*\
567   !*** ./src/lib/directives/form-item/form-item.directive.js ***!
568   \*************************************************************/
569 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
570
571 __webpack_require__.r(__webpack_exports__);
572 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
573 /* harmony export */   "FormItem": () => /* binding */ FormItem
574 /* harmony export */ });
575 /* harmony import */ var _form_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form-item.tpl.html */ "./src/lib/directives/form-item/form-item.tpl.html");
576 /* harmony import */ var _form_item_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form-item.controller */ "./src/lib/directives/form-item/form-item.controller.js");
577
578
579 /**
580  * @implements {ng.IDirective}
581  */
582
583 class FormItem {
584   /**
585    * @ngInject
586    * @param {ng.ICompileService} $compile
587    */
588   constructor($compile) {
589     this.$compile = $compile;
590     this.restrict = 'E';
591     this.scope = {
592       item: '=',
593       onDelete: '&',
594       onUp: '&',
595       onDown: '&',
596       index: '&'
597     };
598     this.controller = _form_item_controller__WEBPACK_IMPORTED_MODULE_1__.FormItemCtrl;
599     this.controllerAs = 'FormItem';
600     this.bindToController = true;
601     this.template = _form_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
602   }
603   /**
604    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
605    * @param {ng.IScope} scope - scope
606    * @param {JQLite} element - element
607    * @param {ng.IAttributes} attrs - attributes
608    * @param {FormItemCtrl} ctrl - this instance controller
609    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
610    */
611
612
613   link(scope, element, attrs, ctrl) {
614     const template = ctrl._getItemTemplate(attrs.type);
615
616     const el = this.$compile(template)(scope); // element.append(el)
617     // if done like above adds twice
618     // element.append(this.$compile(template)(scope))
619
620     ctrl.init();
621     return el;
622   }
623
624 }
625
626 FormItem.$inject = ["$compile"];
627
628
629 /***/ }),
630
631 /***/ "./src/lib/directives/form-items-container/form-items-container.controller.js":
632 /*!************************************************************************************!*\
633   !*** ./src/lib/directives/form-items-container/form-items-container.controller.js ***!
634   \************************************************************************************/
635 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
636
637 __webpack_require__.r(__webpack_exports__);
638 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
639 /* harmony export */   "FormItemsContainerCtrl": () => /* binding */ FormItemsContainerCtrl
640 /* harmony export */ });
641 class FormItemsContainerCtrl {
642   /**
643    * @ngInject
644    */
645   constructor() {
646     /**
647      * @type {import('../../main/main.controller').FormConfig}
648      */
649     this.form = {
650       items: []
651     };
652   }
653   /**
654    *
655    * @param {import('../../main/main.controller').Item} item
656    * @param {number} index
657    */
658
659
660   delete(item, index) {
661     this.form.items.splice(index, 1);
662   }
663   /**
664    *
665    * @param {import('../../main/main.controller').Item} item
666    * @param {number} index
667    */
668
669
670   up(item, index) {
671     if (index !== 0) {
672       const prevItem = this.form.items[index - 1];
673       this.form.items[index] = prevItem;
674       this.form.items[index - 1] = item;
675     }
676   }
677   /**
678    *
679    * @param {import('../../main/main.controller').Item} item
680    * @param {number} index
681    */
682
683
684   down(item, index) {
685     if (index !== this.form.items.length - 1) {
686       const nextItem = this.form.items[index + 1];
687       this.form.items[index] = nextItem;
688       this.form.items[index + 1] = item;
689     }
690   }
691
692 }
693
694 FormItemsContainerCtrl.$inject = [];
695
696
697 /***/ }),
698
699 /***/ "./src/lib/directives/form-items-container/form-items-container.directive.js":
700 /*!***********************************************************************************!*\
701   !*** ./src/lib/directives/form-items-container/form-items-container.directive.js ***!
702   \***********************************************************************************/
703 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
704
705 __webpack_require__.r(__webpack_exports__);
706 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
707 /* harmony export */   "FormItemsContainer": () => /* binding */ FormItemsContainer
708 /* harmony export */ });
709 /* harmony import */ var _form_items_container_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form-items-container.controller */ "./src/lib/directives/form-items-container/form-items-container.controller.js");
710 /* harmony import */ var _form_items_container_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form-items-container.tpl.html */ "./src/lib/directives/form-items-container/form-items-container.tpl.html");
711
712
713 /**
714  * @implements {ng.IDirective}
715  */
716
717 class FormItemsContainer {
718   /**
719    * @ngInject
720    */
721   constructor() {
722     this.restrict = 'E';
723     this.scope = {
724       form: '='
725     };
726     this.template = _form_items_container_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
727     this.controller = _form_items_container_controller__WEBPACK_IMPORTED_MODULE_0__.FormItemsContainerCtrl;
728     this.controllerAs = 'container';
729     this.bindToController = true;
730   }
731
732 }
733
734 FormItemsContainer.$inject = [];
735
736
737 /***/ }),
738
739 /***/ "./src/lib/directives/form-view/form-view.controller.js":
740 /*!**************************************************************!*\
741   !*** ./src/lib/directives/form-view/form-view.controller.js ***!
742   \**************************************************************/
743 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
744
745 __webpack_require__.r(__webpack_exports__);
746 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
747 /* harmony export */   "FormViewCtrl": () => /* binding */ FormViewCtrl
748 /* harmony export */ });
749 class FormViewCtrl {
750   /**
751    * @ngInject
752    * @param {ng.IScù} $scope
753    */
754   constructor($scope) {
755     this.Scope = $scope;
756   }
757
758   init() {}
759
760 }
761
762 FormViewCtrl.$inject = ["$scope"];
763
764
765 /***/ }),
766
767 /***/ "./src/lib/directives/form-view/form-view.directive.js":
768 /*!*************************************************************!*\
769   !*** ./src/lib/directives/form-view/form-view.directive.js ***!
770   \*************************************************************/
771 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
772
773 __webpack_require__.r(__webpack_exports__);
774 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
775 /* harmony export */   "FormView": () => /* binding */ FormView
776 /* harmony export */ });
777 /* harmony import */ var _form_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form-view.controller */ "./src/lib/directives/form-view/form-view.controller.js");
778 /* harmony import */ var _form_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form-view.tpl.html */ "./src/lib/directives/form-view/form-view.tpl.html");
779
780
781 /**
782  * @implements {ng.IDirective}
783  */
784
785 class FormView {
786   /**
787    * @ngInject
788    */
789   constructor() {
790     this.restrict = 'E';
791     this.template = _form_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
792     this.scope = {
793       form: '='
794     };
795     this.controller = _form_view_controller__WEBPACK_IMPORTED_MODULE_0__.FormViewCtrl;
796     this.controllerAs = 'FormView';
797     this.bindToController = true;
798   }
799   /**
800    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
801    * @param {ng.IScope} scope - scope
802    * @param {JQLite} element - element
803    * @param {ng.IAttributes} attrs - attributes
804    * @param {FormViewCtrl} ctrl - this instance controller
805    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
806    */
807
808
809   link(scope, element, attrs, ctrl) {
810     ctrl.init();
811   }
812
813 }
814
815 FormView.$inject = [];
816
817
818 /***/ }),
819
820 /***/ "./src/lib/directives/input-item/input-item.controller.js":
821 /*!****************************************************************!*\
822   !*** ./src/lib/directives/input-item/input-item.controller.js ***!
823   \****************************************************************/
824 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
825
826 __webpack_require__.r(__webpack_exports__);
827 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
828 /* harmony export */   "InputItemCtrl": () => /* binding */ InputItemCtrl
829 /* harmony export */ });
830 class InputItemCtrl {
831   /**
832    * @ngInject
833    * @param {import('../../utils/utils.service').Utils} Utils
834    * @param {JQLite} $element
835    */
836   constructor(Utils, $element) {
837     this.Element = $element;
838     this.item = Utils.extend(this.item || {}, {
839       config: {
840         type: 'text'
841       }
842     });
843   }
844
845 }
846
847 InputItemCtrl.$inject = ["Utils", "$element"];
848
849
850 /***/ }),
851
852 /***/ "./src/lib/directives/input-item/input-item.directive.js":
853 /*!***************************************************************!*\
854   !*** ./src/lib/directives/input-item/input-item.directive.js ***!
855   \***************************************************************/
856 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
857
858 __webpack_require__.r(__webpack_exports__);
859 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
860 /* harmony export */   "InputItem": () => /* binding */ InputItem
861 /* harmony export */ });
862 /* harmony import */ var _input_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./input-item.controller */ "./src/lib/directives/input-item/input-item.controller.js");
863 /* harmony import */ var _input_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./input-item.tpl.html */ "./src/lib/directives/input-item/input-item.tpl.html");
864
865
866 /**
867  * @implements {ng.IDirective}
868  */
869
870 class InputItem {
871   /**
872    * @ngInject
873    */
874   constructor() {
875     this.restrict = 'E';
876     this.template = _input_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
877     this.scope = {
878       item: '='
879     };
880     this.controller = _input_item_controller__WEBPACK_IMPORTED_MODULE_0__.InputItemCtrl;
881     this.controllerAs = 'Input';
882     this.bindToController = true;
883   }
884
885 }
886
887 InputItem.$inject = [];
888
889
890 /***/ }),
891
892 /***/ "./src/lib/directives/input-item/input-view.controller.js":
893 /*!****************************************************************!*\
894   !*** ./src/lib/directives/input-item/input-view.controller.js ***!
895   \****************************************************************/
896 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
897
898 __webpack_require__.r(__webpack_exports__);
899 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
900 /* harmony export */   "InputViewCtrl": () => /* binding */ InputViewCtrl
901 /* harmony export */ });
902 class InputViewCtrl {
903   /**
904    * @ngInject
905    * @param {import('../../utils/utils.service').Utils} Utils
906    */
907   constructor(Utils) {
908     this.Utils = Utils;
909     this.formItem = {};
910   }
911
912   init() {
913     this.Utils.extend(this.formItem, {
914       config: {}
915     });
916   }
917
918 }
919
920 InputViewCtrl.$inject = ["Utils"];
921
922
923 /***/ }),
924
925 /***/ "./src/lib/directives/input-item/input-view.directive.js":
926 /*!***************************************************************!*\
927   !*** ./src/lib/directives/input-item/input-view.directive.js ***!
928   \***************************************************************/
929 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
930
931 __webpack_require__.r(__webpack_exports__);
932 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
933 /* harmony export */   "InputView": () => /* binding */ InputView
934 /* harmony export */ });
935 /* harmony import */ var _input_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./input-view.controller */ "./src/lib/directives/input-item/input-view.controller.js");
936 /* harmony import */ var _input_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./input-view.tpl.html */ "./src/lib/directives/input-item/input-view.tpl.html");
937
938
939 /**
940  * @implements {ng.IDirective}
941  */
942
943 class InputView {
944   /**
945    * @ngInject
946    * @param {ng.ITimeoutService} $timeout
947    */
948   constructor($timeout) {
949     this.$timeout = $timeout;
950     this.restrict = 'E';
951     this.template = _input_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
952     this.scope = {
953       formItem: '=',
954       form: '='
955     };
956     this.controller = _input_view_controller__WEBPACK_IMPORTED_MODULE_0__.InputViewCtrl;
957     this.controllerAs = 'InputView';
958     this.bindToController = true;
959   }
960   /**
961    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
962    * @param {ng.IScope} scope - scope
963    * @param {JQLite} element - element
964    * @param {ng.IAttributes} attrs - attributes
965    * @param {FormItemCtrl} ctrl - this instance controller
966    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
967    */
968
969
970   link(scope, elem, attrs, ctrl) {
971     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
972     this.$timeout(function () {
973       ctrl.init();
974     }, 50);
975   }
976
977 }
978
979 InputView.$inject = ["$timeout"];
980
981
982 /***/ }),
983
984 /***/ "./src/lib/directives/label-item/label-item.controller.js":
985 /*!****************************************************************!*\
986   !*** ./src/lib/directives/label-item/label-item.controller.js ***!
987   \****************************************************************/
988 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
989
990 __webpack_require__.r(__webpack_exports__);
991 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
992 /* harmony export */   "LabelItemCtrl": () => /* binding */ LabelItemCtrl
993 /* harmony export */ });
994 class LabelItemCtrl {
995   /**
996    * @ngInject
997    * @param {JQLite} $element
998    */
999   constructor($element) {
1000     this.Element = $element;
1001   }
1002
1003 }
1004
1005 LabelItemCtrl.$inject = ["$element"];
1006
1007
1008 /***/ }),
1009
1010 /***/ "./src/lib/directives/label-item/label-item.directive.js":
1011 /*!***************************************************************!*\
1012   !*** ./src/lib/directives/label-item/label-item.directive.js ***!
1013   \***************************************************************/
1014 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1015
1016 __webpack_require__.r(__webpack_exports__);
1017 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1018 /* harmony export */   "LabelItem": () => /* binding */ LabelItem
1019 /* harmony export */ });
1020 /* harmony import */ var _label_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./label-item.controller */ "./src/lib/directives/label-item/label-item.controller.js");
1021 /* harmony import */ var _label_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label-item.tpl.html */ "./src/lib/directives/label-item/label-item.tpl.html");
1022
1023
1024 /**
1025  * @implements {ng.IDirective}
1026  */
1027
1028 class LabelItem {
1029   constructor() {
1030     this.restrict = 'E';
1031     this.template = _label_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1032     this.scope = {
1033       item: '='
1034     };
1035     this.controller = _label_item_controller__WEBPACK_IMPORTED_MODULE_0__.LabelItemCtrl;
1036     this.controllerAs = 'Label';
1037     this.bindToController = true;
1038   }
1039
1040 }
1041
1042
1043
1044 /***/ }),
1045
1046 /***/ "./src/lib/directives/label-item/label-view.controller.js":
1047 /*!****************************************************************!*\
1048   !*** ./src/lib/directives/label-item/label-view.controller.js ***!
1049   \****************************************************************/
1050 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1051
1052 __webpack_require__.r(__webpack_exports__);
1053 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1054 /* harmony export */   "LabelViewCtrl": () => /* binding */ LabelViewCtrl
1055 /* harmony export */ });
1056 class LabelViewCtrl {
1057   /**
1058    * @ngInject
1059    * @param {import('../../utils/utils.service').Utils} Utils
1060    */
1061   constructor(Utils) {
1062     this.Utils = Utils;
1063   }
1064
1065   init() {
1066     this.Utils.extend(this.formItem, {});
1067   }
1068
1069 }
1070
1071 LabelViewCtrl.$inject = ["Utils"];
1072
1073
1074 /***/ }),
1075
1076 /***/ "./src/lib/directives/label-item/label-view.directive.js":
1077 /*!***************************************************************!*\
1078   !*** ./src/lib/directives/label-item/label-view.directive.js ***!
1079   \***************************************************************/
1080 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1081
1082 __webpack_require__.r(__webpack_exports__);
1083 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1084 /* harmony export */   "LabelView": () => /* binding */ LabelView
1085 /* harmony export */ });
1086 /* harmony import */ var _label_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./label-view.controller */ "./src/lib/directives/label-item/label-view.controller.js");
1087 /* harmony import */ var _label_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label-view.tpl.html */ "./src/lib/directives/label-item/label-view.tpl.html");
1088
1089
1090 /**
1091  * @implements {ng.IDirective}
1092  */
1093
1094 class LabelView {
1095   /**
1096    * @ngInject
1097    * @param {ng.ITimeoutService} $timeout
1098    */
1099   constructor($timeout) {
1100     this.$timeout = $timeout;
1101     this.restrict = 'E';
1102     this.template = _label_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1103     this.scope = {
1104       formItem: '=',
1105       form: '='
1106     };
1107     this.controller = _label_view_controller__WEBPACK_IMPORTED_MODULE_0__.LabelViewCtrl;
1108     this.controllerAs = 'LabelView';
1109     this.bindToController = true;
1110   }
1111   /**
1112    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
1113    * @param {ng.IScope} scope - scope
1114    * @param {JQLite} element - element
1115    * @param {ng.IAttributes} attrs - attributes
1116    * @param {LabelViewCtrl} ctrl - this instance controller
1117    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
1118    */
1119
1120
1121   link(scope, elem, attrs, ctrl) {
1122     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
1123     this.$timeout(function () {
1124       ctrl.init();
1125     }, 50);
1126   }
1127
1128 }
1129
1130 LabelView.$inject = ["$timeout"];
1131
1132
1133 /***/ }),
1134
1135 /***/ "./src/lib/directives/matrix-item/matrix-item.controller.js":
1136 /*!******************************************************************!*\
1137   !*** ./src/lib/directives/matrix-item/matrix-item.controller.js ***!
1138   \******************************************************************/
1139 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1140
1141 __webpack_require__.r(__webpack_exports__);
1142 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1143 /* harmony export */   "MatrixItemCtrl": () => /* binding */ MatrixItemCtrl
1144 /* harmony export */ });
1145 class MatrixItemCtrl {
1146   /**
1147    * @ngInject
1148    * @param {import('../../utils/utils.service').Utils} Utils
1149    * @param {ng.IDocumentService} $document
1150    */
1151   constructor(Utils, $document) {
1152     this.RowContainer = angular.element($document[0].querySelector('.rowContainer'));
1153     this.ColumnContainer = angular.element($document[0].querySelector('.columnContainer'));
1154     this.item = Utils.extend(this.item || {}, {
1155       config: {
1156         rows: [{
1157           value: ''
1158         }],
1159         columns: [{
1160           value: ''
1161         }]
1162       }
1163     });
1164   }
1165   /**
1166    *
1167    * @param {number} index
1168    */
1169
1170
1171   deleteRow(index) {
1172     this.item.config.rows.splice(index, 1);
1173   }
1174
1175   addRow() {
1176     this.item.config.rows.push({
1177       value: ''
1178     });
1179     setTimeout(function () {
1180       const options = this.RowContainer.find('input');
1181       const addedOption = options[options.length - 1];
1182       addedOption.focus();
1183     }.bind(this), 0);
1184   }
1185   /**
1186    *
1187    * @param {number} index
1188    */
1189
1190
1191   deleteColumn(index) {
1192     this.item.config.columns.splice(index, 1);
1193   }
1194
1195   addColumn() {
1196     this.item.config.columns.push({
1197       value: ''
1198     });
1199     setTimeout(() => {
1200       const options = this.ColumnContainer.find('input');
1201       const addedOption = options[options.length - 1];
1202       addedOption.focus();
1203     }, 0);
1204   }
1205
1206 }
1207
1208 MatrixItemCtrl.$inject = ["Utils", "$document"];
1209
1210
1211 /***/ }),
1212
1213 /***/ "./src/lib/directives/matrix-item/matrix-item.directive.js":
1214 /*!*****************************************************************!*\
1215   !*** ./src/lib/directives/matrix-item/matrix-item.directive.js ***!
1216   \*****************************************************************/
1217 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1218
1219 __webpack_require__.r(__webpack_exports__);
1220 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1221 /* harmony export */   "MatrixItem": () => /* binding */ MatrixItem
1222 /* harmony export */ });
1223 /* harmony import */ var _matrix_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./matrix-item.controller */ "./src/lib/directives/matrix-item/matrix-item.controller.js");
1224 /* harmony import */ var _matrix_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./matrix-item.tpl.html */ "./src/lib/directives/matrix-item/matrix-item.tpl.html");
1225
1226
1227 /**
1228  * @implements {ng.IDirective}
1229  */
1230
1231 class MatrixItem {
1232   /**
1233    * @ngInject
1234    */
1235   constructor() {
1236     this.restrict = 'E';
1237     this.template = _matrix_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1238     this.scope = {
1239       item: '='
1240     };
1241     this.controller = _matrix_item_controller__WEBPACK_IMPORTED_MODULE_0__.MatrixItemCtrl;
1242     this.controllerAs = 'Matrix';
1243     this.bindToController = true;
1244   }
1245
1246 }
1247
1248 MatrixItem.$inject = [];
1249
1250
1251 /***/ }),
1252
1253 /***/ "./src/lib/directives/matrix-item/matrix-view.controller.js":
1254 /*!******************************************************************!*\
1255   !*** ./src/lib/directives/matrix-item/matrix-view.controller.js ***!
1256   \******************************************************************/
1257 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1258
1259 __webpack_require__.r(__webpack_exports__);
1260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1261 /* harmony export */   "MatrixViewCtrl": () => /* binding */ MatrixViewCtrl
1262 /* harmony export */ });
1263 class MatrixViewCtrl {
1264   /**
1265    * @ngInject
1266    * @param {ng.IScope} $scope
1267    * @param {import('../../utils/utils.service').Utils} Utils
1268    */
1269   constructor($scope, Utils) {
1270     this.Scope = $scope;
1271     this.Utils = Utils;
1272     this.isValid = true;
1273     this.formItem = {};
1274   }
1275
1276   init() {
1277     this.formItem = this.Utils.extend(this.formItem, {
1278       config: {
1279         rows: [],
1280         columns: []
1281       }
1282     });
1283
1284     this._updateValidity();
1285
1286     if (this.isPreview()) {
1287       this._enableWatchers();
1288     }
1289   }
1290
1291   _updateValidity() {
1292     let valid = true;
1293
1294     if (this.formItem.config.required) {
1295       valid = !this.formItem.config.rows.some(row => typeof row['selected'] === 'undefined'); //   for (let i = 0; i < this.formItem.config.rows.length; i++) {
1296       //     if (typeof this.formItem.config.rows[i]['selected'] === 'undefined') {
1297       //       valid = false
1298       //       break
1299       //     }
1300       //   }
1301     }
1302
1303     this.isValid = valid;
1304     this.form.$setValidity('required', this.isValid);
1305   }
1306
1307   _enableWatchers() {
1308     this.Scope.$watchGroup(['MatrixView.formItem.config.required', 'MatrixView.formItem.config.rows.length'], newVal => {
1309       if (newVal !== undefined) {
1310         this._updateValidity();
1311       }
1312     });
1313   }
1314
1315 }
1316
1317 MatrixViewCtrl.$inject = ["$scope", "Utils"];
1318
1319
1320 /***/ }),
1321
1322 /***/ "./src/lib/directives/matrix-item/matrix-view.directive.js":
1323 /*!*****************************************************************!*\
1324   !*** ./src/lib/directives/matrix-item/matrix-view.directive.js ***!
1325   \*****************************************************************/
1326 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1327
1328 __webpack_require__.r(__webpack_exports__);
1329 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1330 /* harmony export */   "MatrixView": () => /* binding */ MatrixView
1331 /* harmony export */ });
1332 /* harmony import */ var _matrix_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./matrix-view.tpl.html */ "./src/lib/directives/matrix-item/matrix-view.tpl.html");
1333 /* harmony import */ var _matrix_view_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./matrix-view.controller */ "./src/lib/directives/matrix-item/matrix-view.controller.js");
1334
1335
1336 /**
1337  * @implements {ng.IDirective}
1338  */
1339
1340 class MatrixView {
1341   /**
1342    * @ngInject
1343    * @param {ng.ITimeoutService} $timeout
1344    */
1345   constructor($timeout) {
1346     this.$timeout = $timeout;
1347     this.restrict = 'E';
1348     this.template = _matrix_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
1349     this.scope = {
1350       formItem: '=',
1351       isPreview: '&',
1352       form: '='
1353     };
1354     this.controller = _matrix_view_controller__WEBPACK_IMPORTED_MODULE_1__.MatrixViewCtrl;
1355     this.controllerAs = 'MatrixView';
1356     this.bindToController = true;
1357   }
1358   /**
1359    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
1360    * @param {ng.IScope} scope - scope
1361    * @param {JQLite} element - element
1362    * @param {ng.IAttributes} attrs - attributes
1363    * @param {MatrixViewCtrl} ctrl - this instance controller
1364    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
1365    */
1366
1367
1368   link(scope, elem, attrs, ctrl) {
1369     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
1370     this.$timeout(function () {
1371       ctrl.init();
1372     }, 50);
1373   }
1374
1375 }
1376
1377 MatrixView.$inject = ["$timeout"];
1378
1379
1380 /***/ }),
1381
1382 /***/ "./src/lib/directives/radio-button-item/radio-button-item.controller.js":
1383 /*!******************************************************************************!*\
1384   !*** ./src/lib/directives/radio-button-item/radio-button-item.controller.js ***!
1385   \******************************************************************************/
1386 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1387
1388 __webpack_require__.r(__webpack_exports__);
1389 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1390 /* harmony export */   "RadioButtonItemCtrl": () => /* binding */ RadioButtonItemCtrl
1391 /* harmony export */ });
1392 class RadioButtonItemCtrl {
1393   /**
1394    * @ngInject
1395    * @param {import('../../utils/utils.service').Utils} Utils
1396    * @param {JQLite} $element
1397    */
1398   constructor(Utils, $element) {
1399     this.Element = $element;
1400     this.item = Utils.extend(this.item || {}, {
1401       config: {},
1402       options: [{
1403         value: ''
1404       }]
1405     });
1406   }
1407
1408   deleteOption(index) {
1409     this.item.options.splice(index, 1);
1410   }
1411
1412   addOption() {
1413     this.item.options.push({
1414       value: ''
1415     });
1416     setTimeout(() => {
1417       const options = this.Element.find('input');
1418       const addedOption = options[options.length - 1];
1419       addedOption.focus();
1420     }, 0);
1421   }
1422
1423 }
1424
1425 RadioButtonItemCtrl.$inject = ["Utils", "$element"];
1426
1427
1428 /***/ }),
1429
1430 /***/ "./src/lib/directives/radio-button-item/radio-button-item.directive.js":
1431 /*!*****************************************************************************!*\
1432   !*** ./src/lib/directives/radio-button-item/radio-button-item.directive.js ***!
1433   \*****************************************************************************/
1434 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1435
1436 __webpack_require__.r(__webpack_exports__);
1437 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1438 /* harmony export */   "RadioButtonItem": () => /* binding */ RadioButtonItem
1439 /* harmony export */ });
1440 /* harmony import */ var _radio_button_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./radio-button-item.controller */ "./src/lib/directives/radio-button-item/radio-button-item.controller.js");
1441 /* harmony import */ var _radio_button_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./radio-button-item.tpl.html */ "./src/lib/directives/radio-button-item/radio-button-item.tpl.html");
1442
1443
1444 /**
1445  * @implements {ng.IDirective}
1446  */
1447
1448 class RadioButtonItem {
1449   /**
1450    * @ngInject
1451    */
1452   constructor() {
1453     this.restrict = 'E';
1454     this.template = _radio_button_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1455     this.scope = {
1456       item: '='
1457     };
1458     this.controller = _radio_button_item_controller__WEBPACK_IMPORTED_MODULE_0__.RadioButtonItemCtrl;
1459     this.controllerAs = 'RadioButton';
1460     this.bindToController = true;
1461   }
1462
1463 }
1464
1465 RadioButtonItem.$inject = [];
1466
1467
1468 /***/ }),
1469
1470 /***/ "./src/lib/directives/radio-button-item/radio-button-view.controller.js":
1471 /*!******************************************************************************!*\
1472   !*** ./src/lib/directives/radio-button-item/radio-button-view.controller.js ***!
1473   \******************************************************************************/
1474 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1475
1476 __webpack_require__.r(__webpack_exports__);
1477 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1478 /* harmony export */   "RadioButtonViewCtrl": () => /* binding */ RadioButtonViewCtrl
1479 /* harmony export */ });
1480 class RadioButtonViewCtrl {
1481   /**
1482    * @ngInject
1483    * @param {import('../../utils/utils.service').Utils} Utils
1484    */
1485   constructor(Utils) {
1486     this.Utils = Utils;
1487     this.formItem = {};
1488   }
1489
1490   init() {
1491     this.formItem = this.Utils.extend(this.formItem, {
1492       config: {},
1493       options: []
1494     });
1495   }
1496
1497 }
1498
1499 RadioButtonViewCtrl.$inject = ["Utils"];
1500
1501
1502 /***/ }),
1503
1504 /***/ "./src/lib/directives/radio-button-item/radio-button-view.directive.js":
1505 /*!*****************************************************************************!*\
1506   !*** ./src/lib/directives/radio-button-item/radio-button-view.directive.js ***!
1507   \*****************************************************************************/
1508 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1509
1510 __webpack_require__.r(__webpack_exports__);
1511 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1512 /* harmony export */   "RadioButtonView": () => /* binding */ RadioButtonView
1513 /* harmony export */ });
1514 /* harmony import */ var _radio_button_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./radio-button-view.controller */ "./src/lib/directives/radio-button-item/radio-button-view.controller.js");
1515 /* harmony import */ var _radio_button_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./radio-button-view.tpl.html */ "./src/lib/directives/radio-button-item/radio-button-view.tpl.html");
1516
1517
1518
1519 class RadioButtonView {
1520   /**
1521    * @ngInject
1522    * @param {ng.ITimeoutService} $timeout
1523    */
1524   constructor($timeout) {
1525     this.$timeout = $timeout;
1526     this.restrict = 'E';
1527     this.template = _radio_button_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1528     this.scope = {
1529       formItem: '=',
1530       isPreview: '&',
1531       form: '='
1532     };
1533     this.controller = _radio_button_view_controller__WEBPACK_IMPORTED_MODULE_0__.RadioButtonViewCtrl;
1534     this.controllerAs = 'RadioButtonView';
1535     this.bindToController = true;
1536   }
1537   /**
1538    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
1539    * @param {ng.IScope} scope - scope
1540    * @param {JQLite} element - element
1541    * @param {ng.IAttributes} attrs - attributes
1542    * @param {RadioButtonViewCtrl} ctrl - this instance controller
1543    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
1544    */
1545
1546
1547   link(scope, elem, attrs, ctrl) {
1548     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
1549     this.$timeout(function () {
1550       ctrl.init();
1551     }, 50);
1552   }
1553
1554 }
1555
1556 RadioButtonView.$inject = ["$timeout"];
1557
1558
1559 /***/ }),
1560
1561 /***/ "./src/lib/directives/select-item/select-item.controller.js":
1562 /*!******************************************************************!*\
1563   !*** ./src/lib/directives/select-item/select-item.controller.js ***!
1564   \******************************************************************/
1565 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1566
1567 __webpack_require__.r(__webpack_exports__);
1568 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1569 /* harmony export */   "SelectItemCtrl": () => /* binding */ SelectItemCtrl
1570 /* harmony export */ });
1571 class SelectItemCtrl {
1572   /**
1573    * @ngInject
1574    * @param {import('../../utils/utils.service').Utils} Utils
1575    * @param {JQLite} $element
1576    */
1577   constructor(Utils, $element) {
1578     this.Element = $element;
1579     this.item = Utils.extend(this.item || {}, {
1580       config: {},
1581       options: [{
1582         value: ''
1583       }]
1584     });
1585   }
1586   /**
1587    *
1588    * @param {number} index
1589    */
1590
1591
1592   deleteOption(index) {
1593     this.item.options.splice(index, 1);
1594   }
1595
1596   addOption() {
1597     this.item.options.push({
1598       value: ''
1599     });
1600     setTimeout(() => {
1601       const options = this.Element.find('input');
1602       const addedOption = options[options.length - 1];
1603       addedOption.focus();
1604     }, 0);
1605   }
1606
1607 }
1608
1609 SelectItemCtrl.$inject = ["Utils", "$element"];
1610
1611
1612 /***/ }),
1613
1614 /***/ "./src/lib/directives/select-item/select-item.directive.js":
1615 /*!*****************************************************************!*\
1616   !*** ./src/lib/directives/select-item/select-item.directive.js ***!
1617   \*****************************************************************/
1618 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1619
1620 __webpack_require__.r(__webpack_exports__);
1621 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1622 /* harmony export */   "SelectItem": () => /* binding */ SelectItem
1623 /* harmony export */ });
1624 /* harmony import */ var _select_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select-item.tpl.html */ "./src/lib/directives/select-item/select-item.tpl.html");
1625 /* harmony import */ var _select_item_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select-item.controller */ "./src/lib/directives/select-item/select-item.controller.js");
1626
1627
1628 /**
1629  * @implements {ng.IDirective}
1630  */
1631
1632 class SelectItem {
1633   /**
1634    * @ngInject
1635    */
1636   constructor() {
1637     this.restrict = 'E';
1638     this.template = _select_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
1639     this.scope = {
1640       item: '='
1641     };
1642     this.controller = _select_item_controller__WEBPACK_IMPORTED_MODULE_1__.SelectItemCtrl;
1643     this.controllerAs = 'Select';
1644     this.bindToController = true;
1645   }
1646
1647 }
1648
1649 SelectItem.$inject = [];
1650
1651
1652 /***/ }),
1653
1654 /***/ "./src/lib/directives/select-item/select-view.controller.js":
1655 /*!******************************************************************!*\
1656   !*** ./src/lib/directives/select-item/select-view.controller.js ***!
1657   \******************************************************************/
1658 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1659
1660 __webpack_require__.r(__webpack_exports__);
1661 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1662 /* harmony export */   "SelectViewCtrl": () => /* binding */ SelectViewCtrl
1663 /* harmony export */ });
1664 class SelectViewCtrl {
1665   /**
1666    * @ngInject
1667    * @param {import('../../utils/utils.service').Utils} Utils
1668    */
1669   constructor(Utils) {
1670     this.Utils = Utils;
1671     this.formItem = {};
1672   }
1673
1674   init() {
1675     this.formItem = this.Utils.extend(this.formItem, {
1676       config: {},
1677       options: []
1678     });
1679   }
1680
1681 }
1682
1683 SelectViewCtrl.$inject = ["Utils"];
1684
1685
1686 /***/ }),
1687
1688 /***/ "./src/lib/directives/select-item/select-view.directive.js":
1689 /*!*****************************************************************!*\
1690   !*** ./src/lib/directives/select-item/select-view.directive.js ***!
1691   \*****************************************************************/
1692 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1693
1694 __webpack_require__.r(__webpack_exports__);
1695 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1696 /* harmony export */   "SelectView": () => /* binding */ SelectView
1697 /* harmony export */ });
1698 /* harmony import */ var _select_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select-view.tpl.html */ "./src/lib/directives/select-item/select-view.tpl.html");
1699 /* harmony import */ var _select_view_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select-view.controller */ "./src/lib/directives/select-item/select-view.controller.js");
1700
1701
1702 /**
1703  * @implements {ng.IDirective}
1704  */
1705
1706 class SelectView {
1707   /**
1708    * @ngInject
1709    * @param {ng.ITimeoutService} $timeout
1710    */
1711   constructor($timeout) {
1712     this.$timeout = $timeout;
1713     this.restrict = 'E';
1714     this.template = _select_view_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
1715     this.scope = {
1716       formItem: '=',
1717       isPreview: '&',
1718       form: '='
1719     };
1720     this.controller = _select_view_controller__WEBPACK_IMPORTED_MODULE_1__.SelectViewCtrl;
1721     this.controllerAs = 'SelectView';
1722     this.bindToController = true;
1723   }
1724   /**
1725    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
1726    * @param {ng.IScope} scope - scope
1727    * @param {JQLite} element - element
1728    * @param {ng.IAttributes} attrs - attributes
1729    * @param {SelectViewCtrl} ctrl - this instance controller
1730    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
1731    */
1732
1733
1734   link(scope, elem, attrs, ctrl) {
1735     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
1736     this.$timeout(function () {
1737       ctrl.init();
1738     }, 50);
1739   }
1740
1741 }
1742
1743 SelectView.$inject = ["$timeout"];
1744
1745
1746 /***/ }),
1747
1748 /***/ "./src/lib/directives/textarea-item/textarea-item.controller.js":
1749 /*!**********************************************************************!*\
1750   !*** ./src/lib/directives/textarea-item/textarea-item.controller.js ***!
1751   \**********************************************************************/
1752 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1753
1754 __webpack_require__.r(__webpack_exports__);
1755 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1756 /* harmony export */   "TextareaItemCtrl": () => /* binding */ TextareaItemCtrl
1757 /* harmony export */ });
1758 class TextareaItemCtrl {
1759   /**
1760    * @ngInject
1761    * @param {import('../../utils/utils.service').Utils} Utils
1762    * @param {JQLite} $element
1763    */
1764   constructor(Utils, $element) {
1765     this.Element = $element;
1766     this.item = Utils.extend(this.item || {}, {
1767       config: {}
1768     });
1769   }
1770
1771 }
1772
1773 TextareaItemCtrl.$inject = ["Utils", "$element"];
1774
1775
1776 /***/ }),
1777
1778 /***/ "./src/lib/directives/textarea-item/textarea-item.directive.js":
1779 /*!*********************************************************************!*\
1780   !*** ./src/lib/directives/textarea-item/textarea-item.directive.js ***!
1781   \*********************************************************************/
1782 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1783
1784 __webpack_require__.r(__webpack_exports__);
1785 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1786 /* harmony export */   "TextareaItem": () => /* binding */ TextareaItem
1787 /* harmony export */ });
1788 /* harmony import */ var _textarea_item_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./textarea-item.controller */ "./src/lib/directives/textarea-item/textarea-item.controller.js");
1789 /* harmony import */ var _textarea_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./textarea-item.tpl.html */ "./src/lib/directives/textarea-item/textarea-item.tpl.html");
1790
1791
1792 /**
1793  * @implements {ng.IDirective}
1794  */
1795
1796 class TextareaItem {
1797   /**
1798    * @ngInject
1799    */
1800   constructor() {
1801     this.restrict = 'E';
1802     this.template = _textarea_item_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1803     this.scope = {
1804       item: '='
1805     };
1806     this.controller = _textarea_item_controller__WEBPACK_IMPORTED_MODULE_0__.TextareaItemCtrl;
1807     this.controllerAs = 'Textarea';
1808     this.bindToController = true;
1809   }
1810
1811 }
1812
1813 TextareaItem.$inject = [];
1814
1815
1816 /***/ }),
1817
1818 /***/ "./src/lib/directives/textarea-item/textarea-view.controller.js":
1819 /*!**********************************************************************!*\
1820   !*** ./src/lib/directives/textarea-item/textarea-view.controller.js ***!
1821   \**********************************************************************/
1822 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1823
1824 __webpack_require__.r(__webpack_exports__);
1825 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1826 /* harmony export */   "TextareaViewCtrl": () => /* binding */ TextareaViewCtrl
1827 /* harmony export */ });
1828 class TextareaViewCtrl {
1829   /**
1830    * @ngInject
1831    * @param {import('../../utils/utils.service').Utils} Utils
1832    */
1833   constructor(Utils) {
1834     this.Utils = Utils;
1835     this.formItem = {};
1836   }
1837
1838   init() {
1839     this.formItem = this.Utils.extend(this.formItem, {
1840       config: {}
1841     });
1842   }
1843
1844 }
1845
1846 TextareaViewCtrl.$inject = ["Utils"];
1847
1848
1849 /***/ }),
1850
1851 /***/ "./src/lib/directives/textarea-item/textarea-view.directive.js":
1852 /*!*********************************************************************!*\
1853   !*** ./src/lib/directives/textarea-item/textarea-view.directive.js ***!
1854   \*********************************************************************/
1855 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1856
1857 __webpack_require__.r(__webpack_exports__);
1858 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1859 /* harmony export */   "TextareaView": () => /* binding */ TextareaView
1860 /* harmony export */ });
1861 /* harmony import */ var _textarea_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./textarea-view.controller */ "./src/lib/directives/textarea-item/textarea-view.controller.js");
1862 /* harmony import */ var _textarea_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./textarea-view.tpl.html */ "./src/lib/directives/textarea-item/textarea-view.tpl.html");
1863
1864
1865 /**
1866  * @implements {ng.IDirective}
1867  */
1868
1869 class TextareaView {
1870   /**
1871    * @ngInject
1872    * @param {ng.ITimeoutService} $timeout
1873    */
1874   constructor($timeout) {
1875     this.$timeout = $timeout;
1876     this.scope = {
1877       formItem: '=',
1878       form: '='
1879     };
1880     this.restrict = 'E';
1881     this.template = _textarea_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
1882     this.controller = _textarea_view_controller__WEBPACK_IMPORTED_MODULE_0__.TextareaViewCtrl;
1883     this.controllerAs = 'TextareaView';
1884     this.bindToController = true;
1885   }
1886   /**
1887    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
1888    * @param {ng.IScope} scope - scope
1889    * @param {JQLite} element - element
1890    * @param {ng.IAttributes} attrs - attributes
1891    * @param {TextareaViewCtrl} ctrl - this instance controller
1892    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
1893    */
1894
1895
1896   link(scope, elem, attrs, ctrl) {
1897     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
1898     this.$timeout(function () {
1899       ctrl.init();
1900     }, 50);
1901   }
1902
1903 }
1904
1905 TextareaView.$inject = ["$timeout"];
1906
1907
1908 /***/ }),
1909
1910 /***/ "./src/lib/directives/upload-item/upload-item.controller.js":
1911 /*!******************************************************************!*\
1912   !*** ./src/lib/directives/upload-item/upload-item.controller.js ***!
1913   \******************************************************************/
1914 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1915
1916 __webpack_require__.r(__webpack_exports__);
1917 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1918 /* harmony export */   "UploadItemCtrl": () => /* binding */ UploadItemCtrl
1919 /* harmony export */ });
1920 class UploadItemCtrl {
1921   /**
1922    * @ngInject
1923    *
1924    * @param {import('../../utils/utils.service').Utils} Utils
1925    * @param {JQLite} $element
1926    */
1927   constructor(Utils, $element) {
1928     this.Element = $element;
1929     this.item = Utils.extend(this.item || {}, {
1930       config: {},
1931       options: []
1932     });
1933   }
1934
1935 }
1936
1937 UploadItemCtrl.$inject = ["Utils", "$element"];
1938
1939
1940 /***/ }),
1941
1942 /***/ "./src/lib/directives/upload-item/upload-item.directive.js":
1943 /*!*****************************************************************!*\
1944   !*** ./src/lib/directives/upload-item/upload-item.directive.js ***!
1945   \*****************************************************************/
1946 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1947
1948 __webpack_require__.r(__webpack_exports__);
1949 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1950 /* harmony export */   "UploadItem": () => /* binding */ UploadItem
1951 /* harmony export */ });
1952 /* harmony import */ var _upload_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./upload-item.tpl.html */ "./src/lib/directives/upload-item/upload-item.tpl.html");
1953 /* harmony import */ var _upload_item_controller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./upload-item.controller */ "./src/lib/directives/upload-item/upload-item.controller.js");
1954
1955
1956 /**
1957  * @implements {ng.IDirective}
1958  */
1959
1960 class UploadItem {
1961   /**
1962    * @ngInject
1963    */
1964   constructor() {
1965     this.restrict = 'E';
1966     this.template = _upload_item_tpl_html__WEBPACK_IMPORTED_MODULE_0__.default;
1967     this.scope = {
1968       item: '='
1969     };
1970     this.controller = _upload_item_controller__WEBPACK_IMPORTED_MODULE_1__.UploadItemCtrl;
1971     this.controllerAs = 'Upload';
1972     this.bindToController = true;
1973   }
1974
1975 }
1976
1977 UploadItem.$inject = [];
1978
1979
1980 /***/ }),
1981
1982 /***/ "./src/lib/directives/upload-item/upload-view.controller.js":
1983 /*!******************************************************************!*\
1984   !*** ./src/lib/directives/upload-item/upload-view.controller.js ***!
1985   \******************************************************************/
1986 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1987
1988 __webpack_require__.r(__webpack_exports__);
1989 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1990 /* harmony export */   "UploadViewCtrl": () => /* binding */ UploadViewCtrl
1991 /* harmony export */ });
1992 class UploadViewCtrl {
1993   /**
1994    * @ngInject
1995    * @param {ng.IScope} $scope
1996    * @param {import('../../utils/utils.service').Utils} Utils
1997    * @param {JQLite} $element
1998    */
1999   constructor($scope, Utils, $element) {
2000     this.Scope = $scope;
2001     this.Element = $element;
2002     this.Utils = Utils;
2003     this.formItem = {};
2004   }
2005
2006   init() {
2007     this.isMultiple = false;
2008     this.showAllowed = false;
2009     this.formItem = this.Utils.extend(this.formItem || {}, {
2010       config: {
2011         size: 10,
2012         uploadFileButtonLabel: 'Add files'
2013       },
2014       options: []
2015     });
2016
2017     if (this.isPreview()) {
2018       this._enableWatchers();
2019     }
2020   }
2021
2022   _updateMultiple() {
2023     this.isMultiple = !!this.formItem.config.multipleUpload;
2024     const input = angular.element(this.Element[0].querySelector('input[type=file]'));
2025
2026     if (input) {
2027       this.formItem.options = [];
2028
2029       if (this.isMultiple) {
2030         input.attr('multiple', 'multiple');
2031       } else {
2032         input.removeAttr('multiple');
2033       }
2034     }
2035   }
2036
2037   _updateAccept() {
2038     this.showAllowed = !!this.formItem.config.showAccept;
2039     const input = angular.element(this.Element[0].querySelector('input[type=file]'));
2040
2041     if (input) {
2042       if (this.showAllowed) {
2043         input[0].setAttribute('accept', this.formItem.config.accept);
2044       } else {
2045         input[0].removeAttribute('accept');
2046         delete this.formItem.config.accept;
2047       }
2048     }
2049   }
2050
2051   _enableWatchers() {
2052     this.Scope.$watch('UploadView.formItem.config.multipleUpload', newVal => {
2053       if (newVal !== undefined) {
2054         this._updateMultiple();
2055       }
2056     });
2057     this.Scope.$watch('UploadView.formItem.config.showAccept', newVal => {
2058       if (newVal !== undefined) {
2059         this._updateAccept();
2060       }
2061     });
2062     this.Scope.$watch('UploadView.formItem.config.accept', newVal => {
2063       if (newVal !== undefined) {
2064         this._updateAccept();
2065       }
2066     });
2067   }
2068
2069   removeItem(index) {
2070     this.formItem.options.splice(index, 1);
2071   }
2072
2073 }
2074
2075 UploadViewCtrl.$inject = ["$scope", "Utils", "$element"];
2076
2077
2078 /***/ }),
2079
2080 /***/ "./src/lib/directives/upload-item/upload-view.directive.js":
2081 /*!*****************************************************************!*\
2082   !*** ./src/lib/directives/upload-item/upload-view.directive.js ***!
2083   \*****************************************************************/
2084 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2085
2086 __webpack_require__.r(__webpack_exports__);
2087 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2088 /* harmony export */   "UploadView": () => /* binding */ UploadView
2089 /* harmony export */ });
2090 /* harmony import */ var _upload_view_controller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./upload-view.controller */ "./src/lib/directives/upload-item/upload-view.controller.js");
2091 /* harmony import */ var _upload_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./upload-view.tpl.html */ "./src/lib/directives/upload-item/upload-view.tpl.html");
2092
2093
2094 const MB = 1024 * 1024;
2095
2096 class UploadView {
2097   /**
2098    * @ngInject
2099    * @param {ng.ITimeoutService} $timeout
2100    */
2101   constructor($timeout) {
2102     this.$timeout = $timeout;
2103     this.template = _upload_view_tpl_html__WEBPACK_IMPORTED_MODULE_1__.default;
2104     this.restrict = 'E';
2105     this.scope = {
2106       formItem: '=',
2107       isPreview: '&',
2108       form: '='
2109     };
2110     this.controller = _upload_view_controller__WEBPACK_IMPORTED_MODULE_0__.UploadViewCtrl;
2111     this.controllerAs = 'UploadView';
2112     this.bindToController = true;
2113   }
2114   /**
2115    * @see https://docs.angularjs.org/api/ng/service/$compile#-link-
2116    * @param {ng.IScope} scope - scope
2117    * @param {JQLite} element - element
2118    * @param {ng.IAttributes} attrs - attributes
2119    * @param {UploadViewCtrl} ctrl - this instance controller
2120    * @param {ng.ITranscludeFunction} transcludeFn - transclude function ($transclude)
2121    */
2122
2123
2124   link(scope, element, attrs, ctrl) {
2125     //this timeout is placed here in order to make sure that the creator directive of this view is finished its work
2126     this.$timeout(function () {
2127       ctrl.init();
2128     }, 50);
2129     const button = angular.element(element[0].querySelector('.upload-button'));
2130     const input = angular.element(element[0].querySelector('input[type=file]'));
2131     const label = angular.element(element[0].querySelector('label'));
2132
2133     if (label.length) {
2134       label.css('display', 'none');
2135     }
2136
2137     button.on('click', () => {
2138       label.css('display', 'none');
2139       typeof input.trigger === 'function' ? input.trigger('click') : input[0].click();
2140     });
2141     input.on('change', e => {
2142       scope.$apply(function () {
2143         /**
2144          * @type {File[]}
2145          */
2146         const files = Array.from(e.target.files); // Max allowed size in MB
2147
2148         const maxSizeMB = ctrl.formItem.config.size * MB;
2149         const exceedsSize = files.some(file => file.size >= maxSizeMB);
2150
2151         if (exceedsSize) {
2152           label.css('display', 'block');
2153           label.text(ctrl.formItem.config.sizeErrMessage);
2154           ctrl.formItem.options = [];
2155         } else {
2156           ctrl.formItem.options = files.map(file => {
2157             const {
2158               name,
2159               size,
2160               type
2161             } = file;
2162             return {
2163               name,
2164               size,
2165               type,
2166               file
2167             };
2168           });
2169         }
2170       });
2171     });
2172   }
2173
2174 }
2175
2176 UploadView.$inject = ["$timeout"];
2177
2178
2179 /***/ }),
2180
2181 /***/ "./src/lib/index.module.js":
2182 /*!*********************************!*\
2183   !*** ./src/lib/index.module.js ***!
2184   \*********************************/
2185 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2186
2187 __webpack_require__.r(__webpack_exports__);
2188 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2189 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2190 /* harmony export */ });
2191 /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.scss */ "./src/lib/index.scss");
2192 /* harmony import */ var _directives_upload_item_upload_item_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./directives/upload-item/upload-item.directive */ "./src/lib/directives/upload-item/upload-item.directive.js");
2193 /* harmony import */ var _directives_upload_item_upload_view_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives/upload-item/upload-view.directive */ "./src/lib/directives/upload-item/upload-view.directive.js");
2194 /* harmony import */ var _directives_agreement_item_agreement_item_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./directives/agreement-item/agreement-item.directive */ "./src/lib/directives/agreement-item/agreement-item.directive.js");
2195 /* harmony import */ var _directives_agreement_item_agreement_view_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./directives/agreement-item/agreement-view.directive */ "./src/lib/directives/agreement-item/agreement-view.directive.js");
2196 /* harmony import */ var _main_main_controller__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./main/main.controller */ "./src/lib/main/main.controller.js");
2197 /* harmony import */ var _utils_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/utils.service */ "./src/lib/utils/utils.service.js");
2198 /* harmony import */ var _directives_checkboxes_item_checkboxes_item_directive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./directives/checkboxes-item/checkboxes-item.directive */ "./src/lib/directives/checkboxes-item/checkboxes-item.directive.js");
2199 /* harmony import */ var _directives_checkboxes_item_checkboxes_view_directive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/checkboxes-item/checkboxes-view.directive */ "./src/lib/directives/checkboxes-item/checkboxes-view.directive.js");
2200 /* harmony import */ var _directives_form_item_form_item_directive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./directives/form-item/form-item.directive */ "./src/lib/directives/form-item/form-item.directive.js");
2201 /* harmony import */ var _directives_form_items_container_form_items_container_directive__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./directives/form-items-container/form-items-container.directive */ "./src/lib/directives/form-items-container/form-items-container.directive.js");
2202 /* harmony import */ var _directives_form_view_form_view_directive__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./directives/form-view/form-view.directive */ "./src/lib/directives/form-view/form-view.directive.js");
2203 /* harmony import */ var _directives_input_item_input_item_directive__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./directives/input-item/input-item.directive */ "./src/lib/directives/input-item/input-item.directive.js");
2204 /* harmony import */ var _directives_input_item_input_view_directive__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./directives/input-item/input-view.directive */ "./src/lib/directives/input-item/input-view.directive.js");
2205 /* harmony import */ var _directives_label_item_label_item_directive__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./directives/label-item/label-item.directive */ "./src/lib/directives/label-item/label-item.directive.js");
2206 /* harmony import */ var _directives_label_item_label_view_directive__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./directives/label-item/label-view.directive */ "./src/lib/directives/label-item/label-view.directive.js");
2207 /* harmony import */ var _directives_matrix_item_matrix_item_directive__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./directives/matrix-item/matrix-item.directive */ "./src/lib/directives/matrix-item/matrix-item.directive.js");
2208 /* harmony import */ var _directives_matrix_item_matrix_view_directive__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./directives/matrix-item/matrix-view.directive */ "./src/lib/directives/matrix-item/matrix-view.directive.js");
2209 /* harmony import */ var _directives_radio_button_item_radio_button_item_directive__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./directives/radio-button-item/radio-button-item.directive */ "./src/lib/directives/radio-button-item/radio-button-item.directive.js");
2210 /* harmony import */ var _directives_radio_button_item_radio_button_view_directive__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./directives/radio-button-item/radio-button-view.directive */ "./src/lib/directives/radio-button-item/radio-button-view.directive.js");
2211 /* harmony import */ var _directives_select_item_select_view_directive__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./directives/select-item/select-view.directive */ "./src/lib/directives/select-item/select-view.directive.js");
2212 /* harmony import */ var _directives_select_item_select_item_directive__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./directives/select-item/select-item.directive */ "./src/lib/directives/select-item/select-item.directive.js");
2213 /* harmony import */ var _directives_textarea_item_textarea_item_directive__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./directives/textarea-item/textarea-item.directive */ "./src/lib/directives/textarea-item/textarea-item.directive.js");
2214 /* harmony import */ var _directives_textarea_item_textarea_view_directive__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./directives/textarea-item/textarea-view.directive */ "./src/lib/directives/textarea-item/textarea-view.directive.js");
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (angular.module('angularMaterialFormBuilder', ['ngMaterial', 'angular-sortable-view', 'ngMessages']).service('Utils', _utils_utils_service__WEBPACK_IMPORTED_MODULE_6__.Utils).controller('MainController', _main_main_controller__WEBPACK_IMPORTED_MODULE_5__.MainController).directive('uploadItem', _directives_upload_item_upload_item_directive__WEBPACK_IMPORTED_MODULE_1__.UploadItem).directive('uploadView', _directives_upload_item_upload_view_directive__WEBPACK_IMPORTED_MODULE_2__.UploadView).directive('agreementItem', _directives_agreement_item_agreement_item_directive__WEBPACK_IMPORTED_MODULE_3__.AgreementItem).directive('agreementView', _directives_agreement_item_agreement_view_directive__WEBPACK_IMPORTED_MODULE_4__.AgreementView).directive('checkboxesItem', _directives_checkboxes_item_checkboxes_item_directive__WEBPACK_IMPORTED_MODULE_7__.CheckboxesItem).directive('checkboxesView', _directives_checkboxes_item_checkboxes_view_directive__WEBPACK_IMPORTED_MODULE_8__.CheckboxesView).directive('formItem', _directives_form_item_form_item_directive__WEBPACK_IMPORTED_MODULE_9__.FormItem).directive('formItemsContainer', _directives_form_items_container_form_items_container_directive__WEBPACK_IMPORTED_MODULE_10__.FormItemsContainer).directive('formView', _directives_form_view_form_view_directive__WEBPACK_IMPORTED_MODULE_11__.FormView).directive('inputItem', _directives_input_item_input_item_directive__WEBPACK_IMPORTED_MODULE_12__.InputItem).directive('inputView', _directives_input_item_input_view_directive__WEBPACK_IMPORTED_MODULE_13__.InputView).directive('labelItem', _directives_label_item_label_item_directive__WEBPACK_IMPORTED_MODULE_14__.LabelItem).directive('labelView', _directives_label_item_label_view_directive__WEBPACK_IMPORTED_MODULE_15__.LabelView).directive('matrixItem', _directives_matrix_item_matrix_item_directive__WEBPACK_IMPORTED_MODULE_16__.MatrixItem).directive('matrixView', _directives_matrix_item_matrix_view_directive__WEBPACK_IMPORTED_MODULE_17__.MatrixView).directive('radioButtonItem', _directives_radio_button_item_radio_button_item_directive__WEBPACK_IMPORTED_MODULE_18__.RadioButtonItem).directive('radioButtonView', _directives_radio_button_item_radio_button_view_directive__WEBPACK_IMPORTED_MODULE_19__.RadioButtonView).directive('selectItem', _directives_select_item_select_item_directive__WEBPACK_IMPORTED_MODULE_21__.SelectItem).directive('selectView', _directives_select_item_select_view_directive__WEBPACK_IMPORTED_MODULE_20__.SelectView).directive('textareaItem', _directives_textarea_item_textarea_item_directive__WEBPACK_IMPORTED_MODULE_22__.TextareaItem).directive('textareaView', _directives_textarea_item_textarea_view_directive__WEBPACK_IMPORTED_MODULE_23__.TextareaView));
2240
2241 /***/ }),
2242
2243 /***/ "./src/lib/main/main.controller.js":
2244 /*!*****************************************!*\
2245   !*** ./src/lib/main/main.controller.js ***!
2246   \*****************************************/
2247 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2248
2249 __webpack_require__.r(__webpack_exports__);
2250 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2251 /* harmony export */   "MainController": () => /* binding */ MainController
2252 /* harmony export */ });
2253 /**
2254  * @typedef {{type:string}} Item
2255  * @typedef {{items: Item[]}} FormConfig
2256  */
2257 class MainController {
2258   /**
2259    * @ngInject
2260    */
2261   constructor() {
2262     /**
2263      * @type {FormConfig}
2264      */
2265     this.form = {
2266       items: []
2267     };
2268   }
2269   /**
2270    * Add new Item
2271    * @param {string} type
2272    */
2273
2274
2275   addItem(type) {
2276     this.form.items.push({
2277       type
2278     });
2279   }
2280   /**
2281    * Remove item at index
2282    * @param {Item} item
2283    * @param {number} index
2284    */
2285
2286
2287   delete(item, index) {
2288     this.form.items.splice(index, 1);
2289   }
2290   /**
2291    * insert before (bounded)
2292    * Pops out latest element (wanted?)
2293    * @param {Item} item
2294    * @param {number} index
2295    */
2296
2297
2298   up(item, index) {
2299     if (index !== 0) {
2300       const prevItem = this.form.items[index - 1];
2301       this.form.items[index] = prevItem;
2302       this.form.items[index - 1] = item;
2303     }
2304   }
2305   /**
2306    * insert after (bounded)
2307    * Pops out latest element (wanted?)
2308    * @param {Item} item
2309    * @param {number} index
2310    */
2311
2312
2313   down(item, index) {
2314     if (index !== this.form.items.length - 1) {
2315       const nextItem = this.form.items[index + 1];
2316       this.form.items[index] = nextItem;
2317       this.form.items[index + 1] = item;
2318     }
2319   }
2320
2321 }
2322
2323 MainController.$inject = [];
2324
2325
2326 /***/ }),
2327
2328 /***/ "./src/lib/utils/utils.service.js":
2329 /*!****************************************!*\
2330   !*** ./src/lib/utils/utils.service.js ***!
2331   \****************************************/
2332 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2333
2334 __webpack_require__.r(__webpack_exports__);
2335 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2336 /* harmony export */   "Utils": () => /* binding */ Utils
2337 /* harmony export */ });
2338 class Utils {
2339   /**
2340    * Recursively extend object properties
2341    * @param {Object} dest
2342    * @param {Object} src
2343    * @returns {Object}
2344    */
2345   extend(dest, src) {
2346     return Object.keys(src).reduce((result, key) => {
2347       if (typeof result[key] === 'undefined') {
2348         result[key] = src[key];
2349       } else if (typeof src[key] === 'object') {
2350         result[key] = this.extend(result[key], src[key]);
2351       }
2352
2353       return result;
2354     }, typeof dest === 'undefined' ? {} : dest);
2355   }
2356
2357 }
2358
2359
2360
2361 /***/ }),
2362
2363 /***/ "./src/lib/index.scss":
2364 /*!****************************!*\
2365   !*** ./src/lib/index.scss ***!
2366   \****************************/
2367 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2368
2369 __webpack_require__.r(__webpack_exports__);
2370 // extracted by mini-css-extract-plugin
2371
2372
2373 /***/ }),
2374
2375 /***/ "./src/lib/directives/agreement-item/agreement-view.tpl.html":
2376 /*!*******************************************************************!*\
2377   !*** ./src/lib/directives/agreement-item/agreement-view.tpl.html ***!
2378   \*******************************************************************/
2379 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2380
2381 __webpack_require__.r(__webpack_exports__);
2382 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2383 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2384 /* harmony export */ });
2385 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container>\n  <div\n    layout=\"{{AgreementView.formItem.config.direction == 'horizontal' ? 'row' : 'columb'}}\"\n  >\n    <md-checkbox\n      ng-model=\"AgreementView.formItem.options[0].selected\"\n      ng-change=\"AgreementView.toggleSelectedOption(option)\"\n      ng-disabled=\"AgreementView.disableOptions && !option.selected\"\n      aria-label=\"...\"\n      >{{AgreementView.formItem.options[0].value}}</md-checkbox\n    >\n  </div>\n\n  <div ng-messages=\"AgreementView.form.$error\">\n    <div ng-message=\"minSelections\">\n      Must select {{AgreementView.formItem.maxSelections || 1}} items\n    </div>\n  </div>\n</md-input-container>\n");
2386
2387 /***/ }),
2388
2389 /***/ "./src/lib/directives/checkboxes-item/checkboxes-item.tpl.html":
2390 /*!*********************************************************************!*\
2391   !*** ./src/lib/directives/checkboxes-item/checkboxes-item.tpl.html ***!
2392   \*********************************************************************/
2393 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2394
2395 __webpack_require__.r(__webpack_exports__);
2396 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2397 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2398 /* harmony export */ });
2399 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div\n  class=\"sortable-container\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"Checkboxes.item.options\"\n>\n  <md-input-container class=\"md-block\">\n    <label>Max Selections</label>\n    <input type=\"number\" ng-model=\"Checkboxes.item.config.maxSelections\" />\n  </md-input-container>\n\n  <md-switch\n    ng-model=\"Checkboxes.item.config.direction\"\n    ng-true-value=\"'horizontal'\"\n    ng-false-value=\"'vertical'\"\n  >\n    Layout direction ({{Checkboxes.item.config.direction == 'horizontal' ?\n    'Horizontal' : 'Vertical'}})\n  </md-switch>\n\n  <div\n    class=\"option-item\"\n    layout=\"row\"\n    ng-repeat=\"option in Checkboxes.item.options track by $index\"\n    sv-element\n  >\n    <md-button\n      class=\"md-button handle\"\n      md-no-ink\n      aria-label=\"reorder option item\"\n      sv-handle\n    >\n      <md-icon class=\"material-icons\">reorder</md-icon>\n    </md-button>\n\n    <md-input-container class=\"md-block\">\n      <label>Option {{$index + 1}}</label>\n      <input ng-model=\"option.value\" />\n    </md-input-container>\n\n    <md-button class=\"md-button\" ng-click=\"Checkboxes.deleteOption($index)\">\n      <md-icon class=\"material-icons\">delete</md-icon>\n    </md-button>\n  </div>\n  <div layout=\"row\" layout-align=\"start\">\n    <md-button\n      class=\"md-primary add-option-button\"\n      ng-click=\"Checkboxes.addOption()\"\n    >\n      <md-icon class=\"material-icons\">add</md-icon>\n    </md-button>\n  </div>\n</div>\n");
2400
2401 /***/ }),
2402
2403 /***/ "./src/lib/directives/checkboxes-item/checkboxes-view.tpl.html":
2404 /*!*********************************************************************!*\
2405   !*** ./src/lib/directives/checkboxes-item/checkboxes-view.tpl.html ***!
2406   \*********************************************************************/
2407 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2408
2409 __webpack_require__.r(__webpack_exports__);
2410 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2411 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2412 /* harmony export */ });
2413 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container>\n  <div\n    layout=\"{{CheckboxesView.formItem.config.direction == 'horizontal' ? 'row' : 'column'}}\"\n  >\n    <md-checkbox\n      ng-repeat=\"option in CheckboxesView.formItem.options track by $index\"\n      ng-model=\"option.selected\"\n      ng-change=\"CheckboxesView.toggleSelectedOption(option)\"\n      ng-disabled=\"CheckboxesView.disableOptions && !option.selected\"\n      aria-label=\"...\"\n      >{{option.value}}</md-checkbox\n    >\n  </div>\n\n  <div ng-messages=\"CheckboxesView.form.$error\">\n    <div ng-message=\"minSelections\">\n      Must select {{CheckboxesView.formItem.maxSelections || 1}} items\n    </div>\n  </div>\n</md-input-container>\n");
2414
2415 /***/ }),
2416
2417 /***/ "./src/lib/directives/form-item/form-item.tpl.html":
2418 /*!*********************************************************!*\
2419   !*** ./src/lib/directives/form-item/form-item.tpl.html ***!
2420   \*********************************************************/
2421 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2422
2423 __webpack_require__.r(__webpack_exports__);
2424 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2425 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2426 /* harmony export */ });
2427 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div class=\"form-item-container md-inline-form\">\n  <div class=\"form-item-actions\">\n    <md-button\n      class=\"md-button\"\n      ng-if=\"FormItem.Attrs.onDelete\"\n      ng-click=\"FormItem.deleteClicked()\"\n    >\n      <md-icon class=\"material-icons small\">delete</md-icon>\n    </md-button>\n    <md-button\n      class=\"md-button\"\n      ng-if=\"FormItem.Attrs.onUp\"\n      ng-click=\"FormItem.onUp({item: FormItem.item, index: FormItem.index()})\"\n    >\n      <md-icon class=\"material-icons small\">arrow_drop_up</md-icon>\n    </md-button>\n    <md-button\n      class=\"md-button\"\n      ng-if=\"FormItem.Attrs.onDown\"\n      ng-click=\"FormItem.onDown({item: FormItem.item, index: FormItem.index()})\"\n    >\n      <md-icon class=\"material-icons small\">arrow_drop_down</md-icon>\n    </md-button>\n  </div>\n\n  <md-input-container ng-if=\"FormItem.item.type != 'label'\" class=\"md-block\">\n    <label>Field Title</label>\n    <input ng-model=\"FormItem.item.props.title\" />\n  </md-input-container>\n\n  <md-input-container ng-if=\"FormItem.item.type != 'label'\" class=\"md-block\">\n    <label>Help Text</label>\n    <input ng-model=\"FormItem.item.props.helpText\" />\n  </md-input-container>\n\n  <md-input-container\n    ng-if=\"FormItem.item.type === 'agreement'\"\n    class=\"md-block\"\n  >\n    <label>Option Text</label>\n    <input ng-model=\"FormItem.item.options[0].value\" />\n  </md-input-container>\n\n  <div ng-switch=\"FormItem.item.type\">\n    <upload-item ng-switch-when=\"upload\" item=\"FormItem.item\"></upload-item>\n    <agreement-item\n      ng-switch-when=\"agreement\"\n      item=\"FormItem.item\"\n    ></agreement-item>\n    <label-item ng-switch-when=\"label\" item=\"FormItem.item\"></label-item>\n    <input-item ng-switch-when=\"input\" item=\"FormItem.item\"></input-item>\n    <radio-button-item\n      ng-switch-when=\"multipleChoices\"\n      item=\"FormItem.item\"\n    ></radio-button-item>\n    <matrix-item ng-switch-when=\"matrix\" item=\"FormItem.item\"></matrix-item>\n    <checkboxes-item\n      ng-switch-when=\"checkboxes\"\n      item=\"FormItem.item\"\n    ></checkboxes-item>\n    <textarea-item\n      ng-switch-when=\"textarea\"\n      item=\"FormItem.item\"\n    ></textarea-item>\n    <select-item\n      ng-switch-when=\"chooseFromList\"\n      item=\"FormItem.item\"\n    ></select-item>\n    <p ng-switch-default>UNKNOWN TYPE</p>\n  </div>\n\n  <md-input-container\n    ng-if=\"FormItem.item.type != 'label' && FormItem.item.type != 'upload'\"\n    class=\"md-block\"\n  >\n    <md-checkbox ng-model=\"FormItem.item.config.required\"\n      >Required field</md-checkbox\n    >\n  </md-input-container>\n</div>\n");
2428
2429 /***/ }),
2430
2431 /***/ "./src/lib/directives/form-items-container/form-items-container.tpl.html":
2432 /*!*******************************************************************************!*\
2433   !*** ./src/lib/directives/form-items-container/form-items-container.tpl.html ***!
2434   \*******************************************************************************/
2435 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2436
2437 __webpack_require__.r(__webpack_exports__);
2438 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2439 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2440 /* harmony export */ });
2441 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div>\n  <form-item\n    ng-repeat=\"item in container.form.items track by $index\"\n    type=\"{{item.type}}\"\n    item=\"item\"\n    index=\"$index\"\n    on-delete=\"container.delete(item, index)\"\n    on-up=\"container.up(item, index)\"\n    on-down=\"container.down(item, index)\"\n  >\n  </form-item>\n</div>\n");
2442
2443 /***/ }),
2444
2445 /***/ "./src/lib/directives/form-view/form-view.tpl.html":
2446 /*!*********************************************************!*\
2447   !*** ./src/lib/directives/form-view/form-view.tpl.html ***!
2448   \*********************************************************/
2449 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2450
2451 __webpack_require__.r(__webpack_exports__);
2452 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2453 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2454 /* harmony export */ });
2455 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div class=\"md-inline-form\">\n  <div\n    class=\"formItem\"\n    ng-repeat=\"formItem in FormView.form.items track by $index\"\n    ng-switch=\"formItem.type\"\n    layout=\"column\"\n  >\n    <ng-form name=\"formItemForm\">\n      <div>\n        <div class=\"formItem-title\">{{formItem.props.title}}</div>\n        <div class=\"formItem-help-text\">{{formItem.props.helpText}}</div>\n\n        <upload-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"upload\"\n        ></upload-view>\n        <agreement-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"agreement\"\n        ></agreement-view>\n        <checkboxes-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"checkboxes\"\n        ></checkboxes-view>\n        <radio-button-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"multipleChoices\"\n        ></radio-button-view>\n        <input-view\n          form-item=\"formItem\"\n          form=\"formItemForm\"\n          ng-switch-when=\"input\"\n        ></input-view>\n        <textarea-view\n          form-item=\"formItem\"\n          form=\"formItemForm\"\n          ng-switch-when=\"textarea\"\n        ></textarea-view>\n        <matrix-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"matrix\"\n        ></matrix-view>\n        <select-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"chooseFromList\"\n        ></select-view>\n        <label-view\n          form-item=\"formItem\"\n          is-preview=\"true\"\n          form=\"formItemForm\"\n          ng-switch-when=\"label\"\n        ></label-view>\n      </div>\n    </ng-form>\n  </div>\n</div>\n");
2456
2457 /***/ }),
2458
2459 /***/ "./src/lib/directives/input-item/input-item.tpl.html":
2460 /*!***********************************************************!*\
2461   !*** ./src/lib/directives/input-item/input-item.tpl.html ***!
2462   \***********************************************************/
2463 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2464
2465 __webpack_require__.r(__webpack_exports__);
2466 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2467 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2468 /* harmony export */ });
2469 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <label>Placeholder</label>\n  <input type=\"text\" ng-model=\"Input.item.config.placeholder\" />\n</md-input-container>\n<md-input-container class=\"md-block\">\n  <label>Type</label>\n  <md-select ng-model=\"Input.item.config.type\">\n    <md-option value=\"text\">Text</md-option>\n    <md-option value=\"number\">Number</md-option>\n    <md-option value=\"email\">Email</md-option>\n  </md-select>\n</md-input-container>\n");
2470
2471 /***/ }),
2472
2473 /***/ "./src/lib/directives/input-item/input-view.tpl.html":
2474 /*!***********************************************************!*\
2475   !*** ./src/lib/directives/input-item/input-view.tpl.html ***!
2476   \***********************************************************/
2477 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2478
2479 __webpack_require__.r(__webpack_exports__);
2480 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2481 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2482 /* harmony export */ });
2483 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <input\n    ng-model=\"InputView.formItem.value\"\n    type=\"{{InputView.formItem.config.type}}\"\n    placeholder=\"{{InputView.formItem.config.placeholder}}\"\n    ng-required=\"InputView.formItem.config.required\"\n  />\n  <div ng-messages=\"InputView.form.$error\">\n    <div ng-message=\"required\">This field is required</div>\n  </div>\n</md-input-container>\n");
2484
2485 /***/ }),
2486
2487 /***/ "./src/lib/directives/label-item/label-item.tpl.html":
2488 /*!***********************************************************!*\
2489   !*** ./src/lib/directives/label-item/label-item.tpl.html ***!
2490   \***********************************************************/
2491 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2492
2493 __webpack_require__.r(__webpack_exports__);
2494 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2495 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2496 /* harmony export */ });
2497 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <label>Text</label>\n  <textarea ng-model=\"Label.item.value\" md-maxlength=\"150\" rows=\"5\"></textarea>\n</md-input-container>\n");
2498
2499 /***/ }),
2500
2501 /***/ "./src/lib/directives/label-item/label-view.tpl.html":
2502 /*!***********************************************************!*\
2503   !*** ./src/lib/directives/label-item/label-view.tpl.html ***!
2504   \***********************************************************/
2505 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2506
2507 __webpack_require__.r(__webpack_exports__);
2508 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2509 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2510 /* harmony export */ });
2511 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <md-content flex layout-padding layout=\"row\" layout-align=\"center center\">\n    <pre>\n      <span class=\"formItem-content\">{{LabelView.formItem.value}}</span>\n    </pre>\n  </md-content>\n</md-input-container>\n");
2512
2513 /***/ }),
2514
2515 /***/ "./src/lib/directives/matrix-item/matrix-item.tpl.html":
2516 /*!*************************************************************!*\
2517   !*** ./src/lib/directives/matrix-item/matrix-item.tpl.html ***!
2518   \*************************************************************/
2519 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2520
2521 __webpack_require__.r(__webpack_exports__);
2522 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2523 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2524 /* harmony export */ });
2525 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div\n  class=\"sortable-container columnContainer\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"Matrix.item.config.columns\"\n>\n  <div\n    class=\"option-item\"\n    layout=\"row\"\n    ng-repeat=\"column in Matrix.item.config.columns track by $index\"\n    sv-element\n  >\n    <md-button\n      class=\"md-button handle\"\n      md-no-ink\n      aria-label=\"reorder option item\"\n      sv-handle\n    >\n      <md-icon class=\"material-icons\">reorder</md-icon>\n    </md-button>\n\n    <md-input-container class=\"input-container\">\n      <label>Column {{$index + 1}}</label>\n      <input ng-model=\"column.value\" />\n    </md-input-container>\n\n    <md-button\n      class=\"md-button\"\n      md-no-ink\n      aria-label=\"delete column item\"\n      ng-click=\"Matrix.deleteColumn($index)\"\n    >\n      <md-icon class=\"material-icons\">delete</md-icon>\n      <md-tooltip md-autohide=\"true\">Delete</md-tooltip>\n    </md-button>\n  </div>\n  <div layout=\"row\" layout-align=\"start\">\n    <md-button\n      class=\"md-primary add-option-button\"\n      md-no-ink\n      aria-label=\"add option item\"\n      ng-click=\"Matrix.addColumn()\"\n      >Add Column</md-button\n    >\n  </div>\n</div>\n\n<div\n  class=\"sortable-container rowContainer\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"Matrix.item.config.rows\"\n>\n  <div\n    class=\"option-item\"\n    layout=\"row\"\n    ng-repeat=\"row in Matrix.item.config.rows track by $index\"\n    sv-element\n  >\n    <md-button\n      class=\"md-button handle\"\n      md-no-ink\n      aria-label=\"reorder row item\"\n      sv-handle\n    >\n      <md-icon class=\"material-icons\">reorder</md-icon>\n    </md-button>\n\n    <md-input-container class=\"input-container\">\n      <label>Row {{$index + 1}}</label>\n      <input ng-model=\"row.value\" />\n    </md-input-container>\n\n    <md-button\n      class=\"md-button\"\n      md-no-ink\n      aria-label=\"delete row item\"\n      ng-click=\"Matrix.deleteRow($index)\"\n    >\n      <md-icon class=\"material-icons\">delete</md-icon>\n      <md-tooltip md-autohide=\"true\">Delete</md-tooltip>\n    </md-button>\n  </div>\n  <div layout=\"row\" layout-align=\"start\">\n    <md-button\n      class=\"md-primary add-option-button\"\n      md-no-ink\n      aria-label=\"add row item\"\n      ng-click=\"Matrix.addRow()\"\n      >Add row</md-button\n    >\n  </div>\n</div>\n");
2526
2527 /***/ }),
2528
2529 /***/ "./src/lib/directives/matrix-item/matrix-view.tpl.html":
2530 /*!*************************************************************!*\
2531   !*** ./src/lib/directives/matrix-item/matrix-view.tpl.html ***!
2532   \*************************************************************/
2533 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2534
2535 __webpack_require__.r(__webpack_exports__);
2536 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2537 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2538 /* harmony export */ });
2539 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"matrix-container md-block\" layout=\"column\">\n  <div class=\"matrix\">\n    <div class=\"matrix-row\" flex layout=\"row\">\n      <span class=\"matrix-cell\" flex=\"20\"></span>\n      <span\n        class=\"matrix-cell matrix-cell-header\"\n        flex\n        ng-repeat=\"column in MatrixView.formItem.config.columns track by $index\"\n        >{{column.value}}</span\n      >\n    </div>\n    <div\n      class=\"matrix-row\"\n      ng-repeat=\"row in MatrixView.formItem.config.rows track by $index\"\n      layout=\"row\"\n    >\n      <span class=\"matrix-cell\" flex=\"20\" layout=\"column\" layout-align=\"center\"\n        >{{row.value}}</span\n      >\n      <md-radio-group\n        ng-model=\"row.selected\"\n        ng-change=\"MatrixView._updateValidity()\"\n        flex\n        layout=\"row\"\n      >\n        <span\n          class=\"matrix-cell radio-button-cell\"\n          flex\n          ng-repeat=\"column in MatrixView.formItem.config.columns track by $index\"\n        >\n          <md-radio-button\n            value=\"{{column.value}}\"\n            aria-label=\"...\"\n          ></md-radio-button>\n        </span>\n      </md-radio-group>\n    </div>\n  </div>\n\n  <div ng-messages=\"MatrixView.form.$error\">\n    <div ng-message=\"required\">This is required</div>\n  </div>\n</md-input-container>\n");
2540
2541 /***/ }),
2542
2543 /***/ "./src/lib/directives/radio-button-item/radio-button-item.tpl.html":
2544 /*!*************************************************************************!*\
2545   !*** ./src/lib/directives/radio-button-item/radio-button-item.tpl.html ***!
2546   \*************************************************************************/
2547 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2548
2549 __webpack_require__.r(__webpack_exports__);
2550 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2551 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2552 /* harmony export */ });
2553 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div\n  class=\"sortable-container\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"RadioButton.item.options\"\n>\n  <md-switch\n    ng-model=\"RadioButton.item.config.direction\"\n    ng-true-value=\"'horizontal'\"\n    ng-false-value=\"'vertical'\"\n  >\n    Layout direction ({{RadioButton.item.config.direction == 'horizontal' ?\n    'Horizontal' : 'Vertical'}})\n  </md-switch>\n\n  <div\n    class=\"option-item\"\n    layout=\"row\"\n    ng-repeat=\"option in RadioButton.item.options track by $index\"\n    sv-element\n  >\n    <md-button\n      class=\"md-button handle\"\n      md-no-ink\n      aria-label=\"reorder option item\"\n      sv-handle\n    >\n      <md-icon class=\"material-icons\">reorder</md-icon>\n    </md-button>\n\n    <md-input-container class=\"md-block\">\n      <label>Option {{$index + 1}}</label>\n      <input ng-model=\"option.value\" />\n    </md-input-container>\n\n    <md-button\n      class=\"md-button md-warn\"\n      ng-click=\"RadioButton.deleteOption($index)\"\n    >\n      <md-icon class=\"material-icons\">delete</md-icon>\n    </md-button>\n  </div>\n\n  <md-button class=\"md-raised md-accent\" ng-click=\"RadioButton.addOption()\"\n    >Add Option</md-button\n  >\n</div>\n");
2554
2555 /***/ }),
2556
2557 /***/ "./src/lib/directives/radio-button-item/radio-button-view.tpl.html":
2558 /*!*************************************************************************!*\
2559   !*** ./src/lib/directives/radio-button-item/radio-button-view.tpl.html ***!
2560   \*************************************************************************/
2561 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2562
2563 __webpack_require__.r(__webpack_exports__);
2564 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2565 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2566 /* harmony export */ });
2567 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <md-radio-group\n    name=\"formItemInput\"\n    ng-required=\"RadioButtonView.formItem.config.required\"\n    ng-model=\"RadioButtonView.formItem.value\"\n    layout=\"{{RadioButtonView.formItem.config.direction == 'horizontal' ? 'row' : 'column'}}\"\n    required\n  >\n    <md-radio-button\n      ng-repeat=\"option in RadioButtonView.formItem.options track by $index\"\n      value=\"{{option.value}}\"\n      aria-label=\"...\"\n    >\n      {{option.value}}\n    </md-radio-button>\n  </md-radio-group>\n\n  <div ng-messages=\"RadioButtonView.form.$error\">\n    <div ng-message=\"required\">This field is required</div>\n  </div>\n</md-input-container>\n");
2568
2569 /***/ }),
2570
2571 /***/ "./src/lib/directives/select-item/select-item.tpl.html":
2572 /*!*************************************************************!*\
2573   !*** ./src/lib/directives/select-item/select-item.tpl.html ***!
2574   \*************************************************************/
2575 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2576
2577 __webpack_require__.r(__webpack_exports__);
2578 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2579 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2580 /* harmony export */ });
2581 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div\n  class=\"sortable-container\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"Select.item.options\"\n>\n  <div\n    class=\"option-item\"\n    layout=\"row\"\n    ng-repeat=\"option in Select.item.options track by $index\"\n    sv-element\n  >\n    <md-button\n      class=\"md-button handle\"\n      md-no-ink\n      aria-label=\"reorder option item\"\n      sv-handle\n    >\n      <md-icon class=\"material-icons\">reorder</md-icon>\n    </md-button>\n\n    <md-input-container class=\"md-block\">\n      <label>Option {{$index + 1}}</label>\n      <input ng-model=\"option.value\" />\n    </md-input-container>\n\n    <md-button class=\"md-button md-warn\" ng-click=\"Select.deleteOption($index)\">\n      <md-icon class=\"material-icons\">delete</md-icon>\n    </md-button>\n  </div>\n\n  <md-button class=\"md-raised md-accent\" ng-click=\"Select.addOption()\"\n    >Add Option</md-button\n  >\n</div>\n");
2582
2583 /***/ }),
2584
2585 /***/ "./src/lib/directives/select-item/select-view.tpl.html":
2586 /*!*************************************************************!*\
2587   !*** ./src/lib/directives/select-item/select-view.tpl.html ***!
2588   \*************************************************************/
2589 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2590
2591 __webpack_require__.r(__webpack_exports__);
2592 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2593 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2594 /* harmony export */ });
2595 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <md-select\n    name=\"formItemInput\"\n    ng-required=\"SelectView.formItem.config.required\"\n    ng-model=\"SelectView.formItem.value\"\n  >\n    <md-option\n      ng-repeat=\"option in SelectView.formItem.options track by $index\"\n      ng-value=\"option.value\"\n      >{{ option.value }}</md-option\n    >\n  </md-select>\n  <div ng-messages=\"SelectView.form.$error\">\n    <div ng-message=\"required\">This field is required</div>\n  </div>\n</md-input-container>\n");
2596
2597 /***/ }),
2598
2599 /***/ "./src/lib/directives/textarea-item/textarea-item.tpl.html":
2600 /*!*****************************************************************!*\
2601   !*** ./src/lib/directives/textarea-item/textarea-item.tpl.html ***!
2602   \*****************************************************************/
2603 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2604
2605 __webpack_require__.r(__webpack_exports__);
2606 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2607 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2608 /* harmony export */ });
2609 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <label>Placeholder</label>\n  <input type=\"text\" ng-model=\"Textarea.item.config.placeholder\" />\n</md-input-container>\n");
2610
2611 /***/ }),
2612
2613 /***/ "./src/lib/directives/textarea-item/textarea-view.tpl.html":
2614 /*!*****************************************************************!*\
2615   !*** ./src/lib/directives/textarea-item/textarea-view.tpl.html ***!
2616   \*****************************************************************/
2617 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2618
2619 __webpack_require__.r(__webpack_exports__);
2620 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2621 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2622 /* harmony export */ });
2623 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<md-input-container class=\"md-block\">\n  <textarea\n    ng-model=\"TextareaView.formItem.value\"\n    placeholder=\"{{TextareaView.formItem.config.placeholder}}\"\n    ng-required=\"TextareaView.formItem.config.required\"\n  ></textarea>\n  <div ng-messages=\"TextareaView.form.$error\">\n    <div ng-message=\"required\">This field is required</div>\n  </div>\n</md-input-container>\n");
2624
2625 /***/ }),
2626
2627 /***/ "./src/lib/directives/upload-item/upload-item.tpl.html":
2628 /*!*************************************************************!*\
2629   !*** ./src/lib/directives/upload-item/upload-item.tpl.html ***!
2630   \*************************************************************/
2631 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2632
2633 __webpack_require__.r(__webpack_exports__);
2634 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2635 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2636 /* harmony export */ });
2637 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div\n  class=\"sortable-container\"\n  layout=\"column\"\n  sv-root\n  sv-part=\"Upload.item.options\"\n>\n  <md-input-container class=\"md-block\">\n    <label>Upload Button label</label>\n    <input ng-model=\"Upload.item.config.uploadFileButtonLabel\" />\n  </md-input-container>\n\n  <md-switch\n    ng-model=\"Upload.item.config.multipleUpload\"\n    ng-true-value=\"true\"\n    ng-false-value=\"false\"\n  >\n    Multiple\n  </md-switch>\n\n  <md-input-container class=\"md-block\">\n    <span>Max File size: {{Upload.item.config.size}} Mb</span>\n    <input\n      type=\"number\"\n      id=\"size\"\n      name=\"size\"\n      min=\"0.1\"\n      max=\"999\"\n      step=\"0.1\"\n      aria-label=\"size\"\n      ng-model=\"Upload.item.config.size\"\n    />\n  </md-input-container>\n\n  <md-input-container class=\"md-block\">\n    <label>Max file size error message</label>\n    <textarea\n      ng-model=\"Upload.item.config.sizeErrMessage\"\n      md-maxlength=\"150\"\n      rows=\"2\"\n    ></textarea>\n  </md-input-container>\n\n  <md-switch\n    ng-model=\"Upload.item.config.showAccept\"\n    ng-true-value=\"true\"\n    ng-false-value=\"false\"\n  >\n    Configure allowed file types\n  </md-switch>\n\n  <md-input-container class=\"md-block\" ng-if=\"Upload.item.config.showAccept\">\n    <label>Allowed Types</label>\n    <textarea\n      ng-model=\"Upload.item.config.accept\"\n      md-maxlength=\"150\"\n      rows=\"2\"\n    ></textarea>\n  </md-input-container>\n</div>\n");
2638
2639 /***/ }),
2640
2641 /***/ "./src/lib/directives/upload-item/upload-view.tpl.html":
2642 /*!*************************************************************!*\
2643   !*** ./src/lib/directives/upload-item/upload-view.tpl.html ***!
2644   \*************************************************************/
2645 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2646
2647 __webpack_require__.r(__webpack_exports__);
2648 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2649 /* harmony export */   "default": () => __WEBPACK_DEFAULT_EXPORT__
2650 /* harmony export */ });
2651 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<div layout=\"row\" class=\"option-item upload-item\">\n  <md-input-container class=\"md-block\" style=\"margin: 0\">\n    <input type=\"file\" class=\"ng-hide\" aria-label=\"file\" />\n    <md-input-container flex class=\"md-block\">\n      <input\n        type=\"text\"\n        ng-model=\"fileName\"\n        class=\"ng-hide\"\n        disabled\n        aria-label=\"fileName\"\n      />\n    </md-input-container>\n  </md-input-container>\n\n  <md-button class=\"md-raised md-accent upload-button\"\n    ><md-icon class=\"material-icons\">attach_file</md-icon\n    ><span\n      >{{UploadView.formItem.config.uploadFileButtonLabel}}</span\n    ></md-button\n  >\n</div>\n\n<div>\n  <label></label>\n  <div\n    style=\"display: grid; grid-template-columns: 8em auto; align-items: center\"\n    layout=\"row\"\n    ng-repeat=\"option in UploadView.formItem.options track by $index\"\n  >\n    <md-button ng-click=\"UploadView.removeItem($index)\" class=\"md-icon-button\">\n      <md-icon class=\"material-icons\">close</md-icon>\n    </md-button>\n    <span>{{option.name}}</span>\n  </div>\n</div>\n");
2652
2653 /***/ })
2654
2655 /******/        });
2656 /************************************************************************/
2657 /******/        // The module cache
2658 /******/        var __webpack_module_cache__ = {};
2659 /******/        
2660 /******/        // The require function
2661 /******/        function __webpack_require__(moduleId) {
2662 /******/                // Check if module is in cache
2663 /******/                if(__webpack_module_cache__[moduleId]) {
2664 /******/                        return __webpack_module_cache__[moduleId].exports;
2665 /******/                }
2666 /******/                // Create a new module (and put it into the cache)
2667 /******/                var module = __webpack_module_cache__[moduleId] = {
2668 /******/                        // no module.id needed
2669 /******/                        // no module.loaded needed
2670 /******/                        exports: {}
2671 /******/                };
2672 /******/        
2673 /******/                // Execute the module function
2674 /******/                __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2675 /******/        
2676 /******/                // Return the exports of the module
2677 /******/                return module.exports;
2678 /******/        }
2679 /******/        
2680 /************************************************************************/
2681 /******/        /* webpack/runtime/define property getters */
2682 /******/        (() => {
2683 /******/                // define getter functions for harmony exports
2684 /******/                __webpack_require__.d = (exports, definition) => {
2685 /******/                        for(var key in definition) {
2686 /******/                                if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2687 /******/                                        Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2688 /******/                                }
2689 /******/                        }
2690 /******/                };
2691 /******/        })();
2692 /******/        
2693 /******/        /* webpack/runtime/hasOwnProperty shorthand */
2694 /******/        (() => {
2695 /******/                __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
2696 /******/        })();
2697 /******/        
2698 /******/        /* webpack/runtime/make namespace object */
2699 /******/        (() => {
2700 /******/                // define __esModule on exports
2701 /******/                __webpack_require__.r = (exports) => {
2702 /******/                        if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2703 /******/                                Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2704 /******/                        }
2705 /******/                        Object.defineProperty(exports, '__esModule', { value: true });
2706 /******/                };
2707 /******/        })();
2708 /******/        
2709 /************************************************************************/
2710 /******/        // module exports must be returned from runtime so entry inlining is disabled
2711 /******/        // startup
2712 /******/        // Load entry module and return exports
2713 /******/        return __webpack_require__("./src/lib/index.module.js");
2714 /******/ })()
2715 ;
2716 });
2717 //# sourceMappingURL=angular-material-form-builder.js.map