@klippa/ngx-enhancy-forms 2.2.0 → 3.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.
- package/bundles/klippa-ngx-enhancy-forms.umd.js +482 -412
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +2 -3
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/form/form-element/form-element.component.js +3 -1
- package/esm2015/lib/form/form.component.js +70 -13
- package/esm2015/lib/ngx-enhancy-forms.module.js +25 -23
- package/fesm2015/klippa-ngx-enhancy-forms.js +110 -50
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/klippa-ngx-enhancy-forms.metadata.json +1 -1
- package/lib/form/form.component.d.ts +18 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"klippa-ngx-enhancy-forms.js","sources":["../../../../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","../../../../projects/klippa/ngx-enhancy-forms/src/lib/util/values.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/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/validators/dateValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/datepicker/datepicker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/material.module.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 { Component, Input } from '@angular/core';\nimport {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';\nimport {FormElementComponent} from \"./form-element/form-element.component\";\n\nexport const invalidFieldsSymbol = Symbol('Not all fields are valid');\n\n@Component({\n\tselector: 'klp-form',\n\ttemplateUrl: './form.component.html',\n\tstyleUrls: ['./form.component.scss'],\n})\nexport class FormComponent {\n\t@Input() public formGroup: FormGroup;\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\tpublic registerControl(formControl: FormControl, formElement: FormElementComponent): void {\n\t\tthis.activeControls.push({ formControl, formElement });\n\t}\n\n\tpublic unregisterControl(formControl: FormControl): void {\n\t\tthis.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);\n\t}\n\n\tprivate disableInactiveFormGroupControls(formGroup: FormGroup): void {\n\t\tObject.values(formGroup.controls).forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.disableInactiveFormGroupControls(value);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.disableInactiveFormArrayControls(value);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.disableInactiveFormControl(value);\n\t\t\t}\n\t\t});\n\t}\n\tprivate disableInactiveFormArrayControls(formArray: FormArray): void {\n\t\tformArray.controls.forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.disableInactiveFormGroupControls(value);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.disableInactiveFormArrayControls(value);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.disableInactiveFormControl(value);\n\t\t\t}\n\t\t});\n\t}\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 originalDisabledStates = Object.values(this.formGroup.controls).map(e => {\n\t\t\treturn { control: e, disabled: e.disabled};\n\t\t});\n\t\tthis.disableInactiveFormGroupControls(this.formGroup);\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, ElementRef, Host, Inject, InjectionToken, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport {FormComponent} from \"../form.component\";\nimport {CustomErrorMessages, FormErrorMessages} from \"../../types\";\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 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\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 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) {\n\t\tthis.attachedControl = formControl;\n\t\tthis.parent.registerControl(formControl, this);\n\t}\n\n\tpublic unregisterControl(formControl: FormControl) {\n\t\tthis.attachedControl = null;\n\t\tthis.parent.unregisterControl(formControl);\n\t}\n\n\tpublic getAttachedControl() {\n\t\treturn this.attachedControl;\n\t}\n\n\tpublic registerErrorHandler(error: string, templateRef: ElementRef) {\n\t\tthis.customErrorHandlers.push({ error, templateRef });\n\t}\n\n\tpublic registerCaption(templateRef: ElementRef) {\n\t\tthis.captionRef = templateRef;\n\t}\n\n\tgetErrorToShow() {\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) {\n\t\treturn this.customErrorHandlers.find((e) => e.error === error);\n\t}\n\n\tshowDefaultError(error: string) {\n\t\treturn this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);\n\t}\n\n\tgetScrollableParent(node) {\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() {\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\tgetErrorMessages(key: keyof FormErrorMessages) {\n\t\treturn this.customMessages?.[key]?.() ?? this.errorMessages[key];\n\t}\n}\n","import { isString } from 'lodash';\n\nexport function stringIsSetAndNotEmpty(s: string) {\n\treturn isString(s) && s.length > 0;\n}\n\nexport function isNullOrUndefined(value: any) {\n\treturn value === null || value === undefined;\n}\n\nexport function numberIsSet(value: any) {\n\treturn isValueSet(value) && typeof value === 'number';\n}\n\nexport function isValueSet(value: any) {\n\treturn value !== null && value !== undefined;\n}\n\nexport function stringOrArrayIsSetAndEmpty(value: any[] | string) {\n\treturn value !== null && value !== undefined && value.length === 0;\n}\n\nexport function useIfStringIsSet(s: string) {\n\tif (stringIsSetAndNotEmpty(s)) {\n\t\treturn s;\n\t}\n\treturn undefined;\n}\n\nexport function useIfArrayIsSetWithOneItem(a: Array<any>): any {\n\tif (!isNullOrUndefined(a) && a.length === 1) {\n\t\treturn a[0];\n\t}\n\treturn undefined;\n}\n\nexport function convertParentToChild<C>(originalClass: any, newClass: C): C {\n\treturn Object.assign(newClass, originalClass);\n}\n\nexport function truncateString(s: string, length: number) {\n\tif (s.length < length) {\n\t\treturn s;\n\t}\n\treturn s.substring(0, length) + '...';\n}\n","import { ControlContainer, ControlValueAccessor, FormControl } from '@angular/forms';\nimport { Component, Host, Input, Optional } from '@angular/core';\nimport { FormElementComponent } from '../../form/form-element/form-element.component';\nimport { isNullOrUndefined, stringIsSetAndNotEmpty } from '../../util/values';\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 {\n\tpublic innerValue: T;\n\tpublic changed = new Array<(value: T) => void>();\n\tprivate touched = new Array<() => void>();\n\n\t@Input() public disabled = false;\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\n\tprivate attachedFormControl: FormControl;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {}\n\n\tngOnInit() {\n\t\tif (this.formControl) {\n\t\t\tthis.attachedFormControl = this.formControl;\n\t\t} else if (stringIsSetAndNotEmpty(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);\n\t\t}\n\t}\n\n\tisInErrorState() {\n\t\treturn this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.parent?.unregisterControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\ttouch() {\n\t\tthis.touched.forEach((f) => f());\n\t}\n\n\twriteValue(value: T) {\n\t\tthis.innerValue = value;\n\t}\n\n\tregisterOnChange(fn: (value: T) => void) {\n\t\tthis.changed.push(fn);\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.touched.push(fn);\n\t}\n\n\tsetInnerValueAndNotify(value) {\n\t\tthis.innerValue = value;\n\t\tthis.changed.forEach((fn) => fn(value));\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t}\n}\n","import { Component, HostBinding, Input } from '@angular/core';\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\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}\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() disabled: boolean;\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> {\n\t@Input() placeholder: string;\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 {Component, EventEmitter, Host, Input, OnInit, Optional, Output} 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\";\n\nexport type AppSelectOptions = Array<{\n\tid: any;\n\tname: string;\n\tdescription?: string;\n\tdisabled?: boolean;\n}>;\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[]> {\n\t@Input() placeholder: string = 'Pick an option';\n\t@Input() options: AppSelectOptions;\n\t@Input() multiple = false;\n\t@Input() clearable = true;\n\t@Input() public dropdownPosition: string;\n\t@Input() public customSearchFn: (term: string, item: { id: string; name: string; description: string }) => boolean;\n\t@Output() public onSearch = new EventEmitter<string>();\n\n\tconstructor(\n\t\t@Optional() @Host() protected parent: FormElementComponent,\n\t\t@Optional() @Host() protected controlContainer: ControlContainer,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n}\n","import { Component, ContentChild, Input, TemplateRef } 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-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>> {\n\t@ContentChild(TemplateRef) template;\n\t@Input() sortableItemSize: 'sm' | 'lg' = 'lg';\n\n\titemsOrderChanged = () => {\n\t\tthis.setInnerValueAndNotify(this.innerValue);\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}\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","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) => Promise<void>;\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 { 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 {\n\tComponent,\n\tElementRef,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOptional,\n\tSimpleChanges,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {isNullOrUndefined, isValueSet, stringIsSetAndNotEmpty} from '../../util/values';\nimport { invalidDateKey } from '../../validators/dateValidator';\nimport { MatDatepicker } from '@angular/material/datepicker';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS} from \"@angular/material/core\";\nimport {KlpDateFormats} from \"../../types\";\n\nexport const KLP_DATE_FORMATS = new InjectionToken<KlpDateFormats>('klp.form.date.formats');\n\nexport function matDateFormatsFactory(component: DatepickerComponent, dateFormats?: KlpDateFormats) {\n\treturn dateFormats?.(component.format) ?? MAT_NATIVE_DATE_FORMATS;\n}\n\n@Component({\n\tselector: 'klp-form-datepicker',\n\ttemplateUrl: './datepicker.component.html',\n\tstyleUrls: ['./datepicker.component.scss'],\n\tproviders: [\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: DatepickerComponent, multi: true },\n\t\t{ provide: MAT_DATE_FORMATS,\n\t\t\tdeps: [DatepickerComponent, [new Optional(), KLP_DATE_FORMATS]],\n\t\t\tuseFactory: matDateFormatsFactory,\n\t\t}\n\t],\n})\nexport class DatepickerComponent extends ValueAccessorBase<Date | typeof invalidDateKey> {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public format: string;\n\t@Input() public placeholder = 'Select date';\n\t@Input() public clearable = false;\n\n\t@ViewChild('nativeInput') nativeInputRef: ElementRef;\n\t@ViewChild('picker') datePickerRef: MatDatepicker<Date>;\n\n\tminDateStartOfDay: Date = undefined;\n\tmaxDateEndOfDay: Date = undefined;\n\n\t// this is passed as ngmodel and is used to set the inital date. But we also\n\t// use input and nativeInput callbacks to extend the validation logic so we\n\t// can destinguish between empty and invalid dates.\n\tvalueForMaterialDatePicker: Date;\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (changes.minDate) {\n\t\t\tthis.setMinDate(changes.minDate.currentValue);\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.setMaxDate(changes.maxDate.currentValue);\n\t\t}\n\t}\n\n\tsetMinDate(minDate: Date) {\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) {\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\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) {\n\t\tconst nativeInputValue = this.nativeInputRef.nativeElement.value;\n\t\tconst date = event.value;\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\twriteValue(value: Date | typeof invalidDateKey) {\n\t\tsuper.writeValue(value);\n\t\tthis.valueForMaterialDatePicker = value === invalidDateKey ? null : value;\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(event: any) {\n\t\tconst nativeInputValue = event.target.value;\n\t\tconst date = this.valueForMaterialDatePicker;\n\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\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t\tthis.valueForMaterialDatePicker = null;\n\t\tthis.nativeInputRef.nativeElement.value = null;\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 { 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 {SelectComponent} from \"./elements/select/select.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} from \"./form/form.component\";\nimport {SortablejsModule} from \"ngx-sortablejs\";\nimport {NgSelectModule} from \"@ng-select/ng-select\";\nimport {DatepickerComponent} from \"./elements/datepicker/datepicker.component\";\nimport {MaterialModule} from \"./material.module\";\n\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\tButtonComponent,\n\t\tCheckboxComponent,\n\t\tDatepickerComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t],\n\texports: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tDatepickerComponent,\n\t\tCheckboxComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t]\n})\nexport class NgxEnhancyFormsModule { }\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/datepicker/datepicker.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.component';\nexport * from './lib/elements/sortable-items/sortable-items.component';\nexport * from './lib/elements/text-input/text-input.component';\nexport * from './lib/elements/toggle/toggle.component';\nexport * from './lib/elements/value-accessor-base/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":[],"mappings":";;;;;;;;;;;;MAIa,mBAAmB,GAAG,MAAM,CAAC,0BAA0B,EAAE;MAOzD,aAAa;IAL1B;;QASS,mBAAc,GAGjB,EAAE,CAAC;KAgER;IA9DO,eAAe,CAAC,WAAwB,EAAE,WAAiC;QACjF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;KACvD;IAEM,iBAAiB,CAAC,WAAwB;QAChD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;KACvF;IAEO,gCAAgC,CAAC,SAAoB;QAC5D,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK;YAC/C,IAAI,KAAK,YAAY,SAAS,EAAE;gBAC/B,IAAI,CAAC,gCAAgC,CAAC,KAAK,CAAC,CAAC;aAC7C;iBAAM,IAAI,KAAK,YAAY,SAAS,EAAE;gBACtC,IAAI,CAAC,gCAAgC,CAAC,KAAK,CAAC,CAAC;aAC7C;iBAAM,IAAI,KAAK,YAAY,WAAW,EAAE;gBACxC,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;aACvC;SACD,CAAC,CAAC;KACH;IACO,gCAAgC,CAAC,SAAoB;QAC5D,SAAS,CAAC,QAAQ,C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B,mBAAmB;oBACnB,yBAAyB;oBACzB,oBAAoB;oBACpB,sBAAsB;oBACtB,eAAe;oBACf,sBAAsB;oBACtB,kBAAkB;oBAClB,eAAe;oBACf,oBAAoB;oBACpB,oBAAoB;oBACpB,kBAAkB;oBAClB,yBAAyB;oBACzB,aAAa;iBACb;gBACD,OAAO,EAAE;oBACR,iBAAiB;oBACjB,eAAe;oBACf,mBAAmB;oBACnB,iBAAiB;oBACjB,mBAAmB;oBACnB,yBAAyB;oBACzB,oBAAoB;oBACpB,sBAAsB;oBACtB,eAAe;oBACf,sBAAsB;oBACtB,kBAAkB;oBAClB,eAAe;oBACf,oBAAoB;oBACpB,oBAAoB;oBACpB,kBAAkB;oBAClB,yBAAyB;oBACzB,aAAa;iBACb;aACD;;;ACxED;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"klippa-ngx-enhancy-forms.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","../../../../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/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/validators/dateValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/datepicker/datepicker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/material.module.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 stringIsSetAndNotEmpty(s: string) {\n\treturn isString(s) && s.length > 0;\n}\n\nexport function isNullOrUndefined(value: any) {\n\treturn value === null || value === undefined;\n}\n\nexport function numberIsSet(value: any) {\n\treturn isValueSet(value) && typeof value === 'number';\n}\n\nexport function isValueSet(value: any) {\n\treturn value !== null && value !== undefined;\n}\n\nexport function stringOrArrayIsSetAndEmpty(value: any[] | string) {\n\treturn value !== null && value !== undefined && value.length === 0;\n}\n\nexport function useIfStringIsSet(s: string) {\n\tif (stringIsSetAndNotEmpty(s)) {\n\t\treturn s;\n\t}\n\treturn undefined;\n}\n\nexport function useIfArrayIsSetWithOneItem(a: Array<any>): any {\n\tif (!isNullOrUndefined(a) && a.length === 1) {\n\t\treturn a[0];\n\t}\n\treturn undefined;\n}\n\nexport function convertParentToChild<C>(originalClass: any, newClass: C): C {\n\treturn Object.assign(newClass, originalClass);\n}\n\nexport function truncateString(s: string, length: number) {\n\tif (s.length < length) {\n\t\treturn s;\n\t}\n\treturn s.substring(0, length) + '...';\n}\n","import {Component, Directive, Input, OnInit, Optional, SkipSelf} from '@angular/core';\nimport {AbstractControl, FormArray, FormControl, FormGroup, FormGroupName} 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: AbstractControl;\n}\n\n// Only used as a 'marker' to define a property will be filled in by a sub form\nexport class SubForm extends FormGroup {\n\tconstructor() {\n\t\tsuper({}, null);\n\t}\n}\n\n@Component({\n\tselector: 'klp-form',\n\ttemplateUrl: './form.component.html',\n\tstyleUrls: ['./form.component.scss'],\n})\nexport class FormComponent implements OnInit {\n\t@Input() public formGroup: FormGroup;\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\n\tngOnInit(): void {\n\t\tif (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {\n\t\t\tconst parentOfInjectInto = this.subFormPlaceholder.injectInto.parent;\n\t\t\tif (parentOfInjectInto instanceof FormArray) {\n\t\t\t\tconst i = parentOfInjectInto.controls.findIndex((e) => e === this.subFormPlaceholder.injectInto);\n\t\t\t\tparentOfInjectInto.setControl(i, this.formGroup);\n\t\t\t} else if (parentOfInjectInto instanceof FormGroup) {\n\t\t\t\tconst toReplace = Object.entries(parentOfInjectInto.controls).find(([key, val]) => {\n\t\t\t\t\treturn val === this.subFormPlaceholder.injectInto;\n\t\t\t\t});\n\t\t\t\tif (!(toReplace?.[1] instanceof SubForm)) {\n\t\t\t\t\tthrow new Error(`You are trying to inject a subForm ('${toReplace?.[0]}') within something that is not annotated as such.`);\n\t\t\t\t}\n\t\t\t\tparentOfInjectInto.setControl(toReplace[0], this.formGroup);\n\t\t\t}\n\t\t}\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\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, ElementRef, Host, Inject, InjectionToken, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport {FormComponent} from \"../form.component\";\nimport {CustomErrorMessages, FormErrorMessages} from \"../../types\";\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 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\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 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) {\n\t\t// console.log('register');\n\t\t// console.log(this.caption);\n\t\tthis.attachedControl = formControl;\n\t\tthis.parent.registerControl(formControl, this);\n\t}\n\n\tpublic unregisterControl(formControl: FormControl) {\n\t\tthis.attachedControl = null;\n\t\tthis.parent.unregisterControl(formControl);\n\t}\n\n\tpublic getAttachedControl() {\n\t\treturn this.attachedControl;\n\t}\n\n\tpublic registerErrorHandler(error: string, templateRef: ElementRef) {\n\t\tthis.customErrorHandlers.push({ error, templateRef });\n\t}\n\n\tpublic registerCaption(templateRef: ElementRef) {\n\t\tthis.captionRef = templateRef;\n\t}\n\n\tgetErrorToShow() {\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) {\n\t\treturn this.customErrorHandlers.find((e) => e.error === error);\n\t}\n\n\tshowDefaultError(error: string) {\n\t\treturn this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);\n\t}\n\n\tgetScrollableParent(node) {\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() {\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\tgetErrorMessages(key: keyof FormErrorMessages) {\n\t\treturn this.customMessages?.[key]?.() ?? this.errorMessages[key];\n\t}\n}\n","import { ControlContainer, ControlValueAccessor, FormControl } from '@angular/forms';\nimport { Component, Host, Input, Optional } from '@angular/core';\nimport { FormElementComponent } from '../../form/form-element/form-element.component';\nimport { isNullOrUndefined, stringIsSetAndNotEmpty } from '../../util/values';\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 {\n\tpublic innerValue: T;\n\tpublic changed = new Array<(value: T) => void>();\n\tprivate touched = new Array<() => void>();\n\n\t@Input() public disabled = false;\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\n\tprivate attachedFormControl: FormControl;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {}\n\n\tngOnInit() {\n\t\tif (this.formControl) {\n\t\t\tthis.attachedFormControl = this.formControl;\n\t\t} else if (stringIsSetAndNotEmpty(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);\n\t\t}\n\t}\n\n\tisInErrorState() {\n\t\treturn this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.parent?.unregisterControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\ttouch() {\n\t\tthis.touched.forEach((f) => f());\n\t}\n\n\twriteValue(value: T) {\n\t\tthis.innerValue = value;\n\t}\n\n\tregisterOnChange(fn: (value: T) => void) {\n\t\tthis.changed.push(fn);\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.touched.push(fn);\n\t}\n\n\tsetInnerValueAndNotify(value) {\n\t\tthis.innerValue = value;\n\t\tthis.changed.forEach((fn) => fn(value));\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t}\n}\n","import { Component, HostBinding, Input } from '@angular/core';\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\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}\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() disabled: boolean;\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> {\n\t@Input() placeholder: string;\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 {Component, EventEmitter, Host, Input, OnInit, Optional, Output} 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\";\n\nexport type AppSelectOptions = Array<{\n\tid: any;\n\tname: string;\n\tdescription?: string;\n\tdisabled?: boolean;\n}>;\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[]> {\n\t@Input() placeholder: string = 'Pick an option';\n\t@Input() options: AppSelectOptions;\n\t@Input() multiple = false;\n\t@Input() clearable = true;\n\t@Input() public dropdownPosition: string;\n\t@Input() public customSearchFn: (term: string, item: { id: string; name: string; description: string }) => boolean;\n\t@Output() public onSearch = new EventEmitter<string>();\n\n\tconstructor(\n\t\t@Optional() @Host() protected parent: FormElementComponent,\n\t\t@Optional() @Host() protected controlContainer: ControlContainer,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n}\n","import { Component, ContentChild, Input, TemplateRef } 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-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>> {\n\t@ContentChild(TemplateRef) template;\n\t@Input() sortableItemSize: 'sm' | 'lg' = 'lg';\n\n\titemsOrderChanged = () => {\n\t\tthis.setInnerValueAndNotify(this.innerValue);\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}\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","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) => Promise<void>;\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 { 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 {\n\tComponent,\n\tElementRef,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOptional,\n\tSimpleChanges,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {isNullOrUndefined, isValueSet, stringIsSetAndNotEmpty} from '../../util/values';\nimport { invalidDateKey } from '../../validators/dateValidator';\nimport { MatDatepicker } from '@angular/material/datepicker';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS} from \"@angular/material/core\";\nimport {KlpDateFormats} from \"../../types\";\n\nexport const KLP_DATE_FORMATS = new InjectionToken<KlpDateFormats>('klp.form.date.formats');\n\nexport function matDateFormatsFactory(component: DatepickerComponent, dateFormats?: KlpDateFormats) {\n\treturn dateFormats?.(component.format) ?? MAT_NATIVE_DATE_FORMATS;\n}\n\n@Component({\n\tselector: 'klp-form-datepicker',\n\ttemplateUrl: './datepicker.component.html',\n\tstyleUrls: ['./datepicker.component.scss'],\n\tproviders: [\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: DatepickerComponent, multi: true },\n\t\t{ provide: MAT_DATE_FORMATS,\n\t\t\tdeps: [DatepickerComponent, [new Optional(), KLP_DATE_FORMATS]],\n\t\t\tuseFactory: matDateFormatsFactory,\n\t\t}\n\t],\n})\nexport class DatepickerComponent extends ValueAccessorBase<Date | typeof invalidDateKey> {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public format: string;\n\t@Input() public placeholder = 'Select date';\n\t@Input() public clearable = false;\n\n\t@ViewChild('nativeInput') nativeInputRef: ElementRef;\n\t@ViewChild('picker') datePickerRef: MatDatepicker<Date>;\n\n\tminDateStartOfDay: Date = undefined;\n\tmaxDateEndOfDay: Date = undefined;\n\n\t// this is passed as ngmodel and is used to set the inital date. But we also\n\t// use input and nativeInput callbacks to extend the validation logic so we\n\t// can destinguish between empty and invalid dates.\n\tvalueForMaterialDatePicker: Date;\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (changes.minDate) {\n\t\t\tthis.setMinDate(changes.minDate.currentValue);\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.setMaxDate(changes.maxDate.currentValue);\n\t\t}\n\t}\n\n\tsetMinDate(minDate: Date) {\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) {\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\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) {\n\t\tconst nativeInputValue = this.nativeInputRef.nativeElement.value;\n\t\tconst date = event.value;\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\twriteValue(value: Date | typeof invalidDateKey) {\n\t\tsuper.writeValue(value);\n\t\tthis.valueForMaterialDatePicker = value === invalidDateKey ? null : value;\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(event: any) {\n\t\tconst nativeInputValue = event.target.value;\n\t\tconst date = this.valueForMaterialDatePicker;\n\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\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t\tthis.valueForMaterialDatePicker = null;\n\t\tthis.nativeInputRef.nativeElement.value = null;\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 {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 {SelectComponent} from './elements/select/select.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/datepicker/datepicker.component';\nimport {MaterialModule} from './material.module';\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\tButtonComponent,\n\t\tCheckboxComponent,\n\t\tDatepickerComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t\tSubFormDirective,\n\t],\n\texports: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tDatepickerComponent,\n\t\tCheckboxComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t\tSubFormDirective,\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/datepicker/datepicker.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.component';\nexport * from './lib/elements/sortable-items/sortable-items.component';\nexport * from './lib/elements/text-input/text-input.component';\nexport * from './lib/elements/toggle/toggle.component';\nexport * from './lib/elements/value-accessor-base/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":[],"mappings":";;;;;;;;;;;;SAEgB,sBAAsB,CAAC,CAAS;IAC/C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACpC,CAAC;SAEe,iBAAiB,CAAC,KAAU;IAC3C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC9C,CAAC;SAEe,WAAW,CAAC,KAAU;IACrC,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACvD,CAAC;SAEe,UAAU,CAAC,KAAU;IACpC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC9C,CAAC;SAEe,0BAA0B,CAAC,KAAqB;IAC/D,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AACpE,CAAC;SAEe,gBAAgB,CAAC,CAAS;IACzC,IAAI,sBAAsB,CAAC,CAAC,CAAC,EAAE;QAC9B,OAAO,CAAC,CAAC;KACT;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;SAEe,0BAA0B,CAAC,CAAa;IACvD,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5C,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KACZ;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;SAEe,oBAAoB,CAAI,aAAkB,EAAE,QAAW;IACtE,OAA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