{"version":3,"file":"ibenvandeveire-ngx-forms.mjs","sources":["../../../../../libs/angular/forms/src/lib/validators/utils/is-empty-input-value.util.ts","../../../../../libs/angular/forms/src/lib/validators/utils/form-error.util.ts","../../../../../libs/angular/forms/src/lib/validators/all-or-nothing-required/all-or-nothing-required.validator.ts","../../../../../libs/angular/forms/src/lib/validators/at-least-one-required/at-least-one-required.validator.ts","../../../../../libs/angular/forms/src/lib/validators/chronological-dates/chronological-dates.validator.ts","../../../../../libs/angular/forms/src/lib/validators/date-range/date-range.validator.ts","../../../../../libs/angular/forms/src/lib/validators/decimals-after-comma/decimals-after-comma.validator.ts","../../../../../libs/angular/forms/src/lib/validators/depended-required/depended-required.validator.ts","../../../../../libs/angular/forms/src/lib/validators/validators.ts","../../../../../libs/angular/forms/src/lib/tokens/errors-config.token.ts","../../../../../libs/angular/forms/src/lib/tokens/dynamic-form-configuration.token.ts","../../../../../libs/angular/forms/src/lib/utils/custom-update-value-and-validity/custom-update-value-and-validity.util.ts","../../../../../libs/angular/forms/src/lib/utils/mark-all-as-dirty/mark-all-as-dirty.util.ts","../../../../../libs/angular/forms/src/lib/utils/form-accessor/form-accessor.utils.ts","../../../../../libs/angular/forms/src/lib/utils/has-errors/has-errors.util.ts","../../../../../libs/angular/forms/src/lib/utils/touched-event-listener/touched-event-listener.ts","../../../../../libs/angular/forms/src/lib/utils/accessor-providers/accessor-providers.util.ts","../../../../../libs/angular/forms/src/lib/directives/errors/errors.directive.ts","../../../../../libs/angular/forms/src/lib/directives/dynamic-form/dynamic-form.directive.ts","../../../../../libs/angular/forms/src/lib/abstracts/base-form/base-form.accessor.ts","../../../../../libs/angular/forms/src/lib/abstracts/custom-control-value-accessor/custom-control-value-accessor.ts","../../../../../libs/angular/forms/src/lib/abstracts/form/form.accessor.ts","../../../../../libs/angular/forms/src/lib/abstracts/data-form/data-form.accessor.ts","../../../../../libs/angular/forms/src/lib/abstracts/form-accessor-container/form-accessor-container.ts","../../../../../libs/angular/forms/src/lib/abstracts/error/error.component.abstract.ts","../../../../../libs/angular/forms/src/lib/abstracts/save-on-exit/save-on-exit.component.abstract.ts","../../../../../libs/angular/forms/src/lib/abstracts/save-on-exit/save-on-exit.service.abstract.ts","../../../../../libs/angular/forms/src/lib/abstracts/dynamic-form/dynamic-form.abstract.component.ts","../../../../../libs/angular/forms/src/lib/guards/save-on-exit/save-on-exit.guard.ts","../../../../../libs/angular/forms/src/lib/providers/errors/errors-configuration.provider.ts","../../../../../libs/angular/forms/src/lib/providers/dynamic-form/dynamic-form.provider.ts","../../../../../libs/angular/forms/src/lib/components/dynamic-form/dynamic-form.component.ts","../../../../../libs/angular/forms/src/index.ts","../../../../../libs/angular/forms/src/ibenvandeveire-ngx-forms.ts"],"sourcesContent":["export const isEmptyInputValue = (value: any): boolean => {\n\t// we don't check for string here so it also works with arrays\n\treturn value == null || value.length === 0;\n};\n","import { AbstractControl } from '@angular/forms';\nimport clean from 'obj-clean';\n\n/**\n * Removes an error from a form control\n *\n * @param control - Form control to remove the error from.\n * @param error  - Name of the error to remove from the control.\n */\nexport const clearFormError = (control: AbstractControl, error: string): void => {\n\t// Iben: Check if there are no errors existing on this control or if the the provided error does not exist, and early exit if needed\n\tconst errors = new Set(Object.keys(control.errors || {}));\n\n\tif (errors.size === 0 || !errors.has(error)) {\n\t\treturn;\n\t}\n\n\t// Iben: In case the provided error is the only error on the control, clear all errors and early exit\n\tif (errors.has(error) && errors.size === 1) {\n\t\tcontrol.setErrors(null);\n\n\t\treturn;\n\t}\n\n\t// Iben: In case there are more errors, remove only the provided error\n\tcontrol.setErrors(\n\t\tclean({\n\t\t\t...control.errors,\n\t\t\t[error]: undefined,\n\t\t})\n\t);\n};\n\n/**\n * Adds an error to a form control\n *\n * @param control - Form control to attach the error to.\n * @param error - Name of the error to attach to the control.\n * @param value - Value of the error being attached to the control\n */\nexport const setFormError = (control: AbstractControl, error: string, value: unknown = true): void => {\n\t// Iben: Early exit in case the control already has the error\n\tif (control.hasError(error)) {\n\t\treturn;\n\t}\n\n\t// Iben: Add the provided error\n\tcontrol.setErrors({\n\t\t...control.errors,\n\t\t[error]: value,\n\t});\n};\n","import { FormGroup } from '@angular/forms';\nimport clean from 'obj-clean';\n\nimport { clearFormError, setFormError } from '../utils';\n\nconst EMPTY_SET = new Set([undefined, null, '']);\n\n/**\n * FormGroup validator which checks if either all values or no values are filled in\n *\n * @param controls - An array of controls.\n * @param dependedControlKey - A control within the group which the other controls depend on.\n * @param matchFunction - Optional function the dependedControl should check\n */\nexport const allOrNothingRequiredValidator = (\n\tform: FormGroup\n): { allOrNothingRequiredError: string[] } | null => {\n\tconst keys = Object.keys(form.value);\n\n\t// Iben:  If the group is completely empty we clear all required errors\n\tif (Object.keys(clean(form.value, { preserveArrays: false })).length === 0) {\n\t\tfor (const key of keys) {\n\t\t\tclearFormError(form.get(key), 'required');\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Iben:  Collect all control keys that are missing values\n\tconst requiredKeys = new Set<string>();\n\n\t// Iben: Loop over all keys and check each control on whether it is empty or not\n\tkeys.forEach((key) => {\n\t\tconst control = form.get(key);\n\n\t\t// Iben: Check if the control is empty\n\t\tconst isEmpty =\n\t\t\ttypeof control.value === 'object' && control.value !== null\n\t\t\t\t? control.value instanceof Date\n\t\t\t\t\t? false\n\t\t\t\t\t: Object.keys(clean(control.value)).length === 0\n\t\t\t\t: EMPTY_SET.has(control.value);\n\n\t\t// Iben: Add/remove the errors when needed\n\t\tif (isEmpty) {\n\t\t\tsetFormError(control, 'required');\n\n\t\t\trequiredKeys.add(key);\n\t\t} else {\n\t\t\tclearFormError(control, 'required');\n\n\t\t\trequiredKeys.delete(key);\n\t\t}\n\t});\n\n\t// Iben: Return either null or the list of controls that are missing values based on the empty state\n\treturn requiredKeys.size === 0 ? null : { allOrNothingRequiredError: Array.from(requiredKeys) };\n};\n","import { FormGroup } from '@angular/forms';\nimport clean from 'obj-clean';\n\nimport { clearFormError, setFormError } from '../utils';\n\nexport interface AtLeastOneRequiredValidatorOptions<KeyType extends string = string> {\n\tcontrols?: KeyType[];\n\tconditionalFunction?: (data: any) => boolean;\n}\n\n/**\n * FormGroup validator which checks if either at least one value is filled in\n *\n * @param options - An optional object with configuration options, see below params for more info\n */\nexport const atLeastOneRequiredValidator = <KeyType extends string = string>(\n\toptions?: AtLeastOneRequiredValidatorOptions<KeyType>\n) => {\n\treturn (group: FormGroup): { atLeastOneRequiredError: true } | null => {\n\t\t// Iben: Get the optional configuration items\n\t\tlet conditionalFunction: (data: any) => boolean;\n\t\tlet keys: KeyType[];\n\n\t\tif (options) {\n\t\t\tconditionalFunction = options.conditionalFunction;\n\t\t\tkeys = options.controls;\n\t\t}\n\t\t// Iben: In case there are no errors, clean the required errors and return null.\n\t\tconst targetKeys = keys || (Object.keys(group.controls) as KeyType[]);\n\n\t\t// Iben: Setup the needed variables to handle the validator\n\t\tconst cleanedFormValue = clean(group.value);\n\t\tconst cleanedKeys = new Set(Object.keys(cleanedFormValue));\n\t\tconst empty = cleanedKeys.size === 0;\n\n\t\t// Iben: If nothing is filled in, we return an error\n\t\tif (\n\t\t\t(empty && !conditionalFunction) ||\n\t\t\t(empty && conditionalFunction && conditionalFunction(group.value))\n\t\t) {\n\t\t\tfor (const key of targetKeys) {\n\t\t\t\tsetFormError(group.get(key), 'required');\n\t\t\t}\n\n\t\t\treturn { atLeastOneRequiredError: true };\n\t\t}\n\n\t\t// Iben: Check if we need to check on a specific key\n\t\tif (keys) {\n\t\t\tconst hasOneKey = keys.reduce((hasOne, key) => hasOne || cleanedKeys.has(key), false);\n\n\t\t\t// Iben: Only return an error when there is no key matched at all\n\t\t\t// and in case of a conditionalFunction if the conditionalFunction is matched as well\n\t\t\tif (\n\t\t\t\t(!hasOneKey && !conditionalFunction) ||\n\t\t\t\t(!hasOneKey && conditionalFunction && conditionalFunction(group.value))\n\t\t\t) {\n\t\t\t\tfor (const key of targetKeys) {\n\t\t\t\t\tsetFormError(group.get(key), 'required');\n\t\t\t\t}\n\n\t\t\t\treturn { atLeastOneRequiredError: true };\n\t\t\t}\n\t\t}\n\n\t\t// Iben: In case there are no errors, clean the required errors and return null.\n\t\tfor (const key of targetKeys) {\n\t\t\tclearFormError(group.get(key), 'required');\n\t\t}\n\n\t\treturn null;\n\t};\n};\n","import { FormGroup, ValidatorFn } from '@angular/forms';\nimport { format, isValid } from 'date-fns';\n\nimport { clearFormError, setFormError } from '../utils';\n\n/**\n * A FormGroup validator to check whether a start and end date are chronologically correct\n *\n * @param startControlKey - The key of the control containing the start date value\n * @param endControlKey - The key of the control containing the end date value\n * @param format - Optional format of the dates provided by the controls, by default yyyy-MM-dd\n */\nexport const chronologicalDatesValidator = (\n\tstartControlKey: string,\n\tendControlKey: string,\n\tdateFormat = 'yyyy-MM-dd'\n): ValidatorFn => {\n\treturn (form: FormGroup): { incorrectChronologicalDates: true } | null => {\n\t\t// Iben: Get the date values\n\t\tconst value = form.getRawValue();\n\t\tconst startValue = value[startControlKey];\n\t\tconst endValue = value[endControlKey];\n\n\t\t// Iben: Clear the form error on the endControl\n\t\tclearFormError(form.get(endControlKey), 'incorrectChronologicalDate');\n\n\t\t// Iben: If either date value is not filled in, we early exit to handle this in a potential required validator\n\t\tif (!startValue || !endValue) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: If the dates as is are not valid, early exit\n\t\tif (!isValid(new Date(startValue)) || !isValid(new Date(endValue))) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: Create dates so we can compare them\n\t\tconst startDate = format(new Date(startValue), dateFormat);\n\t\tconst endDate = format(new Date(endValue), dateFormat);\n\n\t\t// Iben: If either date is invalid based on the format, we early exit to handle this in a date validator\n\t\tif (!isValid(new Date(startDate)) || !isValid(new Date(endDate))) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: If the endDate falls before the startDate, we return an error\n\t\tif (endDate < startDate) {\n\t\t\tsetFormError(form.get(endControlKey), 'incorrectChronologicalDate');\n\n\t\t\treturn { incorrectChronologicalDates: true };\n\t\t}\n\n\t\treturn null;\n\t};\n};\n","import { AbstractControl } from '@angular/forms';\nimport { isValid, parse } from 'date-fns';\n\ntype DateRangeErrorCodes =\n\t| 'invalidMaxDate'\n\t| 'invalidMinDate'\n\t| 'dateAfterMaxDate'\n\t| 'dateBeforeMinDate';\n\n/**\n * Form control validator which validates if a date is between a provided range (edges not included)\n *\n * @param minDate - Minimum valid date\n * @param maxDate - Maximum valid date\n * @param format - Optional format used for all 3 dates, by default yyyy-MM-dd\n */\nexport const dateRangeValidator = (min: string, max: string, format: string = 'yyyy-MM-dd') => {\n\treturn (control: AbstractControl): { invalidRange: DateRangeErrorCodes } | null => {\n\t\t// Iben: Early exit in case the control or the value does not exist\n\t\tif (!control?.value) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben : Create date objects based on the provided dates\n\t\tconst date = parse(control.value, format, new Date());\n\t\tconst maxDate = parse(max, format, new Date());\n\t\tconst minDate = parse(min, format, new Date());\n\n\t\t// Iben: In case either of the boundary dates is invalid, we mark the input as invalid as we cannot confirm it's in the right range\n\t\tif (!isValid(maxDate) || !isValid(minDate)) {\n\t\t\treturn {\n\t\t\t\tinvalidRange: !isValid(maxDate) ? 'invalidMaxDate' : 'invalidMinDate',\n\t\t\t};\n\t\t}\n\n\t\t// Iben: In case the date itself is invalid, we early exit to let a potential date validator handle the error\n\t\tif (!isValid(date)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: We check if the date is in between the boundaries and return an error if need be\n\t\tif (!(minDate <= date) || !(date <= maxDate)) {\n\t\t\treturn {\n\t\t\t\tinvalidRange: date > maxDate ? 'dateAfterMaxDate' : 'dateBeforeMinDate',\n\t\t\t};\n\t\t}\n\n\t\treturn null;\n\t};\n};\n","import { FormControl } from '@angular/forms';\n\n/**\n * Validates whether the inputted value has exceeded the maximum amount of decimals after the comma\n *\n * @param max - The maximum number of decimals after the comma\n */\nexport const decimalsAfterCommaValidator = (max: number) => {\n\treturn (control: FormControl): { invalidDecimalsAfterComma: true } | null => {\n\t\t// Iben: In case no control was provided, or the control value was empty, we early exit\n\t\tif (!control || (!control.value && control.value !== 0)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: We check if the input value matches the amount of decimals after the comma, if not, we return an error\n\t\treturn new RegExp(`^\\\\d+(.\\\\d{1,${max}})?$`).test(`${control.value}`)\n\t\t\t? null\n\t\t\t: { invalidDecimalsAfterComma: true };\n\t};\n};\n","import { FormGroup } from '@angular/forms';\n\nimport { clearFormError, setFormError } from '../utils';\n\nconst EMPTY_SET = new Set([undefined, null, '']);\n\n/**\n * FormGroup validator which checks if an array of controls in the control are filled in if the depended control is filled in\n *\n * @param controls - An array of controls.\n * @param dependedControlKey - A control within the group which the other controls depend on.\n * @param matchFunction - Optional function the dependedControl should check\n */\nexport const dependedRequiredValidator = <KeyType extends string = string>(\n\tcontrols: KeyType[],\n\tdependedControlKey: KeyType,\n\tmatchFunction?: (data: any) => boolean\n) => {\n\treturn (form: FormGroup): { hasDependedRequiredError: string[] } | null => {\n\t\t// Iben: Make a set so we know which controls are not filled in\n\t\tconst keysWithErrors = new Set<KeyType>();\n\t\tconst dependedControl = form.get(dependedControlKey);\n\n\t\t// Iben: If the control is not filled in or the value doesn't match, we do an early exit and remove all potential required errors\n\t\tif (\n\t\t\t!dependedControl ||\n\t\t\t!(matchFunction\n\t\t\t\t? matchFunction(dependedControl.value)\n\t\t\t\t: !EMPTY_SET.has(dependedControl.value))\n\t\t) {\n\t\t\tfor (const key of controls) {\n\t\t\t\tconst control = form.get(key);\n\n\t\t\t\t// Continue if control does not exist\n\t\t\t\tif (!control) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tclearFormError(control, 'required');\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t// Iben: Set an overall error so we can see if all controls are filled in or not\n\t\tlet hasError = false;\n\n\t\tfor (const key of controls) {\n\t\t\tconst control = form.get(key);\n\n\t\t\t// Iben: Continue if control does not exist\n\t\t\tif (!control) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\thasError = hasError || EMPTY_SET.has(control.value);\n\n\t\t\t// Iben: If the control is not filled in we set a required error, if not, we remove it\n\t\t\tif (!EMPTY_SET.has(control.value)) {\n\t\t\t\tclearFormError(control, 'required');\n\t\t\t\tkeysWithErrors.delete(key);\n\t\t\t} else {\n\t\t\t\tsetFormError(control, 'required');\n\t\t\t\tkeysWithErrors.add(key);\n\t\t\t}\n\t\t}\n\n\t\tconst errors = Array.from(keysWithErrors);\n\n\t\treturn hasError ? { hasDependedRequiredError: errors } : null;\n\t};\n};\n","import { FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nimport { allOrNothingRequiredValidator } from './all-or-nothing-required/all-or-nothing-required.validator';\nimport {\n\tAtLeastOneRequiredValidatorOptions,\n\tatLeastOneRequiredValidator,\n} from './at-least-one-required/at-least-one-required.validator';\nimport { chronologicalDatesValidator } from './chronological-dates/chronological-dates.validator';\nimport { dateRangeValidator } from './date-range/date-range.validator';\nimport { decimalsAfterCommaValidator } from './decimals-after-comma/decimals-after-comma.validator';\nimport { dependedRequiredValidator } from './depended-required/depended-required.validator';\n\n/**\n * Exported Class\n */\n\nexport class NgxValidators {\n\t/**\n\t * A validator to check if all or none of the values of a form group are filled in.\n\t * Particularly useful in situations where a form group field within itself is optional,\n\t * but all fields are required in case it does get filled in\n\t *\n\t * Returns an `allOrNothingRequiredError` error on the provided FormGroup and a `required` error on the individual controls\n\t *\n\t * @param control - A form group control\n\t */\n\tstatic allOrNothingRequired(control: FormGroup): ValidationErrors | null {\n\t\treturn allOrNothingRequiredValidator(control);\n\t}\n\n\t/**\n\t * A validator to check if at least one of the provided controls of the form group are filled in\n\t *\n\t * Returns an `atLeastOneRequiredError` error on the provided FormGroup and a `required` error on the individual controls\n\t *\n\t * @param options - An optional object with configuration options, see below params for more info\n\t * @param controlNames - Optional list of controls, if not provided the validator is applied to all controls of the group\n\t * @param conditionalFunction - Optional function the form value needs to return true to for the required to be se\n\t */\n\tstatic atLeastOneRequired<KeyType extends string = string>(\n\t\toptions?: AtLeastOneRequiredValidatorOptions<KeyType>\n\t): ValidatorFn {\n\t\treturn atLeastOneRequiredValidator<KeyType>(options);\n\t}\n\n\t/**\n\t * FormGroup validator which checks if an array of controls in the control are filled in if the depended control is filled in\n\t *\n\t * Returns a `hasDependedRequiredError` error on the provided FormGroup and a `required` error on the individual controls\n\t *\n\t * @param controls - An array of controls.\n\t * @param dependedControlKey - A control within the group which the other controls depend on.\n\t * @param matchFunction - Optional function the dependedControl should check\n\t */\n\tstatic dependedRequired<KeyType extends string = string>(\n\t\tcontrols: KeyType[],\n\t\tdependedControlKey: KeyType,\n\t\tmatchFunction?: (data: any) => boolean\n\t): ValidatorFn {\n\t\treturn dependedRequiredValidator<KeyType>(controls, dependedControlKey, matchFunction);\n\t}\n\n\t/**\n\t * Validates whether the inputted value has exceeded the maximum amount of decimals after the comma\n\t *\n\t * Returns an `invalidDecimalsAfterComma` error on the provided control\n\t *\n\t * @param max - The maximum number of decimals after the comma\n\t */\n\tstatic decimalsAfterComma(max: number): ValidatorFn {\n\t\treturn decimalsAfterCommaValidator(max);\n\t}\n\n\t/**\n\t * A FormGroup validator to check whether a start and end date are chronologically correct\n\t *\n\t * Returns an `incorrectChronologicalDates` error on the provided FormGroup and a `incorrectChronologicalDate` on the endControl\n\t *\n\t * @param startControlKey - The key of the control containing the start date value\n\t * @param endControlKey - The key of the control containing the end date value\n\t * @param format - Optional format of the dates provided by the controls, by default yyyy-MM-dd\n\t */\n\tstatic chronologicalDates(\n\t\tstartControlKey: string,\n\t\tendControlKey: string,\n\t\tformat = 'yyyy-MM-dd'\n\t): ValidatorFn {\n\t\treturn chronologicalDatesValidator(startControlKey, endControlKey, format);\n\t}\n\n\t/**\n\t * Form control validator which validates if a date is between a provided range\n\t *\n\t * Returns an `invalidRange` error\n\t *\n\t * @param minDate - Minimum valid date\n\t * @param maxDate - Maximum valid date\n\t * @param format - Optional format used for all 3 dates, by default yyyy-MM-dd\n\t */\n\tstatic dateRangeValidator(min: string, max: string, format = 'yyyy-MM-dd'): ValidatorFn {\n\t\treturn dateRangeValidator(min, max, format);\n\t}\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { NgxFormsErrorConfigurationOptions } from '../types';\n\nexport const NgxFormsErrorsConfigurationToken =\n\tnew InjectionToken<NgxFormsErrorConfigurationOptions>('NgxFormsErrorsConfiguration');\n","import { InjectionToken } from '@angular/core';\n\nimport { NgxDynamicFormConfiguration } from '../types';\n\nexport const NgxDynamicFormConfigurationToken = new InjectionToken<NgxDynamicFormConfiguration>(\n\t'NgxDynamicFormConfigurationToken'\n);\n","import { AbstractControl } from '@angular/forms';\n\nimport { FormStateOptionsEntity } from '../../types';\n\n/**\n * Adds a deep update value and validity to the existing update value and validity\n *\n * @param form - The provided abstract control\n * @param options - The options we wish to call along with the update value and validity function\n */\nexport const updateAllValueAndValidity = (\n\tform: AbstractControl,\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: Call the original updateValueAndValidity\n\tform.updateValueAndValidity(options);\n\t// Iben: If we don't have the inner form yet we just do the default update value\n\tif (!form || !form['controls']) {\n\t\treturn;\n\t}\n\n\t// Iben: We update the value and validity recursively for each child control\n\tdeepUpdateValueAndValidity(form['controls'], { ...options, onlySelf: true });\n};\n/**\n * Allows for a deep updateValueAndValidity of all controls. Can be used for a FormGroup or a FormArray\n *\n * @param controls - The controls we wish to update the value and validity of\n * @param onlySelf - Whether or not we want it to be only the control itself and not the direct ancestors. Default this is true\n */\nexport const deepUpdateValueAndValidity = (\n\tcontrols: Record<string, AbstractControl> | AbstractControl[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: We loop over all controls\n\t(Array.isArray(controls) ? controls : Object.values(controls)).forEach((control) => {\n\t\t// Iben: If there are no child controls, we update the value and validity of the control\n\t\tif (!control['controls']) {\n\t\t\tcontrol.updateValueAndValidity(options);\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: If there are child controls, we recursively update the value and validity\n\t\tdeepUpdateValueAndValidity(control['controls'], options);\n\t});\n};\n","import { AbstractControl } from '@angular/forms';\n\nimport { FormStateOptionsEntity } from '../../types';\n\n/**\n * Allows for a deep markAsDirty of all controls. Can be used for a FormGroup or a FormArray\n *\n * @param controls - The controls we wish to update the value and validity of\n * @param onlySelf - Whether or not we want it to be only the control itself and not the direct ancestors. Default this is true\n */\nexport const markAllAsDirty = (\n\tcontrols: Record<string, AbstractControl> | AbstractControl[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: We loop over all controls\n\t(Array.isArray(controls) ? controls : Object.values(controls)).forEach((control) => {\n\t\t// Iben: If there are no child controls, we update the value and validity of the control\n\t\tif (!control['controls']) {\n\t\t\tcontrol.markAsDirty(options);\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: If there are child controls, we recursively update the value and validity\n\t\tmarkAllAsDirty(control['controls'], options);\n\t});\n};\n","import { AbstractControl, FormGroup } from '@angular/forms';\n\nimport { DataFormAccessor, FormAccessor } from '../../abstracts';\nimport { FormStateOptionsEntity } from '../../types';\nimport { updateAllValueAndValidity } from '../custom-update-value-and-validity/custom-update-value-and-validity.util';\nimport { markAllAsDirty } from '../mark-all-as-dirty/mark-all-as-dirty.util';\n\n/**\n * Disable a FormControl/FormArray\n *\n * @param keys - The keys of the fields we wish to disable\n * @param emitEvent - Whether or not we wish to emit the event\n */\nconst handleDisableFormControlOfFormArray = (\n\tform: AbstractControl,\n\tkeys: Set<string>,\n\temitEvent: boolean\n) => {\n\t// Iben: Early exit in case the state already matches so we don't do unnecessary emits\n\tif (\n\t\t(keys.has('formAccessorSelf') && form.disabled) ||\n\t\t(!keys.has('formAccessorSelf') && form.enabled)\n\t) {\n\t\treturn;\n\t}\n\n\t// Iben: Disable/enable the control based on the key\n\tkeys.has('formAccessorSelf') ? form.disable({ emitEvent }) : form.enable({ emitEvent });\n};\n\n/**\n * Disable the controls of a FormGroup\n *\n * @param keys - The keys of the fields we wish to disable\n * @param emitEvent - Whether or not we wish to emit the event\n */\nconst handleDisableFormGroup = (form: FormGroup, keys: Set<string>, emitEvent: boolean) => {\n\t// Iben: Loop over all controls and enable them so that they are re-enabled in case the set of keys changes\n\tenableControls(form, emitEvent);\n\n\t// Iben: Disable the keys\n\tArray.from(keys).forEach((key) => {\n\t\tconst control = form.get(key);\n\t\tif (!control) {\n\t\t\tconsole.warn(\n\t\t\t\t`FormAccessor: The key \"${key}\" was provided in the disableFields array but was not found in the provided form.`\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Prevent emit event if the control is already disabled\n\t\tif (!control.disabled) {\n\t\t\tcontrol.disable({ emitEvent });\n\t\t}\n\t});\n};\n\n/**\n * Recursively enables all fields of a control\n *\n * @param control - An AbstractControl which we want to enable and enable all children off\n * @param emitEvent - Whether or not we wish to emit an event\n */\nconst enableControls = (control: AbstractControl, emitEvent: boolean = false): void => {\n\t//Iben: If no control was found, early exit\n\tif (!control) {\n\t\treturn;\n\t}\n\n\t// Iben: Enable the control itself if it is not enabled yet\n\tif (!control.enabled) {\n\t\tcontrol.enable({ emitEvent });\n\t}\n\n\t// Iben: If there are no controls, early exit\n\tif (!control['controls']) {\n\t\treturn;\n\t}\n\n\t// Iben: Recursively enable each control\n\t(Array.isArray(control['controls'])\n\t\t? control['controls']\n\t\t: Object.values(control['controls'])\n\t).forEach((child: AbstractControl) => {\n\t\tenableControls(child, emitEvent);\n\t});\n};\n\n/**\n * Disables and enables a form's control based on a set of provided keys\n *\n * @param form - The form we wish to disable the controls for\n * @param controlKeys - A set of keys of the controls\n * @param emitEvent - Whether or not we wish to emit the event\n */\nexport const handleFormAccessorControlDisabling = (\n\tform: AbstractControl,\n\tcontrolKeys: Set<string>,\n\temitEvent: boolean\n) => {\n\t// Iben: Depending on whether we're dealing with a FormArray/FormControl or a FormGroup, we have different  and handle the disable/enable state\n\tif (!form['controls'] || Array.isArray(form['controls'])) {\n\t\thandleDisableFormControlOfFormArray(form, controlKeys, emitEvent);\n\t} else {\n\t\thandleDisableFormGroup(form as FormGroup, controlKeys, emitEvent);\n\t}\n};\n\n/**\n * Marks a form and all the form-accessors this form is based on as dirty\n *\n * @param form - The form we wish to mark as dirty\n * @param accessors - An array of all the accessors we wish to mark as dirty\n * @param options - Form state options we wish to provide\n */\nexport const handleFormAccessorMarkAsDirty = (\n\tform: AbstractControl,\n\taccessors: (FormAccessor | DataFormAccessor)[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: If the control has child controls, recursively mark them as dirty\n\tif (form['controls']) {\n\t\tmarkAllAsDirty(form['controls'], options);\n\t} else {\n\t\t// Iben : Mark the form as dirty\n\t\tform.markAsDirty(options);\n\t}\n\n\t// Iben: Loop over each form accessor and call the mark as dirty function, so all subsequent accessors are also marked as dirty\n\taccessors?.forEach((accessor) => accessor.markAsDirty(options));\n};\n\n/**\n * Marks a form and all the form-accessors this form is based on as touched\n *\n * @param form - The form we wish to mark as touched\n * @param accessors - An array of all the accessors we wish to mark as touched\n * @param options - Form state options we wish to provide\n */\nexport const handleFormAccessorMarkAsTouched = (\n\tform: AbstractControl,\n\taccessors: (FormAccessor | DataFormAccessor)[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: Mark all the controls and the children as touched\n\tform.markAllAsTouched();\n\n\t// Iben: Loop over each form accessor and call the mark as touched function, so all subsequent accessors are also marked as touched\n\taccessors?.forEach((accessor) => accessor.markAsTouched(options));\n};\n\n/**\n * Marks a form and all the form-accessors this form is based on as pristine\n *\n * @param form - The form we wish to mark as pristine\n * @param accessors - An array of all the accessors we wish to mark as pristine\n * @param options - Form state options we wish to provide\n */\nexport const handleFormAccessorMarkAsPristine = (\n\tform: AbstractControl,\n\taccessors: (FormAccessor | DataFormAccessor)[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: Mark all the controls and the children as touched\n\tform.markAsPristine();\n\n\t// Iben: Loop over each form accessor and call the mark as touched function, so all subsequent accessors are also marked as touched\n\taccessors?.forEach((accessor) => accessor.markAsPristine(options));\n};\n\n/**\n * Updates a form and all the form-accessors this form i\n *\n * @param form - The form we wish to update the value and validity of\n * @param accessors - An array of all the accessors we wish to update the value and validity of\n * @param options - Form state options we wish to provide\n */\nexport const handleFormAccessorUpdateValueAndValidity = (\n\tform: AbstractControl,\n\taccessors: (FormAccessor | DataFormAccessor)[],\n\toptions: FormStateOptionsEntity = {}\n) => {\n\t// Iben: Update the value and validity of the form\n\tupdateAllValueAndValidity(form, options);\n\n\t// Iben: Loop over each form accessor and call the updateValueAndValidity function, so all subsequent accessors are also updated\n\taccessors?.forEach((accessor) => accessor.updateAllValueAndValidity(options));\n};\n","import { AbstractControl } from '@angular/forms';\n\n/**\n * Recursively checks if a form and its possible children have an error\n *\n * @param  control - The provided abstract control\n */\nexport const hasErrors = (control: AbstractControl): boolean => {\n\t// Iben: If no control is found, early exit\n\tif (!control) {\n\t\treturn false;\n\t}\n\n\t// Iben: If the form has no children we just return the state of the current form\n\tif (!control['controls']) {\n\t\treturn control.invalid;\n\t}\n\n\t// Iben: If the form has children, we check if some of the child controls have errors\n\tconst controls = control['controls'];\n\n\treturn (Array.isArray(controls) ? controls : Object.values(controls)).some((control) =>\n\t\thasErrors(control)\n\t);\n};\n","import { AbstractControl } from '@angular/forms';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Listen to the touched event of a control\n *\n * @param control - An AbstractControl\n */\nexport const touchedEventListener = (control: AbstractControl): Observable<boolean> => {\n\t// Iben: Grab the current markAsTouched and UnTouched methods\n\tconst markAsTouched = control.markAsTouched;\n\tconst markAsUnTouched = control.markAsUntouched;\n\n\t// Iben: Set a subject with the current touched state\n\tconst touchedSubject = new BehaviorSubject<boolean>(control.touched);\n\n\t// Iben: Overwrite the existing functions and emit the touched state\n\tcontrol.markAsTouched = (options?: { onlySelf: boolean }) => {\n\t\ttouchedSubject.next(true);\n\t\tmarkAsTouched.bind(control)(options);\n\t};\n\n\tcontrol.markAsUntouched = (options?: { onlySelf: boolean }) => {\n\t\ttouchedSubject.next(false);\n\t\tmarkAsUnTouched.bind(control)(options);\n\t};\n\n\t// Iben: Return the touched state\n\treturn touchedSubject.asObservable();\n};\n","import { Provider, forwardRef } from '@angular/core';\nimport { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { BaseFormAccessor } from '../../abstracts';\n\n/**\n * An interface to wrap an component class in.\n *\n * This interface is for internal use, as a similar one already exists in the CDK, but we don't want to create a dependency on that for this package.\n */\ninterface ComponentTypeWrapper<ComponentType> {\n\tnew (...args: any[]): ComponentType;\n}\n\n/**\n * Generates the necessary providers for a (Data)FormAccessor.\n *\n * @param  component - The component class of the (Data)FormAccessor\n */\nexport const createAccessorProviders = <ComponentType>(\n\tcomponent: ComponentTypeWrapper<ComponentType>\n): Provider[] => {\n\treturn [\n\t\t// Iben: Generate a provider for the control handling\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => component),\n\t\t\tmulti: true,\n\t\t},\n\t\t// Iben: Generate a provider for the validation handling\n\t\t{\n\t\t\tprovide: NG_VALIDATORS,\n\t\t\tuseExisting: forwardRef(() => component),\n\t\t\tmulti: true,\n\t\t},\n\t\t// Iben: Generate a provider for the FormContainer handling\n\t\t{\n\t\t\tprovide: BaseFormAccessor,\n\t\t\tuseExisting: forwardRef(() => component),\n\t\t},\n\t];\n};\n","import {\n\tAfterViewInit,\n\tChangeDetectorRef,\n\tComponentRef,\n\tDirective,\n\tElementRef,\n\tinject,\n\tRenderer2,\n\tTemplateRef,\n\tViewContainerRef,\n\tinput,\n\tDestroyRef,\n\tWritableSignal,\n\tsignal,\n\tEmbeddedViewRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n\tAbstractControl,\n\tFormGroupDirective,\n\tFormGroupName,\n\tValidationErrors,\n} from '@angular/forms';\nimport { combineLatest, startWith, tap } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { NgxFormsErrorAbstractComponent } from '../../abstracts';\nimport { NgxFormsErrorsConfigurationToken } from '../../tokens';\nimport { NgxFormsErrorConfigurationOptions } from '../../types';\nimport { touchedEventListener } from '../../utils';\n\n@Directive({\n\tselector: '[ngxFormsErrors]',\n\tstandalone: true,\n})\nexport class NgxFormsErrorsDirective implements AfterViewInit {\n\tprotected errorViewContainer: EmbeddedViewRef<NgxFormsErrorAbstractComponent>;\n\n\t/**\n\t *  An optional instance of the FormGroup directive\n\t */\n\tprotected readonly formGroupDirective: FormGroupDirective = inject(FormGroupDirective, {\n\t\toptional: true,\n\t});\n\n\t/**\n\t *  An optional instance of the FormGroupName directive\n\t */\n\tprotected readonly formNameDirective: FormGroupName = inject(FormGroupName, { optional: true });\n\n\t/**\n\t *  The optional global configuration used form the NgxFormsError\n\t */\n\tprivate readonly config: NgxFormsErrorConfigurationOptions = inject(\n\t\tNgxFormsErrorsConfigurationToken,\n\t\t{ optional: true }\n\t);\n\n\t/**\n\t *  An instance of the ViewContainerRef\n\t */\n\tprotected readonly viewContainer: ViewContainerRef = inject(ViewContainerRef);\n\n\t/**\n\t *  An instance of the ElementRef\n\t */\n\tprotected readonly elementRef: ElementRef = inject(ElementRef);\n\n\t/**\n\t *  An instance of Renderer2\n\t */\n\tprotected readonly renderer: Renderer2 = inject(Renderer2);\n\n\t/**\n\t *  An instance of the TemplateRef\n\t */\n\tprotected readonly templateRef: TemplateRef<any> = inject(TemplateRef);\n\n\t/**\n\t *  An instance of the ChangeDetectorRef\n\t */\n\tprotected readonly cdRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n\t/**\n\t *  An instance of the DestroyRef\n\t */\n\tprotected readonly destroyRef: DestroyRef = inject(DestroyRef);\n\n\t/**\n\t *  Whether the control has errors\n\t */\n\tprotected hasErrors: WritableSignal<boolean> = signal(false);\n\n\t/**\n\t *  A unique error id for aria association\n\t */\n\tprivate readonly errorId = `ngx-forms-error-${uuid()}`;\n\n\t/**\n\t *  The actual template of the input element\n\t */\n\tprivate template: TemplateRef<any>;\n\n\t/**\n\t * The AbstractControl we wish to listen to when using the directive\n\t */\n\tprivate abstractControl: AbstractControl;\n\n\t/**\n\t * The p element we add to the dom when no component is provided\n\t */\n\tprivate errorsElement: any;\n\n\t/**\n\t * The component to which the error data is added\n\t */\n\tprivate errorComponent: NgxFormsErrorAbstractComponent;\n\n\t/**\n\t * The ref of the component we wish to add error data to\n\t */\n\tprivate componentRef: ComponentRef<NgxFormsErrorAbstractComponent>;\n\n\t/**\n\t * A reference to a control or a string reference to the control\n\t */\n\tpublic readonly control = input<AbstractControl | string>(undefined, {\n\t\talias: 'ngxFormsErrors',\n\t});\n\n\tconstructor() {\n\t\t// Iben: Set the current template ref at constructor time so we actually have the provided template (as done in the *ngIf directive)\n\t\tthis.template = this.templateRef;\n\t}\n\n\tpublic ngAfterViewInit(): void {\n\t\t// Iben: Render the actual input so that it is always visible\n\t\tthis.viewContainer.clear();\n\t\tthis.viewContainer.createEmbeddedView(this.template);\n\n\t\t//Iben: Set a base class to the element\n\t\tconst element: HTMLElement =\n\t\t\tthis.templateRef.elementRef.nativeElement.previousElementSibling;\n\n\t\tif (element) {\n\t\t\tthis.renderer.addClass(element, 'ngx-forms-errors-input');\n\t\t}\n\n\t\t// Iben: If no control was provided, we early exit and log an error\n\t\tconst control = this.control();\n\t\tif (!control) {\n\t\t\tconsole.error('NgxForms: No control was provided to the NgxFormsErrorDirective');\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: If the control is a string, we check the parent to find the actual control.\n\t\t// If not, we use the provided control\n\t\tif (typeof control === 'string') {\n\t\t\tthis.abstractControl = this.formGroupDirective\n\t\t\t\t? this.formGroupDirective.form.get(control)\n\t\t\t\t: this.formNameDirective?.control.get(control);\n\t\t} else {\n\t\t\tthis.abstractControl = control;\n\t\t}\n\n\t\t// Iben: If no control was found, we early exit and log an error\n\t\tif (!this.abstractControl) {\n\t\t\tconsole.error('NgxForms: No control was provided to the NgxFormsErrorDirective');\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Listen to the value changes, status changes and the touched changes of the control\n\t\tcombineLatest([\n\t\t\tthis.abstractControl.valueChanges.pipe(startWith(this.abstractControl.value)),\n\t\t\ttouchedEventListener(this.abstractControl),\n\t\t\tthis.abstractControl.statusChanges.pipe(startWith(this.abstractControl.status)),\n\t\t])\n\t\t\t.pipe(\n\t\t\t\ttap(([, touched]) => {\n\t\t\t\t\t// Iben: Check whether we should show the error based on the provided config\n\t\t\t\t\tthis.hasErrors.set(\n\t\t\t\t\t\tthis.abstractControl.invalid &&\n\t\t\t\t\t\t\t(this.config.showWhen === 'touched'\n\t\t\t\t\t\t\t\t? touched\n\t\t\t\t\t\t\t\t: this.abstractControl.dirty)\n\t\t\t\t\t);\n\n\t\t\t\t\t// Iben: Set the errors class and aria attributes if needed\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tif (this.hasErrors()) {\n\t\t\t\t\t\t\tthis.renderer.addClass(element, 'ngx-forms-errors-invalid');\n\t\t\t\t\t\t\tthis.renderer.setAttribute(element, 'aria-invalid', 'true');\n\n\t\t\t\t\t\t\t// Iben: Add the errorId to the aria-describedby list if it's not present\n\t\t\t\t\t\t\tconst currentDescribedBy = element.getAttribute('aria-describedby') || '';\n\t\t\t\t\t\t\tconst ids = currentDescribedBy.split(' ').map(id => id.trim()).filter(Boolean);\n\t\t\t\t\t\t\tif (!ids.includes(this.errorId)) {\n\t\t\t\t\t\t\t\tids.push(this.errorId);\n\t\t\t\t\t\t\t\tthis.renderer.setAttribute(element, 'aria-describedby', ids.join(' '));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.renderer.removeClass(element, 'ngx-forms-errors-invalid');\n\t\t\t\t\t\t\tthis.renderer.removeAttribute(element, 'aria-invalid');\n\n\t\t\t\t\t\t\t// Iben: Remove the errorId from the aria-describedby list if it is present\n\t\t\t\t\t\t\tconst currentDescribedBy = element.getAttribute('aria-describedby') || '';\n\t\t\t\t\t\t\tconst ids = currentDescribedBy.split(' ').map(id => id.trim()).filter(Boolean);\n\t\t\t\t\t\t\tif (ids.includes(this.errorId)) {\n\t\t\t\t\t\t\t\tconst remainingIds = ids.filter(id => id !== this.errorId);\n\t\t\t\t\t\t\t\tif (remainingIds.length > 0) {\n\t\t\t\t\t\t\t\t\tthis.renderer.setAttribute(element, 'aria-describedby', remainingIds.join(' '));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.renderer.removeAttribute(element, 'aria-describedby');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Show the error based on whether or not a component was provided\n\t\t\t\t\tif (!this.config.component) {\n\t\t\t\t\t\tthis.handleNoComponentFlow(this.hasErrors());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.handleComponentRender(this.hasErrors());\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Detect the changes so this works with (nested) OnPush components\n\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef)\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\t/**\n\t * Renders a provided custom component underneath the input component\n\t *\n\t * @param shouldShow - Whether the error should be shown\n\t */\n\tprivate handleComponentRender(shouldShow: boolean) {\n\t\t// Iben: If the error should not be shown, we check if there's already an error component and destroy it if needed\n\t\tif (!shouldShow) {\n\t\t\tif (this.errorComponent) {\n\t\t\t\tthis.componentRef.destroy();\n\t\t\t\tthis.errorViewContainer?.destroy();\n\t\t\t\tthis.errorViewContainer = undefined;\n\t\t\t\tthis.componentRef = undefined;\n\t\t\t\tthis.errorComponent = undefined;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: If there already is a component, destroy it so it can update correctly\n\t\tif (this.componentRef) {\n\t\t\tthis.componentRef.destroy();\n\t\t\tthis.componentRef = undefined;\n\t\t}\n\n\t\t// Iben: Add the new component to the view\n\t\tthis.componentRef = this.viewContainer.createComponent<NgxFormsErrorAbstractComponent>(\n\t\t\tthis.config.component,\n\t\t\t{\n\t\t\t\tindex: (this.config?.location || 'after') === 'after' ? 1 : 0,\n\t\t\t}\n\t\t);\n\t\tthis.errorComponent = this.componentRef.instance;\n\n\t\t// Iben: Set the error id on the component element for ARIA\n\t\tthis.renderer.setAttribute(this.componentRef.location.nativeElement, 'id', this.errorId);\n\n\t\t// Iben: Set the role to alert for immediate screen reader announcement\n\t\tthis.renderer.setAttribute(this.componentRef.location.nativeElement, 'role', 'alert');\n\n\t\t// Iben: Set the data of the error component\n\t\tconst { errors, errorKeys, data } = this.getErrors(this.abstractControl.errors);\n\n\t\tthis.componentRef.setInput('errors', errors);\n\t\tthis.componentRef.setInput('errorKeys', errorKeys);\n\t\tthis.componentRef.setInput('data', data);\n\t}\n\n\t/**\n\t * Renders a p tag underneath the input component when no custom component was provided\n\t *\n\t * @param shouldShow - Whether the error should be shown\n\t */\n\tprivate handleNoComponentFlow(shouldShow: boolean) {\n\t\t// Iben: We remove the current errors so that we always have a new element to work with\n\t\tif (this.errorsElement) {\n\t\t\tthis.renderer.removeChild(this.elementRef.nativeElement.parentNode, this.errorsElement);\n\n\t\t\tthis.errorsElement = null;\n\t\t}\n\n\t\t// Iben: Early exit in case there's no error to show\n\t\tif (!shouldShow) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Create a new error paragraph\n\t\tthis.errorsElement = this.renderer.createElement('p');\n\t\tthis.renderer.setAttribute(this.errorsElement, 'class', 'ngx-forms-error');\n\t\tthis.renderer.setAttribute(this.errorsElement, 'id', this.errorId);\n\n\t\t// Iben: Set the role to alert for immediate screen reader announcement\n\t\tthis.renderer.setAttribute(this.errorsElement, 'role', 'alert');\n\n\t\t// Iben: Set the errors based on the keys\n\t\tthis.renderer.setProperty(\n\t\t\tthis.errorsElement,\n\t\t\t'innerHTML',\n\t\t\tthis.getErrors(this.abstractControl.errors).errors.join(', ')\n\t\t);\n\n\t\t// Iben: insert the paragraph before or after the input component\n\t\treturn (this.config?.location || 'after') === 'after'\n\t\t\t? this.renderer.insertBefore(\n\t\t\t\t\tthis.elementRef.nativeElement.parentNode,\n\t\t\t\t\tthis.errorsElement,\n\t\t\t\t\tthis.renderer.nextSibling(this.elementRef.nativeElement)\n\t\t\t  )\n\t\t\t: this.renderer.insertBefore(\n\t\t\t\t\tthis.elementRef.nativeElement.parentNode,\n\t\t\t\t\tthis.errorsElement,\n\t\t\t\t\tthis.elementRef.nativeElement.previousSibling\n\t\t\t  );\n\t}\n\n\t/**\n\t * Returns the errors based on the provided settings\n\t *\n\t * @param data - The error data we wish to use\n\t */\n\tprivate getErrors(data: ValidationErrors): {\n\t\terrors: string[];\n\t\tdata: ValidationErrors;\n\t\terrorKeys: string[];\n\t} {\n\t\t// Iben: Early exit in case the errors object is null\n\t\tif (!data) {\n\t\t\treturn {\n\t\t\t\terrors: [],\n\t\t\t\tdata: null,\n\t\t\t\terrorKeys: [],\n\t\t\t};\n\t\t}\n\n\t\t// Iben: If the config is set to all, we always show all errors\n\t\tif (this.config.show === 'all') {\n\t\t\treturn {\n\t\t\t\terrors: Object.keys(data).map((key) => this.config.errors[key]),\n\t\t\t\terrorKeys: Object.keys(data),\n\t\t\t\tdata,\n\t\t\t};\n\t\t}\n\n\t\t// Iben: If no limit is provided, we default to a single error\n\t\tconst limit = this.config.show === undefined ? 1 : this.config.show;\n\n\t\t// Iben: Slice the errors based on the provided limit\n\t\treturn {\n\t\t\terrors: Object.keys(data)\n\t\t\t\t.map((key) => this.config.errors[key])\n\t\t\t\t.slice(0, limit),\n\t\t\terrorKeys: Object.keys(data).slice(0, limit),\n\t\t\tdata,\n\t\t};\n\t}\n}\n","import { Directive } from '@angular/core';\nimport { FormControlDirective } from '@angular/forms';\n\n/**\n * A custom directive used by the NgxDynamicFormComponent, as the base FormControlDirective is not a standalone directive\n */\n@Directive({\n\tstandalone: true,\n})\nexport class NgxDynamicFormDirective extends FormControlDirective {}\n","/**\n * In order to select all accessors in a FormContainer, we need this base class to pass to our ViewChildren.\n *\n * IMPORTANT: This will never be used as an actual functional component\n */\nexport class BaseFormAccessor {}\n","import {\n\tChangeDetectorRef,\n\tDestroyRef,\n\tDirective,\n\tInjector,\n\tInputSignal,\n\tOutputRef,\n\tSignal,\n\tWritableSignal,\n\tinject,\n\tinput,\n\tsignal,\n\tviewChildren,\n} from '@angular/core';\nimport { outputFromObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormControl,\n\tNgControl,\n\tValidationErrors,\n} from '@angular/forms';\nimport {\n\tBehaviorSubject,\n\tObservable,\n\tSubject,\n\tcombineLatest,\n\tfilter,\n\tof,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs';\n\nimport { NgxDynamicFormDirective } from '../../directives';\nimport { FormAccessorControlsEntity, FormStateOptionsEntity } from '../../types';\nimport {\n\thandleFormAccessorControlDisabling,\n\thandleFormAccessorMarkAsDirty,\n\thandleFormAccessorMarkAsPristine,\n\thandleFormAccessorMarkAsTouched,\n\thandleFormAccessorUpdateValueAndValidity,\n\thasErrors,\n} from '../../utils';\nimport { BaseFormAccessor } from '../base-form/base-form.accessor';\n\n@Directive()\nexport abstract class NgxFormsControlValueAccessor<\n\tDataType = unknown,\n\tFormAccessorFormType extends AbstractControl = FormControl,\n\tFormValueType = DataType\n> implements ControlValueAccessor\n{\n\t/**\n\t *  The Injector needed in the constructor\n\t */\n\tprotected readonly injector: Injector = inject(Injector);\n\n\t/**\n\t *  The initial value of the form\n\t */\n\tprotected defaultValue: Partial<FormValueType>;\n\n\t/**\n\t *  The OnDestroyRef reference\n\t */\n\tprotected readonly destroyRef: DestroyRef = inject(DestroyRef);\n\n\t/**\n\t *  The ChangeDetector reference\n\t */\n\tpublic readonly cdRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n\t/**\n\t * A subject to hold the parent control\n\t */\n\tprotected readonly parent: WritableSignal<AbstractControl> = signal<AbstractControl>(undefined);\n\n\t/**\n\t * A reference to the control tied to this control value accessor\n\t */\n\tprotected parentControl: Signal<AbstractControl> = this.parent.asReadonly();\n\n\t/**\n\t * Whether the first setDisable has run\n\t */\n\tprotected initialSetDisableHasRun: boolean = false;\n\n\t/**\n\t * Subject to check whether the form is initialized\n\t */\n\tprotected readonly initializedSubject$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(\n\t\tfalse\n\t);\n\n\t/**\n\t * Whether or not we want to emit a value when we use the disableFields, by default this will emit\n\t *\n\t * @param  keys - Keys we're about to disable\n\t */\n\tprotected emitValueWhenDisableFieldsUsingInput?(\n\t\tkeys: FormAccessorControlsEntity<FormAccessorFormType>[]\n\t): boolean;\n\n\t/**\n\t * A list of all DataFormAccessors en FormAccessors of this component\n\t */\n\tprotected readonly accessors: Signal<BaseFormAccessor> =\n\t\tviewChildren<BaseFormAccessor>(BaseFormAccessor);\n\n\t/**\n\t * An observable that emits whenever the form is initialized\n\t */\n\tpublic initialized$: Observable<boolean> = this.initializedSubject$.asObservable();\n\n\t/**\n\t * Inner form to write to\n\t */\n\tpublic form: FormAccessorFormType;\n\n\t/**\n\t * Keys of the fields we wish to disable.\n\t * By default this will emit a valueChanges, this can be overwritten by the emitValueWhenDisableFieldsUsingInput in the Accessor\n\t *\n\t * @memberof FormAccessor\n\t */\n\tpublic disableFields: InputSignal<FormAccessorControlsEntity<FormAccessorFormType>[]> =\n\t\tinput<FormAccessorControlsEntity<FormAccessorFormType>[]>();\n\n\t/**\n\t * Whether we want to skip the first setDisable (https://github.com/angular/angular/pull/47576).\n\t * By default, this is true\n\t */\n\tpublic readonly skipInitialSetDisable = input<boolean>(true);\n\n\t/**\n\t * Emits to know whether the form has been initialized\n\t */\n\tpublic readonly initializedForm: OutputRef<boolean> = outputFromObservable(\n\t\tthis.initializedSubject$.asObservable()\n\t);\n\n\tconstructor() {\n\t\t// Iben: Use setTimeOut to avoid the circular dependency issue\n\t\tsetTimeout(() => {\n\t\t\ttry {\n\t\t\t\tconst parentControl =\n\t\t\t\t\tthis.injector.get(NgControl) || this.injector.get(NgxDynamicFormDirective);\n\n\t\t\t\t// Iben: If for some reason we can't find the control or the ngControl, early exit and throw an error\n\t\t\t\tif (!parentControl?.control) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'NgxForms: No control was found after initializing. Check if a control was assigned to the FormAccessor.'\n\t\t\t\t\t);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Iben: Set the parent control\n\t\t\t\tthis.parent.set(parentControl.control);\n\n\t\t\t\t// Iben: Grab the control from the parent container\n\t\t\t\tconst control = parentControl.control;\n\n\t\t\t\t// Iben: Setup the markAsTouched flow\n\t\t\t\t// Iben: Keep a reference to the original `markAsTouched` handler.\n\t\t\t\tconst markAsTouched = control.markAsTouched.bind(control);\n\n\t\t\t\t// Iben: Override the `markAsTouched` handler with our own.\n\t\t\t\tcontrol.markAsTouched = (options?: FormStateOptionsEntity) => {\n\t\t\t\t\t// Iben: If the control is already marked as touched, we early exit\n\t\t\t\t\tif (control.touched) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the original `markAsTouchedHandler`.\n\t\t\t\t\tmarkAsTouched(options);\n\n\t\t\t\t\t// Iben: If the onlySelf flag is set to true, we early exit\n\t\t\t\t\tif (options?.onlySelf) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the custom `markAsTouchedHandler`.\n\t\t\t\t\tthis.markAsTouched(options);\n\t\t\t\t};\n\n\t\t\t\t// Iben: Setup the markAsDirty flow\n\t\t\t\t// Iben: Keep a reference to the original `markAsDirty` handler.\n\t\t\t\tconst markAsDirty = control.markAsDirty.bind(control);\n\n\t\t\t\t// Iben: Override the `markAsDirty` handler with our own.\n\t\t\t\tcontrol.markAsDirty = (options?: FormStateOptionsEntity) => {\n\t\t\t\t\t// Iben: If the control is already marked as dirty, we early exit\n\t\t\t\t\tif (control.dirty) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the original `markAsDirtyHandler`.\n\t\t\t\t\tmarkAsDirty(options);\n\n\t\t\t\t\t// Iben: If the onlySelf flag is set to true, we early exit\n\t\t\t\t\tif (options?.onlySelf) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the custom `markAsDirtyHandler`.\n\t\t\t\t\tthis.markAsDirty(options);\n\t\t\t\t};\n\n\t\t\t\t// Iben: Setup the markAsPristine flow\n\t\t\t\t// Iben: Keep a reference to the original `markAsPristine` handler.\n\t\t\t\tconst markAsPristine = control.markAsPristine.bind(control);\n\n\t\t\t\t// Iben: Override the `markAsPristine` handler with our own.\n\t\t\t\tcontrol.markAsPristine = (options?: FormStateOptionsEntity) => {\n\t\t\t\t\t// Iben: If the control is already marked as pristine, we early exit\n\t\t\t\t\tif (control.pristine) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the original `markAsPristineHandler`.\n\t\t\t\t\tmarkAsPristine(options);\n\n\t\t\t\t\t// Iben: If the onlySelf flag is set to true, we early exit\n\t\t\t\t\tif (options?.onlySelf) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Invoke the custom `markAsPristineHandler`.\n\t\t\t\t\tthis.markAsPristine(options);\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'NgxForms: No parent control was found while trying to set up the form accessor.'\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\tcombineLatest([this.initialized$, toObservable(this.disableFields)])\n\t\t\t.pipe(\n\t\t\t\tswitchMap(([, keys]) => {\n\t\t\t\t\t// Iben: Early exit in case the keys are not provided\n\t\t\t\t\tif (!keys) {\n\t\t\t\t\t\treturn of();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Setup a subject to track whether we're still disabling the fields\n\t\t\t\t\tconst disabling = new Subject();\n\n\t\t\t\t\t// Iben: Add the keys to a set for more performant lookup and convert those to a string to not have Typescript issues later down the line\n\t\t\t\t\tconst controlKeys = new Set(keys);\n\n\t\t\t\t\t// Iben: Check if we need to dispatch the disable or enable event\n\t\t\t\t\tconst emitEvent = this.emitValueWhenDisableFieldsUsingInput\n\t\t\t\t\t\t? this.emitValueWhenDisableFieldsUsingInput(keys)\n\t\t\t\t\t\t: true;\n\n\t\t\t\t\t// Iben: Listen to the initialized state of the form\n\t\t\t\t\treturn this.initializedSubject$.pipe(\n\t\t\t\t\t\tfilter(Boolean),\n\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t// TODO: Iben: Remove this setTimeout once we're in a Signal based component\n\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t// Iben: Handle the disabling of the fields\n\t\t\t\t\t\t\t\thandleFormAccessorControlDisabling(\n\t\t\t\t\t\t\t\t\tthis.form,\n\t\t\t\t\t\t\t\t\tcontrolKeys,\n\t\t\t\t\t\t\t\t\temitEvent\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Iben: Set the disabling subject so that we can complete this subscription\n\t\t\t\t\t\t\tdisabling.next(undefined);\n\t\t\t\t\t\t\tdisabling.complete();\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(disabling)\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef)\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\t/**\n\t * Sets up the ControlValueAccessor connectors\n\t */\n\tpublic onTouch: Function = () => {}; // tslint:disable-line:no-empty\n\tpublic onChange: Function = (_: any) => {}; // tslint:disable-line:no-empty\n\n\tpublic registerOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tpublic registerOnTouched(fn: any): void {\n\t\tthis.onTouch = fn;\n\t}\n\n\t/**\n\t * Writes value to the inner form\n\t *\n\t * @param value - Value to patch in the inner form\n\t */\n\tpublic writeValue(value: DataType | undefined | null): void {\n\t\t// Iben: Wait until the form is ready\n\t\tthis.initialized$\n\t\t\t.pipe(\n\t\t\t\tfilter(Boolean),\n\t\t\t\ttake(1),\n\t\t\t\ttap(() => {\n\t\t\t\t\t// Iben: Early exit in case the form was not found\n\t\t\t\t\tif (!this.form) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'NgxForms: No form was found when trying to write a value. This error can occur when overwriting the ngOnInit without invoking super.OnInit().'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Reset the current form without emitEvent to not trigger the valueChanges\n\t\t\t\t\tthis.form.reset(this.defaultValue || undefined, { emitEvent: false });\n\n\t\t\t\t\t// Iben: Patch the current form with the new value without emitEvent to not trigger the valueChanges\n\t\t\t\t\tif (value !== undefined && value !== null) {\n\t\t\t\t\t\tthis.form.patchValue(\n\t\t\t\t\t\t\tthis.onWriteValueMapper ? this.onWriteValueMapper(value) : value,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\temitEvent: false,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Validate the current value\n\t\t\t\t\tthis.validate();\n\n\t\t\t\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\t\t\t\tthis.cdRef.detectChanges();\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef)\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\t/**\n\t * Mark all controls of the form as touched\n\t */\n\tpublic markAsTouched(options: FormStateOptionsEntity = {}): void {\n\t\thandleFormAccessorMarkAsTouched(this.form, (this.accessors() as any) || [], options);\n\n\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Mark all controls of the form as dirty\n\t */\n\tpublic markAsDirty(options: FormStateOptionsEntity = {}): void {\n\t\thandleFormAccessorMarkAsDirty(this.form, (this.accessors() as any) || [], options);\n\n\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Mark all controls of the form as pristine\n\t */\n\tpublic markAsPristine(options: FormStateOptionsEntity = {}): void {\n\t\thandleFormAccessorMarkAsPristine(this.form, (this.accessors() as any) || [], options);\n\n\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Update the value and validity of the provided form\n\t */\n\tpublic updateAllValueAndValidity(options: FormStateOptionsEntity): void {\n\t\thandleFormAccessorUpdateValueAndValidity(\n\t\t\tthis.form,\n\t\t\t(this.accessors() as any) || [],\n\t\t\toptions\n\t\t);\n\n\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Validates the inner form\n\t */\n\tpublic validate(): ValidationErrors | null {\n\t\t// Iben: If the form itself is invalid, we return the invalidForm: true right away\n\t\tif (this.form?.invalid) {\n\t\t\treturn { invalidForm: true };\n\t\t}\n\n\t\t// Iben: In case the form is invalid, we check if the child controls are possibly invalid\n\t\treturn hasErrors(this.form) ? { invalidForm: true } : null;\n\t}\n\n\t/**\n\t * Disables/enables the inner form based on the passed value\n\t *\n\t * @param isDisabled - Whether or not the form should be disabled\n\t */\n\tpublic setDisabledState(isDisabled: boolean) {\n\t\t// Iben: Skip the initial setDisabled, as this messes up our form approach.\n\t\t// https://github.com/angular/angular/pull/47576\n\t\tif (this.skipInitialSetDisable() && !this.initialSetDisableHasRun) {\n\t\t\tthis.initialSetDisableHasRun = true;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (isDisabled) {\n\t\t\tthis.form.disable({ emitEvent: false });\n\t\t} else {\n\t\t\tthis.form.enable({ emitEvent: false });\n\t\t}\n\n\t\t// Iben: Detect changes so the changes are visible in the dom\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Optional method to map the inner form value to an outer form specific format\n\t *\n\t * @param value - Value from the form\n\t */\n\tpublic onChangeMapper?(value: Partial<FormValueType>): DataType;\n\n\t/**\n\t * Optional method to map the outer form value to an inner form specific format\n\t *\n\t * @param value - Value from the form\n\t */\n\tpublic onWriteValueMapper?(value: DataType): FormValueType;\n}\n","import { Directive, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport { tap } from 'rxjs/operators';\n\nimport { NgxFormsControlValueAccessor } from '../custom-control-value-accessor';\n\n@Directive()\nexport abstract class FormAccessor<\n\t\tDataType = unknown,\n\t\tFormAccessorFormType extends AbstractControl = FormControl,\n\t\tFormValueType = DataType\n\t>\n\textends NgxFormsControlValueAccessor<DataType, FormAccessorFormType, FormValueType>\n\timplements OnInit\n{\n\t/**\n\t * Method to set up the inner form\n\t */\n\tabstract initForm(): FormAccessorFormType;\n\n\tpublic ngOnInit(): void {\n\t\t// Iben: Set the inner form\n\t\tthis.form = this.initForm();\n\n\t\t// Iben: Set the default value\n\t\tthis.defaultValue = this.form.getRawValue();\n\n\t\t// Iben: Early exit in case the form was not found\n\t\tif (!this.form) {\n\t\t\tconsole.error(\n\t\t\t\t'NgxForms: No form was found after initializing. Check if the initForm method returns a form.'\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Warn the initialized$ observable that the form has been set up\n\t\tthis.initializedSubject$.next(true);\n\n\t\t// Iben: Listen to the changes and warn the parent form\n\t\tthis.form.valueChanges\n\t\t\t.pipe(\n\t\t\t\ttap<FormValueType>((value) => {\n\t\t\t\t\t// In case there's a mapper we map the value, else we send the form value\n\t\t\t\t\tthis.onChange(this.onChangeMapper ? this.onChangeMapper(value) : value);\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef)\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n}\n","import { Directive, input, InputSignal, OnDestroy, OnInit } from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport { isEqual } from 'lodash';\nimport { Observable, of, Subject } from 'rxjs';\nimport { switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { NgxFormsControlValueAccessor } from '../custom-control-value-accessor';\n\n@Directive()\nexport abstract class DataFormAccessor<\n\t\tConstructionDataType = unknown,\n\t\tDataType = unknown,\n\t\tFormAccessorFormType extends AbstractControl = FormControl,\n\t\tFormValueType = DataType,\n\t>\n\textends NgxFormsControlValueAccessor<DataType, FormAccessorFormType, FormValueType>\n\timplements OnDestroy, OnInit\n{\n\t/**\n\t * Keep a reference to the current data so we don't make a new form if the data itself hasn't changed\n\t */\n\tprotected currentData: ConstructionDataType;\n\n\t/**\n\t * A subject that emits when the form has been destroyed in favor of a new one\n\t */\n\tprotected readonly destroyFormSubject$: Subject<void> = new Subject();\n\n\t/**\n\t * Method to set up the inner form\n\t */\n\tabstract initForm(data: ConstructionDataType): FormAccessorFormType;\n\n\t/**\n\t * The data we wish to use to set up the form\n\t */\n\tpublic readonly data: InputSignal<ConstructionDataType> = input.required();\n\n\t/**\n\t * Whether we want to preserve previously filled in form data when new data is provided. By default, this is false.\n\t */\n\tpublic readonly preserveFormValueOnNewData: InputSignal<boolean> = input(false);\n\n\t/**\n\t * An observable that emits when the input data changes\n\t */\n\tprotected readonly data$: Observable<ConstructionDataType> = toObservable(this.data);\n\n\tpublic ngOnInit(): void {\n\t\tthis.data$\n\t\t\t.pipe(\n\t\t\t\tswitchMap((data) => {\n\t\t\t\t\t// Iben: Get the current data of the form.\n\t\t\t\t\tconst currentFormValue = this.form?.getRawValue();\n\n\t\t\t\t\t// Iben: If we already have current data and the current data matches the new data, we don't make a new form\n\t\t\t\t\tif (this.currentData && isEqual(this.currentData, data)) {\n\t\t\t\t\t\tthis.currentData = data;\n\t\t\t\t\t\treturn of();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.initializedSubject$.next(false);\n\t\t\t\t\tthis.currentData = data;\n\n\t\t\t\t\t// Iben: Emit to the destroy so the previous subscription is cancelled\n\t\t\t\t\tthis.destroyFormSubject$.next();\n\n\t\t\t\t\t// Set the inner form\n\t\t\t\t\tthis.form = this.initForm(data);\n\n\t\t\t\t\t// Iben: If we want to preserver our previous filled in data, we patch this form\n\t\t\t\t\tif (this.preserveFormValueOnNewData && currentFormValue) {\n\t\t\t\t\t\tthis.form.patchValue(currentFormValue);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iben: Set the default value\n\t\t\t\t\tthis.defaultValue = this.form.getRawValue();\n\n\t\t\t\t\t// Iben: Early exit in case the form was not found\n\t\t\t\t\tif (!this.form) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'NgxForms: No form was found after initializing. Check if the initForm method returns a form.'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn of();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Denis: set the initialized property\n\t\t\t\t\tthis.setInitializedWithData(data);\n\n\t\t\t\t\t// Iben: Check if the form is valid depending on the provided value\n\t\t\t\t\tthis.validate();\n\t\t\t\t\tthis.cdRef.detectChanges();\n\n\t\t\t\t\t// Iben: Subscribe to the value changes\n\t\t\t\t\treturn this.form.valueChanges.pipe(\n\t\t\t\t\t\ttap<FormValueType>((value) => {\n\t\t\t\t\t\t\t// In case there's a mapper we map the value, else we send the form value\n\t\t\t\t\t\t\tthis.onChange(this.onChangeMapper ? this.onChangeMapper(value) : value);\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(this.destroyFormSubject$)\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef)\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Iben: Destroy the currently open form\n\t\tthis.destroyFormSubject$.next();\n\t\tthis.destroyFormSubject$.complete();\n\t}\n\n\t/**\n\t * setInitialized\n\t *\n\t * This method sets the initialized property to true when the form is initialized.\n\t * This functionality has been moved to a separate method to enable\n\t * overwriting this method to fit certain use-cases.\n\t *\n\t * @param {ConstructionDateType} data\n\t * @returns void\n\t * @private\n\t */\n\tprotected setInitializedWithData(data: ConstructionDataType): void {\n\t\tthis.initializedSubject$.next(Array.isArray(data) ? data && data.length > 0 : !!data);\n\t}\n}\n","import { Directive, OnDestroy, viewChildren } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { Subject } from 'rxjs';\n\nimport { FormStateOptionsEntity } from '../../types';\nimport {\n\thandleFormAccessorMarkAsDirty,\n\thandleFormAccessorMarkAsTouched,\n\thandleFormAccessorUpdateValueAndValidity,\n} from '../../utils';\nimport { BaseFormAccessor } from '../base-form/base-form.accessor';\n\n@Directive()\nexport class FormAccessorContainer implements OnDestroy {\n\t/**\n\t * A list of all DataFormAccessors en FormAccessors of this component\n\t */\n\treadonly accessors = viewChildren(BaseFormAccessor);\n\n\t/**\n\t * Destroyed state of the component\n\t */\n\tprotected readonly destroyed$ = new Subject();\n\n\t/**\n\t * @deprecated This method should no longer be used, use the markAsDirty on the form itself instead\n\t *\n\t * Marks the form and all the inputs of every subsequent form-accessors as dirty\n\t *\n\t * @param  form - The form used in the component\n\t * @param options - Options passed to the form state changer\n\t */\n\tpublic markAllAsDirty(form: AbstractControl, options: FormStateOptionsEntity = {}): void {\n\t\tthis.handleAccessorsAction(() => {\n\t\t\thandleFormAccessorMarkAsDirty(form, (this.accessors() as any) || [], options);\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated This method should no longer be used, use the markAsTouched on the form itself instead\n\t *\n\t * Marks the form and all the inputs of every subsequent form-accessors as touched\n\t *\n\t * @param  form - The form used in the component\n\t * @param options - Options passed to the form state changer\n\t */\n\tpublic markAllAsTouched(form: AbstractControl, options: FormStateOptionsEntity = {}): void {\n\t\tthis.handleAccessorsAction(() => {\n\t\t\thandleFormAccessorMarkAsTouched(form, (this.accessors() as any) || [], options);\n\t\t});\n\t}\n\n\t/**\n\t * Updates the value and validity of the form and all the inputs of every subsequent form-accessors\n\t *\n\t * @param form - The provided forms\n\t * @param options - Options passed to the updateValueAndValidity\n\t */\n\tpublic updateAllValueAndValidity(\n\t\tform: AbstractControl,\n\t\toptions: FormStateOptionsEntity = {}\n\t): void {\n\t\tthis.handleAccessorsAction(() => {\n\t\t\thandleFormAccessorUpdateValueAndValidity(\n\t\t\t\tform,\n\t\t\t\t(this.accessors() as any) || [],\n\t\t\t\toptions\n\t\t\t);\n\t\t});\n\t}\n\n\t/**\n\t * Handle the destroy state of the component\n\t */\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroyed$.next(undefined);\n\t\tthis.destroyed$.complete();\n\t}\n\n\t/**\n\t * Handle the accessors action of the FormContainer and throw a warning if no accessors are provided\n\t *\n\t * @param  action - The provided action\n\t */\n\tprivate handleAccessorsAction(action: () => void) {\n\t\t// Iben: Throw a warn in case there are no accessors found\n\t\tconst accessors = this.accessors();\n\t\tif (!accessors || accessors.length === 0) {\n\t\t\tconsole.warn(\n\t\t\t\t'NgxForms: No (Data)FormAccessors were found in this component. Check if each (Data)FormAccessor also provides the BaseFormAccessor in its providers array. If this is intentional, this warning can be ignored.'\n\t\t\t);\n\t\t}\n\n\t\t// Iben: Handle the provided action\n\t\taction();\n\t}\n}\n","import { Directive, input } from '@angular/core';\nimport { ValidationErrors } from '@angular/forms';\n\n@Directive()\nexport class NgxFormsErrorAbstractComponent {\n\t/**\n\t * An array of error messages that can be rendered\n\t */\n\tpublic readonly errors = input.required<string[]>();\n\t/**\n\t * An array of error keys that can be rendered\n\t */\n\tpublic readonly errorKeys = input.required<string[]>();\n\t/**\n\t * The error object provided by the control\n\t */\n\tpublic readonly data = input.required<ValidationErrors>();\n}\n","import { Directive, HostListener, OnDestroy } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Directive()\nexport abstract class NgxSaveOnExitComponent implements OnDestroy {\n\t/**\n\t * Handles the unload event of the browser and will warn the user that the application prevented the user from closing the browser\n\t *\n\t * @param event - The unload event from the browser\n\t */\n\t@HostListener('window:beforeunload', ['$event'])\n\thandleUnloadEvent(event: BeforeUnloadEvent) {\n\t\t// Iben: If the component is dirty, we prevent the browser from closing the window or tab\n\t\tif (this.allowBeforeUnloadHandler && this.isDirty()) {\n\t\t\tevent.returnValue = true;\n\t\t}\n\t}\n\n\t/**\n\t * A subject to handle the onDestroy flow\n\t */\n\tprivate readonly destroyedSubject$ = new Subject();\n\n\t/**\n\t * An observable that emits the onDestroy event\n\t */\n\tpublic readonly destroyed$ = this.destroyedSubject$.asObservable();\n\n\t/**\n\t * Whether or not the beforeUnload event should be intercepted or not. By default, this behavior is set to false\n\t * If set to true, closing a tab or the browser will be interrupted and a message will be displayed\n\t */\n\tpublic readonly allowBeforeUnloadHandler: boolean = false;\n\n\t/**\n\t * Return whether or not the component is dirty\n\t */\n\tpublic abstract isDirty(): boolean;\n\n\t/**\n\t * Return whether or not the component is valid\n\t */\n\tpublic abstract isValid(): boolean;\n\n\tngOnDestroy() {\n\t\t// Iben: Emit if the component gets destroyed\n\t\tthis.destroyedSubject$.next(undefined);\n\t\tthis.destroyedSubject$.complete();\n\t}\n}\n","import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nimport { NgxSaveOnExitComponent } from './save-on-exit.component.abstract';\n\nexport abstract class NgxSaveOnExitAbstractService {\n\t/**\n\t * Take action when the component is dirty\n\t */\n\tpublic abstract handleDirtyState: (component: NgxSaveOnExitComponent) => Observable<boolean>;\n\n\t/**\n\t * An optional method that, if implemented, provides the ability to bypass the guard\n\t */\n\tpublic bypassSaveOnExit?: (\n\t\tcurrentRoute: ActivatedRouteSnapshot,\n\t\tnextState: RouterStateSnapshot\n\t) => boolean;\n}\n","import { Directive, input, InputSignal } from '@angular/core';\nimport { AbstractControl, FormControl } from '@angular/forms';\n\nimport { FormAccessor } from '../form/form.accessor';\n\n/**\n * The base component configuration for an input rendered in a NgxDynamicFormComponent\n *\n * @template OptionsType - The type of the options used to render the input\n * @template DataType - The type of the data of the form control\n * @template FormAccessorFormType - The type of form control\n * @template FormValueType - The type of data used inside the form\n */\n@Directive()\nexport abstract class NgxDynamicFormInputComponent<\n\tOptionsType = unknown,\n\tDataType = unknown,\n\tFormAccessorFormType extends AbstractControl = FormControl,\n\tFormValueType = DataType,\n> extends FormAccessor<DataType, FormAccessorFormType, FormValueType> {\n\t/**\n\t * Options to render the input component\n\t */\n\tpublic readonly options: InputSignal<OptionsType> = input();\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanDeactivateFn, RouterStateSnapshot } from '@angular/router';\nimport { Observable, of } from 'rxjs';\n\nimport { NgxSaveOnExitAbstractService, NgxSaveOnExitComponent } from '../../abstracts';\n\n/**\n * Checks whether or not we can navigate away from a page\n *\n * @param {NgxSaveOnExitComponent} component\n * @return {*}  {ObservableBoolean}\n * @memberof SaveOnExitGuard\n */\nexport const NgxSaveOnExitGuard: CanDeactivateFn<NgxSaveOnExitComponent> = (\n\tcomponent: NgxSaveOnExitComponent,\n\tcurrentRoute: ActivatedRouteSnapshot,\n\tcurrentState: RouterStateSnapshot,\n\tnextState: RouterStateSnapshot\n): Observable<boolean> => {\n\t// Iben: Fetch all injectables\n\tconst saveOnExitService: NgxSaveOnExitAbstractService = inject(NgxSaveOnExitAbstractService);\n\n\t// Iben: In case the component is not dirty, we can route without problems\n\tif (!component.isDirty()) {\n\t\treturn of(true);\n\t}\n\n\t// Iben: Check if the service has a bypassSaveOnExit function. If it does, run to see of the current route needs to be bypassed\n\tif (\n\t\tsaveOnExitService.bypassSaveOnExit &&\n\t\tsaveOnExitService.bypassSaveOnExit(currentRoute, nextState)\n\t) {\n\t\treturn of(true);\n\t}\n\n\t// Iben: In case the component is dirty, we will let the SaveOnExitService know so they can take the appropriate action\n\treturn saveOnExitService.handleDirtyState(component);\n};\n","import { Provider } from '@angular/core';\n\nimport { NgxFormsErrorsConfigurationToken } from '../../tokens';\nimport { NgxFormsErrorConfigurationOptions } from '../../types';\n\n/**\n * Provides the necessary configuration for the NgxFormErrorsDirective\n *\n * @param configuration - The configuration for the directive\n */\nexport const provideNgxFormErrorsConfiguration = (\n\tconfiguration: NgxFormsErrorConfigurationOptions\n): Provider => {\n\treturn {\n\t\tprovide: NgxFormsErrorsConfigurationToken,\n\t\tuseValue: configuration,\n\t};\n};\n","import { Provider } from '@angular/core';\n\nimport { NgxDynamicFormConfigurationToken } from '../../tokens';\nimport { NgxDynamicFormConfiguration } from '../../types';\n\n/**\n * Provides the necessary configuration for the NgxDynamicFormComponent\n *\n * @param configuration - The configuration for the component\n */\nexport const provideNgxDynamicFormConfiguration = (\n\tconfiguration: NgxDynamicFormConfiguration\n): Provider => {\n\treturn {\n\t\tprovide: NgxDynamicFormConfigurationToken,\n\t\tuseValue: configuration,\n\t};\n};\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\teffect,\n\tinject,\n\tinput,\n\tinputBinding,\n\tInputSignal,\n\tSignal,\n\tviewChild,\n\tViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { FormAccessor } from '../../abstracts';\nimport { NgxDynamicFormDirective } from '../../directives';\nimport { NgxDynamicFormConfigurationToken } from '../../tokens';\nimport { NgxDynamicFormConfiguration } from '../../types';\nimport { createAccessorProviders } from '../../utils';\n\n/**\n * A dynamic form component that will dynamically render an input component based on the provided key\n *\n * ## Accessibility Guidelines\n * - **Explicit Label Association**: When rendering dynamic input components using `<ngx-dynamic-form>`, developers must ensure that every generated form control is linked to an accessible label via a native `<label>` element with a matching `for` attribute pointing to the input element's `id`. Alternatively, if a visual label is not used, provide a clear and descriptive `aria-label` or `aria-labelledby` attribute on the input element.\n *\n * @export\n * @class NgxDynamicFormComponent\n * @template DataType - The type of the data in the form\n * @template OptionsType - The type of options passed to the rendered component\n */\n@Component({\n\tselector: 'ngx-dynamic-form',\n\ttemplate: `<ng-container #ngxDynamicFormContainer />`,\n\tproviders: [createAccessorProviders(NgxDynamicFormComponent)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxDynamicFormComponent<\n\tDataType = unknown,\n\tOptionsType = unknown,\n> extends FormAccessor<DataType, FormControl<DataType>> {\n\t/**\n\t * An instance of the form configuration\n\t */\n\tprotected readonly dynamicFormConfiguration: NgxDynamicFormConfiguration = inject(\n\t\tNgxDynamicFormConfigurationToken\n  );\n\n\t/**\n\t * An instance of the ViewContainer\n\t */\n\tprotected readonly viewContainerRef: Signal<ViewContainerRef> = viewChild(\n\t\t'ngxDynamicFormContainer',\n\t\t{ read: ViewContainerRef }\n\t);\n\n\t/**\n\t * Options passed to the rendered input component\n\t */\n\tpublic readonly options: InputSignal<OptionsType> = input();\n\n\t/**\n\t * The key of the input that needs to be rendered\n\t */\n\tpublic key: InputSignal<string> = input.required();\n\n\tconstructor() {\n\t\tsuper();\n\n\t\teffect(() => {\n\t\t\t// Iben: If no component was provided for the key, we throw an error and early exit\n\t\t\tif (!this.dynamicFormConfiguration[this.key()]) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`NgxForms: No component was provided for the key \"${this.key()}\". so no dynamic form element was rendered.`\n\t\t\t\t);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Iben: Create the component and add it to the viewContainerRef\n\t\t\tthis.viewContainerRef().createComponent(this.dynamicFormConfiguration[this.key()], {\n\t\t\t\tbindings: [inputBinding('options', () => this.options())],\n\t\t\t\t// Iben: Provide the injector so the CustomControlValueAccessor keeps working\n\t\t\t\tinjector: this.injector,\n\t\t\t\t// Iben: Setup the directive so we can pass the form\n\t\t\t\tdirectives: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: NgxDynamicFormDirective,\n\t\t\t\t\t\tbindings: [inputBinding('formControl', () => this.form)],\n\t\t\t\t\t},\n\t\t\t\t],\n      } );\n\n      // Iben: Detect changes after the component was added\n      this.cdRef.detectChanges();\n\t\t});\n\t}\n\n\toverride initForm(): FormControl<DataType> {\n\t\treturn new FormControl<DataType>(null);\n\t}\n}\n","/*\n * Public API Surface of forms\n */\n\nexport { NgxValidators } from './lib/validators/validators';\nexport { setFormError, clearFormError, isEmptyInputValue } from './lib/validators/utils';\nexport * from './lib/abstracts';\nexport * from './lib/utils';\nexport * from './lib/types';\nexport * from './lib/directives';\nexport * from './lib/tokens';\nexport * from './lib/guards';\nexport * from './lib/providers';\nexport * from './lib/components';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EMPTY_SET","uuid","tap","switchMap","takeUntil"],"mappings":";;;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG,CAAC,KAAU,KAAa;;IAExD,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AAC3C;;ACAA;;;;;AAKG;MACU,cAAc,GAAG,CAAC,OAAwB,EAAE,KAAa,KAAU;;AAE/E,IAAA,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AAEzD,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC5C;IACD;;AAGA,IAAA,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;AAC3C,QAAA,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;QAEvB;IACD;;AAGA,IAAA,OAAO,CAAC,SAAS,CAChB,KAAK,CAAC;QACL,GAAG,OAAO,CAAC,MAAM;QACjB,CAAC,KAAK,GAAG,SAAS;AAClB,KAAA,CAAC,CACF;AACF;AAEA;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,OAAwB,EAAE,KAAa,EAAE,KAAA,GA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