@valtimo/components 4.17.0 → 4.18.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.
Files changed (118) hide show
  1. package/assets/css/ng-multiselect-dropdown.theme.scss +210 -0
  2. package/bundles/valtimo-components.umd.js +93 -16
  3. package/bundles/valtimo-components.umd.js.map +1 -1
  4. package/bundles/valtimo-components.umd.min.js +2 -2
  5. package/bundles/valtimo-components.umd.min.js.map +1 -1
  6. package/esm2015/lib/components/alert/alert.component.js +1 -1
  7. package/esm2015/lib/components/alert/alert.module.js +1 -1
  8. package/esm2015/lib/components/alert/alert.service.js +1 -1
  9. package/esm2015/lib/components/bpmn-js-diagram/bpmn-js-diagram.component.js +1 -1
  10. package/esm2015/lib/components/bpmn-js-diagram/bpmn-js-diagram.module.js +1 -1
  11. package/esm2015/lib/components/breadcrumb-navigation/breadcrumb-navigation.component.js +1 -1
  12. package/esm2015/lib/components/breadcrumb-navigation/breadcrumb-navigation.module.js +1 -1
  13. package/esm2015/lib/components/camunda/form/camunda-form.components.js +1 -1
  14. package/esm2015/lib/components/camunda/form/camunda-form.module.js +1 -1
  15. package/esm2015/lib/components/camunda/form/custom/camunda-custom-form.component.js +1 -1
  16. package/esm2015/lib/components/camunda/form/custom/camunda-custom-form.module.js +1 -1
  17. package/esm2015/lib/components/camunda/form/generated/camunda-generated-form.component.js +1 -1
  18. package/esm2015/lib/components/camunda/form/generated/camunda-generated-form.module.js +1 -1
  19. package/esm2015/lib/components/camunda/form/generated/formfield/boolean/camunda-boolean-formfield.component.js +1 -1
  20. package/esm2015/lib/components/camunda/form/generated/formfield/camunda-formfield-generator.directive.js +1 -1
  21. package/esm2015/lib/components/camunda/form/generated/formfield/camunda-formfield.service.js +1 -1
  22. package/esm2015/lib/components/camunda/form/generated/formfield/choicefield/camunda-choicefield-formfield.component.js +1 -1
  23. package/esm2015/lib/components/camunda/form/generated/formfield/date/camunda-date-formfield.component.js +1 -1
  24. package/esm2015/lib/components/camunda/form/generated/formfield/enum/camunda-enum-formfield.component.js +1 -1
  25. package/esm2015/lib/components/camunda/form/generated/formfield/formfield.model.js +1 -1
  26. package/esm2015/lib/components/camunda/form/generated/formfield/long/camunda-long-formfield.component.js +1 -1
  27. package/esm2015/lib/components/camunda/form/generated/formfield/string/camunda-string-formfield.component.js +1 -1
  28. package/esm2015/lib/components/camunda/form/generated/formfield/textarea/camunda-textarea-formfield.component.js +1 -1
  29. package/esm2015/lib/components/camunda/form/generated/formfield/validation/camunda-formfield-validation.component.js +1 -1
  30. package/esm2015/lib/components/camunda/form/generated/formfield/validation/date.validators.js +1 -1
  31. package/esm2015/lib/components/card/card.component.js +1 -1
  32. package/esm2015/lib/components/card/card.module.js +1 -1
  33. package/esm2015/lib/components/components.module.js +1 -1
  34. package/esm2015/lib/components/data-list/data-list.component.js +1 -1
  35. package/esm2015/lib/components/data-list/data-list.module.js +1 -1
  36. package/esm2015/lib/components/dropzone/dropzone.component.js +2 -2
  37. package/esm2015/lib/components/dropzone/dropzone.module.js +1 -1
  38. package/esm2015/lib/components/field-auto-focus/field-auto-focus.directive.js +1 -1
  39. package/esm2015/lib/components/field-auto-focus/field-auto-focus.module.js +1 -1
  40. package/esm2015/lib/components/file-size/file-size.module.js +1 -1
  41. package/esm2015/lib/components/file-size/file-size.pipe.js +1 -1
  42. package/esm2015/lib/components/filter-sidebar/filter-sidebar.component.js +1 -1
  43. package/esm2015/lib/components/filter-sidebar/filter-sidebar.module.js +1 -1
  44. package/esm2015/lib/components/form-io/form-io-builder.component.js +1 -1
  45. package/esm2015/lib/components/form-io/form-io-uploader/form-io-uploader-edit-form.js +1 -1
  46. package/esm2015/lib/components/form-io/form-io-uploader/form-io-uploader.component.js +2 -2
  47. package/esm2015/lib/components/form-io/form-io-uploader/form-io-uploader.formio.js +1 -1
  48. package/esm2015/lib/components/form-io/form-io.component.js +1 -1
  49. package/esm2015/lib/components/form-io/form-io.module.js +1 -1
  50. package/esm2015/lib/components/form-io/formio-config.js +1 -1
  51. package/esm2015/lib/components/form-io/services/form-io-dom.service.js +1 -1
  52. package/esm2015/lib/components/form-io/services/form-io-state.service.js +1 -1
  53. package/esm2015/lib/components/left-sidebar/left-sidebar.component.js +1 -1
  54. package/esm2015/lib/components/left-sidebar/left-sidebar.module.js +1 -1
  55. package/esm2015/lib/components/list/ListFilterPipe.directive.js +1 -1
  56. package/esm2015/lib/components/list/list.component.js +3 -3
  57. package/esm2015/lib/components/list/list.module.js +1 -1
  58. package/esm2015/lib/components/menu/menu-item-text.component.js +1 -1
  59. package/esm2015/lib/components/menu/menu-routing.module.js +1 -1
  60. package/esm2015/lib/components/menu/menu.component.js +1 -1
  61. package/esm2015/lib/components/menu/menu.init.js +1 -1
  62. package/esm2015/lib/components/menu/menu.module.js +1 -1
  63. package/esm2015/lib/components/menu/menu.service.js +1 -1
  64. package/esm2015/lib/components/menu/submenu-item-text.component.js +1 -1
  65. package/esm2015/lib/components/modal/modal.component.js +1 -1
  66. package/esm2015/lib/components/modal/modal.module.js +1 -1
  67. package/esm2015/lib/components/multiselect-dropdown/multiselect-dropdown.component.js +47 -0
  68. package/esm2015/lib/components/multiselect-dropdown/multiselect-dropdown.module.js +30 -0
  69. package/esm2015/lib/components/page-header/page-header.component.js +1 -1
  70. package/esm2015/lib/components/page-header/page-header.module.js +1 -1
  71. package/esm2015/lib/components/page-title/page-title.component.js +1 -1
  72. package/esm2015/lib/components/page-title/page-title.module.js +1 -1
  73. package/esm2015/lib/components/progress-bar/progress-bar.component.js +1 -1
  74. package/esm2015/lib/components/progress-bar/progress-bar.module.js +1 -1
  75. package/esm2015/lib/components/right-sidebar/right-sidebar.component.js +1 -1
  76. package/esm2015/lib/components/right-sidebar/right-sidebar.module.js +1 -1
  77. package/esm2015/lib/components/searchable-dropdown/searchable-dropdown.component.js +1 -1
  78. package/esm2015/lib/components/searchable-dropdown/searchable-dropdown.module.js +1 -1
  79. package/esm2015/lib/components/searchable-dropdown-select/searchable-dropdown-select.component.js +3 -3
  80. package/esm2015/lib/components/searchable-dropdown-select/searchable-dropdown-select.module.js +1 -1
  81. package/esm2015/lib/components/spinner/spinner.component.js +1 -1
  82. package/esm2015/lib/components/spinner/spinner.module.js +1 -1
  83. package/esm2015/lib/components/timeline/timeline.component.js +1 -1
  84. package/esm2015/lib/components/timeline/timeline.module.js +1 -1
  85. package/esm2015/lib/components/topbar/topbar.component.js +3 -3
  86. package/esm2015/lib/components/topbar/topbar.module.js +1 -1
  87. package/esm2015/lib/components/uploader/uploader-drag-drop.directive.js +1 -1
  88. package/esm2015/lib/components/uploader/uploader.component.js +2 -2
  89. package/esm2015/lib/components/uploader/uploader.module.js +1 -1
  90. package/esm2015/lib/components/version/version.service.js +1 -1
  91. package/esm2015/lib/components/view-content/type-converters/booleanTypeConverter.js +1 -1
  92. package/esm2015/lib/components/view-content/type-converters/dateTypeConverter.js +1 -1
  93. package/esm2015/lib/components/view-content/type-converters/enumTypeConverter.js +1 -1
  94. package/esm2015/lib/components/view-content/type-converters/relatedFilesTypeConverter.js +1 -1
  95. package/esm2015/lib/components/view-content/type-converters/stringReplaceUnderscoreTypeConverter.js +1 -1
  96. package/esm2015/lib/components/view-content/type-converters/stringTypeConverter.js +1 -1
  97. package/esm2015/lib/components/view-content/type-converters/type-converters.model.js +1 -1
  98. package/esm2015/lib/components/view-content/view-content.service.js +1 -1
  99. package/esm2015/lib/components/webcam/webcam.component.js +3 -3
  100. package/esm2015/lib/components/webcam/webcam.module.js +1 -1
  101. package/esm2015/lib/components/widget/widget.component.js +1 -1
  102. package/esm2015/lib/components/widget/widget.module.js +1 -1
  103. package/esm2015/lib/models/alert.model.js +1 -1
  104. package/esm2015/lib/models/form-io.model.js +1 -1
  105. package/esm2015/lib/models/index.js +1 -1
  106. package/esm2015/lib/models/pagination.model.js +1 -1
  107. package/esm2015/lib/models/searchable-dropdown.model.js +1 -1
  108. package/esm2015/lib/models/timeline.model.js +1 -1
  109. package/esm2015/lib/models/version.model.js +1 -1
  110. package/esm2015/public_api.js +4 -2
  111. package/esm2015/valtimo-components.js +1 -1
  112. package/fesm2015/valtimo-components.js +85 -13
  113. package/fesm2015/valtimo-components.js.map +1 -1
  114. package/lib/components/multiselect-dropdown/multiselect-dropdown.component.d.ts +15 -0
  115. package/lib/components/multiselect-dropdown/multiselect-dropdown.module.d.ts +2 -0
  116. package/package.json +3 -2
  117. package/public_api.d.ts +2 -0
  118. package/valtimo-components.metadata.json +1 -1
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("moment"),require("@valtimo/choicefield"),require("@angular/router"),require("ngx-logger"),require("@valtimo/config"),require("rxjs"),require("@valtimo/document"),require("@valtimo/security"),require("@ng-bootstrap/ng-bootstrap"),require("@ngx-translate/core"),require("@angular/common/http"),require("@valtimo/context"),require("rxjs/operators"),require("@angular/platform-browser"),require("bpmn-js/dist/bpmn-navigated-viewer.production.min.js"),require("heatmap.js-fixed/build/heatmap.js"),require("@valtimo/resource"),require("angular-formio"),require("jwt-decode"),require("dropzone"),require("ngx-spinner")):"function"==typeof define&&define.amd?define("@valtimo/components",["exports","@angular/core","@angular/common","@angular/forms","moment","@valtimo/choicefield","@angular/router","ngx-logger","@valtimo/config","rxjs","@valtimo/document","@valtimo/security","@ng-bootstrap/ng-bootstrap","@ngx-translate/core","@angular/common/http","@valtimo/context","rxjs/operators","@angular/platform-browser","bpmn-js/dist/bpmn-navigated-viewer.production.min.js","heatmap.js-fixed/build/heatmap.js","@valtimo/resource","angular-formio","jwt-decode","dropzone","ngx-spinner"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.components={}),e.ng.core,e.ng.common,e.ng.forms,e.moment,e.choicefield,e.ng.router,e.ngxLogger,e.config,e.rxjs,e.document,e.security,e.ngBootstrap,e.core$1,e.ng.common.http,e.context,e.rxjs.operators,e.ng.platformBrowser,e.BpmnJS,e.heatmap,e.resource,e.angularFormio,e.jwt_decode,e.Dropzone,e.ngxSpinner)}(this,(function(e,t,n,i,o,r,s,a,l,c,u,p,d,m,f,h,g,b,v,y,I,x,w,S,C){"use strict";w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w;var N,O=function(e){Object.assign(this,e)};(N=e.AlertType||(e.AlertType={}))[N.Success=0]="Success",N[N.Error=1]="Error",N[N.Info=2]="Info",N[N.Warning=3]="Warning",N[N.Notification=4]="Notification",N[N.ModalNotification=5]="ModalNotification";var T=function(e){this.submitMessage=e},L=function(){function e(){}return e.prototype.setAlertMessage=function(e){this.alerts=new T(e)},e.prototype.setHooks=function(e){this.hooks={beforeSubmit:e}},e}(),F=function(){function e(e,t,n,i,o,r){this._date=e,this._time=t,this._user=n,this._activity=i,this._summaryTranslationKey=o,this._summaryTranslationParams=r}return Object.defineProperty(e.prototype,"date",{get:function(){return this._date},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this._time},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._user},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activity",{get:function(){return this._activity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"summaryTranslationKey",{get:function(){return this._summaryTranslationKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"summaryTranslationParams",{get:function(){return this._summaryTranslationParams},enumerable:!1,configurable:!0}),e}(),M=function(){function e(){this.submitted=new t.EventEmitter}return e.prototype.onSubmitted=function(e){this.submitted.emit(e)},e}();M.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-container *ngIf="!componentName && submitted">\n <valtimo-camunda-generated-form\n *ngIf="formFields"\n [formFields]="formFields"\n (submitted)="onSubmitted($event)"\n >\n </valtimo-camunda-generated-form>\n</ng-container>\n<ng-container *ngIf="componentName">\n <valtimo-custom-form [componentName]="componentName"></valtimo-custom-form>\n</ng-container>\n'}]}],M.ctorParameters=function(){return[]},M.propDecorators={componentName:[{type:t.Input}],formFields:[{type:t.Input}],submitted:[{type:t.Output}]};var R=function(){function e(e){this.resolver=e}return e.prototype.ngOnInit=function(){var e=this,t=Array.from(this.resolver._factories.keys()).find((function(t){return t.name===e.componentName})),n=this.resolver.resolveComponentFactory(t);this.viewContainerRef.createComponent(n)},e}();R.decorators=[{type:t.Component,args:[{selector:"valtimo-custom-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-template #customFormContainer></ng-template>\n',styles:[""]}]}],R.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},R.propDecorators={componentName:[{type:t.Input}],viewContainerRef:[{type:t.ViewChild,args:["customFormContainer",{read:t.ViewContainerRef,static:!0}]}]};var A=function(){};A.decorators=[{type:t.NgModule,args:[{declarations:[R],imports:[n.CommonModule],exports:[R]}]}];var k=o;k.locale(localStorage.getItem("langKey"));var D="DD-MM-YYYY";var E=function(){function e(){}return e.prototype.isFormFieldDisabled=function(e){return e.validationConstraints.filter((function(e){return"readonly"===e.name})).length>0},e.prototype.getMinDate=function(e){return e.validationConstraints.filter((function(e){return"minDate"===e.name&&e.configuration}))[0]},e.prototype.getMaxDate=function(e){return e.validationConstraints.filter((function(e){return"maxDate"===e.name&&e.configuration}))[0]},e.prototype.getValidatorTypes=function(e){var t=[];return e.validationConstraints.forEach((function(e){var n,o;"required"===e.name&&t.push(i.Validators.required),"minlength"===e.name&&t.push(i.Validators.minLength(+e.configuration)),"maxlength"===e.name&&t.push(i.Validators.maxLength(+e.configuration)),"min"===e.name&&t.push(i.Validators.min(+e.configuration)),"max"===e.name&&t.push(i.Validators.max(+e.configuration)),"minDate"===e.name&&t.push((n=e.configuration,function(e){if(!e.value)return null;var t=k.utc(e.value).startOf("day"),i=k.utc(n,D,!0);return t.isSameOrAfter(i)?null:{minDate:{minDate:i.format(D),actual:t.format(D)}}})),"maxDate"===e.name&&t.push((o=e.configuration,function(e){if(!e.value)return null;var t=k.utc(e.value).startOf("day"),n=k.utc(o,D,!0);return t.isSameOrBefore(n)?null:{maxDate:{maxDate:n.format(D),actual:t.format(D)}}}))})),t},e}();E.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new E},token:E,providedIn:"root"}),E.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[]};var P=function(){function e(e,n,i){this.formBuilder=e,this.camundaFormFieldService=n,this.location=i,this.submitted=new t.EventEmitter,this.formFields=[]}return e.prototype.ngOnInit=function(){this.formGroup=this.createFormGroup()},e.prototype.createFormGroup=function(){var e=this,t=this.formBuilder.group({});return this.formFields.forEach((function(n){var o=new i.FormControl({value:n.defaultValue,disabled:e.camundaFormFieldService.isFormFieldDisabled(n)},e.camundaFormFieldService.getValidatorTypes(n));t.addControl(n.id,o)})),t},e.prototype.reset=function(){this.formGroup.reset()},e.prototype.back=function(){this.location.back()},e.prototype.handleSubmit=function(e){e.preventDefault(),e.stopPropagation(),this.submitted.emit(this.formGroup.value)},e}();P.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-generated-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<form [formGroup]="formGroup" (ngSubmit)="handleSubmit($event)">\n <ng-container\n *ngFor="let formField of formFields"\n valtimoCamundaFormfieldGenerator\n [formGroup]="formGroup"\n [formField]="formField"\n >\n <ng-content></ng-content>\n </ng-container>\n <div class="row pt-3 mt-1">\n <div class="col-sm-12">\n <div class="text-right">\n <button\n class="btn btn-space btn-default float-left"\n type="button"\n (click)="back()"\n id="back-button"\n >\n Back\n </button>\n <button\n class="btn btn-space btn-secondary"\n type="button"\n (click)="reset()"\n id="reset-button"\n >\n Reset\n </button>\n <button\n class="btn btn-space btn-primary"\n [disabled]="!formGroup.disabled && !formGroup.valid"\n type="submit"\n id="submit-button"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n</form>\n'}]}],P.ctorParameters=function(){return[{type:i.FormBuilder},{type:E},{type:n.Location}]},P.propDecorators={submitted:[{type:t.Output}],formFields:[{type:t.Input}]};var U=function(){};U.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-string-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n id="{{ formField.id }}"\n class="form-control"\n type="text"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],U.ctorParameters=function(){return[]};var j=function(){};j.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-boolean-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6 form-check mt-1">\n <label for="yes_{{ formField.id }}" class="custom-control custom-radio custom-control-inline">\n <input\n class="custom-control-input"\n id="yes_{{ formField.id }}"\n type="radio"\n [value]="true"\n [formControlName]="formField.id"\n />\n <span class="custom-control-label custom-control-color">Yes</span>\n </label>\n <label for="no_{{ formField.id }}" class="custom-control custom-radio custom-control-inline">\n <input\n class="custom-control-input"\n id="no_{{ formField.id }}"\n type="radio"\n [value]="false"\n [formControlName]="formField.id"\n />\n <span class="custom-control-label custom-control-color">No</span>\n </label>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],j.ctorParameters=function(){return[]};var z=o;z.locale(localStorage.getItem("langKey"));var V=function(){function e(e){this.formFieldService=e,this.datePickerOptions={}}return e.prototype.ngOnInit=function(){this.INPUT_SELECTOR="#"+this.formField.id,this.datePickerOptions={autoclose:!0,componentIcon:".mdi.mdi-calendar",navIcons:{rightIcon:"mdi mdi-chevron-right",leftIcon:"mdi mdi-chevron-left"},format:"dd-mm-yyyy"}},e.prototype.ngAfterViewInit=function(){var e=this.formGroup,t=this.formField,n=this.formFieldService.getMaxDate(this.formField);n&&(this.datePickerOptions.endDate=n.configuration);var i=this.formFieldService.getMinDate(this.formField);i&&(this.datePickerOptions.startDate=i.configuration),$(this.INPUT_SELECTOR).datetimepicker(this.datePickerOptions),$(this.INPUT_SELECTOR).on("changeDate",(function(n){var i;e.patchValue(((i={})[t.id]=z(n.date.valueOf()).format("DD/MM/YYYY"),i))}))},e}();V.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-date-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6 pt1">\n <input\n type="input"\n class="form-control"\n data-min-view="2"\n id="{{ formField.id }}"\n autocomplete="off"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],V.ctorParameters=function(){return[{type:E}]};var B=function(){};B.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-long-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n id="{{ formField.id }}"\n class="form-control"\n type="number"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],B.ctorParameters=function(){return[]};var W=function(){function e(){}return e.prototype.ngOnInit=function(){this.valueKeys=Object.keys(this.formField.type.values)},e}();W.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-enum-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <select class="form-control" id="{{ formField.id }}" [formControlName]="formField.id">\n <option selected="selected" value=""></option>\n <option *ngFor="let key of valueKeys" [value]="key" id="option_{{ key }}">\n {{ formField.type.values[key] }}\n </option>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],W.ctorParameters=function(){return[]};var q=function(){};q.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-textarea-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <textarea\n id="{{ formField.id }}"\n class="form-control"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n ></textarea>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],q.ctorParameters=function(){return[]};var Y=function(){function e(e){this.choicefieldService=e,this.choicefieldValues=[]}return e.prototype.ngOnInit=function(){var e=this;this.choicefieldService.getChoiceFieldValuesByName(this.formField.properties.choicefield).subscribe((function(t){e.choicefieldValues=t}))},e}();Y.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-choicefield-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <select class="form-control" id="{{ formField.id }}" [formControlName]="formField.id">\n <option selected="selected" value=""></option>\n <ng-container *ngFor="let choicefieldValue of choicefieldValues">\n <option\n *ngIf="!choicefieldValue.deprecated"\n [value]="choicefieldValue.value"\n id="option_{{ choicefieldValue.value }}"\n >\n {{ choicefieldValue.name }}\n </option>\n </ng-container>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],Y.ctorParameters=function(){return[{type:r.ChoicefieldService}]};var H=function(){function e(e,t){this.viewContainerRef=e,this.componentFactoryResolver=t,this.COMPONENTS={string:U,boolean:j,date:V,long:B,enum:W,textarea:q,choicefield:Y}}return e.prototype.ngOnInit=function(){var e=this.formField.typeName.toLowerCase();if(!this.COMPONENTS[e])throw new Error("Could not find component for formfield type: "+e);var t=this.COMPONENTS[e],n=this.componentFactoryResolver.resolveComponentFactory(t);this.component=this.viewContainerRef.createComponent(n),this.component.instance.formGroup=this.formGroup,this.component.instance.formField=this.formField},e}();H.decorators=[{type:t.Directive,args:[{selector:"[valtimoCamundaFormfieldGenerator]"}]}],H.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},H.propDecorators={formField:[{type:t.Input}],formGroup:[{type:t.Input}]};var G=function(){function e(){}return e.prototype.ngOnInit=function(){this.formControl=this.formGroup.get(this.formField.id)},e}();G.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-formfield-validation",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ul\n class="parsley-errors-list filled"\n *ngIf="formControl.invalid && (formControl.dirty || formControl.touched)"\n>\n <li *ngIf="formControl.errors.required">This field is required.</li>\n <li *ngIf="formControl.errors.minlength">\n This field should be more than {{ formControl.errors.minlength.requiredLength }} characters.\n </li>\n <li *ngIf="formControl.errors.maxlength">\n This field cannot be more than {{ formControl.errors.maxlength.requiredLength }} characters.\n </li>\n <li *ngIf="formControl.errors.min">\n This field should be more than {{ formControl.errors.min.min }}.\n </li>\n <li *ngIf="formControl.errors.max">\n This field should be less or equal to {{ formControl.errors.max.max }}.\n </li>\n <li *ngIf="formControl.errors.minDate">\n This field should be more than {{ formControl.errors.minDate.minDate }}.\n </li>\n <li *ngIf="formControl.errors.maxDate">\n This field should be less or equal to {{ formControl.errors.maxDate.maxDate }}.\n </li>\n</ul>\n'}]}],G.ctorParameters=function(){return[]},G.propDecorators={formGroup:[{type:t.Input}],formField:[{type:t.Input}]};var _=function(){};_.decorators=[{type:t.NgModule,args:[{declarations:[U,j,V,H,B,W,q,Y,G,P],imports:[n.CommonModule,i.ReactiveFormsModule],exports:[P],entryComponents:[U,j,V,B,W,q,Y]}]}];var K=function(){};K.decorators=[{type:t.NgModule,args:[{declarations:[M],imports:[n.CommonModule,_,A],exports:[M]}]}];var X=function(){};X.decorators=[{type:t.Component,args:[{selector:"valtimo-topbar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav class="navbar navbar-expand fixed-top be-top-header">\n <div class="container-fluid">\n <div class="be-navbar-header">\n <a class="navbar-brand" [routerLink]="[\'/\']"></a>\n </div>\n <div class="be-right-navbar">\n \x3c!-- important empty div: in order to made float-right element works on mobile --\x3e\n <div></div>\n <ul class="nav navbar-nav be-user-nav float-right be-icons-nav">\n <li class="nav-item dropdown special">\n <a class="nav-link be-toggle-right-sidebar" href="#" role="button" aria-expanded="false">\n <i class="fas fa-user-circle user-icon"></i>\n </a>\n </li>\n </ul>\n </div>\n </div>\n</nav>\n',styles:[".user-icon{font-size:30px;padding-top:5px}"]}]}],X.ctorParameters=function(){return[]};var J=function(){};J.decorators=[{type:t.NgModule,args:[{declarations:[X],imports:[n.CommonModule,s.RouterModule],exports:[X]}]}];var Z=function(){function e(e,t,n,i){this.configService=e,this.documentService=t,this.userProviderService=n,this.logger=i,this._menuItems$=new c.BehaviorSubject(void 0),this.menuConfig=e.config.menu}return e.prototype.init=function(){this.reload(),this.logger.debug("Menu initialized")},Object.defineProperty(e.prototype,"menuItems$",{get:function(){return this._menuItems$.asObservable()},enumerable:!1,configurable:!0}),e.prototype.reload=function(){return this._menuItems$.next(this.loadMenuItems())},e.prototype.loadMenuItems=function(){var e=this,t=[];return this.menuConfig.menuItems.forEach((function(e){e.show=!0,t.push(e)})),t=this.sortMenuItems(t),this.appendDossierSubMenuItems(t).subscribe((function(n){return t=e.applyMenuRoleSecurity(n)})),t},e.prototype.sortMenuItems=function(e){return e.sort((function(e,t){return e.sequence-t.sequence}))},e.prototype.appendDossierSubMenuItems=function(e){var t=this;return new c.Observable((function(n){t.logger.debug("appendDossierSubMenuItems"),t.documentService.getAllDefinitions().subscribe((function(i){var o=i.content.map((function(e,t){return{link:["/dossiers/"+e.id.name],title:e.schema.title,iconClass:"icon mdi mdi-dot-circle",sequence:t,show:!0}}));t.logger.debug("found dossierMenuItems",o);var r=e.findIndex((function(e){return"Dossiers"===e.title}));if(r>0){var s=e[r];t.logger.debug("updating dossierMenu",s),s.children=o,e[r]=s}n.next(e),t.logger.debug("appendDossierSubMenuItems finished")}))}))},e.prototype.applyMenuRoleSecurity=function(e){var t=this;return this.userProviderService.getUserSubject().subscribe((function(n){if(null!=n.roles){t.logger.debug("applyMenuRoleSecurity");var i=n.roles;e.forEach((function(e){var n=t.determineRoleAccess(e,i);t.logger.debug("Menu: check role access",e.roles,n),e.show!==n&&(t.logger.debug("Menu: Change access",e,n),e.show=n)}))}})),e},e.prototype.determineRoleAccess=function(e,t){return!e.roles||!!e.roles.some((function(e){return t.includes(e)}))},e}();Z.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Z(t.ɵɵinject(l.ConfigService),t.ɵɵinject(u.DocumentService),t.ɵɵinject(p.UserProviderService),t.ɵɵinject(a.NGXLogger))},token:Z,providedIn:"root"}),Z.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:l.ConfigService},{type:u.DocumentService},{type:p.UserProviderService},{type:a.NGXLogger}]};var Q=function(){};Q.decorators=[{type:t.NgModule,args:[{imports:[s.RouterModule.forChild([])],exports:[s.RouterModule]}]}];var ee=function(){function e(e,t,n,i){this.menuService=e,this.elRef=t,this.renderer=n,this.router=i}return e.prototype.ngOnInit=function(){var e=this;this.openRouterSubscription(),this.menuItemSubscription=this.menuService.menuItems$.subscribe((function(t){return e.menuItems=t}))},e.prototype.ngOnDestroy=function(){this.routerSubscription.unsubscribe(),this.menuItemSubscription.unsubscribe()},e.prototype.openRouterSubscription=function(){var e=this;this.routerSubscription=this.router.events.subscribe((function(t){t instanceof s.NavigationEnd&&e.closeSubMenu()}))},e.prototype.closeSubMenu=function(){var e=this.elRef.nativeElement.querySelector(".sub-menu.visible");if(e){this.renderer.removeClass(e,"visible");var t=this.elRef.nativeElement.querySelector("li.parent.open");t&&this.renderer.removeClass(t,"open")}},e}();ee.decorators=[{type:t.Component,args:[{selector:"valtimo-menu",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ul class="sidebar-elements">\n <ng-container *ngFor="let menuItem of menuItems">\n <li\n [class.parent]="menuItem.children"\n [hidden]="!menuItem.show"\n [routerLinkActive]="\'active\'"\n [routerLinkActiveOptions]="{exact: true}"\n >\n <a *ngIf="menuItem.link" [routerLink]="menuItem.link" class="sub-item">\n <valtimo-menu-item-text [menuItem]="menuItem"></valtimo-menu-item-text>\n </a>\n <a *ngIf="!menuItem.link" class="sub-item">\n <valtimo-menu-item-text [menuItem]="menuItem"></valtimo-menu-item-text>\n </a>\n <ng-container *ngIf="menuItem.children">\n <ul class="sub-menu">\n <li class="title">{{ menuItem.title | translate }}</li>\n <li\n *ngFor="let subMenuItem of menuItem.children"\n [routerLinkActive]="\'active\'"\n [routerLinkActiveOptions]="{exact: true}"\n >\n <a *ngIf="subMenuItem.link" [routerLink]="subMenuItem.link">\n <valtimo-submenu-item-text [submenuItem]="subMenuItem"></valtimo-submenu-item-text>\n </a>\n <a *ngIf="!subMenuItem.link">\n <valtimo-submenu-item-text [submenuItem]="subMenuItem"></valtimo-submenu-item-text>\n </a>\n </li>\n </ul>\n </ng-container>\n </li>\n </ng-container>\n</ul>\n',styles:[".c-default{cursor:default}.sub-item{cursor:pointer}"]}]}],ee.ctorParameters=function(){return[{type:Z},{type:t.ElementRef},{type:t.Renderer2},{type:s.Router}]};var te=function(){};te.decorators=[{type:t.Component,args:[{selector:"valtimo-menu-item-text",template:'\n <i\n class="{{ menuItem.iconClass }}"\n container="body"\n placement="right"\n ngbTooltip="{{ menuItem.title | translate }}"\n autoClose="true"\n >\n </i>\n <span>{{ menuItem.title | translate }}</span>\n '}]}],te.propDecorators={menuItem:[{type:t.Input}]};var ne=function(){};ne.decorators=[{type:t.Component,args:[{selector:"valtimo-submenu-item-text",template:'\n <span [ngClass]="submenuItem.textClass">\n {{ submenuItem.title | translate }}\n <ng-container *ngIf="!submenuItem.link">&gt;</ng-container>\n </span>\n '}]}],ne.propDecorators={submenuItem:[{type:t.Input}]};var ie=function(){};ie.decorators=[{type:t.NgModule,args:[{declarations:[ee,te,ne],imports:[n.CommonModule,s.RouterModule,d.NgbTooltipModule,m.TranslateModule],exports:[ee],providers:[]}]}];
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("moment"),require("@valtimo/choicefield"),require("@angular/router"),require("ngx-logger"),require("@valtimo/config"),require("rxjs"),require("@valtimo/document"),require("@valtimo/security"),require("@ng-bootstrap/ng-bootstrap"),require("@ngx-translate/core"),require("@angular/common/http"),require("@valtimo/context"),require("rxjs/operators"),require("@angular/platform-browser"),require("bpmn-js/dist/bpmn-navigated-viewer.production.min.js"),require("heatmap.js-fixed/build/heatmap.js"),require("@valtimo/resource"),require("angular-formio"),require("jwt-decode"),require("dropzone"),require("ngx-spinner"),require("ng-multiselect-dropdown")):"function"==typeof define&&define.amd?define("@valtimo/components",["exports","@angular/core","@angular/common","@angular/forms","moment","@valtimo/choicefield","@angular/router","ngx-logger","@valtimo/config","rxjs","@valtimo/document","@valtimo/security","@ng-bootstrap/ng-bootstrap","@ngx-translate/core","@angular/common/http","@valtimo/context","rxjs/operators","@angular/platform-browser","bpmn-js/dist/bpmn-navigated-viewer.production.min.js","heatmap.js-fixed/build/heatmap.js","@valtimo/resource","angular-formio","jwt-decode","dropzone","ngx-spinner","ng-multiselect-dropdown"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.components={}),e.ng.core,e.ng.common,e.ng.forms,e.moment,e.choicefield,e.ng.router,e.ngxLogger,e.config,e.rxjs,e.document,e.security,e.ngBootstrap,e.core$1,e.ng.common.http,e.context,e.rxjs.operators,e.ng.platformBrowser,e.BpmnJS,e.heatmap,e.resource,e.angularFormio,e.jwt_decode,e.Dropzone,e.ngxSpinner,e.ngMultiselectDropdown)}(this,(function(e,t,n,i,o,r,s,a,l,c,u,p,d,m,f,h,g,b,v,y,I,x,w,S,C,N){"use strict";w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w;var L,O=function(e){Object.assign(this,e)};(L=e.AlertType||(e.AlertType={}))[L.Success=0]="Success",L[L.Error=1]="Error",L[L.Info=2]="Info",L[L.Warning=3]="Warning",L[L.Notification=4]="Notification",L[L.ModalNotification=5]="ModalNotification";var T=function(e){this.submitMessage=e},F=function(){function e(){}return e.prototype.setAlertMessage=function(e){this.alerts=new T(e)},e.prototype.setHooks=function(e){this.hooks={beforeSubmit:e}},e}(),M=function(){function e(e,t,n,i,o,r){this._date=e,this._time=t,this._user=n,this._activity=i,this._summaryTranslationKey=o,this._summaryTranslationParams=r}return Object.defineProperty(e.prototype,"date",{get:function(){return this._date},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this._time},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._user},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activity",{get:function(){return this._activity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"summaryTranslationKey",{get:function(){return this._summaryTranslationKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"summaryTranslationParams",{get:function(){return this._summaryTranslationParams},enumerable:!1,configurable:!0}),e}(),R=function(){function e(){this.submitted=new t.EventEmitter}return e.prototype.onSubmitted=function(e){this.submitted.emit(e)},e}();R.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-container *ngIf="!componentName && submitted">\n <valtimo-camunda-generated-form\n *ngIf="formFields"\n [formFields]="formFields"\n (submitted)="onSubmitted($event)"\n >\n </valtimo-camunda-generated-form>\n</ng-container>\n<ng-container *ngIf="componentName">\n <valtimo-custom-form [componentName]="componentName"></valtimo-custom-form>\n</ng-container>\n'}]}],R.ctorParameters=function(){return[]},R.propDecorators={componentName:[{type:t.Input}],formFields:[{type:t.Input}],submitted:[{type:t.Output}]};var A=function(){function e(e){this.resolver=e}return e.prototype.ngOnInit=function(){var e=this,t=Array.from(this.resolver._factories.keys()).find((function(t){return t.name===e.componentName})),n=this.resolver.resolveComponentFactory(t);this.viewContainerRef.createComponent(n)},e}();A.decorators=[{type:t.Component,args:[{selector:"valtimo-custom-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-template #customFormContainer></ng-template>\n',styles:[""]}]}],A.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},A.propDecorators={componentName:[{type:t.Input}],viewContainerRef:[{type:t.ViewChild,args:["customFormContainer",{read:t.ViewContainerRef,static:!0}]}]};var k=function(){};k.decorators=[{type:t.NgModule,args:[{declarations:[A],imports:[n.CommonModule],exports:[A]}]}];var D=o;D.locale(localStorage.getItem("langKey"));var E="DD-MM-YYYY";var P=function(){function e(){}return e.prototype.isFormFieldDisabled=function(e){return e.validationConstraints.filter((function(e){return"readonly"===e.name})).length>0},e.prototype.getMinDate=function(e){return e.validationConstraints.filter((function(e){return"minDate"===e.name&&e.configuration}))[0]},e.prototype.getMaxDate=function(e){return e.validationConstraints.filter((function(e){return"maxDate"===e.name&&e.configuration}))[0]},e.prototype.getValidatorTypes=function(e){var t=[];return e.validationConstraints.forEach((function(e){var n,o;"required"===e.name&&t.push(i.Validators.required),"minlength"===e.name&&t.push(i.Validators.minLength(+e.configuration)),"maxlength"===e.name&&t.push(i.Validators.maxLength(+e.configuration)),"min"===e.name&&t.push(i.Validators.min(+e.configuration)),"max"===e.name&&t.push(i.Validators.max(+e.configuration)),"minDate"===e.name&&t.push((n=e.configuration,function(e){if(!e.value)return null;var t=D.utc(e.value).startOf("day"),i=D.utc(n,E,!0);return t.isSameOrAfter(i)?null:{minDate:{minDate:i.format(E),actual:t.format(E)}}})),"maxDate"===e.name&&t.push((o=e.configuration,function(e){if(!e.value)return null;var t=D.utc(e.value).startOf("day"),n=D.utc(o,E,!0);return t.isSameOrBefore(n)?null:{maxDate:{maxDate:n.format(E),actual:t.format(E)}}}))})),t},e}();P.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new P},token:P,providedIn:"root"}),P.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],P.ctorParameters=function(){return[]};var U=function(){function e(e,n,i){this.formBuilder=e,this.camundaFormFieldService=n,this.location=i,this.submitted=new t.EventEmitter,this.formFields=[]}return e.prototype.ngOnInit=function(){this.formGroup=this.createFormGroup()},e.prototype.createFormGroup=function(){var e=this,t=this.formBuilder.group({});return this.formFields.forEach((function(n){var o=new i.FormControl({value:n.defaultValue,disabled:e.camundaFormFieldService.isFormFieldDisabled(n)},e.camundaFormFieldService.getValidatorTypes(n));t.addControl(n.id,o)})),t},e.prototype.reset=function(){this.formGroup.reset()},e.prototype.back=function(){this.location.back()},e.prototype.handleSubmit=function(e){e.preventDefault(),e.stopPropagation(),this.submitted.emit(this.formGroup.value)},e}();U.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-generated-form",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<form [formGroup]="formGroup" (ngSubmit)="handleSubmit($event)">\n <ng-container\n *ngFor="let formField of formFields"\n valtimoCamundaFormfieldGenerator\n [formGroup]="formGroup"\n [formField]="formField"\n >\n <ng-content></ng-content>\n </ng-container>\n <div class="row pt-3 mt-1">\n <div class="col-sm-12">\n <div class="text-right">\n <button\n class="btn btn-space btn-default float-left"\n type="button"\n (click)="back()"\n id="back-button"\n >\n Back\n </button>\n <button\n class="btn btn-space btn-secondary"\n type="button"\n (click)="reset()"\n id="reset-button"\n >\n Reset\n </button>\n <button\n class="btn btn-space btn-primary"\n [disabled]="!formGroup.disabled && !formGroup.valid"\n type="submit"\n id="submit-button"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n</form>\n'}]}],U.ctorParameters=function(){return[{type:i.FormBuilder},{type:P},{type:n.Location}]},U.propDecorators={submitted:[{type:t.Output}],formFields:[{type:t.Input}]};var j=function(){};j.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-string-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n id="{{ formField.id }}"\n class="form-control"\n type="text"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],j.ctorParameters=function(){return[]};var z=function(){};z.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-boolean-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6 form-check mt-1">\n <label for="yes_{{ formField.id }}" class="custom-control custom-radio custom-control-inline">\n <input\n class="custom-control-input"\n id="yes_{{ formField.id }}"\n type="radio"\n [value]="true"\n [formControlName]="formField.id"\n />\n <span class="custom-control-label custom-control-color">Yes</span>\n </label>\n <label for="no_{{ formField.id }}" class="custom-control custom-radio custom-control-inline">\n <input\n class="custom-control-input"\n id="no_{{ formField.id }}"\n type="radio"\n [value]="false"\n [formControlName]="formField.id"\n />\n <span class="custom-control-label custom-control-color">No</span>\n </label>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],z.ctorParameters=function(){return[]};var V=o;V.locale(localStorage.getItem("langKey"));var B=function(){function e(e){this.formFieldService=e,this.datePickerOptions={}}return e.prototype.ngOnInit=function(){this.INPUT_SELECTOR="#"+this.formField.id,this.datePickerOptions={autoclose:!0,componentIcon:".mdi.mdi-calendar",navIcons:{rightIcon:"mdi mdi-chevron-right",leftIcon:"mdi mdi-chevron-left"},format:"dd-mm-yyyy"}},e.prototype.ngAfterViewInit=function(){var e=this.formGroup,t=this.formField,n=this.formFieldService.getMaxDate(this.formField);n&&(this.datePickerOptions.endDate=n.configuration);var i=this.formFieldService.getMinDate(this.formField);i&&(this.datePickerOptions.startDate=i.configuration),$(this.INPUT_SELECTOR).datetimepicker(this.datePickerOptions),$(this.INPUT_SELECTOR).on("changeDate",(function(n){var i;e.patchValue(((i={})[t.id]=V(n.date.valueOf()).format("DD/MM/YYYY"),i))}))},e}();B.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-date-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6 pt1">\n <input\n type="input"\n class="form-control"\n data-min-view="2"\n id="{{ formField.id }}"\n autocomplete="off"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],B.ctorParameters=function(){return[{type:P}]};var W=function(){};W.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-long-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n id="{{ formField.id }}"\n class="form-control"\n type="number"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n />\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],W.ctorParameters=function(){return[]};var q=function(){function e(){}return e.prototype.ngOnInit=function(){this.valueKeys=Object.keys(this.formField.type.values)},e}();q.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-enum-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <select class="form-control" id="{{ formField.id }}" [formControlName]="formField.id">\n <option selected="selected" value=""></option>\n <option *ngFor="let key of valueKeys" [value]="key" id="option_{{ key }}">\n {{ formField.type.values[key] }}\n </option>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],q.ctorParameters=function(){return[]};var Y=function(){};Y.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-textarea-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" *ngIf="formGroup" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <textarea\n id="{{ formField.id }}"\n class="form-control"\n [attr.placeholder]="formField.defaultValue"\n [formControlName]="formField.id"\n ></textarea>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],Y.ctorParameters=function(){return[]};var H=function(){function e(e){this.choicefieldService=e,this.choicefieldValues=[]}return e.prototype.ngOnInit=function(){var e=this;this.choicefieldService.getChoiceFieldValuesByName(this.formField.properties.choicefield).subscribe((function(t){e.choicefieldValues=t}))},e}();H.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-choicefield-formfield",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="form-group row" [formGroup]="formGroup">\n <label for="{{ formField.id }}" class="col-12 col-sm-3 col-form-label text-sm-right">\n {{ formField.label }}\n </label>\n <div class="col-12 col-sm-8 col-lg-6">\n <select class="form-control" id="{{ formField.id }}" [formControlName]="formField.id">\n <option selected="selected" value=""></option>\n <ng-container *ngFor="let choicefieldValue of choicefieldValues">\n <option\n *ngIf="!choicefieldValue.deprecated"\n [value]="choicefieldValue.value"\n id="option_{{ choicefieldValue.value }}"\n >\n {{ choicefieldValue.name }}\n </option>\n </ng-container>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]="formGroup" [formField]="formField">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n'}]}],H.ctorParameters=function(){return[{type:r.ChoicefieldService}]};var G=function(){function e(e,t){this.viewContainerRef=e,this.componentFactoryResolver=t,this.COMPONENTS={string:j,boolean:z,date:B,long:W,enum:q,textarea:Y,choicefield:H}}return e.prototype.ngOnInit=function(){var e=this.formField.typeName.toLowerCase();if(!this.COMPONENTS[e])throw new Error("Could not find component for formfield type: "+e);var t=this.COMPONENTS[e],n=this.componentFactoryResolver.resolveComponentFactory(t);this.component=this.viewContainerRef.createComponent(n),this.component.instance.formGroup=this.formGroup,this.component.instance.formField=this.formField},e}();G.decorators=[{type:t.Directive,args:[{selector:"[valtimoCamundaFormfieldGenerator]"}]}],G.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},G.propDecorators={formField:[{type:t.Input}],formGroup:[{type:t.Input}]};var _=function(){function e(){}return e.prototype.ngOnInit=function(){this.formControl=this.formGroup.get(this.formField.id)},e}();_.decorators=[{type:t.Component,args:[{selector:"valtimo-camunda-formfield-validation",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ul\n class="parsley-errors-list filled"\n *ngIf="formControl.invalid && (formControl.dirty || formControl.touched)"\n>\n <li *ngIf="formControl.errors.required">This field is required.</li>\n <li *ngIf="formControl.errors.minlength">\n This field should be more than {{ formControl.errors.minlength.requiredLength }} characters.\n </li>\n <li *ngIf="formControl.errors.maxlength">\n This field cannot be more than {{ formControl.errors.maxlength.requiredLength }} characters.\n </li>\n <li *ngIf="formControl.errors.min">\n This field should be more than {{ formControl.errors.min.min }}.\n </li>\n <li *ngIf="formControl.errors.max">\n This field should be less or equal to {{ formControl.errors.max.max }}.\n </li>\n <li *ngIf="formControl.errors.minDate">\n This field should be more than {{ formControl.errors.minDate.minDate }}.\n </li>\n <li *ngIf="formControl.errors.maxDate">\n This field should be less or equal to {{ formControl.errors.maxDate.maxDate }}.\n </li>\n</ul>\n'}]}],_.ctorParameters=function(){return[]},_.propDecorators={formGroup:[{type:t.Input}],formField:[{type:t.Input}]};var K=function(){};K.decorators=[{type:t.NgModule,args:[{declarations:[j,z,B,G,W,q,Y,H,_,U],imports:[n.CommonModule,i.ReactiveFormsModule],exports:[U],entryComponents:[j,z,B,W,q,Y,H]}]}];var X=function(){};X.decorators=[{type:t.NgModule,args:[{declarations:[R],imports:[n.CommonModule,K,k],exports:[R]}]}];var J=function(){};J.decorators=[{type:t.Component,args:[{selector:"valtimo-topbar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav class="navbar navbar-expand fixed-top be-top-header">\n <div class="container-fluid">\n <div class="be-navbar-header">\n <a class="navbar-brand" [routerLink]="[\'/\']"></a>\n </div>\n <div class="be-right-navbar">\n \x3c!-- important empty div: in order to made float-right element works on mobile --\x3e\n <div></div>\n <ul class="nav navbar-nav be-user-nav float-right be-icons-nav">\n <li class="nav-item dropdown special">\n <a class="nav-link be-toggle-right-sidebar" href="#" role="button" aria-expanded="false">\n <i class="mdi mdi-account-circle user-icon"></i>\n </a>\n </li>\n </ul>\n </div>\n </div>\n</nav>\n',styles:[".user-icon{font-size:30px}.be-toggle-right-sidebar{display:flex}"]}]}],J.ctorParameters=function(){return[]};var Z=function(){};Z.decorators=[{type:t.NgModule,args:[{declarations:[J],imports:[n.CommonModule,s.RouterModule],exports:[J]}]}];var Q=function(){function e(e,t,n,i){this.configService=e,this.documentService=t,this.userProviderService=n,this.logger=i,this._menuItems$=new c.BehaviorSubject(void 0),this.menuConfig=e.config.menu}return e.prototype.init=function(){this.reload(),this.logger.debug("Menu initialized")},Object.defineProperty(e.prototype,"menuItems$",{get:function(){return this._menuItems$.asObservable()},enumerable:!1,configurable:!0}),e.prototype.reload=function(){return this._menuItems$.next(this.loadMenuItems())},e.prototype.loadMenuItems=function(){var e=this,t=[];return this.menuConfig.menuItems.forEach((function(e){e.show=!0,t.push(e)})),t=this.sortMenuItems(t),this.appendDossierSubMenuItems(t).subscribe((function(n){return t=e.applyMenuRoleSecurity(n)})),t},e.prototype.sortMenuItems=function(e){return e.sort((function(e,t){return e.sequence-t.sequence}))},e.prototype.appendDossierSubMenuItems=function(e){var t=this;return new c.Observable((function(n){t.logger.debug("appendDossierSubMenuItems"),t.documentService.getAllDefinitions().subscribe((function(i){var o=i.content.map((function(e,t){return{link:["/dossiers/"+e.id.name],title:e.schema.title,iconClass:"icon mdi mdi-dot-circle",sequence:t,show:!0}}));t.logger.debug("found dossierMenuItems",o);var r=e.findIndex((function(e){return"Dossiers"===e.title}));if(r>0){var s=e[r];t.logger.debug("updating dossierMenu",s),s.children=o,e[r]=s}n.next(e),t.logger.debug("appendDossierSubMenuItems finished")}))}))},e.prototype.applyMenuRoleSecurity=function(e){var t=this;return this.userProviderService.getUserSubject().subscribe((function(n){if(null!=n.roles){t.logger.debug("applyMenuRoleSecurity");var i=n.roles;e.forEach((function(e){var n=t.determineRoleAccess(e,i);t.logger.debug("Menu: check role access",e.roles,n),e.show!==n&&(t.logger.debug("Menu: Change access",e,n),e.show=n)}))}})),e},e.prototype.determineRoleAccess=function(e,t){return!e.roles||!!e.roles.some((function(e){return t.includes(e)}))},e}();Q.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Q(t.ɵɵinject(l.ConfigService),t.ɵɵinject(u.DocumentService),t.ɵɵinject(p.UserProviderService),t.ɵɵinject(a.NGXLogger))},token:Q,providedIn:"root"}),Q.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:l.ConfigService},{type:u.DocumentService},{type:p.UserProviderService},{type:a.NGXLogger}]};var ee=function(){};ee.decorators=[{type:t.NgModule,args:[{imports:[s.RouterModule.forChild([])],exports:[s.RouterModule]}]}];var te=function(){function e(e,t,n,i){this.menuService=e,this.elRef=t,this.renderer=n,this.router=i}return e.prototype.ngOnInit=function(){var e=this;this.openRouterSubscription(),this.menuItemSubscription=this.menuService.menuItems$.subscribe((function(t){return e.menuItems=t}))},e.prototype.ngOnDestroy=function(){this.routerSubscription.unsubscribe(),this.menuItemSubscription.unsubscribe()},e.prototype.openRouterSubscription=function(){var e=this;this.routerSubscription=this.router.events.subscribe((function(t){t instanceof s.NavigationEnd&&e.closeSubMenu()}))},e.prototype.closeSubMenu=function(){var e=this.elRef.nativeElement.querySelector(".sub-menu.visible");if(e){this.renderer.removeClass(e,"visible");var t=this.elRef.nativeElement.querySelector("li.parent.open");t&&this.renderer.removeClass(t,"open")}},e}();te.decorators=[{type:t.Component,args:[{selector:"valtimo-menu",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ul class="sidebar-elements">\n <ng-container *ngFor="let menuItem of menuItems">\n <li\n [class.parent]="menuItem.children"\n [hidden]="!menuItem.show"\n [routerLinkActive]="\'active\'"\n [routerLinkActiveOptions]="{exact: true}"\n >\n <a *ngIf="menuItem.link" [routerLink]="menuItem.link" class="sub-item">\n <valtimo-menu-item-text [menuItem]="menuItem"></valtimo-menu-item-text>\n </a>\n <a *ngIf="!menuItem.link" class="sub-item">\n <valtimo-menu-item-text [menuItem]="menuItem"></valtimo-menu-item-text>\n </a>\n <ng-container *ngIf="menuItem.children">\n <ul class="sub-menu">\n <li class="title">{{ menuItem.title | translate }}</li>\n <li\n *ngFor="let subMenuItem of menuItem.children"\n [routerLinkActive]="\'active\'"\n [routerLinkActiveOptions]="{exact: true}"\n >\n <a *ngIf="subMenuItem.link" [routerLink]="subMenuItem.link">\n <valtimo-submenu-item-text [submenuItem]="subMenuItem"></valtimo-submenu-item-text>\n </a>\n <a *ngIf="!subMenuItem.link">\n <valtimo-submenu-item-text [submenuItem]="subMenuItem"></valtimo-submenu-item-text>\n </a>\n </li>\n </ul>\n </ng-container>\n </li>\n </ng-container>\n</ul>\n',styles:[".c-default{cursor:default}.sub-item{cursor:pointer}"]}]}],te.ctorParameters=function(){return[{type:Q},{type:t.ElementRef},{type:t.Renderer2},{type:s.Router}]};var ne=function(){};ne.decorators=[{type:t.Component,args:[{selector:"valtimo-menu-item-text",template:'\n <i\n class="{{ menuItem.iconClass }}"\n container="body"\n placement="right"\n ngbTooltip="{{ menuItem.title | translate }}"\n autoClose="true"\n >\n </i>\n <span>{{ menuItem.title | translate }}</span>\n '}]}],ne.propDecorators={menuItem:[{type:t.Input}]};var ie=function(){};ie.decorators=[{type:t.Component,args:[{selector:"valtimo-submenu-item-text",template:'\n <span [ngClass]="submenuItem.textClass">\n {{ submenuItem.title | translate }}\n <ng-container *ngIf="!submenuItem.link">&gt;</ng-container>\n </span>\n '}]}],ie.propDecorators={submenuItem:[{type:t.Input}]};var oe=function(){};oe.decorators=[{type:t.NgModule,args:[{declarations:[te,ne,ie],imports:[n.CommonModule,s.RouterModule,d.NgbTooltipModule,m.TranslateModule],exports:[te],providers:[]}]}];
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,5 +13,5 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};Object.create;function re(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 se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}Object.create;var ae=function(){function e(e){this.http=e}return e.prototype.getVersion=function(){return this.http.get("/api/valtimo/version")},e}();ae.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ae(t.ɵɵinject(f.HttpClient))},token:ae,providedIn:"root"}),ae.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ae.ctorParameters=function(){return[{type:f.HttpClient}]};var le=function(){function e(e,t,n,i,o,r,s){this.userProviderService=e,this.formBuilder=t,this.versionService=n,this.translate=i,this.contextService=o,this.http=r,this.logger=s}return e.prototype.ngOnInit=function(){this.frequencies=["emailNotificationOnMonday","emailNotificationOnTuesday","emailNotificationOnWednesday","emailNotificationOnThursday","emailNotificationOnFriday","emailNotificationOnSaturday","emailNotificationOnSunday"],this.settingsForm=this.formBuilder.group({taskNotifications:new i.FormControl(!1),emailNotifications:new i.FormControl(!1),emailNotificationOnMonday:new i.FormControl(!1),emailNotificationOnTuesday:new i.FormControl(!1),emailNotificationOnWednesday:new i.FormControl(!1),emailNotificationOnThursday:new i.FormControl(!1),emailNotificationOnFriday:new i.FormControl(!1),emailNotificationOnSaturday:new i.FormControl(!1),emailNotificationOnSunday:new i.FormControl(!1)}),this.getUserSettings()},e.prototype.loadContextSwitch=function(){var e=this;c.combineLatest([this.contextService.getUserContexts(),this.contextService.getUserContextActive()]).subscribe((function(t){var n=se(t,2),i=n[0],o=n[1];e.userContextActive=o,e.userContexts=i}))},e.prototype.setUserContext=function(e){this.contextService.setUserContext(e).subscribe(),location.href="/"},e.prototype.loadUserSettingsTab=function(){var e=this;this.userProviderService.getEmailNotificationSettings().subscribe((function(t){null!==t?(e.settingsForm.controls.taskNotifications.setValue(t.taskNotifications),e.settingsForm.controls.emailNotifications.setValue(t.emailNotifications),e.settingsForm.controls.emailNotificationOnMonday.setValue(t.emailNotificationOnMonday),e.settingsForm.controls.emailNotificationOnTuesday.setValue(t.emailNotificationOnTuesday),e.settingsForm.controls.emailNotificationOnWednesday.setValue(t.emailNotificationOnWednesday),e.settingsForm.controls.emailNotificationOnThursday.setValue(t.emailNotificationOnThursday),e.settingsForm.controls.emailNotificationOnFriday.setValue(t.emailNotificationOnFriday),e.settingsForm.controls.emailNotificationOnSaturday.setValue(t.emailNotificationOnSaturday),e.settingsForm.controls.emailNotificationOnSunday.setValue(t.emailNotificationOnSunday)):e.settingsForm.controls.taskNotifications.setValue(!0)})),this.getVersion()},e.prototype.getUserSettings=function(){var e=this;this.userProviderService.getUserSubject().subscribe((function(t){e.logger.debug("user",t),e.userIdentity=t,e.loadContextSwitch()}))},e.prototype.getVersion=function(){var e=this;this.versionService.getVersion().subscribe((function(t){e.build=t}))},e.prototype.onSettingsSubmit=function(){this.settingsForm.pristine||this.userProviderService.updateEmailNotificationSettings(this.settingsForm.value).subscribe()},e.prototype.updateUserLanguage=function(e){this.translate.use(e).subscribe((function(){localStorage.setItem("langKey",e)}))},e.prototype.logout=function(){this.userProviderService.logout()},e}();le.decorators=[{type:t.Component,args:[{selector:"valtimo-right-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav class="be-right-sidebar">\n <div class="sb-content">\n <div class="tab-navigation">\n <ul class="nav nav-tabs nav-justified" role="tablist">\n <li class="nav-item" role="presentation">\n <a\n class="nav-link active"\n href="#account"\n aria-controls="account"\n role="tab"\n data-toggle="tab"\n translate="account.title"\n ></a>\n </li>\n <li class="nav-item" role="presentation">\n <a\n class="nav-link"\n (click)="loadUserSettingsTab()"\n href="#settings"\n aria-controls="settings"\n role="tab"\n data-toggle="tab"\n translate="settings.title"\n ></a>\n </li>\n </ul>\n </div>\n <div class="tab-panel">\n <div class="tab-content">\n \x3c!-- account --\x3e\n <div class="tab-pane tab-account active" id="account" role="tabpanel">\n <div class="p-3 be-scroller-settings" *ngIf="userIdentity">\n <div class="content">\n <div class="category-title border-0 m-0">\n <div class="p-0 text-muted">\n <dl class="row mb-0">\n <dt class="col-sm-3">Email</dt>\n <dd class="col-sm-9 mb-0 text-bold">{{ userIdentity.email }}</dd>\n <ng-container *ngIf="userIdentity.username">\n <dt class="col-sm-3">Username</dt>\n <dd class="col-sm-9 mb-0 text-bold">{{ userIdentity.username }}</dd>\n </ng-container>\n <dt class="col-sm-3">Name</dt>\n <dd class="col-sm-9 mb-0 text-bold">\n {{ userIdentity.firstName + \' \' + userIdentity.lastName }}\n </dd>\n </dl>\n </div>\n </div>\n \x3c!-- context switch --\x3e\n <ul class="settings-list" *ngIf="userContexts?.length > 1">\n <li ngbTooltip="{{ \'settings.context.title\' | translate }}">\n <select\n class="form-control"\n #contextSelect\n (change)="setUserContext(+contextSelect.value)"\n >\n <option\n *ngFor="let context of userContexts"\n [value]="context.id"\n [selected]="context.id === userContextActive.id"\n >\n {{ context.name }}\n </option>\n </select>\n </li>\n </ul>\n <ul class="list-group list-group-flush m-0">\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://docs.valtimo.nl"\n target="_blank"\n class="d-block"\n translate="account.links.help"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://www.valtimo.nl/feedback/"\n target="_blank"\n class="d-block"\n translate="account.links.feedback"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://forum.valtimo.nl"\n target="_blank"\n class="d-block"\n translate="account.links.forum"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="javascript:void(0)"\n class="d-block"\n (click)="logout()"\n translate="account.links.signOut"\n ></a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n \x3c!-- settings --\x3e\n <div class="tab-pane tab-settings" id="settings" role="tabpanel">\n <div class="p-3 be-scroller-settings">\n <div class="content">\n <span class="category-title" translate="settings.language.title"></span>\n <ul class="settings-list">\n <li>\n <select\n class="form-control"\n #langSelect\n (change)="updateUserLanguage(langSelect.value)"\n >\n <option\n *ngFor="let lang of translate.getLangs()"\n [value]="lang"\n [selected]="lang === translate.currentLang"\n >\n {{ \'settings.language.options.\' + lang | translate }}\n </option>\n </select>\n </li>\n </ul>\n\n <form [formGroup]="settingsForm">\n <span class="category-title" translate="settings.notification.title"></span>\n <ul class="settings-list m-0">\n <li>\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="taskNotifications"\n id="taskNotifications"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="taskNotifications"></label></span>\n </div>\n <span class="name" translate="settings.notification.taskNotifications"></span>\n <div\n class="text-muted info-text"\n translate="settings.notification.taskNotificationsIntro"\n ></div>\n </li>\n\n <li>\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="emailNotifications"\n id="emailNotifications"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="emailNotifications"></label></span>\n </div>\n <span class="name" translate="settings.notification.emailNotifications"></span>\n <div\n class="text-muted info-text"\n translate="settings.notification.emailNotificationsIntro"\n ></div>\n </li>\n </ul>\n\n <div *ngIf="settingsForm.value.emailNotifications">\n <ul class="settings-list">\n <li *ngFor="let frequency of frequencies">\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="{{ frequency }}"\n id="{{ frequency }}"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="{{ frequency }}"></label></span>\n </div>\n <span class="name">{{\n \'settings.notification.\' + frequency | translate\n }}</span>\n </li>\n </ul>\n </div>\n </form>\n\n <div class="version-holder">\n <span class="category-title" translate="settings.version.title"></span>\n <ul class="settings-list">\n <li *ngIf="build">\n <div class="name">{{ build.title }}</div>\n <div class="text-muted">{{ build.version }}</div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</nav>\n',styles:[".be-scroller-settings{padding-bottom:150px!important}.version-holder{background-color:#f8f9fa;bottom:0;position:fixed;width:259px}.info-text{line-height:1em!important;margin-bottom:15px;padding-right:70px}"]}]}],le.ctorParameters=function(){return[{type:p.UserProviderService},{type:i.FormBuilder},{type:ae},{type:m.TranslateService},{type:h.ContextService},{type:f.HttpClient},{type:a.NGXLogger}]};var ce=l.HttpLoaderFactory,ue=function(){};ue.decorators=[{type:t.NgModule,args:[{declarations:[le],imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,s.RouterModule,m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:ce,deps:[f.HttpClient]}}),d.NgbTooltipModule],exports:[le]}]}];var pe=function(){function e(e,n){this.translateService=e,this.elementRef=n,this.menuWidthChanged=new t.EventEmitter,this.menuTooltipText$=this.translateService.stream("interface.mainMenu"),this.toggleMenuText$=this.translateService.stream("interface.toggleMenu"),this.mouseIsOnResizeBorder$=new c.BehaviorSubject(!1),this.menuWidth$=new c.BehaviorSubject(void 0),this.isResizing$=new c.BehaviorSubject(!1),this.defaultMenuWidth=230,this.maxMenuWidth=330,this.minMenuWidth=120,this.mouseX$=c.fromEvent(document.body,"mousemove").pipe(g.map((function(e){return e.pageX}))),this.bodyStyle=n.nativeElement.ownerDocument.body.style}return e.prototype.ngOnInit=function(){this.setMenuWidth(this.defaultMenuWidth)},e.prototype.ngAfterViewInit=function(){var e=this;this.mouseXSubscription=c.combineLatest([this.mouseX$,this.isResizing$]).pipe(g.debounceTime(3)).subscribe((function(t){var n=se(t,2),i=n[0],o=n[1],r=e.menuIsOpen;if(o){var s=e.xOnClick-i,a=e.menuWidthOnClick-s,l=a<e.minMenuWidth-35,c=!r&&s<-35;r&&a<=e.maxMenuWidth&&a>=e.minMenuWidth?e.setMenuWidth(a):(l||c)&&e.snapMenu(l?e.menuWidthOnClick:e.defaultMenuWidth)}})),this.mouseUpSubscription=c.fromEvent(document,"mouseup").subscribe((function(){e.stopResizing()}))},e.prototype.ngOnDestroy=function(){this.mouseXSubscription.unsubscribe(),this.mouseUpSubscription.unsubscribe()},e.prototype.enterBorder=function(){this.mouseIsOnResizeBorder$.next(!0)},e.prototype.leaveBorder=function(){this.mouseIsOnResizeBorder$.next(!1)},e.prototype.resizeBorderClick=function(e){var t=this;this.menuWidth$.pipe(g.take(1)).subscribe((function(n){t.menuWidthOnClick=n,t.xOnClick=e.pageX,t.bodyStyle.userSelect="none",t.bodyStyle.cursor="col-resize",t.isResizing$.next(!0)}))},e.prototype.snapMenu=function(e){var t=this;this.stopResizing(),this.setMenuWidth(e),setTimeout((function(){t.toggleButtonRef.nativeElement.click()}))},e.prototype.stopResizing=function(){this.bodyStyle.cursor="auto",this.bodyStyle.userSelect="auto",this.isResizing$.next(!1)},e.prototype.setMenuWidth=function(e){this.menuWidth$.next(e),this.menuWidthChanged.emit(e)},e}();pe.decorators=[{type:t.Component,args:[{selector:"valtimo-left-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n<ng-container *ngIf="{isResizing: isResizing$ | async} as obs">\n <div\n class="be-left-sidebar"\n [style.width.px]="menuIsOpen ? (menuWidth$ | async) : null"\n [ngClass]="{\'no-transition\': obs.isResizing}"\n >\n <div class="left-sidebar-wrapper">\n <a class="left-sidebar-toggle" href="javascript:void(0);"\n ><valtimo-page-title></valtimo-page-title\n ></a>\n <div class="progress-widget" style="padding: 20px 0">\n <ul class="sidebar-elements">\n <li>\n <a\n #toggleButton\n class="be-toggle-left-sidebar"\n href="javascript:void(0);"\n [title]="menuTooltipText$ | async"\n >\n <svg\n xmlns="http://www.w3.org/2000/svg"\n aria-hidden="true"\n width="1em"\n height="1em"\n style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg)"\n viewBox="0 0 24 24"\n transform="rotate(360)"\n >\n <path [ngClass]="menuIsOpen ? \'d-1\' : \'d-1-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-2\' : \'d-2-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-3\' : \'d-3-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-4\' : \'d-4-flipped\'" />\n </svg>\n <span>{{ toggleMenuText$ | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div class="left-sidebar-spacer">\n <div class="left-sidebar-scroll">\n <div class="left-sidebar-content">\n <valtimo-menu></valtimo-menu>\n </div>\n </div>\n </div>\n </div>\n <div\n class="resize-border"\n (mouseenter)="enterBorder()"\n (mouseleave)="leaveBorder()"\n (mousedown)="resizeBorderClick($event)"\n [ngClass]="{\'resize-hover\': (mouseIsOnResizeBorder$ | async) || obs.isResizing}"\n ></div>\n </div>\n</ng-container>\n',styles:['@media screen and (max-width:767px){.be-left-sidebar{width:100%!important}}.be-left-sidebar .left-sidebar-toggle{padding:20px}.be-left-sidebar .left-sidebar-toggle:before{font-size:1.615rem}.be-left-sidebar .sidebar-elements>li>a.be-toggle-left-sidebar{align-items:center;display:flex;height:32px}.be-left-sidebar .left-sidebar-content{padding-top:20px}.be-toggle-left-sidebar svg{height:auto;margin-right:7px;min-width:21px;overflow:visible}.be-toggle-left-sidebar svg path{fill:#696969;transition:.27s ease}.resize-border{background-color:#ff5800;cursor:col-resize;height:100%;margin-right:-3px;opacity:0;position:absolute;right:0;top:0;transition:opacity .2s ease;width:3px}.resize-hover{opacity:.7}.no-transition{transition:none}.d-1{d:path("M3 18v-2h13v2z")}.d-1-flipped{d:path("M3 18v-2h11v2z")}.d-2{d:path("M3 13v-2h10v2H3")}.d-2-flipped{d:path("M3 13v-2h12v2H3")}.d-3{d:path("M3 6h13v2H3V6")}.d-3-flipped{d:path("M3 6h11v2H3V6")}.d-4{d:path("M21 15.61L19.59 17l-5.01-5 5.01-5L21 8.39 17.44 12 21 15.61")}.d-4-flipped{d:path("M15.58 15.61L16.99 17 22 12l-5.01-5-1.41 1.39L19.14 12l-3.56 3.61")}']}]}],pe.ctorParameters=function(){return[{type:m.TranslateService},{type:t.ElementRef}]},pe.propDecorators={toggleButtonRef:[{type:t.ViewChild,args:["toggleButton"]}],menuIsOpen:[{type:t.Input}],menuWidthChanged:[{type:t.Output}]};var de=function(){function e(e,t,n,i,o){this.router=e,this.activatedRoute=t,this.titleService=n,this.translateService=i,this.logger=o,this.appTitle="Valtimo",this.routerSub=c.Subscription.EMPTY}return e.prototype.setTitle=function(){var e=this;this.title=this.activatedRoute.snapshot.firstChild.data.title,this.title||(this.title=this.activatedRoute.snapshot.firstChild.children[0].data.title),this.title?this.translateService.stream(this.title).subscribe((function(t){e.logger.debug("PageTitle: setTitle translated async",t),e.titleService.setTitle(e.appTitle+" - "+t)})):(this.logger.debug("PageTitle: setTitle default",this.appTitle),this.titleService.setTitle(this.appTitle))},e.prototype.ngOnInit=function(){var e=this;this.setTitle(),this.routerSub=this.router.events.pipe(g.filter((function(e){return e instanceof s.NavigationEnd}))).subscribe((function(t){e.setTitle()}))},e.prototype.ngOnDestroy=function(){this.routerSub.unsubscribe()},e}();de.decorators=[{type:t.Component,args:[{selector:"valtimo-page-title",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<h2 class="page-head-title" *ngIf="title !== \'\'"><span [innerHTML]="title | translate"></span></h2>\n',styles:[""]}]}],de.ctorParameters=function(){return[{type:s.Router},{type:s.ActivatedRoute},{type:b.Title},{type:m.TranslateService},{type:a.NGXLogger}]};var me=function(){};me.decorators=[{type:t.NgModule,args:[{declarations:[de],imports:[n.CommonModule,m.TranslateModule],exports:[de]}]}];var fe=function(){};fe.decorators=[{type:t.NgModule,args:[{declarations:[pe],imports:[n.CommonModule,ie,me],exports:[pe]}]}];var he=function(){function e(){}return e.prototype.getTypeString=function(){return"string"},e.prototype.convert=function(e,t){return e},e}(),ge=function(){function e(){}return e.prototype.getTypeString=function(){return"boolean"},e.prototype.convert=function(e,t){return t.enum?e?t.enum[0]||"Yes":t.enum[1]||"No":e?"Yes":"No"},e}(),be=o;be.locale(localStorage.getItem("langKey"));var ve=function(){function e(){}return e.prototype.getTypeString=function(){return"date"},e.prototype.convert=function(e,t){return e?be(e).format("DD-MM-YYYY, hh:mm A"):"-"},e}(),ye=function(){function e(){}return e.prototype.getTypeString=function(){return"enum"},e.prototype.convert=function(e,t){return t.enum[e]},e}(),Ie=function(){function e(){this.regExpStringRemoveUnderscore=/_/g}return e.prototype.getTypeString=function(){return"stringReplaceUnderscore"},e.prototype.convert=function(e,t){return e.replace(this.regExpStringRemoveUnderscore," ")},e}(),xe=function(){function e(){}return e.prototype.getTypeString=function(){return"relatedFiles"},e.prototype.convert=function(e,t){return e.length||"-"},e}(),we=[new he,new ge,new ve,new ye,new Ie,new xe],Se=function(){function e(){var e=this;this.converters={},this.defaultConverter=new he,we.forEach((function(t){return e.addConverter(t)}))}return e.prototype.get=function(e,t){return t.viewType||(t.viewType=typeof e),void 0!==this.converters[t.viewType]?this.converters[t.viewType].convert(e,t):this.defaultConverter.convert(e,t)},e.prototype.addConverter=function(e){if(void 0!==this.converters[e.getTypeString()])throw new Error("Converter with name "+e.getTypeString()+" already exists");this.converters[e.getTypeString()]=e},e}();Se.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Se},token:Se,providedIn:"root"}),Se.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Se.ctorParameters=function(){return[]};var Ce=function(){function e(e,n){this.viewContentService=e,this.logger=n,this.actions=[],this.rowClicked=new t.EventEmitter,this.paginationClicked=new t.EventEmitter,this.paginationSet=new t.EventEmitter,this.search=new t.EventEmitter,this.sortChanged=new t.EventEmitter,this.headerProvided=!1,this.regExpStringRemoveUnderscore=/_/g,this.sort$=new c.BehaviorSubject({state:{name:"",direction:"DESC"},isSorting:!1}),this.viewListAs=localStorage.getItem("viewListAs")||"table"}return e.prototype.loadPaginationSize=function(){var t=localStorage.getItem(""+this.paginationIdentifier+e.PAGINATION_SIZE);null!==t?(this.pagination.size=+t,this.paginationSet.emit(+t),this.logger.debug("Pagination loaded from local storage for this list. Current: ",t)):this.logger.debug("Pagination does NOT exist in local storage for this list. Will use default. Change it to create an entry."),this.paginationSet.emit()},e.prototype.setPaginationSize=function(t){localStorage.setItem(""+this.paginationIdentifier+e.PAGINATION_SIZE,t),this.pagination.size=t,this.logger.debug("Pagination set in local storage for this list: ",t),this.paginationSet.emit(t)},e.prototype.ngOnInit=function(){this.pagination&&this.loadPaginationSize(),this.initialSortState&&this.sort$.next(this.initialSortState)},e.prototype.ngOnChanges=function(e){e.items&&e.items.currentValue&&this.transformListItemsMatchFields()},e.prototype.ngAfterViewInit=function(){var e=this;this.isSearchable&&c.fromEvent(this.searchBox.nativeElement,"keyup").pipe(g.debounceTime(500)).subscribe((function(){var t=e.searchBox.nativeElement.value;e.search.observers.length>0?e.search.emit(t):e.searchModel=t}))},e.prototype.transformListItemsMatchFields=function(){var e=this;this.items&&this.fields&&this.items.forEach((function(t){t.listItemFields=e.fields.map((function(n){return{key:n.key,label:n.label,value:e.resolveObject(n,t)}}))}))},e.prototype.onClickRow=function(e){this.rowClicked.emit(e)},e.prototype.resolveObject=function(e,t){var n=e.key,i=(n.includes("$.")?n.split("$.")[1]:n).split(".").reduce((function(e,t){return e?e[t]:null}),t||self);return this.viewContentService.get(i,e)},e.prototype.switchView=function(e){localStorage.setItem("viewListAs",e),this.viewListAs=e},e.prototype.getTotalPageCount=function(){return Math.ceil(this.pagination.collectionSize/this.pagination.size)},e.prototype.onClickPagination=function(e){this.paginationClicked.emit(e)},e.prototype.handleFieldClick=function(e,t){var n=this,i="DESC";t&&this.sort$.pipe(g.take(1)).subscribe((function(t){var o;o=t.state.name===e?t.isSorting?t.state.direction===i?Object.assign(Object.assign({},t),{state:Object.assign(Object.assign({},t.state),{direction:"ASC"})}):{state:Object.assign(Object.assign({},t.state),{direction:i}),isSorting:!1}:{state:Object.assign(Object.assign({},t.state),{direction:i}),isSorting:!0}:{state:{name:e,direction:i},isSorting:!0},n.sort$.next(o),n.sortChanged.emit(o)}))},e}();Ce.PAGINATION_SIZE="PaginationSize",Ce.decorators=[{type:t.Component,args:[{selector:"valtimo-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div *ngIf="(items?.length > 0 && fields?.length > 0) || header">\n <div\n class="d-flex align-items-center search-holder bg-light"\n [ngClass]="{\'pb-4 pt-4\': !header}"\n *ngIf="isSearchable || viewMode || header"\n >\n <div class="align-self-start">\n <ng-content select="[header]"></ng-content>\n </div>\n\n <div class="ml-auto row">\n <input\n *ngIf="isSearchable"\n class="form-control col-sm-8"\n type="text"\n placeholder="Search..."\n #searchBox\n />\n\n <div\n class="switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0"\n role="group"\n *ngIf="viewMode"\n >\n <button\n class="btn"\n [ngClass]="viewListAs === \'table\' ? \'btn-primary\' : \'btn-default\'"\n (click)="switchView(\'table\')"\n >\n <i class="mdi mdi-view-headline"></i>\n </button>\n <button\n class="btn"\n [ngClass]="viewListAs === \'tile\' ? \'btn-primary\' : \'btn-default\'"\n (click)="switchView(\'tile\')"\n >\n <i class="mdi mdi-view-module"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select="[tabs]"></ng-content>\n\n <div *ngIf="items?.length > 0 && fields?.length > 0">\n <div class="table-responsive noSwipe" *ngIf="!viewMode || viewListAs === \'table\'">\n <table class="table table-striped table-hover m-0" *ngIf="sort$ | async as sort">\n <thead>\n <tr>\n <th\n *ngFor="let field of fields"\n (click)="handleFieldClick(field.key, field.sortable)"\n [ngClass]="{\n sortable: field.sortable,\n \'is-being-sorted\': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === \'ASC\'\n }"\n >\n {{ field.label }}\n </th>\n <th *ngFor="let action of actions">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]="{\'click-able\': this.rowClicked.observers.length > 0}"\n *ngFor="let item of items | listFilter: searchModel"\n (click)="onClickRow(item)"\n >\n <td class="align-top" *ngFor="let listItemField of item.listItemFields">\n {{ listItemField.value || \'-\' }}\n </td>\n <td class="align-top" *ngFor="let action of actions">\n <i\n style="cursor: pointer"\n [ngClass]="action.iconClass"\n (click)="action.callback(item)"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf="(items | listFilter: searchModel).length === 0" [colSpan]="fields.length">\n {{ \'list.noMatchingItems\' | translate }}<i>"{{ searchModel }}"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class="container-fluid" *ngIf="viewMode && viewListAs === \'tile\'">\n <div class="row p-2">\n <div\n class="col-12 col-sm-6 col-xl-4 p-2"\n *ngFor="let item of items | listFilter: searchModel"\n (click)="onClickRow(item)"\n >\n <div class="click-able tile-holder p-4">\n <dl class="row mb-0" *ngFor="let listItemField of item.listItemFields">\n <dt class="col-12 col-md-5 text-xl-right">{{ listItemField.label }}</dt>\n <dd class="col-12 col-md-7">{{ listItemField.value || \'-\' }}</dd>\n </dl>\n </div>\n </div>\n <div class="col-12" *ngIf="(items | listFilter: searchModel).length === 0">\n {{ \'list.noMatchingItems\' | translate }}<i>"{{ searchModel }}"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class="pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0"\n *ngIf="pagination && items?.length > 0 && fields?.length > 0"\n >\n <div class="float-left page-count col-4">\n <strong>{{\n \'list.currentPage\' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? (\'list.showingResult\' | translate: {number: (items | listFilter: searchModel).length})\n : (\'list.showingResults\'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class="col-4 text-center">\n {{ \'list.show\' | translate }}\n <select [(ngModel)]="pagination.size" (ngModelChange)="setPaginationSize($event)">\n <option [ngValue]="10">10</option>\n <option [ngValue]="25">25</option>\n <option [ngValue]="50">50</option>\n <option [ngValue]="100">100</option>\n </select>\n {{ \'list.entries\' | translate }}\n </div>\n <div class="col-4">\n <ngb-pagination\n *ngIf="pagination.collectionSize > pagination.size"\n class="float-right"\n [collectionSize]="pagination.collectionSize"\n [(page)]="pagination.page"\n [pageSize]="pagination.size"\n [maxSize]="pagination.maxPaginationItemSize"\n [rotate]="true"\n (pageChange)="onClickPagination(pagination.page)"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id="no-results" class="p-5" *ngIf="items?.length === 0">\n {{ \'list.noResults\' | translate }}\n </div>\n\n <div id="no-field-definitions" class="p-5" *ngIf="items?.length > 0 && fields?.length === 0">\n {{ \'list.noFieldDefinitions\' | translate }}\n </div>\n</div>\n',styles:['@charset "UTF-8";\n/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}td:first-child,th:first-child{padding-left:25px}th.sortable{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;user-select:none}th.sortable:after{content:" ";font-family:Font Awesome\\ 5 Free;margin:auto 0 auto 5px;opacity:0;position:absolute;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}']}]}],Ce.ctorParameters=function(){return[{type:Se},{type:a.NGXLogger}]},Ce.propDecorators={items:[{type:t.Input}],fields:[{type:t.Input}],pagination:[{type:t.Input}],viewMode:[{type:t.Input}],isSearchable:[{type:t.Input}],header:[{type:t.Input}],actions:[{type:t.Input}],paginationIdentifier:[{type:t.Input}],initialSortState:[{type:t.Input}],rowClicked:[{type:t.Output}],paginationClicked:[{type:t.Output}],paginationSet:[{type:t.Output}],search:[{type:t.Output}],sortChanged:[{type:t.Output}],searchBox:[{type:t.ViewChild,args:["searchBox"]}]};var Ne=function(){function e(){}return e.prototype.transform=function(e,t){return e=e||[],t?e.filter((function(e){return Object.keys(e).some((function(n){return null!=e[n]&&e[n].toString().toLowerCase().includes(t.toLowerCase())}))})):e},e}();Ne.decorators=[{type:t.Pipe,args:[{name:"listFilter"}]}];var Oe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Oe.decorators=[{type:t.Component,args:[{selector:"valtimo-card",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="card card-border-color card-border-color-primary">\n <div *ngIf="title || subtitle" class="card-header card-header-divider">\n <span *ngIf="title">{{ title }}</span>\n <span *ngIf="subtitle" class="card-subtitle">{{ subtitle }}</span>\n </div>\n <div class="card-body">\n <ng-content></ng-content>\n </div>\n</div>\n',styles:[""]}]}],Oe.ctorParameters=function(){return[]},Oe.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}]};var Te=function(){};Te.decorators=[{type:t.NgModule,args:[{declarations:[Oe],imports:[n.CommonModule],exports:[Oe]}]}];var Le=function(){};Le.decorators=[{type:t.NgModule,args:[{declarations:[Ce,Ne],imports:[n.CommonModule,Te,d.NgbPaginationModule,i.FormsModule,m.TranslateModule],exports:[Ce,Ne]}]}];var Fe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Fe.decorators=[{type:t.Component,args:[{selector:"valtimo-page-header",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="page-head">\n <valtimo-page-title></valtimo-page-title>\n <valtimo-breadcrumb-navigation></valtimo-breadcrumb-navigation>\n</div>\n',styles:[""]}]}],Fe.ctorParameters=function(){return[]};var Me=function(){function e(e,t){this.router=e,this.route=t,this.breadcrumbs=[],this.appTitle="Valtimo",this.routerSub=c.Subscription.EMPTY}return e.prototype.ngOnInit=function(){var e=this;this.setBreadcrumbs(this.route),this.routerSub=this.router.events.pipe(g.filter((function(e){return e instanceof s.NavigationEnd}))).pipe(g.map((function(){return e.route}))).pipe(g.map((function(e){for(;e.firstChild;)e=e.firstChild;return e}))).pipe(g.filter((function(e){return e.outlet===s.PRIMARY_OUTLET}))).subscribe((function(t){e.setBreadcrumbs(t)}))},e.prototype.setBreadcrumbs=function(e){for(;e.firstChild;)e=e.firstChild;if(e.outlet===s.PRIMARY_OUTLET){var t=e.snapshot,n={url:t.url.join("/"),path:t.routeConfig.path,label:t.data.title,params:t.params};this.generateBreadcrumbs(n)}},e.prototype.generateBreadcrumbs=function(e){var t=this;this.breadcrumbs=[],this.router.config.map((function(n){if(0===e.path.indexOf(n.path+"/")&&e.path!==n.path&&""!==n.path){var i={url:n.path.replace(/:(.+?)\b/g,(function(t,n){return e.params[n]})),path:n.path,label:n.data.title,params:e.params};-1===t.breadcrumbs.findIndex((function(e){return e.url===i.url}))&&t.breadcrumbs.push(i)}}))},e.prototype.ngOnDestroy=function(){this.routerSub.unsubscribe()},e}();Me.decorators=[{type:t.Component,args:[{selector:"valtimo-breadcrumb-navigation",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav aria-label="breadcrumb" role="navigation">\n <ol class="breadcrumb page-head-nav">\n <li class="breadcrumb-item">\n <a [routerLink]="[\'/\']">{{ appTitle }}</a>\n </li>\n <li class="breadcrumb-item" *ngFor="let item of breadcrumbs">\n <a [routerLink]="[item.url]">{{ item.label | translate }}</a>\n </li>\n </ol>\n</nav>\n',styles:[""]}]}],Me.ctorParameters=function(){return[{type:s.Router},{type:s.ActivatedRoute}]};var Re=function(){};Re.decorators=[{type:t.NgModule,args:[{declarations:[Me],imports:[n.CommonModule,s.RouterModule,m.TranslateModule],exports:[Me]}]}];var Ae=function(){};Ae.decorators=[{type:t.NgModule,args:[{declarations:[Fe],imports:[n.CommonModule,me,Re],exports:[Fe]}]}];var ke=function(){function e(){}return e.prototype.ngOnInit=function(){this.setCardClassName(),this.setType(),this.setAdditionalClasses(),this.setContrast(),this.setDivider(),this.setCollapse()},e.prototype.toggleContent=function(){this.collapseAble&&(this.isCollapsed=!this.isCollapsed)},e.prototype.setCardClassName=function(){this.cardClassName="card-full-default"},e.prototype.setType=function(){this.type&&(this.cardClassName="card-full-"+this.type)},e.prototype.setAdditionalClasses=function(){this.additionalClasses&&(this.cardClassName=this.cardClassName+" "+this.additionalClasses)},e.prototype.setContrast=function(){this.contrast&&(this.contrastClass="card-header-contrast")},e.prototype.setDivider=function(){this.divider&&(this.dividerClass="card-header-divider")},e.prototype.setCollapse=function(){this.isCollapsed=!(this.collapseAble&&"hide"===this.collapse)},e}();ke.decorators=[{type:t.Component,args:[{selector:"valtimo-widget",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="card card-border card-contrast {{ cardClassName }}">\n <div class="card-header {{ contrastClass }} {{ dividerClass }}" *ngIf="title || subtitle">\n <div class="row">\n <div class="col-7" [ngClass]="{clickable: collapseAble}" (click)="toggleContent()">\n \x3c!-- Title --\x3e\n <div *ngIf="title" class="text-truncate">{{ title }}</div>\n \x3c!-- Sub title --\x3e\n <div *ngIf="subtitle" class="card-subtitle text-truncate">{{ subtitle }}</div>\n </div>\n\n \x3c!-- Tools--\x3e\n <div class="tools col-5 text-right">\n \x3c!-- Collapse content --\x3e\n <a\n class="icon mdi"\n *ngIf="collapseAble"\n [ngClass]="{\'mdi-chevron-up\': isCollapsed, \'mdi-chevron-down\': !isCollapsed}"\n (click)="toggleContent()"\n ></a>\n </div>\n </div>\n </div>\n \x3c!-- content --\x3e\n <div [hidden]="!isCollapsed">\n <ng-content></ng-content>\n </div>\n</div>\n',styles:[".card-contrast .card-header{padding:20px!important}.card-subtitle{margin-bottom:0}.card-full,.card-full .card-subtitle,.card-full .tools .icon{color:#6b6b6b!important}.card-full-warning,.card-full-warning .card-subtitle,.card-full-warning .tools .icon{color:#343a40!important}.card-full-danger,.card-full-danger .card-subtitle,.card-full-danger .tools .icon,.card-full-dark,.card-full-dark .card-subtitle,.card-full-dark .tools .icon,.card-full-info,.card-full-info .card-subtitle,.card-full-info .tools .icon,.card-full-primary,.card-full-primary .card-subtitle,.card-full-primary .tools .icon,.card-full-success,.card-full-success .card-subtitle,.card-full-success .tools .icon{color:#fff!important}.card-contrast .card-body{padding-top:15px}.card-body{padding:15px 20px}.pie-label{font-size:16px!important}.widget.widget-tile svg.ngx-charts{margin-left:-1.5rem!important}svg.ngx-charts{margin:0;padding:0}"]}]}],ke.propDecorators={type:[{type:t.Input}],name:[{type:t.Input}],icon:[{type:t.Input}],contrast:[{type:t.Input}],divider:[{type:t.Input}],title:[{type:t.Input}],subtitle:[{type:t.Input}],collapseAble:[{type:t.Input}],collapse:[{type:t.Input}],additionalClasses:[{type:t.Input}]};var De=function(){};De.decorators=[{type:t.NgModule,args:[{declarations:[ke],imports:[n.CommonModule],exports:[ke]}]}];var Ee=function(){function e(e){this.el=e}return e.prototype.ngAfterContentInit=function(){var e=this;setTimeout((function(){e.el.nativeElement.focus()}),300)},e}();Ee.decorators=[{type:t.Directive,args:[{selector:"[valtimoFieldAutoFocus]"}]}],Ee.ctorParameters=function(){return[{type:t.ElementRef}]};var Pe=function(){};Pe.decorators=[{type:t.NgModule,args:[{declarations:[Ee],exports:[Ee],imports:[n.CommonModule]}]}];var Ue=function(){function e(){this.importDone=new t.EventEmitter,this.heatPoints={data:[]}}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new v,this.bpmnJS.on("import.done",(function(t){if(!t.error){var n=e.bpmnJS.get("canvas"),i=e.bpmnJS.get("eventBus");e.historicActivityInstances&&e.historicActivityInstances.forEach((function(e){n.addMarker(e.activityId,e.endTime?"highlight-overlay-past":"highlight-overlay-current")})),n.zoom("fit-viewport","auto"),(e.heatmapDuration||e.heatmapCount)&&(i.on("canvas.init",(function(){e.heatmapMode&&e.clearHeatmap(),e.getHeatmapData()})),i.on("canvas.viewbox.changing",(function(){e.heatmapMode&&e.clearHeatmap()})),i.on("canvas.viewbox.changed",(function(){e.getHeatmapData()})))}}))},e.prototype.ngAfterContentInit=function(){this.bpmnJS.importXML(this.bpmn20Xml),this.bpmnJS.attachTo(this.el.nativeElement)},e.prototype.getHeatmapData=function(){var e,t,n=this;this.heatPoints={data:[]},this.min=0,this.max=0,this.heatmapDuration?(e=this.heatmapDuration,t="averageDurationInMilliseconds"):this.heatmapCount&&(e=this.heatmapCount,t="totalCount"),e&&(Object.keys(e).forEach((function(i){var o=n.el.nativeElement.querySelector("svg").getBoundingClientRect(),r=n.el.nativeElement.querySelector("g[data-element-id="+i+"]").getBoundingClientRect();n.setMax(i),n.heatPoints.data.push({x:Math.round(r.x-o.x+r.width/2),y:Math.round(r.y-o.y+r.height/2),value:e[i][t],radius:r.width/2}),e[i].count>0&&n.addCounterActiveOverlays(i,e)})),this.heatmapMode&&this.showHeatmap())},e.prototype.setMax=function(e){this.heatmapDuration?this.max=Math.max(this.heatmapDuration[e].averageDurationInMilliseconds,this.max):this.heatmapCount&&(this.max=Math.max(this.heatmapCount[e].totalCount+this.heatmapCount[e].count,this.max))},e.prototype.addCounterActiveOverlays=function(e,t){this.bpmnJS.get("overlays").add(e,{position:{bottom:-10,left:0},show:{minZoom:0,maxZoom:5},html:'<span class="badge badge-pill badge-primary">'+t[e].count+"</span>"})},e.prototype.showHeatmap=function(){this.heatMapInstance=y.create({radius:54,blur:.7,maxOpacity:.4,minOpacity:0,container:this.el.nativeElement}),this.heatMapInstance.setData({min:this.min,max:this.max,data:this.heatPoints.data})},e.prototype.clearHeatmap=function(){this.heatMapInstance.setData({data:[]})},e.prototype.toggleHeatmap=function(){this.heatmapMode=!this.heatmapMode,this.heatmapMode?this.showHeatmap():this.clearHeatmap()},e.prototype.ngOnDestroy=function(){this.bpmnJS.destroy()},e}();Ue.decorators=[{type:t.Component,args:[{selector:"valtimo-bpmn-js-diagram",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="p-4" *ngIf="heatmapDuration || heatmapCount">\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n id="toggleHeatmap"\n [checked]="heatmapMode"\n (click)="toggleHeatmap()"\n /><span> <label for="toggleHeatmap"></label></span>\n </div>\n</div>\n\n<div #ref class="diagram-container"></div>\n\n<div *ngIf="historicActivityInstances" class="p-4 text-center legenda-holder">\n <span\n ><div class="legenda highlight-overlay-past"></div>\n Executed tasks</span\n >\n <span class="ml-3"\n ><div class="legenda highlight-overlay-current"></div>\n Current tasks</span\n >\n</div>\n\n<div *ngIf="heatmapDuration || heatmapCount" class="p-4 text-center legenda-holder">\n <span\n ><span class="badge badge-pill badge-primary">N</span>&nbsp;&nbsp;Amount of currently active\n instances of this task.</span\n >\n <span\n >&nbsp;&nbsp;|&nbsp;&nbsp;Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n</div>\n',styles:[""]}]}],Ue.ctorParameters=function(){return[]},Ue.propDecorators={el:[{type:t.ViewChild,args:["ref",{static:!0}]}],importDone:[{type:t.Output}],bpmn20Xml:[{type:t.Input}],heatmapDuration:[{type:t.Input}],heatmapCount:[{type:t.Input}],historicActivityInstances:[{type:t.Input}]};var je=function(){};je.decorators=[{type:t.NgModule,args:[{declarations:[Ue],imports:[n.CommonModule],exports:[Ue]}]}];var ze=function(){};ze.decorators=[{type:t.Component,args:[{selector:"valtimo-timeline",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div id="no-results" class="p-5" *ngIf="items?.length === 0">No result found</div>\n <div class="pb-5" *ngIf="items?.length > 0">\n <ul class="timeline mb-0 py-5">\n <li class="timeline-item status-done" *ngFor="let item of items">\n <div class="timeline-date">\n <span>{{ item.date }}</span>\n </div>\n <div class="timeline-content mt-1">\n <div class="timeline-header p-0">\n <span class="timeline-time">{{ item.time }}</span>\n <span class="timeline-author">{{ item.user }}</span>\n <br />\n <p class="timeline-activity">{{ item.activity }}</p>\n <div class="timeline-summary">\n <p\n [innerHTML]="item.summaryTranslationKey | translate: item.summaryTranslationParams"\n ></p>\n </div>\n </div>\n </div>\n </li>\n </ul>\n </div>\n</div>\n',styles:[""]}]}],ze.propDecorators={items:[{type:t.Input}]};var Ve=function(){};Ve.decorators=[{type:t.NgModule,args:[{declarations:[ze],imports:[n.CommonModule,m.TranslateModule],exports:[ze]}]}];var $e=function(){};$e.decorators=[{type:t.NgModule}];var Be=function(){function e(){this.filterSidebar=localStorage.getItem("filterSidebar")||"show"}return e.prototype.ngOnInit=function(){"show"===this.filterSidebar&&(localStorage.setItem("filterSidebar","show"),$(".be-content").addClass("be-aside")),$('[data-toggle="tooltip"]').tooltip()},e.prototype.ngOnDestroy=function(){$(".be-content").removeClass("be-aside")},e.prototype.toggleFilterSidebar=function(){var e=$(".be-content");e.toggleClass("be-aside"),this.filterSidebar=e.hasClass("be-aside")?"show":"hide",localStorage.setItem("filterSidebar",this.filterSidebar)},e}();Be.decorators=[{type:t.Component,args:[{selector:"valtimo-filter-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <a\n class="toggle-filter-sidebar"\n data-toggle="tooltip"\n data-trigger="hover"\n data-placement="right"\n title="Show / hide"\n href="javascript:void(0)"\n (click)="toggleFilterSidebar()"\n [ngClass]="this.filterSidebar === \'show\' && \'toggle-expanded\'"\n >\n <div class="icon-container p-0 bg-transparent">\n <i class="click-able icon shadow mdi mdi-filter-list"></i>\n </div>\n </a>\n <aside class="page-aside p-4 mb-4 bg-light filter-holder" *ngIf="this.filterSidebar === \'show\'">\n <ng-content></ng-content>\n </aside>\n</div>\n',styles:[".filter-holder{border:0 solid transparent}.toggle-filter-sidebar{cursor:pointer;font-size:2rem;margin-left:-50px;position:absolute;top:25px;z-index:1}.icon-container .icon{background-color:#fff;color:#6b6b6b}.toggle-filter-sidebar:hover .icon-container .icon{color:#ff5800}@media screen and (min-width:768px){.toggle-filter-sidebar{margin-left:-25px}.page-aside{height:calc(100vh - 61px);left:0;margin-top:0;position:absolute}.toggle-expanded{margin-left:255px}}"]}]}],Be.ctorParameters=function(){return[]};var We=function(){};We.decorators=[{type:t.NgModule,args:[{declarations:[Be],imports:[n.CommonModule],exports:[Be]}]}];var qe=function(){function e(e){this.s3Service=e,this.resources=[],this.resourcesChanged=new t.EventEmitter,this.resourceRegistered=new t.EventEmitter,this.showFileList=!0}return e.prototype.ngOnInit=function(){},e.prototype.onFileFieldChange=function(e){var t,n;try{for(var i=re(e),o=i.next();!o.done;o=i.next()){var r=o.value;this.uploadFile(r)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.uploadFile=function(e){var t=this;this.s3Service.getPreSignedUrl(e.name).subscribe((function(n){var i=new URL(n);t.s3Service.upload(i,e).subscribe((function(n){var o=new I.S3Resource(e,i);t.s3Service.registerResource(o).subscribe((function(e){t.resources.push(e),t.resourceRegistered.emit(e),t.resourcesChanged.emit(t.resources)}))}))}))},e.prototype.deleteResource=function(e){var t=this;this.s3Service.delete(e.id).subscribe((function(n){var i=t.resources.findIndex((function(t){return t.id===e.id}));t.resources.splice(i,1),t.resourcesChanged.emit(t.resources)}))},e}();qe.decorators=[{type:t.Component,args:[{selector:"valtimo-uploader",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div\n class="upload-file-container p-5"\n (click)="fileInput.click()"\n valtimoUploaderDragDrop\n (fileDropped)="onFileFieldChange($event)"\n>\n <span class="align-middle"><i class="fa fa-cloud-upload fa-4x"></i></span>\n <input hidden type="file" #fileInput (change)="onFileFieldChange($event.target.files)" multiple />\n</div>\n<div *ngIf="showFileList">\n <div class="files-list px-3 py-2" *ngFor="let resource of resources">\n <p class="m-0">\n <strong>{{ resource.name }}</strong\n ><br />\n {{ resource.sizeInBytes | filesize }}\n </p>\n <button class="delete-file" (click)="deleteResource(resource)">\n <i class="fa fa-trash text-danger"></i>\n </button>\n </div>\n</div>\n',styles:[".upload-file-container{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:100px;border:2px dashed #d5d8de;color:#d5d8de;margin:0 0 1rem;text-align:center}.upload-file-container i.mdi-cloud-upload{font-size:5em}.upload-file-container:hover{cursor:pointer;opacity:.8}.files-list{background:#fff;border:1px solid #bdc0c7;display:flex;font-size:1em;justify-content:space-between;margin:1rem auto;padding:5px}.files-list .delete-file{background:transparent;border:none;cursor:pointer}.files-list .delete-file i{font-size:1.5em}"]}]}],qe.ctorParameters=function(){return[{type:I.S3Service}]},qe.propDecorators={resourcesChanged:[{type:t.Output}],resourceRegistered:[{type:t.Output}],showFileList:[{type:t.Input}]};var Ye=function(){function e(){this.fileDropped=new t.EventEmitter}return e.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation()},e.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation()},e.prototype.ondrop=function(e){e.preventDefault(),e.stopPropagation();var t=e.dataTransfer.files;t.length>0&&this.fileDropped.emit(t)},e}();Ye.decorators=[{type:t.Directive,args:[{selector:"[valtimoUploaderDragDrop]"}]}],Ye.propDecorators={fileDropped:[{type:t.Output}],onDragOver:[{type:t.HostListener,args:["dragover",["$event"]]}],onDragLeave:[{type:t.HostListener,args:["dragleave",["$event"]]}],ondrop:[{type:t.HostListener,args:["drop",["$event"]]}]};var He=function(){function e(){this.units=["bytes","KB","MB","GB","TB","PB"]}return e.prototype.transform=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=2),isNaN(parseFloat(String(e)))||!isFinite(e))return"?";for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+this.units[n]},e}();He.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var Ge=function(){};Ge.decorators=[{type:t.NgModule,args:[{declarations:[He],imports:[n.CommonModule],exports:[He]}]}];var _e=function(){};_e.decorators=[{type:t.NgModule,args:[{declarations:[qe,Ye],imports:[n.CommonModule,Ge],exports:[qe,Ye]}]}];var Ke=function(){function n(e){var n=this;this.router=e,this.confirmed=new t.EventEmitter,this.subject=new c.Subject,this.router.events.subscribe((function(e){e instanceof s.NavigationStart&&n.clear()}))}return n.prototype.onAlert=function(){return this.subject.asObservable()},n.prototype.success=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Success,confirmations:n,iconClass:i}))},n.prototype.error=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Error,confirmations:n,iconClass:i}))},n.prototype.info=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Info,confirmations:n,iconClass:i}))},n.prototype.warning=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Warning,confirmations:n,iconClass:i}))},n.prototype.notification=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Notification,confirmations:n,iconClass:i}))},n.prototype.modalNotification=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.ModalNotification,confirmations:n,iconClass:i}))},n.prototype.alert=function(e){this.subject.next(e)},n.prototype.clear=function(){this.subject.next(new O({}))},n.prototype.emitAlertConfirmEvent=function(e){this.confirmed.emit(e)},n.prototype.getAlertConfirmChangeEmitter=function(){return this.confirmed},n}();Ke.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ke(t.ɵɵinject(s.Router))},token:Ke,providedIn:"root"}),Ke.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ke.ctorParameters=function(){return[{type:s.Router}]};var Xe=function(){function t(e){this.alertService=e,this.alerts=[],this.autoCloseInMS=5e3}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterContentInit=function(){var e=this;this.subscription=this.alertService.onAlert().subscribe((function(t){t.message?(t.confirmations||(t.confirmations=[]),0===e.alerts.filter((function(e){return e.message===t.message})).length&&e.alerts.push(t),e.inModal(t)&&setTimeout((function(){e.openModal()}),300),e.autoCloseInMS>0&&0===t.confirmations.length&&setTimeout((function(){e.removeAlert(t)}),e.autoCloseInMS)):e.alerts=[]}))},t.prototype.closeModal=function(){$("#modalNotification").modal("hide")},t.prototype.openModal=function(){$("#modalNotification").modal("show")},t.prototype.alertConfirm=function(e,t){e.confirm=t,this.alertService.emitAlertConfirmEvent(e),this.removeAlert(e)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.removeAlert=function(e){this.inModal(e)&&this.closeModal(),this.alerts=this.alerts.filter((function(t){return t.message!==e.message}))},t.prototype.inModal=function(t){if(t)return t.type===e.AlertType.ModalNotification},t.prototype.cssClass=function(t){if(t)switch(t.type){case e.AlertType.Success:return"alert alert-success";case e.AlertType.Error:return"alert alert-danger";case e.AlertType.Info:return"alert alert-info";case e.AlertType.Warning:return"alert alert-warning";case e.AlertType.Notification:case e.AlertType.ModalNotification:return"alert alert-light"}},t.prototype.cssIconClass=function(t){if(t)switch(t.type){case e.AlertType.Success:return"mdi mdi-check";case e.AlertType.Error:return"mdi mdi-close-circle-o";case e.AlertType.Info:return"mdi mdi-info-outline";case e.AlertType.Warning:return"mdi mdi-alert-triangle";case e.AlertType.Notification:case e.AlertType.ModalNotification:return"mdi mdi-notifications"}},t}();Xe.decorators=[{type:t.Component,args:[{selector:"valtimo-alert",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div *ngFor="let alert of alerts" class="{{ cssClass(alert) }} rounded-0 m-0 alert-dismissable">\n <div *ngIf="inModal(alert)">\n \x3c!-- Modal --\x3e\n <div class="modal fade" id="modalNotification" tabindex="-1" role="dialog">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-body p-0">\n <button class="close" type="button" (click)="removeAlert(alert)">\n <span class="mdi mdi-close" aria-hidden="true"></span>\n </button>\n <div class="icon">\n <span class="{{ alert.iconClass || cssIconClass(alert) }}"></span>\n </div>\n <div class="message">\n <div [innerHTML]="alert.message"></div>\n </div>\n </div>\n <div class="modal-footer pt-0" *ngIf="alert.confirmations?.length">\n <button\n class="{{ confirmation.class }} mr-2"\n *ngFor="let confirmation of alert.confirmations"\n (click)="alertConfirm(alert, confirmation.value)"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!inModal(alert)" class="alert-block">\n <div class="icon"><span class="{{ alert.iconClass || cssIconClass(alert) }}"></span></div>\n <div class="message">\n <div [innerHTML]="alert.message"></div>\n <div class="mt-3" *ngIf="alert.confirmations?.length">\n <button\n class="{{ confirmation.class }} mr-2"\n *ngFor="let confirmation of alert.confirmations"\n (click)="alertConfirm(alert, confirmation.value)"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n <button class="close" type="button" (click)="removeAlert(alert)">\n <span class="mdi mdi-close" aria-hidden="true"></span>\n </button>\n </div>\n</div>\n',styles:[".alert-block{display:flex;flex-direction:row;justify-content:space-between}.alert-block .message{width:100%}.alert-block .icon{align-items:center;display:flex}.alert .message{font-size:1.1rem!important;line-height:1.5rem!important;padding:2rem 5rem 2rem 2rem!important}.alert .close{color:#fff!important;opacity:1!important;padding:2rem 2rem 0 0!important;right:0!important}.alert .icon{padding-left:2rem!important}.alert-warning{color:#404040!important}.alert-light .close,.alert-warning .close{color:#404040!important;opacity:1!important}"]}]}],Xe.ctorParameters=function(){return[{type:Ke}]};var Je=function(){};Je.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[Xe],exports:[Xe]}]}];var Ze=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Ze.decorators=[{type:t.Component,args:[{selector:"valtimo-data-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div *ngIf="collection">\n <dl class="row mb-0" *ngFor="let item of collection">\n <dd class="col-12 col-md-4 col-lg-3">{{ item.label }}</dd>\n <dt class="col-12 col-md-8 col-lg-9" [innerHTML]="item.value || \'-\'"></dt>\n </dl>\n</div>\n\n<div *ngIf="object">\n <dl class="row mb-0" *ngFor="let item of object | keyvalue">\n <dd class="col-12 col-md-4 col-lg-3">{{ item.key }}</dd>\n <dt class="col-12 col-md-8 col-lg-9" [innerHTML]="item.value || \'-\'"></dt>\n </dl>\n</div>\n',styles:[""]}]}],Ze.ctorParameters=function(){return[]},Ze.propDecorators={collection:[{type:t.Input}],object:[{type:t.Input}]};var Qe=function(){};Qe.decorators=[{type:t.NgModule,args:[{declarations:[Ze],imports:[n.CommonModule],exports:[Ze]}]}];var et=function(){function e(){this._documentDefinitionName$=new c.BehaviorSubject(void 0),this._currentForm$=new c.BehaviorSubject(void 0)}return Object.defineProperty(e.prototype,"documentDefinitionName$",{get:function(){return this._documentDefinitionName$.asObservable()},enumerable:!1,configurable:!0}),e.prototype.setDocumentDefinitionName=function(e){this._documentDefinitionName$.next(e)},Object.defineProperty(e.prototype,"currentForm$",{get:function(){return this._currentForm$.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentForm",{set:function(e){this._currentForm$.next(e)},enumerable:!1,configurable:!0}),e}();et.decorators=[{type:t.Injectable}];var tt=function(){function e(e,n,i,o,r){this.userProviderService=e,this.logger=n,this.stateService=i,this.route=o,this.translateService=r,this.submission={},this.submit=new t.EventEmitter,this.change=new t.EventEmitter,this.refreshForm=new t.EventEmitter,this.errors=[],this.currentLanguage$=new c.BehaviorSubject(this.translateService.currentLang)}return e.prototype.ngOnInit=function(){var e=this.route.snapshot.paramMap.get("documentDefinitionName"),t=this.form;this.formDefinition=t,this.errors=[],this.formHasLegacyUpload(t)&&this.setInitialToken(),e&&this.stateService.setDocumentDefinitionName(e),this.subscribeFormRefresh(),this.openLanguageSubscription()},e.prototype.ngOnChanges=function(e){var t=e.form.currentValue;this.formDefinition=t,this.reloadForm(),this.formHasLegacyUpload(t)&&this.setInitialToken(),e.formDefinitionRefresh$&&(this.unsubscribeFormRefresh(),this.subscribeFormRefresh())},e.prototype.ngOnDestroy=function(){var e,t;this.unsubscribeFormRefresh(),null===(e=this.tokenRefreshTimerSubscription)||void 0===e||e.unsubscribe(),null===(t=this.languageSubscription)||void 0===t||t.unsubscribe()},e.prototype.reloadForm=function(){this.refreshForm.emit({form:this.formDefinition})},e.prototype.showErrors=function(e){this.errors=e},e.prototype.onSubmit=function(e){this.errors=[],this.submit.emit(e)},e.prototype.formReady=function(e){this.reloadForm(),this.stateService.currentForm=e},e.prototype.onChange=function(e){this.change.emit(e)},e.prototype.formHasLegacyUpload=function(e){return JSON.stringify(e).includes('"type":"file"')},e.prototype.setInitialToken=function(){var e=this;this.userProviderService.getToken().then((function(t){e.setToken(t)}))},e.prototype.setToken=function(e){x.Formio.setToken(e),this.setTimerForTokenRefresh(e),this.logger.debug("New token set for form.io.")},e.prototype.setTimerForTokenRefresh=function(e){var t=this,n=1e3*w(e).exp-Date.now()-1e3;this.tokenRefreshTimerSubscription=c.timer(n).subscribe((function(){t.refreshToken()})),this.logger.debug("Timer for form.io token refresh set for: "+n+"ms.")},e.prototype.refreshToken=function(){var e=this;c.from(this.userProviderService.updateToken(-1)).pipe(g.switchMap((function(){return e.userProviderService.getToken()})),g.take(1)).subscribe((function(t){e.setToken(t)}))},e.prototype.subscribeFormRefresh=function(){var e=this;this.formRefresh$&&(this.formRefreshSubscription=this.formRefresh$.subscribe((function(t){t&&e.refreshForm.emit(t)})))},e.prototype.unsubscribeFormRefresh=function(){this.formRefreshSubscription&&this.formRefreshSubscription.unsubscribe()},e.prototype.openLanguageSubscription=function(){var e=this;this.languageSubscription=this.translateService.stream("key").subscribe((function(){e.currentLanguage$.next(e.translateService.currentLang)}))},e}();tt.decorators=[{type:t.Component,args:[{selector:"valtimo-form-io",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div *ngIf="errors.length > 0" class="alert alert-danger pt-5 pb-5 mb-2">\n <ol>\n <li *ngFor="let error of errors">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n [submission]="submission"\n [form]="formDefinition"\n [refresh]="refreshForm"\n [options]="options"\n [language]="currentLanguage$ | async"\n (submit)="onSubmit($event)"\n (ready)="formReady($event)"\n (change)="onChange($event)"\n ></formio>\n</div>\n',styles:[""]}]}],tt.ctorParameters=function(){return[{type:p.UserProviderService},{type:a.NGXLogger},{type:et},{type:s.ActivatedRoute},{type:m.TranslateService}]},tt.propDecorators={form:[{type:t.Input}],options:[{type:t.Input}],submission:[{type:t.Input}],formRefresh$:[{type:t.Input}],submit:[{type:t.Output}],change:[{type:t.Output}]};var nt=function(){function e(){this.change=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.onChange=function(e){this.change.emit(e)},e}();nt.decorators=[{type:t.Component,args:[{selector:"valtimo-form-io-builder",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <form-builder [form]="form" (change)="onChange($event)"></form-builder>\n</div>\n',styles:[""]}]}],nt.ctorParameters=function(){return[]},nt.propDecorators={form:[{type:t.Input}],change:[{type:t.Output}]};var it={appUrl:"http://localhost:4200",apiUrl:"http://localhost:4200",icons:"fontawesome",formOnly:!1},ot=function(){function e(e){this.stateService=e}return e.prototype.toggleSubmitButton=function(e){this.stateService.currentForm$.pipe(g.take(1)).subscribe((function(t){t.formioElement.nativeElement.getElementsByClassName("formio-component-submit")[0].getElementsByClassName("btn-primary")[0].disabled=e}))},e}();ot.decorators=[{type:t.Injectable}],ot.ctorParameters=function(){return[{type:et}]};var rt=function(){function e(e,n,i,o){this.uploadProviderService=e,this.stateService=n,this.domService=i,this.downloadService=o,this.valueChange=new t.EventEmitter,this.uploading$=new c.BehaviorSubject(!1),this._value=[]}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){Array.isArray(e)&&(this._value=e)},enumerable:!1,configurable:!0}),e.prototype.downloadFile=function(e){var t=this;this.uploadProviderService.getResource(e.data.resourceId).subscribe((function(e){t.downloadService.downloadFile(e.url,e.resource.name)}))},e.prototype.fileSelected=function(e){var t=this;this.domService.toggleSubmitButton(!0),this.uploading$.next(!0),this.stateService.documentDefinitionName$.pipe(g.take(1)).subscribe((function(n){t.uploadProviderService.uploadFile(e,n).subscribe((function(e){t.domService.toggleSubmitButton(!1),t.uploading$.next(!1),t._value.push(e),t.valueChange.emit(t._value)}))}))},e.prototype.deleteFile=function(e){this.domService.toggleSubmitButton(!0),this._value=this._value.filter((function(t){var n;return!(null==t?void 0:t.data)||(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.resourceId)!==e})),this.valueChange.emit(this._value)},e}();rt.decorators=[{type:t.Component,args:[{selector:"valtimo-formio-uploader",template:'<valtimo-dropzone\n (fileSelected)="fileSelected($event)"\n [acceptedFiles]="null"\n [disabled]="disabled"\n [hideFilePreview]="true"\n [hideTitle]="hideTitle"\n [maxFileSize]="maxFileSize"\n [showMaxFileSize]="!hideMaxFileSize"\n [subtitle]="subtitle"\n [title]="title"\n [camera]="camera"\n [uploading]="uploading$ | async"\n></valtimo-dropzone>\n\n<div class="file-preview" *ngFor="let resource of _value">\n <div class="file-preview-name">\n <a href="#" (click)="downloadFile(resource)">\n {{ resource.originalName }}\n </a>\n </div>\n <div class="file-preview-size">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class="file-preview-delete" *ngIf="!disabled">\n <a (click)="deleteFile(resource.data.resourceId)">\n <i class="icon fa fa-trash"></i>\n </a>\n </div>\n</div>\n',styles:[".progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .btn-secondary,::ng-deep .formio-component-valtimo-file .formio-button-add-another{display:none}::ng-deep .formio-component-valtimo-file td{border:none;padding:0!important}::ng-deep .formio-component-valtimo-file .table{border:none;border-collapse:collapse;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{border:1px solid #dee2e6;display:flex;margin-top:-1px}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;cursor:pointer;font-size:1.3846rem;line-height:18px}.file-preview .icon:hover{color:grey}"]}]}],rt.ctorParameters=function(){return[{type:I.UploadProviderService},{type:et},{type:ot},{type:I.DownloadService}]},rt.propDecorators={disabled:[{type:t.Input}],title:[{type:t.Input}],hideTitle:[{type:t.Input}],subtitle:[{type:t.Input}],maxFileSize:[{type:t.Input}],hideMaxFileSize:[{type:t.Input}],camera:[{type:t.Input}],valueChange:[{type:t.Output}],value:[{type:t.Input}]};var st=function(){function e(e){var n=this;this.translateService=e,this.externalError$=new c.BehaviorSubject(""),this.maxFileSize=5,this.showMaxFileSize=!0,this.acceptedFiles=".json",this.clear$=new c.Subject,this.camera=!1,this.fileSelected=new t.EventEmitter,this.file$=new c.BehaviorSubject(void 0),this.showingCamera$=new c.BehaviorSubject(!1),this.error$=new c.BehaviorSubject(""),this.errorMessagesStrings={tooBig:"too big",wrongType:"this type"},this.errorMessage$=c.combineLatest([this.error$,this.translateService.stream("dropzone.error.generic"),this.translateService.stream("dropzone.error.tooBig"),this.translateService.stream("dropzone.error.wrongType")]).pipe(g.map((function(e){var t=se(e,4),i=t[0],o=t[1],r=t[2],s=t[3],a=n.errorMessagesStrings;return i?i.includes(a.tooBig)?r:i.includes(a.wrongType)?s:o:""})))}return e.prototype.ngOnInit=function(){var e=this;this.clearSubscription=this.clear$.subscribe((function(){e.clearFile(),e.clearError()}))},e.prototype.ngAfterViewInit=function(){this.initDropzone()},e.prototype.ngOnDestroy=function(){this.clearSubscription.unsubscribe()},e.prototype.showCamera=function(){this.showingCamera$.next(!0)},e.prototype.webcamImageSaved=function(e){e&&this.setFile(e),this.showingCamera$.next(!1)},e.prototype.initDropzone=function(){var e=this;this.dropzone=new S(this.dropzoneRef.nativeElement,{url:"/",maxFilesize:this.maxFileSize,clickable:this.dropzoneRef.nativeElement,autoProcessQueue:!1,createImageThumbnails:!1,acceptedFiles:this.acceptedFiles,previewTemplate:"<p style='display:none'></p>",accept:function(t){e.dropzone.removeAllFiles(),e.setFile(t)}}),this.setDropzoneEvents()},e.prototype.setDropzoneEvents=function(){var e=this;this.dropzone.on("error",(function(t,n){e.clearFile(),e.error$.next(n.toString())}))},e.prototype.clearFile=function(){this.file$.next(void 0)},e.prototype.clearError=function(){this.error$.next("")},e.prototype.setFile=function(e){this.file$.next(e),this.clearError(),this.fileSelected.emit(e)},e}();st.decorators=[{type:t.Component,args:[{selector:"valtimo-dropzone",template:'<form #dropzone [ngClass]="{disabled: disabled || uploading}" class="dropzone dz-clickable">\n <div class="dz-message">\n <div class="icon"><span class="mdi mdi-cloud-upload"></span></div>\n <ng-container *ngTemplateOutlet="body"></ng-container>\n <ng-container *ngIf="uploading">\n <ng-container *ngTemplateOutlet="progressBar"></ng-container>\n </ng-container>\n <div class="dropzone-mobile-trigger needsclick"></div>\n </div>\n <button\n (click)="showCamera()"\n *ngIf="camera"\n type="button"\n class="btn btn-primary px-3 webcam-button"\n >\n <i class="fa fa-camera" aria-hidden="true"></i>\n </button>\n <ng-container *ngIf="showingCamera$ | async">\n <ng-container *ngTemplateOutlet="webcam"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf="!hideTitle" class="mb-4 mt-2">{{ title || (\'dropzone.drop\' | translate) }}</h2>\n <span *ngIf="subtitle" class="note mb-3">{{ subtitle }}</span>\n <span *ngIf="showMaxFileSize" class="note mb-3 small-font"\n >{{ \'dropzone.maxFileSize\' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet="preview"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf="{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs"\n >\n <ng-container *ngIf="obs.externalError || obs.errorMessage">\n <div class="alert alert-danger mt-2 mb-0">\n <div class="message">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf="!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage">\n <div class="file">\n <i class="icon mdi mdi-file-text mr-2"></i>\n <span class="note">{{ obs.file.name }}</span>\n <span class="note file-size">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class="progress-bar-container">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)="webcamImageSaved($event)"></valtimo-webcam>\n</ng-template>\n',styles:["form.dropzone{padding:30px 20px}form.dropzone h2{font-size:2rem;text-align:center}form.dropzone.disabled{cursor:default;opacity:.7;pointer-events:none}form.dropzone.preview{border:none;padding:15px 20px}.dz-message{align-items:center;display:flex;flex-direction:column}.dropzone-mobile-trigger{cursor:pointer}.alert-light{align-items:center;display:flex}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;margin-bottom:0;padding:0;width:auto}form.dropzone .message{padding:1.385rem 2.1542rem}.file{align-items:center;display:flex;flex-direction:row;font-size:1.5rem}.small-font{color:#959595;font-size:1rem}.file-size{margin-left:5px}.progress-bar-container{bottom:0;height:auto;position:absolute;width:100%}.webcam-button{position:absolute;right:10px;top:10px}"]}]}],st.ctorParameters=function(){return[{type:m.TranslateService}]},st.propDecorators={dropzoneRef:[{type:t.ViewChild,args:["dropzone"]}],title:[{type:t.Input}],hideTitle:[{type:t.Input}],subtitle:[{type:t.Input}],externalError$:[{type:t.Input}],maxFileSize:[{type:t.Input}],showMaxFileSize:[{type:t.Input}],acceptedFiles:[{type:t.Input}],clear$:[{type:t.Input}],disabled:[{type:t.Input}],hideFilePreview:[{type:t.Input}],uploading:[{type:t.Input}],camera:[{type:t.Input}],fileSelected:[{type:t.Output}]};var at=function(){};at.decorators=[{type:t.Component,args:[{selector:"valtimo-progress-bar",template:'<div class="progress" style="position: relative">\n <div class="progress-bar progress-bar-striped indeterminate"></div>\n</div>\n',styles:[".progress-bar.indeterminate{-webkit-animation:progress-indeterminate 3s linear infinite;animation:progress-indeterminate 3s linear infinite;position:relative}@-webkit-keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}@keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}"]}]}];var lt=function(){};lt.decorators=[{type:t.NgModule,args:[{declarations:[at],imports:[n.CommonModule],exports:[at]}]}];var ct=function(){function e(){this.imageSaved=new t.EventEmitter,this.showing$=new c.BehaviorSubject(!1),this.stream$=new c.BehaviorSubject(void 0),this.picture$=new c.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){var e=this,t=this.getVideoElement();setTimeout((function(){e.toggleFade()})),navigator.mediaDevices.getUserMedia&&navigator.mediaDevices.getUserMedia({video:!0}).then((function(n){t.srcObject=n,e.stream$.next(n)}))},e.prototype.captureImage=function(){var e=this.getVideoElement(),t=document.querySelector("#canvas");t.width=640,t.height=480,t.getContext("2d").drawImage(e,0,0,t.width,t.height);var n=t.toDataURL("image/jpeg");return this.picture$.next({file:this.dataURItoFile(n),uri:n}),!1},e.prototype.clearImage=function(){return this.picture$.next(void 0),!1},e.prototype.close=function(e){return void 0===e&&(e=!0),e||this.clearImage(),this.toggleFade(),this.emitOnTimeOut(),!1},e.prototype.stopStream=function(){this.stream$.pipe(g.take(1)).subscribe((function(e){e&&e.getTracks().forEach((function(e){return e.stop()}))}))},e.prototype.getVideoElement=function(){return document.querySelector("#videoElement")},e.prototype.emitOnTimeOut=function(){var e=this;setTimeout((function(){var t;e.stopStream(),e.imageSaved.emit(null===(t=e.picture$.getValue())||void 0===t?void 0:t.file)}),250)},e.prototype.toggleFade=function(){this.showing$.next(!this.showing$.getValue())},e.prototype.dataURItoFile=function(e){for(var t=atob(e.split(",")[1]),n=[],i=0;i<t.length;i++)n.push(t.charCodeAt(i));var o=new Blob([new Uint8Array(n)],{type:"image/jpeg"}),r="IMG_"+(new Date).toISOString().replace(/[-:.]/g,"")+".jpg";return new File([o],r)},e}();ct.decorators=[{type:t.Component,args:[{selector:"valtimo-webcam",template:'<div\n (click)="close(false)"\n *ngIf="{picture: picture$ | async, stream: stream$ | async} as obs"\n [ngClass]="{showing: showing$ | async}"\n class="webcam-overlay"\n>\n <div (click)="(false); $event.stopPropagation()" class="inner-container">\n <div class="webcam-container modal-content">\n <div class="video-container">\n <video autoplay="true" id="videoElement"></video>\n <canvas id="canvas"></canvas>\n <img *ngIf="obs.picture?.uri" [src]="obs.picture?.uri" />\n </div>\n <div class="button-container">\n <div class="picture-btn">\n <button\n (click)="captureImage()"\n [disabled]="obs.picture?.file || !obs.stream"\n class="btn btn-primary btn-lg"\n >\n <i class="fa fa-camera"></i>{{ \'webcam.takePicture\' | translate }}\n </button>\n </div>\n <div class="new-btn">\n <button (click)="clearImage()" [disabled]="!obs.picture?.file" class="btn btn-primary">\n <i class="fa fa-undo"></i>{{ \'webcam.redo\' | translate }}\n </button>\n </div>\n <div class="save-btn">\n <button (click)="close()" [disabled]="!obs.picture?.file" class="btn btn-primary">\n <i class="fa fa-save"></i>{{ \'webcam.save\' | translate }}\n </button>\n </div>\n </div>\n </div>\n <div class="modal-header">\n <button (click)="close(false)" aria-label="Close" class="close"><span>×</span></button>\n </div>\n </div>\n</div>\n',styles:[".webcam-overlay{align-items:center;background-color:rgba(0,0,0,.65);display:flex;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transition:opacity .15s linear;width:100%;z-index:9999}.showing{opacity:1}.webcam-container{padding:20px}.button-container{align-items:center;display:flex;height:30px;justify-content:space-evenly;margin-bottom:10px;margin-top:20px}.button-container i{margin-right:5px}.new-btn,.picture-btn,.save-btn{display:flex;justify-content:center;position:absolute}.new-btn,.save-btn{width:calc(50% - 65px)}.picture-btn{left:0;width:100%}.new-btn{left:0}.save-btn{right:0}.modal-header{color:grey;margin-top:35px;padding:0;position:absolute;right:-18px;top:0}.close{color:grey}.inner-container{position:relative}.video-container{height:495px;overflow:hidden}.video-container img,.video-container video{height:495px;position:absolute;width:660px}.video-container img{-o-object-fit:cover;object-fit:cover}#canvas{display:none}"]}]}],ct.propDecorators={imageSaved:[{type:t.Output}]};var ut=function(){};ut.decorators=[{type:t.NgModule,args:[{declarations:[ct],imports:[n.CommonModule,m.TranslateModule],exports:[ct]}]}];var pt=function(){};pt.decorators=[{type:t.NgModule,args:[{declarations:[st],imports:[n.CommonModule,m.TranslateModule,Ge,lt,ut],exports:[st]}]}];var dt=it,mt=function(){};mt.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,x.FormioModule,pt,m.TranslateModule,u.DocumentModule,Ge,I.ResourceModule,s.RouterModule],declarations:[tt,nt,rt],exports:[tt,nt,rt],providers:[et,ot,{provide:x.FormioAppConfig,useValue:dt}]}]}];var ft=function(){function e(){this.title="",this.subtitle="",this.showFooter=!1}return e.prototype.ngAfterViewInit=function(){$("#"+this.elementId).modal({show:!1})},e.prototype.show=function(){$("#"+this.elementId).modal("show")},e.prototype.hide=function(){$("#"+this.elementId).modal("hide")},e}();ft.decorators=[{type:t.Component,args:[{selector:"valtimo-modal",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="modal fade custom-width" [id]="elementId" role="dialog" aria-modal="true">\n <div class="modal-dialog modal-lg">\n <div class="modal-content">\n <div class="modal-header modal-header-colored colored-header-grey">\n <div class="modal-title">\n <h4 class="title-text mb-2">{{ title }}</h4>\n <h5 class="subtitle-text">{{ subtitle }}</h5>\n <ng-container *ngIf="templateBelowSubtitle">\n <ng-container *ngTemplateOutlet="templateBelowSubtitle"></ng-container>\n </ng-container>\n </div>\n <div class="text-right">\n <img src="assets/modal/header-image.png" class="modal-header-image" />\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n </div>\n <div class="modal-body">\n <ng-content select="[body]"></ng-content>\n </div>\n <div class="modal-footer" *ngIf="showFooter">\n <ng-content select="[footer]"></ng-content>\n </div>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{border-bottom:1px solid #c5c6c9;padding-bottom:.66rem}@media (min-width:768px){.close{left:25px;margin-top:-20px!important;padding:0!important;position:relative}.close span{color:#fff}.modal-content{overflow:visible}}']}]}],ft.ctorParameters=function(){return[]},ft.propDecorators={elementId:[{type:t.Input}],title:[{type:t.Input}],subtitle:[{type:t.Input}],templateBelowSubtitle:[{type:t.Input}],showFooter:[{type:t.Input}]};var ht=function(){};ht.decorators=[{type:t.NgModule,args:[{declarations:[ft],imports:[n.CommonModule],exports:[ft]}]}];var gt=function(){this.useBootstrapSpinner=!0,this.type="ball-clip-rotate",this.size="medium",this.color="currentColor",this.bdColor="rgba(0,0,0,0)",this.fullScreen=!1,this.noMarginTop=!1};gt.decorators=[{type:t.Component,args:[{selector:"valtimo-spinner",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-container *ngIf="useBootstrapSpinner; else ngxSpinner">\n <div class="spinner-container" [ngClass]="{\'no-margin-top\': noMarginTop}">\n <div class="spinner-border text-primary" role="status">\n <span class="sr-only">{{ \'interface.loading\' | translate }}</span>\n </div>\n </div>\n</ng-container>\n\n<ng-template #ngxSpinner>\n <ngx-spinner\n [bdColor]="bdColor"\n [fullScreen]="fullScreen"\n [name]="name"\n [color]="color"\n [size]="size"\n [type]="type"\n >\n </ngx-spinner>\n</ng-template>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.spinner-container{display:flex;justify-content:center;margin-top:30px;width:100%}.spinner-container.no-margin-top{margin-top:0}']}]}],gt.propDecorators={useBootstrapSpinner:[{type:t.Input}],name:[{type:t.Input}],type:[{type:t.Input}],size:[{type:t.Input}],color:[{type:t.Input}],bdColor:[{type:t.Input}],fullScreen:[{type:t.Input}],noMarginTop:[{type:t.Input}]};var bt=function(){};bt.decorators=[{type:t.NgModule,args:[{declarations:[gt],exports:[gt],imports:[n.CommonModule,C.NgxSpinnerModule,m.TranslateModule]}]}];var vt=function(){function e(){this.width=250,this.itemSelected=new t.EventEmitter,this.searchId="search",this.searchTerm=new i.FormControl(""),this.focusedItemId$=new c.BehaviorSubject(this.searchId),this.open$=new c.BehaviorSubject(!1),this.filteredItems$=new c.BehaviorSubject(void 0),this.wasInside=!1,this.mouseOnList$=new c.BehaviorSubject(!1)}return e.prototype.clickInside=function(){this.wasInside=!0},e.prototype.clickout=function(){this.wasInside||this.closeDropdown(),this.wasInside=!1},e.prototype.ngOnInit=function(){this.openKeysSubscription(),this.openSearchSubscription()},e.prototype.ngOnChanges=function(e){var t=e.items,n=t.currentValue;t&&!t.previousValue&&n&&this.filteredItems$.next(n)},e.prototype.ngOnDestroy=function(){this.keySubscription.unsubscribe(),this.searchSubscription.unsubscribe()},e.prototype.openDropdown=function(){this.open$.next(!0)},e.prototype.hoverOverButton=function(e){this.focusedItemId$.next(e)},e.prototype.mouseEnterList=function(){this.mouseOnList$.next(!0)},e.prototype.mouseLeaveList=function(){this.mouseOnList$.next(!1)},e.prototype.resetFocus=function(){this.focusedItemId$.next(this.searchId)},e.prototype.submit=function(e){this.itemSelected.emit(e)},e.prototype.closeDropdown=function(){this.searchTerm.setValue(""),this.resetFocus(),this.open$.next(!1)},e.prototype.openKeysSubscription=function(){var e=this;this.keySubscription=c.fromEvent(document,"keyup").pipe(g.debounceTime(50)).subscribe((function(t){c.combineLatest([e.mouseOnList$,e.filteredItems$,e.focusedItemId$]).pipe(g.take(1)).subscribe((function(n){var i=se(n,3),o=i[0],r=i[1],s=i[2],a=r.length,l=r.findIndex((function(e){return e.id===s})),c=t.code,u=t.shiftKey;"Escape"===c&&e.closeDropdown(),"Enter"===c&&s!==e.searchId&&e.submit(s),a>0&&!o&&("ArrowDown"===c||"Tab"===c&&!u?s===e.searchId?(e.focusedItemId$.next(r[0].id),e.scrollButtonIntoView(s)):l+1<a&&(e.focusedItemId$.next(r[l+1].id),e.scrollButtonIntoView(s)):("ArrowUp"===c||"Tab"===c&&u)&&s!==e.searchId&&(l>0?(e.focusedItemId$.next(r[l-1].id),e.scrollButtonIntoView(s)):e.resetFocus()))}))}))},e.prototype.openSearchSubscription=function(){var e=this;this.searchSubscription=this.searchTerm.valueChanges.subscribe((function(t){e.focusedItemId$.pipe(g.take(1)).subscribe((function(n){if(t){var i=e.items.filter((function(e){return e.text.toUpperCase().includes(t.toUpperCase())}));e.filteredItems$.next(i),0!==i.length&&i.some((function(e){return e.id===n}))||e.resetFocus()}else e.filteredItems$.next(e.items);setTimeout((function(){e.scrollButtonIntoView(n)}))}))}))},e.prototype.scrollButtonIntoView=function(e){var t=this;this.filteredItems$.pipe(g.take(1)).subscribe((function(n){var i=n.findIndex((function(t){return t.id===e})),o=t.buttons.toArray()[i];o&&o.nativeElement.scrollIntoView({behavior:"smooth",block:"center"})}))},e}();vt.decorators=[{type:t.Component,args:[{selector:"valtimo-searchable-dropdown",template:'<ng-container *ngIf="buttonText && items">\n <ng-container [ngTemplateOutlet]="(open$ | async) ? opened : closed"> </ng-container>\n</ng-container>\n\n<ng-template #closed>\n <ng-container *ngIf="style === \'button\' || !style">\n <button\n class="btn btn-primary btn-sm dropdown-size"\n (click)="openDropdown()"\n [style.width.px]="width"\n >\n {{ buttonText }}\n </button>\n </ng-container>\n <ng-container *ngIf="style === \'underlinedText\'">\n <h5 class="underline-button" (click)="openDropdown()" [style.width.px]="width">\n <b>\n {{ buttonText }}\n </b>\n </h5>\n </ng-container>\n</ng-template>\n\n<ng-template #opened>\n <div class="dropdown-container" [style.width.px]="width">\n <div class="dropdown-size search" [style.width.px]="width">\n <input\n #search\n [ngClass]="{disabled: disabled}"\n [placeholder]="searchText"\n [formControl]="searchTerm"\n />\n {{ search.focus() }}\n </div>\n <div class="dropdown-list" (mouseenter)="mouseEnterList()" (mouseleave)="mouseLeaveList()">\n <ng-container *ngIf="filteredItems$ | async as filteredItems">\n <ng-container\n *ngIf="\n filteredItems.length > 0 && focusedItemId$ | async as focusedItemId;\n else noResults\n "\n >\n <button\n #button\n *ngFor="let item of filteredItems"\n [ngClass]="{focus: focusedItemId === item.id, disabled: disabled}"\n class="dropdown-button dropdown-size"\n (click)="submit(item.id)"\n (mouseenter)="hoverOverButton(item.id)"\n (mouseleave)="resetFocus()"\n [style.width.px]="width"\n >\n <span class="dropdown-button-text">\n {{ item.text }}\n </span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container [ngTemplateOutlet]="space"> </ng-container>\n</ng-template>\n\n<ng-template #noResults>\n <div class="dropdown-button dropdown-size disabled" [style.width.px]="width">\n <span class="dropdown-button-text">{{ noResultsText }}</span>\n </div>\n</ng-template>\n\n<ng-template #space>\n <div *ngIf="style === \'button\' || !style" class="dropdown-size" [style.width.px]="width"></div>\n <h5 *ngIf="style === \'underlinedText\'" class="underline-button"><b>-</b></h5>\n</ng-template>\n',styles:[".dropdown-size{height:34px;width:250px}.underline-button{cursor:pointer;text-decoration:underline;width:250px}.dropdown-container{background-color:#fff;border:1px solid #e3e3e3;border-radius:3px;box-shadow:0 0 6px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;max-height:300px;overflow:hidden;padding:7px 0;position:fixed;width:250px;z-index:999}.dropdown-list{list-style:none;margin:0;overflow:auto;overflow-x:hidden;padding:0;z-index:9999}.search{align-items:center;border-bottom:1px solid #dee2e6;display:flex;flex-shrink:0;height:44px;padding:8px 24px}.search input{padding:0;width:100%}.dropdown-button,.search input,.search input:focus{border:none;outline:none}.dropdown-button{align-items:center;background-color:#fff;color:#504e4e;cursor:pointer;display:flex;font-size:1rem;font-weight:400;padding:8px 24px}.dropdown-button.focus{background-color:#f5f5f5}.dropdown-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled{color:#959595;cursor:default;pointer-events:none}"]}]}],vt.propDecorators={style:[{type:t.Input}],items:[{type:t.Input}],buttonText:[{type:t.Input}],searchText:[{type:t.Input}],noResultsText:[{type:t.Input}],disabled:[{type:t.Input}],width:[{type:t.Input}],itemSelected:[{type:t.Output}],buttons:[{type:t.ViewChildren,args:["button"]}],clickInside:[{type:t.HostListener,args:["click"]}],clickout:[{type:t.HostListener,args:["document:click"]}]};var yt=function(){};yt.decorators=[{type:t.NgModule,args:[{declarations:[vt],imports:[n.CommonModule,i.ReactiveFormsModule],exports:[vt]}]}];var It="valtimo-file",xt={type:It,selector:"valtimo-form-io-uploader",title:"Valtimo File Upload",group:"basic",icon:"upload",emptyValue:[],editForm:function(){return{components:[{key:"type",type:"hidden"},{type:"textfield",input:!0,key:"label",label:"Label",placeholder:"Label",validate:{required:!0}},{type:"textfield",input:!0,key:"key",label:"Property Name",placeholder:"Property Name",tooltip:"The name of this field in the API endpoint.",validate:{required:!0}},{type:"textfield",input:!0,key:"customOptions.title",label:"Title",placeholder:"Title",tooltip:"Leave empty to use the default title",validate:{required:!1}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.hideTitle",label:"Hide title",validate:{required:!1}},{type:"textfield",input:!0,key:"customOptions.subtitle",label:"Subtitle",placeholder:"Title",tooltip:"Leave empty to hide subtitle",validate:{required:!1}},{type:"number",input:!0,key:"customOptions.maxFileSize",label:"Maximum file size",placeholder:"Maximum file size",defaultValue:5,validate:{required:!0}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.hideMaxFileSize",label:"Hide maximum file size",validate:{required:!1}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.camera",label:"Allow camera uploads",validate:{required:!1}}]}}};var wt=function(){function e(){this.width=250,this.itemSelected=new t.EventEmitter,this.clearSelection=new t.EventEmitter}return e.prototype.onSelect=function(e){this.itemSelected.emit(e)},e.prototype.onClearSelection=function(){this.clearSelection.emit()},e}();wt.decorators=[{type:t.Component,args:[{selector:"valtimo-searchable-dropdown-select",template:'<valtimo-searchable-dropdown\n *ngIf="!hasSelection; else selection"\n [style]="style"\n [items]="items"\n [buttonText]="buttonText"\n [searchText]="searchText"\n [noResultsText]="noResultsText"\n [disabled]="disabled"\n [width]="width"\n (itemSelected)="onSelect($event)"\n>\n</valtimo-searchable-dropdown>\n\n<ng-template #selection>\n <div\n class="d-flex flex-row align-items-center"\n [style.height.px]="style === \'button\' ? 34 : null"\n >\n <h5 class="selected-text">\n {{ selectedText }} <b>{{ selectedTextValue }}</b>\n </h5>\n <button\n type="button"\n class="close p-0 m-0 ml-2 d-flex text-danger"\n aria-label="Close"\n (click)="onClearSelection()"\n [title]="clearSelectionButtonTitle"\n >\n <i class="clear-icon fa fa-times text-danger"></i>\n </button>\n </div>\n</ng-template>\n',styles:[".selected-text{margin:0}.clear-icon{font-size:13px}"]}]}],wt.propDecorators={style:[{type:t.Input}],items:[{type:t.Input}],buttonText:[{type:t.Input}],searchText:[{type:t.Input}],noResultsText:[{type:t.Input}],disabled:[{type:t.Input}],selectedText:[{type:t.Input}],selectedTextValue:[{type:t.Input}],clearSelectionButtonTitle:[{type:t.Input}],hasSelection:[{type:t.Input}],width:[{type:t.Input}],itemSelected:[{type:t.Output}],clearSelection:[{type:t.Output}]};var St=function(){};St.decorators=[{type:t.NgModule,args:[{declarations:[wt],imports:[n.CommonModule,i.ReactiveFormsModule,yt],exports:[wt]}]}],e.Alert=O,e.AlertComponent=Xe,e.AlertModule=Je,e.AlertService=Ke,e.AlertsOptionsImpl=T,e.BpmnJsDiagramComponent=Ue,e.BpmnJsDiagramModule=je,e.BreadcrumbNavigationComponent=Me,e.BreadcrumbNavigationModule=Re,e.CamundaFormComponent=M,e.CamundaFormModule=K,e.CardComponent=Oe,e.CardModule=Te,e.ComponentsModule=$e,e.DataListComponent=Ze,e.DataListModule=Qe,e.DropzoneComponent=st,e.DropzoneModule=pt,e.FieldAutoFocusDirective=Ee,e.FieldAutoFocusModule=Pe,e.FileSizeModule=Ge,e.FileSizePipe=He,e.FilterSidebarComponent=Be,e.FilterSidebarModule=We,e.FormIoModule=mt,e.FormIoUploaderComponent=rt,e.FormioBuilderComponent=nt,e.FormioComponent=tt,e.FormioOptionsImpl=L,e.LeftSidebarComponent=pe,e.LeftSidebarModule=fe,e.ListComponent=Ce,e.ListFilterPipe=Ne,e.ListModule=Le,e.MenuModule=ie,e.MenuRoutingModule=Q,e.MenuService=Z,e.ModalComponent=ft,e.ModalModule=ht,e.PageHeaderComponent=Fe,e.PageHeaderModule=Ae,e.PageTitleComponent=de,e.PageTitleModule=me,e.ProgressBarComponent=at,e.ProgressBarModule=lt,e.RightSidebarComponent=le,e.RightSidebarModule=ue,e.SearchableDropdownComponent=vt,e.SearchableDropdownModule=yt,e.SearchableDropdownSelectComponent=wt,e.SearchableDropdownSelectModule=St,e.SpinnerModule=bt,e.TimelineComponent=ze,e.TimelineItemImpl=F,e.TimelineModule=Ve,e.TopbarComponent=X,e.TopbarModule=J,e.UploaderComponent=qe,e.UploaderDragDropDirective=Ye,e.UploaderModule=_e,e.ViewContentService=Se,e.WebcamComponent=ct,e.WebcamModule=ut,e.WidgetComponent=ke,e.WidgetModule=De,e.customUploaderType=It,e.menuInitializer=function(e,t){var n=e.get(Z);return function(){return new Promise((function(e,i){try{t.debug("menu initializer before init"),n.init(),t.debug("menu initializer after init"),e()}catch(e){t.debug("menu initializer error",e),i(e)}}))}},e.registerFormioUploadComponent=function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.setValue=function(e){return this._customAngularElement.value=e,!0},t}(x.createCustomFormioComponent(xt));x.registerCustomFormioComponentWithClass(xt,rt,t,e)},e.ɵ0=ce,e.ɵa=_,e.ɵb=U,e.ɵc=j,e.ɵd=V,e.ɵe=E,e.ɵf=H,e.ɵg=B,e.ɵh=W,e.ɵi=q,e.ɵj=Y,e.ɵk=G,e.ɵl=P,e.ɵm=A,e.ɵn=R,e.ɵo=ee,e.ɵp=te,e.ɵq=ne,e.ɵr=ae,e.ɵs=et,e.ɵt=ot,e.ɵu=it,e.ɵv=gt,Object.defineProperty(e,"__esModule",{value:!0})}));
16
+ var re=function(e,t){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},re(e,t)};Object.create;function se(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 ae(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}Object.create;var le=function(){function e(e){this.http=e}return e.prototype.getVersion=function(){return this.http.get("/api/valtimo/version")},e}();le.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new le(t.ɵɵinject(f.HttpClient))},token:le,providedIn:"root"}),le.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],le.ctorParameters=function(){return[{type:f.HttpClient}]};var ce=function(){function e(e,t,n,i,o,r,s){this.userProviderService=e,this.formBuilder=t,this.versionService=n,this.translate=i,this.contextService=o,this.http=r,this.logger=s}return e.prototype.ngOnInit=function(){this.frequencies=["emailNotificationOnMonday","emailNotificationOnTuesday","emailNotificationOnWednesday","emailNotificationOnThursday","emailNotificationOnFriday","emailNotificationOnSaturday","emailNotificationOnSunday"],this.settingsForm=this.formBuilder.group({taskNotifications:new i.FormControl(!1),emailNotifications:new i.FormControl(!1),emailNotificationOnMonday:new i.FormControl(!1),emailNotificationOnTuesday:new i.FormControl(!1),emailNotificationOnWednesday:new i.FormControl(!1),emailNotificationOnThursday:new i.FormControl(!1),emailNotificationOnFriday:new i.FormControl(!1),emailNotificationOnSaturday:new i.FormControl(!1),emailNotificationOnSunday:new i.FormControl(!1)}),this.getUserSettings()},e.prototype.loadContextSwitch=function(){var e=this;c.combineLatest([this.contextService.getUserContexts(),this.contextService.getUserContextActive()]).subscribe((function(t){var n=ae(t,2),i=n[0],o=n[1];e.userContextActive=o,e.userContexts=i}))},e.prototype.setUserContext=function(e){this.contextService.setUserContext(e).subscribe(),location.href="/"},e.prototype.loadUserSettingsTab=function(){var e=this;this.userProviderService.getEmailNotificationSettings().subscribe((function(t){null!==t?(e.settingsForm.controls.taskNotifications.setValue(t.taskNotifications),e.settingsForm.controls.emailNotifications.setValue(t.emailNotifications),e.settingsForm.controls.emailNotificationOnMonday.setValue(t.emailNotificationOnMonday),e.settingsForm.controls.emailNotificationOnTuesday.setValue(t.emailNotificationOnTuesday),e.settingsForm.controls.emailNotificationOnWednesday.setValue(t.emailNotificationOnWednesday),e.settingsForm.controls.emailNotificationOnThursday.setValue(t.emailNotificationOnThursday),e.settingsForm.controls.emailNotificationOnFriday.setValue(t.emailNotificationOnFriday),e.settingsForm.controls.emailNotificationOnSaturday.setValue(t.emailNotificationOnSaturday),e.settingsForm.controls.emailNotificationOnSunday.setValue(t.emailNotificationOnSunday)):e.settingsForm.controls.taskNotifications.setValue(!0)})),this.getVersion()},e.prototype.getUserSettings=function(){var e=this;this.userProviderService.getUserSubject().subscribe((function(t){e.logger.debug("user",t),e.userIdentity=t,e.loadContextSwitch()}))},e.prototype.getVersion=function(){var e=this;this.versionService.getVersion().subscribe((function(t){e.build=t}))},e.prototype.onSettingsSubmit=function(){this.settingsForm.pristine||this.userProviderService.updateEmailNotificationSettings(this.settingsForm.value).subscribe()},e.prototype.updateUserLanguage=function(e){this.translate.use(e).subscribe((function(){localStorage.setItem("langKey",e)}))},e.prototype.logout=function(){this.userProviderService.logout()},e}();ce.decorators=[{type:t.Component,args:[{selector:"valtimo-right-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav class="be-right-sidebar">\n <div class="sb-content">\n <div class="tab-navigation">\n <ul class="nav nav-tabs nav-justified" role="tablist">\n <li class="nav-item" role="presentation">\n <a\n class="nav-link active"\n href="#account"\n aria-controls="account"\n role="tab"\n data-toggle="tab"\n translate="account.title"\n ></a>\n </li>\n <li class="nav-item" role="presentation">\n <a\n class="nav-link"\n (click)="loadUserSettingsTab()"\n href="#settings"\n aria-controls="settings"\n role="tab"\n data-toggle="tab"\n translate="settings.title"\n ></a>\n </li>\n </ul>\n </div>\n <div class="tab-panel">\n <div class="tab-content">\n \x3c!-- account --\x3e\n <div class="tab-pane tab-account active" id="account" role="tabpanel">\n <div class="p-3 be-scroller-settings" *ngIf="userIdentity">\n <div class="content">\n <div class="category-title border-0 m-0">\n <div class="p-0 text-muted">\n <dl class="row mb-0">\n <dt class="col-sm-3">Email</dt>\n <dd class="col-sm-9 mb-0 text-bold">{{ userIdentity.email }}</dd>\n <ng-container *ngIf="userIdentity.username">\n <dt class="col-sm-3">Username</dt>\n <dd class="col-sm-9 mb-0 text-bold">{{ userIdentity.username }}</dd>\n </ng-container>\n <dt class="col-sm-3">Name</dt>\n <dd class="col-sm-9 mb-0 text-bold">\n {{ userIdentity.firstName + \' \' + userIdentity.lastName }}\n </dd>\n </dl>\n </div>\n </div>\n \x3c!-- context switch --\x3e\n <ul class="settings-list" *ngIf="userContexts?.length > 1">\n <li ngbTooltip="{{ \'settings.context.title\' | translate }}">\n <select\n class="form-control"\n #contextSelect\n (change)="setUserContext(+contextSelect.value)"\n >\n <option\n *ngFor="let context of userContexts"\n [value]="context.id"\n [selected]="context.id === userContextActive.id"\n >\n {{ context.name }}\n </option>\n </select>\n </li>\n </ul>\n <ul class="list-group list-group-flush m-0">\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://docs.valtimo.nl"\n target="_blank"\n class="d-block"\n translate="account.links.help"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://www.valtimo.nl/feedback/"\n target="_blank"\n class="d-block"\n translate="account.links.feedback"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="https://forum.valtimo.nl"\n target="_blank"\n class="d-block"\n translate="account.links.forum"\n ></a>\n </li>\n <li class="bg-transparent list-group-item px-0">\n <a\n href="javascript:void(0)"\n class="d-block"\n (click)="logout()"\n translate="account.links.signOut"\n ></a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n \x3c!-- settings --\x3e\n <div class="tab-pane tab-settings" id="settings" role="tabpanel">\n <div class="p-3 be-scroller-settings">\n <div class="content">\n <span class="category-title" translate="settings.language.title"></span>\n <ul class="settings-list">\n <li>\n <select\n class="form-control"\n #langSelect\n (change)="updateUserLanguage(langSelect.value)"\n >\n <option\n *ngFor="let lang of translate.getLangs()"\n [value]="lang"\n [selected]="lang === translate.currentLang"\n >\n {{ \'settings.language.options.\' + lang | translate }}\n </option>\n </select>\n </li>\n </ul>\n\n <form [formGroup]="settingsForm">\n <span class="category-title" translate="settings.notification.title"></span>\n <ul class="settings-list m-0">\n <li>\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="taskNotifications"\n id="taskNotifications"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="taskNotifications"></label></span>\n </div>\n <span class="name" translate="settings.notification.taskNotifications"></span>\n <div\n class="text-muted info-text"\n translate="settings.notification.taskNotificationsIntro"\n ></div>\n </li>\n\n <li>\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="emailNotifications"\n id="emailNotifications"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="emailNotifications"></label></span>\n </div>\n <span class="name" translate="settings.notification.emailNotifications"></span>\n <div\n class="text-muted info-text"\n translate="settings.notification.emailNotificationsIntro"\n ></div>\n </li>\n </ul>\n\n <div *ngIf="settingsForm.value.emailNotifications">\n <ul class="settings-list">\n <li *ngFor="let frequency of frequencies">\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n formControlName="{{ frequency }}"\n id="{{ frequency }}"\n (ngModelChange)="onSettingsSubmit()"\n /><span> <label for="{{ frequency }}"></label></span>\n </div>\n <span class="name">{{\n \'settings.notification.\' + frequency | translate\n }}</span>\n </li>\n </ul>\n </div>\n </form>\n\n <div class="version-holder">\n <span class="category-title" translate="settings.version.title"></span>\n <ul class="settings-list">\n <li *ngIf="build">\n <div class="name">{{ build.title }}</div>\n <div class="text-muted">{{ build.version }}</div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</nav>\n',styles:[".be-scroller-settings{padding-bottom:150px!important}.version-holder{background-color:#f8f9fa;bottom:0;position:fixed;width:259px}.info-text{line-height:1em!important;margin-bottom:15px;padding-right:70px}"]}]}],ce.ctorParameters=function(){return[{type:p.UserProviderService},{type:i.FormBuilder},{type:le},{type:m.TranslateService},{type:h.ContextService},{type:f.HttpClient},{type:a.NGXLogger}]};var ue=l.HttpLoaderFactory,pe=function(){};pe.decorators=[{type:t.NgModule,args:[{declarations:[ce],imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,s.RouterModule,m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:ue,deps:[f.HttpClient]}}),d.NgbTooltipModule],exports:[ce]}]}];var de=function(){function e(e,n){this.translateService=e,this.elementRef=n,this.menuWidthChanged=new t.EventEmitter,this.menuTooltipText$=this.translateService.stream("interface.mainMenu"),this.toggleMenuText$=this.translateService.stream("interface.toggleMenu"),this.mouseIsOnResizeBorder$=new c.BehaviorSubject(!1),this.menuWidth$=new c.BehaviorSubject(void 0),this.isResizing$=new c.BehaviorSubject(!1),this.defaultMenuWidth=230,this.maxMenuWidth=330,this.minMenuWidth=120,this.mouseX$=c.fromEvent(document.body,"mousemove").pipe(g.map((function(e){return e.pageX}))),this.bodyStyle=n.nativeElement.ownerDocument.body.style}return e.prototype.ngOnInit=function(){this.setMenuWidth(this.defaultMenuWidth)},e.prototype.ngAfterViewInit=function(){var e=this;this.mouseXSubscription=c.combineLatest([this.mouseX$,this.isResizing$]).pipe(g.debounceTime(3)).subscribe((function(t){var n=ae(t,2),i=n[0],o=n[1],r=e.menuIsOpen;if(o){var s=e.xOnClick-i,a=e.menuWidthOnClick-s,l=a<e.minMenuWidth-35,c=!r&&s<-35;r&&a<=e.maxMenuWidth&&a>=e.minMenuWidth?e.setMenuWidth(a):(l||c)&&e.snapMenu(l?e.menuWidthOnClick:e.defaultMenuWidth)}})),this.mouseUpSubscription=c.fromEvent(document,"mouseup").subscribe((function(){e.stopResizing()}))},e.prototype.ngOnDestroy=function(){this.mouseXSubscription.unsubscribe(),this.mouseUpSubscription.unsubscribe()},e.prototype.enterBorder=function(){this.mouseIsOnResizeBorder$.next(!0)},e.prototype.leaveBorder=function(){this.mouseIsOnResizeBorder$.next(!1)},e.prototype.resizeBorderClick=function(e){var t=this;this.menuWidth$.pipe(g.take(1)).subscribe((function(n){t.menuWidthOnClick=n,t.xOnClick=e.pageX,t.bodyStyle.userSelect="none",t.bodyStyle.cursor="col-resize",t.isResizing$.next(!0)}))},e.prototype.snapMenu=function(e){var t=this;this.stopResizing(),this.setMenuWidth(e),setTimeout((function(){t.toggleButtonRef.nativeElement.click()}))},e.prototype.stopResizing=function(){this.bodyStyle.cursor="auto",this.bodyStyle.userSelect="auto",this.isResizing$.next(!1)},e.prototype.setMenuWidth=function(e){this.menuWidth$.next(e),this.menuWidthChanged.emit(e)},e}();de.decorators=[{type:t.Component,args:[{selector:"valtimo-left-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n<ng-container *ngIf="{isResizing: isResizing$ | async} as obs">\n <div\n class="be-left-sidebar"\n [style.width.px]="menuIsOpen ? (menuWidth$ | async) : null"\n [ngClass]="{\'no-transition\': obs.isResizing}"\n >\n <div class="left-sidebar-wrapper">\n <a class="left-sidebar-toggle" href="javascript:void(0);"\n ><valtimo-page-title></valtimo-page-title\n ></a>\n <div class="progress-widget" style="padding: 20px 0">\n <ul class="sidebar-elements">\n <li>\n <a\n #toggleButton\n class="be-toggle-left-sidebar"\n href="javascript:void(0);"\n [title]="menuTooltipText$ | async"\n >\n <svg\n xmlns="http://www.w3.org/2000/svg"\n aria-hidden="true"\n width="1em"\n height="1em"\n style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg)"\n viewBox="0 0 24 24"\n transform="rotate(360)"\n >\n <path [ngClass]="menuIsOpen ? \'d-1\' : \'d-1-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-2\' : \'d-2-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-3\' : \'d-3-flipped\'" />\n <path [ngClass]="menuIsOpen ? \'d-4\' : \'d-4-flipped\'" />\n </svg>\n <span>{{ toggleMenuText$ | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div class="left-sidebar-spacer">\n <div class="left-sidebar-scroll">\n <div class="left-sidebar-content">\n <valtimo-menu></valtimo-menu>\n </div>\n </div>\n </div>\n </div>\n <div\n class="resize-border"\n (mouseenter)="enterBorder()"\n (mouseleave)="leaveBorder()"\n (mousedown)="resizeBorderClick($event)"\n [ngClass]="{\'resize-hover\': (mouseIsOnResizeBorder$ | async) || obs.isResizing}"\n ></div>\n </div>\n</ng-container>\n',styles:['@media screen and (max-width:767px){.be-left-sidebar{width:100%!important}}.be-left-sidebar .left-sidebar-toggle{padding:20px}.be-left-sidebar .left-sidebar-toggle:before{font-size:1.615rem}.be-left-sidebar .sidebar-elements>li>a.be-toggle-left-sidebar{align-items:center;display:flex;height:32px}.be-left-sidebar .left-sidebar-content{padding-top:20px}.be-toggle-left-sidebar svg{height:auto;margin-right:7px;min-width:21px;overflow:visible}.be-toggle-left-sidebar svg path{fill:#696969;transition:.27s ease}.resize-border{background-color:#ff5800;cursor:col-resize;height:100%;margin-right:-3px;opacity:0;position:absolute;right:0;top:0;transition:opacity .2s ease;width:3px}.resize-hover{opacity:.7}.no-transition{transition:none}.d-1{d:path("M3 18v-2h13v2z")}.d-1-flipped{d:path("M3 18v-2h11v2z")}.d-2{d:path("M3 13v-2h10v2H3")}.d-2-flipped{d:path("M3 13v-2h12v2H3")}.d-3{d:path("M3 6h13v2H3V6")}.d-3-flipped{d:path("M3 6h11v2H3V6")}.d-4{d:path("M21 15.61L19.59 17l-5.01-5 5.01-5L21 8.39 17.44 12 21 15.61")}.d-4-flipped{d:path("M15.58 15.61L16.99 17 22 12l-5.01-5-1.41 1.39L19.14 12l-3.56 3.61")}']}]}],de.ctorParameters=function(){return[{type:m.TranslateService},{type:t.ElementRef}]},de.propDecorators={toggleButtonRef:[{type:t.ViewChild,args:["toggleButton"]}],menuIsOpen:[{type:t.Input}],menuWidthChanged:[{type:t.Output}]};var me=function(){function e(e,t,n,i,o){this.router=e,this.activatedRoute=t,this.titleService=n,this.translateService=i,this.logger=o,this.appTitle="Valtimo",this.routerSub=c.Subscription.EMPTY}return e.prototype.setTitle=function(){var e=this;this.title=this.activatedRoute.snapshot.firstChild.data.title,this.title||(this.title=this.activatedRoute.snapshot.firstChild.children[0].data.title),this.title?this.translateService.stream(this.title).subscribe((function(t){e.logger.debug("PageTitle: setTitle translated async",t),e.titleService.setTitle(e.appTitle+" - "+t)})):(this.logger.debug("PageTitle: setTitle default",this.appTitle),this.titleService.setTitle(this.appTitle))},e.prototype.ngOnInit=function(){var e=this;this.setTitle(),this.routerSub=this.router.events.pipe(g.filter((function(e){return e instanceof s.NavigationEnd}))).subscribe((function(t){e.setTitle()}))},e.prototype.ngOnDestroy=function(){this.routerSub.unsubscribe()},e}();me.decorators=[{type:t.Component,args:[{selector:"valtimo-page-title",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<h2 class="page-head-title" *ngIf="title !== \'\'"><span [innerHTML]="title | translate"></span></h2>\n',styles:[""]}]}],me.ctorParameters=function(){return[{type:s.Router},{type:s.ActivatedRoute},{type:b.Title},{type:m.TranslateService},{type:a.NGXLogger}]};var fe=function(){};fe.decorators=[{type:t.NgModule,args:[{declarations:[me],imports:[n.CommonModule,m.TranslateModule],exports:[me]}]}];var he=function(){};he.decorators=[{type:t.NgModule,args:[{declarations:[de],imports:[n.CommonModule,oe,fe],exports:[de]}]}];var ge=function(){function e(){}return e.prototype.getTypeString=function(){return"string"},e.prototype.convert=function(e,t){return e},e}(),be=function(){function e(){}return e.prototype.getTypeString=function(){return"boolean"},e.prototype.convert=function(e,t){return t.enum?e?t.enum[0]||"Yes":t.enum[1]||"No":e?"Yes":"No"},e}(),ve=o;ve.locale(localStorage.getItem("langKey"));var ye=function(){function e(){}return e.prototype.getTypeString=function(){return"date"},e.prototype.convert=function(e,t){return e?ve(e).format("DD-MM-YYYY, hh:mm A"):"-"},e}(),Ie=function(){function e(){}return e.prototype.getTypeString=function(){return"enum"},e.prototype.convert=function(e,t){return t.enum[e]},e}(),xe=function(){function e(){this.regExpStringRemoveUnderscore=/_/g}return e.prototype.getTypeString=function(){return"stringReplaceUnderscore"},e.prototype.convert=function(e,t){return e.replace(this.regExpStringRemoveUnderscore," ")},e}(),we=function(){function e(){}return e.prototype.getTypeString=function(){return"relatedFiles"},e.prototype.convert=function(e,t){return e.length||"-"},e}(),Se=[new ge,new be,new ye,new Ie,new xe,new we],Ce=function(){function e(){var e=this;this.converters={},this.defaultConverter=new ge,Se.forEach((function(t){return e.addConverter(t)}))}return e.prototype.get=function(e,t){return t.viewType||(t.viewType=typeof e),void 0!==this.converters[t.viewType]?this.converters[t.viewType].convert(e,t):this.defaultConverter.convert(e,t)},e.prototype.addConverter=function(e){if(void 0!==this.converters[e.getTypeString()])throw new Error("Converter with name "+e.getTypeString()+" already exists");this.converters[e.getTypeString()]=e},e}();Ce.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ce},token:Ce,providedIn:"root"}),Ce.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ce.ctorParameters=function(){return[]};var Ne=function(){function e(e,n){this.viewContentService=e,this.logger=n,this.actions=[],this.rowClicked=new t.EventEmitter,this.paginationClicked=new t.EventEmitter,this.paginationSet=new t.EventEmitter,this.search=new t.EventEmitter,this.sortChanged=new t.EventEmitter,this.headerProvided=!1,this.regExpStringRemoveUnderscore=/_/g,this.sort$=new c.BehaviorSubject({state:{name:"",direction:"DESC"},isSorting:!1}),this.viewListAs=localStorage.getItem("viewListAs")||"table"}return e.prototype.loadPaginationSize=function(){var t=localStorage.getItem(""+this.paginationIdentifier+e.PAGINATION_SIZE);null!==t?(this.pagination.size=+t,this.paginationSet.emit(+t),this.logger.debug("Pagination loaded from local storage for this list. Current: ",t)):this.logger.debug("Pagination does NOT exist in local storage for this list. Will use default. Change it to create an entry."),this.paginationSet.emit()},e.prototype.setPaginationSize=function(t){localStorage.setItem(""+this.paginationIdentifier+e.PAGINATION_SIZE,t),this.pagination.size=t,this.logger.debug("Pagination set in local storage for this list: ",t),this.paginationSet.emit(t)},e.prototype.ngOnInit=function(){this.pagination&&this.loadPaginationSize(),this.initialSortState&&this.sort$.next(this.initialSortState)},e.prototype.ngOnChanges=function(e){e.items&&e.items.currentValue&&this.transformListItemsMatchFields()},e.prototype.ngAfterViewInit=function(){var e=this;this.isSearchable&&c.fromEvent(this.searchBox.nativeElement,"keyup").pipe(g.debounceTime(500)).subscribe((function(){var t=e.searchBox.nativeElement.value;e.search.observers.length>0?e.search.emit(t):e.searchModel=t}))},e.prototype.transformListItemsMatchFields=function(){var e=this;this.items&&this.fields&&this.items.forEach((function(t){t.listItemFields=e.fields.map((function(n){return{key:n.key,label:n.label,value:e.resolveObject(n,t)}}))}))},e.prototype.onClickRow=function(e){this.rowClicked.emit(e)},e.prototype.resolveObject=function(e,t){var n=e.key,i=(n.includes("$.")?n.split("$.")[1]:n).split(".").reduce((function(e,t){return e?e[t]:null}),t||self);return this.viewContentService.get(i,e)},e.prototype.switchView=function(e){localStorage.setItem("viewListAs",e),this.viewListAs=e},e.prototype.getTotalPageCount=function(){return Math.ceil(this.pagination.collectionSize/this.pagination.size)},e.prototype.onClickPagination=function(e){this.paginationClicked.emit(e)},e.prototype.handleFieldClick=function(e,t){var n=this,i="DESC";t&&this.sort$.pipe(g.take(1)).subscribe((function(t){var o;o=t.state.name===e?t.isSorting?t.state.direction===i?Object.assign(Object.assign({},t),{state:Object.assign(Object.assign({},t.state),{direction:"ASC"})}):{state:Object.assign(Object.assign({},t.state),{direction:i}),isSorting:!1}:{state:Object.assign(Object.assign({},t.state),{direction:i}),isSorting:!0}:{state:{name:e,direction:i},isSorting:!0},n.sort$.next(o),n.sortChanged.emit(o)}))},e}();Ne.PAGINATION_SIZE="PaginationSize",Ne.decorators=[{type:t.Component,args:[{selector:"valtimo-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div *ngIf="(items?.length > 0 && fields?.length > 0) || header">\n <div\n class="d-flex align-items-center search-holder bg-light"\n [ngClass]="{\'pb-4 pt-4\': !header}"\n *ngIf="isSearchable || viewMode || header"\n >\n <div class="align-self-start">\n <ng-content select="[header]"></ng-content>\n </div>\n\n <div class="ml-auto row">\n <input\n *ngIf="isSearchable"\n class="form-control col-sm-8"\n type="text"\n placeholder="Search..."\n #searchBox\n />\n\n <div\n class="switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0"\n role="group"\n *ngIf="viewMode"\n >\n <button\n class="btn"\n [ngClass]="viewListAs === \'table\' ? \'btn-primary\' : \'btn-default\'"\n (click)="switchView(\'table\')"\n >\n <i class="mdi mdi-view-headline"></i>\n </button>\n <button\n class="btn"\n [ngClass]="viewListAs === \'tile\' ? \'btn-primary\' : \'btn-default\'"\n (click)="switchView(\'tile\')"\n >\n <i class="mdi mdi-view-module"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select="[tabs]"></ng-content>\n\n <div *ngIf="items?.length > 0 && fields?.length > 0">\n <div class="table-responsive noSwipe" *ngIf="!viewMode || viewListAs === \'table\'">\n <table class="table table-striped table-hover m-0" *ngIf="sort$ | async as sort">\n <thead>\n <tr>\n <th\n *ngFor="let field of fields"\n (click)="handleFieldClick(field.key, field.sortable)"\n [ngClass]="{\n sortable: field.sortable,\n \'is-being-sorted\': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === \'ASC\'\n }"\n >\n {{ field.label }}\n </th>\n <th *ngFor="let action of actions">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]="{\'click-able\': this.rowClicked.observers.length > 0}"\n *ngFor="let item of items | listFilter: searchModel"\n (click)="onClickRow(item)"\n >\n <td class="align-top" *ngFor="let listItemField of item.listItemFields">\n {{ listItemField.value || \'-\' }}\n </td>\n <td class="align-top" *ngFor="let action of actions">\n <i\n class="action-icon"\n style="cursor: pointer"\n [ngClass]="action.iconClass"\n (click)="action.callback(item)"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf="(items | listFilter: searchModel).length === 0" [colSpan]="fields.length">\n {{ \'list.noMatchingItems\' | translate }}<i>"{{ searchModel }}"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class="container-fluid" *ngIf="viewMode && viewListAs === \'tile\'">\n <div class="row p-2">\n <div\n class="col-12 col-sm-6 col-xl-4 p-2"\n *ngFor="let item of items | listFilter: searchModel"\n (click)="onClickRow(item)"\n >\n <div class="click-able tile-holder p-4">\n <dl class="row mb-0" *ngFor="let listItemField of item.listItemFields">\n <dt class="col-12 col-md-5 text-xl-right">{{ listItemField.label }}</dt>\n <dd class="col-12 col-md-7">{{ listItemField.value || \'-\' }}</dd>\n </dl>\n </div>\n </div>\n <div class="col-12" *ngIf="(items | listFilter: searchModel).length === 0">\n {{ \'list.noMatchingItems\' | translate }}<i>"{{ searchModel }}"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class="pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0"\n *ngIf="pagination && items?.length > 0 && fields?.length > 0"\n >\n <div class="float-left page-count col-4">\n <strong>{{\n \'list.currentPage\' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? (\'list.showingResult\' | translate: {number: (items | listFilter: searchModel).length})\n : (\'list.showingResults\'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class="col-4 text-center">\n {{ \'list.show\' | translate }}\n <select [(ngModel)]="pagination.size" (ngModelChange)="setPaginationSize($event)">\n <option [ngValue]="10">10</option>\n <option [ngValue]="25">25</option>\n <option [ngValue]="50">50</option>\n <option [ngValue]="100">100</option>\n </select>\n {{ \'list.entries\' | translate }}\n </div>\n <div class="col-4">\n <ngb-pagination\n *ngIf="pagination.collectionSize > pagination.size"\n class="float-right"\n [collectionSize]="pagination.collectionSize"\n [(page)]="pagination.page"\n [pageSize]="pagination.size"\n [maxSize]="pagination.maxPaginationItemSize"\n [rotate]="true"\n (pageChange)="onClickPagination(pagination.page)"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id="no-results" class="p-5" *ngIf="items?.length === 0">\n {{ \'list.noResults\' | translate }}\n </div>\n\n <div id="no-field-definitions" class="p-5" *ngIf="items?.length > 0 && fields?.length === 0">\n {{ \'list.noFieldDefinitions\' | translate }}\n </div>\n</div>\n',styles:['@charset "UTF-8";\n/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.table{table-layout:fixed}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}td:first-child,th:first-child{padding-left:25px}th.sortable{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;user-select:none}th.sortable:after{content:" ";font-family:Font Awesome\\ 5 Free;margin:auto 0 auto 5px;opacity:0;position:absolute;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}.action-icon{font-size:16px}']}]}],Ne.ctorParameters=function(){return[{type:Ce},{type:a.NGXLogger}]},Ne.propDecorators={items:[{type:t.Input}],fields:[{type:t.Input}],pagination:[{type:t.Input}],viewMode:[{type:t.Input}],isSearchable:[{type:t.Input}],header:[{type:t.Input}],actions:[{type:t.Input}],paginationIdentifier:[{type:t.Input}],initialSortState:[{type:t.Input}],rowClicked:[{type:t.Output}],paginationClicked:[{type:t.Output}],paginationSet:[{type:t.Output}],search:[{type:t.Output}],sortChanged:[{type:t.Output}],searchBox:[{type:t.ViewChild,args:["searchBox"]}]};var Le=function(){function e(){}return e.prototype.transform=function(e,t){return e=e||[],t?e.filter((function(e){return Object.keys(e).some((function(n){return null!=e[n]&&e[n].toString().toLowerCase().includes(t.toLowerCase())}))})):e},e}();Le.decorators=[{type:t.Pipe,args:[{name:"listFilter"}]}];var Oe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Oe.decorators=[{type:t.Component,args:[{selector:"valtimo-card",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="card card-border-color card-border-color-primary">\n <div *ngIf="title || subtitle" class="card-header card-header-divider">\n <span *ngIf="title">{{ title }}</span>\n <span *ngIf="subtitle" class="card-subtitle">{{ subtitle }}</span>\n </div>\n <div class="card-body">\n <ng-content></ng-content>\n </div>\n</div>\n',styles:[""]}]}],Oe.ctorParameters=function(){return[]},Oe.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}]};var Te=function(){};Te.decorators=[{type:t.NgModule,args:[{declarations:[Oe],imports:[n.CommonModule],exports:[Oe]}]}];var Fe=function(){};Fe.decorators=[{type:t.NgModule,args:[{declarations:[Ne,Le],imports:[n.CommonModule,Te,d.NgbPaginationModule,i.FormsModule,m.TranslateModule],exports:[Ne,Le]}]}];var Me=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Me.decorators=[{type:t.Component,args:[{selector:"valtimo-page-header",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="page-head">\n <valtimo-page-title></valtimo-page-title>\n <valtimo-breadcrumb-navigation></valtimo-breadcrumb-navigation>\n</div>\n',styles:[""]}]}],Me.ctorParameters=function(){return[]};var Re=function(){function e(e,t){this.router=e,this.route=t,this.breadcrumbs=[],this.appTitle="Valtimo",this.routerSub=c.Subscription.EMPTY}return e.prototype.ngOnInit=function(){var e=this;this.setBreadcrumbs(this.route),this.routerSub=this.router.events.pipe(g.filter((function(e){return e instanceof s.NavigationEnd}))).pipe(g.map((function(){return e.route}))).pipe(g.map((function(e){for(;e.firstChild;)e=e.firstChild;return e}))).pipe(g.filter((function(e){return e.outlet===s.PRIMARY_OUTLET}))).subscribe((function(t){e.setBreadcrumbs(t)}))},e.prototype.setBreadcrumbs=function(e){for(;e.firstChild;)e=e.firstChild;if(e.outlet===s.PRIMARY_OUTLET){var t=e.snapshot,n={url:t.url.join("/"),path:t.routeConfig.path,label:t.data.title,params:t.params};this.generateBreadcrumbs(n)}},e.prototype.generateBreadcrumbs=function(e){var t=this;this.breadcrumbs=[],this.router.config.map((function(n){if(0===e.path.indexOf(n.path+"/")&&e.path!==n.path&&""!==n.path){var i={url:n.path.replace(/:(.+?)\b/g,(function(t,n){return e.params[n]})),path:n.path,label:n.data.title,params:e.params};-1===t.breadcrumbs.findIndex((function(e){return e.url===i.url}))&&t.breadcrumbs.push(i)}}))},e.prototype.ngOnDestroy=function(){this.routerSub.unsubscribe()},e}();Re.decorators=[{type:t.Component,args:[{selector:"valtimo-breadcrumb-navigation",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<nav aria-label="breadcrumb" role="navigation">\n <ol class="breadcrumb page-head-nav">\n <li class="breadcrumb-item">\n <a [routerLink]="[\'/\']">{{ appTitle }}</a>\n </li>\n <li class="breadcrumb-item" *ngFor="let item of breadcrumbs">\n <a [routerLink]="[item.url]">{{ item.label | translate }}</a>\n </li>\n </ol>\n</nav>\n',styles:[""]}]}],Re.ctorParameters=function(){return[{type:s.Router},{type:s.ActivatedRoute}]};var Ae=function(){};Ae.decorators=[{type:t.NgModule,args:[{declarations:[Re],imports:[n.CommonModule,s.RouterModule,m.TranslateModule],exports:[Re]}]}];var ke=function(){};ke.decorators=[{type:t.NgModule,args:[{declarations:[Me],imports:[n.CommonModule,fe,Ae],exports:[Me]}]}];var De=function(){function e(){}return e.prototype.ngOnInit=function(){this.setCardClassName(),this.setType(),this.setAdditionalClasses(),this.setContrast(),this.setDivider(),this.setCollapse()},e.prototype.toggleContent=function(){this.collapseAble&&(this.isCollapsed=!this.isCollapsed)},e.prototype.setCardClassName=function(){this.cardClassName="card-full-default"},e.prototype.setType=function(){this.type&&(this.cardClassName="card-full-"+this.type)},e.prototype.setAdditionalClasses=function(){this.additionalClasses&&(this.cardClassName=this.cardClassName+" "+this.additionalClasses)},e.prototype.setContrast=function(){this.contrast&&(this.contrastClass="card-header-contrast")},e.prototype.setDivider=function(){this.divider&&(this.dividerClass="card-header-divider")},e.prototype.setCollapse=function(){this.isCollapsed=!(this.collapseAble&&"hide"===this.collapse)},e}();De.decorators=[{type:t.Component,args:[{selector:"valtimo-widget",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="card card-border card-contrast {{ cardClassName }}">\n <div class="card-header {{ contrastClass }} {{ dividerClass }}" *ngIf="title || subtitle">\n <div class="row">\n <div class="col-7" [ngClass]="{clickable: collapseAble}" (click)="toggleContent()">\n \x3c!-- Title --\x3e\n <div *ngIf="title" class="text-truncate">{{ title }}</div>\n \x3c!-- Sub title --\x3e\n <div *ngIf="subtitle" class="card-subtitle text-truncate">{{ subtitle }}</div>\n </div>\n\n \x3c!-- Tools--\x3e\n <div class="tools col-5 text-right">\n \x3c!-- Collapse content --\x3e\n <a\n class="icon mdi"\n *ngIf="collapseAble"\n [ngClass]="{\'mdi-chevron-up\': isCollapsed, \'mdi-chevron-down\': !isCollapsed}"\n (click)="toggleContent()"\n ></a>\n </div>\n </div>\n </div>\n \x3c!-- content --\x3e\n <div [hidden]="!isCollapsed">\n <ng-content></ng-content>\n </div>\n</div>\n',styles:[".card-contrast .card-header{padding:20px!important}.card-subtitle{margin-bottom:0}.card-full,.card-full .card-subtitle,.card-full .tools .icon{color:#6b6b6b!important}.card-full-warning,.card-full-warning .card-subtitle,.card-full-warning .tools .icon{color:#343a40!important}.card-full-danger,.card-full-danger .card-subtitle,.card-full-danger .tools .icon,.card-full-dark,.card-full-dark .card-subtitle,.card-full-dark .tools .icon,.card-full-info,.card-full-info .card-subtitle,.card-full-info .tools .icon,.card-full-primary,.card-full-primary .card-subtitle,.card-full-primary .tools .icon,.card-full-success,.card-full-success .card-subtitle,.card-full-success .tools .icon{color:#fff!important}.card-contrast .card-body{padding-top:15px}.card-body{padding:15px 20px}.pie-label{font-size:16px!important}.widget.widget-tile svg.ngx-charts{margin-left:-1.5rem!important}svg.ngx-charts{margin:0;padding:0}"]}]}],De.propDecorators={type:[{type:t.Input}],name:[{type:t.Input}],icon:[{type:t.Input}],contrast:[{type:t.Input}],divider:[{type:t.Input}],title:[{type:t.Input}],subtitle:[{type:t.Input}],collapseAble:[{type:t.Input}],collapse:[{type:t.Input}],additionalClasses:[{type:t.Input}]};var Ee=function(){};Ee.decorators=[{type:t.NgModule,args:[{declarations:[De],imports:[n.CommonModule],exports:[De]}]}];var Pe=function(){function e(e){this.el=e}return e.prototype.ngAfterContentInit=function(){var e=this;setTimeout((function(){e.el.nativeElement.focus()}),300)},e}();Pe.decorators=[{type:t.Directive,args:[{selector:"[valtimoFieldAutoFocus]"}]}],Pe.ctorParameters=function(){return[{type:t.ElementRef}]};var Ue=function(){};Ue.decorators=[{type:t.NgModule,args:[{declarations:[Pe],exports:[Pe],imports:[n.CommonModule]}]}];var je=function(){function e(){this.importDone=new t.EventEmitter,this.heatPoints={data:[]}}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new v,this.bpmnJS.on("import.done",(function(t){if(!t.error){var n=e.bpmnJS.get("canvas"),i=e.bpmnJS.get("eventBus");e.historicActivityInstances&&e.historicActivityInstances.forEach((function(e){n.addMarker(e.activityId,e.endTime?"highlight-overlay-past":"highlight-overlay-current")})),n.zoom("fit-viewport","auto"),(e.heatmapDuration||e.heatmapCount)&&(i.on("canvas.init",(function(){e.heatmapMode&&e.clearHeatmap(),e.getHeatmapData()})),i.on("canvas.viewbox.changing",(function(){e.heatmapMode&&e.clearHeatmap()})),i.on("canvas.viewbox.changed",(function(){e.getHeatmapData()})))}}))},e.prototype.ngAfterContentInit=function(){this.bpmnJS.importXML(this.bpmn20Xml),this.bpmnJS.attachTo(this.el.nativeElement)},e.prototype.getHeatmapData=function(){var e,t,n=this;this.heatPoints={data:[]},this.min=0,this.max=0,this.heatmapDuration?(e=this.heatmapDuration,t="averageDurationInMilliseconds"):this.heatmapCount&&(e=this.heatmapCount,t="totalCount"),e&&(Object.keys(e).forEach((function(i){var o=n.el.nativeElement.querySelector("svg").getBoundingClientRect(),r=n.el.nativeElement.querySelector("g[data-element-id="+i+"]").getBoundingClientRect();n.setMax(i),n.heatPoints.data.push({x:Math.round(r.x-o.x+r.width/2),y:Math.round(r.y-o.y+r.height/2),value:e[i][t],radius:r.width/2}),e[i].count>0&&n.addCounterActiveOverlays(i,e)})),this.heatmapMode&&this.showHeatmap())},e.prototype.setMax=function(e){this.heatmapDuration?this.max=Math.max(this.heatmapDuration[e].averageDurationInMilliseconds,this.max):this.heatmapCount&&(this.max=Math.max(this.heatmapCount[e].totalCount+this.heatmapCount[e].count,this.max))},e.prototype.addCounterActiveOverlays=function(e,t){this.bpmnJS.get("overlays").add(e,{position:{bottom:-10,left:0},show:{minZoom:0,maxZoom:5},html:'<span class="badge badge-pill badge-primary">'+t[e].count+"</span>"})},e.prototype.showHeatmap=function(){this.heatMapInstance=y.create({radius:54,blur:.7,maxOpacity:.4,minOpacity:0,container:this.el.nativeElement}),this.heatMapInstance.setData({min:this.min,max:this.max,data:this.heatPoints.data})},e.prototype.clearHeatmap=function(){this.heatMapInstance.setData({data:[]})},e.prototype.toggleHeatmap=function(){this.heatmapMode=!this.heatmapMode,this.heatmapMode?this.showHeatmap():this.clearHeatmap()},e.prototype.ngOnDestroy=function(){this.bpmnJS.destroy()},e}();je.decorators=[{type:t.Component,args:[{selector:"valtimo-bpmn-js-diagram",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="p-4" *ngIf="heatmapDuration || heatmapCount">\n <div class="switch-button switch-button-sm switch-button-success">\n <input\n type="checkbox"\n id="toggleHeatmap"\n [checked]="heatmapMode"\n (click)="toggleHeatmap()"\n /><span> <label for="toggleHeatmap"></label></span>\n </div>\n</div>\n\n<div #ref class="diagram-container"></div>\n\n<div *ngIf="historicActivityInstances" class="p-4 text-center legenda-holder">\n <span\n ><div class="legenda highlight-overlay-past"></div>\n Executed tasks</span\n >\n <span class="ml-3"\n ><div class="legenda highlight-overlay-current"></div>\n Current tasks</span\n >\n</div>\n\n<div *ngIf="heatmapDuration || heatmapCount" class="p-4 text-center legenda-holder">\n <span\n ><span class="badge badge-pill badge-primary">N</span>&nbsp;&nbsp;Amount of currently active\n instances of this task.</span\n >\n <span\n >&nbsp;&nbsp;|&nbsp;&nbsp;Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n</div>\n',styles:[""]}]}],je.ctorParameters=function(){return[]},je.propDecorators={el:[{type:t.ViewChild,args:["ref",{static:!0}]}],importDone:[{type:t.Output}],bpmn20Xml:[{type:t.Input}],heatmapDuration:[{type:t.Input}],heatmapCount:[{type:t.Input}],historicActivityInstances:[{type:t.Input}]};var ze=function(){};ze.decorators=[{type:t.NgModule,args:[{declarations:[je],imports:[n.CommonModule],exports:[je]}]}];var Ve=function(){};Ve.decorators=[{type:t.Component,args:[{selector:"valtimo-timeline",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div id="no-results" class="p-5" *ngIf="items?.length === 0">No result found</div>\n <div class="pb-5" *ngIf="items?.length > 0">\n <ul class="timeline mb-0 py-5">\n <li class="timeline-item status-done" *ngFor="let item of items">\n <div class="timeline-date">\n <span>{{ item.date }}</span>\n </div>\n <div class="timeline-content mt-1">\n <div class="timeline-header p-0">\n <span class="timeline-time">{{ item.time }}</span>\n <span class="timeline-author">{{ item.user }}</span>\n <br />\n <p class="timeline-activity">{{ item.activity }}</p>\n <div class="timeline-summary">\n <p\n [innerHTML]="item.summaryTranslationKey | translate: item.summaryTranslationParams"\n ></p>\n </div>\n </div>\n </div>\n </li>\n </ul>\n </div>\n</div>\n',styles:[""]}]}],Ve.propDecorators={items:[{type:t.Input}]};var $e=function(){};$e.decorators=[{type:t.NgModule,args:[{declarations:[Ve],imports:[n.CommonModule,m.TranslateModule],exports:[Ve]}]}];var Be=function(){};Be.decorators=[{type:t.NgModule}];var We=function(){function e(){this.filterSidebar=localStorage.getItem("filterSidebar")||"show"}return e.prototype.ngOnInit=function(){"show"===this.filterSidebar&&(localStorage.setItem("filterSidebar","show"),$(".be-content").addClass("be-aside")),$('[data-toggle="tooltip"]').tooltip()},e.prototype.ngOnDestroy=function(){$(".be-content").removeClass("be-aside")},e.prototype.toggleFilterSidebar=function(){var e=$(".be-content");e.toggleClass("be-aside"),this.filterSidebar=e.hasClass("be-aside")?"show":"hide",localStorage.setItem("filterSidebar",this.filterSidebar)},e}();We.decorators=[{type:t.Component,args:[{selector:"valtimo-filter-sidebar",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <a\n class="toggle-filter-sidebar"\n data-toggle="tooltip"\n data-trigger="hover"\n data-placement="right"\n title="Show / hide"\n href="javascript:void(0)"\n (click)="toggleFilterSidebar()"\n [ngClass]="this.filterSidebar === \'show\' && \'toggle-expanded\'"\n >\n <div class="icon-container p-0 bg-transparent">\n <i class="click-able icon shadow mdi mdi-filter-list"></i>\n </div>\n </a>\n <aside class="page-aside p-4 mb-4 bg-light filter-holder" *ngIf="this.filterSidebar === \'show\'">\n <ng-content></ng-content>\n </aside>\n</div>\n',styles:[".filter-holder{border:0 solid transparent}.toggle-filter-sidebar{cursor:pointer;font-size:2rem;margin-left:-50px;position:absolute;top:25px;z-index:1}.icon-container .icon{background-color:#fff;color:#6b6b6b}.toggle-filter-sidebar:hover .icon-container .icon{color:#ff5800}@media screen and (min-width:768px){.toggle-filter-sidebar{margin-left:-25px}.page-aside{height:calc(100vh - 61px);left:0;margin-top:0;position:absolute}.toggle-expanded{margin-left:255px}}"]}]}],We.ctorParameters=function(){return[]};var qe=function(){};qe.decorators=[{type:t.NgModule,args:[{declarations:[We],imports:[n.CommonModule],exports:[We]}]}];var Ye=function(){function e(e){this.s3Service=e,this.resources=[],this.resourcesChanged=new t.EventEmitter,this.resourceRegistered=new t.EventEmitter,this.showFileList=!0}return e.prototype.ngOnInit=function(){},e.prototype.onFileFieldChange=function(e){var t,n;try{for(var i=se(e),o=i.next();!o.done;o=i.next()){var r=o.value;this.uploadFile(r)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.uploadFile=function(e){var t=this;this.s3Service.getPreSignedUrl(e.name).subscribe((function(n){var i=new URL(n);t.s3Service.upload(i,e).subscribe((function(n){var o=new I.S3Resource(e,i);t.s3Service.registerResource(o).subscribe((function(e){t.resources.push(e),t.resourceRegistered.emit(e),t.resourcesChanged.emit(t.resources)}))}))}))},e.prototype.deleteResource=function(e){var t=this;this.s3Service.delete(e.id).subscribe((function(n){var i=t.resources.findIndex((function(t){return t.id===e.id}));t.resources.splice(i,1),t.resourcesChanged.emit(t.resources)}))},e}();Ye.decorators=[{type:t.Component,args:[{selector:"valtimo-uploader",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div\n class="upload-file-container p-5"\n (click)="fileInput.click()"\n valtimoUploaderDragDrop\n (fileDropped)="onFileFieldChange($event)"\n>\n <span class="align-middle"><i class="mdi mdi-cloud-upload"></i></span>\n <input hidden type="file" #fileInput (change)="onFileFieldChange($event.target.files)" multiple />\n</div>\n<div *ngIf="showFileList">\n <div class="files-list px-3 py-2" *ngFor="let resource of resources">\n <p class="m-0">\n <strong>{{ resource.name }}</strong\n ><br />\n {{ resource.sizeInBytes | filesize }}\n </p>\n <button class="delete-file" (click)="deleteResource(resource)">\n <i class="icon mdi mdi-delete text-danger"></i>\n </button>\n </div>\n</div>\n',styles:[".upload-file-container{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:100px;border:2px dashed #d5d8de;color:#d5d8de;margin:0 0 1rem;text-align:center}.upload-file-container i.mdi-cloud-upload{font-size:5em}.upload-file-container:hover{cursor:pointer;opacity:.8}.files-list{background:#fff;border:1px solid #bdc0c7;display:flex;font-size:1em;justify-content:space-between;margin:1rem auto;padding:5px}.files-list .delete-file{background:transparent;border:none;cursor:pointer}.files-list .delete-file i{font-size:1.5em}"]}]}],Ye.ctorParameters=function(){return[{type:I.S3Service}]},Ye.propDecorators={resourcesChanged:[{type:t.Output}],resourceRegistered:[{type:t.Output}],showFileList:[{type:t.Input}]};var He=function(){function e(){this.fileDropped=new t.EventEmitter}return e.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation()},e.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation()},e.prototype.ondrop=function(e){e.preventDefault(),e.stopPropagation();var t=e.dataTransfer.files;t.length>0&&this.fileDropped.emit(t)},e}();He.decorators=[{type:t.Directive,args:[{selector:"[valtimoUploaderDragDrop]"}]}],He.propDecorators={fileDropped:[{type:t.Output}],onDragOver:[{type:t.HostListener,args:["dragover",["$event"]]}],onDragLeave:[{type:t.HostListener,args:["dragleave",["$event"]]}],ondrop:[{type:t.HostListener,args:["drop",["$event"]]}]};var Ge=function(){function e(){this.units=["bytes","KB","MB","GB","TB","PB"]}return e.prototype.transform=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=2),isNaN(parseFloat(String(e)))||!isFinite(e))return"?";for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+this.units[n]},e}();Ge.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var _e=function(){};_e.decorators=[{type:t.NgModule,args:[{declarations:[Ge],imports:[n.CommonModule],exports:[Ge]}]}];var Ke=function(){};Ke.decorators=[{type:t.NgModule,args:[{declarations:[Ye,He],imports:[n.CommonModule,_e],exports:[Ye,He]}]}];var Xe=function(){function n(e){var n=this;this.router=e,this.confirmed=new t.EventEmitter,this.subject=new c.Subject,this.router.events.subscribe((function(e){e instanceof s.NavigationStart&&n.clear()}))}return n.prototype.onAlert=function(){return this.subject.asObservable()},n.prototype.success=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Success,confirmations:n,iconClass:i}))},n.prototype.error=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Error,confirmations:n,iconClass:i}))},n.prototype.info=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Info,confirmations:n,iconClass:i}))},n.prototype.warning=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Warning,confirmations:n,iconClass:i}))},n.prototype.notification=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.Notification,confirmations:n,iconClass:i}))},n.prototype.modalNotification=function(t,n,i){this.alert(new O({message:t,type:e.AlertType.ModalNotification,confirmations:n,iconClass:i}))},n.prototype.alert=function(e){this.subject.next(e)},n.prototype.clear=function(){this.subject.next(new O({}))},n.prototype.emitAlertConfirmEvent=function(e){this.confirmed.emit(e)},n.prototype.getAlertConfirmChangeEmitter=function(){return this.confirmed},n}();Xe.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Xe(t.ɵɵinject(s.Router))},token:Xe,providedIn:"root"}),Xe.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Xe.ctorParameters=function(){return[{type:s.Router}]};var Je=function(){function t(e){this.alertService=e,this.alerts=[],this.autoCloseInMS=5e3}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterContentInit=function(){var e=this;this.subscription=this.alertService.onAlert().subscribe((function(t){t.message?(t.confirmations||(t.confirmations=[]),0===e.alerts.filter((function(e){return e.message===t.message})).length&&e.alerts.push(t),e.inModal(t)&&setTimeout((function(){e.openModal()}),300),e.autoCloseInMS>0&&0===t.confirmations.length&&setTimeout((function(){e.removeAlert(t)}),e.autoCloseInMS)):e.alerts=[]}))},t.prototype.closeModal=function(){$("#modalNotification").modal("hide")},t.prototype.openModal=function(){$("#modalNotification").modal("show")},t.prototype.alertConfirm=function(e,t){e.confirm=t,this.alertService.emitAlertConfirmEvent(e),this.removeAlert(e)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.removeAlert=function(e){this.inModal(e)&&this.closeModal(),this.alerts=this.alerts.filter((function(t){return t.message!==e.message}))},t.prototype.inModal=function(t){if(t)return t.type===e.AlertType.ModalNotification},t.prototype.cssClass=function(t){if(t)switch(t.type){case e.AlertType.Success:return"alert alert-success";case e.AlertType.Error:return"alert alert-danger";case e.AlertType.Info:return"alert alert-info";case e.AlertType.Warning:return"alert alert-warning";case e.AlertType.Notification:case e.AlertType.ModalNotification:return"alert alert-light"}},t.prototype.cssIconClass=function(t){if(t)switch(t.type){case e.AlertType.Success:return"mdi mdi-check";case e.AlertType.Error:return"mdi mdi-close-circle-o";case e.AlertType.Info:return"mdi mdi-info-outline";case e.AlertType.Warning:return"mdi mdi-alert-triangle";case e.AlertType.Notification:case e.AlertType.ModalNotification:return"mdi mdi-notifications"}},t}();Je.decorators=[{type:t.Component,args:[{selector:"valtimo-alert",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div *ngFor="let alert of alerts" class="{{ cssClass(alert) }} rounded-0 m-0 alert-dismissable">\n <div *ngIf="inModal(alert)">\n \x3c!-- Modal --\x3e\n <div class="modal fade" id="modalNotification" tabindex="-1" role="dialog">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-body p-0">\n <button class="close" type="button" (click)="removeAlert(alert)">\n <span class="mdi mdi-close" aria-hidden="true"></span>\n </button>\n <div class="icon">\n <span class="{{ alert.iconClass || cssIconClass(alert) }}"></span>\n </div>\n <div class="message">\n <div [innerHTML]="alert.message"></div>\n </div>\n </div>\n <div class="modal-footer pt-0" *ngIf="alert.confirmations?.length">\n <button\n class="{{ confirmation.class }} mr-2"\n *ngFor="let confirmation of alert.confirmations"\n (click)="alertConfirm(alert, confirmation.value)"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!inModal(alert)" class="alert-block">\n <div class="icon"><span class="{{ alert.iconClass || cssIconClass(alert) }}"></span></div>\n <div class="message">\n <div [innerHTML]="alert.message"></div>\n <div class="mt-3" *ngIf="alert.confirmations?.length">\n <button\n class="{{ confirmation.class }} mr-2"\n *ngFor="let confirmation of alert.confirmations"\n (click)="alertConfirm(alert, confirmation.value)"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n <button class="close" type="button" (click)="removeAlert(alert)">\n <span class="mdi mdi-close" aria-hidden="true"></span>\n </button>\n </div>\n</div>\n',styles:[".alert-block{display:flex;flex-direction:row;justify-content:space-between}.alert-block .message{width:100%}.alert-block .icon{align-items:center;display:flex}.alert .message{font-size:1.1rem!important;line-height:1.5rem!important;padding:2rem 5rem 2rem 2rem!important}.alert .close{color:#fff!important;opacity:1!important;padding:2rem 2rem 0 0!important;right:0!important}.alert .icon{padding-left:2rem!important}.alert-warning{color:#404040!important}.alert-light .close,.alert-warning .close{color:#404040!important;opacity:1!important}"]}]}],Je.ctorParameters=function(){return[{type:Xe}]};var Ze=function(){};Ze.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[Je],exports:[Je]}]}];var Qe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Qe.decorators=[{type:t.Component,args:[{selector:"valtimo-data-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div *ngIf="collection">\n <dl class="row mb-0" *ngFor="let item of collection">\n <dd class="col-12 col-md-4 col-lg-3">{{ item.label }}</dd>\n <dt class="col-12 col-md-8 col-lg-9" [innerHTML]="item.value || \'-\'"></dt>\n </dl>\n</div>\n\n<div *ngIf="object">\n <dl class="row mb-0" *ngFor="let item of object | keyvalue">\n <dd class="col-12 col-md-4 col-lg-3">{{ item.key }}</dd>\n <dt class="col-12 col-md-8 col-lg-9" [innerHTML]="item.value || \'-\'"></dt>\n </dl>\n</div>\n',styles:[""]}]}],Qe.ctorParameters=function(){return[]},Qe.propDecorators={collection:[{type:t.Input}],object:[{type:t.Input}]};var et=function(){};et.decorators=[{type:t.NgModule,args:[{declarations:[Qe],imports:[n.CommonModule],exports:[Qe]}]}];var tt=function(){function e(){this._documentDefinitionName$=new c.BehaviorSubject(void 0),this._currentForm$=new c.BehaviorSubject(void 0)}return Object.defineProperty(e.prototype,"documentDefinitionName$",{get:function(){return this._documentDefinitionName$.asObservable()},enumerable:!1,configurable:!0}),e.prototype.setDocumentDefinitionName=function(e){this._documentDefinitionName$.next(e)},Object.defineProperty(e.prototype,"currentForm$",{get:function(){return this._currentForm$.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentForm",{set:function(e){this._currentForm$.next(e)},enumerable:!1,configurable:!0}),e}();tt.decorators=[{type:t.Injectable}];var nt=function(){function e(e,n,i,o,r){this.userProviderService=e,this.logger=n,this.stateService=i,this.route=o,this.translateService=r,this.submission={},this.submit=new t.EventEmitter,this.change=new t.EventEmitter,this.refreshForm=new t.EventEmitter,this.errors=[],this.currentLanguage$=new c.BehaviorSubject(this.translateService.currentLang)}return e.prototype.ngOnInit=function(){var e=this.route.snapshot.paramMap.get("documentDefinitionName"),t=this.form;this.formDefinition=t,this.errors=[],this.formHasLegacyUpload(t)&&this.setInitialToken(),e&&this.stateService.setDocumentDefinitionName(e),this.subscribeFormRefresh(),this.openLanguageSubscription()},e.prototype.ngOnChanges=function(e){var t=e.form.currentValue;this.formDefinition=t,this.reloadForm(),this.formHasLegacyUpload(t)&&this.setInitialToken(),e.formDefinitionRefresh$&&(this.unsubscribeFormRefresh(),this.subscribeFormRefresh())},e.prototype.ngOnDestroy=function(){var e,t;this.unsubscribeFormRefresh(),null===(e=this.tokenRefreshTimerSubscription)||void 0===e||e.unsubscribe(),null===(t=this.languageSubscription)||void 0===t||t.unsubscribe()},e.prototype.reloadForm=function(){this.refreshForm.emit({form:this.formDefinition})},e.prototype.showErrors=function(e){this.errors=e},e.prototype.onSubmit=function(e){this.errors=[],this.submit.emit(e)},e.prototype.formReady=function(e){this.reloadForm(),this.stateService.currentForm=e},e.prototype.onChange=function(e){this.change.emit(e)},e.prototype.formHasLegacyUpload=function(e){return JSON.stringify(e).includes('"type":"file"')},e.prototype.setInitialToken=function(){var e=this;this.userProviderService.getToken().then((function(t){e.setToken(t)}))},e.prototype.setToken=function(e){x.Formio.setToken(e),this.setTimerForTokenRefresh(e),this.logger.debug("New token set for form.io.")},e.prototype.setTimerForTokenRefresh=function(e){var t=this,n=1e3*w(e).exp-Date.now()-1e3;this.tokenRefreshTimerSubscription=c.timer(n).subscribe((function(){t.refreshToken()})),this.logger.debug("Timer for form.io token refresh set for: "+n+"ms.")},e.prototype.refreshToken=function(){var e=this;c.from(this.userProviderService.updateToken(-1)).pipe(g.switchMap((function(){return e.userProviderService.getToken()})),g.take(1)).subscribe((function(t){e.setToken(t)}))},e.prototype.subscribeFormRefresh=function(){var e=this;this.formRefresh$&&(this.formRefreshSubscription=this.formRefresh$.subscribe((function(t){t&&e.refreshForm.emit(t)})))},e.prototype.unsubscribeFormRefresh=function(){this.formRefreshSubscription&&this.formRefreshSubscription.unsubscribe()},e.prototype.openLanguageSubscription=function(){var e=this;this.languageSubscription=this.translateService.stream("key").subscribe((function(){e.currentLanguage$.next(e.translateService.currentLang)}))},e}();nt.decorators=[{type:t.Component,args:[{selector:"valtimo-form-io",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <div *ngIf="errors.length > 0" class="alert alert-danger pt-5 pb-5 mb-2">\n <ol>\n <li *ngFor="let error of errors">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n [submission]="submission"\n [form]="formDefinition"\n [refresh]="refreshForm"\n [options]="options"\n [language]="currentLanguage$ | async"\n (submit)="onSubmit($event)"\n (ready)="formReady($event)"\n (change)="onChange($event)"\n ></formio>\n</div>\n',styles:[""]}]}],nt.ctorParameters=function(){return[{type:p.UserProviderService},{type:a.NGXLogger},{type:tt},{type:s.ActivatedRoute},{type:m.TranslateService}]},nt.propDecorators={form:[{type:t.Input}],options:[{type:t.Input}],submission:[{type:t.Input}],formRefresh$:[{type:t.Input}],submit:[{type:t.Output}],change:[{type:t.Output}]};var it=function(){function e(){this.change=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.onChange=function(e){this.change.emit(e)},e}();it.decorators=[{type:t.Component,args:[{selector:"valtimo-form-io-builder",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div>\n <form-builder [form]="form" (change)="onChange($event)"></form-builder>\n</div>\n',styles:[""]}]}],it.ctorParameters=function(){return[]},it.propDecorators={form:[{type:t.Input}],change:[{type:t.Output}]};var ot={appUrl:"http://localhost:4200",apiUrl:"http://localhost:4200",icons:"fontawesome",formOnly:!1},rt=function(){function e(e){this.stateService=e}return e.prototype.toggleSubmitButton=function(e){this.stateService.currentForm$.pipe(g.take(1)).subscribe((function(t){t.formioElement.nativeElement.getElementsByClassName("formio-component-submit")[0].getElementsByClassName("btn-primary")[0].disabled=e}))},e}();rt.decorators=[{type:t.Injectable}],rt.ctorParameters=function(){return[{type:tt}]};var st=function(){function e(e,n,i,o){this.uploadProviderService=e,this.stateService=n,this.domService=i,this.downloadService=o,this.valueChange=new t.EventEmitter,this.uploading$=new c.BehaviorSubject(!1),this._value=[]}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){Array.isArray(e)&&(this._value=e)},enumerable:!1,configurable:!0}),e.prototype.downloadFile=function(e){var t=this;this.uploadProviderService.getResource(e.data.resourceId).subscribe((function(e){t.downloadService.downloadFile(e.url,e.resource.name)}))},e.prototype.fileSelected=function(e){var t=this;this.domService.toggleSubmitButton(!0),this.uploading$.next(!0),this.stateService.documentDefinitionName$.pipe(g.take(1)).subscribe((function(n){t.uploadProviderService.uploadFile(e,n).subscribe((function(e){t.domService.toggleSubmitButton(!1),t.uploading$.next(!1),t._value.push(e),t.valueChange.emit(t._value)}))}))},e.prototype.deleteFile=function(e){this.domService.toggleSubmitButton(!0),this._value=this._value.filter((function(t){var n;return!(null==t?void 0:t.data)||(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.resourceId)!==e})),this.valueChange.emit(this._value)},e}();st.decorators=[{type:t.Component,args:[{selector:"valtimo-formio-uploader",template:'<valtimo-dropzone\n (fileSelected)="fileSelected($event)"\n [acceptedFiles]="null"\n [disabled]="disabled"\n [hideFilePreview]="true"\n [hideTitle]="hideTitle"\n [maxFileSize]="maxFileSize"\n [showMaxFileSize]="!hideMaxFileSize"\n [subtitle]="subtitle"\n [title]="title"\n [camera]="camera"\n [uploading]="uploading$ | async"\n></valtimo-dropzone>\n\n<div class="file-preview" *ngFor="let resource of _value">\n <div class="file-preview-name">\n <a href="#" (click)="downloadFile(resource)">\n {{ resource.originalName }}\n </a>\n </div>\n <div class="file-preview-size">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class="file-preview-delete" *ngIf="!disabled">\n <a (click)="deleteFile(resource.data.resourceId)">\n <i class="icon mdi mdi-delete"></i>\n </a>\n </div>\n</div>\n',styles:[".progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .btn-secondary,::ng-deep .formio-component-valtimo-file .formio-button-add-another{display:none}::ng-deep .formio-component-valtimo-file td{border:none;padding:0!important}::ng-deep .formio-component-valtimo-file .table{border:none;border-collapse:collapse;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{border:1px solid #dee2e6;display:flex;margin-top:-1px}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;cursor:pointer;font-size:1.3846rem;line-height:18px}.file-preview .icon:hover{color:grey}"]}]}],st.ctorParameters=function(){return[{type:I.UploadProviderService},{type:tt},{type:rt},{type:I.DownloadService}]},st.propDecorators={disabled:[{type:t.Input}],title:[{type:t.Input}],hideTitle:[{type:t.Input}],subtitle:[{type:t.Input}],maxFileSize:[{type:t.Input}],hideMaxFileSize:[{type:t.Input}],camera:[{type:t.Input}],valueChange:[{type:t.Output}],value:[{type:t.Input}]};var at=function(){function e(e){var n=this;this.translateService=e,this.externalError$=new c.BehaviorSubject(""),this.maxFileSize=5,this.showMaxFileSize=!0,this.acceptedFiles=".json",this.clear$=new c.Subject,this.camera=!1,this.fileSelected=new t.EventEmitter,this.file$=new c.BehaviorSubject(void 0),this.showingCamera$=new c.BehaviorSubject(!1),this.error$=new c.BehaviorSubject(""),this.errorMessagesStrings={tooBig:"too big",wrongType:"this type"},this.errorMessage$=c.combineLatest([this.error$,this.translateService.stream("dropzone.error.generic"),this.translateService.stream("dropzone.error.tooBig"),this.translateService.stream("dropzone.error.wrongType")]).pipe(g.map((function(e){var t=ae(e,4),i=t[0],o=t[1],r=t[2],s=t[3],a=n.errorMessagesStrings;return i?i.includes(a.tooBig)?r:i.includes(a.wrongType)?s:o:""})))}return e.prototype.ngOnInit=function(){var e=this;this.clearSubscription=this.clear$.subscribe((function(){e.clearFile(),e.clearError()}))},e.prototype.ngAfterViewInit=function(){this.initDropzone()},e.prototype.ngOnDestroy=function(){this.clearSubscription.unsubscribe()},e.prototype.showCamera=function(){this.showingCamera$.next(!0)},e.prototype.webcamImageSaved=function(e){e&&this.setFile(e),this.showingCamera$.next(!1)},e.prototype.initDropzone=function(){var e=this;this.dropzone=new S(this.dropzoneRef.nativeElement,{url:"/",maxFilesize:this.maxFileSize,clickable:this.dropzoneRef.nativeElement,autoProcessQueue:!1,createImageThumbnails:!1,acceptedFiles:this.acceptedFiles,previewTemplate:"<p style='display:none'></p>",accept:function(t){e.dropzone.removeAllFiles(),e.setFile(t)}}),this.setDropzoneEvents()},e.prototype.setDropzoneEvents=function(){var e=this;this.dropzone.on("error",(function(t,n){e.clearFile(),e.error$.next(n.toString())}))},e.prototype.clearFile=function(){this.file$.next(void 0)},e.prototype.clearError=function(){this.error$.next("")},e.prototype.setFile=function(e){this.file$.next(e),this.clearError(),this.fileSelected.emit(e)},e}();at.decorators=[{type:t.Component,args:[{selector:"valtimo-dropzone",template:'<form #dropzone [ngClass]="{disabled: disabled || uploading}" class="dropzone dz-clickable">\n <div class="dz-message">\n <div class="icon"><span class="mdi mdi-cloud-upload"></span></div>\n <ng-container *ngTemplateOutlet="body"></ng-container>\n <ng-container *ngIf="uploading">\n <ng-container *ngTemplateOutlet="progressBar"></ng-container>\n </ng-container>\n <div class="dropzone-mobile-trigger needsclick"></div>\n </div>\n <button\n (click)="showCamera()"\n *ngIf="camera"\n type="button"\n class="btn btn-primary px-3 webcam-button"\n >\n <i class="icon mdi mdi-camera" aria-hidden="true"></i>\n </button>\n <ng-container *ngIf="showingCamera$ | async">\n <ng-container *ngTemplateOutlet="webcam"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf="!hideTitle" class="mb-4 mt-2">{{ title || (\'dropzone.drop\' | translate) }}</h2>\n <span *ngIf="subtitle" class="note mb-3">{{ subtitle }}</span>\n <span *ngIf="showMaxFileSize" class="note mb-3 small-font"\n >{{ \'dropzone.maxFileSize\' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet="preview"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf="{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs"\n >\n <ng-container *ngIf="obs.externalError || obs.errorMessage">\n <div class="alert alert-danger mt-2 mb-0">\n <div class="message">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf="!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage">\n <div class="file">\n <i class="icon mdi mdi-file-text mr-2"></i>\n <span class="note">{{ obs.file.name }}</span>\n <span class="note file-size">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class="progress-bar-container">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)="webcamImageSaved($event)"></valtimo-webcam>\n</ng-template>\n',styles:["form.dropzone{padding:30px 20px}form.dropzone h2{font-size:2rem;text-align:center}form.dropzone.disabled{cursor:default;opacity:.7;pointer-events:none}form.dropzone.preview{border:none;padding:15px 20px}.dz-message{align-items:center;display:flex;flex-direction:column}.dropzone-mobile-trigger{cursor:pointer}.alert-light{align-items:center;display:flex}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;margin-bottom:0;padding:0;width:auto}form.dropzone .message{padding:1.385rem 2.1542rem}.file{align-items:center;display:flex;flex-direction:row;font-size:1.5rem}.small-font{color:#959595;font-size:1rem}.file-size{margin-left:5px}.progress-bar-container{bottom:0;height:auto;position:absolute;width:100%}.webcam-button{position:absolute;right:10px;top:10px}"]}]}],at.ctorParameters=function(){return[{type:m.TranslateService}]},at.propDecorators={dropzoneRef:[{type:t.ViewChild,args:["dropzone"]}],title:[{type:t.Input}],hideTitle:[{type:t.Input}],subtitle:[{type:t.Input}],externalError$:[{type:t.Input}],maxFileSize:[{type:t.Input}],showMaxFileSize:[{type:t.Input}],acceptedFiles:[{type:t.Input}],clear$:[{type:t.Input}],disabled:[{type:t.Input}],hideFilePreview:[{type:t.Input}],uploading:[{type:t.Input}],camera:[{type:t.Input}],fileSelected:[{type:t.Output}]};var lt=function(){};lt.decorators=[{type:t.Component,args:[{selector:"valtimo-progress-bar",template:'<div class="progress" style="position: relative">\n <div class="progress-bar progress-bar-striped indeterminate"></div>\n</div>\n',styles:[".progress-bar.indeterminate{-webkit-animation:progress-indeterminate 3s linear infinite;animation:progress-indeterminate 3s linear infinite;position:relative}@-webkit-keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}@keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}"]}]}];var ct=function(){};ct.decorators=[{type:t.NgModule,args:[{declarations:[lt],imports:[n.CommonModule],exports:[lt]}]}];var ut=function(){function e(){this.imageSaved=new t.EventEmitter,this.showing$=new c.BehaviorSubject(!1),this.stream$=new c.BehaviorSubject(void 0),this.picture$=new c.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){var e=this,t=this.getVideoElement();setTimeout((function(){e.toggleFade()})),navigator.mediaDevices.getUserMedia&&navigator.mediaDevices.getUserMedia({video:!0}).then((function(n){t.srcObject=n,e.stream$.next(n)}))},e.prototype.captureImage=function(){var e=this.getVideoElement(),t=document.querySelector("#canvas");t.width=640,t.height=480,t.getContext("2d").drawImage(e,0,0,t.width,t.height);var n=t.toDataURL("image/jpeg");return this.picture$.next({file:this.dataURItoFile(n),uri:n}),!1},e.prototype.clearImage=function(){return this.picture$.next(void 0),!1},e.prototype.close=function(e){return void 0===e&&(e=!0),e||this.clearImage(),this.toggleFade(),this.emitOnTimeOut(),!1},e.prototype.stopStream=function(){this.stream$.pipe(g.take(1)).subscribe((function(e){e&&e.getTracks().forEach((function(e){return e.stop()}))}))},e.prototype.getVideoElement=function(){return document.querySelector("#videoElement")},e.prototype.emitOnTimeOut=function(){var e=this;setTimeout((function(){var t;e.stopStream(),e.imageSaved.emit(null===(t=e.picture$.getValue())||void 0===t?void 0:t.file)}),250)},e.prototype.toggleFade=function(){this.showing$.next(!this.showing$.getValue())},e.prototype.dataURItoFile=function(e){for(var t=atob(e.split(",")[1]),n=[],i=0;i<t.length;i++)n.push(t.charCodeAt(i));var o=new Blob([new Uint8Array(n)],{type:"image/jpeg"}),r="IMG_"+(new Date).toISOString().replace(/[-:.]/g,"")+".jpg";return new File([o],r)},e}();ut.decorators=[{type:t.Component,args:[{selector:"valtimo-webcam",template:'<div\n (click)="close(false)"\n *ngIf="{picture: picture$ | async, stream: stream$ | async} as obs"\n [ngClass]="{showing: showing$ | async}"\n class="webcam-overlay"\n>\n <div (click)="(false); $event.stopPropagation()" class="inner-container">\n <div class="webcam-container modal-content">\n <div class="video-container">\n <video autoplay="true" id="videoElement"></video>\n <canvas id="canvas"></canvas>\n <img *ngIf="obs.picture?.uri" [src]="obs.picture?.uri" />\n </div>\n <div class="button-container">\n <div class="picture-btn">\n <button\n (click)="captureImage()"\n [disabled]="obs.picture?.file || !obs.stream"\n class="btn btn-primary btn-lg"\n >\n <i class="icon mdi mdi-camera mr-1"></i>{{ \'webcam.takePicture\' | translate }}\n </button>\n </div>\n <div class="new-btn">\n <button (click)="clearImage()" [disabled]="!obs.picture?.file" class="btn btn-primary">\n <i class="icon mdi mdi-redo mr-1"></i>{{ \'webcam.redo\' | translate }}\n </button>\n </div>\n <div class="save-btn">\n <button (click)="close()" [disabled]="!obs.picture?.file" class="btn btn-primary">\n <i class="icon mdi mdi-save mr-1"></i>{{ \'webcam.save\' | translate }}\n </button>\n </div>\n </div>\n </div>\n <div class="modal-header">\n <button (click)="close(false)" aria-label="Close" class="close"><span>×</span></button>\n </div>\n </div>\n</div>\n',styles:[".webcam-overlay{align-items:center;background-color:rgba(0,0,0,.65);display:flex;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transition:opacity .15s linear;width:100%;z-index:9999}.showing{opacity:1}.webcam-container{padding:20px}.button-container{align-items:center;display:flex;height:30px;justify-content:space-evenly;margin-bottom:10px;margin-top:20px}.button-container i{margin-right:5px}.new-btn,.picture-btn,.save-btn{display:flex;justify-content:center;position:absolute}.new-btn .icon,.picture-btn .icon,.save-btn .icon{background-color:unset;border-radius:unset;display:inline-block;height:unset;margin-bottom:0;padding:0;width:unset}.new-btn,.save-btn{width:calc(50% - 65px)}.picture-btn{left:0;width:100%}.new-btn{left:0}.save-btn{right:0}.modal-header{color:grey;margin-top:35px;padding:0;position:absolute;right:-18px;top:0}.close{color:grey}.inner-container{position:relative}.video-container{height:495px;overflow:hidden}.video-container img,.video-container video{height:495px;position:absolute;width:660px}.video-container img{-o-object-fit:cover;object-fit:cover}#canvas{display:none}"]}]}],ut.propDecorators={imageSaved:[{type:t.Output}]};var pt=function(){};pt.decorators=[{type:t.NgModule,args:[{declarations:[ut],imports:[n.CommonModule,m.TranslateModule],exports:[ut]}]}];var dt=function(){};dt.decorators=[{type:t.NgModule,args:[{declarations:[at],imports:[n.CommonModule,m.TranslateModule,_e,ct,pt],exports:[at]}]}];var mt=ot,ft=function(){};ft.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,x.FormioModule,dt,m.TranslateModule,u.DocumentModule,_e,I.ResourceModule,s.RouterModule],declarations:[nt,it,st],exports:[nt,it,st],providers:[tt,rt,{provide:x.FormioAppConfig,useValue:mt}]}]}];var ht=function(){function e(){this.title="",this.subtitle="",this.showFooter=!1}return e.prototype.ngAfterViewInit=function(){$("#"+this.elementId).modal({show:!1})},e.prototype.show=function(){$("#"+this.elementId).modal("show")},e.prototype.hide=function(){$("#"+this.elementId).modal("hide")},e}();ht.decorators=[{type:t.Component,args:[{selector:"valtimo-modal",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="modal fade custom-width" [id]="elementId" role="dialog" aria-modal="true">\n <div class="modal-dialog modal-lg">\n <div class="modal-content">\n <div class="modal-header modal-header-colored colored-header-grey">\n <div class="modal-title">\n <h4 class="title-text mb-2">{{ title }}</h4>\n <h5 class="subtitle-text">{{ subtitle }}</h5>\n <ng-container *ngIf="templateBelowSubtitle">\n <ng-container *ngTemplateOutlet="templateBelowSubtitle"></ng-container>\n </ng-container>\n </div>\n <div class="text-right">\n <img src="assets/modal/header-image.png" class="modal-header-image" />\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n </div>\n <div class="modal-body">\n <ng-content select="[body]"></ng-content>\n </div>\n <div class="modal-footer" *ngIf="showFooter">\n <ng-content select="[footer]"></ng-content>\n </div>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.colored-header-grey{background-color:#f3f4f7}.title-text{color:#585555}.subtitle-text{color:#959595}.modal-header-image{height:auto;width:50%}.modal-header{border-bottom:1px solid #c5c6c9;padding-bottom:.66rem}@media (min-width:768px){.close{left:25px;margin-top:-20px!important;padding:0!important;position:relative}.close span{color:#fff}.modal-content{overflow:visible}}']}]}],ht.ctorParameters=function(){return[]},ht.propDecorators={elementId:[{type:t.Input}],title:[{type:t.Input}],subtitle:[{type:t.Input}],templateBelowSubtitle:[{type:t.Input}],showFooter:[{type:t.Input}]};var gt=function(){};gt.decorators=[{type:t.NgModule,args:[{declarations:[ht],imports:[n.CommonModule],exports:[ht]}]}];var bt=function(){this.useBootstrapSpinner=!0,this.type="ball-clip-rotate",this.size="medium",this.color="currentColor",this.bdColor="rgba(0,0,0,0)",this.fullScreen=!1,this.noMarginTop=!1};bt.decorators=[{type:t.Component,args:[{selector:"valtimo-spinner",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-container *ngIf="useBootstrapSpinner; else ngxSpinner">\n <div class="spinner-container" [ngClass]="{\'no-margin-top\': noMarginTop}">\n <div class="spinner-border text-primary" role="status">\n <span class="sr-only">{{ \'interface.loading\' | translate }}</span>\n </div>\n </div>\n</ng-container>\n\n<ng-template #ngxSpinner>\n <ngx-spinner\n [bdColor]="bdColor"\n [fullScreen]="fullScreen"\n [name]="name"\n [color]="color"\n [size]="size"\n [type]="type"\n >\n </ngx-spinner>\n</ng-template>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.spinner-container{display:flex;justify-content:center;margin-top:30px;width:100%}.spinner-container.no-margin-top{margin-top:0}']}]}],bt.propDecorators={useBootstrapSpinner:[{type:t.Input}],name:[{type:t.Input}],type:[{type:t.Input}],size:[{type:t.Input}],color:[{type:t.Input}],bdColor:[{type:t.Input}],fullScreen:[{type:t.Input}],noMarginTop:[{type:t.Input}]};var vt=function(){};vt.decorators=[{type:t.NgModule,args:[{declarations:[bt],exports:[bt],imports:[n.CommonModule,C.NgxSpinnerModule,m.TranslateModule]}]}];var yt=function(){function e(){this.width=250,this.itemSelected=new t.EventEmitter,this.searchId="search",this.searchTerm=new i.FormControl(""),this.focusedItemId$=new c.BehaviorSubject(this.searchId),this.open$=new c.BehaviorSubject(!1),this.filteredItems$=new c.BehaviorSubject(void 0),this.wasInside=!1,this.mouseOnList$=new c.BehaviorSubject(!1)}return e.prototype.clickInside=function(){this.wasInside=!0},e.prototype.clickout=function(){this.wasInside||this.closeDropdown(),this.wasInside=!1},e.prototype.ngOnInit=function(){this.openKeysSubscription(),this.openSearchSubscription()},e.prototype.ngOnChanges=function(e){var t=e.items,n=t.currentValue;t&&!t.previousValue&&n&&this.filteredItems$.next(n)},e.prototype.ngOnDestroy=function(){this.keySubscription.unsubscribe(),this.searchSubscription.unsubscribe()},e.prototype.openDropdown=function(){this.open$.next(!0)},e.prototype.hoverOverButton=function(e){this.focusedItemId$.next(e)},e.prototype.mouseEnterList=function(){this.mouseOnList$.next(!0)},e.prototype.mouseLeaveList=function(){this.mouseOnList$.next(!1)},e.prototype.resetFocus=function(){this.focusedItemId$.next(this.searchId)},e.prototype.submit=function(e){this.itemSelected.emit(e)},e.prototype.closeDropdown=function(){this.searchTerm.setValue(""),this.resetFocus(),this.open$.next(!1)},e.prototype.openKeysSubscription=function(){var e=this;this.keySubscription=c.fromEvent(document,"keyup").pipe(g.debounceTime(50)).subscribe((function(t){c.combineLatest([e.mouseOnList$,e.filteredItems$,e.focusedItemId$]).pipe(g.take(1)).subscribe((function(n){var i=ae(n,3),o=i[0],r=i[1],s=i[2],a=r.length,l=r.findIndex((function(e){return e.id===s})),c=t.code,u=t.shiftKey;"Escape"===c&&e.closeDropdown(),"Enter"===c&&s!==e.searchId&&e.submit(s),a>0&&!o&&("ArrowDown"===c||"Tab"===c&&!u?s===e.searchId?(e.focusedItemId$.next(r[0].id),e.scrollButtonIntoView(s)):l+1<a&&(e.focusedItemId$.next(r[l+1].id),e.scrollButtonIntoView(s)):("ArrowUp"===c||"Tab"===c&&u)&&s!==e.searchId&&(l>0?(e.focusedItemId$.next(r[l-1].id),e.scrollButtonIntoView(s)):e.resetFocus()))}))}))},e.prototype.openSearchSubscription=function(){var e=this;this.searchSubscription=this.searchTerm.valueChanges.subscribe((function(t){e.focusedItemId$.pipe(g.take(1)).subscribe((function(n){if(t){var i=e.items.filter((function(e){return e.text.toUpperCase().includes(t.toUpperCase())}));e.filteredItems$.next(i),0!==i.length&&i.some((function(e){return e.id===n}))||e.resetFocus()}else e.filteredItems$.next(e.items);setTimeout((function(){e.scrollButtonIntoView(n)}))}))}))},e.prototype.scrollButtonIntoView=function(e){var t=this;this.filteredItems$.pipe(g.take(1)).subscribe((function(n){var i=n.findIndex((function(t){return t.id===e})),o=t.buttons.toArray()[i];o&&o.nativeElement.scrollIntoView({behavior:"smooth",block:"center"})}))},e}();yt.decorators=[{type:t.Component,args:[{selector:"valtimo-searchable-dropdown",template:'<ng-container *ngIf="buttonText && items">\n <ng-container [ngTemplateOutlet]="(open$ | async) ? opened : closed"> </ng-container>\n</ng-container>\n\n<ng-template #closed>\n <ng-container *ngIf="style === \'button\' || !style">\n <button\n class="btn btn-primary btn-sm dropdown-size"\n (click)="openDropdown()"\n [style.width.px]="width"\n >\n {{ buttonText }}\n </button>\n </ng-container>\n <ng-container *ngIf="style === \'underlinedText\'">\n <h5 class="underline-button" (click)="openDropdown()" [style.width.px]="width">\n <b>\n {{ buttonText }}\n </b>\n </h5>\n </ng-container>\n</ng-template>\n\n<ng-template #opened>\n <div class="dropdown-container" [style.width.px]="width">\n <div class="dropdown-size search" [style.width.px]="width">\n <input\n #search\n [ngClass]="{disabled: disabled}"\n [placeholder]="searchText"\n [formControl]="searchTerm"\n />\n {{ search.focus() }}\n </div>\n <div class="dropdown-list" (mouseenter)="mouseEnterList()" (mouseleave)="mouseLeaveList()">\n <ng-container *ngIf="filteredItems$ | async as filteredItems">\n <ng-container\n *ngIf="\n filteredItems.length > 0 && focusedItemId$ | async as focusedItemId;\n else noResults\n "\n >\n <button\n #button\n *ngFor="let item of filteredItems"\n [ngClass]="{focus: focusedItemId === item.id, disabled: disabled}"\n class="dropdown-button dropdown-size"\n (click)="submit(item.id)"\n (mouseenter)="hoverOverButton(item.id)"\n (mouseleave)="resetFocus()"\n [style.width.px]="width"\n >\n <span class="dropdown-button-text">\n {{ item.text }}\n </span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container [ngTemplateOutlet]="space"> </ng-container>\n</ng-template>\n\n<ng-template #noResults>\n <div class="dropdown-button dropdown-size disabled" [style.width.px]="width">\n <span class="dropdown-button-text">{{ noResultsText }}</span>\n </div>\n</ng-template>\n\n<ng-template #space>\n <div *ngIf="style === \'button\' || !style" class="dropdown-size" [style.width.px]="width"></div>\n <h5 *ngIf="style === \'underlinedText\'" class="underline-button"><b>-</b></h5>\n</ng-template>\n',styles:[".dropdown-size{height:34px;width:250px}.underline-button{cursor:pointer;text-decoration:underline;width:250px}.dropdown-container{background-color:#fff;border:1px solid #e3e3e3;border-radius:3px;box-shadow:0 0 6px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;max-height:300px;overflow:hidden;padding:7px 0;position:fixed;width:250px;z-index:999}.dropdown-list{list-style:none;margin:0;overflow:auto;overflow-x:hidden;padding:0;z-index:9999}.search{align-items:center;border-bottom:1px solid #dee2e6;display:flex;flex-shrink:0;height:44px;padding:8px 24px}.search input{padding:0;width:100%}.dropdown-button,.search input,.search input:focus{border:none;outline:none}.dropdown-button{align-items:center;background-color:#fff;color:#504e4e;cursor:pointer;display:flex;font-size:1rem;font-weight:400;padding:8px 24px}.dropdown-button.focus{background-color:#f5f5f5}.dropdown-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled{color:#959595;cursor:default;pointer-events:none}"]}]}],yt.propDecorators={style:[{type:t.Input}],items:[{type:t.Input}],buttonText:[{type:t.Input}],searchText:[{type:t.Input}],noResultsText:[{type:t.Input}],disabled:[{type:t.Input}],width:[{type:t.Input}],itemSelected:[{type:t.Output}],buttons:[{type:t.ViewChildren,args:["button"]}],clickInside:[{type:t.HostListener,args:["click"]}],clickout:[{type:t.HostListener,args:["document:click"]}]};var It=function(){};It.decorators=[{type:t.NgModule,args:[{declarations:[yt],imports:[n.CommonModule,i.ReactiveFormsModule],exports:[yt]}]}];var xt="valtimo-file",wt={type:xt,selector:"valtimo-form-io-uploader",title:"Valtimo File Upload",group:"basic",icon:"upload",emptyValue:[],editForm:function(){return{components:[{key:"type",type:"hidden"},{type:"textfield",input:!0,key:"label",label:"Label",placeholder:"Label",validate:{required:!0}},{type:"textfield",input:!0,key:"key",label:"Property Name",placeholder:"Property Name",tooltip:"The name of this field in the API endpoint.",validate:{required:!0}},{type:"textfield",input:!0,key:"customOptions.title",label:"Title",placeholder:"Title",tooltip:"Leave empty to use the default title",validate:{required:!1}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.hideTitle",label:"Hide title",validate:{required:!1}},{type:"textfield",input:!0,key:"customOptions.subtitle",label:"Subtitle",placeholder:"Title",tooltip:"Leave empty to hide subtitle",validate:{required:!1}},{type:"number",input:!0,key:"customOptions.maxFileSize",label:"Maximum file size",placeholder:"Maximum file size",defaultValue:5,validate:{required:!0}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.hideMaxFileSize",label:"Hide maximum file size",validate:{required:!1}},{type:"checkbox",input:!0,inputType:"checkbox",key:"customOptions.camera",label:"Allow camera uploads",validate:{required:!1}}]}}};var St=function(){function e(){this.width=250,this.itemSelected=new t.EventEmitter,this.clearSelection=new t.EventEmitter}return e.prototype.onSelect=function(e){this.itemSelected.emit(e)},e.prototype.onClearSelection=function(){this.clearSelection.emit()},e}();St.decorators=[{type:t.Component,args:[{selector:"valtimo-searchable-dropdown-select",template:'<valtimo-searchable-dropdown\n *ngIf="!hasSelection; else selection"\n [style]="style"\n [items]="items"\n [buttonText]="buttonText"\n [searchText]="searchText"\n [noResultsText]="noResultsText"\n [disabled]="disabled"\n [width]="width"\n (itemSelected)="onSelect($event)"\n>\n</valtimo-searchable-dropdown>\n\n<ng-template #selection>\n <div\n class="d-flex flex-row align-items-center"\n [style.height.px]="style === \'button\' ? 34 : null"\n >\n <h5 class="selected-text">\n {{ selectedText }} <b>{{ selectedTextValue }}</b>\n </h5>\n <button\n type="button"\n class="close p-0 m-0 ml-2 d-flex text-danger"\n aria-label="Close"\n (click)="onClearSelection()"\n [title]="clearSelectionButtonTitle"\n >\n <i class="clear-icon mdi mdi-close text-danger"></i>\n </button>\n </div>\n</ng-template>\n',styles:[".selected-text{margin:0}.clear-icon{font-size:16px}"]}]}],St.propDecorators={style:[{type:t.Input}],items:[{type:t.Input}],buttonText:[{type:t.Input}],searchText:[{type:t.Input}],noResultsText:[{type:t.Input}],disabled:[{type:t.Input}],selectedText:[{type:t.Input}],selectedTextValue:[{type:t.Input}],clearSelectionButtonTitle:[{type:t.Input}],hasSelection:[{type:t.Input}],width:[{type:t.Input}],itemSelected:[{type:t.Output}],clearSelection:[{type:t.Output}]};var Ct=function(){};Ct.decorators=[{type:t.NgModule,args:[{declarations:[St],imports:[n.CommonModule,i.ReactiveFormsModule,It],exports:[St]}]}];var Nt=function(){function e(){this.items=[],this.dropdownSettings={singleSelection:!1,selectAllText:"Select All",unSelectAllText:"UnSelect All",itemsShowLimit:3,allowSearchFilter:!0},this.itemsSelected=new t.EventEmitter}return e.prototype.onItemsSelected=function(){this.itemsSelected.emit(this.selectedItems)},e}();Nt.decorators=[{type:t.Component,args:[{selector:"valtimo-multiselect-dropdown",template:'\x3c!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<ng-multiselect-dropdown\n [placeholder]="placeHolder"\n [data]="items"\n [(ngModel)]="selectedItems"\n [settings]="dropdownSettings"\n (onDropDownClose)="onItemsSelected()"\n></ng-multiselect-dropdown>\n',styles:[""]}]}],Nt.propDecorators={selectedItems:[{type:t.Input}],items:[{type:t.Input}],placeHolder:[{type:t.Input}],dropdownSettings:[{type:t.Input}],itemsSelected:[{type:t.Output}]};var Lt=function(){};Lt.decorators=[{type:t.NgModule,args:[{declarations:[Nt],imports:[n.CommonModule,i.ReactiveFormsModule,N.NgMultiSelectDropDownModule,i.FormsModule],exports:[Nt]}]}],e.Alert=O,e.AlertComponent=Je,e.AlertModule=Ze,e.AlertService=Xe,e.AlertsOptionsImpl=T,e.BpmnJsDiagramComponent=je,e.BpmnJsDiagramModule=ze,e.BreadcrumbNavigationComponent=Re,e.BreadcrumbNavigationModule=Ae,e.CamundaFormComponent=R,e.CamundaFormModule=X,e.CardComponent=Oe,e.CardModule=Te,e.ComponentsModule=Be,e.DataListComponent=Qe,e.DataListModule=et,e.DropzoneComponent=at,e.DropzoneModule=dt,e.FieldAutoFocusDirective=Pe,e.FieldAutoFocusModule=Ue,e.FileSizeModule=_e,e.FileSizePipe=Ge,e.FilterSidebarComponent=We,e.FilterSidebarModule=qe,e.FormIoModule=ft,e.FormIoUploaderComponent=st,e.FormioBuilderComponent=it,e.FormioComponent=nt,e.FormioOptionsImpl=F,e.LeftSidebarComponent=de,e.LeftSidebarModule=he,e.ListComponent=Ne,e.ListFilterPipe=Le,e.ListModule=Fe,e.MenuModule=oe,e.MenuRoutingModule=ee,e.MenuService=Q,e.ModalComponent=ht,e.ModalModule=gt,e.MultiselectDropdownComponent=Nt,e.MultiselectDropdownModule=Lt,e.PageHeaderComponent=Me,e.PageHeaderModule=ke,e.PageTitleComponent=me,e.PageTitleModule=fe,e.ProgressBarComponent=lt,e.ProgressBarModule=ct,e.RightSidebarComponent=ce,e.RightSidebarModule=pe,e.SearchableDropdownComponent=yt,e.SearchableDropdownModule=It,e.SearchableDropdownSelectComponent=St,e.SearchableDropdownSelectModule=Ct,e.SpinnerModule=vt,e.TimelineComponent=Ve,e.TimelineItemImpl=M,e.TimelineModule=$e,e.TopbarComponent=J,e.TopbarModule=Z,e.UploaderComponent=Ye,e.UploaderDragDropDirective=He,e.UploaderModule=Ke,e.ViewContentService=Ce,e.WebcamComponent=ut,e.WebcamModule=pt,e.WidgetComponent=De,e.WidgetModule=Ee,e.customUploaderType=xt,e.menuInitializer=function(e,t){var n=e.get(Q);return function(){return new Promise((function(e,i){try{t.debug("menu initializer before init"),n.init(),t.debug("menu initializer after init"),e()}catch(e){t.debug("menu initializer error",e),i(e)}}))}},e.registerFormioUploadComponent=function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.setValue=function(e){return this._customAngularElement.value=e,!0},t}(x.createCustomFormioComponent(wt));x.registerCustomFormioComponentWithClass(wt,st,t,e)},e.ɵ0=ue,e.ɵa=K,e.ɵb=j,e.ɵc=z,e.ɵd=B,e.ɵe=P,e.ɵf=G,e.ɵg=W,e.ɵh=q,e.ɵi=Y,e.ɵj=H,e.ɵk=_,e.ɵl=U,e.ɵm=k,e.ɵn=A,e.ɵo=te,e.ɵp=ne,e.ɵq=ie,e.ɵr=le,e.ɵs=tt,e.ɵt=rt,e.ɵu=ot,e.ɵv=bt,Object.defineProperty(e,"__esModule",{value:!0})}));
17
17
  //# sourceMappingURL=valtimo-components.umd.min.js.map