@klippa/ngx-enhancy-forms 10.2.0 → 11.0.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 (103) hide show
  1. package/esm2020/klippa-ngx-enhancy-forms.mjs +5 -0
  2. package/esm2020/lib/elements/button/button.component.mjs +57 -0
  3. package/esm2020/lib/elements/checkbox/checkbox.component.mjs +23 -0
  4. package/esm2020/lib/elements/date-picker/date-picker.component.mjs +108 -0
  5. package/esm2020/lib/elements/date-time-picker/date-time-picker.component.mjs +360 -0
  6. package/esm2020/lib/elements/email/email-input.component.mjs +20 -0
  7. package/esm2020/lib/elements/file-input/file-input.component.mjs +71 -0
  8. package/esm2020/lib/elements/hour-minute-input/hour-minute-input.component.mjs +90 -0
  9. package/esm2020/lib/elements/loading-indicator/loading-indicator.component.mjs +20 -0
  10. package/esm2020/lib/elements/number-input/number-input.component.mjs +31 -0
  11. package/esm2020/lib/elements/password-field/password-field.component.mjs +21 -0
  12. package/esm2020/lib/elements/select/select-footer/select-footer.component.mjs +15 -0
  13. package/esm2020/lib/elements/select/select.component.mjs +129 -0
  14. package/esm2020/lib/elements/sortable-grouped-items/sortable-grouped-items.component.mjs +51 -0
  15. package/esm2020/lib/elements/sortable-items/sortable-items.component.mjs +70 -0
  16. package/esm2020/lib/elements/text-input/text-input.component.mjs +28 -0
  17. package/esm2020/lib/elements/toggle/toggle.component.mjs +15 -0
  18. package/esm2020/lib/elements/value-accessor-base/multiple-value-accessor-base.component.mjs +61 -0
  19. package/esm2020/lib/elements/value-accessor-base/value-accessor-base.component.mjs +144 -0
  20. package/esm2020/lib/form/form-caption/form-caption.component.mjs +36 -0
  21. package/esm2020/lib/form/form-element/form-element.component.mjs +124 -0
  22. package/esm2020/lib/form/form-error/form-error.component.mjs +39 -0
  23. package/esm2020/lib/form/form-submit-button/form-submit-button.component.mjs +61 -0
  24. package/esm2020/lib/form/form.component.mjs +180 -0
  25. package/esm2020/lib/material.module.mjs +22 -0
  26. package/esm2020/lib/ngx-enhancy-forms.module.mjs +158 -0
  27. package/esm2020/lib/types.mjs +2 -0
  28. package/esm2020/lib/util/arrays.mjs +45 -0
  29. package/esm2020/lib/util/values.mjs +23 -0
  30. package/esm2020/lib/validators/dateValidator.mjs +6 -0
  31. package/esm2020/lib/validators/timeValidator.mjs +6 -0
  32. package/esm2020/public-api.mjs +30 -0
  33. package/fesm2015/klippa-ngx-enhancy-forms.mjs +1894 -0
  34. package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -0
  35. package/fesm2020/klippa-ngx-enhancy-forms.mjs +1858 -0
  36. package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -0
  37. package/{klippa-ngx-enhancy-forms.d.ts → index.d.ts} +1 -1
  38. package/lib/elements/button/button.component.d.ts +4 -1
  39. package/lib/elements/checkbox/checkbox.component.d.ts +3 -0
  40. package/lib/elements/date-picker/date-picker.component.d.ts +3 -0
  41. package/lib/elements/date-time-picker/date-time-picker.component.d.ts +3 -0
  42. package/lib/elements/email/email-input.component.d.ts +3 -0
  43. package/lib/elements/file-input/file-input.component.d.ts +3 -0
  44. package/lib/elements/hour-minute-input/hour-minute-input.component.d.ts +3 -0
  45. package/lib/elements/loading-indicator/loading-indicator.component.d.ts +3 -0
  46. package/lib/elements/number-input/number-input.component.d.ts +3 -0
  47. package/lib/elements/password-field/password-field.component.d.ts +3 -0
  48. package/lib/elements/select/select-footer/select-footer.component.d.ts +3 -0
  49. package/lib/elements/select/select.component.d.ts +5 -0
  50. package/lib/elements/sortable-grouped-items/sortable-grouped-items.component.d.ts +3 -0
  51. package/lib/elements/sortable-items/sortable-items.component.d.ts +3 -0
  52. package/lib/elements/text-input/text-input.component.d.ts +3 -0
  53. package/lib/elements/toggle/toggle.component.d.ts +3 -0
  54. package/lib/elements/value-accessor-base/multiple-value-accessor-base.component.d.ts +3 -0
  55. package/lib/elements/value-accessor-base/value-accessor-base.component.d.ts +5 -2
  56. package/lib/form/form-caption/form-caption.component.d.ts +3 -0
  57. package/lib/form/form-element/form-element.component.d.ts +7 -4
  58. package/lib/form/form-error/form-error.component.d.ts +3 -0
  59. package/lib/form/form-submit-button/form-submit-button.component.d.ts +3 -0
  60. package/lib/form/form.component.d.ts +10 -5
  61. package/lib/material.module.d.ts +9 -0
  62. package/lib/ngx-enhancy-forms.module.d.ts +32 -0
  63. package/package.json +29 -16
  64. package/src/lib/form/README.md +1 -0
  65. package/bundles/klippa-ngx-enhancy-forms.umd.js +0 -2177
  66. package/bundles/klippa-ngx-enhancy-forms.umd.js.map +0 -1
  67. package/bundles/klippa-ngx-enhancy-forms.umd.min.js +0 -17
  68. package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +0 -1
  69. package/esm2015/klippa-ngx-enhancy-forms.js +0 -6
  70. package/esm2015/lib/elements/button/button.component.js +0 -49
  71. package/esm2015/lib/elements/checkbox/checkbox.component.js +0 -22
  72. package/esm2015/lib/elements/date-picker/date-picker.component.js +0 -95
  73. package/esm2015/lib/elements/date-time-picker/date-time-picker.component.js +0 -330
  74. package/esm2015/lib/elements/email/email-input.component.js +0 -21
  75. package/esm2015/lib/elements/file-input/file-input.component.js +0 -66
  76. package/esm2015/lib/elements/hour-minute-input/hour-minute-input.component.js +0 -90
  77. package/esm2015/lib/elements/loading-indicator/loading-indicator.component.js +0 -19
  78. package/esm2015/lib/elements/number-input/number-input.component.js +0 -30
  79. package/esm2015/lib/elements/password-field/password-field.component.js +0 -21
  80. package/esm2015/lib/elements/select/select-footer/select-footer.component.js +0 -15
  81. package/esm2015/lib/elements/select/select.component.js +0 -104
  82. package/esm2015/lib/elements/sortable-grouped-items/sortable-grouped-items.component.js +0 -49
  83. package/esm2015/lib/elements/sortable-items/sortable-items.component.js +0 -67
  84. package/esm2015/lib/elements/text-input/text-input.component.js +0 -25
  85. package/esm2015/lib/elements/toggle/toggle.component.js +0 -14
  86. package/esm2015/lib/elements/value-accessor-base/multiple-value-accessor-base.component.js +0 -54
  87. package/esm2015/lib/elements/value-accessor-base/value-accessor-base.component.js +0 -135
  88. package/esm2015/lib/form/form-caption/form-caption.component.js +0 -35
  89. package/esm2015/lib/form/form-element/form-element.component.js +0 -118
  90. package/esm2015/lib/form/form-error/form-error.component.js +0 -37
  91. package/esm2015/lib/form/form-submit-button/form-submit-button.component.js +0 -53
  92. package/esm2015/lib/form/form.component.js +0 -173
  93. package/esm2015/lib/material.module.js +0 -17
  94. package/esm2015/lib/ngx-enhancy-forms.module.js +0 -97
  95. package/esm2015/lib/types.js +0 -2
  96. package/esm2015/lib/util/arrays.js +0 -45
  97. package/esm2015/lib/util/values.js +0 -23
  98. package/esm2015/lib/validators/dateValidator.js +0 -6
  99. package/esm2015/lib/validators/timeValidator.js +0 -6
  100. package/esm2015/public-api.js +0 -30
  101. package/fesm2015/klippa-ngx-enhancy-forms.js +0 -1715
  102. package/fesm2015/klippa-ngx-enhancy-forms.js.map +0 -1
  103. package/klippa-ngx-enhancy-forms.metadata.json +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"klippa-ngx-enhancy-forms.umd.js","sources":["../../../../projects/klippa/ngx-enhancy-forms/src/lib/util/values.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-element/form-element.component.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/klippa/ngx-enhancy-forms/src/lib/util/arrays.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/value-accessor-base/value-accessor-base.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/button/button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/checkbox/checkbox.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/email/email-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/loading-indicator/loading-indicator.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/number-input/number-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/password-field/password-field.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/select/select.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/select/select-footer/select-footer.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/sortable-items/sortable-items.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/text-input/text-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/toggle/toggle.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-caption/form-caption.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-error/form-error.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-submit-button/form-submit-button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/value-accessor-base/multiple-value-accessor-base.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/validators/dateValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/date-picker/date-picker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/date-time-picker/date-time-picker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/material.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/file-input/file-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/sortable-grouped-items/sortable-grouped-items.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/validators/timeValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/hour-minute-input/hour-minute-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/ngx-enhancy-forms.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/public-api.ts","../../../../projects/klippa/ngx-enhancy-forms/src/klippa-ngx-enhancy-forms.ts"],"sourcesContent":["import { isString } from 'lodash';\n\nexport function stringIsSetAndFilled(s: string): boolean {\n\treturn isString(s) && s.length > 0;\n}\n\nexport function isNullOrUndefined(value: any): boolean {\n\treturn value === null || value === undefined;\n}\n\nexport function numberIsSet(value: any): boolean {\n\treturn isValueSet(value) && typeof value === 'number';\n}\n\nexport function isValueSet(value: any): boolean {\n\treturn value !== null && value !== undefined;\n}\n\nexport function stringOrArrayIsSetAndEmpty(value: any[] | string): boolean {\n\treturn value !== null && value !== undefined && value.length === 0;\n}\n\nexport function truncateString(s: string, length: number): string {\n\tif (s.length < length) {\n\t\treturn s;\n\t}\n\treturn s.substring(0, length) + '...';\n}\n\n","import {Component, Directive, Input, OnDestroy, OnInit, Optional, SkipSelf} from '@angular/core';\nimport {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\nimport {FormElementComponent} from './form-element/form-element.component';\nimport {isValueSet} from '../util/values';\n\nexport const invalidFieldsSymbol = Symbol('Not all fields are valid');\n\n@Directive({\n\t// tslint:disable-next-line:directive-selector\n\tselector: 'klp-sub-form',\n})\nexport class SubFormDirective {\n\t@Input() injectInto: FormArray | FormGroup;\n\t@Input() at: number | string;\n}\n\n@Component({\n\tselector: 'klp-form',\n\ttemplateUrl: './form.component.html',\n\tstyleUrls: ['./form.component.scss'],\n})\nexport class FormComponent implements OnInit, OnDestroy {\n\t@Input() public showErrorMessages = true;\n\t@Input() public errorMessageLocation: 'belowCaption' | 'rightOfCaption' = 'belowCaption';\n\t@Input() public formGroup: FormGroup;\n\t@Input() public patchValueInterceptor: (values: any) => Promise<any>;\n\n\t// we keep track of what form controls are actually rendered. Only those count when looking at form validation\n\tprivate activeControls: Array<{\n\t\tformControl: FormControl;\n\t\tformElement: FormElementComponent;\n\t}> = [];\n\n\tconstructor(@SkipSelf() @Optional() private parent: FormComponent, @Optional() private subFormPlaceholder: SubFormDirective) {\n\t}\n\n\tngOnInit(): void {\n\t\tif (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {\n\t\t\tconst injectInto = this.subFormPlaceholder.injectInto;\n\t\t\tconst injectAt = this.subFormPlaceholder.at;\n\t\t\tif (injectInto instanceof FormArray) {\n\t\t\t\tif (typeof injectAt !== 'number') {\n\t\t\t\t\tthrow new Error(`cannot index FormArray with ${typeof injectAt}`);\n\t\t\t\t}\n\n\t\t\t\tinjectInto.setControl(injectAt, this.formGroup);\n\t\t\t} else if (injectInto instanceof FormGroup) {\n\t\t\t\tif (typeof injectAt !== 'string') {\n\t\t\t\t\tthrow new Error(`cannot index FormGroup with ${typeof injectAt}`);\n\t\t\t\t}\n\n\t\t\t\tinjectInto.setControl(injectAt, this.formGroup);\n\t\t\t}\n\t\t}\n\t\tif (isValueSet(this.patchValueInterceptor)) {\n\t\t\tthis.addSupportForPatchValueInterceptor();\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tif (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {\n\t\t\tconst injectInto = this.subFormPlaceholder.injectInto;\n\t\t\tconst injectAt = this.subFormPlaceholder.at;\n\t\t\tif (injectInto instanceof FormArray) {\n\t\t\t\tconst idx = injectInto.controls.findIndex(e => e === this.formGroup);\n\t\t\t\tinjectInto.removeAt(idx);\n\t\t\t} else if (injectInto instanceof FormGroup) {\n\t\t\t\tif (typeof injectAt !== 'string') {\n\t\t\t\t\tthrow new Error(`cannot index FormGroup with ${typeof injectAt}`);\n\t\t\t\t}\n\t\t\t\tinjectInto.removeControl(injectAt);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate addSupportForPatchValueInterceptor(): void {\n\t\tconst fn = this.formGroup.patchValue;\n\t\tconst newFn = (\n\t\t\tvalue: {\n\t\t\t\t[key: string]: any;\n\t\t\t},\n\t\t\toptions?: {\n\t\t\t\tonlySelf?: boolean;\n\t\t\t\temitEvent?: boolean;\n\t\t\t}\n\t\t): void => {\n\t\t\tthis.patchValueInterceptor(value).then((val) => {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tfn.call(this.formGroup, val, options);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tthis.formGroup.patchValue = newFn;\n\t}\n\n\tpublic registerControl(formControl: FormControl, formElement: FormElementComponent): void {\n\t\tthis.activeControls.push({formControl, formElement});\n\t\tif (this.parent) {\n\t\t\tthis.parent.registerControl(formControl, formElement);\n\t\t}\n\t}\n\n\tpublic unregisterControl(formControl: FormControl): void {\n\t\tthis.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);\n\t\tif (this.parent) {\n\t\t\tthis.parent.unregisterControl(formControl);\n\t\t}\n\t}\n\n\tprivate addFormGroupControls(formGroup: FormGroup, result: Array<FormControl>): void {\n\t\tObject.values(formGroup.controls).forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.addFormGroupControls(value, result);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.addFormArrayControls(value, result);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.addFormControl(value, result);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate addFormArrayControls(formArray: FormArray, result: Array<FormControl>): void {\n\t\tformArray.controls.forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.addFormGroupControls(value, result);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.addFormArrayControls(value, result);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.addFormControl(value, result);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getAllFormControls(): Array<FormControl> {\n\t\tconst result = [];\n\t\tthis.addFormGroupControls(this.formGroup, result);\n\t\treturn result;\n\t}\n\n\tprivate addFormControl(control: FormControl, result: Array<FormControl>): void {\n\t\tresult.push(control);\n\t}\n\n\tprivate disableInactiveFormControl(control: FormControl): void {\n\t\tif (!this.activeControls.some((e) => e.formControl === control)) {\n\t\t\tcontrol.disable();\n\t\t}\n\t}\n\n\ttrySubmit(): Promise<any> {\n\t\tthis.formGroup.markAllAsTouched();\n\t\tconst allControls: Array<FormControl> = this.getAllFormControls();\n\t\tconst originalDisabledStates = allControls.map(e => {\n\t\t\treturn {control: e, disabled: e.disabled};\n\t\t});\n\t\tallControls.forEach(e => this.disableInactiveFormControl(e));\n\t\tallControls.forEach(e => e.updateValueAndValidity());\n\t\tconst values = this.formGroup.value;\n\t\tif (this.formGroup.valid) {\n\t\t\tthis.setDisabledStatesForAllControls(originalDisabledStates);\n\t\t\treturn Promise.resolve(values);\n\t\t} else {\n\t\t\tthis.activeControls.find((e) => !e.formControl.valid)?.formElement?.scrollTo();\n\t\t\tthis.setDisabledStatesForAllControls(originalDisabledStates);\n\t\t\treturn Promise.reject(invalidFieldsSymbol);\n\t\t}\n\t}\n\n\tprivate setDisabledStatesForAllControls(originalDisabledStates: Array<{ control: AbstractControl; disabled: boolean }>): void {\n\t\toriginalDisabledStates.forEach((e) => {\n\t\t\tif (e.disabled) {\n\t\t\t\te.control.disable();\n\t\t\t} else {\n\t\t\t\te.control.enable();\n\t\t\t}\n\t\t});\n\t}\n}\n","import {Component, Directive, ElementRef, Host, Inject, InjectionToken, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\nimport {FormComponent} from '../form.component';\nimport {CustomErrorMessages, FormErrorMessages} from '../../types';\nimport { ValueAccessorBase } from '../../elements/value-accessor-base/value-accessor-base.component';\nimport { isValueSet } from '../../util/values';\n\nexport const FORM_ERROR_MESSAGES = new InjectionToken<CustomErrorMessages>('form.error.messages');\n\nexport const DEFAULT_ERROR_MESSAGES: FormErrorMessages = {\n\tmin: 'Use a number larger than %min%',\n\tmax: 'Use a number smaller than %max%',\n\trequired: 'This field is required',\n\temail: 'Use a valid email address',\n\tminLength: 'Has to be longer than %minLength% character(s)',\n\tmaxLength: 'Has to be shorter than %maxLength% character(s)',\n\tpattern: 'This input is not valid',\n\tmatchPassword: 'Passwords must match',\n\tdate: 'Enter a valid date',\n};\n\n@Component({\n\tselector: 'klp-form-element',\n\ttemplateUrl: './form-element.component.html',\n\tstyleUrls: ['./form-element.component.scss'],\n})\nexport class FormElementComponent {\n\tpublic attachedControl: AbstractControl;\n\t@Input() public caption: string;\n\t@Input() public direction: 'horizontal' | 'vertical' = 'horizontal';\n\t@Input() public captionSpacing: 'percentages' | 'none' = 'percentages';\n\t@Input() public spaceDistribution: '40-60' | '30-70' = '40-60';\n\t@Input() public swapInputAndCaption: boolean = false;\n\t@ViewChild('internalComponentRef') public internalComponentRef: ElementRef;\n\n\tpublic captionRef: ElementRef;\n\tpublic errorMessages: FormErrorMessages = DEFAULT_ERROR_MESSAGES;\n\tpublic customErrorHandlers: Array<{ error: string; templateRef: ElementRef }> = [];\n\tprivate input: ValueAccessorBase<any>;\n\n\tconstructor(\n\t\t@Host() @Optional() private parent: FormComponent,\n\t\t@Inject(FORM_ERROR_MESSAGES) @Optional() private customMessages: CustomErrorMessages,\n\t) {\n\t}\n\n\tpublic shouldShowErrorMessages(): boolean {\n\t\treturn this.parent?.showErrorMessages !== false;\n\t}\n\n\tpublic substituteParameters(message: string, parameters: Record<string, any>): string {\n\t\treturn Object.keys(parameters).reduce((msg, key) => {\n\t\t\treturn msg.replace(`%${key}%`, parameters[key]);\n\t\t}, message);\n\t}\n\n\tpublic registerControl(formControl: FormControl, input: ValueAccessorBase<any> = null): void {\n\t\tthis.attachedControl = formControl;\n\t\tthis.parent.registerControl(formControl, this);\n\t\tthis.input = input;\n\t}\n\n\tpublic unregisterControl(formControl: FormControl): void {\n\t\tthis.attachedControl = null;\n\t\tthis.parent.unregisterControl(formControl);\n\t}\n\n\tpublic getAttachedControl(): AbstractControl {\n\t\treturn this.attachedControl;\n\t}\n\n\tpublic registerErrorHandler(error: string, templateRef: ElementRef): void {\n\t\tthis.customErrorHandlers.push({error, templateRef});\n\t}\n\n\tpublic registerCaption(templateRef: ElementRef): void {\n\t\tthis.captionRef = templateRef;\n\t}\n\n\tgetErrorToShow(): string {\n\t\tif (this.attachedControl?.touched === true && this.attachedControl?.errors) {\n\t\t\treturn Object.keys(this.attachedControl?.errors)[0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetCustomErrorHandler(error: string): { error: string; templateRef: ElementRef } {\n\t\treturn this.customErrorHandlers.find((e) => e.error === error);\n\t}\n\n\tshowDefaultError(error: string): boolean {\n\t\treturn this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);\n\t}\n\n\tgetScrollableParent(node): any {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (node.scrollHeight > node.clientHeight) {\n\t\t\treturn node;\n\t\t} else {\n\t\t\treturn this.getScrollableParent(node.parentNode);\n\t\t}\n\t}\n\n\tscrollTo(): void{\n\t\tthis.internalComponentRef.nativeElement.scrollIntoView(true);\n\t\t// to give some breathing room, we scroll 100px more to the top\n\t\tthis.getScrollableParent(this.internalComponentRef.nativeElement)?.scrollBy(0, -100);\n\t}\n\n\tisRequired(): boolean {\n\t\tif (isValueSet(this.input)) {\n\t\t\treturn this.input.hasValidator('required');\n\t\t}\n\t\treturn false;\n\t}\n\n\tgetErrorMessage(key: keyof FormErrorMessages): string {\n\t\treturn this.customMessages?.[key]?.() ?? this.errorMessages[key];\n\t}\n\n\tpublic getErrorLocation(): 'belowCaption' | 'rightOfCaption' {\n\t\treturn this.parent?.errorMessageLocation ?? 'belowCaption';\n\t}\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { isArray } from 'lodash';\nimport { isValueSet } from './values';\n\nexport function removeDuplicatesFromArraysWithComparator(comparator: (e1: any, e2: any) => boolean, ...arrays: any[]): any {\n\tlet combined = [];\n\n\tfor (const array of arrays) {\n\t\tcombined = combined.concat(array);\n\t}\n\n\treturn combined.filter((c, i) => {\n\t\tconst firstOccurrenceIndex = combined.findIndex((c2) => comparator(c, c2));\n\t\treturn i === firstOccurrenceIndex;\n\t});\n}\n\nexport function removeDuplicatesFromArray<T>(array: Array<T>): Array<T> {\n\treturn array.filter((c, i) => {\n\t\tconst firstOccurrenceIndex = array.findIndex((c2) => c2 === c);\n\t\treturn i === firstOccurrenceIndex;\n\t});\n}\n\nexport function insertAtIndex(arr, index, item): void {\n\tarr.splice(index, 0, item);\n}\n\nexport function arrayIsSetAndFilled(arr: any): boolean {\n\treturn isArray(arr) && arr !== null && arr !== undefined && arr.length > 0;\n}\n\nexport function asArray(value: any): Array<any> {\n\tif (isValueSet(value)) {\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value;\n\t\t}\n\t\treturn [value];\n\t}\n\treturn [];\n}\n\nexport function splitArrayByCondition<T>(value: Array<T>, condition: (current: T) => boolean): Array<Array<T>> {\n\treturn value.reduce((acc, cur) => {\n\t\tif (condition(cur)) {\n\t\t\tacc.push([]);\n\t\t} else {\n\t\t\tacc[acc.length - 1].push(cur);\n\t\t}\n\t\treturn acc;\n\t}, [[]]);\n}\n","import {ControlContainer, ControlValueAccessor, FormControl} from '@angular/forms';\nimport {Component, EventEmitter, Host, Input, OnDestroy, OnInit, Optional, Output} from '@angular/core';\nimport {FormElementComponent} from '../../form/form-element/form-element.component';\nimport {isNullOrUndefined, isValueSet, stringIsSetAndFilled} from '../../util/values';\nimport { arrayIsSetAndFilled } from '../../util/arrays';\n\n/**\n * This component is a base in order to create a component that supports ngModel.\n * Some important things to know about it:\n *\n * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.\n * writeValue() = called by angular, when ngModel is changed from OUTSIDE of the component. Feel free to patch this method if you need inner logic to happen when ngModel is altered from the outside. Always remember to also call the super.writeValue if you do!\n * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.\n * ngOnInit() = Used to support the angular reactive forms framework. If you use ngOnInit in your own component (which happens fairly often) you must not forget to call the super.ngOnInit() method.\n */\n\n@Component({\n\tselector: '',\n\ttemplate: '',\n})\nexport class ValueAccessorBase<T> implements ControlValueAccessor, OnInit, OnDestroy {\n\tpublic innerValue: T;\n\tpublic changed = new Array<(value: T) => void>();\n\tprivate touched = new Array<() => void>();\n\tprivate prevValue: T = null;\n\n\t@Input() public disabled = false;\n\t// needed to prevent race conditions\n\tprivate latestInnerValueChangedInterceptorPromise: Promise<void>;\n\t@Input() innerValueChangeInterceptor: (prev: T, cur: T) => Promise<void>;\n\t// we support both providing just the formControlName and the full formControl\n\t@Input() public formControlName: string = null;\n\t@Input() public formControl: FormControl = null;\n\t@Output() public onTouch = new EventEmitter<void>();\n\n\tprivate attachedFormControl: FormControl;\n\tprivate validators: Array<string> = [];\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {\n\t}\n\n\tngOnInit(): void {\n\t\tif (this.formControl) {\n\t\t\tthis.attachedFormControl = this.formControl;\n\t\t} else if (stringIsSetAndFilled(this.formControlName)) {\n\t\t\tthis.attachedFormControl = this.controlContainer?.control.get(this.formControlName) as FormControl;\n\t\t\tif (isNullOrUndefined(this.attachedFormControl)) {\n\t\t\t\tthrow new Error(`Form element '${this.formControlName}' with caption '${this.parent?.caption}' is not declared in your FormGroup.`);\n\t\t\t}\n\t\t}\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\tthis.attachedFormControl.statusChanges.subscribe(() => {\n\t\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\t});\n\t\t\tthis.parent?.registerControl(this.attachedFormControl, this);\n\t\t\tif (this.attachedFormControl?.validator) {\n\t\t\t\tconst vals = this.attachedFormControl.validator({} as any);\n\t\t\t\tif (isValueSet(vals)) {\n\t\t\t\t\tthis.validators = Object.keys(vals);\n\t\t\t\t} else {\n\t\t\t\t\tthis.validators = [];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tisInErrorState(): boolean {\n\t\treturn this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;\n\t}\n\n\tngOnDestroy(): void {\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.parent?.unregisterControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\ttouch(): void {\n\t\tthis.touched.forEach((f) => f());\n\t}\n\n\twriteValue(value: T): void {\n\t\tthis.innerValue = value;\n\t\tthis.prevValue = value;\n\t}\n\n\tregisterOnChange(fn: (value: T) => void): void {\n\t\tthis.changed.push(fn);\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.touched.push(fn);\n\t}\n\n\tsetInnerValueAndNotify(value: T): void {\n\t\tconst actuallySetValue = (valueToSet: T): void => {\n\t\t\tthis.innerValue = valueToSet;\n\t\t\tthis.prevValue = valueToSet;\n\t\t\tthis.changed.forEach((fn) => fn(valueToSet));\n\t\t};\n\t\tif (isValueSet(this.innerValueChangeInterceptor)) {\n\t\t\tthis.latestInnerValueChangedInterceptorPromise = this.innerValueChangeInterceptor(this.prevValue, value);\n\t\t\tconst myPromise = this.latestInnerValueChangedInterceptorPromise;\n\t\t\tthis.latestInnerValueChangedInterceptorPromise.then(() => {\n\t\t\t\tif (this.latestInnerValueChangedInterceptorPromise === myPromise) {\n\t\t\t\t\tactuallySetValue(value);\n\t\t\t\t} else {\n\t\t\t\t\t// ignore outdated promises\n\t\t\t\t}\n\t\t\t}).catch(() => {\n\t\t\t\tif (this.latestInnerValueChangedInterceptorPromise === myPromise) {\n\t\t\t\t\tactuallySetValue(this.prevValue);\n\t\t\t\t} else {\n\t\t\t\t\t// ignore outdated promises\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tactuallySetValue(value);\n\t\t}\n\t}\n\n\tresetToNull(): void {\n\t\tthis.setInnerValueAndNotify(null);\n\t}\n\n\thasValidator(validatorName: string): boolean {\n\t\tif (arrayIsSetAndFilled(this.validators)) {\n\t\t\treturn this.validators.includes(validatorName);\n\t\t}\n\t\treturn false;\n\t}\n}\n","import { Component, HostBinding, Input } from '@angular/core';\nimport {isValueSet} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-button',\n\ttemplateUrl: './button.component.html',\n\tstyleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n\t@Input() variant:\n\t\t| 'white'\n\t\t| 'greenFilled'\n\t\t| 'greenOutlined'\n\t\t| 'greenLink'\n\t\t| 'contextMenuItem'\n\t\t| 'redFilled'\n\t\t| 'redOutlined'\n\t\t| 'orangeFilled' = 'white';\n\t@Input() size: 'small' | 'medium' | 'large' = 'medium';\n\t@Input() fullWidth = false;\n\t@Input() hasBorder = true;\n\t@Input() disabled = false;\n\t@Input() isLoading = false;\n\t@Input() type: 'button' | 'submit' = 'button';\n\t@Input() clickCallback: (event: Event) => Promise<any>;\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tonClick(event: Event) {\n\t\tif (this.disabled) {\n\t\t\tevent.stopPropagation();\n\t\t\treturn\n\t\t}\n\n\t\tif (isValueSet(this.clickCallback)) {\n\t\t\tthis.isLoading = true;\n\t\t\tthis.clickCallback(event)\n\t\t\t\t.catch(() => null) // gobble up errors.\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t});\n\t\t}\n\t}\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-checkbox',\n\ttemplateUrl: './checkbox.component.html',\n\tstyleUrls: ['./checkbox.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }],\n})\nexport class CheckboxComponent extends ValueAccessorBase<boolean> {\n\t@Input() caption: string;\n\t@Input() renderUndefinedAsIndeterminate = false;\n}\n","import {Component, Input} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-email-input',\n\ttemplateUrl: './email-input.component.html',\n\tstyleUrls: ['./email-input.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: EmailInputComponent, multi: true}],\n})\nexport class EmailInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = '';\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-form-loading-indicator',\n\ttemplateUrl: './loading-indicator.component.html',\n\tstyleUrls: ['./loading-indicator.component.scss'],\n})\nexport class LoadingIndicatorComponent {\n\t@Input() public variant: '3dots' | 'spinner' | 'textInput' | 'picker' = '3dots';\n\t@Input() public size: 'tiny' | 'small' | 'medium' | 'large' | 'huge' = 'medium';\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-number-input',\n\ttemplateUrl: './number-input.component.html',\n\tstyleUrls: ['./number-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: NumberInputComponent, multi: true }],\n})\nexport class NumberInputComponent extends ValueAccessorBase<string | number> {\n\t@Input() placeholder: string;\n\t@Input() parseNumber: boolean = false;\n\n\n\tsetInnerValueAndNotify(value: string | number) {\n\t\tif (this.parseNumber && typeof value === \"string\") {\n\t\t\tsuper.setInnerValueAndNotify(Number(value));\n\t\t} else {\n\t\t\tsuper.setInnerValueAndNotify(value);\n\t\t}\n\t}\n}\n","import {Component, Input} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-password-field',\n\ttemplateUrl: './password-field.component.html',\n\tstyleUrls: ['./password-field.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true}],\n})\nexport class PasswordFieldComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = 'Password';\n}\n","import {\n\tComponent,\n\tContentChild,\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOnChanges,\n\tOptional,\n\tOutput,\n\tSimpleChanges,\n\tTemplateRef,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\nimport {FormElementComponent} from '../../form/form-element/form-element.component';\nimport {isValueSet, stringIsSetAndFilled} from '../../util/values';\n\nexport type AppSelectOptions = Array<AppSelectOption>;\nexport type AppSelectOption = {\n\tid: any;\n\tname: string;\n\tdescription?: string;\n\tactive?: boolean;\n\tdisabled?: boolean;\n};\n\nexport const SELECT_TRANSLATIONS = new InjectionToken<any>('klp.form.select.translations');\n\n@Directive({ selector: '[klpSelectOptionTpl]' })\nexport class KlpSelectOptionTemplateDirective {}\n\n@Component({\n\tselector: 'klp-form-select',\n\ttemplateUrl: './select.component.html',\n\tstyleUrls: ['./select.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true}],\n})\nexport class SelectComponent extends ValueAccessorBase<string | string[]> implements OnChanges{\n\t@Input() placeholder: string;\n\t@Input() orientation: 'vertical' | 'horizontal' = 'horizontal';\n\t@Input() options: AppSelectOptions;\n\t@Input() multiple = false;\n\t@Input() multipleDisplayedAsAmount = false;\n\t@Input() clearable = true;\n\t@Input() truncateOptions = true;\n\t@Input() public dropdownPosition: string;\n\t@Input() public customSearchFn: (term: string, item: { id: string; name: string; description: string }) => boolean;\n\t@Input() public footerElement: TemplateRef<any>;\n\t@Output() public onSearch = new EventEmitter<string>();\n\t@Output() public onEndReached = new EventEmitter<void>();\n\t@Output() public onOpened = new EventEmitter<void>();\n\t@ViewChild('ngSelect') ngSelect;\n\t@ContentChild(KlpSelectOptionTemplateDirective, { read: TemplateRef }) customOptionTpl: TemplateRef<any>;\n\n\tprivate lastItemIndexReached = -1;\n\n\tconstructor(\n\t\t@Optional() @Host() protected parent: FormElementComponent,\n\t\t@Optional() @Host() protected controlContainer: ControlContainer,\n\t\t@Inject(SELECT_TRANSLATIONS) @Optional() private translations: any,\n\t\tprivate elRef: ElementRef,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (isValueSet(changes.options)) {\n\t\t\tthis.lastItemIndexReached = -1;\n\t\t}\n\t}\n\n\tgetDefaultTranslation(key: string): (x: any) => string {\n\t\tswitch (key) {\n\t\t\tcase 'placeholder':\n\t\t\t\treturn () => 'Pick an option';\n\t\t\tcase 'amountSelected':\n\t\t\t\treturn (amount) => `${amount} selected`;\n\t\t}\n\t}\n\n\tgetTranslation(key: string, params: any = null): string {\n\t\tif (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {\n\t\t\treturn this.placeholder;\n\t\t}\n\t\treturn this.translations?.[key]?.(params) ?? this.getDefaultTranslation(key)(params);\n\t}\n\n\tonScroll(lastItemIndex: number): void {\n\t\tconst visibleItems = this.ngSelect?.itemsList?.filteredItems?.length ?? 0;\n\t\tif (this.lastItemIndexReached < lastItemIndex && lastItemIndex === visibleItems) {\n\t\t\tthis.onEndReached.emit();\n\t\t}\n\t\tthis.lastItemIndexReached = Math.max(lastItemIndex, this.lastItemIndexReached);\n\t}\n\n\tsearchQueryChanged(searchQuery: string): void {\n\t\tthis.onSearch.emit(searchQuery);\n\t}\n\n\tonOpen(): void {\n\t\t// waiting for the thing to render until we fire the event\n\t\tsetTimeout(() => {\n\t\t\tthis.onOpened.emit();\n\t\t\tif (this.truncateOptions === false) {\n\t\t\t\tconst widths: Array<number> = Array.from(this.elRef.nativeElement.querySelectorAll('.ng-option div')).map(\n\t\t\t\t\t(e: any) => e.scrollWidth,\n\t\t\t\t);\n\t\t\t\tconst maxWidth = Math.max(...widths);\n\t\t\t\tconst dropdownPanel = this.elRef.nativeElement.querySelector('ng-dropdown-panel');\n\t\t\t\tdropdownPanel.style.width = `${maxWidth + 40}px`;\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-select-footer',\n\ttemplateUrl: './select-footer.component.html',\n\tstyleUrls: ['./select-footer.component.scss'],\n})\nexport class SelectFooterComponent {\n\t@Input() public prefix: string;\n\t@Input() public text: string;\n}\n","import {Component, ContentChild, Input, OnInit, TemplateRef} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {Options} from 'sortablejs';\nimport {isValueSet} from '../../util/values';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-sortable-items',\n\ttemplateUrl: './sortable-items.component.html',\n\tstyleUrls: ['./sortable-items.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true}],\n})\nexport class SortableItemsComponent extends ValueAccessorBase<Array<any>> implements OnInit {\n\t@ContentChild(TemplateRef) template;\n\t@Input() sortableItemSize: 'sm' | 'lg' = 'lg';\n\t@Input() useCustomScroll = false;\n\n\tpublic sortablejsOptions: Options;\n\tprivate scrollInterval = null;\n\n\tngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t\tif (this.useCustomScroll) {\n\t\t\tthis.sortablejsOptions = {onUpdate: this.itemsOrderChanged, onMove: this.onItemDrag, onEnd: this.onEnd};\n\t\t} else {\n\t\t\tthis.sortablejsOptions = {onUpdate: this.itemsOrderChanged};\n\t\t}\n\t}\n\n\titemsOrderChanged = () => {\n\t\tthis.setInnerValueAndNotify(this.innerValue);\n\t};\n\n\tonItemDrag = (data) => {\n\t\t// if the item you're dragging is reaching the top, start scrolling.\n\t\tif (data.relatedRect.top < 100) {\n\t\t\tthis.scrollPage(100);\n\t\t} else {\n\t\t\tthis.stopScrolling();\n\t\t}\n\t};\n\n\tonEnd = () => {\n\t\tthis.stopScrolling();\n\t};\n\n\tprivate scrollPage(scrollAmount: number): void {\n\t\tif (!isValueSet(this.scrollInterval)) {\n\t\t\tthis.scrollInterval = setInterval(() => {\n\t\t\t\twindow.scroll({\n\t\t\t\t\ttop: document.scrollingElement.scrollTop - scrollAmount,\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t});\n\t\t\t\tif (document.scrollingElement.scrollTop <= 100) {\n\t\t\t\t\tthis.stopScrolling();\n\t\t\t\t}\n\t\t\t}, 100);\n\t\t}\n\t}\n\n\tprivate stopScrolling(): void {\n\t\tclearInterval(this.scrollInterval);\n\t\tthis.scrollInterval = null;\n\t}\n}\n","import {Component, Input} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-text-input',\n\ttemplateUrl: './text-input.component.html',\n\tstyleUrls: ['./text-input.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true}],\n})\nexport class TextInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder: string;\n\t@Input() type: 'text' | 'password' = 'text';\n\t@Input() clearable = false;\n\t@Input() icon: 'search';\n}\n","import {Component, Input} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-toggle',\n\ttemplateUrl: './toggle.component.html',\n\tstyleUrls: ['./toggle.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true}],\n})\nexport class ToggleComponent extends ValueAccessorBase<boolean> {\n}\n","import { Component, ElementRef, Host, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-caption',\n\ttemplateUrl: './form-caption.component.html',\n\tstyleUrls: ['./form-caption.component.scss'],\n})\nexport class FormCaptionComponent implements OnInit {\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerCaption(this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Caption component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, ElementRef, Host, Input, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\nimport {ErrorTypes} from \"../../types\";\n\n@Component({\n\tselector: 'klp-form-error',\n\ttemplateUrl: './form-error.component.html',\n\tstyleUrls: ['./form-error.component.scss'],\n})\nexport class FormErrorComponent implements OnInit {\n\t@Input() error: ErrorTypes;\n\tpublic showError = false;\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerErrorHandler(this.error, this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Error component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, Host, HostBinding, Input, Optional } from '@angular/core';\nimport {FormComponent, invalidFieldsSymbol} from \"../form.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-submit-button',\n\ttemplateUrl: './form-submit-button.component.html',\n\tstyleUrls: ['./form-submit-button.component.scss'],\n})\nexport class FormSubmitButtonComponent {\n\t@Input() public isLoading = false;\n\t@Input() fullWidth = false;\n\t@Input() variant: 'greenFilled' | 'redFilled' = 'greenFilled';\n\t@Input() public submitCallback: (any: any) => Promise<any>;\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tconstructor(@Host() @Optional() private parentForm: FormComponent) {}\n\n\tsubmitForm() {\n\t\tthis.parentForm\n\t\t\t.trySubmit()\n\t\t\t.then((value) => {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tconst submitCallbackResult = this.submitCallback(value);\n\t\t\t\tif (isNullOrUndefined(submitCallbackResult)) {\n\t\t\t\t\tthrow new Error('No promise is returned in your submit function.');\n\t\t\t\t}\n\t\t\t\treturn submitCallbackResult.then(() => (this.isLoading = false)).catch((e) => {\n\t\t\t\t\tthis.isLoading = false\n\t\t\t\t\tthrow e;\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((e) => {\n\t\t\t\tif (e === invalidFieldsSymbol) {\n\t\t\t\t\treturn // swallow the error, the framework will scroll to the field that needs attention\n\t\t\t\t}\n\t\t\t\tthrow e;\n\t\t\t});\n\t}\n}\n","import {Component, Host, Input, Optional} from '@angular/core';\nimport {ControlContainer} from '@angular/forms';\nimport {ValueAccessorBase} from './value-accessor-base.component';\nimport {FormElementComponent} from '../../form/form-element/form-element.component';\nimport {isValueSet} from '../../util/values';\n\n@Component({\n\tselector: '',\n\ttemplate: '',\n})\nexport class MultipleValueAccessorBase<T> extends ValueAccessorBase<Array<T> | T> {\n\t@Input() multiple = false;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n\n\twriteValue(value: Array<T> | T): void {\n\t\t// if the outside world passes a value in the wrong format, it should be corrected\n\t\tif (this.multiple && !Array.isArray(value)) {\n\t\t\tconst correctedVal = [value].filter(isValueSet);\n\t\t\tsuper.writeValue(correctedVal);\n\t\t\tsuper.setInnerValueAndNotify(correctedVal);\n\t\t} else if (!this.multiple && Array.isArray(value)) {\n\t\t\tconst correctedVal = value[0];\n\t\t\tsuper.writeValue(correctedVal);\n\t\t\tsuper.setInnerValueAndNotify(correctedVal);\n\t\t} else {\n\t\t\tsuper.writeValue(value);\n\t\t}\n\t}\n\n\tsetInnerValueAndNotify(value: T | Array<T>): void {\n\t\tif (this.multiple && !Array.isArray(value)) {\n\t\t\tsuper.setInnerValueAndNotify([value].filter(isValueSet));\n\t\t} else if (!this.multiple && Array.isArray(value)) {\n\t\t\tsuper.setInnerValueAndNotify(value[0]);\n\t\t} else {\n\t\t\tsuper.setInnerValueAndNotify(value);\n\t\t}\n\t}\n}\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nexport const invalidDateKey = '--invalid_date--';\n\nexport function dateValidator(control: AbstractControl): ValidationErrors | null {\n\tconst invalid = control.value === invalidDateKey;\n\treturn invalid ? { date: control.value } : null;\n}\n","import {Component, Host, Inject, InjectionToken, Input, Optional} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {format as dateFormat, parse} from 'date-fns';\nimport {MultipleValueAccessorBase} from '../value-accessor-base/multiple-value-accessor-base.component';\nimport {invalidDateKey} from '../../validators/dateValidator';\nimport {isNullOrUndefined, stringIsSetAndFilled} from '../../util/values';\nimport {FormElementComponent} from '../../form/form-element/form-element.component';\n\nexport const DATE_PICKER_TRANSLATIONS = new InjectionToken<any>('klp.form.date.translations');\n\n@Component({\n\tselector: 'klp-form-date-picker',\n\ttemplateUrl: './date-picker.component.html',\n\tstyleUrls: ['./date-picker.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true}],\n})\nexport class DatePickerComponent extends MultipleValueAccessorBase<string | typeof invalidDateKey> {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public sameMonthOnly = false;\n\t@Input() public format = 'dd-MM-yyyy';\n\t@Input() public placeholder: string;\n\t@Input() public clearable = false;\n\n\tpublic dateValue: Date | Array<Date>;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer,\n\t\t@Inject(DATE_PICKER_TRANSLATIONS) @Optional() private translations: any,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n\n\twriteValue(value: string | Array<string> | typeof invalidDateKey): void {\n\t\tif (value === invalidDateKey) {\n\t\t\tsuper.writeValue(invalidDateKey);\n\t\t} else if (isNullOrUndefined(value)) {\n\t\t\tthis.dateValue = this.multiple ? [] : null;\n\t\t\tsuper.writeValue(this.multiple ? [] : null);\n\t\t} else {\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tthis.dateValue = value.map((e) => parse(e, 'yyyy-MM-dd', new Date()));\n\t\t\t} else {\n\t\t\t\tthis.dateValue = parse(value, 'yyyy-MM-dd', new Date());\n\t\t\t}\n\t\t\tsuper.writeValue(value);\n\t\t}\n\t}\n\n\tdateChanged(value: Date | Array<Date> | typeof invalidDateKey): void {\n\t\tif (value === invalidDateKey) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else if (isNullOrUndefined(value)) {\n\t\t\tthis.dateValue = this.multiple ? [] : null;\n\t\t\tthis.setInnerValueAndNotify(this.multiple ? [] : null);\n\t\t} else {\n\t\t\tthis.dateValue = value;\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tthis.setInnerValueAndNotify(value.map((e) => dateFormat(e, 'yyyy-MM-dd')));\n\t\t\t} else {\n\t\t\t\tthis.setInnerValueAndNotify(dateFormat(value, 'yyyy-MM-dd'));\n\t\t\t}\n\t\t}\n\t}\n\n\tgetDefaultTranslation(key: string): (x: any) => string {\n\t\tswitch (key) {\n\t\t\tcase 'placeholder':\n\t\t\t\treturn () => 'Select date';\n\t\t}\n\t}\n\n\tgetTranslation(key: string, params: any = null): string {\n\t\tif (key === 'placeholder' && this.multiple) {\n\t\t\treturn '';\n\t\t}\n\t\tif (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {\n\t\t\treturn this.placeholder;\n\t\t}\n\t\treturn this.translations?.[key]?.(params) ?? this.getDefaultTranslation(key)(params);\n\t}\n}\n","import {\n\tAfterViewInit,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOnChanges,\n\tOnInit,\n\tOptional,\n\tSimpleChanges,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {invalidDateKey} from '../../validators/dateValidator';\nimport {DateFilterFn, MatDatepicker} from '@angular/material/datepicker';\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {KlpDateFormats} from '../../types';\nimport {FormElementComponent} from '../../form/form-element/form-element.component';\nimport {MultipleValueAccessorBase} from '../value-accessor-base/multiple-value-accessor-base.component';\nimport {isValueSet, stringIsSetAndFilled} from '../../util/values';\nimport {endOfMonth, format as formatDate, startOfMonth, isSameDay} from 'date-fns';\nimport {arrayIsSetAndFilled, removeDuplicatesFromArray } from '../../util/arrays';\n\nexport const KLP_DATE_FORMATS = new InjectionToken<KlpDateFormats>('klp.form.date.formats');\nexport const DATE_TIME_PICKER_TRANSLATIONS = new InjectionToken<any>('klp.form.dateTime.translations');\nexport const DATE_PICKER_LOCALE = new InjectionToken<any>('klp.form.dateTime.locale');\n\nexport function matDateFormatsFactory(component: DateTimePickerComponent, dateFormats?: KlpDateFormats): MatDateFormats {\n\treturn dateFormats?.(component.format) ?? MAT_NATIVE_DATE_FORMATS;\n}\n\n@Component({\n\tselector: 'klp-form-date-time-picker',\n\ttemplateUrl: './date-time-picker.component.html',\n\tstyleUrls: ['./date-time-picker.component.scss'],\n\tproviders: [\n\t\t{provide: NG_VALUE_ACCESSOR, useExisting: DateTimePickerComponent, multi: true},\n\t\t{\n\t\t\tprovide: MAT_DATE_FORMATS,\n\t\t\tdeps: [DateTimePickerComponent, [new Optional(), KLP_DATE_FORMATS]],\n\t\t\tuseFactory: matDateFormatsFactory,\n\t\t},\n\t],\n})\nexport class DateTimePickerComponent extends MultipleValueAccessorBase<Date | typeof invalidDateKey> implements OnInit, AfterViewInit, OnChanges {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public sameMonthOnly = false;\n\t@Input() public format = 'dd-MM-yyyy';\n\t@Input() public placeholder: string;\n\t@Input() public clearable = false;\n\t@Input() public showTimeInput = true;\n\t@Input() public invalidTimeAsMidnight = false; // if the time is not valid, use 00:00 as the time\n\n\t@ViewChild('nativeInput') nativeInputRef: ElementRef;\n\t@ViewChild('picker') datePickerRef: MatDatepicker<Date>;\n\n\topenPickerOnDate: Date = null;\n\tminDateStartOfDay: Date = undefined;\n\tmaxDateEndOfDay: Date = undefined;\n\n\t// this is passed as ngmodel and is used to set the initial date. But we also\n\t// use input and nativeInput callbacks to extend the validation logic so we\n\t// can distinguish between empty and invalid dates.\n\tvalueForMaterialDatePicker: Date;\n\thours: string; // string because it's a text input\n\tminutes: string; // string because it's a text input\n\tprivate selectedDates: Array<Date> = [];\n\tprivate datePickingClosingFn: () => void;\n\tprivate dateTouched = false;\n\tprivate hoursTouched = false;\n\tprivate minutesTouched = false;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer,\n\t\t@Inject(DATE_TIME_PICKER_TRANSLATIONS) @Optional() private translations: any,\n\t\t@Inject(DATE_PICKER_LOCALE) @Optional() private datePickerLocale: any,\n\t\tprivate dateAdapter: DateAdapter<Date>,\n\t\tprivate cdr: ChangeDetectorRef\n\t) {\n\t\tsuper(parent, controlContainer);\n\t\tif (isValueSet(datePickerLocale)) {\n\t\t\tdateAdapter.setLocale(datePickerLocale());\n\t\t}\n\t}\n\n\tngOnInit(): void {\n\t\tsuper.ngOnInit();\n\t\tif (this.multiple) {\n\t\t\tthis.placeholder = '';\n\t\t\tthis.showTimeInput = false;\n\t\t}\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (this.multiple) {\n\t\t\t// we are going to overwrite the datepicker closing fn later, so we are saving it here to restore it when needed\n\t\t\tthis.datePickingClosingFn = this.datePickerRef.close;\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (changes.minDate) {\n\t\t\tthis.determineMinAndMaxDates();\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.determineMinAndMaxDates();\n\t\t}\n\t}\n\n\tsetMinDate(minDate: Date): void {\n\t\tif (minDate) {\n\t\t\tthis.minDateStartOfDay = new Date(minDate);\n\t\t\tthis.minDateStartOfDay.setHours(0, 0, 0, 0);\n\t\t} else {\n\t\t\tthis.minDateStartOfDay = undefined;\n\t\t}\n\t}\n\n\tsetMaxDate(maxDate: Date): void {\n\t\tif (maxDate) {\n\t\t\tthis.maxDateEndOfDay = new Date(maxDate);\n\t\t\tthis.maxDateEndOfDay.setHours(23, 59, 59, 999);\n\t\t} else {\n\t\t\tthis.maxDateEndOfDay = undefined;\n\t\t}\n\t}\n\n\tgetSelectedMonths(): number {\n\t\treturn removeDuplicatesFromArray(this.selectedDates.map((e) => formatDate(e, 'MMMM'))).length;\n\t}\n\n\t// dateChanged is called when the output of the datepicker is changed and\n\t// parsed correctly. If the date is invalid, it will be called the first time\n\t// with null but never again until a valid input is provided.\n\tdateChanged(event: any): void {\n\t\tconst date = event.value;\n\t\tif (this.multiple) {\n\t\t\tthis.datePickerRef.close = () => {\n\t\t\t};\n\n\t\t\tif (this.selectedDates.some((e) => isSameDay(e, date))) {\n\t\t\t\tthis.selectedDates = this.selectedDates.filter((e) => !isSameDay(e, date));\n\t\t\t} else {\n\t\t\t\tthis.selectedDates = [...this.selectedDates, date];\n\t\t\t}\n\t\t\t// START HACK\n\t\t\t// the date picker does not provide any rerender calls. Therefore, we are going to change the minDate in order to force the render\n\t\t\t// This is needed to show all selected days in our date picker\n\t\t\t// We also set the innerValue to null (with this.valueForMaterialDatePicker = null;), otherwise you can not\n\t\t\t// deselect your last picked date\n\t\t\tthis.cdr.detectChanges();\n\t\t\tthis.valueForMaterialDatePicker = null;\n\t\t\tconst oldMinDate = this.minDateStartOfDay;\n\t\t\tthis.minDateStartOfDay = new Date(0);\n\t\t\tthis.cdr.detectChanges();\n\t\t\tthis.minDateStartOfDay = oldMinDate;\n\t\t\t// END HACK\n\n\t\t\tif (this.sameMonthOnly) {\n\t\t\t\tif (this.selectedDates.length >= 2) {\n\t\t\t\t\tif (date < startOfMonth(this.selectedDates[0]) || date > endOfMonth(this.selectedDates[0])) {\n\t\t\t\t\t\tthis.selectedDates = [date];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.determineMinAndMaxDates();\n\t\t\t}\n\n\t\t\tthis.setInnerValueAndNotify(this.selectedDates);\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.datePickerRef.close = this.datePickingClosingFn;\n\t\t\t});\n\t\t} else {\n\t\t\tthis.notifyNewDate();\n\t\t}\n\t}\n\n\tdetermineMinAndMaxDates(): void {\n\t\tif (this.sameMonthOnly) {\n\t\t\tif (this.selectedDates.length >= 2) {\n\t\t\t\tthis.setMinDate(startOfMonth(this.selectedDates[0]));\n\t\t\t\tthis.setMaxDate(endOfMonth(this.selectedDates[0]));\n\t\t\t} else {\n\t\t\t\tthis.setMinDate(this.minDate);\n\t\t\t\tthis.setMaxDate(this.maxDate);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.setMinDate(this.minDate);\n\t\t\tthis.setMaxDate(this.maxDate);\n\t\t}\n\t}\n\n\tnotifyNewDate(): void {\n\t\tconst nativeInputValue = this.nativeInputRef.nativeElement.value;\n\t\tconst parsedHours = Number(this.hours);\n\t\tconst parsedMinutes = Number(this.minutes);\n\n\t\t// if we dont have the time element\n\t\tif (!this.showTimeInput) {\n\t\t\tif (!stringIsSetAndFilled(nativeInputValue)) {\n\t\t\t\tthis.setInnerValueAndNotify(null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.valueForMaterialDatePicker instanceof Date) {\n\t\t\t\tthis.setInnerValueAndNotify(this.valueForMaterialDatePicker);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// when all inputs are empty\n\t\tif (!stringIsSetAndFilled(nativeInputValue) && !stringIsSetAndFilled(this.hours) && !stringIsSetAndFilled(this.minutes)) {\n\t\t\tthis.setInnerValueAndNotify(null);\n\t\t\treturn;\n\t\t}\n\t\t// if we have date and time\n\t\tif (\n\t\t\tstringIsSetAndFilled(this.hours) &&\n\t\t\tNumber.isFinite(parsedHours) &&\n\t\t\tparsedHours >= 0 &&\n\t\t\tparsedHours <= 23 &&\n\t\t\tstringIsSetAndFilled(this.minutes) &&\n\t\t\tNumber.isFinite(parsedMinutes) &&\n\t\t\tparsedMinutes >= 0 &&\n\t\t\tparsedMinutes <= 59 &&\n\t\t\tthis.valueForMaterialDatePicker instanceof Date\n\t\t) {\n\t\t\tconst newDateWithHours = new Date(this.valueForMaterialDatePicker.setHours(parsedHours));\n\t\t\tconst newDateWithMinutes = new Date(newDateWithHours.setMinutes(parsedMinutes));\n\t\t\tthis.setInnerValueAndNotify(newDateWithMinutes);\n\t\t\treturn;\n\t\t}\n\t\tif (this.invalidTimeAsMidnight) {\n\t\t\tif (this.valueForMaterialDatePicker instanceof Date) {\n\t\t\t\tthis.setInnerValueAndNotify(this.valueForMaterialDatePicker);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// all other cases, we are not in a valid state\n\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t}\n\n\twriteValue(value: Date | Array<Date> | typeof invalidDateKey): void {\n\t\tsuper.writeValue(value);\n\t\tif (Array.isArray(value)) {\n\t\t\tthis.selectedDates = value;\n\t\t\tthis.determineMinAndMaxDates();\n\t\t\tthis.valueForMaterialDatePicker = null;\n\t\t\tif (arrayIsSetAndFilled(value)) {\n\t\t\t\tthis.openPickerOnDate = this.selectedDates[0];\n\t\t\t}\n\t\t} else {\n\t\t\tthis.valueForMaterialDatePicker = value === invalidDateKey ? null : value;\n\t\t\tif (value instanceof Date) {\n\t\t\t\tthis.hours = String(value.getHours());\n\t\t\t\tthis.minutes = String(value.getMinutes());\n\t\t\t\tthis.formatTime();\n\t\t\t\tthis.openPickerOnDate = value;\n\t\t\t} else {\n\t\t\t\tthis.hours = '';\n\t\t\t\tthis.minutes = '';\n\t\t\t\tthis.openPickerOnDate = null;\n\t\t\t\tthis.selectedDates = [];\n\t\t\t}\n\t\t}\n\t}\n\n\t// nativeValueChanged is called when the internal text value changes, but not\n\t// when the date is changed via the date picker. We need this so that we can\n\t// determine if the datepicker is empty or invalid.\n\tnativeValueChanged(): void {\n\t\tif (this.datePickerRef.opened) {\n\t\t\t// if the user is typing instead of using the picker, close it.\n\t\t\tthis.datePickerRef.close();\n\t\t}\n\t\tthis.notifyNewDate();\n\t}\n\n\tresetToNull(): void {\n\t\tthis.setInnerValueAndNotify(null);\n\t\tthis.valueForMaterialDatePicker = null;\n\t\tthis.nativeInputRef.nativeElement.value = null;\n\t\tthis.hours = '';\n\t\tthis.minutes = '';\n\t\tthis.selectedDates = [];\n\t}\n\n\tisSelected = (d: Date) => {\n\t\tif (this.multiple) {\n\t\t\treturn this.selectedDates.some((e) => isSameDay(e, d)) ? 'selected' : '';\n\t\t}\n\t\treturn '';\n\t};\n\tfilterDates: DateFilterFn<any> = (e) => {\n\t\tif (this.disabled) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tformatTime(): void {\n\t\tif (Number.isFinite(Number(this.hours)) && this.hours.length === 1) {\n\t\t\tthis.hours = '0' + this.hours;\n\t\t}\n\t\tif (Number.isFinite(Number(this.minutes)) && this.minutes.length === 1) {\n\t\t\tthis.minutes = '0' + this.minutes;\n\t\t}\n\t}\n\n\ttouchDate(): void {\n\t\tthis.dateTouched = true;\n\t\tthis.determineAllTouched();\n\t}\n\n\ttouchHours(): void {\n\t\tthis.hoursTouched = true;\n\t\tthis.determineAllTouched();\n\t}\n\n\ttouchMinutes(): void {\n\t\tthis.minutesTouched = true;\n\t\tthis.determineAllTouched();\n\t}\n\n\tdetermineAllTouched(): void {\n\t\tif ((this.dateTouched && this.hoursTouched && this.minutesTouched) || (this.dateTouched && !this.showTimeInput)) {\n\t\t\tthis.touch();\n\t\t}\n\t}\n\n\n\tgetDefaultTranslation(key: string): (x: any) => string {\n\t\tswitch (key) {\n\t\t\tcase 'placeholder':\n\t\t\t\treturn () => 'Select date';\n\t\t\tcase 'selectDays':\n\t\t\t\treturn () => 'Select day(s)';\n\t\t\tcase 'selectedDate':\n\t\t\t\treturn (d: Date) => d.toLocaleDateString();\n\t\t\tcase 'daysSelected':\n\t\t\t\treturn (amount) => `${amount} days selected`;\n\t\t\tcase 'selectedInMonth':\n\t\t\t\treturn (d: Date) => ` in ${formatDate(d, 'MMMM')}`;\n\t\t}\n\t}\n\n\tgetTranslation(key: string, params: any = null): string {\n\t\tif (key === 'placeholder' && this.multiple) {\n\t\t\treturn '';\n\t\t}\n\t\tif (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {\n\t\t\treturn this.placeholder;\n\t\t}\n\t\treturn this.translations?.[key]?.(params) ?? this.getDefaultTranslation(key)(params);\n\t}\n}\n","// material.module.ts\n\nimport { NgModule } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n\timports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\texports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\tproviders: [MatDatepickerModule],\n})\nexport class MaterialModule {}\n","import {Component, ElementRef, Input, ViewChild} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {MultipleValueAccessorBase} from '../value-accessor-base/multiple-value-accessor-base.component';\nimport {isValueSet} from '../../util/values';\nimport { arrayIsSetAndFilled } from '../../util/arrays';\n\n@Component({\n\tselector: 'klp-form-file-input',\n\ttemplateUrl: './file-input.component.html',\n\tstyleUrls: ['./file-input.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true}],\n})\nexport class FileInputComponent extends MultipleValueAccessorBase<File> {\n\t@Input() isLoading = false;\n\t@Input() clearable = false;\n\t@Input() onlyShowUploadButton = false;\n\t@Input() useFullParentSize = false;\n\t@ViewChild('fileInput') fileInputEl: ElementRef<HTMLInputElement>;\n\n\tpublic onChange(files: FileList): void {\n\t\tconst result = [];\n\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\tresult.push(files.item(i));\n\t\t}\n\t\tthis.setInnerValueAndNotify(result);\n\t\t// to make sure we can select the same file again\n\t\tthis.fileInputEl.nativeElement.value = null;\n\t}\n\n\tpublic getFileNames(): string {\n\t\tif (Array.isArray(this.innerValue)) {\n\t\t\treturn this.innerValue.map(e => e.name).join(', ');\n\t\t} else if (this.innerValue instanceof File) {\n\t\t\treturn this.innerValue.name;\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic shouldShowClearButton(): boolean {\n\t\tif (this.onlyShowUploadButton) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.multiple) {\n\t\t\tif (arrayIsSetAndFilled(this.innerValue)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (isValueSet(this.innerValue)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic uploadFileClicked(): void {\n\t\tthis.fileInputEl.nativeElement.click();\n\t}\n}\n","import {Component} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {arrayIsSetAndFilled, splitArrayByCondition} from '../../util/arrays';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-sortable-grouped-items',\n\ttemplateUrl: './sortable-grouped-items.component.html',\n\tstyleUrls: ['./sortable-grouped-items.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: SortableGroupedItemsComponent, multi: true}],\n})\nexport class SortableGroupedItemsComponent<T> extends ValueAccessorBase<Array<Array<T>>> {\n\tpublic items: Array<T | string>;\n\treloader = true; // sortable items doesnt correctly update, so we have this boolean that flips to rerender the sortable items comp\n\n\twriteValue(value: Array<Array<T>>): void {\n\t\tsuper.writeValue(value);\n\t\tthis.reloader = false;\n\t\tsetTimeout(() => {\n\t\t\tif (arrayIsSetAndFilled(value)) {\n\t\t\t\tthis.items = value.flatMap(e => [...e, '']);\n\t\t\t} else {\n\t\t\t\tthis.items = [];\n\t\t\t}\n\t\t\tthis.reloader = true;\n\t\t});\n\t}\n\n\tpublic onItemsRearranged(value: Array<T | string>): void {\n\t\tconst result: Array<Array<T>> = splitArrayByCondition(value, e => e === '').filter(arrayIsSetAndFilled) as any;\n\t\tthis.setInnerValueAndNotify(result);\n\t\tthis.reloader = false;\n\t\tsetTimeout(() => {\n\t\t\tthis.items = [...this.items, ''].filter((e, i) => {\n\t\t\t\tif (i === 0 && e === '') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (e === '' && this.items[i - 1] === '') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tthis.reloader = true;\n\t\t});\n\t}\n}\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nexport const invalidTimeKey = '--invalid_time--';\n\nexport function timeValidator(control: AbstractControl): ValidationErrors | null {\n\tconst invalid = control.value === invalidTimeKey;\n\treturn invalid ? { date: control.value } : null;\n}\n","import {Component, Input} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {ValueAccessorBase} from '../value-accessor-base/value-accessor-base.component';\nimport {stringIsSetAndFilled} from '../../util/values';\nimport {invalidTimeKey} from '../../validators/timeValidator';\n\n\n@Component({\n\tselector: 'klp-form-hour-minute-input',\n\ttemplateUrl: './hour-minute-input.component.html',\n\tstyleUrls: ['./hour-minute-input.component.scss'],\n\tproviders: [{provide: NG_VALUE_ACCESSOR, useExisting: HourMinuteInputComponent, multi: true}],\n})\nexport class HourMinuteInputComponent extends ValueAccessorBase<number | typeof invalidTimeKey> {\n\tpublic hours: string; // string because it's a text input\n\tpublic minutes: string; // string because it's a text input\n\n\t@Input() placeholders: Array<string> = ['hour', 'min'];\n\n\tprivate hoursTouched = false;\n\tprivate minutesTouched = false;\n\n\tformatHours(): void {\n\t\tif (!stringIsSetAndFilled(this.hours)) {\n\t\t\tthis.hours = '0';\n\t\t}\n\t}\n\n\tformatMinutes(): void {\n\t\tif (!stringIsSetAndFilled(this.minutes)) {\n\t\t\tthis.minutes = '0';\n\t\t}\n\t}\n\n\tformatTime(): void {\n\t\tif (Number.isFinite(Number(this.hours)) && this.hours.length === 1) {\n\t\t\tthis.hours = '0' + this.hours;\n\t\t}\n\t\tif (Number.isFinite(Number(this.minutes)) && this.minutes.length === 1) {\n\t\t\tthis.minutes = '0' + this.minutes;\n\t\t}\n\t}\n\n\twriteValue(value: number | typeof invalidTimeKey): void {\n\t\tif (Number.isFinite(value)) {\n\t\t\tthis.hours = Math.floor(value as number / 60) + '';\n\t\t\tthis.minutes = value as number % 60 + '';\n\t\t\tthis.formatTime();\n\t\t\tsuper.writeValue(value);\n\t\t} else {\n\t\t\tthis.hours = '';\n\t\t\tthis.minutes = '';\n\t\t\tsuper.writeValue(invalidTimeKey);\n\t\t}\n\t}\n\n\tnotifyNewTime(): void {\n\t\tconst parsedHours = Number(this.hours);\n\t\tconst parsedMinutes = Number(this.minutes);\n\n\t\t// when all inputs are empty\n\t\tif (!stringIsSetAndFilled(this.hours) && !stringIsSetAndFilled(this.minutes)) {\n\t\t\tthis.setInnerValueAndNotify(null);\n\t\t\treturn;\n\t\t}\n\t\t// if we have valid time\n\t\tif (\n\t\t\tNumber.isFinite(parsedHours) &&\n\t\t\tparsedHours >= 0 &&\n\t\t\tparsedHours <= 9999 &&\n\t\t\tNumber.isFinite(parsedMinutes) &&\n\t\t\tparsedMinutes >= 0 &&\n\t\t\tparsedMinutes <= 59\n\t\t) {\n\t\t\tthis.setInnerValueAndNotify(parsedHours * 60 + parsedMinutes);\n\t\t\treturn;\n\t\t}\n\t\t// all other cases, we are not in a valid state\n\t\tthis.setInnerValueAndNotify(invalidTimeKey);\n\t}\n\n\ttouchHours(): void {\n\t\tthis.hoursTouched = true;\n\t\tthis.determineAllTouched();\n\t}\n\n\ttouchMinutes(): void {\n\t\tthis.minutesTouched = true;\n\t\tthis.determineAllTouched();\n\t}\n\n\tdetermineAllTouched(): void {\n\t\tif (this.hoursTouched && this.minutesTouched) {\n\t\t\tthis.touch();\n\t\t}\n\t}\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {ValueAccessorBase} from './elements/value-accessor-base/value-accessor-base.component';\nimport {ButtonComponent} from './elements/button/button.component';\nimport {CheckboxComponent} from './elements/checkbox/checkbox.component';\nimport {EmailInputComponent} from './elements/email/email-input.component';\nimport {LoadingIndicatorComponent} from './elements/loading-indicator/loading-indicator.component';\nimport {NumberInputComponent} from './elements/number-input/number-input.component';\nimport {PasswordFieldComponent} from './elements/password-field/password-field.component';\nimport {KlpSelectOptionTemplateDirective, SelectComponent} from './elements/select/select.component';\nimport {SelectFooterComponent} from './elements/select/select-footer/select-footer.component';\nimport {SortableItemsComponent} from './elements/sortable-items/sortable-items.component';\nimport {TextInputComponent} from './elements/text-input/text-input.component';\nimport {ToggleComponent} from './elements/toggle/toggle.component';\nimport {FormCaptionComponent} from './form/form-caption/form-caption.component';\nimport {FormElementComponent} from './form/form-element/form-element.component';\nimport {FormErrorComponent} from './form/form-error/form-error.component';\nimport {FormSubmitButtonComponent} from './form/form-submit-button/form-submit-button.component';\nimport {FormComponent, SubFormDirective} from './form/form.component';\nimport {SortablejsModule} from 'ngx-sortablejs';\nimport {NgSelectModule} from '@ng-select/ng-select';\nimport {DatePickerComponent} from './elements/date-picker/date-picker.component';\nimport {DateTimePickerComponent} from './elements/date-time-picker/date-time-picker.component';\nimport {MaterialModule} from './material.module';\nimport {MultipleValueAccessorBase} from './elements/value-accessor-base/multiple-value-accessor-base.component';\nimport {FileInputComponent} from './elements/file-input/file-input.component';\nimport {SortableGroupedItemsComponent} from './elements/sortable-grouped-items/sortable-grouped-items.component';\nimport {HourMinuteInputComponent} from './elements/hour-minute-input/hour-minute-input.component';\n\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tNgSelectModule,\n\t\tSortablejsModule,\n\t\tMaterialModule,\n\t],\n\tdeclarations: [\n\t\tValueAccessorBase,\n\t\tMultipleValueAccessorBase,\n\t\tButtonComponent,\n\t\tCheckboxComponent,\n\t\tDatePickerComponent,\n\t\tDateTimePickerComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tKlpSelectOptionTemplateDirective,\n\t\tSelectFooterComponent,\n\t\tSortableItemsComponent,\n\t\tSortableGroupedItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFileInputComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t\tSubFormDirective,\n\t\tHourMinuteInputComponent\n\t],\n\texports: [\n\t\tValueAccessorBase,\n\t\tMultipleValueAccessorBase,\n\t\tButtonComponent,\n\t\tDatePickerComponent,\n\t\tDateTimePickerComponent,\n\t\tCheckboxComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tKlpSelectOptionTemplateDirective,\n\t\tSelectFooterComponent,\n\t\tSortableItemsComponent,\n\t\tSortableGroupedItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFileInputComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t\tSubFormDirective,\n\t\tHourMinuteInputComponent\n\t]\n})\nexport class NgxEnhancyFormsModule {\n}\n","/*\n * Public API Surface of ngx-enhancy-forms\n */\n\nexport * from './lib/ngx-enhancy-forms.module';\n\nexport * from './lib/elements/button/button.component';\nexport * from './lib/elements/checkbox/checkbox.component';\nexport * from './lib/elements/date-picker/date-picker.component';\nexport * from './lib/elements/date-time-picker/date-time-picker.component';\nexport * from './lib/elements/email/email-input.component';\nexport * from './lib/elements/loading-indicator/loading-indicator.component';\nexport * from './lib/elements/number-input/number-input.component';\nexport * from './lib/elements/password-field/password-field.component';\nexport * from './lib/elements/select/select-footer/select-footer.component';\nexport * from './lib/elements/select/select.component';\nexport * from './lib/elements/sortable-items/sortable-items.component';\nexport * from './lib/elements/sortable-grouped-items/sortable-grouped-items.component';\nexport * from './lib/elements/text-input/text-input.component';\nexport * from './lib/elements/toggle/toggle.component';\nexport * from './lib/elements/file-input/file-input.component';\nexport * from './lib/elements/hour-minute-input/hour-minute-input.component';\nexport * from './lib/elements/value-accessor-base/value-accessor-base.component';\nexport * from './lib/elements/value-accessor-base/multiple-value-accessor-base.component';\n\nexport * from './lib/form/form.component';\nexport * from './lib/form/form-caption/form-caption.component';\nexport * from './lib/form/form-element/form-element.component';\nexport * from './lib/form/form-error/form-error.component';\nexport * from './lib/form/form-submit-button/form-submit-button.component';\n\nexport * from './lib/validators/dateValidator';\n\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/material.module';"],"names":["isString","Directive","Input","FormArray","FormGroup","FormControl","Component","SkipSelf","Optional","InjectionToken","Host","Inject","ViewChild","isArray","EventEmitter","ControlContainer","Output","HostBinding","NG_VALUE_ACCESSOR","ElementRef","ContentChild","TemplateRef","parse","dateFormat","MAT_NATIVE_DATE_FORMATS","isSameDay","formatDate","startOfMonth","endOfMonth","MAT_DATE_FORMATS","DateAdapter","ChangeDetectorRef","NgModule","MatDatepickerModule","MatFormFieldModule","MatNativeDateModule","MatInputModule","MatButtonModule","CommonModule","FormsModule","NgSelectModule","SortablejsModule"],"mappings":";;;;;;aAEgB,oBAAoB,CAAC,CAAS;QAC7C,OAAOA,eAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;aAEe,iBAAiB,CAAC,KAAU;QAC3C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;IAC9C,CAAC;aAEe,WAAW,CAAC,KAAU;QACrC,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CA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AAc;qBACd;oBACD,YAAY,EAAE;wBACb,iBAAiB;wBACjB,yBAAyB;wBACzB,eAAe;wBACf,iBAAiB;wBACjB,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBACnB,yBAAyB;wBACzB,oBAAoB;wBACpB,sBAAsB;wBACtB,eAAe;wBACf,gCAAgC;wBAChC,qBAAqB;wBACrB,sBAAsB;wBACtB,6BAA6B;wBAC7B,kBAAkB;wBAClB,eAAe;wBACf,kBAAkB;wBAClB,oBAAoB;wBACpB,oBAAoB;wBACpB,kBAAkB;wBAClB,yBAAyB;wBACzB,aAAa;wBACb,gBAAgB;wBAChB,wBAAwB;qBACxB;oBACD,OAAO,EAAE;wBACR,iBAAiB;wBACjB,yBAAyB;wBACzB,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,iBAAiB;wBACjB,mBAAmB;wBACnB,yBAAyB;wBACzB,oBAAoB;wBACpB,sBAAsB;wBACtB,eAAe;wBACf,gCAAgC;wBAChC,qBAAqB;wBACrB,sBAAsB;wBACtB,6BAA6B;wBAC7B,kBAAkB;wBAClB,eAAe;wBACf,kBAAkB;wBAClB,oBAAoB;wBACpB,oBAAoB;wBACpB,kBAAkB;wBAClB,yBAAyB;wBACzB,aAAa;wBACb,gBAAgB;wBAChB,wBAAwB;qBACxB;iBACD;;;IC7FD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("lodash"),require("ngx-sortablejs"),require("@ng-select/ng-select"),require("date-fns"),require("@angular/material/core"),require("@angular/material/datepicker"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/material/button")):"function"==typeof define&&define.amd?define("@klippa/ngx-enhancy-forms",["exports","@angular/core","@angular/common","@angular/forms","lodash","ngx-sortablejs","@ng-select/ng-select","date-fns","@angular/material/core","@angular/material/datepicker","@angular/material/form-field","@angular/material/input","@angular/material/button"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).klippa=t.klippa||{},t.klippa["ngx-enhancy-forms"]={}),t.ng.core,t.ng.common,t.ng.forms,t.lodash,t.ngxSortablejs,t.ngSelect,t.dateFns,t.ng.material.core,t.ng.material.datepicker,t.ng.material.formField,t.ng.material.input,t.ng.material.button)}(this,(function(t,e,n,o,r,i,a,l,s,p,d,c,u){"use strict";function h(t){return r.isString(t)&&t.length>0}function g(t){return null==t}function m(t){return null!=t}var f=Symbol("Not all fields are valid"),b=function(){};b.decorators=[{type:e.Directive,args:[{selector:"klp-sub-form"}]}],b.propDecorators={injectInto:[{type:e.Input}],at:[{type:e.Input}]};var y=function(){function t(t,e){this.parent=t,this.subFormPlaceholder=e,this.showErrorMessages=!0,this.errorMessageLocation="belowCaption",this.activeControls=[]}return t.prototype.ngOnInit=function(){if(m(this.parent)&&m(this.subFormPlaceholder)){var t=this.subFormPlaceholder.injectInto,e=this.subFormPlaceholder.at;if(t instanceof o.FormArray){if("number"!=typeof e)throw new Error("cannot index FormArray with "+typeof e);t.setControl(e,this.formGroup)}else if(t instanceof o.FormGroup){if("string"!=typeof e)throw new Error("cannot index FormGroup with "+typeof e);t.setControl(e,this.formGroup)}}m(this.patchValueInterceptor)&&this.addSupportForPatchValueInterceptor()},t.prototype.ngOnDestroy=function(){var t=this;if(m(this.parent)&&m(this.subFormPlaceholder)){var e=this.subFormPlaceholder.injectInto,n=this.subFormPlaceholder.at;if(e instanceof o.FormArray){var r=e.controls.findIndex((function(e){return e===t.formGroup}));e.removeAt(r)}else if(e instanceof o.FormGroup){if("string"!=typeof n)throw new Error("cannot index FormGroup with "+typeof n);e.removeControl(n)}}},t.prototype.addSupportForPatchValueInterceptor=function(){var t=this,e=this.formGroup.patchValue;this.formGroup.patchValue=function(n,o){t.patchValueInterceptor(n).then((function(n){setTimeout((function(){e.call(t.formGroup,n,o)}))}))}},t.prototype.registerControl=function(t,e){this.activeControls.push({formControl:t,formElement:e}),this.parent&&this.parent.registerControl(t,e)},t.prototype.unregisterControl=function(t){this.activeControls=this.activeControls.filter((function(e){return e.formControl!==t})),this.parent&&this.parent.unregisterControl(t)},t.prototype.addFormGroupControls=function(t,e){var n=this;Object.values(t.controls).forEach((function(t){t instanceof o.FormGroup?n.addFormGroupControls(t,e):t instanceof o.FormArray?n.addFormArrayControls(t,e):t instanceof o.FormControl&&n.addFormControl(t,e)}))},t.prototype.addFormArrayControls=function(t,e){var n=this;t.controls.forEach((function(t){t instanceof o.FormGroup?n.addFormGroupControls(t,e):t instanceof o.FormArray?n.addFormArrayControls(t,e):t instanceof o.FormControl&&n.addFormControl(t,e)}))},t.prototype.getAllFormControls=function(){var t=[];return this.addFormGroupControls(this.formGroup,t),t},t.prototype.addFormControl=function(t,e){e.push(t)},t.prototype.disableInactiveFormControl=function(t){this.activeControls.some((function(e){return e.formControl===t}))||t.disable()},t.prototype.trySubmit=function(){var t,e,n=this;this.formGroup.markAllAsTouched();var o=this.getAllFormControls(),r=o.map((function(t){return{control:t,disabled:t.disabled}}));o.forEach((function(t){return n.disableInactiveFormControl(t)})),o.forEach((function(t){return t.updateValueAndValidity()}));var i=this.formGroup.value;return this.formGroup.valid?(this.setDisabledStatesForAllControls(r),Promise.resolve(i)):(null===(e=null===(t=this.activeControls.find((function(t){return!t.formControl.valid})))||void 0===t?void 0:t.formElement)||void 0===e||e.scrollTo(),this.setDisabledStatesForAllControls(r),Promise.reject(f))},t.prototype.setDisabledStatesForAllControls=function(t){t.forEach((function(t){t.disabled?t.control.disable():t.control.enable()}))},t}();y.decorators=[{type:e.Component,args:[{selector:"klp-form",template:"<form>\n\t<ng-content></ng-content>\n</form>\n\n\n",styles:[":host{display:block}:host.row{display:flex}"]}]}],y.ctorParameters=function(){return[{type:y,decorators:[{type:e.SkipSelf},{type:e.Optional}]},{type:b,decorators:[{type:e.Optional}]}]},y.propDecorators={showErrorMessages:[{type:e.Input}],errorMessageLocation:[{type:e.Input}],formGroup:[{type:e.Input}],patchValueInterceptor:[{type:e.Input}]};var v=new e.InjectionToken("form.error.messages"),C={min:"Use a number larger than %min%",max:"Use a number smaller than %max%",required:"This field is required",email:"Use a valid email address",minLength:"Has to be longer than %minLength% character(s)",maxLength:"Has to be shorter than %maxLength% character(s)",pattern:"This input is not valid",matchPassword:"Passwords must match",date:"Enter a valid date"},x=function(){function t(t,e){this.parent=t,this.customMessages=e,this.direction="horizontal",this.captionSpacing="percentages",this.spaceDistribution="40-60",this.swapInputAndCaption=!1,this.errorMessages=C,this.customErrorHandlers=[]}return t.prototype.shouldShowErrorMessages=function(){var t;return!1!==(null===(t=this.parent)||void 0===t?void 0:t.showErrorMessages)},t.prototype.substituteParameters=function(t,e){return Object.keys(e).reduce((function(t,n){return t.replace("%"+n+"%",e[n])}),t)},t.prototype.registerControl=function(t,e){void 0===e&&(e=null),this.attachedControl=t,this.parent.registerControl(t,this),this.input=e},t.prototype.unregisterControl=function(t){this.attachedControl=null,this.parent.unregisterControl(t)},t.prototype.getAttachedControl=function(){return this.attachedControl},t.prototype.registerErrorHandler=function(t,e){this.customErrorHandlers.push({error:t,templateRef:e})},t.prototype.registerCaption=function(t){this.captionRef=t},t.prototype.getErrorToShow=function(){var t,e,n;return!0===(null===(t=this.attachedControl)||void 0===t?void 0:t.touched)&&(null===(e=this.attachedControl)||void 0===e?void 0:e.errors)?Object.keys(null===(n=this.attachedControl)||void 0===n?void 0:n.errors)[0]:null},t.prototype.getCustomErrorHandler=function(t){return this.customErrorHandlers.find((function(e){return e.error===t}))},t.prototype.showDefaultError=function(t){return this.getErrorToShow()===t&&!this.customErrorHandlers.some((function(e){return e.error===t}))},t.prototype.getScrollableParent=function(t){return null==t?null:t.scrollHeight>t.clientHeight?t:this.getScrollableParent(t.parentNode)},t.prototype.scrollTo=function(){var t;this.internalComponentRef.nativeElement.scrollIntoView(!0),null===(t=this.getScrollableParent(this.internalComponentRef.nativeElement))||void 0===t||t.scrollBy(0,-100)},t.prototype.isRequired=function(){return!!m(this.input)&&this.input.hasValidator("required")},t.prototype.getErrorMessage=function(t){var e,n,o;return null!==(o=null===(n=null===(e=this.customMessages)||void 0===e?void 0:e[t])||void 0===n?void 0:n.call(e))&&void 0!==o?o:this.errorMessages[t]},t.prototype.getErrorLocation=function(){var t,e;return null!==(e=null===(t=this.parent)||void 0===t?void 0:t.errorMessageLocation)&&void 0!==e?e:"belowCaption"},t}();x.decorators=[{type:e.Component,args:[{selector:"klp-form-element",template:'<ng-template #errorRef>\n\t<div *ngIf="shouldShowErrorMessages() && getErrorToShow()" class="errorContainer" [ngClass]="{hasCaption: caption || captionRef, \'d30-70\': spaceDistribution === \'30-70\'}">\n\t\t<div *ngIf="showDefaultError(\'min\')">{{substituteParameters(getErrorMessage("min"), {min: attachedControl.errors.min.min})}}</div>\n\t\t<div *ngIf="showDefaultError(\'max\')">{{substituteParameters(getErrorMessage("max"), {max: attachedControl.errors.max.max})}}</div>\n\t\t<div *ngIf="showDefaultError(\'required\')">{{getErrorMessage("required")}}</div>\n\t\t<div *ngIf="showDefaultError(\'email\')">{{getErrorMessage("email")}}</div>\n\t\t<div *ngIf="showDefaultError(\'minlength\')">{{substituteParameters(getErrorMessage("minLength"), {minLength: attachedControl.errors.minlength.requiredLength})}}</div>\n\t\t<div *ngIf="showDefaultError(\'maxlength\')">{{substituteParameters(getErrorMessage("maxLength"), {maxLength: attachedControl.errors.maxlength.requiredLength})}}</div>\n\t\t<div *ngIf="showDefaultError(\'pattern\')">{{getErrorMessage("pattern")}}</div>\n\t\t<div *ngIf="showDefaultError(\'MatchPassword\')">{{getErrorMessage("matchPassword")}}</div>\n\t\t<div *ngIf="showDefaultError(\'date\')">{{getErrorMessage("date")}}</div>\n\t\t<div *ngIf="showDefaultError(\'message\')">{{attachedControl.errors.message.value}}</div>\n\t\t<div [ngTemplateOutlet]="getCustomErrorHandler(getErrorToShow())?.templateRef"></div>\n\t</div>\n</ng-template>\n\n<ng-container *ngIf="direction === \'horizontal\'" [ngTemplateOutlet]="errorRef"></ng-container>\n\n<div class="componentContainer" [ngClass]="{hasCaption: caption || captionRef, vertical: direction === \'vertical\', reverseOrder: swapInputAndCaption}" #internalComponentRef>\n\t<div class="caption" *ngIf="caption || captionRef"\n\t\t[ngClass]="{\n\t\t\thasErrors: getErrorToShow() && attachedControl.touched,\n\t\t\tpercentageSpacing: captionSpacing === \'percentages\', \'d30-70\': spaceDistribution === \'30-70\',\n\t\t\twithErrorRightOfCaption: getErrorLocation() === \'rightOfCaption\'\n\t\t}"\n\t>\n\t\t<div *ngIf="captionRef" class="captionRefContainer">\n\t\t\t<ng-container [ngTemplateOutlet]="captionRef"></ng-container>\n\t\t\t<div *ngIf="isRequired()">&nbsp;*</div>\n\t\t</div>\n\t\t<div *ngIf="!captionRef">{{caption}}<span *ngIf="isRequired()">&nbsp;*</span></div>\n\t\t<div class="rightOfCaptionError">\n\t\t\t<ng-container *ngIf="direction === \'vertical\' && getErrorLocation() === \'rightOfCaption\'" [ngTemplateOutlet]="errorRef"></ng-container>\n\t\t</div>\n\t</div>\n\t<ng-container *ngIf="direction === \'vertical\' && getErrorLocation() === \'belowCaption\'" [ngTemplateOutlet]="errorRef"></ng-container>\n\t<div class="inputContainer" [ngClass]="{ percentageSpacing: captionSpacing === \'percentages\', \'d30-70\': spaceDistribution === \'30-70\' }">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n',styles:[":host{display:block}.componentContainer{align-items:center;display:flex;min-height:42px}.componentContainer:not(.hasCaption){display:block}.componentContainer:not(.hasCaption) .inputContainer{margin-top:0}.componentContainer.reverseOrder{flex-direction:row-reverse;justify-content:flex-end}.componentContainer.vertical{display:block}.componentContainer.vertical .inputContainer{margin-top:.3125rem}.componentContainer.vertical .errorContainer{margin-left:0}.componentContainer.vertical .caption{padding-right:0}.captionRefContainer{display:flex}.caption{color:#515365;flex:0 0 auto;font-weight:700;padding-right:1.25rem}.caption.percentageSpacing{flex:0 0 40%}.caption.percentageSpacing.d30-70{flex-basis:30%}.caption.hasErrors{color:#ff8000}.caption.withErrorRightOfCaption{display:flex;gap:2.5rem;justify-content:space-between}.caption.withErrorRightOfCaption .rightOfCaptionError{font-weight:400;overflow:hidden}.caption.withErrorRightOfCaption .rightOfCaptionError *{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inputContainer{flex:1}.inputContainer.percentageSpacing{flex:0 0 60%}.inputContainer.percentageSpacing.d30-70{flex-basis:70%}.errorContainer{color:#ff8000}.errorContainer.hasCaption{margin-left:40%}.errorContainer.hasCaption.d30-70{margin-left:30%}"]}]}],x.ctorParameters=function(){return[{type:y,decorators:[{type:e.Host},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[v]},{type:e.Optional}]}]},x.propDecorators={caption:[{type:e.Input}],direction:[{type:e.Input}],captionSpacing:[{type:e.Input}],spaceDistribution:[{type:e.Input}],swapInputAndCaption:[{type:e.Input}],internalComponentRef:[{type:e.ViewChild,args:["internalComponentRef"]}]};
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var w=function(t,e){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},w(t,e)};function I(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k(arguments[e]));return t}Object.create;function E(t){return r.isArray(t)&&null!=t&&t.length>0}var S=function(){function t(t,n){this.parent=t,this.controlContainer=n,this.changed=new Array,this.touched=new Array,this.prevValue=null,this.disabled=!1,this.formControlName=null,this.formControl=null,this.onTouch=new e.EventEmitter,this.validators=[]}return t.prototype.ngOnInit=function(){var t,e,n,o,r=this;if(this.formControl)this.attachedFormControl=this.formControl;else if(h(this.formControlName)&&(this.attachedFormControl=null===(t=this.controlContainer)||void 0===t?void 0:t.control.get(this.formControlName),g(this.attachedFormControl)))throw new Error("Form element '"+this.formControlName+"' with caption '"+(null===(e=this.parent)||void 0===e?void 0:e.caption)+"' is not declared in your FormGroup.");if(this.attachedFormControl&&(this.disabled=this.attachedFormControl.disabled,this.attachedFormControl.statusChanges.subscribe((function(){r.disabled=r.attachedFormControl.disabled})),null===(n=this.parent)||void 0===n||n.registerControl(this.attachedFormControl,this),null===(o=this.attachedFormControl)||void 0===o?void 0:o.validator)){var i=this.attachedFormControl.validator({});m(i)?this.validators=Object.keys(i):this.validators=[]}},t.prototype.isInErrorState=function(){return this.attachedFormControl&&"INVALID"===this.attachedFormControl.status&&this.attachedFormControl.touched},t.prototype.ngOnDestroy=function(){var t;this.attachedFormControl&&(null===(t=this.parent)||void 0===t||t.unregisterControl(this.attachedFormControl))},t.prototype.touch=function(){this.touched.forEach((function(t){return t()}))},t.prototype.writeValue=function(t){this.innerValue=t,this.prevValue=t},t.prototype.registerOnChange=function(t){this.changed.push(t)},t.prototype.registerOnTouched=function(t){this.touched.push(t)},t.prototype.setInnerValueAndNotify=function(t){var e=this,n=function(t){e.innerValue=t,e.prevValue=t,e.changed.forEach((function(e){return e(t)}))};if(m(this.innerValueChangeInterceptor)){this.latestInnerValueChangedInterceptorPromise=this.innerValueChangeInterceptor(this.prevValue,t);var o=this.latestInnerValueChangedInterceptorPromise;this.latestInnerValueChangedInterceptorPromise.then((function(){e.latestInnerValueChangedInterceptorPromise===o&&n(t)})).catch((function(){e.latestInnerValueChangedInterceptorPromise===o&&n(e.prevValue)}))}else n(t)},t.prototype.resetToNull=function(){this.setInnerValueAndNotify(null)},t.prototype.hasValidator=function(t){return!!E(this.validators)&&this.validators.includes(t)},t}();S.decorators=[{type:e.Component,args:[{selector:"",template:""}]}],S.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Host},{type:e.Optional}]}]},S.propDecorators={disabled:[{type:e.Input}],innerValueChangeInterceptor:[{type:e.Input}],formControlName:[{type:e.Input}],formControl:[{type:e.Input}],onTouch:[{type:e.Output}]};var M=function(){function t(){this.variant="white",this.size="medium",this.fullWidth=!1,this.hasBorder=!0,this.disabled=!1,this.isLoading=!1,this.type="button"}return Object.defineProperty(t.prototype,"_",{get:function(){return this.fullWidth},enumerable:!1,configurable:!0}),t.prototype.onClick=function(t){var e=this;this.disabled?t.stopPropagation():m(this.clickCallback)&&(this.isLoading=!0,this.clickCallback(t).catch((function(){return null})).then((function(){e.isLoading=!1})))},t}();M.decorators=[{type:e.Component,args:[{selector:"klp-form-button",template:'<button class="buttonFundamentals"\n\t[ngClass]="[\n\t\tvariant,\n\t\tsize,\n\t\tfullWidth ? \'fullWidth\' : \'\',\n\t\thasBorder ? \'\' : \'no-border\',\n\t\tdisabled ? \'disabled\' : \'\'\n\t]"\n\t[type]="type"\n\t(click)="onClick($event)"\n>\n\t<div class="caption" [ngClass]="{invisible: isLoading}">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class="loadingSpinnerContainer" *ngIf="isLoading">\n\t\t<klp-form-loading-indicator variant="spinner" size="small"></klp-form-loading-indicator>\n\t</div>\n</button>\n',styles:[":host{display:inline-block}:host._fullWidth{display:block}.buttonFundamentals{border:1px solid #e6ecf5;border-radius:5px;color:#888da8;cursor:pointer;font-size:13px;font-weight:700;height:2.625rem;letter-spacing:1px;padding:0 20px}.buttonFundamentals.disabled{cursor:not-allowed}.buttonFundamentals.tiny{font-size:.75rem;font-weight:400;height:2rem}.buttonFundamentals.large{height:3rem}.fullWidth{width:100%}.no-border{border:none}.caption.invisible{visibility:hidden}button{position:relative}.loadingSpinnerContainer{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.white{background-color:#fff;border-color:#d4deee;color:#515365;font-weight:500}.white:active,.white:hover{background-color:#edf2f8;border-color:#edf2f8;color:#515365}.white:focus{text-decoration:underline}.greenFilled{background-color:#27bb5f;border-color:#27bb5f;color:#fff}.greenFilled:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenFilled:focus{text-decoration:underline}.greenFilled:active{background-color:#23a654;border-color:#23a654}.greenOutlined{background-color:#fff;border-color:#27bb5f;color:#27bb5f}.greenOutlined:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenOutlined:focus{text-decoration:underline}.greenOutlined:active{background-color:#23a654;border-color:#23a654}.greenLink{background:none;border:none;color:#27bb5f;padding:0}.greenLink:focus,.greenLink:hover{text-decoration:underline}.contextMenuItem{background-color:#fff;border-color:#fff;color:#888da8}.contextMenuItem:hover{background-color:#f6f7fb;border-color:#f6f7fb}.contextMenuItem:active,.contextMenuItem:focus{text-decoration:underline}.redFilled{background-color:#dc3545;border-color:#dc3545;color:#fff}.redFilled:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redFilled:focus{text-decoration:underline}.redFilled:active{background-color:#d32535;border-color:#d32535}.redOutlined{background-color:#fff;border-color:#dc3545;color:#dc3545}.redOutlined:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redOutlined:focus{text-decoration:underline}.redOutlined:active{background-color:#d32535;border-color:#d32535}.orangeFilled{background-color:#ff8000;border-color:#ff8000;color:#fff}.orangeFilled:hover{background-color:#ff8d1a;border-color:#ff8d1a;color:#fff}.orangeFilled:focus{text-decoration:underline}.orangeFilled:active{background-color:#e67300;border-color:#e67300}"]}]}],M.propDecorators={variant:[{type:e.Input}],size:[{type:e.Input}],fullWidth:[{type:e.Input}],hasBorder:[{type:e.Input}],disabled:[{type:e.Input}],isLoading:[{type:e.Input}],type:[{type:e.Input}],clickCallback:[{type:e.Input}],_:[{type:e.HostBinding,args:["class._fullWidth"]}]};var O=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.renderUndefinedAsIndeterminate=!1,e}return I(e,t),e}(S);O.decorators=[{type:e.Component,args:[{selector:"klp-form-checkbox",template:'<label class="componentContainer">\n\t<div class="checkboxContainer">\n\t\t<input type="checkbox" class="checkboxNative"\n\t\t\t[(ngModel)]="innerValue"\n\t\t\t(change)="setInnerValueAndNotify(innerValue); touch()"\n\t\t\t[disabled]="disabled"\n\t\t/>\n <div class="checkboxVisual">\n <svg *ngIf="innerValue === true" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg">\n <path d="m0.17014 2.7065 1.3073 1.1798 2.5656-3.7404" stroke="currentColor" fill="none" stroke-width=".4646px" />\n </svg>\n\t\t\t<svg *ngIf="renderUndefinedAsIndeterminate && innerValue === undefined" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t<path d="m0.5 2.11665 3.2333 0" stroke="currentColor" fill="none" stroke-width=".4646px" />\n\t\t\t</svg>\n </div>\n\t</div>\n\t<div *ngIf="caption" class="caption">{{ caption }}</div>\n</label>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:O,multi:!0}],styles:[":host{display:block}.componentContainer{display:flex;margin-bottom:0}.checkboxContainer{position:relative}.caption{color:#888da8;cursor:pointer;font-weight:700}.checkboxNative{left:0;opacity:0;position:absolute;top:0}.checkboxNative,.checkboxVisual{cursor:pointer;height:22px;width:22px}.checkboxVisual{background-color:#fff;border:2px solid #e6ecf5;border-radius:3px;color:#27bb5f;display:inline-block;font-size:15px;font-weight:400;line-height:19px;margin-right:10px;padding:.125rem;pointer-events:none;text-align:center;vertical-align:bottom}.checkboxNative[disabled]{cursor:not-allowed}.checkboxNative[disabled]+.checkboxVisual:before{color:#666}"]}]}],O.propDecorators={caption:[{type:e.Input}],renderUndefinedAsIndeterminate:[{type:e.Input}]};var A=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.placeholder="",e}return I(e,t),e}(S);A.decorators=[{type:e.Component,args:[{selector:"klp-form-email-input",template:'<input\n\ttype="email"\n\tclass="form-control"\n\t[(ngModel)]="innerValue"\n\t(input)="setInnerValueAndNotify($event.target.value)"\n\t[placeholder]="placeholder"\n\t(blur)="touch()"\n\t[disabled]="disabled"\n/>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:A,multi:!0}],styles:[":host,input{display:block}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#f6cdd1;border-color:#dc3545}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.showErrors{border-color:#ff8000}"]}]}],A.propDecorators={placeholder:[{type:e.Input}]};var V=function(){this.variant="3dots",this.size="medium"};V.decorators=[{type:e.Component,args:[{selector:"klp-form-loading-indicator",template:'<div class="threeDots" [ngClass]="[size]" *ngIf="variant === \'3dots\'">\n\t<div></div>\n\t<div></div>\n\t<div></div>\n\t<div></div>\n</div>\n\n<div class="spinner" [ngClass]="[size]" *ngIf="variant === \'spinner\'">\n\t<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">\n\t\t<circle cx="24" cy="4" r="4" fill="currentColor" />\n\t\t<circle cx="12.19" cy="7.86" r="3.7" fill="currentColor" />\n\t\t<circle cx="5.02" cy="17.68" r="3.4" fill="currentColor" />\n\t\t<circle cx="5.02" cy="30.32" r="3.1" fill="currentColor" />\n\t\t<circle cx="12.19" cy="40.14" r="2.8" fill="currentColor" />\n\t\t<circle cx="24" cy="44" r="2.5" fill="currentColor" />\n\t\t<circle cx="35.81" cy="40.14" r="2.2" fill="currentColor" />\n\t\t<circle cx="42.98" cy="30.32" r="1.9" fill="currentColor" />\n\t\t<circle cx="42.98" cy="17.68" r="1.6" fill="currentColor" />\n\t\t<circle cx="35.81" cy="7.86" r="1.3" fill="currentColor" />\n\t</svg>\n</div>\n\n<div class="textInput" *ngIf="variant === \'textInput\'">\n\t<input\n\t\tdisabled\n\t\ttype="text"\n\t\tclass="form-control"\n\t\tplaceholder="Loading..."\n\t>\n</div>\n\n<div class="picker" *ngIf="variant === \'picker\'">\n\t<input\n\t\tdisabled\n\t\ttype="text"\n\t\tclass="form-control"\n\t\tplaceholder="Loading..."\n\t>\n\t<div class="chevronDown"></div>\n</div>\n',styles:[".threeDots,:host{display:block}.threeDots{height:var(--base);position:relative;width:calc(var(--base)*4)}.threeDots.tiny{--base:4px}.threeDots.small{--base:8px}.threeDots.medium{--base:12px}.threeDots.large{--base:18px}.threeDots.huge{--base:26px}.threeDots div{-webkit-animation-timing-function:cubic-bezier(0,1,1,0);animation-timing-function:cubic-bezier(0,1,1,0);background:#27bb5f;border-radius:50%;height:var(--base);position:absolute;top:0;width:var(--base)}.threeDots div:first-child{-webkit-animation:lds-ellipsis1 .6s infinite;animation:lds-ellipsis1 .6s infinite}.threeDots div:nth-child(2),.threeDots div:nth-child(3){-webkit-animation:lds-ellipsis2 .6s infinite;animation:lds-ellipsis2 .6s infinite}.threeDots div:nth-child(3){left:calc(var(--base)*1.5)}.threeDots div:nth-child(4){-webkit-animation:lds-ellipsis3 .6s infinite;animation:lds-ellipsis3 .6s infinite;left:calc(var(--base)*3)}@-webkit-keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(150%)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(150%)}}.spinner.tiny svg{height:1rem;width:1rem}.spinner.small svg{height:1.6rem;width:1.6rem}.spinner.medium svg{height:2.5rem;width:2.5rem}.spinner.large svg{height:3rem;width:3rem}.spinner.huge svg{height:4rem;width:4rem}.spinner svg{-moz-animation-duration:1.2s;-moz-animation-iteration-count:infinite;-moz-animation-name:rotate;-moz-animation-timing-function:linear;-moz-transition-property:-moz-transform;-webkit-animation-duration:1.2s;-webkit-animation-iteration-count:infinite;-webkit-animation-name:rotate;-webkit-animation-timing-function:linear;-webkit-transition-duration:1.2s;-webkit-transition-property:-webkit-transform;animation-duration:1.2s;animation-iteration-count:infinite;animation-name:rotate;animation-timing-function:linear;transition-property:transform}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.picker{position:relative}.picker .chevronDown{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #888da8;height:0;position:absolute;right:23px;top:18px;width:0}"]}]}],V.propDecorators={variant:[{type:e.Input}],size:[{type:e.Input}]};var T=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.parseNumber=!1,e}return I(e,t),e.prototype.setInnerValueAndNotify=function(e){this.parseNumber&&"string"==typeof e?t.prototype.setInnerValueAndNotify.call(this,Number(e)):t.prototype.setInnerValueAndNotify.call(this,e)},e}(S);T.decorators=[{type:e.Component,args:[{selector:"klp-form-number-input",template:'<input\n\ttype="number"\n\tclass="form-control"\n\t[(ngModel)]="innerValue"\n\t(input)="setInnerValueAndNotify($event.target.value)"\n\t[placeholder]="placeholder ? placeholder : \'\'"\n\t[ngClass]="{showErrors: isInErrorState()}"\n\t[disabled]="disabled"\n/>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:T,multi:!0}],styles:[":host,input{display:block}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#f6cdd1;border-color:#dc3545}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.showErrors{border-color:#ff8000}"]}]}],T.propDecorators={placeholder:[{type:e.Input}],parseNumber:[{type:e.Input}]};var F=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.placeholder="Password",e}return I(e,t),e}(S);F.decorators=[{type:e.Component,args:[{selector:"klp-form-password-field",template:'<input\n\ttype="password"\n\tclass="form-control"\n [ngClass]="{showErrors: isInErrorState()}"\n\t[(ngModel)]="innerValue"\n\t(input)="setInnerValueAndNotify($event.target.value)"\n\t[placeholder]="placeholder"\n\t(blur)="touch()"\n\t[disabled]="disabled"\n/>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:F,multi:!0}],styles:[":host,input{display:block}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#f6cdd1;border-color:#dc3545}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.showErrors{border-color:#ff8000}"]}]}],F.propDecorators={placeholder:[{type:e.Input}]};var N=new e.InjectionToken("klp.form.select.translations"),R=function(){};R.decorators=[{type:e.Directive,args:[{selector:"[klpSelectOptionTpl]"}]}];var P=function(t){function n(n,o,r,i){var a=t.call(this,n,o)||this;return a.parent=n,a.controlContainer=o,a.translations=r,a.elRef=i,a.orientation="horizontal",a.multiple=!1,a.multipleDisplayedAsAmount=!1,a.clearable=!0,a.truncateOptions=!0,a.onSearch=new e.EventEmitter,a.onEndReached=new e.EventEmitter,a.onOpened=new e.EventEmitter,a.lastItemIndexReached=-1,a}return I(n,t),n.prototype.ngOnChanges=function(t){m(t.options)&&(this.lastItemIndexReached=-1)},n.prototype.getDefaultTranslation=function(t){switch(t){case"placeholder":return function(){return"Pick an option"};case"amountSelected":return function(t){return t+" selected"}}},n.prototype.getTranslation=function(t,e){var n,o,r;return void 0===e&&(e=null),"placeholder"===t&&h(this.placeholder)?this.placeholder:null!==(r=null===(o=null===(n=this.translations)||void 0===n?void 0:n[t])||void 0===o?void 0:o.call(n,e))&&void 0!==r?r:this.getDefaultTranslation(t)(e)},n.prototype.onScroll=function(t){var e,n,o,r,i=null!==(r=null===(o=null===(n=null===(e=this.ngSelect)||void 0===e?void 0:e.itemsList)||void 0===n?void 0:n.filteredItems)||void 0===o?void 0:o.length)&&void 0!==r?r:0;this.lastItemIndexReached<t&&t===i&&this.onEndReached.emit(),this.lastItemIndexReached=Math.max(t,this.lastItemIndexReached)},n.prototype.searchQueryChanged=function(t){this.onSearch.emit(t)},n.prototype.onOpen=function(){var t=this;setTimeout((function(){if(t.onOpened.emit(),!1===t.truncateOptions){var e=Array.from(t.elRef.nativeElement.querySelectorAll(".ng-option div")).map((function(t){return t.scrollWidth})),n=Math.max.apply(Math,D(e));t.elRef.nativeElement.querySelector("ng-dropdown-panel").style.width=n+40+"px"}}))},n}(S);P.decorators=[{type:e.Component,args:[{selector:"klp-form-select",template:'<ng-select\n\t#ngSelect\n\t[placeholder]="getTranslation(\'placeholder\')"\n\tbindLabel="name"\n\tbindValue="id"\n\t[items]="options"\n\t[clearable]="clearable"\n\t[(ngModel)]="innerValue"\n\t[ngClass]="{showErrors: isInErrorState(), verticalOrientation: orientation === \'vertical\'}"\n\t(change)="setInnerValueAndNotify(innerValue)"\n\t[multiple]="multiple"\n\t[disabled]="disabled"\n\t(blur)="touch()"\n\t(search)="searchQueryChanged($event.term)"\n\t[dropdownPosition]="dropdownPosition"\n\t[searchFn]="customSearchFn"\n\t[selectOnTab]="true"\n\t[virtualScroll]="true"\n\t(scroll)="onScroll($event.end)"\n\t(open)="onOpen()"\n>\n\t<ng-template let-item="item" ng-option-tmp>\n\t\t<ng-container *ngIf="customOptionTpl" [ngTemplateOutlet]="customOptionTpl" [ngTemplateOutletContext]="{item: item}"></ng-container>\n\t\t<div [attr.data-cy]="item.id" *ngIf="!customOptionTpl">\n\t\t\t{{ item.name }}\n\t\t\t<div *ngIf="item.description" class="dropdown-item-description">\n\t\t\t\t{{ item.description }}\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\t<ng-container *ngIf="multiple && multipleDisplayedAsAmount && innerValue?.length > 1">\n\t\t<ng-template ng-multi-label-tmp>\n\t\t\t<div class="ng-value">\n\t\t\t\t<span class="ng-value-label">{{getTranslation(\'amountSelected\', innerValue?.length)}}</span>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-container>\n\t<ng-template ng-footer-tmp *ngIf="footerElement">\n\t\t<ng-container [ngTemplateOutlet]="footerElement"></ng-container>\n\t</ng-template>\n</ng-select>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:P,multi:!0}],styles:[":host{display:block}ng-select.showErrors::ng-deep .ng-select-container{border-color:#ff8000}:host ::ng-deep ng-select.ng-select .ng-select-container{color:#888da8}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container{background:#fff;border-color:#3ed778}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow{border-color:transparent transparent #999;border-width:0 5px 5px;top:-2px}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow:hover{border-color:transparent transparent #666}:host ::ng-deep .ng-select.ng-select-opened.ng-select-bottom>.ng-select-container{border-bottom-left-radius:0;border-bottom-right-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .ng-select.ng-select-disabled>.ng-select-container{background-color:#f9f9f9}:host ::ng-deep .ng-select .ng-has-value .ng-placeholder{display:none}:host ::ng-deep .ng-select .ng-select-container{align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:4px;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;display:flex;flex-direction:row;font-size:1rem;font-size:14px;line-height:1.5;margin:0;min-height:42px;outline:none;overflow:visible;padding:.375rem .75rem;transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in;width:100%}:host ::ng-deep .ng-select .ng-select-container:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;overflow:hidden;padding-left:10px}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#aaa}:host ::ng-deep .ng-select.ng-select-single .ng-select-container{height:42px}:host ::ng-deep .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px;top:5px}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:#e7faee;border:1px solid #93e8b3;border-radius:2px;display:flex;font-size:.9em;margin-bottom:3px;margin-right:5px;margin-top:3px;overflow:hidden}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;overflow:hidden;padding:0 5px;text-overflow:ellipsis}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #c2e0ff}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding-bottom:3px;padding-left:3px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:3px;padding-left:3px;position:static;top:5px}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#dc3545}:host ::ng-deep .ng-select .ng-spinner-zone{padding-right:5px;padding-top:5px}:host ::ng-deep .ng-select .ng-arrow-wrapper{padding-right:5px;width:25px}:host ::ng-deep .ng-select .ng-arrow-wrapper:hover .ng-arrow{border-top-color:#666}:host ::ng-deep .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}:host ::ng-deep .ng-dropdown-panel{background-color:#fff;border:1px solid #3ed778;box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top-color:#e6e6e6;margin-top:-1px;top:100%}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{border-bottom-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px;bottom:100%;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:rgba(0,0,0,.54);cursor:default;cursor:pointer;font-weight:500;padding:8px 10px;user-select:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#ebf5ff}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected{background-color:#f5faff;font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:rgba(0,0,0,.87);padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label{font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#ccc}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding-left:0}:host ::ng-deep ng-select.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{color:#888da8;top:9px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option,:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-select.ng-select-auto-grow{max-width:inherit}:host ::ng-deep .ng-select.ng-select-auto-grow .ng-dropdown-panel{width:auto}.verticalOrientation{transform:translateY(100%) rotate(-90deg);transform-origin:top left}.verticalOrientation ::ng-deep ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:0;border-bottom-right-radius:2px;border-top-color:#3ed778;border-top-right-radius:2px;transform:rotate(90deg) translateX(100%);transform-origin:top right}"]}]}],P.ctorParameters=function(){return[{type:x,decorators:[{type:e.Optional},{type:e.Host}]},{type:o.ControlContainer,decorators:[{type:e.Optional},{type:e.Host}]},{type:void 0,decorators:[{type:e.Inject,args:[N]},{type:e.Optional}]},{type:e.ElementRef}]},P.propDecorators={placeholder:[{type:e.Input}],orientation:[{type:e.Input}],options:[{type:e.Input}],multiple:[{type:e.Input}],multipleDisplayedAsAmount:[{type:e.Input}],clearable:[{type:e.Input}],truncateOptions:[{type:e.Input}],dropdownPosition:[{type:e.Input}],customSearchFn:[{type:e.Input}],footerElement:[{type:e.Input}],onSearch:[{type:e.Output}],onEndReached:[{type:e.Output}],onOpened:[{type:e.Output}],ngSelect:[{type:e.ViewChild,args:["ngSelect"]}],customOptionTpl:[{type:e.ContentChild,args:[R,{read:e.TemplateRef}]}]};var z=function(){};z.decorators=[{type:e.Component,args:[{selector:"klp-select-footer",template:'<div class="componentContainer">\n\t<span class="prefix">{{prefix}}</span>\n\t<span class="text">{{text}}</span>\n</div>\n',styles:[":host{display:block}.componentContainer{cursor:pointer;padding:6px 10px}.componentContainer:hover{background:#e7faee}.prefix{font-size:80%;padding-right:.625rem}"]}]}],z.propDecorators={prefix:[{type:e.Input}],text:[{type:e.Input}]};var L=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.sortableItemSize="lg",e.useCustomScroll=!1,e.scrollInterval=null,e.itemsOrderChanged=function(){e.setInnerValueAndNotify(e.innerValue)},e.onItemDrag=function(t){t.relatedRect.top<100?e.scrollPage(100):e.stopScrolling()},e.onEnd=function(){e.stopScrolling()},e}return I(e,t),e.prototype.ngOnInit=function(){t.prototype.ngOnInit.call(this),this.useCustomScroll?this.sortablejsOptions={onUpdate:this.itemsOrderChanged,onMove:this.onItemDrag,onEnd:this.onEnd}:this.sortablejsOptions={onUpdate:this.itemsOrderChanged}},e.prototype.scrollPage=function(t){var e=this;m(this.scrollInterval)||(this.scrollInterval=setInterval((function(){window.scroll({top:document.scrollingElement.scrollTop-t,behavior:"smooth"}),document.scrollingElement.scrollTop<=100&&e.stopScrolling()}),100))},e.prototype.stopScrolling=function(){clearInterval(this.scrollInterval),this.scrollInterval=null},e}(S);L.decorators=[{type:e.Component,args:[{selector:"klp-form-sortable-items",template:'<ng-template #listItem>\n\t<li *ngFor="let item of innerValue; index as index"\n\t\t\tclass="sortableItem"\n\t\t\t[ngClass]="{\n\t\t\tlargeSortableItem: sortableItemSize === \'lg\',\n\t\t \tsmallSortableItem: sortableItemSize === \'sm\'\n\t\t }"\n\t>\n\t\t<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index:index }"></ng-container>\n\t</li>\n</ng-template>\n\n<ol *ngIf=\'!disabled\'\n\t\t[sortablejs]="innerValue"\n\t\t[sortablejsOptions]="sortablejsOptions"\n\t\tclass="itemsContainer"\n>\n\t<ng-container *ngTemplateOutlet="listItem"></ng-container>\n</ol>\n\n<ol *ngIf=\'disabled\' class="itemsContainer disabled-mouse-cursor">\n\t<ng-container *ngTemplateOutlet="listItem"></ng-container>\n</ol>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:L,multi:!0}],styles:[":host{display:block}.itemsContainer{border:1px solid #e6ecf5;border-radius:5px;margin-bottom:0;padding:0}.sortableItem{border-top:1px solid #e6ecf5;cursor:-webkit-grab;cursor:grab;list-style:none}.sortableItem:hover{background:#f8f9fa}.sortableItem:first-child{border-top:none}.largeSortableItem{padding:15px}.smallSortableItem{padding:0 10px}.disabled-mouse-cursor li{cursor:no-drop}"]}]}],L.propDecorators={template:[{type:e.ContentChild,args:[e.TemplateRef]}],sortableItemSize:[{type:e.Input}],useCustomScroll:[{type:e.Input}]};var _=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.type="text",e.clearable=!1,e}return I(e,t),e}(S);_.decorators=[{type:e.Component,args:[{selector:"klp-form-text-input",template:'<div class="componentContainer">\n\t<ng-container *ngIf="icon?.length > 0">\n\t\t<i class="ti-search" *ngIf="icon === \'search\'"></i>\n\t</ng-container>\n\t<input\n\t\t[type]="type"\n\t\t[ngClass]="{showErrors: isInErrorState(), hasIcon: icon?.length > 0, hasClearButton: clearable}"\n\t\t[(ngModel)]="innerValue"\n\t\t(input)="setInnerValueAndNotify($event.target.value)"\n\t\t[placeholder]="placeholder ? placeholder : \'\'"\n\t\t(blur)="touch()"\n\t\t[disabled]=\'disabled\'\n\t/>\n\t<div class="clearIcon" *ngIf="clearable && innerValue?.length > 0" (click)="resetToNull()">×</div>\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:_,multi:!0}],styles:[":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{position:relative}i{left:.625rem;position:absolute;top:14px}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;display:block;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#f6cdd1;border-color:#dc3545}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}input.hasIcon{padding-left:1.875rem}input.hasClearButton{padding-right:1.875rem}.clearIcon{cursor:pointer;font-size:18px;position:absolute;right:.625rem;top:7px}.showErrors{border-color:#ff8000}"]}]}],_.propDecorators={placeholder:[{type:e.Input}],type:[{type:e.Input}],clearable:[{type:e.Input}],icon:[{type:e.Input}]};var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e}(S);j.decorators=[{type:e.Component,args:[{selector:"klp-form-toggle",template:'<div class="componentContainer" [ngClass]="{disabled: disabled}">\n\t<input type="checkbox" class="nativeCheckbox"\n\t\t[(ngModel)]="innerValue"\n\t\t(input)="setInnerValueAndNotify($event.target.checked); touch()"\n\t\t[disabled]="disabled"\n\t\t[ngClass]="{showErrors: isInErrorState()}"\n\t/>\n\t<div class="toggleVisual"></div>\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:j,multi:!0}],styles:[':host{display:block}.componentContainer{position:relative}.nativeCheckbox{cursor:pointer;height:20px;left:0;opacity:0;position:absolute;top:0;width:35px}.toggleVisual{-moz-transition:.4s ease;-ms-transition:.4s ease;-o-transition:.4s ease;-webkit-transition:.4s ease;border:1px solid #e6ecf5;border-radius:35px;display:block;height:20px;pointer-events:none;position:relative;transition:.4s ease;width:35px}.toggleVisual:before{-moz-transition:.2s cubic-bezier(.24,0,.5,1);-ms-transition:.2s cubic-bezier(.24,0,.5,1);-o-transition:.2s cubic-bezier(.24,0,.5,1);-webkit-transition:.2s cubic-bezier(.24,0,.5,1);border-radius:30px;height:18px;left:-1px;margin:1px;transition:.2s cubic-bezier(.24,0,.5,1);width:33px}.toggleVisual:after,.toggleVisual:before{content:"";display:block;position:absolute;top:-1px}.toggleVisual:after{-moz-transition:.35s cubic-bezier(.54,1.6,.5,1);-ms-transition:.35s cubic-bezier(.54,1.6,.5,1);-o-transition:.35s cubic-bezier(.54,1.6,.5,1);-webkit-transition:.35s cubic-bezier(.54,1.6,.5,1);background:#f7f7f7;border-radius:60px;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 4px 0 0 rgba(0,0,0,.04),0 4px 9px rgba(0,0,0,.13),0 3px 3px rgba(0,0,0,.05);height:20px;left:0;transition:.35s cubic-bezier(.54,1.6,.5,1);width:20px}.nativeCheckbox:checked+.toggleVisual:before{-moz-transition:width .2s cubic-bezier(0,0,0,.1);-ms-transition:width .2s cubic-bezier(0,0,0,.1);-o-transition:width .2s cubic-bezier(0,0,0,.1);-webkit-transition:width .2s cubic-bezier(0,0,0,.1);background:#37c936;transition:width .2s cubic-bezier(0,0,0,.1)}.nativeCheckbox:checked+.toggleVisual:after{left:18px}.disabled{opacity:.6}.showErrors+.toggleVisual:before{border:1px solid #ff8000}']}]}];var H=function(){function t(t){this.parent=t}return t.prototype.ngOnInit=function(){var t=this;setTimeout((function(){var e=t.parent.getAttachedControl();if(t.parent.registerCaption(t.contentRef),g(e))throw new Error("You added a Form Caption component without an attached Form Control")}))},t}();H.decorators=[{type:e.Component,args:[{selector:"klp-form-caption",template:"<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n",styles:[":host{display:block}"]}]}],H.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]}]},H.propDecorators={contentRef:[{type:e.ViewChild,args:["contentRef"]}]};var G=function(){function t(t){this.parent=t,this.showError=!1}return t.prototype.ngOnInit=function(){var t=this;setTimeout((function(){var e=t.parent.getAttachedControl();if(t.parent.registerErrorHandler(t.error,t.contentRef),g(e))throw new Error("You added a Form Error component without an attached Form Control")}))},t}();G.decorators=[{type:e.Component,args:[{selector:"klp-form-error",template:"<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n",styles:[":host{display:block}"]}]}],G.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]}]},G.propDecorators={error:[{type:e.Input}],contentRef:[{type:e.ViewChild,args:["contentRef"]}]};var B=function(){function t(t){this.parentForm=t,this.isLoading=!1,this.fullWidth=!1,this.variant="greenFilled"}return Object.defineProperty(t.prototype,"_",{get:function(){return this.fullWidth},enumerable:!1,configurable:!0}),t.prototype.submitForm=function(){var t=this;this.parentForm.trySubmit().then((function(e){t.isLoading=!0;var n=t.submitCallback(e);if(g(n))throw new Error("No promise is returned in your submit function.");return n.then((function(){return t.isLoading=!1})).catch((function(e){throw t.isLoading=!1,e}))})).catch((function(t){if(t!==f)throw t}))},t}();B.decorators=[{type:e.Component,args:[{selector:"klp-form-submit-button",template:'<klp-form-button\n\t\t[variant]="variant"\n\t\t(click)="submitForm()"\n\t\t[disabled]="isLoading"\n\t\t[isLoading]="isLoading"\n\t\t[fullWidth]="fullWidth"\n\t\ttype="submit"\n\t\t[ngClass]="fullWidth ? \'fullWidth\' : \'\'"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n',styles:[":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}"]}]}],B.ctorParameters=function(){return[{type:y,decorators:[{type:e.Host},{type:e.Optional}]}]},B.propDecorators={isLoading:[{type:e.Input}],fullWidth:[{type:e.Input}],variant:[{type:e.Input}],submitCallback:[{type:e.Input}],_:[{type:e.HostBinding,args:["class._fullWidth"]}]};var U=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.parent=e,o.controlContainer=n,o.multiple=!1,o}return I(e,t),e.prototype.writeValue=function(e){if(this.multiple&&!Array.isArray(e)){var n=[e].filter(m);t.prototype.writeValue.call(this,n),t.prototype.setInnerValueAndNotify.call(this,n)}else if(!this.multiple&&Array.isArray(e)){n=e[0];t.prototype.writeValue.call(this,n),t.prototype.setInnerValueAndNotify.call(this,n)}else t.prototype.writeValue.call(this,e)},e.prototype.setInnerValueAndNotify=function(e){this.multiple&&!Array.isArray(e)?t.prototype.setInnerValueAndNotify.call(this,[e].filter(m)):!this.multiple&&Array.isArray(e)?t.prototype.setInnerValueAndNotify.call(this,e[0]):t.prototype.setInnerValueAndNotify.call(this,e)},e}(S);U.decorators=[{type:e.Component,args:[{selector:"",template:""}]}],U.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Host},{type:e.Optional}]}]},U.propDecorators={multiple:[{type:e.Input}]};var q="--invalid_date--";var W=new e.InjectionToken("klp.form.date.translations"),$=function(t){function e(e,n,o){var r=t.call(this,e,n)||this;return r.parent=e,r.controlContainer=n,r.translations=o,r.minDate=void 0,r.maxDate=void 0,r.sameMonthOnly=!1,r.format="dd-MM-yyyy",r.clearable=!1,r}return I(e,t),e.prototype.writeValue=function(e){e===q?t.prototype.writeValue.call(this,q):g(e)?(this.dateValue=this.multiple?[]:null,t.prototype.writeValue.call(this,this.multiple?[]:null)):(Array.isArray(e)?this.dateValue=e.map((function(t){return l.parse(t,"yyyy-MM-dd",new Date)})):this.dateValue=l.parse(e,"yyyy-MM-dd",new Date),t.prototype.writeValue.call(this,e))},e.prototype.dateChanged=function(t){t===q?this.setInnerValueAndNotify(q):g(t)?(this.dateValue=this.multiple?[]:null,this.setInnerValueAndNotify(this.multiple?[]:null)):(this.dateValue=t,Array.isArray(t)?this.setInnerValueAndNotify(t.map((function(t){return l.format(t,"yyyy-MM-dd")}))):this.setInnerValueAndNotify(l.format(t,"yyyy-MM-dd")))},e.prototype.getDefaultTranslation=function(t){if("placeholder"===t)return function(){return"Select date"}},e.prototype.getTranslation=function(t,e){var n,o,r;return void 0===e&&(e=null),"placeholder"===t&&this.multiple?"":"placeholder"===t&&h(this.placeholder)?this.placeholder:null!==(r=null===(o=null===(n=this.translations)||void 0===n?void 0:n[t])||void 0===o?void 0:o.call(n,e))&&void 0!==r?r:this.getDefaultTranslation(t)(e)},e}(U);$.decorators=[{type:e.Component,args:[{selector:"klp-form-date-picker",template:'<div class="componentContainer" [ngClass]="{showErrors: isInErrorState()}">\n\t<klp-form-date-time-picker\n\t\t[multiple]="multiple"\n\t\t[disabled]="disabled"\n\t\t[(ngModel)]="dateValue"\n\t\t(ngModelChange)="dateChanged($event)"\n\t\t[minDate]="minDate"\n\t\t[maxDate]="maxDate"\n\t\t[sameMonthOnly]="sameMonthOnly"\n\t\t[format]="format"\n\t\t[placeholder]="getTranslation(\'placeholder\')"\n\t\t[clearable]="clearable"\n\t\t[showTimeInput]="false"\n\t\t(onTouch)="touch()"\n\t></klp-form-date-time-picker>\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:$,multi:!0}],styles:[":host{display:block}.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .clearButton,.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .dateContainer{border-color:#ff8000}"]}]}],$.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Host},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[W]},{type:e.Optional}]}]},$.propDecorators={minDate:[{type:e.Input}],maxDate:[{type:e.Input}],sameMonthOnly:[{type:e.Input}],format:[{type:e.Input}],placeholder:[{type:e.Input}],clearable:[{type:e.Input}]};var K=new e.InjectionToken("klp.form.date.formats"),Y=new e.InjectionToken("klp.form.dateTime.translations"),Q=new e.InjectionToken("klp.form.dateTime.locale");function X(t,e){var n;return null!==(n=null==e?void 0:e(t.format))&&void 0!==n?n:s.MAT_NATIVE_DATE_FORMATS}var J=function(t){function e(e,n,o,r,i,a){var s=t.call(this,e,n)||this;return s.parent=e,s.controlContainer=n,s.translations=o,s.datePickerLocale=r,s.dateAdapter=i,s.cdr=a,s.minDate=void 0,s.maxDate=void 0,s.sameMonthOnly=!1,s.format="dd-MM-yyyy",s.clearable=!1,s.showTimeInput=!0,s.invalidTimeAsMidnight=!1,s.openPickerOnDate=null,s.minDateStartOfDay=void 0,s.maxDateEndOfDay=void 0,s.selectedDates=[],s.dateTouched=!1,s.hoursTouched=!1,s.minutesTouched=!1,s.isSelected=function(t){return s.multiple&&s.selectedDates.some((function(e){return l.isSameDay(e,t)}))?"selected":""},s.filterDates=function(t){return!s.disabled},m(r)&&i.setLocale(r()),s}return I(e,t),e.prototype.ngOnInit=function(){t.prototype.ngOnInit.call(this),this.multiple&&(this.placeholder="",this.showTimeInput=!1)},e.prototype.ngAfterViewInit=function(){this.multiple&&(this.datePickingClosingFn=this.datePickerRef.close)},e.prototype.ngOnChanges=function(t){t.minDate&&this.determineMinAndMaxDates(),t.maxDate&&this.determineMinAndMaxDates()},e.prototype.setMinDate=function(t){t?(this.minDateStartOfDay=new Date(t),this.minDateStartOfDay.setHours(0,0,0,0)):this.minDateStartOfDay=void 0},e.prototype.setMaxDate=function(t){t?(this.maxDateEndOfDay=new Date(t),this.maxDateEndOfDay.setHours(23,59,59,999)):this.maxDateEndOfDay=void 0},e.prototype.getSelectedMonths=function(){return(t=this.selectedDates.map((function(t){return l.format(t,"MMMM")})),t.filter((function(e,n){return n===t.findIndex((function(t){return t===e}))}))).length;var t},e.prototype.dateChanged=function(t){var e=this,n=t.value;if(this.multiple){this.datePickerRef.close=function(){},this.selectedDates.some((function(t){return l.isSameDay(t,n)}))?this.selectedDates=this.selectedDates.filter((function(t){return!l.isSameDay(t,n)})):this.selectedDates=D(this.selectedDates,[n]),this.cdr.detectChanges(),this.valueForMaterialDatePicker=null;var o=this.minDateStartOfDay;this.minDateStartOfDay=new Date(0),this.cdr.detectChanges(),this.minDateStartOfDay=o,this.sameMonthOnly&&(this.selectedDates.length>=2&&(n<l.startOfMonth(this.selectedDates[0])||n>l.endOfMonth(this.selectedDates[0]))&&(this.selectedDates=[n]),this.determineMinAndMaxDates()),this.setInnerValueAndNotify(this.selectedDates),setTimeout((function(){e.datePickerRef.close=e.datePickingClosingFn}))}else this.notifyNewDate()},e.prototype.determineMinAndMaxDates=function(){this.sameMonthOnly&&this.selectedDates.length>=2?(this.setMinDate(l.startOfMonth(this.selectedDates[0])),this.setMaxDate(l.endOfMonth(this.selectedDates[0]))):(this.setMinDate(this.minDate),this.setMaxDate(this.maxDate))},e.prototype.notifyNewDate=function(){var t=this.nativeInputRef.nativeElement.value,e=Number(this.hours),n=Number(this.minutes);if(!this.showTimeInput){if(!h(t))return void this.setInnerValueAndNotify(null);if(this.valueForMaterialDatePicker instanceof Date)return void this.setInnerValueAndNotify(this.valueForMaterialDatePicker)}if(h(t)||h(this.hours)||h(this.minutes))if(h(this.hours)&&Number.isFinite(e)&&e>=0&&e<=23&&h(this.minutes)&&Number.isFinite(n)&&n>=0&&n<=59&&this.valueForMaterialDatePicker instanceof Date){var o=new Date(this.valueForMaterialDatePicker.setHours(e)),r=new Date(o.setMinutes(n));this.setInnerValueAndNotify(r)}else this.invalidTimeAsMidnight&&this.valueForMaterialDatePicker instanceof Date?this.setInnerValueAndNotify(this.valueForMaterialDatePicker):this.setInnerValueAndNotify(q);else this.setInnerValueAndNotify(null)},e.prototype.writeValue=function(e){t.prototype.writeValue.call(this,e),Array.isArray(e)?(this.selectedDates=e,this.determineMinAndMaxDates(),this.valueForMaterialDatePicker=null,E(e)&&(this.openPickerOnDate=this.selectedDates[0])):(this.valueForMaterialDatePicker=e===q?null:e,e instanceof Date?(this.hours=String(e.getHours()),this.minutes=String(e.getMinutes()),this.formatTime(),this.openPickerOnDate=e):(this.hours="",this.minutes="",this.openPickerOnDate=null,this.selectedDates=[]))},e.prototype.nativeValueChanged=function(){this.datePickerRef.opened&&this.datePickerRef.close(),this.notifyNewDate()},e.prototype.resetToNull=function(){this.setInnerValueAndNotify(null),this.valueForMaterialDatePicker=null,this.nativeInputRef.nativeElement.value=null,this.hours="",this.minutes="",this.selectedDates=[]},e.prototype.formatTime=function(){Number.isFinite(Number(this.hours))&&1===this.hours.length&&(this.hours="0"+this.hours),Number.isFinite(Number(this.minutes))&&1===this.minutes.length&&(this.minutes="0"+this.minutes)},e.prototype.touchDate=function(){this.dateTouched=!0,this.determineAllTouched()},e.prototype.touchHours=function(){this.hoursTouched=!0,this.determineAllTouched()},e.prototype.touchMinutes=function(){this.minutesTouched=!0,this.determineAllTouched()},e.prototype.determineAllTouched=function(){(this.dateTouched&&this.hoursTouched&&this.minutesTouched||this.dateTouched&&!this.showTimeInput)&&this.touch()},e.prototype.getDefaultTranslation=function(t){switch(t){case"placeholder":return function(){return"Select date"};case"selectDays":return function(){return"Select day(s)"};case"selectedDate":return function(t){return t.toLocaleDateString()};case"daysSelected":return function(t){return t+" days selected"};case"selectedInMonth":return function(t){return" in "+l.format(t,"MMMM")}}},e.prototype.getTranslation=function(t,e){var n,o,r;return void 0===e&&(e=null),"placeholder"===t&&this.multiple?"":"placeholder"===t&&h(this.placeholder)?this.placeholder:null!==(r=null===(o=null===(n=this.translations)||void 0===n?void 0:n[t])||void 0===o?void 0:o.call(n,e))&&void 0!==r?r:this.getDefaultTranslation(t)(e)},e}(U);J.decorators=[{type:e.Component,args:[{selector:"klp-form-date-time-picker",template:'<div class="componentContainer" [ngClass]="{showErrors: isInErrorState()}">\n\t<div class="dateContainer" [ngClass]="{noRightBorder: !showTimeInput && clearable && !disabled, disabled: disabled}">\n\t\t<mat-form-field floatLabel="never">\n\t\t\t<div *ngIf="multiple" class="daysSelectedCaption" (click)="picker.open()" [ngClass]="{disabled: disabled}">\n\t\t\t\t<ng-container *ngIf="selectedDates.length >= 2">\n\t\t\t\t\t<span>{{getTranslation(\'daysSelected\', selectedDates.length)}}</span>\n\t\t\t\t\t<span *ngIf="getSelectedMonths() === 1">{{getTranslation(\'selectedInMonth\', selectedDates[0])}}</span>\n\t\t\t\t</ng-container>\n\t\t\t\t<span *ngIf="selectedDates.length === 1">{{getTranslation(\'selectedDate\', selectedDates[0])}}</span>\n\t\t\t\t<span *ngIf="selectedDates.length === 0" class="placeholderForMultipleSelection">{{getTranslation(\'selectDays\')}}</span>\n\t\t\t</div>\n\t\t\t<input\n\t\t\t\t#nativeInput\n\t\t\t\tmatInput\n\t\t\t\t[matDatepicker]="picker"\n\t\t\t\t[matDatepickerFilter]="filterDates"\n\t\t\t\t[(ngModel)]="valueForMaterialDatePicker"\n\t\t\t\t(dateInput)="dateChanged($event)"\n\t\t\t\t(input)="nativeValueChanged()"\n\t\t\t\t[min]="minDateStartOfDay"\n\t\t\t\t[max]="maxDateEndOfDay"\n\t\t\t\t[placeholder]="getTranslation(\'placeholder\')"\n\t\t\t\t(click)="picker.open()"\n\t\t\t\t(blur)="touchDate()"\n\t\t\t\t[ngClass]="{inputForMultipleDays: multiple}"\n\t\t\t>\n\t\t\t<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>\n\t\t\t<mat-datepicker\n\t\t\t\t#picker\n\t\t\t\t[dateClass]="isSelected"\n\t\t\t\t[startAt]="openPickerOnDate"\n\t\t\t></mat-datepicker>\n\t\t</mat-form-field>\n\t</div>\n\t<div class="timeContainer" *ngIf="showTimeInput" [ngClass]="{disabled: disabled}">\n\t\t<input maxlength="2" placeholder="__" [disabled]="disabled" [(ngModel)]="hours" (ngModelChange)="notifyNewDate()" (blur)="formatTime(); touchHours()">\n\t\t<div class="divider">:</div>\n\t\t<input maxlength="2" placeholder="__" [disabled]="disabled" [(ngModel)]="minutes" (ngModelChange)="notifyNewDate()" (blur)="formatTime(); touchMinutes()">\n\t</div>\n\t<button *ngIf="clearable && !disabled" class="clearButton" (click)="resetToNull()" [ngClass]="{withoutSpacing: !showTimeInput}">×</button>\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:J,multi:!0},{provide:s.MAT_DATE_FORMATS,deps:[J,[new e.Optional,K]],useFactory:X}],styles:[":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label,:host ::ng-deep mat-form-field .mat-form-field-label{color:#adadad}:host ::ng-deep .mat-datepicker-toggle-active{color:#666}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field-flex{flex-direction:row-reverse}:host ::ng-deep .mat-form-field-infix{border-top:none;width:auto}:host ::ng-deep .mat-form-field-suffix{margin-right:.625rem}:host ::ng-deep .mat-form-field-suffix:hover .mat-button-focus-overlay{opacity:.1}:host ::ng-deep .mat-form-field-underline{display:none}:host ::ng-deep .daysSelectedCaption{cursor:pointer}:host ::ng-deep .daysSelectedCaption.disabled{cursor:zoom-in}:host ::ng-deep .inputForMultipleDays{display:none}.componentContainer{border-radius:2px;color:#888da8;display:flex;position:relative}.componentContainer .placeholderForMultipleSelection{color:#adadad}.componentContainer.showErrors .clearButton.withoutSpacing,.componentContainer.showErrors .dateContainer,.componentContainer.showErrors .timeContainer{border-color:#ff8000}.componentContainer .clearButton{align-items:center;background:#fff;border:1px solid #e6ecf5;color:#7b7b7b;display:flex;flex:0 0 auto;font-size:18px;margin-left:1.25rem;padding:6px 14px}.componentContainer .clearButton.withoutSpacing{border-left:none;margin-left:0}.componentContainer .clearButton:disabled{background:#f9f9f9;border:1px solid #e6ecf5}.componentContainer .dateContainer{background:#fff;border:1px solid #e6ecf5;flex:1 1 auto;padding:6px}.componentContainer .dateContainer.noRightBorder{border-right:none}.componentContainer .dateContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer{align-items:center;background:#fff;border:1px solid #e6ecf5;display:flex;flex:0 0 auto;margin-left:1.25rem;padding:6px .625rem}.componentContainer .timeContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer input{border:none;color:#888da8;padding:0;text-align:center;width:20px}.componentContainer .timeContainer input::-moz-placeholder{color:#adadad}.componentContainer .timeContainer input:-ms-input-placeholder{color:#adadad}.componentContainer .timeContainer input::placeholder{color:#adadad}.componentContainer .timeContainer .divider{margin:0 .3125rem}"]}]}],J.ctorParameters=function(){return[{type:x,decorators:[{type:e.Host},{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Host},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[Y]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[Q]},{type:e.Optional}]},{type:s.DateAdapter},{type:e.ChangeDetectorRef}]},J.propDecorators={minDate:[{type:e.Input}],maxDate:[{type:e.Input}],sameMonthOnly:[{type:e.Input}],format:[{type:e.Input}],placeholder:[{type:e.Input}],clearable:[{type:e.Input}],showTimeInput:[{type:e.Input}],invalidTimeAsMidnight:[{type:e.Input}],nativeInputRef:[{type:e.ViewChild,args:["nativeInput"]}],datePickerRef:[{type:e.ViewChild,args:["picker"]}]};var Z=function(){};Z.decorators=[{type:e.NgModule,args:[{imports:[p.MatDatepickerModule,d.MatFormFieldModule,s.MatNativeDateModule,c.MatInputModule,u.MatButtonModule],exports:[p.MatDatepickerModule,d.MatFormFieldModule,s.MatNativeDateModule,c.MatInputModule,u.MatButtonModule],providers:[p.MatDatepickerModule]}]}];var tt=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.isLoading=!1,e.clearable=!1,e.onlyShowUploadButton=!1,e.useFullParentSize=!1,e}return I(e,t),e.prototype.onChange=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t.item(n));this.setInnerValueAndNotify(e),this.fileInputEl.nativeElement.value=null},e.prototype.getFileNames=function(){return Array.isArray(this.innerValue)?this.innerValue.map((function(t){return t.name})).join(", "):this.innerValue instanceof File?this.innerValue.name:null},e.prototype.shouldShowClearButton=function(){return!this.onlyShowUploadButton&&(this.multiple?!!E(this.innerValue):!!m(this.innerValue))},e.prototype.uploadFileClicked=function(){this.fileInputEl.nativeElement.click()},e}(U);tt.decorators=[{type:e.Component,args:[{selector:"klp-form-file-input",template:'<div class="componentContainer" [ngClass]="{fullParentSize: useFullParentSize}">\n\t<div class="buttonContainer">\n\t\t<klp-form-button class="uploadButton" [isLoading]="isLoading" (click)="uploadFileClicked()">\n\t\t\tUpload a file\n\t\t</klp-form-button>\n\t\t<input\n\t\t\ttype="file"\n\t\t\t#fileInput\n\t\t\t(change)="onChange($event.target.files)"\n\t\t\t[multiple]="multiple"\n\t\t\t[disabled]="disabled"\n\t\t>\n\t</div>\n\t<div class="fileName" *ngIf="!onlyShowUploadButton">\n\t\t{{getFileNames()}}\n\t</div>\n\t<klp-form-button class="clearButton" variant="white" *ngIf="shouldShowClearButton()" (click)="resetToNull()">X</klp-form-button>\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:tt,multi:!0}],styles:[":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{align-items:center;display:flex}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}input{bottom:0;cursor:pointer;left:0;opacity:0;position:absolute;right:0;top:0}.fileName{color:#515365;flex:1 1 0px;margin-left:.625rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clearButton{flex:0 0 auto}"]}]}],tt.propDecorators={isLoading:[{type:e.Input}],clearable:[{type:e.Input}],onlyShowUploadButton:[{type:e.Input}],useFullParentSize:[{type:e.Input}],fileInputEl:[{type:e.ViewChild,args:["fileInput"]}]};var et=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.reloader=!0,e}return I(e,t),e.prototype.writeValue=function(e){var n=this;t.prototype.writeValue.call(this,e),this.reloader=!1,setTimeout((function(){E(e)?n.items=e.flatMap((function(t){return D(t,[""])})):n.items=[],n.reloader=!0}))},e.prototype.onItemsRearranged=function(t){var e=this,n=function(t,e){return t.reduce((function(t,n){return e(n)?t.push([]):t[t.length-1].push(n),t}),[[]])}(t,(function(t){return""===t})).filter(E);this.setInnerValueAndNotify(n),this.reloader=!1,setTimeout((function(){e.items=D(e.items,[""]).filter((function(t,n){return(0!==n||""!==t)&&(""!==t||""!==e.items[n-1])})),e.reloader=!0}))},e}(S);et.decorators=[{type:e.Component,args:[{selector:"klp-form-sortable-grouped-items",template:'<ng-container *ngIf="reloader">\n\t<klp-form-sortable-items\n\t\t[(ngModel)]="items"\n\t\t(ngModelChange)="onItemsRearranged($event)"\n\t>\n\t\t<ng-template let-item="item">\n\t\t\t<div>{{item}}</div>\n\t\t</ng-template>\n\t</klp-form-sortable-items>\n</ng-container>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:et,multi:!0}],styles:[":host{display:block}"]}]}];var nt="--invalid_time--";var ot=function(t){function e(){var e=t.apply(this,D(arguments))||this;return e.placeholders=["hour","min"],e.hoursTouched=!1,e.minutesTouched=!1,e}return I(e,t),e.prototype.formatHours=function(){h(this.hours)||(this.hours="0")},e.prototype.formatMinutes=function(){h(this.minutes)||(this.minutes="0")},e.prototype.formatTime=function(){Number.isFinite(Number(this.hours))&&1===this.hours.length&&(this.hours="0"+this.hours),Number.isFinite(Number(this.minutes))&&1===this.minutes.length&&(this.minutes="0"+this.minutes)},e.prototype.writeValue=function(e){Number.isFinite(e)?(this.hours=Math.floor(e/60)+"",this.minutes=e%60+"",this.formatTime(),t.prototype.writeValue.call(this,e)):(this.hours="",this.minutes="",t.prototype.writeValue.call(this,nt))},e.prototype.notifyNewTime=function(){var t=Number(this.hours),e=Number(this.minutes);h(this.hours)||h(this.minutes)?Number.isFinite(t)&&t>=0&&t<=9999&&Number.isFinite(e)&&e>=0&&e<=59?this.setInnerValueAndNotify(60*t+e):this.setInnerValueAndNotify(nt):this.setInnerValueAndNotify(null)},e.prototype.touchHours=function(){this.hoursTouched=!0,this.determineAllTouched()},e.prototype.touchMinutes=function(){this.minutesTouched=!0,this.determineAllTouched()},e.prototype.determineAllTouched=function(){this.hoursTouched&&this.minutesTouched&&this.touch()},e}(S);ot.decorators=[{type:e.Component,args:[{selector:"klp-form-hour-minute-input",template:'<div class="componentContainer" [ngClass]="{disabled: disabled}">\n\t<input class="hourInput" maxlength="4" [placeholder]="placeholders[0]" [disabled]="disabled" [(ngModel)]="hours" (blur)="formatHours(); formatTime(); touchHours(); notifyNewTime()" (ngModelChange)="notifyNewTime()">\n\t<div class="divider">:</div>\n\t<input maxlength="2" [placeholder]="placeholders[1]" [disabled]="disabled" [(ngModel)]="minutes" (blur)="formatMinutes(); formatTime(); touchMinutes(); notifyNewTime()" (ngModelChange)="notifyNewTime()">\n</div>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:ot,multi:!0}],styles:[":host{display:flex}.componentContainer{align-items:center;background:#fff;border:1px solid #e6ecf5;display:flex;flex:0 0 auto;height:42px;padding:6px .625rem}.componentContainer.disabled{background:#f9f9f9;cursor:not-allowed}.componentContainer input{border:none;color:#888da8;padding:0;text-align:center;width:30px}.componentContainer input.hourInput{width:50px}.componentContainer input::-moz-placeholder{color:#adadad}.componentContainer input:-ms-input-placeholder{color:#adadad}.componentContainer input::placeholder{color:#adadad}.componentContainer .divider{margin:0 .3125rem}"]}]}],ot.propDecorators={placeholders:[{type:e.Input}]};var rt=function(){};rt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,o.FormsModule,a.NgSelectModule,i.SortablejsModule,Z],declarations:[S,U,M,O,$,J,A,V,T,F,P,R,z,L,et,_,j,tt,H,x,G,B,y,b,ot],exports:[S,U,M,$,J,O,A,V,T,F,P,R,z,L,et,_,j,tt,H,x,G,B,y,b,ot]}]}],t.ButtonComponent=M,t.CheckboxComponent=O,t.DATE_PICKER_LOCALE=Q,t.DATE_PICKER_TRANSLATIONS=W,t.DATE_TIME_PICKER_TRANSLATIONS=Y,t.DEFAULT_ERROR_MESSAGES=C,t.DatePickerComponent=$,t.DateTimePickerComponent=J,t.EmailInputComponent=A,t.FORM_ERROR_MESSAGES=v,t.FileInputComponent=tt,t.FormCaptionComponent=H,t.FormComponent=y,t.FormElementComponent=x,t.FormErrorComponent=G,t.FormSubmitButtonComponent=B,t.HourMinuteInputComponent=ot,t.KLP_DATE_FORMATS=K,t.KlpSelectOptionTemplateDirective=R,t.LoadingIndicatorComponent=V,t.MultipleValueAccessorBase=U,t.NgxEnhancyFormsModule=rt,t.NumberInputComponent=T,t.PasswordFieldComponent=F,t.SELECT_TRANSLATIONS=N,t.SelectComponent=P,t.SelectFooterComponent=z,t.SortableGroupedItemsComponent=et,t.SortableItemsComponent=L,t.SubFormDirective=b,t.TextInputComponent=_,t.ToggleComponent=j,t.ValueAccessorBase=S,t.dateValidator=function(t){return t.value===q?{date:t.value}:null},t.invalidDateKey=q,t.invalidFieldsSymbol=f,t.matDateFormatsFactory=X,t["ɵa"]=Z,Object.defineProperty(t,"__esModule",{value:!0})}));
17
- //# sourceMappingURL=klippa-ngx-enhancy-forms.umd.min.js.map