@acpaas-ui/ngx-forms 4.6.3 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/acpaas-ui-ngx-forms.metadata.json +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.js +5 -1
- package/bundles/acpaas-ui-ngx-forms.umd.js.map +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.min.js +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.min.js.map +1 -1
- package/esm2015/lib/auto-complete/components/auto-complete/auto-complete.component.js +6 -2
- package/esm5/lib/auto-complete/components/auto-complete/auto-complete.component.js +6 -2
- package/fesm2015/acpaas-ui-ngx-forms.js +5 -1
- package/fesm2015/acpaas-ui-ngx-forms.js.map +1 -1
- package/fesm5/acpaas-ui-ngx-forms.js +5 -1
- package/fesm5/acpaas-ui-ngx-forms.js.map +1 -1
- package/lib/auto-complete/components/auto-complete/auto-complete.component.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@acpaas-ui/ngx-flyout"),require("@acpaas-ui/ngx-selectable-list"),require("inputmask"),require("lodash-es"),require("rxjs"),require("rxjs/operators"),require("@acpaas-ui/js-date-utils"),require("@acpaas-ui/ngx-calendar"),require("@acpaas-ui/ngx-utils"),require("@acpaas-ui/ngx-progress-bar"),require("ng2-ckeditor")):"function"==typeof define&&define.amd?define("@acpaas-ui/ngx-forms",["exports","@angular/core","@angular/common","@angular/forms","@acpaas-ui/ngx-flyout","@acpaas-ui/ngx-selectable-list","inputmask","lodash-es","rxjs","rxjs/operators","@acpaas-ui/js-date-utils","@acpaas-ui/ngx-calendar","@acpaas-ui/ngx-utils","@acpaas-ui/ngx-progress-bar","ng2-ckeditor"],t):t(((e=e||self)["acpaas-ui"]=e["acpaas-ui"]||{},e["acpaas-ui"]["ngx-forms"]={}),e.ng.core,e.ng.common,e.ng.forms,e.flyout,e.selectableList,e.Inputmask,e.lodashEs,e.rxjs,e.rxjs.operators,e.jsDateUtils,e.calendar,e.ngxUtils,e.progressBar,e.ng2Ckeditor)}(this,(function(e,t,n,i,s,o,a,r,l,u,p,c,d,h,f){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function m(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}var v=function(){function e(e){this.ref=e}return e.prototype.ngOnChanges=function(){this.setMask(this.auiMask)},e.prototype.setMask=function(e){a(e).mask(this.ref.nativeElement)},e.decorators=[{type:t.Directive,args:[{selector:"[auiMask]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={auiMask:[{type:t.Input}]},e}();var b=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[v],exports:[v],providers:[]}]}],e}(),I=function(){function e(){this.matchItemWithSearchString=function(e,t){return String(e).toLowerCase().indexOf(t.toLowerCase())>-1}}return e.prototype.search=function(e,t){var n=this;void 0===t&&(t={});var i=t.hasOwnProperty("query")?t.query:"",s=t.hasOwnProperty("minLength")?t.minLength:0,o=t.hasOwnProperty("key")?t.key:"";return!i&&t.showAllByDefault||i.length<s?y(e):y(e).filter((function(e){return o&&!e.hasOwnProperty(o)?console.error('"'+o+'" does not exist in item '+JSON.stringify(e,null,2)):o?n.matchItemWithSearchString(e[o],i):n.matchItemWithSearchString(e,i)}))},e.decorators=[{type:t.Injectable}],e}();var _=function(){function e(e,n){this.ref=e,this.searchService=n,this.results=[],this.data=[],this.remote=!1,this.minCharacters=0,this.mask=null,this.clearInvalid=!1,this.showAllByDefault=!1,this.search=new t.EventEmitter,this.select=new t.EventEmitter,this.query="",this.index=-1,this.selectedItem=null,this.searching=!1,this.focused=!1,this.isDisabled=!1,this.remoteValue=!1,this.updateModel=function(e){}}return e.prototype.writeValue=function(e){var t=this;if(void 0===e&&(e=""),this.value){var n=this.data.find((function(n){return n[t.value]===e}));if(n)return this.query=n[this.label];this.remote&&e&&(this.remoteValue=!0)}this.query=e},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){Array.isArray(this.data)&&this.data.length>0&&!this.query&&this.showAllByDefault&&(this.results=y(this.data))},e.prototype.ngOnChanges=function(e){if(e){var t=r.get(e,"data.currentValue",[]);r.isEqual(t,r.get(e,"data.previousValue",[]))||(this.remote?this.remoteSearch():this.localSearch()),e.results&&e.results.currentValue&&(this.searching=!1)}},e.prototype.propagateChange=function(e){if(this.query=null!==e?this.label?e[this.label]:e:"",this.select.emit(e),e){var t=this.value?this.value:this.label?this.label:null;this.updateModel(t?e[t]||"":e),this.selectedItem=e}},e.prototype.doSearch=function(){this.index=-1,this.searching=!0,this.remote?this.search.emit(this.query):this.localSearch(),this.openFlyout()},e.prototype.onSelect=function(e){this.propagateChange(e),this.closeFlyout()},e.prototype.onFlyoutClosed=function(){return this.index>=0&&1===this.results.length?this.onSelect(this.results[0]):!this.query&&this.index<0?this.onSelect(null):void(this.clearInvalid&&this.query&&!this.results.length&&this.index<0&&(this.query=this.selectedItem?this.label?this.selectedItem[this.label]:this.selectedItem:""))},e.prototype.onKeyArrowDown=function(){this.index<this.results.length-1&&this.scrollList(1),this.openFlyout()},e.prototype.onKeyArrowUp=function(){this.index>=0&&this.scrollList(-1)},e.prototype.onKeyEnter=function(e){e.preventDefault();var t=this.index>=0?this.results[this.index]:this.query;this.propagateChange(t),this.closeFlyout()},e.prototype.onKeyEscape=function(){this.closeFlyout()},e.prototype.onFocus=function(){this.focused=!0,this.openFlyout()},e.prototype.openFlyout=function(){this.flyout&&this.flyout.open()},e.prototype.closeFlyout=function(){this.flyout&&this.flyout.close(),this.focused=!1},e.prototype.localSearch=function(){this.results=this.searchService.search(this.data,{minLength:this.minCharacters,key:this.label,query:this.query,showAllByDefault:this.showAllByDefault}),1===this.results.length&&this.query===this.results[0][this.label]&&(this.index=0),this.searching=!1},e.prototype.remoteSearch=function(){var e=this;if(this.remoteValue&&this.data){var t=this.data.find((function(t){return e.value?t[e.value]===e.query:t===e.query}));this.query=t?this.label?t[this.label]:t:"",this.remoteValue=!1}},e.prototype.scrollList=function(e){if(this.index+=e,this.flyoutZone){var t=this.flyoutZone.element.getElementsByTagName("li"),n=t[1]?t[1].offsetHeight:t[0].offsetHeight,i=this.flyoutZone.element.offsetHeight/n/2;this.flyoutZone.element.scrollTop=this.index*n-i*n}},e.decorators=[{type:t.Component,args:[{selector:"aui-auto-complete",template:'<div (closed)="onFlyoutClosed()" [toggleClick]="false" aria-haspopup="listbox"\n auiFlyout class="m-flyout--scrollable m-flyout--full o-auto-complete">\n <input (focus)="onFocus()"\n (keyArrowDown)="onKeyArrowDown()"\n (keyArrowUp)="onKeyArrowUp()"\n (keyEnter)="onKeyEnter($event)"\n (keyEscape)="onKeyEscape()"\n [(ngModel)]="query"\n (ngModelChange)="doSearch()"\n *ngIf="!mask"\n [disabled]="isDisabled ? true : null"\n [id]="id"\n [placeholder]="placeholder"\n aria-autocomplete="list"\n auiFlyoutAction\n auiSelectableActions\n autocomplete="off"\n type="text"\n />\n <input (focus)="onFocus()"\n (keyArrowDown)="onKeyArrowDown()"\n (keyArrowUp)="onKeyArrowUp()"\n (keyEnter)="onKeyEnter($event)"\n (keyEscape)="onKeyEscape()"\n [(ngModel)]="query"\n (ngModelChange)="doSearch()"\n *ngIf="mask"\n [auiMask]="mask"\n [disabled]="isDisabled ? true : null"\n [id]="id"\n [placeholder]="placeholder"\n aria-autocomplete="list"\n auiFlyoutAction\n auiSelectableActions\n autocomplete="off"\n type="text"\n />\n\n <div *ngIf="!isDisabled" auiFlyoutZone>\n\t\t<span *ngIf="focused && loadingText && searching" class="o-auto-complete__info u-text-light u-margin-xs">\n\t\t\t<span class="a-spinner a-spinner--inline a-spinner--sm u-margin-right-xs"></span>\n {{ loadingText }}\n\t\t</span>\n <span *ngIf="focused && searchIncentiveText && !searching && !query && !results.length"\n class="o-auto-complete__info u-text-light u-margin-xs">{{ searchIncentiveText }}</span>\n <span *ngIf="focused && noResultsText && !searching && query && !results.length"\n class="o-auto-complete__info u-text-light u-margin-xs">{{ noResultsText }}</span>\n\n <aui-selectable-list (selected)="onSelect($event)" *ngIf="results.length > 0 && !(focused && loadingText && searching)" [index]="index" [itemTemplate]="template"\n [items]="results" [label]="label"\n [search]="query"></aui-selectable-list>\n </div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[".o-auto-complete,.o-auto-complete__info{display:block}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:I}]},e.propDecorators={id:[{type:t.Input}],placeholder:[{type:t.Input}],results:[{type:t.Input}],data:[{type:t.Input}],remote:[{type:t.Input}],minCharacters:[{type:t.Input}],mask:[{type:t.Input}],clearInvalid:[{type:t.Input}],searchIncentiveText:[{type:t.Input}],loadingText:[{type:t.Input}],noResultsText:[{type:t.Input}],showAllByDefault:[{type:t.Input}],label:[{type:t.Input}],value:[{type:t.Input}],search:[{type:t.Output}],select:[{type:t.Output}],flyout:[{type:t.ViewChild,args:[s.FlyoutDirective,{static:!0}]}],flyoutZone:[{type:t.ViewChild,args:[s.FlyoutZoneDirective,{static:!0}]}],template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]}]},e}();var D=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,s.FlyoutModule,o.SelectableListModule,b],declarations:[_],exports:[_],providers:[I]}]}],e}(),E=new t.InjectionToken("errorLabels"),F={ERRORS_INVALID_DATE:"INVALID_DATE",ERRORS_INVALID_RANGE:"INVALID_RANGE"},C=function(){function e(e,n,i,s,o,a){void 0===e&&(e=c.CALENDAR_DEFAULT_MONTH_LABELS),void 0===n&&(n=c.CALENDAR_DEFAULT_WEEKDAY_LABELS),void 0===i&&(i=F),this.monthLabels=e,this.weekdayLabels=n,this.errorLabels=i,this.calendarService=s,this.formBuilder=o,this.ref=a,this.placeholder="dd/mm/yyyy",this.blur=new t.EventEmitter,this.dateMask={mask:"99/99/9999",showMaskOnHover:!1},this.isDisabled=!1,this.componentDestroyed$=new l.Subject,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){var e=this;this.createInterval(),this.formControl=this.formBuilder.control({value:"",disabled:this.isDisabled}),this.formControl.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){if(t){var n=t.split("/").reverse().join("-"),i=p.DateHelper.parseDate(n,"YYYY-MM-DD",!0);i?(e.selectedDate=i,e.onChange(i.toISOString())):e.onChange(t)}else e.selectedDate=null,e.onChange("")}))},e.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(!0),this.componentDestroyed$.complete()},e.prototype.createInterval=function(){(this.min||this.max)&&(this.interval=d.IntervalBuilder.dateInterval(this.min?new Date(this.min):null,this.max?new Date(this.max):null).not().build())},e.prototype.writeValue=function(e){this.selectedDate="string"==typeof e?this.isISODateFormat(e)?new Date(e):p.DateHelper.parseDate(e,"DD/MM/YYYY",!0):e;var t=this.selectedDate?this.formatDate(this.selectedDate):"";this.formControl.setValue(t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.isDisabled=e,this.formControl&&(e&&this.formControl.enabled?this.formControl.disable():!e&&this.formControl.disabled&&this.formControl.enable()),this.ref.markForCheck()},e.prototype.selectDateFromCalendar=function(e){e.complete&&(this.formControl.setValue(this.formatDate(e.date)),this.flyout.close())},e.prototype.formatDate=function(e){return p.DateHelper.formatDate(e,"DD/MM/YYYY",{leadingZero:!0,monthLabels:this.monthLabels,weekdayLabels:this.weekdayLabels})},e.prototype.validate=function(e){if(""===e.value||null===e.value)return null;var t=p.DateHelper.parseDate(e.value);return t?this.range&&this.range.length&&this.calendarService.getRangeForDate(t,this.range).indexOf(t.getDate())>=0?{range:this.errorLabels.ERRORS_INVALID_RANGE}:null:{format:this.errorLabels.ERRORS_INVALID_DATE}},e.prototype.handleBlur=function(e){this.blur.emit(e),this.onTouched(e)},e.prototype.isISODateFormat=function(e){return"string"==typeof e&&e.match(/\d{4}-\d{2}-\d{2}T.*/)},e.decorators=[{type:t.Component,args:[{selector:"aui-datepicker",template:'<div aria-haspopup="grid" auiFlyout class="aui-datepicker a-input__wrapper">\n <input\n (blur)="handleBlur($event)"\n [attr.disabled]="isDisabled ? true : null"\n [auiMask]="dateMask.mask"\n [autocomplete]="autocomplete"\n [formControl]="formControl"\n id="{{ id }}"\n name="{{ name }}"\n placeholder="{{ placeholder }}"\n type="text"\n >\n <span *ngIf="isDisabled" class="fa fa-calendar"></span>\n\n <ng-container *ngIf="!isDisabled">\n <span [openOnFocus]="false" auiFlyoutAction class="fa fa-calendar is-clickable"></span>\n </ng-container>\n\n <ng-container *ngIf="!isDisabled">\n <div auiFlyoutZone class="m-datepicker m-datepicker--fixed" role="dialog">\n <aui-calendar (selectDate)="selectDateFromCalendar($event)" [range]="range"\n [selectedDate]="selectedDate" [interval]="interval"></aui-calendar>\n </div>\n </ng-container>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[".aui-datepicker,:host{display:block}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c.CALENDAR_MONTH_LABELS]}]},{type:void 0,decorators:[{type:t.Inject,args:[c.CALENDAR_WEEKDAY_LABELS]}]},{type:void 0,decorators:[{type:t.Inject,args:[E]}]},{type:c.CalendarService},{type:i.FormBuilder},{type:t.ChangeDetectorRef}]},e.propDecorators={flyout:[{type:t.ViewChild,args:[s.FlyoutDirective,{static:!0}]}],id:[{type:t.Input}],name:[{type:t.Input}],placeholder:[{type:t.Input}],range:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],autocomplete:[{type:t.Input}],blur:[{type:t.Output}]},e}();var A=c.CALENDAR_DEFAULT_WEEKDAY_LABELS,L=c.CALENDAR_DEFAULT_MONTH_LABELS,x=F,w=function(){function e(){}return e.forChild=function(t,n,i){return{ngModule:e,providers:[{provide:c.CALENDAR_WEEKDAY_LABELS,useValue:t},{provide:c.CALENDAR_MONTH_LABELS,useValue:n},{provide:E,useValue:i}]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,c.CalendarModule,s.FlyoutModule,b],declarations:[C],exports:[C],providers:[{provide:c.CALENDAR_WEEKDAY_LABELS,useValue:A},{provide:c.CALENDAR_MONTH_LABELS,useValue:L},{provide:E,useValue:x}]}]}],e}(),M=function(){function e(e){this.elRef=e,this.coreBranding=!0,this.min=0,this.max=100,this.minimalDistance=1,this.step=0,this.labelBefore="",this.labelAfter="",this.start=0,this.end=!1,this.steps=[],this.active=null,this.isDisabled=!1,this.hasFocus=!1,this.click=!1,this.propagateChange=function(e){}}return Object.defineProperty(e.prototype,"disabledClass",{get:function(){return this.isDisabled},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){if(this.step>0)for(var e=0;e<=this.max;e+=Number(this.step))this.steps.push(e);this.startPercentage=this.startToPercentage(),this.end&&(this.endPercentage=this.endToPercentage())},e.prototype.writeValue=function(e){e&&e.start?this.start=e.start:isNaN(e)||""===e?this.setStart(Number(this.min)):this.start=Number(e),this.startPercentage=this.startToPercentage(),e&&e.end&&(this.end=e.end,this.endPercentage=this.endToPercentage())},e.prototype.registerOnTouched=function(){},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.onMouseDown=function(e){this.isDisabled||(this.hasFocus=!0,this.active=e)},e.prototype.toggleFocus=function(e,t,n){this.isDisabled||(n.preventDefault(),this.hasFocus=e,this.active=t)},e.prototype.onKeyDown=function(e){var t=this;if(this.hasFocus){var n=e.keyCode,i={end:35,home:36,left:37,up:38,right:39,down:40};if(-1!==Object.keys(i).map((function(e){return i[e]})).indexOf(n)){var s=this.minimalDistance;this.step>0&&(s=Number(this.step));var o=function(e){var n="start"===t.active?t.start:Number(t.end);"up"===e?n+=s:n-=s;var i=(n-t.min)/(t.max-t.min)*100;return i>100&&(i=100),i<0&&(i=0),i};switch(n){case i.right:case i.up:this.updateHandle(o("up")),e.preventDefault();break;case i.left:case i.down:this.updateHandle(o("down")),e.preventDefault();break;case i.end:this.updateHandle(100),e.preventDefault();break;case i.home:this.updateHandle(0),e.preventDefault()}}}},e.prototype.onMouseUp=function(e){"start"===this.active&&(this.setStart(this.round(this.start,this.step,0)),this.startPercentage=this.startToPercentage()),"end"===this.active&&(this.setEnd(this.round(this.end,this.step,0)),this.endPercentage=this.endToPercentage()),this.click=!1},e.prototype.mouseDown=function(e){this.click=!0},e.prototype.onMouseMove=function(e){if(this.active&&this.click){e.preventDefault();var t=void 0!==e.x?e.x:e.targetTouches[0].pageX,n=this.elRef.nativeElement.getBoundingClientRect(),i=this.calcPercentage(t,n.width,n.left);this.updateHandle(i)}},e.prototype.updateHandle=function(e){"start"===this.active&&(this.startPercentage=e,this.setStart(this.percentageToStart()),this.minimalDistanceNotRespected()&&(this.setStart(Number(this.end)-Number(this.minimalDistance)),this.startPercentage=this.startToPercentage())),"end"===this.active&&this.endPercentage&&(this.endPercentage=e,this.setEnd(this.percentageToEnd()),this.minimalDistanceNotRespected()&&(this.setEnd(Number(this.start)+Number(this.minimalDistance)),this.endPercentage=this.endToPercentage()))},e.prototype.setStart=function(e){this.start=e,this.end?this.propagateChange({start:this.start,end:this.end}):this.propagateChange(this.start)},e.prototype.setEnd=function(e){this.end=e,this.propagateChange({start:this.start,end:this.end})},e.prototype.round=function(e,t,n){return t>0?Math.round((e-n)/t)*t+n:e},e.prototype.startToPercentage=function(){return Math.round((this.start-this.min)/(this.max-this.min)*100)},e.prototype.percentageToStart=function(){return Math.round(this.startPercentage/100*(this.max-this.min)+Number(this.min))},e.prototype.endToPercentage=function(){return Math.round((Number(this.end)-this.min)/(this.max-this.min)*100)},e.prototype.percentageToEnd=function(){return Math.round(this.endPercentage/100*(this.max-this.min)+Number(this.min))},e.prototype.minimalDistanceNotRespected=function(){return this.minimalDistance>=0&&this.end&&this.start>Number(this.end)-this.minimalDistance},e.prototype.calcPercentage=function(e,t,n){var i=e-n,s=Math.round(i/t*100);return s>100&&(s=100),s<0&&(s=0),s},e.decorators=[{type:t.Component,args:[{selector:"aui-range-slider",template:'<div class="m-range-slider__inner">\n <div\n [style.left]="endPercentage ? startPercentage + \'%\' : false"\n [style.width]="endPercentage ? endPercentage - startPercentage + \'%\' : startPercentage + \'%\'"\n class="m-range-slider__bar"\n ></div>\n <span\n (blur)="toggleFocus(false, null, $event)"\n (dragexit)="onMouseUp($event)"\n (focus)="toggleFocus(true, \'start\', $event)"\n (mousedown)="onMouseDown(\'start\')"\n (touchstart)="onMouseDown(\'start\')"\n [style.left]="startPercentage + \'%\'"\n class="m-range-slider__handle"\n tabindex="0"\n >\n\t\t<div class="m-range-slider__tooltip a-tooltip a-tooltip--primary a-tooltip--top">\n\t\t\t<p>{{ labelBefore }}{{ start }}{{ labelAfter }}</p>\n\t\t</div>\n\t</span>\n\n <span\n (blur)="toggleFocus(false, null, $event)"\n (dragexit)="onMouseUp($event)"\n (focus)="toggleFocus(true, \'end\', $event)"\n (mousedown)="onMouseDown(\'end\')"\n (touchstart)="onMouseDown(\'end\')"\n *ngIf="end"\n [style.left]="endPercentage + \'%\'"\n class="m-range-slider__handle"\n name="m-range-slider__handle__end"\n tabindex="0"\n >\n\t\t<div class="m-range-slider__tooltip a-tooltip a-tooltip--primary a-tooltip--top">\n\t\t\t<p>{{ labelBefore }}{{ end }}{{ labelAfter }}</p>\n\t\t</div>\n\t</span>\n</div>\n\n<div class="m-range-slider__steps">\n <div *ngFor="let step of steps; let i = index" class="m-range-slider__step"></div>\n</div>\n\n<div class="m-range-slider__step-labels">\n <div *ngFor="let step of steps; let i = index" class="m-range-slider__step">{{ step }}</div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host{display:block;position:relative}:host.is-disabled{cursor:not-allowed}:host.is-disabled .m-range-slider__handle:hover{cursor:not-allowed}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={coreBranding:[{type:t.HostBinding,args:["class.m-range-slider"]}],min:[{type:t.Input}],max:[{type:t.Input}],minimalDistance:[{type:t.Input}],step:[{type:t.Input}],labelBefore:[{type:t.Input}],labelAfter:[{type:t.Input}],disabledClass:[{type:t.HostBinding,args:["class.is-disabled"]}],onKeyDown:[{type:t.HostListener,args:["document:keydown",["$event"]]}],onMouseUp:[{type:t.HostListener,args:["touchend",["$event"]]},{type:t.HostListener,args:["mouseup",["$event"]]}],mouseDown:[{type:t.HostListener,args:["touchstart",["$event"]]},{type:t.HostListener,args:["mousedown",["$event"]]}],onMouseMove:[{type:t.HostListener,args:["touchmove",["$event"]]},{type:t.HostListener,args:["mousemove",["$event"]]}]},e}();var k=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule],declarations:[M],exports:[M]}]}],e}(),S=function(){function e(){this.flyoutSize=s.FlyoutSize.Small,this.label="Filter",this.labelDeselect="Alles deselecteren",this.labelResults="Resultaten",this.labelNoResults="Geen resultaten gevonden.",this.choices=[],this.placeholder="Zoeken",this.inputDelay=150,this.showAllByDefault=!1,this.size="default",this.search=new t.EventEmitter,this.query="",this.selectedItems=[],this.filteredChoices=[],this.loading=!1,this.isDisabled=!1,this.updateModel=function(){},this.filterDataFromSearch=r.debounce(this.filterData.bind(this),this.inputDelay)}return e.prototype.writeValue=function(e){this.selectedItems=Array.isArray(e)?e:[]},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){this.showAllByDefault&&this.filterData()},e.prototype.ngOnChanges=function(e){var t=r.get(e,"choices.currentValue",null);t&&(this.remote?(this.filteredChoices=y(t),this.loading=!1):this.filterData())},e.prototype.filterData=function(){if(this.remote)return this.loading=!0,this.search.emit(this.query);this.filterChoices()},e.prototype.clear=function(){this.selectedItems=[],this.query="",this.filterData(),this.updateModel(this.selectedItems)},e.prototype.toggleSelected=function(e){var t=this.selectedItems.indexOf(e);this.selectedItems=t<0?this.selectedItems.concat(e):y(this.selectedItems.slice(0,t),this.selectedItems.slice(t+1)),this.updateModel(this.selectedItems)},e.prototype.filterChoices=function(){var e=this;this.filteredChoices=this.choices.filter((function(t){return e.selectedItems.indexOf(t.value)<0&&t.label.toLowerCase().indexOf(e.query.toLowerCase())>=0}))},e.decorators=[{type:t.Component,args:[{selector:"aui-search-filter",template:'<div [align]="flyoutAlign" [size]="flyoutSize" auiFlyout class="m-search-filter">\n <button class="has-icon-right a-button--default" [attr.disabled]="isDisabled ? \'true\' : null" aria-haspopup=”true”\n auiFlyoutAction\n [ngClass]="{\n \'a-button\' : selectedItems.length,\n \'a-button-outline\' : !selectedItems.length,\n \'a-button--large\' : size === \'large\',\n \'a-button--small\': size === \'small\',\n \'a-button--tiny\' : size === \'tiny\'\n }">\n <span id="{{ id + \'-label\' }}">{{ label }}</span>\n <span *ngIf="selectedItems.length">({{ selectedItems.length }})</span>\n <span class="fa fa-angle-down"></span>\n </button>\n\n <div auiFlyoutZone class="m-search-filter__search m-search-filter__search--scroll">\n <div *ngIf="!isDisabled" class="m-search-filter__input a-input has-icon-right">\n <div class="a-input__wrapper">\n <input (input)="filterDataFromSearch()" [(ngModel)]="query" [attr.aria-labelledby]="id + \'-label\'"\n [attr.placeholder]="placeholder"\n aria-autocomplete="list" id="{{ id + \'-search\' }}" name="{{ name + \'-search\' }}"\n type="text">\n <span class="fa fa-search"></span>\n </div>\n </div>\n\n <div *ngIf="!isDisabled && selectedItems.length > 0" class="m-search-filter__clear">\n <button (click)="clear()" class="a-button-outline a-button--small a-button--danger has-icon-left" type="button">\n <span class="fa fa-close"></span>\n {{ labelDeselect }}\n </button>\n </div>\n\n <p *ngIf="labelResults" class="h6 m-search-filter__results-title">{{ labelResults }}</p>\n <div *ngIf="loading" class="u-text-center u-padding a-spinner"></div>\n <ul *ngIf="!loading" class="a-list a-list--lined a-list--unstyled">\n <li *ngIf="!filteredChoices.length" class="m-search-filter__results-item a-list__item">\n <p class="u-margin-xs">{{ labelNoResults }}</p>\n </li>\n <li *ngFor="let choice of filteredChoices; index as i" class="m-search-filter__results-item a-list__item">\n <div class="a-input__checkbox">\n <input\n (change)="toggleSelected(choice.value)"\n [attr.disabled]="isDisabled ? true : null"\n [checked]="selectedItems.indexOf(choice.value) >= 0"\n id="{{ \'checkbox--\' + i + \'--\' + id }}"\n name="{{ \'checkbox--\' + i + \'--\' + id }}"\n type="checkbox"\n />\n <label for="{{ \'checkbox--\' + i + \'--\' + id }}">{{ choice.label }}</label>\n </div>\n </li>\n </ul>\n </div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}]}]}],e.ctorParameters=function(){return[]},e.propDecorators={id:[{type:t.Input}],name:[{type:t.Input}],flyoutSize:[{type:t.Input}],flyoutAlign:[{type:t.Input}],label:[{type:t.Input}],labelDeselect:[{type:t.Input}],labelResults:[{type:t.Input}],labelNoResults:[{type:t.Input}],choices:[{type:t.Input}],remote:[{type:t.Input}],placeholder:[{type:t.Input}],inputDelay:[{type:t.Input}],showAllByDefault:[{type:t.Input}],size:[{type:t.Input}],search:[{type:t.Output}]},e}();var T=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.FormsModule,n.CommonModule,s.FlyoutModule],declarations:[S],exports:[S]}]}],e}(),N=function(){function e(){}return e.minTime=function(e){return function(t){var n=t.value.split(":"),i=parseInt(n[0],10),s=parseInt(n[1],10),o=e.split(":"),a=parseInt(o[0],10),r=parseInt(o[1],10);return isNaN(i)||isNaN(s)||isNaN(a)||isNaN(r)?null:a<i?null:a===i&&r<=s?null:{minTime:{value:t.value}}}},e.maxTime=function(e){return function(t){var n=t.value.split(":"),i=parseInt(n[0],10),s=parseInt(n[1],10),o=e.split(":"),a=parseInt(o[0],10),r=parseInt(o[1],10);return isNaN(i)||isNaN(s)||isNaN(a)||isNaN(r)?null:a>i?null:a===i&&r>=s?null:{maxTime:{value:t.value}}}},e}(),O={Auto:"auto",Small:"small",Large:"large"},R=function(){function e(e,t){this.formBuilder=e,this.renderer=t,this.id="aui-timepicker-"+Math.random().toString(36).substring(2),this.hoursPlaceholder="uu",this.minutesPlaceholder="mm",this.hasError=!1,this.size=O.Auto,this.ariaLabelHours="Uur",this.ariaLabelMinutes="Minuten",this.shouldUseFallback=!1,this.minutes=[],this.hours=[],this.timeControl=new i.FormControl,this.componentDestroyed$=new l.Subject}return e.prototype.ngOnInit=function(){var e=this;this.shouldUseFallback=this.supportsNativeTimepicker(),this.minutes=this.getMinutes(),this.hours=this.getHours(),this.fallbackForm=this.formBuilder.group({hours:null,minutes:null}),this.fallbackForm.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){t.hours&&t.minutes?e.updateModel(t.hours+":"+t.minutes):e.updateModel("")})),this.timeControl.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){e.updateModel(t)}))},e.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(!0),this.componentDestroyed$.complete()},e.prototype.writeValue=function(e){if(this.timeControl.setValue(e,{emitEvent:!1}),e){var t=e.split(":");this.fallbackForm.get("hours").setValue(t[0],{emitEvent:!1}),this.fallbackForm.get("minutes").setValue(t[1],{emitEvent:!1})}},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){e?(this.timeControl.disable({emitEvent:!1}),this.fallbackForm.disable({emitEvent:!1})):(this.timeControl.enable({emitEvent:!1}),this.fallbackForm.enable({emitEvent:!1}))},e.prototype.supportsNativeTimepicker=function(){var e=this.renderer.createElement("input");return e.type="time","text"===e.type},e.prototype.getMinutes=function(){return Array(60).fill("").map((function(e,t){return p.DateHelper.addLeadingZero(t)}))},e.prototype.getHours=function(){return Array(24).fill("").map((function(e,t){return p.DateHelper.addLeadingZero(t)}))},e.decorators=[{type:t.Component,args:[{selector:"aui-timepicker",template:'<div class="m-timepicker">\n <div *ngIf="!shouldUseFallback" [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input">\n <input [attr.aria-label]="ariaLabelHours + \':\' + ariaLabelMinutes" [formControl]="timeControl" [id]="id"\n type="time">\n </div>\n\n <div *ngIf="shouldUseFallback" [formGroup]="fallbackForm">\n <div [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input has-icon-right">\n <div class="a-input__wrapper">\n <select [attr.aria-label]="ariaLabelHours" [id]="id" formControlName="hours">\n <option disabled value="null">{{ hoursPlaceholder }}</option>\n <option *ngFor="let hour of hours" [value]="hour">{{ hour }}</option>\n </select>\n <span class="fa fa-angle-down"></span>\n </div>\n </div>\n\n <div [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input has-icon-right">\n <div class="a-input__wrapper">\n <select [attr.aria-label]="ariaLabelMinutes" formControlName="minutes">\n <option disabled value="null">{{ minutesPlaceholder }}</option>\n <option *ngFor="let minute of minutes" [value]="minute">{{ minute }}</option>\n </select>\n <span class="fa fa-angle-down"></span>\n </div>\n </div>\n </div>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host{display:block}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder},{type:t.Renderer2}]},e.propDecorators={id:[{type:t.Input}],hoursPlaceholder:[{type:t.Input}],minutesPlaceholder:[{type:t.Input}],hasError:[{type:t.Input}],size:[{type:t.Input}],ariaLabelHours:[{type:t.Input}],ariaLabelMinutes:[{type:t.Input}]},e}();var P=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.ReactiveFormsModule,n.CommonModule],declarations:[R],exports:[R],providers:[]}]}],e}(),V={allowedMimeTypes:[],allowedFileTypes:[],autoUpload:!1,maxFileSize:0,queueLimit:0,type:"drop",url:""},U=new t.InjectionToken("uploadValidationMessages"),q=function(){function e(e){this.options=V,this.setOptions(e)}return e.prototype.setOptions=function(e){this.options=Object.assign({},this.options,e)},e.prototype.uploadFiles=function(e){var t=this,n=this.filesToFormData(e);return new l.Observable((function(e){var i=new XMLHttpRequest;i.upload.addEventListener("progress",(function(t){if(t.lengthComputable){var n=t.loaded/t.total;e.next({progress:n,data:null})}})),i.onload=function(){e.next({progress:1,data:i.response})},i.responseType="json",i.open("post",t.options.url),i.send(n)}))},e.prototype.validateFiles=function(e){var t,n,i=[],s=[];if(e.length>0)try{for(var o=m(e),a=o.next();!a.done;a=o.next()){var r=a.value,l=[];this.validateFileType(r)||l.push("INVALID_FILE_TYPE"),this.validateFileSize(r)||l.push("INVALID_FILE_SIZE"),this.validateMimeType(r)||l.push("INVALID_MIME_TYPE"),0===l.length?i.push(r):s.push({reasons:l,file:r})}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return{validFiles:i,invalidFiles:s}},e.prototype.filesToFormData=function(e){var t,n,i=new FormData;if(!this.options.url||""===this.options.url)throw new Error("Define the upload url.");try{for(var s=m(e),o=s.next();!o.done;o=s.next()){var a=o.value;i.append("file",a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},e.prototype.getFileExtension=function(e){return e.name.split(".")[e.name.split(".").length-1]},e.prototype.validateFileType=function(e){var t=this.options.allowedFileTypes,n=this.getFileExtension(e);if(!Array.isArray(t)||0===t.length)return!0;return-1!==t.map((function(e){return e.toUpperCase()})).lastIndexOf(n.toUpperCase())},e.prototype.validateFileSize=function(e){var t=this.options.maxFileSize;return!t||0===t||t>e.size},e.prototype.validateMimeType=function(e){var t=this.options.allowedMimeTypes;return!Array.isArray(t)||0===t.length||-1!==t.lastIndexOf(e.type)},e}();var B=function(){function e(){this.id="",this.accept=[],this.ariaLabelRemove="Verwijder",this.disabled=!1,this.multiple=!0,this.options=V,this.selectUploadedFiles=new t.EventEmitter,this.uploadedFiles=[],this.invalidFiles=[],this.queuedFiles=[]}return e.prototype.ngOnInit=function(){this.id||(this.ariaId="aui-upload-"+Math.random().toString(36).substring(2)),this.uploader=new q(this.options)},e.prototype.onUploadedFiles=function(e){this.uploadedFiles=this.uploadedFiles.concat(e),this.selectUploadedFiles.emit(this.uploadedFiles)},e.prototype.onInvalidFiles=function(e){this.invalidFiles=e},e.prototype.onQueuedFiles=function(e){this.queuedFiles=this.queuedFiles.concat(e)},e.decorators=[{type:t.Component,args:[{selector:"aui-upload",template:'<div class="m-upload aui-upload">\n <aui-upload-zone (invalidFiles)="onInvalidFiles($event)" (queuedFiles)="onQueuedFiles($event)" (uploadedFiles)="onUploadedFiles($event)" [ariaId]="ariaId"\n [disabled]="disabled" [id]="id" [accept]="accept" [multiple]="multiple"\n [uploader]="uploader">\n <div class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </div>\n <div class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </div>\n <div class="m-upload__button">\n <ng-content select=".m-upload__button"></ng-content>\n </div>\n </aui-upload-zone>\n <aui-validation-list [ariaLabelRemove]="ariaLabelRemove" [invalidFiles]="invalidFiles"></aui-validation-list>\n <aui-upload-queue (uploadedFiles)="onUploadedFiles($event)" *ngIf="!options?.autoUpload" [ariaLabelRemove]="ariaLabelRemove"\n [files]="queuedFiles" [uploader]="uploader"></aui-upload-queue>\n</div>\n',styles:[".m-upload__button>.m-upload__input{display:none}"]}]}],e.propDecorators={id:[{type:t.Input}],accept:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}],disabled:[{type:t.Input}],multiple:[{type:t.Input}],options:[{type:t.Input}],selectUploadedFiles:[{type:t.Output}]},e}();var H=function(){function e(){this.propagateChange=function(e){}}return e.prototype.writeValue=function(e){},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(){},e.prototype.onUpload=function(e){var t=this.format?this.format(e):e;this.propagateChange(t)},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-input",template:'<aui-upload (selectUploadedFiles)="onUpload($event)" [options]="options">\n <div class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </div>\n <div class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </div>\n <div class="m-upload__button">\n <ng-content select=".m-upload__button"></ng-content>\n </div>\n</aui-upload>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:e,multi:!0}]}]}],e.propDecorators={options:[{type:t.Input}],format:[{type:t.Input}]},e}();var $=function(){function e(){this.ariaLabelRemove="Verwijder",this.uploadedFiles=new t.EventEmitter,this.uploadProgress=0}return e.prototype.remove=function(e){this.files.splice(e,1)},e.prototype.uploadFiles=function(){var e=this;this.uploader.uploadFiles(this.files).subscribe((function(t){t.progress&&(e.uploadProgress=Math.floor(100*t.progress)),t.data&&(e.uploadedFiles.emit(t.data),e.files=[])}))},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-queue",template:'<ul class="m-upload__files u-margin-bottom-xs">\n <li *ngFor="let file of files; let i = index">\n <span class="fa fa-file-o"></span>\n <span class="m-upload__filename">{{ file.name }}</span>\n\n <button (click)="remove(i)" class="m-upload__delete a-button-transparent a-button--default a-button--small has-icon"\n type="button">\n <span class="fa fa-close">\n <span class="u-screen-reader-only">{{ ariaLabelRemove }}</span>\n </span>\n </button>\n </li>\n</ul>\n\n<button (click)="uploadFiles()" *ngIf="files.length > 0" class="a-button" type="button">Upload</button>\n'}]}],e.propDecorators={files:[{type:t.Input}],uploader:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}],uploadedFiles:[{type:t.Output}]},e}();var j=function(){function e(e){this.renderer=e,this.disabled=!1,this.multiple=!0,this.id="",this.ariaId="",this.accept=[],this.uploadedFiles=new t.EventEmitter,this.queuedFiles=new t.EventEmitter,this.invalidFiles=new t.EventEmitter,this.hasDragOver=!1,this.uploadProgress=0}return e.prototype.onDragOver=function(e){this.preventAndStop(e),this.hasDragOver=!0},e.prototype.onDragLeave=function(e){this.preventAndStop(e),this.hasDragOver=!1},e.prototype.onDrop=function(e){this.preventAndStop(e),this.hasDragOver=!1;var t=this.fileListToArray(e.dataTransfer.files);this.handleFiles(t)},e.prototype.triggerFile=function(){this.fileInput.nativeElement.click()},e.prototype.updateFiles=function(){var e=this.fileListToArray(this.fileInput.nativeElement.files);this.handleFiles(e)},e.prototype.onFileClick=function(e){e.target.value=""},e.prototype.ngAfterViewInit=function(){!1!==this.multiple&&this.renderer.setProperty(this.fileInput.nativeElement,"multiple","multiple"),this.accept&&this.renderer.setProperty(this.fileInput.nativeElement,"accept",this.accept.join()),this.disabled&&this.renderer.setProperty(this.fileInput.nativeElement,"disabled","disabled")},e.prototype.handleFiles=function(e){var t=this.uploader.validateFiles(e);this.invalidFiles.emit(t.invalidFiles),this.uploader.options.autoUpload&&t.validFiles.length>0?this.uploadFiles(t.validFiles):this.queuedFiles.emit(t.validFiles)},e.prototype.uploadFiles=function(e){var t=this;this.uploadProgress=0,this.uploadingFiles=e,this.uploader.uploadFiles(e).subscribe((function(e){e.progress&&(t.uploadProgress=Math.floor(100*e.progress)),e.data&&t.uploadedFiles.emit(e.data)}),(function(e){console.log(e)}))},e.prototype.fileListToArray=function(e){return Array.from(e)},e.prototype.preventAndStop=function(e){e.preventDefault(),e.stopPropagation()},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-zone",template:'<div *ngIf="uploader.options.type === \'drop\'" [class.is-disabled]="disabled" class="m-upload">\n <div class="m-upload__inner">\n <div class="m-upload__dropzone">\n\n <input\n #fileInput\n type="file"\n class="m-upload__input"\n [id]="id"\n [attr.aria-labelledby]="ariaId"\n (change)="updateFiles()"\n (click)="onFileClick($event)">\n\n <div *ngIf="!uploadProgress || uploadProgress === 0" class="m-upload__content">\n <p [id]="ariaId" class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </p>\n </div>\n\n <ng-container *ngIf="uploadProgress > 0">\n <p class="m-upload__uploads u-text-bold u-margin-bottom-xs">\n <ng-container *ngFor="let file of uploadingFiles; let last = last">\n {{ file.name }}\n <ng-container *ngIf="!last">,</ng-container>\n </ng-container>\n </p>\n <aui-progress-bar [value]="uploadProgress" max="100"></aui-progress-bar>\n </ng-container>\n </div>\n </div>\n\n <small class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </small>\n</div>\n\n<button (click)="triggerFile()" *ngIf="uploader.options.type === \'button\'" [disabled]="disabled" class="a-button m-upload__button"\n type="button">\n <span [id]="ariaId"><ng-content select=".m-upload__button"></ng-content></span>\n <input\n #fileInput\n type="file"\n class="m-upload__input"\n [id]="id"\n [attr.aria-labelledby]="ariaId"\n (change)="updateFiles()"\n (click)="onFileClick($event)">\n</button>\n'}]}],e.ctorParameters=function(){return[{type:t.Renderer2}]},e.propDecorators={fileInput:[{type:t.ViewChild,args:["fileInput",{static:!1}]}],uploader:[{type:t.Input}],disabled:[{type:t.Input}],multiple:[{type:t.Input}],id:[{type:t.Input}],ariaId:[{type:t.Input}],accept:[{type:t.Input}],uploadedFiles:[{type:t.Output}],queuedFiles:[{type:t.Output}],invalidFiles:[{type:t.Output}],onDragOver:[{type:t.HostListener,args:["dragover",["$event"]]}],onDragLeave:[{type:t.HostListener,args:["dragleave",["$event"]]}],onDrop:[{type:t.HostListener,args:["drop",["$event"]]}]},e}();var Y=function(){function e(e){this.initValues=e,this.INVALID_FILE_TYPE="INVALID_FILE_TYPE",this.INVALID_FILE_SIZE="INVALID_FILE_SIZE",this.INVALID_MIME_TYPE="INVALID_MIME_TYPE",e.INVALID_FILE_TYPE&&(this.INVALID_FILE_TYPE=e.INVALID_FILE_TYPE),e.INVALID_FILE_SIZE&&(this.INVALID_FILE_SIZE=e.INVALID_FILE_SIZE),e.INVALID_MIME_TYPE&&(this.INVALID_MIME_TYPE=e.INVALID_MIME_TYPE)}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[U]}]}]},e}();var z=function(){function e(e){this.messagesService=e,this.invalidFiles=[],this.ariaLabelRemove="Verwijder"}return e.prototype.remove=function(e){this.invalidFiles.splice(e,1)},e.prototype.formatReasons=function(e){var t,n,i=[];try{for(var s=m(e),o=s.next();!o.done;o=s.next()){var a=o.value;i.push(this.messagesService[a])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.join(", ")},e.decorators=[{type:t.Component,args:[{selector:"aui-validation-list",template:'<ul class="m-upload__files">\n <li *ngFor="let invalidFile of invalidFiles; let i = index" class="is-error">\n <span class="fa fa-warning"></span>\n <span class="m-upload__filename">{{ invalidFile.file.name }}</span>\n <span class="m-upload__error">{{ formatReasons(invalidFile.reasons) }}</span>\n\n <button (click)="remove(i)" class="m-upload__delete a-button-transparent a-button--danger a-button--small has-icon"\n type="button">\n <span class="fa fa-close">\n <span class="u-screen-reader-only">{{ ariaLabelRemove }}</span>\n </span>\n </button>\n </li>\n</ul>\n'}]}],e.ctorParameters=function(){return[{type:Y}]},e.propDecorators={invalidFiles:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}]},e}();var K={},Z=function(){function e(){}return e.forChild=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[{provide:U,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,h.ProgressBarModule,i.FormsModule],declarations:[B,H,$,j,z],exports:[B,H,$,j,z],providers:[Y,{provide:U,useValue:K}]}]}],e}(),G={bodyClass:"a-input ckeditor-editable-body",contentsCss:["https://cdn.antwerpen.be/core_branding_scss/4.0.0/main.min.css"],extraPlugins:"divarea",find_highlight:{element:"span",styles:{"background-color":"#fffc00",color:"#0064b4"}},format_tags:"p;h1;h2;h3;h4;h5;h6",toolbar_Basic:[["Bold","Italic","Underline","-","Format","-","Source"]],removeButtons:"Styles",removePlugins:"about",toolbar:null,uiColor:"#d8d8d8"},W=function(){function e(){this.setClass=!0,this.basic=!1,this.emitContent=new t.EventEmitter,this.focus=new t.EventEmitter,this.blur=new t.EventEmitter,this.ckeditorConfig=G,this.isDisabled=!1,this.updateModel=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}}return e.prototype.writeValue=function(e){this.ckeditorContent=e,this.updateModel(e),this.emitContent.emit(this.ckeditorContent)},e.prototype.onFocus=function(e){this.focus.emit(e)},e.prototype.onBlur=function(e){this.blur.emit(e)},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){this.setConfig()},e.prototype.setConfig=function(){this.customConfig?this.ckeditorConfig=this.customConfig:(this.basic&&(this.ckeditorConfig.toolbar="Basic"),this.availableTags&&(this.ckeditorConfig.format_tags=this.availableTags),this.uiColour&&(this.ckeditorConfig.uiColor=this.uiColour),this.additionalStyling&&this.ckeditorConfig.contentsCss.concat(this.additionalStyling))},e.decorators=[{type:t.Component,args:[{selector:"aui-wysiwyg",template:'<div class="aui-wysiwyg__inner">\n <ckeditor\n (blur)="onBlur($event)"\n (change)="writeValue($event)"\n (focus)="onFocus($event)"\n [(ngModel)]="ckeditorContent"\n [config]="ckeditorConfig"\n [debounce]="debounce"\n [readonly]="isDisabled"\n ></ckeditor>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host ::ng-deep .cke .cke_chrome{border:1px solid #949494}:host ::ng-deep .cke .cke_top{border-color:#949494}:host ::ng-deep .cke .cke_bottom,:host ::ng-deep .cke .cke_top{background-color:#f3f3f3}:host ::ng-deep .cke .cke_wysiwyg_div{padding:.25rem}:host ::ng-deep .cke.cke_focus .cke_contents{box-shadow:0 0 0 1px #949494,0 0 0 4px #c0dffe;position:relative;z-index:1}"]}]}],e.propDecorators={setClass:[{type:t.HostBinding,args:["class.aui-wysiwyg"]}],additionalStyling:[{type:t.Input}],availableTags:[{type:t.Input}],basic:[{type:t.Input}],uiColour:[{type:t.Input}],customConfig:[{type:t.Input}],debounce:[{type:t.Input}],emitContent:[{type:t.Output}],focus:[{type:t.Output}],blur:[{type:t.Output}]},e}();var Q=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,f.CKEditorModule],declarations:[W],exports:[W]}]}],e}();e.AutoCompleteComponent=_,e.AutoCompleteModule=D,e.DATEPICKER_DATE_MASK="99/99/9999",e.DATEPICKER_DEFAULT_ERROR_LABELS=F,e.DATEPICKER_ERROR_LABELS=E,e.DATEPICKER_SEPARATOR_CHAR="/",e.DatepickerComponent=C,e.DatepickerModule=w,e.MaskDirective=v,e.MaskModule=b,e.RangeSliderComponent=M,e.RangeSliderModule=k,e.SearchFilterComponent=S,e.SearchFilterModule=T,e.TimePickerValidators=N,e.TimepickerComponent=R,e.TimepickerInputSize=O,e.TimepickerModule=P,e.UPLOAD_OPTIONS_DEFAULT=V,e.UPLOAD_VALIDATION_MESSAGES=U,e.UploadComponent=B,e.UploadInputComponent=H,e.UploadModule=Z,e.UploadQueueComponent=$,e.UploadZoneComponent=j,e.Uploader=q,e.ValidationListComponent=z,e.ValidationMessagesService=Y,e.WYSIWYG_DEFAULT_CONFIG=G,e.WysiwygComponent=W,e.WysiwygModule=Q,e.ɵa=I,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@acpaas-ui/ngx-flyout"),require("@acpaas-ui/ngx-selectable-list"),require("inputmask"),require("lodash-es"),require("rxjs"),require("rxjs/operators"),require("@acpaas-ui/js-date-utils"),require("@acpaas-ui/ngx-calendar"),require("@acpaas-ui/ngx-utils"),require("@acpaas-ui/ngx-progress-bar"),require("ng2-ckeditor")):"function"==typeof define&&define.amd?define("@acpaas-ui/ngx-forms",["exports","@angular/core","@angular/common","@angular/forms","@acpaas-ui/ngx-flyout","@acpaas-ui/ngx-selectable-list","inputmask","lodash-es","rxjs","rxjs/operators","@acpaas-ui/js-date-utils","@acpaas-ui/ngx-calendar","@acpaas-ui/ngx-utils","@acpaas-ui/ngx-progress-bar","ng2-ckeditor"],t):t(((e=e||self)["acpaas-ui"]=e["acpaas-ui"]||{},e["acpaas-ui"]["ngx-forms"]={}),e.ng.core,e.ng.common,e.ng.forms,e.flyout,e.selectableList,e.Inputmask,e.lodashEs,e.rxjs,e.rxjs.operators,e.jsDateUtils,e.calendar,e.ngxUtils,e.progressBar,e.ng2Ckeditor)}(this,(function(e,t,n,i,s,o,a,r,l,u,p,c,d,h,f){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function m(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}var v=function(){function e(e){this.ref=e}return e.prototype.ngOnChanges=function(){this.setMask(this.auiMask)},e.prototype.setMask=function(e){a(e).mask(this.ref.nativeElement)},e.decorators=[{type:t.Directive,args:[{selector:"[auiMask]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={auiMask:[{type:t.Input}]},e}();var b=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[v],exports:[v],providers:[]}]}],e}(),I=function(){function e(){this.matchItemWithSearchString=function(e,t){return String(e).toLowerCase().indexOf(t.toLowerCase())>-1}}return e.prototype.search=function(e,t){var n=this;void 0===t&&(t={});var i=t.hasOwnProperty("query")?t.query:"",s=t.hasOwnProperty("minLength")?t.minLength:0,o=t.hasOwnProperty("key")?t.key:"";return!i&&t.showAllByDefault||i.length<s?y(e):y(e).filter((function(e){return o&&!e.hasOwnProperty(o)?console.error('"'+o+'" does not exist in item '+JSON.stringify(e,null,2)):o?n.matchItemWithSearchString(e[o],i):n.matchItemWithSearchString(e,i)}))},e.decorators=[{type:t.Injectable}],e}();var _=function(){function e(e,n){this.ref=e,this.searchService=n,this.results=[],this.data=[],this.remote=!1,this.minCharacters=0,this.mask=null,this.clearInvalid=!1,this.showAllByDefault=!1,this.autoComplete="off",this.search=new t.EventEmitter,this.select=new t.EventEmitter,this.query="",this.index=-1,this.selectedItem=null,this.searching=!1,this.focused=!1,this.isDisabled=!1,this.remoteValue=!1,this.updateModel=function(e){}}return e.prototype.writeValue=function(e){var t=this;if(void 0===e&&(e=""),this.value){var n=this.data.find((function(n){return n[t.value]===e}));if(n)return this.query=n[this.label];this.remote&&e&&(this.remoteValue=!0)}this.query=e},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){Array.isArray(this.data)&&this.data.length>0&&!this.query&&this.showAllByDefault&&(this.results=y(this.data))},e.prototype.ngOnChanges=function(e){if(e){var t=r.get(e,"data.currentValue",[]);r.isEqual(t,r.get(e,"data.previousValue",[]))||(this.remote?this.remoteSearch():this.localSearch()),e.results&&e.results.currentValue&&(this.searching=!1)}},e.prototype.propagateChange=function(e){if(this.query=null!==e?this.label?e[this.label]:e:"",this.select.emit(e),e){var t=this.value?this.value:this.label?this.label:null;this.updateModel(t?e[t]||"":e),this.selectedItem=e}},e.prototype.doSearch=function(){this.index=-1,this.searching=!0,this.remote?this.search.emit(this.query):this.localSearch(),this.openFlyout()},e.prototype.onSelect=function(e){this.propagateChange(e),this.closeFlyout()},e.prototype.onFlyoutClosed=function(){return this.index>=0&&1===this.results.length?this.onSelect(this.results[0]):!this.query&&this.index<0?this.onSelect(null):void(this.clearInvalid&&this.query&&!this.results.length&&this.index<0&&(this.query=this.selectedItem?this.label?this.selectedItem[this.label]:this.selectedItem:""))},e.prototype.onKeyArrowDown=function(){this.index<this.results.length-1&&this.scrollList(1),this.openFlyout()},e.prototype.onKeyArrowUp=function(){this.index>=0&&this.scrollList(-1)},e.prototype.onKeyEnter=function(e){e.preventDefault();var t=this.index>=0?this.results[this.index]:this.query;this.propagateChange(t),this.closeFlyout()},e.prototype.onKeyEscape=function(){this.closeFlyout()},e.prototype.onFocus=function(){this.focused=!0,this.openFlyout()},e.prototype.openFlyout=function(){this.flyout&&this.flyout.open()},e.prototype.closeFlyout=function(){this.flyout&&this.flyout.close(),this.focused=!1},e.prototype.localSearch=function(){this.results=this.searchService.search(this.data,{minLength:this.minCharacters,key:this.label,query:this.query,showAllByDefault:this.showAllByDefault}),1===this.results.length&&this.query===this.results[0][this.label]&&(this.index=0),this.searching=!1},e.prototype.remoteSearch=function(){var e=this;if(this.remoteValue&&this.data){var t=this.data.find((function(t){return e.value?t[e.value]===e.query:t===e.query}));this.query=t?this.label?t[this.label]:t:"",this.remoteValue=!1}},e.prototype.scrollList=function(e){if(this.index+=e,this.flyoutZone){var t=this.flyoutZone.element.getElementsByTagName("li"),n=t[1]?t[1].offsetHeight:t[0].offsetHeight,i=this.flyoutZone.element.offsetHeight/n/2;this.flyoutZone.element.scrollTop=this.index*n-i*n}},e.decorators=[{type:t.Component,args:[{selector:"aui-auto-complete",template:'<div (closed)="onFlyoutClosed()" [toggleClick]="false" aria-haspopup="listbox"\n auiFlyout class="m-flyout--scrollable m-flyout--full o-auto-complete">\n <input (focus)="onFocus()"\n (keyArrowDown)="onKeyArrowDown()"\n (keyArrowUp)="onKeyArrowUp()"\n (keyEnter)="onKeyEnter($event)"\n (keyEscape)="onKeyEscape()"\n [(ngModel)]="query"\n (ngModelChange)="doSearch()"\n *ngIf="!mask"\n [disabled]="isDisabled ? true : null"\n [id]="id"\n [placeholder]="placeholder"\n aria-autocomplete="list"\n auiFlyoutAction\n auiSelectableActions\n [autocomplete]="autoComplete"\n type="text"\n />\n <input (focus)="onFocus()"\n (keyArrowDown)="onKeyArrowDown()"\n (keyArrowUp)="onKeyArrowUp()"\n (keyEnter)="onKeyEnter($event)"\n (keyEscape)="onKeyEscape()"\n [(ngModel)]="query"\n (ngModelChange)="doSearch()"\n *ngIf="mask"\n [auiMask]="mask"\n [disabled]="isDisabled ? true : null"\n [id]="id"\n [placeholder]="placeholder"\n aria-autocomplete="list"\n auiFlyoutAction\n auiSelectableActions\n [autocomplete]="autoComplete"\n type="text"\n />\n\n <div *ngIf="!isDisabled" auiFlyoutZone>\n\t\t<span *ngIf="focused && loadingText && searching" class="o-auto-complete__info u-text-light u-margin-xs">\n\t\t\t<span class="a-spinner a-spinner--inline a-spinner--sm u-margin-right-xs"></span>\n {{ loadingText }}\n\t\t</span>\n <span *ngIf="focused && searchIncentiveText && !searching && !query && !results.length"\n class="o-auto-complete__info u-text-light u-margin-xs">{{ searchIncentiveText }}</span>\n <span *ngIf="focused && noResultsText && !searching && query && !results.length"\n class="o-auto-complete__info u-text-light u-margin-xs">{{ noResultsText }}</span>\n\n <aui-selectable-list (selected)="onSelect($event)" *ngIf="results.length > 0 && !(focused && loadingText && searching)" [index]="index" [itemTemplate]="template"\n [items]="results" [label]="label"\n [search]="query"></aui-selectable-list>\n </div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[".o-auto-complete,.o-auto-complete__info{display:block}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:I}]},e.propDecorators={id:[{type:t.Input}],placeholder:[{type:t.Input}],results:[{type:t.Input}],data:[{type:t.Input}],remote:[{type:t.Input}],minCharacters:[{type:t.Input}],mask:[{type:t.Input}],clearInvalid:[{type:t.Input}],searchIncentiveText:[{type:t.Input}],loadingText:[{type:t.Input}],noResultsText:[{type:t.Input}],showAllByDefault:[{type:t.Input}],autoComplete:[{type:t.Input}],label:[{type:t.Input}],value:[{type:t.Input}],search:[{type:t.Output}],select:[{type:t.Output}],flyout:[{type:t.ViewChild,args:[s.FlyoutDirective,{static:!0}]}],flyoutZone:[{type:t.ViewChild,args:[s.FlyoutZoneDirective,{static:!0}]}],template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]}]},e}();var D=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,s.FlyoutModule,o.SelectableListModule,b],declarations:[_],exports:[_],providers:[I]}]}],e}(),C=new t.InjectionToken("errorLabels"),E={ERRORS_INVALID_DATE:"INVALID_DATE",ERRORS_INVALID_RANGE:"INVALID_RANGE"},F=function(){function e(e,n,i,s,o,a){void 0===e&&(e=c.CALENDAR_DEFAULT_MONTH_LABELS),void 0===n&&(n=c.CALENDAR_DEFAULT_WEEKDAY_LABELS),void 0===i&&(i=E),this.monthLabels=e,this.weekdayLabels=n,this.errorLabels=i,this.calendarService=s,this.formBuilder=o,this.ref=a,this.placeholder="dd/mm/yyyy",this.blur=new t.EventEmitter,this.dateMask={mask:"99/99/9999",showMaskOnHover:!1},this.isDisabled=!1,this.componentDestroyed$=new l.Subject,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){var e=this;this.createInterval(),this.formControl=this.formBuilder.control({value:"",disabled:this.isDisabled}),this.formControl.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){if(t){var n=t.split("/").reverse().join("-"),i=p.DateHelper.parseDate(n,"YYYY-MM-DD",!0);i?(e.selectedDate=i,e.onChange(i.toISOString())):e.onChange(t)}else e.selectedDate=null,e.onChange("")}))},e.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(!0),this.componentDestroyed$.complete()},e.prototype.createInterval=function(){(this.min||this.max)&&(this.interval=d.IntervalBuilder.dateInterval(this.min?new Date(this.min):null,this.max?new Date(this.max):null).not().build())},e.prototype.writeValue=function(e){this.selectedDate="string"==typeof e?this.isISODateFormat(e)?new Date(e):p.DateHelper.parseDate(e,"DD/MM/YYYY",!0):e;var t=this.selectedDate?this.formatDate(this.selectedDate):"";this.formControl.setValue(t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.isDisabled=e,this.formControl&&(e&&this.formControl.enabled?this.formControl.disable():!e&&this.formControl.disabled&&this.formControl.enable()),this.ref.markForCheck()},e.prototype.selectDateFromCalendar=function(e){e.complete&&(this.formControl.setValue(this.formatDate(e.date)),this.flyout.close())},e.prototype.formatDate=function(e){return p.DateHelper.formatDate(e,"DD/MM/YYYY",{leadingZero:!0,monthLabels:this.monthLabels,weekdayLabels:this.weekdayLabels})},e.prototype.validate=function(e){if(""===e.value||null===e.value)return null;var t=p.DateHelper.parseDate(e.value);return t?this.range&&this.range.length&&this.calendarService.getRangeForDate(t,this.range).indexOf(t.getDate())>=0?{range:this.errorLabels.ERRORS_INVALID_RANGE}:null:{format:this.errorLabels.ERRORS_INVALID_DATE}},e.prototype.handleBlur=function(e){this.blur.emit(e),this.onTouched(e)},e.prototype.isISODateFormat=function(e){return"string"==typeof e&&e.match(/\d{4}-\d{2}-\d{2}T.*/)},e.decorators=[{type:t.Component,args:[{selector:"aui-datepicker",template:'<div aria-haspopup="grid" auiFlyout class="aui-datepicker a-input__wrapper">\n <input\n (blur)="handleBlur($event)"\n [attr.disabled]="isDisabled ? true : null"\n [auiMask]="dateMask.mask"\n [autocomplete]="autocomplete"\n [formControl]="formControl"\n id="{{ id }}"\n name="{{ name }}"\n placeholder="{{ placeholder }}"\n type="text"\n >\n <span *ngIf="isDisabled" class="fa fa-calendar"></span>\n\n <ng-container *ngIf="!isDisabled">\n <span [openOnFocus]="false" auiFlyoutAction class="fa fa-calendar is-clickable"></span>\n </ng-container>\n\n <ng-container *ngIf="!isDisabled">\n <div auiFlyoutZone class="m-datepicker m-datepicker--fixed" role="dialog">\n <aui-calendar (selectDate)="selectDateFromCalendar($event)" [range]="range"\n [selectedDate]="selectedDate" [interval]="interval"></aui-calendar>\n </div>\n </ng-container>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[".aui-datepicker,:host{display:block}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c.CALENDAR_MONTH_LABELS]}]},{type:void 0,decorators:[{type:t.Inject,args:[c.CALENDAR_WEEKDAY_LABELS]}]},{type:void 0,decorators:[{type:t.Inject,args:[C]}]},{type:c.CalendarService},{type:i.FormBuilder},{type:t.ChangeDetectorRef}]},e.propDecorators={flyout:[{type:t.ViewChild,args:[s.FlyoutDirective,{static:!0}]}],id:[{type:t.Input}],name:[{type:t.Input}],placeholder:[{type:t.Input}],range:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],autocomplete:[{type:t.Input}],blur:[{type:t.Output}]},e}();var A=c.CALENDAR_DEFAULT_WEEKDAY_LABELS,L=c.CALENDAR_DEFAULT_MONTH_LABELS,x=E,w=function(){function e(){}return e.forChild=function(t,n,i){return{ngModule:e,providers:[{provide:c.CALENDAR_WEEKDAY_LABELS,useValue:t},{provide:c.CALENDAR_MONTH_LABELS,useValue:n},{provide:C,useValue:i}]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,c.CalendarModule,s.FlyoutModule,b],declarations:[F],exports:[F],providers:[{provide:c.CALENDAR_WEEKDAY_LABELS,useValue:A},{provide:c.CALENDAR_MONTH_LABELS,useValue:L},{provide:C,useValue:x}]}]}],e}(),M=function(){function e(e){this.elRef=e,this.coreBranding=!0,this.min=0,this.max=100,this.minimalDistance=1,this.step=0,this.labelBefore="",this.labelAfter="",this.start=0,this.end=!1,this.steps=[],this.active=null,this.isDisabled=!1,this.hasFocus=!1,this.click=!1,this.propagateChange=function(e){}}return Object.defineProperty(e.prototype,"disabledClass",{get:function(){return this.isDisabled},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){if(this.step>0)for(var e=0;e<=this.max;e+=Number(this.step))this.steps.push(e);this.startPercentage=this.startToPercentage(),this.end&&(this.endPercentage=this.endToPercentage())},e.prototype.writeValue=function(e){e&&e.start?this.start=e.start:isNaN(e)||""===e?this.setStart(Number(this.min)):this.start=Number(e),this.startPercentage=this.startToPercentage(),e&&e.end&&(this.end=e.end,this.endPercentage=this.endToPercentage())},e.prototype.registerOnTouched=function(){},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.onMouseDown=function(e){this.isDisabled||(this.hasFocus=!0,this.active=e)},e.prototype.toggleFocus=function(e,t,n){this.isDisabled||(n.preventDefault(),this.hasFocus=e,this.active=t)},e.prototype.onKeyDown=function(e){var t=this;if(this.hasFocus){var n=e.keyCode,i={end:35,home:36,left:37,up:38,right:39,down:40};if(-1!==Object.keys(i).map((function(e){return i[e]})).indexOf(n)){var s=this.minimalDistance;this.step>0&&(s=Number(this.step));var o=function(e){var n="start"===t.active?t.start:Number(t.end);"up"===e?n+=s:n-=s;var i=(n-t.min)/(t.max-t.min)*100;return i>100&&(i=100),i<0&&(i=0),i};switch(n){case i.right:case i.up:this.updateHandle(o("up")),e.preventDefault();break;case i.left:case i.down:this.updateHandle(o("down")),e.preventDefault();break;case i.end:this.updateHandle(100),e.preventDefault();break;case i.home:this.updateHandle(0),e.preventDefault()}}}},e.prototype.onMouseUp=function(e){"start"===this.active&&(this.setStart(this.round(this.start,this.step,0)),this.startPercentage=this.startToPercentage()),"end"===this.active&&(this.setEnd(this.round(this.end,this.step,0)),this.endPercentage=this.endToPercentage()),this.click=!1},e.prototype.mouseDown=function(e){this.click=!0},e.prototype.onMouseMove=function(e){if(this.active&&this.click){e.preventDefault();var t=void 0!==e.x?e.x:e.targetTouches[0].pageX,n=this.elRef.nativeElement.getBoundingClientRect(),i=this.calcPercentage(t,n.width,n.left);this.updateHandle(i)}},e.prototype.updateHandle=function(e){"start"===this.active&&(this.startPercentage=e,this.setStart(this.percentageToStart()),this.minimalDistanceNotRespected()&&(this.setStart(Number(this.end)-Number(this.minimalDistance)),this.startPercentage=this.startToPercentage())),"end"===this.active&&this.endPercentage&&(this.endPercentage=e,this.setEnd(this.percentageToEnd()),this.minimalDistanceNotRespected()&&(this.setEnd(Number(this.start)+Number(this.minimalDistance)),this.endPercentage=this.endToPercentage()))},e.prototype.setStart=function(e){this.start=e,this.end?this.propagateChange({start:this.start,end:this.end}):this.propagateChange(this.start)},e.prototype.setEnd=function(e){this.end=e,this.propagateChange({start:this.start,end:this.end})},e.prototype.round=function(e,t,n){return t>0?Math.round((e-n)/t)*t+n:e},e.prototype.startToPercentage=function(){return Math.round((this.start-this.min)/(this.max-this.min)*100)},e.prototype.percentageToStart=function(){return Math.round(this.startPercentage/100*(this.max-this.min)+Number(this.min))},e.prototype.endToPercentage=function(){return Math.round((Number(this.end)-this.min)/(this.max-this.min)*100)},e.prototype.percentageToEnd=function(){return Math.round(this.endPercentage/100*(this.max-this.min)+Number(this.min))},e.prototype.minimalDistanceNotRespected=function(){return this.minimalDistance>=0&&this.end&&this.start>Number(this.end)-this.minimalDistance},e.prototype.calcPercentage=function(e,t,n){var i=e-n,s=Math.round(i/t*100);return s>100&&(s=100),s<0&&(s=0),s},e.decorators=[{type:t.Component,args:[{selector:"aui-range-slider",template:'<div class="m-range-slider__inner">\n <div\n [style.left]="endPercentage ? startPercentage + \'%\' : false"\n [style.width]="endPercentage ? endPercentage - startPercentage + \'%\' : startPercentage + \'%\'"\n class="m-range-slider__bar"\n ></div>\n <span\n (blur)="toggleFocus(false, null, $event)"\n (dragexit)="onMouseUp($event)"\n (focus)="toggleFocus(true, \'start\', $event)"\n (mousedown)="onMouseDown(\'start\')"\n (touchstart)="onMouseDown(\'start\')"\n [style.left]="startPercentage + \'%\'"\n class="m-range-slider__handle"\n tabindex="0"\n >\n\t\t<div class="m-range-slider__tooltip a-tooltip a-tooltip--primary a-tooltip--top">\n\t\t\t<p>{{ labelBefore }}{{ start }}{{ labelAfter }}</p>\n\t\t</div>\n\t</span>\n\n <span\n (blur)="toggleFocus(false, null, $event)"\n (dragexit)="onMouseUp($event)"\n (focus)="toggleFocus(true, \'end\', $event)"\n (mousedown)="onMouseDown(\'end\')"\n (touchstart)="onMouseDown(\'end\')"\n *ngIf="end"\n [style.left]="endPercentage + \'%\'"\n class="m-range-slider__handle"\n name="m-range-slider__handle__end"\n tabindex="0"\n >\n\t\t<div class="m-range-slider__tooltip a-tooltip a-tooltip--primary a-tooltip--top">\n\t\t\t<p>{{ labelBefore }}{{ end }}{{ labelAfter }}</p>\n\t\t</div>\n\t</span>\n</div>\n\n<div class="m-range-slider__steps">\n <div *ngFor="let step of steps; let i = index" class="m-range-slider__step"></div>\n</div>\n\n<div class="m-range-slider__step-labels">\n <div *ngFor="let step of steps; let i = index" class="m-range-slider__step">{{ step }}</div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host{display:block;position:relative}:host.is-disabled{cursor:not-allowed}:host.is-disabled .m-range-slider__handle:hover{cursor:not-allowed}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={coreBranding:[{type:t.HostBinding,args:["class.m-range-slider"]}],min:[{type:t.Input}],max:[{type:t.Input}],minimalDistance:[{type:t.Input}],step:[{type:t.Input}],labelBefore:[{type:t.Input}],labelAfter:[{type:t.Input}],disabledClass:[{type:t.HostBinding,args:["class.is-disabled"]}],onKeyDown:[{type:t.HostListener,args:["document:keydown",["$event"]]}],onMouseUp:[{type:t.HostListener,args:["touchend",["$event"]]},{type:t.HostListener,args:["mouseup",["$event"]]}],mouseDown:[{type:t.HostListener,args:["touchstart",["$event"]]},{type:t.HostListener,args:["mousedown",["$event"]]}],onMouseMove:[{type:t.HostListener,args:["touchmove",["$event"]]},{type:t.HostListener,args:["mousemove",["$event"]]}]},e}();var k=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule],declarations:[M],exports:[M]}]}],e}(),S=function(){function e(){this.flyoutSize=s.FlyoutSize.Small,this.label="Filter",this.labelDeselect="Alles deselecteren",this.labelResults="Resultaten",this.labelNoResults="Geen resultaten gevonden.",this.choices=[],this.placeholder="Zoeken",this.inputDelay=150,this.showAllByDefault=!1,this.size="default",this.search=new t.EventEmitter,this.query="",this.selectedItems=[],this.filteredChoices=[],this.loading=!1,this.isDisabled=!1,this.updateModel=function(){},this.filterDataFromSearch=r.debounce(this.filterData.bind(this),this.inputDelay)}return e.prototype.writeValue=function(e){this.selectedItems=Array.isArray(e)?e:[]},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){this.showAllByDefault&&this.filterData()},e.prototype.ngOnChanges=function(e){var t=r.get(e,"choices.currentValue",null);t&&(this.remote?(this.filteredChoices=y(t),this.loading=!1):this.filterData())},e.prototype.filterData=function(){if(this.remote)return this.loading=!0,this.search.emit(this.query);this.filterChoices()},e.prototype.clear=function(){this.selectedItems=[],this.query="",this.filterData(),this.updateModel(this.selectedItems)},e.prototype.toggleSelected=function(e){var t=this.selectedItems.indexOf(e);this.selectedItems=t<0?this.selectedItems.concat(e):y(this.selectedItems.slice(0,t),this.selectedItems.slice(t+1)),this.updateModel(this.selectedItems)},e.prototype.filterChoices=function(){var e=this;this.filteredChoices=this.choices.filter((function(t){return e.selectedItems.indexOf(t.value)<0&&t.label.toLowerCase().indexOf(e.query.toLowerCase())>=0}))},e.decorators=[{type:t.Component,args:[{selector:"aui-search-filter",template:'<div [align]="flyoutAlign" [size]="flyoutSize" auiFlyout class="m-search-filter">\n <button class="has-icon-right a-button--default" [attr.disabled]="isDisabled ? \'true\' : null" aria-haspopup=”true”\n auiFlyoutAction\n [ngClass]="{\n \'a-button\' : selectedItems.length,\n \'a-button-outline\' : !selectedItems.length,\n \'a-button--large\' : size === \'large\',\n \'a-button--small\': size === \'small\',\n \'a-button--tiny\' : size === \'tiny\'\n }">\n <span id="{{ id + \'-label\' }}">{{ label }}</span>\n <span *ngIf="selectedItems.length">({{ selectedItems.length }})</span>\n <span class="fa fa-angle-down"></span>\n </button>\n\n <div auiFlyoutZone class="m-search-filter__search m-search-filter__search--scroll">\n <div *ngIf="!isDisabled" class="m-search-filter__input a-input has-icon-right">\n <div class="a-input__wrapper">\n <input (input)="filterDataFromSearch()" [(ngModel)]="query" [attr.aria-labelledby]="id + \'-label\'"\n [attr.placeholder]="placeholder"\n aria-autocomplete="list" id="{{ id + \'-search\' }}" name="{{ name + \'-search\' }}"\n type="text">\n <span class="fa fa-search"></span>\n </div>\n </div>\n\n <div *ngIf="!isDisabled && selectedItems.length > 0" class="m-search-filter__clear">\n <button (click)="clear()" class="a-button-outline a-button--small a-button--danger has-icon-left" type="button">\n <span class="fa fa-close"></span>\n {{ labelDeselect }}\n </button>\n </div>\n\n <p *ngIf="labelResults" class="h6 m-search-filter__results-title">{{ labelResults }}</p>\n <div *ngIf="loading" class="u-text-center u-padding a-spinner"></div>\n <ul *ngIf="!loading" class="a-list a-list--lined a-list--unstyled">\n <li *ngIf="!filteredChoices.length" class="m-search-filter__results-item a-list__item">\n <p class="u-margin-xs">{{ labelNoResults }}</p>\n </li>\n <li *ngFor="let choice of filteredChoices; index as i" class="m-search-filter__results-item a-list__item">\n <div class="a-input__checkbox">\n <input\n (change)="toggleSelected(choice.value)"\n [attr.disabled]="isDisabled ? true : null"\n [checked]="selectedItems.indexOf(choice.value) >= 0"\n id="{{ \'checkbox--\' + i + \'--\' + id }}"\n name="{{ \'checkbox--\' + i + \'--\' + id }}"\n type="checkbox"\n />\n <label for="{{ \'checkbox--\' + i + \'--\' + id }}">{{ choice.label }}</label>\n </div>\n </li>\n </ul>\n </div>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}]}]}],e.ctorParameters=function(){return[]},e.propDecorators={id:[{type:t.Input}],name:[{type:t.Input}],flyoutSize:[{type:t.Input}],flyoutAlign:[{type:t.Input}],label:[{type:t.Input}],labelDeselect:[{type:t.Input}],labelResults:[{type:t.Input}],labelNoResults:[{type:t.Input}],choices:[{type:t.Input}],remote:[{type:t.Input}],placeholder:[{type:t.Input}],inputDelay:[{type:t.Input}],showAllByDefault:[{type:t.Input}],size:[{type:t.Input}],search:[{type:t.Output}]},e}();var T=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.FormsModule,n.CommonModule,s.FlyoutModule],declarations:[S],exports:[S]}]}],e}(),N=function(){function e(){}return e.minTime=function(e){return function(t){var n=t.value.split(":"),i=parseInt(n[0],10),s=parseInt(n[1],10),o=e.split(":"),a=parseInt(o[0],10),r=parseInt(o[1],10);return isNaN(i)||isNaN(s)||isNaN(a)||isNaN(r)?null:a<i?null:a===i&&r<=s?null:{minTime:{value:t.value}}}},e.maxTime=function(e){return function(t){var n=t.value.split(":"),i=parseInt(n[0],10),s=parseInt(n[1],10),o=e.split(":"),a=parseInt(o[0],10),r=parseInt(o[1],10);return isNaN(i)||isNaN(s)||isNaN(a)||isNaN(r)?null:a>i?null:a===i&&r>=s?null:{maxTime:{value:t.value}}}},e}(),O={Auto:"auto",Small:"small",Large:"large"},R=function(){function e(e,t){this.formBuilder=e,this.renderer=t,this.id="aui-timepicker-"+Math.random().toString(36).substring(2),this.hoursPlaceholder="uu",this.minutesPlaceholder="mm",this.hasError=!1,this.size=O.Auto,this.ariaLabelHours="Uur",this.ariaLabelMinutes="Minuten",this.shouldUseFallback=!1,this.minutes=[],this.hours=[],this.timeControl=new i.FormControl,this.componentDestroyed$=new l.Subject}return e.prototype.ngOnInit=function(){var e=this;this.shouldUseFallback=this.supportsNativeTimepicker(),this.minutes=this.getMinutes(),this.hours=this.getHours(),this.fallbackForm=this.formBuilder.group({hours:null,minutes:null}),this.fallbackForm.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){t.hours&&t.minutes?e.updateModel(t.hours+":"+t.minutes):e.updateModel("")})),this.timeControl.valueChanges.pipe(u.takeUntil(this.componentDestroyed$)).subscribe((function(t){e.updateModel(t)}))},e.prototype.ngOnDestroy=function(){this.componentDestroyed$.next(!0),this.componentDestroyed$.complete()},e.prototype.writeValue=function(e){if(this.timeControl.setValue(e,{emitEvent:!1}),e){var t=e.split(":");this.fallbackForm.get("hours").setValue(t[0],{emitEvent:!1}),this.fallbackForm.get("minutes").setValue(t[1],{emitEvent:!1})}},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){e?(this.timeControl.disable({emitEvent:!1}),this.fallbackForm.disable({emitEvent:!1})):(this.timeControl.enable({emitEvent:!1}),this.fallbackForm.enable({emitEvent:!1}))},e.prototype.supportsNativeTimepicker=function(){var e=this.renderer.createElement("input");return e.type="time","text"===e.type},e.prototype.getMinutes=function(){return Array(60).fill("").map((function(e,t){return p.DateHelper.addLeadingZero(t)}))},e.prototype.getHours=function(){return Array(24).fill("").map((function(e,t){return p.DateHelper.addLeadingZero(t)}))},e.decorators=[{type:t.Component,args:[{selector:"aui-timepicker",template:'<div class="m-timepicker">\n <div *ngIf="!shouldUseFallback" [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input">\n <input [attr.aria-label]="ariaLabelHours + \':\' + ariaLabelMinutes" [formControl]="timeControl" [id]="id"\n type="time">\n </div>\n\n <div *ngIf="shouldUseFallback" [formGroup]="fallbackForm">\n <div [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input has-icon-right">\n <div class="a-input__wrapper">\n <select [attr.aria-label]="ariaLabelHours" [id]="id" formControlName="hours">\n <option disabled value="null">{{ hoursPlaceholder }}</option>\n <option *ngFor="let hour of hours" [value]="hour">{{ hour }}</option>\n </select>\n <span class="fa fa-angle-down"></span>\n </div>\n </div>\n\n <div [class]="\'a-input--\' + size" [ngClass]="{ \'has-error\': hasError }" class="a-input has-icon-right">\n <div class="a-input__wrapper">\n <select [attr.aria-label]="ariaLabelMinutes" formControlName="minutes">\n <option disabled value="null">{{ minutesPlaceholder }}</option>\n <option *ngFor="let minute of minutes" [value]="minute">{{ minute }}</option>\n </select>\n <span class="fa fa-angle-down"></span>\n </div>\n </div>\n </div>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host{display:block}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder},{type:t.Renderer2}]},e.propDecorators={id:[{type:t.Input}],hoursPlaceholder:[{type:t.Input}],minutesPlaceholder:[{type:t.Input}],hasError:[{type:t.Input}],size:[{type:t.Input}],ariaLabelHours:[{type:t.Input}],ariaLabelMinutes:[{type:t.Input}]},e}();var P=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.ReactiveFormsModule,n.CommonModule],declarations:[R],exports:[R],providers:[]}]}],e}(),V={allowedMimeTypes:[],allowedFileTypes:[],autoUpload:!1,maxFileSize:0,queueLimit:0,type:"drop",url:""},U=new t.InjectionToken("uploadValidationMessages"),q=function(){function e(e){this.options=V,this.setOptions(e)}return e.prototype.setOptions=function(e){this.options=Object.assign({},this.options,e)},e.prototype.uploadFiles=function(e){var t=this,n=this.filesToFormData(e);return new l.Observable((function(e){var i=new XMLHttpRequest;i.upload.addEventListener("progress",(function(t){if(t.lengthComputable){var n=t.loaded/t.total;e.next({progress:n,data:null})}})),i.onload=function(){e.next({progress:1,data:i.response})},i.responseType="json",i.open("post",t.options.url),i.send(n)}))},e.prototype.validateFiles=function(e){var t,n,i=[],s=[];if(e.length>0)try{for(var o=m(e),a=o.next();!a.done;a=o.next()){var r=a.value,l=[];this.validateFileType(r)||l.push("INVALID_FILE_TYPE"),this.validateFileSize(r)||l.push("INVALID_FILE_SIZE"),this.validateMimeType(r)||l.push("INVALID_MIME_TYPE"),0===l.length?i.push(r):s.push({reasons:l,file:r})}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return{validFiles:i,invalidFiles:s}},e.prototype.filesToFormData=function(e){var t,n,i=new FormData;if(!this.options.url||""===this.options.url)throw new Error("Define the upload url.");try{for(var s=m(e),o=s.next();!o.done;o=s.next()){var a=o.value;i.append("file",a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},e.prototype.getFileExtension=function(e){return e.name.split(".")[e.name.split(".").length-1]},e.prototype.validateFileType=function(e){var t=this.options.allowedFileTypes,n=this.getFileExtension(e);if(!Array.isArray(t)||0===t.length)return!0;return-1!==t.map((function(e){return e.toUpperCase()})).lastIndexOf(n.toUpperCase())},e.prototype.validateFileSize=function(e){var t=this.options.maxFileSize;return!t||0===t||t>e.size},e.prototype.validateMimeType=function(e){var t=this.options.allowedMimeTypes;return!Array.isArray(t)||0===t.length||-1!==t.lastIndexOf(e.type)},e}();var B=function(){function e(){this.id="",this.accept=[],this.ariaLabelRemove="Verwijder",this.disabled=!1,this.multiple=!0,this.options=V,this.selectUploadedFiles=new t.EventEmitter,this.uploadedFiles=[],this.invalidFiles=[],this.queuedFiles=[]}return e.prototype.ngOnInit=function(){this.id||(this.ariaId="aui-upload-"+Math.random().toString(36).substring(2)),this.uploader=new q(this.options)},e.prototype.onUploadedFiles=function(e){this.uploadedFiles=this.uploadedFiles.concat(e),this.selectUploadedFiles.emit(this.uploadedFiles)},e.prototype.onInvalidFiles=function(e){this.invalidFiles=e},e.prototype.onQueuedFiles=function(e){this.queuedFiles=this.queuedFiles.concat(e)},e.decorators=[{type:t.Component,args:[{selector:"aui-upload",template:'<div class="m-upload aui-upload">\n <aui-upload-zone (invalidFiles)="onInvalidFiles($event)" (queuedFiles)="onQueuedFiles($event)" (uploadedFiles)="onUploadedFiles($event)" [ariaId]="ariaId"\n [disabled]="disabled" [id]="id" [accept]="accept" [multiple]="multiple"\n [uploader]="uploader">\n <div class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </div>\n <div class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </div>\n <div class="m-upload__button">\n <ng-content select=".m-upload__button"></ng-content>\n </div>\n </aui-upload-zone>\n <aui-validation-list [ariaLabelRemove]="ariaLabelRemove" [invalidFiles]="invalidFiles"></aui-validation-list>\n <aui-upload-queue (uploadedFiles)="onUploadedFiles($event)" *ngIf="!options?.autoUpload" [ariaLabelRemove]="ariaLabelRemove"\n [files]="queuedFiles" [uploader]="uploader"></aui-upload-queue>\n</div>\n',styles:[".m-upload__button>.m-upload__input{display:none}"]}]}],e.propDecorators={id:[{type:t.Input}],accept:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}],disabled:[{type:t.Input}],multiple:[{type:t.Input}],options:[{type:t.Input}],selectUploadedFiles:[{type:t.Output}]},e}();var H=function(){function e(){this.propagateChange=function(e){}}return e.prototype.writeValue=function(e){},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(){},e.prototype.onUpload=function(e){var t=this.format?this.format(e):e;this.propagateChange(t)},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-input",template:'<aui-upload (selectUploadedFiles)="onUpload($event)" [options]="options">\n <div class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </div>\n <div class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </div>\n <div class="m-upload__button">\n <ng-content select=".m-upload__button"></ng-content>\n </div>\n</aui-upload>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:e,multi:!0}]}]}],e.propDecorators={options:[{type:t.Input}],format:[{type:t.Input}]},e}();var $=function(){function e(){this.ariaLabelRemove="Verwijder",this.uploadedFiles=new t.EventEmitter,this.uploadProgress=0}return e.prototype.remove=function(e){this.files.splice(e,1)},e.prototype.uploadFiles=function(){var e=this;this.uploader.uploadFiles(this.files).subscribe((function(t){t.progress&&(e.uploadProgress=Math.floor(100*t.progress)),t.data&&(e.uploadedFiles.emit(t.data),e.files=[])}))},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-queue",template:'<ul class="m-upload__files u-margin-bottom-xs">\n <li *ngFor="let file of files; let i = index">\n <span class="fa fa-file-o"></span>\n <span class="m-upload__filename">{{ file.name }}</span>\n\n <button (click)="remove(i)" class="m-upload__delete a-button-transparent a-button--default a-button--small has-icon"\n type="button">\n <span class="fa fa-close">\n <span class="u-screen-reader-only">{{ ariaLabelRemove }}</span>\n </span>\n </button>\n </li>\n</ul>\n\n<button (click)="uploadFiles()" *ngIf="files.length > 0" class="a-button" type="button">Upload</button>\n'}]}],e.propDecorators={files:[{type:t.Input}],uploader:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}],uploadedFiles:[{type:t.Output}]},e}();var j=function(){function e(e){this.renderer=e,this.disabled=!1,this.multiple=!0,this.id="",this.ariaId="",this.accept=[],this.uploadedFiles=new t.EventEmitter,this.queuedFiles=new t.EventEmitter,this.invalidFiles=new t.EventEmitter,this.hasDragOver=!1,this.uploadProgress=0}return e.prototype.onDragOver=function(e){this.preventAndStop(e),this.hasDragOver=!0},e.prototype.onDragLeave=function(e){this.preventAndStop(e),this.hasDragOver=!1},e.prototype.onDrop=function(e){this.preventAndStop(e),this.hasDragOver=!1;var t=this.fileListToArray(e.dataTransfer.files);this.handleFiles(t)},e.prototype.triggerFile=function(){this.fileInput.nativeElement.click()},e.prototype.updateFiles=function(){var e=this.fileListToArray(this.fileInput.nativeElement.files);this.handleFiles(e)},e.prototype.onFileClick=function(e){e.target.value=""},e.prototype.ngAfterViewInit=function(){!1!==this.multiple&&this.renderer.setProperty(this.fileInput.nativeElement,"multiple","multiple"),this.accept&&this.renderer.setProperty(this.fileInput.nativeElement,"accept",this.accept.join()),this.disabled&&this.renderer.setProperty(this.fileInput.nativeElement,"disabled","disabled")},e.prototype.handleFiles=function(e){var t=this.uploader.validateFiles(e);this.invalidFiles.emit(t.invalidFiles),this.uploader.options.autoUpload&&t.validFiles.length>0?this.uploadFiles(t.validFiles):this.queuedFiles.emit(t.validFiles)},e.prototype.uploadFiles=function(e){var t=this;this.uploadProgress=0,this.uploadingFiles=e,this.uploader.uploadFiles(e).subscribe((function(e){e.progress&&(t.uploadProgress=Math.floor(100*e.progress)),e.data&&t.uploadedFiles.emit(e.data)}),(function(e){console.log(e)}))},e.prototype.fileListToArray=function(e){return Array.from(e)},e.prototype.preventAndStop=function(e){e.preventDefault(),e.stopPropagation()},e.decorators=[{type:t.Component,args:[{selector:"aui-upload-zone",template:'<div *ngIf="uploader.options.type === \'drop\'" [class.is-disabled]="disabled" class="m-upload">\n <div class="m-upload__inner">\n <div class="m-upload__dropzone">\n\n <input\n #fileInput\n type="file"\n class="m-upload__input"\n [id]="id"\n [attr.aria-labelledby]="ariaId"\n (change)="updateFiles()"\n (click)="onFileClick($event)">\n\n <div *ngIf="!uploadProgress || uploadProgress === 0" class="m-upload__content">\n <p [id]="ariaId" class="m-upload__message">\n <ng-content select=".m-upload__message"></ng-content>\n </p>\n </div>\n\n <ng-container *ngIf="uploadProgress > 0">\n <p class="m-upload__uploads u-text-bold u-margin-bottom-xs">\n <ng-container *ngFor="let file of uploadingFiles; let last = last">\n {{ file.name }}\n <ng-container *ngIf="!last">,</ng-container>\n </ng-container>\n </p>\n <aui-progress-bar [value]="uploadProgress" max="100"></aui-progress-bar>\n </ng-container>\n </div>\n </div>\n\n <small class="m-upload__description">\n <ng-content select=".m-upload__description"></ng-content>\n </small>\n</div>\n\n<button (click)="triggerFile()" *ngIf="uploader.options.type === \'button\'" [disabled]="disabled" class="a-button m-upload__button"\n type="button">\n <span [id]="ariaId"><ng-content select=".m-upload__button"></ng-content></span>\n <input\n #fileInput\n type="file"\n class="m-upload__input"\n [id]="id"\n [attr.aria-labelledby]="ariaId"\n (change)="updateFiles()"\n (click)="onFileClick($event)">\n</button>\n'}]}],e.ctorParameters=function(){return[{type:t.Renderer2}]},e.propDecorators={fileInput:[{type:t.ViewChild,args:["fileInput",{static:!1}]}],uploader:[{type:t.Input}],disabled:[{type:t.Input}],multiple:[{type:t.Input}],id:[{type:t.Input}],ariaId:[{type:t.Input}],accept:[{type:t.Input}],uploadedFiles:[{type:t.Output}],queuedFiles:[{type:t.Output}],invalidFiles:[{type:t.Output}],onDragOver:[{type:t.HostListener,args:["dragover",["$event"]]}],onDragLeave:[{type:t.HostListener,args:["dragleave",["$event"]]}],onDrop:[{type:t.HostListener,args:["drop",["$event"]]}]},e}();var Y=function(){function e(e){this.initValues=e,this.INVALID_FILE_TYPE="INVALID_FILE_TYPE",this.INVALID_FILE_SIZE="INVALID_FILE_SIZE",this.INVALID_MIME_TYPE="INVALID_MIME_TYPE",e.INVALID_FILE_TYPE&&(this.INVALID_FILE_TYPE=e.INVALID_FILE_TYPE),e.INVALID_FILE_SIZE&&(this.INVALID_FILE_SIZE=e.INVALID_FILE_SIZE),e.INVALID_MIME_TYPE&&(this.INVALID_MIME_TYPE=e.INVALID_MIME_TYPE)}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[U]}]}]},e}();var z=function(){function e(e){this.messagesService=e,this.invalidFiles=[],this.ariaLabelRemove="Verwijder"}return e.prototype.remove=function(e){this.invalidFiles.splice(e,1)},e.prototype.formatReasons=function(e){var t,n,i=[];try{for(var s=m(e),o=s.next();!o.done;o=s.next()){var a=o.value;i.push(this.messagesService[a])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.join(", ")},e.decorators=[{type:t.Component,args:[{selector:"aui-validation-list",template:'<ul class="m-upload__files">\n <li *ngFor="let invalidFile of invalidFiles; let i = index" class="is-error">\n <span class="fa fa-warning"></span>\n <span class="m-upload__filename">{{ invalidFile.file.name }}</span>\n <span class="m-upload__error">{{ formatReasons(invalidFile.reasons) }}</span>\n\n <button (click)="remove(i)" class="m-upload__delete a-button-transparent a-button--danger a-button--small has-icon"\n type="button">\n <span class="fa fa-close">\n <span class="u-screen-reader-only">{{ ariaLabelRemove }}</span>\n </span>\n </button>\n </li>\n</ul>\n'}]}],e.ctorParameters=function(){return[{type:Y}]},e.propDecorators={invalidFiles:[{type:t.Input}],ariaLabelRemove:[{type:t.Input}]},e}();var K={},Z=function(){function e(){}return e.forChild=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[{provide:U,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,h.ProgressBarModule,i.FormsModule],declarations:[B,H,$,j,z],exports:[B,H,$,j,z],providers:[Y,{provide:U,useValue:K}]}]}],e}(),G={bodyClass:"a-input ckeditor-editable-body",contentsCss:["https://cdn.antwerpen.be/core_branding_scss/4.0.0/main.min.css"],extraPlugins:"divarea",find_highlight:{element:"span",styles:{"background-color":"#fffc00",color:"#0064b4"}},format_tags:"p;h1;h2;h3;h4;h5;h6",toolbar_Basic:[["Bold","Italic","Underline","-","Format","-","Source"]],removeButtons:"Styles",removePlugins:"about",toolbar:null,uiColor:"#d8d8d8"},W=function(){function e(){this.setClass=!0,this.basic=!1,this.emitContent=new t.EventEmitter,this.focus=new t.EventEmitter,this.blur=new t.EventEmitter,this.ckeditorConfig=G,this.isDisabled=!1,this.updateModel=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}}return e.prototype.writeValue=function(e){this.ckeditorContent=e,this.updateModel(e),this.emitContent.emit(this.ckeditorContent)},e.prototype.onFocus=function(e){this.focus.emit(e)},e.prototype.onBlur=function(e){this.blur.emit(e)},e.prototype.registerOnChange=function(e){this.updateModel=e},e.prototype.registerOnTouched=function(){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.ngOnInit=function(){this.setConfig()},e.prototype.setConfig=function(){this.customConfig?this.ckeditorConfig=this.customConfig:(this.basic&&(this.ckeditorConfig.toolbar="Basic"),this.availableTags&&(this.ckeditorConfig.format_tags=this.availableTags),this.uiColour&&(this.ckeditorConfig.uiColor=this.uiColour),this.additionalStyling&&this.ckeditorConfig.contentsCss.concat(this.additionalStyling))},e.decorators=[{type:t.Component,args:[{selector:"aui-wysiwyg",template:'<div class="aui-wysiwyg__inner">\n <ckeditor\n (blur)="onBlur($event)"\n (change)="writeValue($event)"\n (focus)="onFocus($event)"\n [(ngModel)]="ckeditorContent"\n [config]="ckeditorConfig"\n [debounce]="debounce"\n [readonly]="isDisabled"\n ></ckeditor>\n</div>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0}],styles:[":host ::ng-deep .cke .cke_chrome{border:1px solid #949494}:host ::ng-deep .cke .cke_top{border-color:#949494}:host ::ng-deep .cke .cke_bottom,:host ::ng-deep .cke .cke_top{background-color:#f3f3f3}:host ::ng-deep .cke .cke_wysiwyg_div{padding:.25rem}:host ::ng-deep .cke.cke_focus .cke_contents{box-shadow:0 0 0 1px #949494,0 0 0 4px #c0dffe;position:relative;z-index:1}"]}]}],e.propDecorators={setClass:[{type:t.HostBinding,args:["class.aui-wysiwyg"]}],additionalStyling:[{type:t.Input}],availableTags:[{type:t.Input}],basic:[{type:t.Input}],uiColour:[{type:t.Input}],customConfig:[{type:t.Input}],debounce:[{type:t.Input}],emitContent:[{type:t.Output}],focus:[{type:t.Output}],blur:[{type:t.Output}]},e}();var Q=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,f.CKEditorModule],declarations:[W],exports:[W]}]}],e}();e.AutoCompleteComponent=_,e.AutoCompleteModule=D,e.DATEPICKER_DATE_MASK="99/99/9999",e.DATEPICKER_DEFAULT_ERROR_LABELS=E,e.DATEPICKER_ERROR_LABELS=C,e.DATEPICKER_SEPARATOR_CHAR="/",e.DatepickerComponent=F,e.DatepickerModule=w,e.MaskDirective=v,e.MaskModule=b,e.RangeSliderComponent=M,e.RangeSliderModule=k,e.SearchFilterComponent=S,e.SearchFilterModule=T,e.TimePickerValidators=N,e.TimepickerComponent=R,e.TimepickerInputSize=O,e.TimepickerModule=P,e.UPLOAD_OPTIONS_DEFAULT=V,e.UPLOAD_VALIDATION_MESSAGES=U,e.UploadComponent=B,e.UploadInputComponent=H,e.UploadModule=Z,e.UploadQueueComponent=$,e.UploadZoneComponent=j,e.Uploader=q,e.ValidationListComponent=z,e.ValidationMessagesService=Y,e.WYSIWYG_DEFAULT_CONFIG=G,e.WysiwygComponent=W,e.WysiwygModule=Q,e.ɵa=I,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=acpaas-ui-ngx-forms.umd.min.js.map
|