@forge-form/angular 1.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/LICENSE +21 -0
- package/README.md +210 -0
- package/fesm2022/forge-form-angular.mjs +853 -0
- package/fesm2022/forge-form-angular.mjs.map +1 -0
- package/package.json +46 -0
- package/styles/default.scss +2 -0
- package/styles/index.scss +1 -0
- package/styles/layout.scss +13 -0
- package/styles/themes/default.scss +71 -0
- package/types/forge-form-angular.d.ts +229 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forge-form-angular.mjs","sources":["../../../projects/forge-form-angular/src/lib/engine/renderer-template-registry/renderer-template.registry.ts","../../../projects/forge-form-angular/src/lib/schema/form-options-token.ts","../../../projects/forge-form-angular/src/lib/schema/form-options.model.ts","../../../projects/forge-form-angular/src/lib/utils/debouncedSignal.ts","../../../projects/forge-form-angular/src/lib/schema/update-on.model.ts","../../../projects/forge-form-angular/src/lib/engine/validators/validator-schema.model.ts","../../../projects/forge-form-angular/src/lib/engine/error-messages/error-messages.registry.ts","../../../projects/forge-form-angular/src/lib/engine/error-messages/error-messages.service.ts","../../../projects/forge-form-angular/src/lib/engine/error-renderer/error-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/error-renderer/error-renderer.component.html","../../../projects/forge-form-angular/src/lib/engine/hint-messages/hint-messages.service.ts","../../../projects/forge-form-angular/src/lib/engine/hint-renderer/hint-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/hint-renderer/hint-renderer.component.html","../../../projects/forge-form-angular/src/lib/services/form-builder.service.ts","../../../projects/forge-form-angular/src/lib/schema/visibility.model.ts","../../../projects/forge-form-angular/src/lib/engine/form-renderer/form.service.ts","../../../projects/forge-form-angular/src/lib/engine/form-field/form-field.component.ts","../../../projects/forge-form-angular/src/lib/engine/form-field/form-field.component.html","../../../projects/forge-form-angular/src/lib/engine/form-field-renderers/text-field-renderer/text-field-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/form-field-renderers/number-field-renderer/number-field-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/form-field-renderers/checkbox-field-renderer/checkbox-field-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/form-field-renderers/select-field-renderer/select-field-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/group-renderer/group-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/group-renderer/group-renderer.component.html","../../../projects/forge-form-angular/src/lib/engine/form-renderer/form-renderer.component.ts","../../../projects/forge-form-angular/src/lib/engine/form-renderer/form-renderer.component.html","../../../projects/forge-form-angular/src/lib/engine/form-field/form-field-context.component.ts","../../../projects/forge-form-angular/src/lib/engine/validators/validator-helpers.ts","../../../projects/forge-form-angular/src/lib/engine/hint-messages/hint-messages.model.ts","../../../projects/forge-form-angular/src/public-api.ts","../../../projects/forge-form-angular/src/forge-form-angular.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken, Type } from '@angular/core';\r\nimport { FieldRenderer } from '../../schema/form-control.model';\r\n\r\nexport interface RendererDef {\r\n type: string;\r\n component: Type<FieldRenderer>;\r\n}\r\n\r\nexport const RENDERERS = new InjectionToken<RendererDef[]>('RENDERERS');\r\n\r\n@Injectable()\r\nexport class RendererRegistry {\r\n private map = new Map<string, Type<FieldRenderer>>();\r\n\r\n // eslint-disable-next-line @angular-eslint/prefer-inject\r\n constructor(@Inject(RENDERERS) renderers: RendererDef[][] = []) {\r\n renderers.flat().forEach((r) => {\r\n this.map.set(r.type, r.component);\r\n });\r\n }\r\n\r\n get(type: string): Type<FieldRenderer> {\r\n const cmp = this.map.get(type);\r\n if (!cmp) {\r\n throw new Error(`No renderer for type: ${type}`);\r\n }\r\n return cmp;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { FormOptions } from './form-options.model';\r\n\r\nexport const FORM_OPTIONS = new InjectionToken<FormOptions>('FORM_OPTIONS');\r\n","export const ORIENTATION_OPTIONS = {\r\n row: 'row',\r\n column: 'column',\r\n} as const;\r\nexport type OrientationOption =\r\n (typeof ORIENTATION_OPTIONS)[keyof typeof ORIENTATION_OPTIONS];\r\n\r\nexport const THEMES = {\r\n none: 'none',\r\n default: 'default',\r\n} as const;\r\nexport type ThemeOption = (typeof THEMES)[keyof typeof THEMES];\r\n\r\ninterface BaseFormOptions {\r\n orientation?: OrientationOption;\r\n labelOrientation?: OrientationOption;\r\n}\r\n\r\nexport interface FormOptions extends BaseFormOptions {\r\n theme?: ThemeOption;\r\n}\r\n\r\nexport type ElementFormOptions = BaseFormOptions;\r\n\r\nexport interface FormFieldOptions extends BaseFormOptions {\r\n width?: number | string;\r\n}\r\n","import { DestroyRef } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { debounceTime, distinctUntilChanged, Observable } from 'rxjs';\r\n\r\nexport const debouncedValueChanges = <T>(\r\n valueChanges: Observable<T>,\r\n time = 0,\r\n destroyRef: DestroyRef,\r\n) =>\r\n valueChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntilDestroyed(destroyRef),\r\n debounceTime(time),\r\n );\r\n","export const UPDATE_ON = {\r\n change: 'change',\r\n blur: 'blur',\r\n submit: 'submit',\r\n} as const;\r\nexport type UpdateOn = (typeof UPDATE_ON)[keyof typeof UPDATE_ON];\r\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\r\nimport { ErrorMessageContent } from '../error-messages/error-messages.model';\r\n\r\nexport type ValidatorSchema =\r\n | RequiredValidatorSchema\r\n | MinLengthValidatorSchema\r\n | MaxLengthValidatorSchema\r\n | MinValidatorSchema\r\n | MaxValidatorSchema\r\n | CustomValidatorSchema;\r\n\r\nexport const VALIDATOR_TYPES = {\r\n required: 'required',\r\n minlength: 'minlength',\r\n maxlength: 'maxlength',\r\n min: 'min',\r\n max: 'max',\r\n custom: 'custom',\r\n} as const;\r\nexport type ValidatorType =\r\n (typeof VALIDATOR_TYPES)[keyof typeof VALIDATOR_TYPES];\r\n\r\nexport interface BaseValidatorSchema {\r\n type: ValidatorType;\r\n errorMessage?: ErrorMessageContent;\r\n}\r\n\r\nexport interface RequiredValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.required;\r\n}\r\n\r\nexport interface MinLengthValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.minlength;\r\n value: number;\r\n}\r\n\r\nexport interface MaxLengthValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.maxlength;\r\n value: number;\r\n}\r\n\r\nexport interface MinValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.min;\r\n value: number;\r\n}\r\n\r\nexport interface MaxValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.max;\r\n value: number;\r\n}\r\n\r\nexport interface CustomValidatorSchema extends BaseValidatorSchema {\r\n type: typeof VALIDATOR_TYPES.custom;\r\n key: string;\r\n fn: ValidatorFunction;\r\n}\r\n\r\nexport type ValidatorFunction = (\r\n control: AbstractControl,\r\n) => ValidationErrors | null;\r\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\r\nimport {\r\n VALIDATOR_TYPES,\r\n ValidatorType,\r\n} from '../validators/validator-schema.model';\r\nimport { ErrorMessage, ErrorMessageContent } from './error-messages.model';\r\n\r\nexport const ERROR_MESSAGES = new InjectionToken<ErrorMessage[]>(\r\n 'ERROR_MESSAGES',\r\n);\r\n\r\nexport const DEFAULT_ERROR_FALLBACK = new InjectionToken<string>(\r\n 'DEFAULT_ERROR_FALLBACK',\r\n);\r\n\r\nexport const DEFAULT_ERROR_MESSAGES: ErrorMessage[] = [\r\n {\r\n type: VALIDATOR_TYPES.required,\r\n message: () => 'This field is required',\r\n },\r\n {\r\n type: VALIDATOR_TYPES.minlength,\r\n message: (err) => `Minimum length is ${err['requiredLength']}`,\r\n },\r\n {\r\n type: VALIDATOR_TYPES.maxlength,\r\n message: (err) => `Maximum length is ${err['requiredLength']}`,\r\n },\r\n {\r\n type: VALIDATOR_TYPES.min,\r\n message: (err) => `Minimum value is ${err['min']}`,\r\n },\r\n {\r\n type: VALIDATOR_TYPES.max,\r\n message: (err) => `Maximum value is ${err['max']}`,\r\n },\r\n];\r\n\r\n@Injectable()\r\nexport class ErrorMessageRegistry {\r\n private map = new Map<ValidatorType, ErrorMessageContent>();\r\n\r\n // eslint-disable-next-line @angular-eslint/prefer-inject\r\n constructor(@Inject(ERROR_MESSAGES) defs: ErrorMessage[][] = []) {\r\n defs.flat().forEach((def) => {\r\n this.map.set(def.type, def.message);\r\n });\r\n }\r\n\r\n get(type: ValidatorType): ErrorMessageContent | null {\r\n return this.map.get(type) ?? null;\r\n }\r\n}\r\n","import { inject, Injectable, Type } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport {\r\n CustomValidatorSchema,\r\n VALIDATOR_TYPES,\r\n ValidatorSchema,\r\n} from '../validators/validator-schema.model';\r\nimport {\r\n DEFAULT_ERROR_FALLBACK,\r\n ErrorMessageRegistry,\r\n} from './error-messages.registry';\r\nimport { ErrorMessageContent } from './error-messages.model';\r\nimport { ValidationError } from '@angular/forms/signals';\r\n\r\nexport type ResolvedError =\r\n | { type: 'text'; message: string }\r\n | {\r\n type: 'component';\r\n component: Type<unknown>;\r\n inputs?: Record<string, unknown>;\r\n };\r\n\r\n@Injectable()\r\nexport class ErrorMessageService {\r\n private readonly registry = inject(ErrorMessageRegistry);\r\n private readonly defaultFallback = inject(DEFAULT_ERROR_FALLBACK);\r\n\r\n getErrors(\r\n control: AbstractControl,\r\n validators: ValidatorSchema[],\r\n ): ResolvedError[] {\r\n if (!control.errors) return [];\r\n\r\n return Object.entries(control.errors).map(([errorKey, errorValue]) => {\r\n const validatorSchema = this.getValidatorSchema(errorKey, validators);\r\n\r\n const content =\r\n validatorSchema?.errorMessage ??\r\n this.registry.get(errorKey as ValidatorSchema['type']);\r\n\r\n if (!content) {\r\n return { type: 'text', message: this.defaultFallback };\r\n }\r\n\r\n return this.resolveContent(content, errorValue);\r\n });\r\n }\r\n\r\n private getValidatorSchema(\r\n errorKey: ValidatorSchema['type'] | CustomValidatorSchema['key'],\r\n validators: ValidatorSchema[],\r\n ): ValidatorSchema | undefined {\r\n return validators.find((validator) =>\r\n validator.type !== VALIDATOR_TYPES.custom\r\n ? validator.type === errorKey\r\n : validator.key === errorKey,\r\n );\r\n }\r\n\r\n private resolveContent(\r\n content: ErrorMessageContent,\r\n errorValue: ValidationError,\r\n ): ResolvedError {\r\n if (typeof content === 'string') {\r\n return { type: 'text', message: content };\r\n }\r\n\r\n if (typeof content === 'function') {\r\n return { type: 'text', message: content(errorValue) };\r\n }\r\n\r\n return {\r\n type: 'component',\r\n component: content.component,\r\n inputs: content.inputs?.(errorValue),\r\n };\r\n }\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n input,\r\n inject,\r\n OnInit,\r\n DestroyRef,\r\n signal,\r\n computed,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n ReactiveFormsModule,\r\n ValidationErrors,\r\n} from '@angular/forms';\r\nimport { ControlSchema } from '../../schema/form-control.model';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { distinctUntilChanged } from 'rxjs';\r\nimport { ErrorMessageService } from '../error-messages/error-messages.service';\r\nimport { ErrorMessageRegistry } from '../error-messages/error-messages.registry';\r\nimport { NgComponentOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'forge-form-error-renderer',\r\n templateUrl: './error-renderer.component.html',\r\n imports: [ReactiveFormsModule, NgComponentOutlet],\r\n providers: [ErrorMessageService, ErrorMessageRegistry],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class ErrorRendererComponent implements OnInit {\r\n control = input.required<AbstractControl>();\r\n controlSchema = input.required<ControlSchema>();\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly errorMessageService = inject(ErrorMessageService);\r\n\r\n controlErrors = signal<ValidationErrors | null>(null);\r\n resolvedErrors = computed(() => {\r\n const errors = this.controlErrors();\r\n\r\n return !!errors && !!this.controlSchema().validators\r\n ? this.errorMessageService.getErrors(\r\n this.control(),\r\n this.controlSchema().validators!,\r\n )\r\n : null;\r\n });\r\n\r\n ngOnInit(): void {\r\n this.control()\r\n .statusChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe(() => this.controlErrors.set(this.control().errors));\r\n }\r\n}\r\n","@for (resolvedError of resolvedErrors(); track resolvedError) {\r\n @if (resolvedError.type === 'text') {\r\n <span class=\"forge-form-error\" data-test=\"error-text\">\r\n {{ resolvedError.message }}\r\n </span>\r\n }\r\n\r\n @if (resolvedError.type === 'component') {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n resolvedError.component;\r\n inputs: {\r\n ...resolvedError.inputs,\r\n }\r\n \" />\r\n }\r\n}\r\n","import { Injectable, Type } from '@angular/core';\r\nimport { HintMessage } from './hint-messages.model';\r\n\r\nexport type ResolvedHint =\r\n | { type: 'text'; message: string }\r\n | {\r\n type: 'component';\r\n component: Type<unknown>;\r\n inputs?: Record<string, unknown>;\r\n };\r\n\r\n@Injectable()\r\nexport class HintMessageService {\r\n getHint(hint: HintMessage | undefined): ResolvedHint | undefined {\r\n if (!hint) return undefined;\r\n\r\n return hint instanceof Object && 'component' in hint\r\n ? {\r\n type: 'component',\r\n component: hint.component,\r\n inputs: hint.inputs,\r\n }\r\n : { type: 'text', message: hint };\r\n }\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n input,\r\n inject,\r\n OnInit,\r\n DestroyRef,\r\n signal,\r\n computed,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n ReactiveFormsModule,\r\n ValidationErrors,\r\n} from '@angular/forms';\r\nimport { ControlSchema } from '../../schema/form-control.model';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { distinctUntilChanged } from 'rxjs';\r\nimport { NgComponentOutlet } from '@angular/common';\r\nimport { HintMessageService } from '../hint-messages/hint-messages.service';\r\n\r\n@Component({\r\n selector: 'forge-form-hint-renderer',\r\n templateUrl: './hint-renderer.component.html',\r\n imports: [ReactiveFormsModule, NgComponentOutlet],\r\n providers: [HintMessageService],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class HintRendererComponent implements OnInit {\r\n control = input.required<AbstractControl>();\r\n controlSchema = input.required<ControlSchema>();\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly hintMessageService = inject(HintMessageService);\r\n\r\n controlErrors = signal<ValidationErrors | null>(null);\r\n controlValue = signal<unknown>(null);\r\n resolvedHint = computed(() => {\r\n const errors = this.controlErrors();\r\n\r\n return !errors && !!this.controlSchema().hint\r\n ? this.hintMessageService.getHint(this.controlSchema().hint)\r\n : null;\r\n });\r\n\r\n mergedInputs = computed(() => {\r\n const hint = this.resolvedHint();\r\n\r\n if (!hint || hint.type !== 'component') {\r\n return {};\r\n }\r\n\r\n return {\r\n control: this.control(),\r\n controlValue: this.controlValue(),\r\n controlErrors: this.controlErrors(),\r\n controlSchema: this.controlSchema(),\r\n ...hint.inputs,\r\n };\r\n });\r\n\r\n ngOnInit(): void {\r\n this.controlValue.set(this.control().value);\r\n\r\n this.control()\r\n .valueChanges.pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe((value) => {\r\n this.controlValue.set(value);\r\n });\r\n\r\n this.control()\r\n .statusChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe(() => this.controlErrors.set(this.control().errors));\r\n }\r\n}\r\n","@if (resolvedHint(); as hint) {\r\n @if (hint.type === 'text') {\r\n <span class=\"forge-form-hint\" data-test=\"hint-text\">\r\n {{ hint.message }}\r\n </span>\r\n }\r\n\r\n @if (hint.type === 'component') {\r\n <ng-container *ngComponentOutlet=\"hint.component; inputs: mergedInputs()\" />\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FormSchema, GroupFieldSchema } from '../schema/form-schema.model';\r\nimport {\r\n FormControl,\r\n FormGroup,\r\n Validators,\r\n ValidatorFn,\r\n} from '@angular/forms';\r\nimport { ControlSchema } from '../schema/form-control.model';\r\nimport {\r\n VALIDATOR_TYPES,\r\n ValidatorSchema,\r\n} from '../engine/validators/validator-schema.model';\r\n\r\n@Injectable()\r\nexport class FormBuilderService {\r\n buildForm(schema: FormSchema): FormGroup {\r\n const controls: Record<string, FormControl> = {};\r\n\r\n const collectControls = (node: FormSchema | GroupFieldSchema) => {\r\n for (const item of node.controls) {\r\n if (this.isGroupFieldSchema(item)) {\r\n collectControls(item);\r\n } else {\r\n controls[item.controlName] = new FormControl(\r\n item.initialValue ?? null,\r\n {\r\n updateOn: item.updateOn ?? schema.updateOn,\r\n validators: this.mapSchemaValidators(item.validators),\r\n },\r\n );\r\n }\r\n }\r\n };\r\n\r\n collectControls(schema);\r\n return new FormGroup(controls, { updateOn: schema.updateOn });\r\n }\r\n\r\n private mapSchemaValidators(\r\n validators?: ValidatorSchema[],\r\n ): ValidatorFn[] | null {\r\n if (!validators?.length) {\r\n return null;\r\n }\r\n\r\n return validators.map((validator) => {\r\n switch (validator.type) {\r\n case VALIDATOR_TYPES.required:\r\n return Validators.required;\r\n case VALIDATOR_TYPES.minlength:\r\n return Validators.minLength(validator.value);\r\n case VALIDATOR_TYPES.maxlength:\r\n return Validators.maxLength(validator.value);\r\n case VALIDATOR_TYPES.min:\r\n return Validators.min(validator.value);\r\n case VALIDATOR_TYPES.max:\r\n return Validators.max(validator.value);\r\n case VALIDATOR_TYPES.custom:\r\n return validator.fn;\r\n default:\r\n return () => null;\r\n }\r\n });\r\n }\r\n\r\n private isGroupFieldSchema(\r\n obj: GroupFieldSchema | ControlSchema,\r\n ): obj is GroupFieldSchema {\r\n return 'controls' in obj;\r\n }\r\n}\r\n","import { AbstractControl, FormGroup } from '@angular/forms';\r\n\r\nexport interface VisibilitySchema {\r\n fn: VisibilityFunction;\r\n behavior: VisibilityBehavior;\r\n clearOnHide?: boolean;\r\n}\r\n\r\nexport type VisibilityFunction = (control: VisibilityContext) => boolean;\r\n\r\nexport const VISIBILITY_BEHAVIORS = {\r\n hide: 'hide',\r\n disable: 'disable',\r\n} as const;\r\nexport type VisibilityBehavior =\r\n (typeof VISIBILITY_BEHAVIORS)[keyof typeof VISIBILITY_BEHAVIORS];\r\n\r\nexport interface VisibilityContext {\r\n value: unknown;\r\n form: FormGroup;\r\n control: AbstractControl;\r\n}\r\n","import { DestroyRef, inject, Injectable, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { distinctUntilChanged, Subscription } from 'rxjs';\r\nimport {\r\n BaseControlSchema,\r\n ControlSchema,\r\n} from '../../schema/form-control.model';\r\nimport { FormSchema } from '../../schema/form-schema.model';\r\nimport { FormBuilderService } from '../../services/form-builder.service';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { VISIBILITY_BEHAVIORS } from '../../schema/visibility.model';\r\n\r\n@Injectable()\r\nexport class FormService<TModel> {\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly formBuilder = inject(FormBuilderService);\r\n\r\n form = signal<FormGroup | null>(null);\r\n value = signal<TModel | null>(null);\r\n\r\n private disabledByVisibility = new Set<string>();\r\n private valueChangesSubscription?: Subscription;\r\n\r\n init(formSchema: FormSchema): void {\r\n if (!formSchema) {\r\n return;\r\n }\r\n\r\n this.valueChangesSubscription?.unsubscribe();\r\n\r\n const form = this.formBuilder.buildForm(formSchema);\r\n this.form.set(form);\r\n\r\n this.valueChangesSubscription = this.form()!\r\n .valueChanges.pipe(\r\n distinctUntilChanged(),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe(() => this.value.set(this.form()!.value));\r\n }\r\n\r\n applyVisibility(\r\n controlSchema: ControlSchema,\r\n visible: boolean,\r\n clearOnHide: boolean,\r\n ): void {\r\n const visibilitySchema = controlSchema.visibility;\r\n\r\n if (!visibilitySchema) {\r\n return;\r\n }\r\n\r\n if (visibilitySchema.behavior === VISIBILITY_BEHAVIORS.disable) {\r\n if (visible) {\r\n this.disableControlByVisibility(controlSchema.controlName, clearOnHide);\r\n } else {\r\n this.enableControlByVisibility(controlSchema.controlName);\r\n }\r\n }\r\n }\r\n\r\n private getControl(controlName: BaseControlSchema['controlName']) {\r\n if (!this.form()) {\r\n console.error(\"Couldn't get control. Form is not initialized!\");\r\n return null;\r\n }\r\n\r\n const control = this.form()!.get(controlName);\r\n\r\n if (!control) {\r\n console.error(\r\n `Couldn't get control. Control with name \"${controlName}\" not found!`,\r\n );\r\n return null;\r\n }\r\n return control;\r\n }\r\n\r\n private disableControlByVisibility(\r\n controlName: BaseControlSchema['controlName'],\r\n clearOnHide?: boolean,\r\n ): void {\r\n const control = this.getControl(controlName);\r\n if (!control) return;\r\n\r\n if (clearOnHide && !this.disabledByVisibility.has(controlName)) {\r\n control.reset(null, { emitEvent: false });\r\n }\r\n\r\n if (control.enabled) {\r\n control.disable({ emitEvent: false });\r\n this.disabledByVisibility.add(controlName);\r\n }\r\n }\r\n\r\n private enableControlByVisibility(\r\n controlName: BaseControlSchema['controlName'],\r\n ): void {\r\n const control = this.getControl(controlName);\r\n if (!control) return;\r\n\r\n if (this.disabledByVisibility.has(controlName)) {\r\n control.enable({ emitEvent: false });\r\n this.disabledByVisibility.delete(controlName);\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n input,\r\n inject,\r\n computed,\r\n OnInit,\r\n signal,\r\n DestroyRef,\r\n effect,\r\n} from '@angular/core';\r\nimport { NgComponentOutlet } from '@angular/common';\r\nimport { AbstractControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ControlSchema } from '../../schema/form-control.model';\r\nimport { RendererRegistry } from '../renderer-template-registry/renderer-template.registry';\r\nimport { FORM_OPTIONS } from '../../schema/form-options-token';\r\nimport { ORIENTATION_OPTIONS } from '../../schema/form-options.model';\r\nimport { debouncedValueChanges } from '../../utils/debouncedSignal';\r\nimport { UPDATE_ON } from '../../schema/update-on.model';\r\nimport { ErrorRendererComponent } from '../error-renderer/error-renderer.component';\r\nimport { HintRendererComponent } from '../hint-renderer/hint-renderer.component';\r\nimport { FormService } from '../form-renderer/form.service';\r\nimport { VISIBILITY_BEHAVIORS } from '../../schema/visibility.model';\r\n\r\n@Component({\r\n selector: 'forge-form-field',\r\n templateUrl: './form-field.component.html',\r\n imports: [\r\n ReactiveFormsModule,\r\n NgComponentOutlet,\r\n ErrorRendererComponent,\r\n HintRendererComponent,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormFieldComponent<TModel> implements OnInit {\r\n readonly control = input.required<AbstractControl>();\r\n readonly controlSchema = input.required<ControlSchema>();\r\n\r\n readonly VALUE_CHANGE_DELAY = 300;\r\n private readonly registry = inject(RendererRegistry);\r\n private readonly formOptions = inject(FORM_OPTIONS, { optional: true });\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly formService = inject(FormService<TModel>);\r\n\r\n private wasVisible = true;\r\n\r\n readonly formSignal = this.formService.form;\r\n\r\n componentType = computed(() => this.registry.get(this.controlSchema().type));\r\n\r\n labelOrientation = computed(\r\n () =>\r\n this.controlSchema().options?.labelOrientation ??\r\n this.formOptions?.labelOrientation ??\r\n ORIENTATION_OPTIONS.column,\r\n );\r\n\r\n valueChanges = signal(null);\r\n\r\n shouldApplyDelay = computed(\r\n () =>\r\n this.controlSchema().updateOn === UPDATE_ON.change &&\r\n this.controlSchema().type !== 'checkbox',\r\n );\r\n\r\n visibilityResolved = computed(() => {\r\n const visibilitySchema = this.controlSchema().visibility;\r\n const formValue = this.formService.value();\r\n const visible = visibilitySchema?.fn({\r\n value: formValue,\r\n form: this.formSignal()!,\r\n control: this.control(),\r\n });\r\n\r\n return visibilitySchema ? visible : true;\r\n });\r\n\r\n showControl = computed(() => {\r\n const visibilitySchema = this.controlSchema().visibility;\r\n\r\n return (\r\n (!this.visibilityResolved() &&\r\n visibilitySchema?.behavior === VISIBILITY_BEHAVIORS.hide) ||\r\n !visibilitySchema ||\r\n visibilitySchema?.behavior !== VISIBILITY_BEHAVIORS.hide\r\n );\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n const visibilitySchema = this.controlSchema().visibility;\r\n const visible = !!this.visibilityResolved();\r\n const becameHidden = this.wasVisible && !visible;\r\n\r\n if (!visibilitySchema) {\r\n return;\r\n }\r\n\r\n this.formService.applyVisibility(\r\n this.controlSchema(),\r\n visible,\r\n becameHidden && !!visibilitySchema.clearOnHide,\r\n );\r\n\r\n this.wasVisible = !!visible;\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n debouncedValueChanges(\r\n this.control().valueChanges,\r\n this.shouldApplyDelay() ? this.VALUE_CHANGE_DELAY : 0,\r\n this.destroyRef,\r\n ).subscribe((value) => this.valueChanges.set(value));\r\n }\r\n}\r\n","@if (showControl()) {\r\n <div\r\n data-test=\"forge-form-field-container\"\r\n [class]=\"\r\n 'forge-form-field-container forge-form-field-container--' +\r\n labelOrientation()\r\n \"\r\n [style.width]=\"controlSchema().options?.width || 'auto'\">\r\n @if (controlSchema().label) {\r\n <span class=\"forge-form-field-label\" data-test=\"forge-form-field-label\">\r\n {{ controlSchema().label }}\r\n </span>\r\n }\r\n\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n componentType();\r\n inputs: {\r\n control: control(),\r\n controlSchema: controlSchema(),\r\n }\r\n \" />\r\n\r\n <forge-form-hint-renderer\r\n [control]=\"control()\"\r\n [controlSchema]=\"controlSchema()\" />\r\n\r\n <forge-form-error-renderer\r\n [control]=\"control()\"\r\n [controlSchema]=\"controlSchema()\" />\r\n </div>\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n FieldRenderer,\r\n TextControlSchema,\r\n} from '../../../schema/form-control.model';\r\n\r\n@Component({\r\n selector: 'forge-form-text-renderer',\r\n template: `\r\n <input\r\n class=\"forge-form-input\"\r\n data-test=\"text-input\"\r\n [attr.id]=\"controlSchema.controlName\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"controlSchema.placeholder || controlSchema.label\" />\r\n `,\r\n standalone: true,\r\n imports: [ReactiveFormsModule],\r\n})\r\nexport class TextRendererComponent implements FieldRenderer<TextControlSchema> {\r\n @Input() control!: FormControl;\r\n @Input() controlSchema!: TextControlSchema;\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n FieldRenderer,\r\n NumberControlSchema,\r\n} from '../../../schema/form-control.model';\r\n\r\n@Component({\r\n selector: 'forge-form-number-renderer',\r\n template: `\r\n <input\r\n class=\"forge-form-input\"\r\n data-test=\"number-input\"\r\n type=\"number\"\r\n [attr.id]=\"controlSchema.controlName\"\r\n [formControl]=\"control\"\r\n [attr.min]=\"controlSchema.min\"\r\n [attr.max]=\"controlSchema.max\"\r\n [placeholder]=\"controlSchema.placeholder || controlSchema.label\" />\r\n `,\r\n standalone: true,\r\n imports: [ReactiveFormsModule],\r\n})\r\nexport class NumberRendererComponent implements FieldRenderer<NumberControlSchema> {\r\n @Input() control!: FormControl;\r\n @Input() controlSchema!: NumberControlSchema;\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n FieldRenderer,\r\n CheckboxControlSchema,\r\n} from '../../../schema/form-control.model';\r\n\r\n@Component({\r\n selector: 'forge-form-checkbox-renderer',\r\n template: `\r\n <input\r\n class=\"forge-form-checkbox\"\r\n data-test=\"checkbox-input\"\r\n type=\"checkbox\"\r\n [attr.id]=\"controlSchema.controlName\"\r\n [formControl]=\"control\" />\r\n `,\r\n standalone: true,\r\n imports: [ReactiveFormsModule],\r\n})\r\nexport class CheckboxRendererComponent implements FieldRenderer<CheckboxControlSchema> {\r\n @Input() control!: FormControl;\r\n @Input() controlSchema!: CheckboxControlSchema;\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n FieldRenderer,\r\n SelectControlSchema,\r\n} from '../../../schema/form-control.model';\r\n\r\n@Component({\r\n selector: 'forge-form-select-renderer',\r\n template: `\r\n <select\r\n class=\"forge-form-select\"\r\n data-test=\"select-input\"\r\n [attr.id]=\"controlSchema.controlName\"\r\n [formControl]=\"control\">\r\n @if (controlSchema.placeholder || controlSchema.label) {\r\n <option data-test=\"select-placeholder\" [ngValue]=\"null\" disabled>\r\n {{ controlSchema.placeholder || controlSchema.label }}\r\n </option>\r\n }\r\n\r\n @for (option of controlSchema.items; track option.value) {\r\n <option data-test=\"select-option\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </option>\r\n }\r\n </select>\r\n `,\r\n standalone: true,\r\n imports: [ReactiveFormsModule],\r\n})\r\nexport class SelectRendererComponent implements FieldRenderer<SelectControlSchema> {\r\n @Input() control!: FormControl;\r\n @Input() controlSchema!: SelectControlSchema;\r\n}\r\n","import { Component, ChangeDetectionStrategy, input } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { GroupFieldSchema } from '../../schema/form-schema.model';\r\nimport { FormBuilderService } from '../../services/form-builder.service';\r\nimport { FormFieldComponent } from '../form-field/form-field.component';\r\nimport {\r\n RendererRegistry,\r\n RENDERERS,\r\n} from '../renderer-template-registry/renderer-template.registry';\r\nimport { TextRendererComponent } from '../form-field-renderers/text-field-renderer/text-field-renderer.component';\r\nimport { NumberRendererComponent } from '../form-field-renderers/number-field-renderer/number-field-renderer.component';\r\nimport { CheckboxRendererComponent } from '../form-field-renderers/checkbox-field-renderer/checkbox-field-renderer.component';\r\nimport { SelectRendererComponent } from '../form-field-renderers/select-field-renderer/select-field-renderer.component';\r\n\r\n@Component({\r\n selector: 'forge-form-group-renderer',\r\n templateUrl: './group-renderer.component.html',\r\n imports: [ReactiveFormsModule, FormFieldComponent],\r\n providers: [\r\n FormBuilderService,\r\n RendererRegistry,\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'text',\r\n component: TextRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'number',\r\n component: NumberRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'checkbox',\r\n component: CheckboxRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'select',\r\n component: SelectRendererComponent,\r\n },\r\n },\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class GroupRendererComponent {\r\n form = input.required<FormGroup>();\r\n schema = input.required<GroupFieldSchema>();\r\n}\r\n","<div\r\n data-test=\"group-container\"\r\n [class]=\"\r\n 'forge-form-group forge-form-group--' + schema().options?.orientation\r\n \">\r\n @for (subjectSchema of schema().controls; track subjectSchema) {\r\n @if (subjectSchema.type === 'group') {\r\n <forge-form-group-renderer\r\n data-test=\"nested-group\"\r\n [form]=\"form()\"\r\n [schema]=\"subjectSchema\" />\r\n } @else {\r\n <forge-form-field\r\n data-test=\"group-field\"\r\n [controlSchema]=\"subjectSchema\"\r\n [control]=\"form().get(subjectSchema.controlName)!\" />\r\n }\r\n }\r\n</div>\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n input,\r\n effect,\r\n inject,\r\n output,\r\n} from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { FormSchema } from '../../schema/form-schema.model';\r\nimport { FormFieldComponent } from '../form-field/form-field.component';\r\nimport {\r\n RendererRegistry,\r\n RENDERERS,\r\n} from '../renderer-template-registry/renderer-template.registry';\r\nimport { TextRendererComponent } from '../form-field-renderers/text-field-renderer/text-field-renderer.component';\r\nimport { NumberRendererComponent } from '../form-field-renderers/number-field-renderer/number-field-renderer.component';\r\nimport { CheckboxRendererComponent } from '../form-field-renderers/checkbox-field-renderer/checkbox-field-renderer.component';\r\nimport { SelectRendererComponent } from '../form-field-renderers/select-field-renderer/select-field-renderer.component';\r\nimport { GroupRendererComponent } from '../group-renderer/group-renderer.component';\r\nimport { FORM_OPTIONS } from '../../schema/form-options-token';\r\nimport {\r\n DEFAULT_ERROR_FALLBACK,\r\n DEFAULT_ERROR_MESSAGES,\r\n ERROR_MESSAGES,\r\n} from '../error-messages/error-messages.registry';\r\nimport { FormService } from './form.service';\r\nimport { FormBuilderService } from '../../services/form-builder.service';\r\nimport { THEMES } from '../../schema/form-options.model';\r\n\r\n@Component({\r\n selector: 'forge-form-angular',\r\n templateUrl: './form-renderer.component.html',\r\n imports: [ReactiveFormsModule, FormFieldComponent, GroupRendererComponent],\r\n providers: [\r\n FormBuilderService,\r\n RendererRegistry,\r\n FormService,\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'text',\r\n component: TextRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'number',\r\n component: NumberRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'checkbox',\r\n component: CheckboxRendererComponent,\r\n },\r\n },\r\n {\r\n provide: RENDERERS,\r\n multi: true,\r\n useValue: {\r\n type: 'select',\r\n component: SelectRendererComponent,\r\n },\r\n },\r\n {\r\n provide: FORM_OPTIONS,\r\n useFactory: (component: FormRendererComponent<unknown>) =>\r\n component.schema().options,\r\n deps: [FormRendererComponent],\r\n },\r\n {\r\n provide: ERROR_MESSAGES,\r\n useValue: DEFAULT_ERROR_MESSAGES,\r\n multi: true,\r\n },\r\n { provide: DEFAULT_ERROR_FALLBACK, useValue: 'Invalid field', multi: true },\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormRendererComponent<TModel> {\r\n private readonly formService = inject(FormService<TModel>);\r\n\r\n readonly schema = input.required<FormSchema>();\r\n readonly formSubmit = output<TModel>();\r\n\r\n readonly THEMES = THEMES;\r\n\r\n readonly formSignal = this.formService.form;\r\n\r\n constructor() {\r\n effect(() => {\r\n this.formService.init(this.schema());\r\n });\r\n }\r\n\r\n getControl(name: string): FormControl {\r\n return this.formSignal()!.get(name) as FormControl;\r\n }\r\n\r\n onSubmit() {\r\n if (this.formSignal()!.valid) {\r\n this.formSubmit.emit(this.formSignal()!.value);\r\n }\r\n }\r\n}\r\n","@if (!!formSignal()) {\r\n <form\r\n [class]=\"'forge-form forge-form--' + schema().options?.orientation\"\r\n [class.forge-theme-default]=\"schema().options?.theme === THEMES.default\"\r\n [formGroup]=\"formSignal()!\"\r\n (ngSubmit)=\"onSubmit()\"\r\n data-test=\"form\">\r\n @for (subjectSchema of schema().controls; track subjectSchema) {\r\n @if (subjectSchema.type === 'group') {\r\n <forge-form-group-renderer\r\n data-test=\"group-renderer\"\r\n [form]=\"formSignal()!\"\r\n [schema]=\"subjectSchema\" />\r\n } @else {\r\n <forge-form-field\r\n data-test=\"form-field\"\r\n [controlSchema]=\"subjectSchema\"\r\n [control]=\"formSignal()!.get(subjectSchema.controlName)!\" />\r\n }\r\n }\r\n\r\n <button\r\n class=\"forge-form-button\"\r\n [disabled]=\"!formSignal()?.valid\"\r\n data-test=\"submit-button\"\r\n type=\"submit\">\r\n Submit\r\n </button>\r\n </form>\r\n}\r\n","import { Directive, input } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\n@Directive()\r\nexport abstract class FormFieldContextComponent<T = unknown> {\r\n control = input.required<AbstractControl<T>>();\r\n controlValue = input.required<T>();\r\n controlErrors = input<ValidationErrors | null>(null);\r\n controlSchema = input.required<unknown>();\r\n}\r\n","import { ErrorMessageContent } from '../error-messages/error-messages.model';\r\nimport {\r\n ValidatorSchema,\r\n ValidatorFunction,\r\n VALIDATOR_TYPES,\r\n} from './validator-schema.model';\r\n\r\nexport interface ValidatorCredentials {\r\n value?: number | string;\r\n key?: string;\r\n fn?: ValidatorFunction;\r\n errorMessage?: ErrorMessageContent;\r\n}\r\n\r\nexport const required = (\r\n credentials?: ValidatorCredentials,\r\n): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.required,\r\n errorMessage: credentials?.errorMessage,\r\n});\r\n\r\nexport const minLength = ({\r\n value,\r\n errorMessage,\r\n}: ValidatorCredentials): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.minlength,\r\n value: +value!,\r\n errorMessage,\r\n});\r\n\r\nexport const maxLength = ({\r\n value,\r\n errorMessage,\r\n}: ValidatorCredentials): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.maxlength,\r\n value: +value!,\r\n errorMessage,\r\n});\r\n\r\nexport const min = ({\r\n value,\r\n errorMessage,\r\n}: ValidatorCredentials): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.min,\r\n value: +value!,\r\n errorMessage,\r\n});\r\n\r\nexport const max = ({\r\n value,\r\n errorMessage,\r\n}: ValidatorCredentials): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.max,\r\n value: +value!,\r\n errorMessage,\r\n});\r\n\r\nexport const customValidator = ({\r\n key,\r\n fn,\r\n errorMessage,\r\n}: ValidatorCredentials): ValidatorSchema => ({\r\n type: VALIDATOR_TYPES.custom,\r\n key: key ?? '',\r\n fn: fn ?? (() => null),\r\n errorMessage,\r\n});\r\n","import { Signal, Type } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\nexport const HINT_TYPES = {\r\n text: 'text',\r\n custom: 'custom',\r\n} as const;\r\nexport type HintType = (typeof HINT_TYPES)[keyof typeof HINT_TYPES];\r\n\r\nexport type HintMessage = string | HintComponentDef;\r\n\r\nexport interface HintComponentDef {\r\n component: Type<unknown>;\r\n inputs?: Record<string, unknown>;\r\n}\r\n\r\nexport interface HintContext {\r\n control: AbstractControl;\r\n value: Signal<unknown>;\r\n errors: Signal<ValidationErrors | null>;\r\n}\r\n","/*\r\n * Public API Surface of @forge-form/angular\r\n */\r\n\r\n// Main entry component\r\nexport { FormRendererComponent } from './lib/engine/form-renderer/form-renderer.component';\r\n\r\n// Base class for custom hint / error components\r\nexport { FormFieldContextComponent } from './lib/engine/form-field/form-field-context.component';\r\n\r\n// Schema models\r\nexport type {\r\n FormSchema,\r\n GroupFieldSchema,\r\n} from './lib/schema/form-schema.model';\r\nexport type {\r\n ControlSchema,\r\n BaseElementSchema,\r\n BaseControlSchema,\r\n TextControlSchema,\r\n NumberControlSchema,\r\n CheckboxControlSchema,\r\n SelectControlSchema,\r\n SelectOption,\r\n FieldRenderer,\r\n} from './lib/schema/form-control.model';\r\nexport { ORIENTATION_OPTIONS, THEMES } from './lib/schema/form-options.model';\r\nexport type {\r\n OrientationOption,\r\n ThemeOption,\r\n FormOptions,\r\n ElementFormOptions,\r\n FormFieldOptions,\r\n} from './lib/schema/form-options.model';\r\nexport { UPDATE_ON } from './lib/schema/update-on.model';\r\nexport type { UpdateOn } from './lib/schema/update-on.model';\r\nexport { VISIBILITY_BEHAVIORS } from './lib/schema/visibility.model';\r\nexport type {\r\n VisibilitySchema,\r\n VisibilityFunction,\r\n VisibilityBehavior,\r\n VisibilityContext,\r\n} from './lib/schema/visibility.model';\r\n\r\n// Dependency-injection tokens & extension points\r\nexport { FORM_OPTIONS } from './lib/schema/form-options-token';\r\nexport {\r\n RENDERERS,\r\n RendererRegistry,\r\n} from './lib/engine/renderer-template-registry/renderer-template.registry';\r\nexport type { RendererDef } from './lib/engine/renderer-template-registry/renderer-template.registry';\r\n\r\n// Validators\r\nexport {\r\n required,\r\n minLength,\r\n maxLength,\r\n min,\r\n max,\r\n customValidator,\r\n} from './lib/engine/validators/validator-helpers';\r\nexport type { ValidatorCredentials } from './lib/engine/validators/validator-helpers';\r\nexport { VALIDATOR_TYPES } from './lib/engine/validators/validator-schema.model';\r\nexport type {\r\n ValidatorSchema,\r\n ValidatorType,\r\n ValidatorFunction,\r\n BaseValidatorSchema,\r\n RequiredValidatorSchema,\r\n MinLengthValidatorSchema,\r\n MaxLengthValidatorSchema,\r\n MinValidatorSchema,\r\n MaxValidatorSchema,\r\n CustomValidatorSchema,\r\n} from './lib/engine/validators/validator-schema.model';\r\n\r\n// Error messages\r\nexport {\r\n ERROR_MESSAGES,\r\n DEFAULT_ERROR_FALLBACK,\r\n DEFAULT_ERROR_MESSAGES,\r\n} from './lib/engine/error-messages/error-messages.registry';\r\nexport type {\r\n ErrorMessage,\r\n ErrorMessageContent,\r\n ErrorComponentDef,\r\n} from './lib/engine/error-messages/error-messages.model';\r\n\r\n// Hint messages\r\nexport { HINT_TYPES } from './lib/engine/hint-messages/hint-messages.model';\r\nexport type {\r\n HintMessage,\r\n HintComponentDef,\r\n HintContext,\r\n HintType,\r\n} from './lib/engine/hint-messages/hint-messages.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAQa,SAAS,GAAG,IAAI,cAAc,CAAgB,WAAW;MAGzD,gBAAgB,CAAA;AACnB,IAAA,GAAG,GAAG,IAAI,GAAG,EAA+B;;AAGpD,IAAA,WAAA,CAA+B,YAA6B,EAAE,EAAA;QAC5D,SAAS,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AAC7B,YAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;AACnC,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,GAAG,CAAC,IAAY,EAAA;QACd,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAA,CAAE,CAAC;QAClD;AACA,QAAA,OAAO,GAAG;IACZ;AAhBW,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,E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AG,CAAC,EAClB,KAAK,EACL,YAAY,GACS,MAAuB;IAC5C,IAAI,EAAE,eAAe,CAAC,GAAG;IACzB,KAAK,EAAE,CAAC,KAAM;IACd,YAAY;AACb,CAAA;AAEM,MAAM,eAAe,GAAG,CAAC,EAC9B,GAAG,EACH,EAAE,EACF,YAAY,GACS,MAAuB;IAC5C,IAAI,EAAE,eAAe,CAAC,MAAM;IAC5B,GAAG,EAAE,GAAG,IAAI,EAAE;IACd,EAAE,EAAE,EAAE,KAAK,MAAM,IAAI,CAAC;IACtB,YAAY;AACb,CAAA;;AC/DM,MAAM,UAAU,GAAG;AACxB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;;;ACLlB;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@forge-form/angular",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Schema-driven, signal-based reactive form engine for Angular.",
|
|
5
|
+
"author": "Marcin Spasinski",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/mspas/forge-form"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/mspas/forge-form#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/mspas/forge-form/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"angular",
|
|
17
|
+
"forms",
|
|
18
|
+
"reactive-forms",
|
|
19
|
+
"schema",
|
|
20
|
+
"form-builder",
|
|
21
|
+
"signals",
|
|
22
|
+
"dynamic-forms"
|
|
23
|
+
],
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@angular/common": "^21.2.0",
|
|
26
|
+
"@angular/core": "^21.2.0",
|
|
27
|
+
"@angular/forms": "^21.2.0",
|
|
28
|
+
"rxjs": "^7.8.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"tslib": "^2.3.0"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"module": "fesm2022/forge-form-angular.mjs",
|
|
35
|
+
"typings": "types/forge-form-angular.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
"./package.json": {
|
|
38
|
+
"default": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./types/forge-form-angular.d.ts",
|
|
42
|
+
"default": "./fesm2022/forge-form-angular.mjs"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"type": "module"
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './layout';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.forge-theme-default {
|
|
2
|
+
--forge-gap-small-xx: 2px;
|
|
3
|
+
--forge-gap-small-x: 0.25rem;
|
|
4
|
+
--forge-gap-small: 0.5rem;
|
|
5
|
+
--forge-gap-medium: 0.75rem;
|
|
6
|
+
|
|
7
|
+
--forge-border-radius: 0.25rem;
|
|
8
|
+
|
|
9
|
+
--forge-color-label: #202020;
|
|
10
|
+
--forge-color-border: rgba(32, 32, 32, 0.5);
|
|
11
|
+
--forge-color-disabled: #b6b6b6;
|
|
12
|
+
--forge-color-error: #b60000;
|
|
13
|
+
|
|
14
|
+
&.forge-form {
|
|
15
|
+
font-family: Montserrat, sans-serif;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
|
|
18
|
+
gap: var(--forge-gap-small);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.forge-form-field-container {
|
|
22
|
+
gap: var(--forge-gap-small-xx);
|
|
23
|
+
|
|
24
|
+
&--row {
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.forge-form-group {
|
|
30
|
+
gap: var(--forge-gap-medium);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.forge-form-field-label {
|
|
34
|
+
color: var(--forge-color-label);
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.forge-form-hint {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: var(--forge-color-label);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.forge-form-error {
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
color: var(--forge-color-error);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.forge-form-input {
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
width: 100%;
|
|
51
|
+
border: 1px solid var(--forge-color-border);
|
|
52
|
+
border-radius: var(--forge-border-radius);
|
|
53
|
+
padding: 0.5rem 0.75rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.forge-form-button {
|
|
57
|
+
padding: 0.5rem 1rem;
|
|
58
|
+
border: 1px solid var(--forge-color-label);
|
|
59
|
+
border-radius: var(--forge-border-radius);
|
|
60
|
+
background-color: #ffffff;
|
|
61
|
+
color: var(--forge-color-label);
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
|
|
65
|
+
&:disabled {
|
|
66
|
+
color: var(--forge-color-disabled);
|
|
67
|
+
border-color: var(--forge-color-disabled);
|
|
68
|
+
cursor: default;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as _angular_forms from '@angular/forms';
|
|
2
|
+
import { ValidationErrors, AbstractControl, FormGroup, FormControl } from '@angular/forms';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Type, Signal, InjectionToken } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
type ErrorMessageContent = string | ((error: ValidationErrors) => string) | ErrorComponentDef;
|
|
7
|
+
interface ErrorComponentDef {
|
|
8
|
+
component: Type<unknown>;
|
|
9
|
+
inputs?: (data: unknown) => Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
interface ErrorMessage {
|
|
12
|
+
type: ValidatorType;
|
|
13
|
+
message: ErrorMessageContent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ValidatorSchema = RequiredValidatorSchema | MinLengthValidatorSchema | MaxLengthValidatorSchema | MinValidatorSchema | MaxValidatorSchema | CustomValidatorSchema;
|
|
17
|
+
declare const VALIDATOR_TYPES: {
|
|
18
|
+
readonly required: "required";
|
|
19
|
+
readonly minlength: "minlength";
|
|
20
|
+
readonly maxlength: "maxlength";
|
|
21
|
+
readonly min: "min";
|
|
22
|
+
readonly max: "max";
|
|
23
|
+
readonly custom: "custom";
|
|
24
|
+
};
|
|
25
|
+
type ValidatorType = (typeof VALIDATOR_TYPES)[keyof typeof VALIDATOR_TYPES];
|
|
26
|
+
interface BaseValidatorSchema {
|
|
27
|
+
type: ValidatorType;
|
|
28
|
+
errorMessage?: ErrorMessageContent;
|
|
29
|
+
}
|
|
30
|
+
interface RequiredValidatorSchema extends BaseValidatorSchema {
|
|
31
|
+
type: typeof VALIDATOR_TYPES.required;
|
|
32
|
+
}
|
|
33
|
+
interface MinLengthValidatorSchema extends BaseValidatorSchema {
|
|
34
|
+
type: typeof VALIDATOR_TYPES.minlength;
|
|
35
|
+
value: number;
|
|
36
|
+
}
|
|
37
|
+
interface MaxLengthValidatorSchema extends BaseValidatorSchema {
|
|
38
|
+
type: typeof VALIDATOR_TYPES.maxlength;
|
|
39
|
+
value: number;
|
|
40
|
+
}
|
|
41
|
+
interface MinValidatorSchema extends BaseValidatorSchema {
|
|
42
|
+
type: typeof VALIDATOR_TYPES.min;
|
|
43
|
+
value: number;
|
|
44
|
+
}
|
|
45
|
+
interface MaxValidatorSchema extends BaseValidatorSchema {
|
|
46
|
+
type: typeof VALIDATOR_TYPES.max;
|
|
47
|
+
value: number;
|
|
48
|
+
}
|
|
49
|
+
interface CustomValidatorSchema extends BaseValidatorSchema {
|
|
50
|
+
type: typeof VALIDATOR_TYPES.custom;
|
|
51
|
+
key: string;
|
|
52
|
+
fn: ValidatorFunction;
|
|
53
|
+
}
|
|
54
|
+
type ValidatorFunction = (control: AbstractControl) => ValidationErrors | null;
|
|
55
|
+
|
|
56
|
+
declare const UPDATE_ON: {
|
|
57
|
+
readonly change: "change";
|
|
58
|
+
readonly blur: "blur";
|
|
59
|
+
readonly submit: "submit";
|
|
60
|
+
};
|
|
61
|
+
type UpdateOn = (typeof UPDATE_ON)[keyof typeof UPDATE_ON];
|
|
62
|
+
|
|
63
|
+
declare const ORIENTATION_OPTIONS: {
|
|
64
|
+
readonly row: "row";
|
|
65
|
+
readonly column: "column";
|
|
66
|
+
};
|
|
67
|
+
type OrientationOption = (typeof ORIENTATION_OPTIONS)[keyof typeof ORIENTATION_OPTIONS];
|
|
68
|
+
declare const THEMES: {
|
|
69
|
+
readonly none: "none";
|
|
70
|
+
readonly default: "default";
|
|
71
|
+
};
|
|
72
|
+
type ThemeOption = (typeof THEMES)[keyof typeof THEMES];
|
|
73
|
+
interface BaseFormOptions {
|
|
74
|
+
orientation?: OrientationOption;
|
|
75
|
+
labelOrientation?: OrientationOption;
|
|
76
|
+
}
|
|
77
|
+
interface FormOptions extends BaseFormOptions {
|
|
78
|
+
theme?: ThemeOption;
|
|
79
|
+
}
|
|
80
|
+
type ElementFormOptions = BaseFormOptions;
|
|
81
|
+
interface FormFieldOptions extends BaseFormOptions {
|
|
82
|
+
width?: number | string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare const HINT_TYPES: {
|
|
86
|
+
readonly text: "text";
|
|
87
|
+
readonly custom: "custom";
|
|
88
|
+
};
|
|
89
|
+
type HintType = (typeof HINT_TYPES)[keyof typeof HINT_TYPES];
|
|
90
|
+
type HintMessage = string | HintComponentDef;
|
|
91
|
+
interface HintComponentDef {
|
|
92
|
+
component: Type<unknown>;
|
|
93
|
+
inputs?: Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
interface HintContext {
|
|
96
|
+
control: AbstractControl;
|
|
97
|
+
value: Signal<unknown>;
|
|
98
|
+
errors: Signal<ValidationErrors | null>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface VisibilitySchema {
|
|
102
|
+
fn: VisibilityFunction;
|
|
103
|
+
behavior: VisibilityBehavior;
|
|
104
|
+
clearOnHide?: boolean;
|
|
105
|
+
}
|
|
106
|
+
type VisibilityFunction = (control: VisibilityContext) => boolean;
|
|
107
|
+
declare const VISIBILITY_BEHAVIORS: {
|
|
108
|
+
readonly hide: "hide";
|
|
109
|
+
readonly disable: "disable";
|
|
110
|
+
};
|
|
111
|
+
type VisibilityBehavior = (typeof VISIBILITY_BEHAVIORS)[keyof typeof VISIBILITY_BEHAVIORS];
|
|
112
|
+
interface VisibilityContext {
|
|
113
|
+
value: unknown;
|
|
114
|
+
form: FormGroup;
|
|
115
|
+
control: AbstractControl;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
type ControlSchema = TextControlSchema | NumberControlSchema | CheckboxControlSchema | SelectControlSchema;
|
|
119
|
+
interface BaseElementSchema {
|
|
120
|
+
type: string;
|
|
121
|
+
label?: string;
|
|
122
|
+
}
|
|
123
|
+
interface BaseControlSchema extends BaseElementSchema {
|
|
124
|
+
controlName: string;
|
|
125
|
+
options?: FormFieldOptions;
|
|
126
|
+
initialValue?: unknown;
|
|
127
|
+
validators?: ValidatorSchema[];
|
|
128
|
+
visibility?: VisibilitySchema;
|
|
129
|
+
updateOn?: UpdateOn;
|
|
130
|
+
hint?: HintMessage;
|
|
131
|
+
}
|
|
132
|
+
interface TextControlSchema extends BaseControlSchema {
|
|
133
|
+
type: 'text';
|
|
134
|
+
placeholder?: string;
|
|
135
|
+
}
|
|
136
|
+
interface NumberControlSchema extends BaseControlSchema {
|
|
137
|
+
type: 'number';
|
|
138
|
+
placeholder?: string;
|
|
139
|
+
min?: number;
|
|
140
|
+
max?: number;
|
|
141
|
+
}
|
|
142
|
+
interface CheckboxControlSchema extends BaseControlSchema {
|
|
143
|
+
type: 'checkbox';
|
|
144
|
+
}
|
|
145
|
+
interface SelectControlSchema extends BaseControlSchema {
|
|
146
|
+
type: 'select';
|
|
147
|
+
items: SelectOption[];
|
|
148
|
+
placeholder?: string;
|
|
149
|
+
}
|
|
150
|
+
interface SelectOption {
|
|
151
|
+
label: string;
|
|
152
|
+
value: string;
|
|
153
|
+
}
|
|
154
|
+
interface FieldRenderer<TSchema = unknown> {
|
|
155
|
+
control: FormControl;
|
|
156
|
+
controlSchema: TSchema;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
interface GroupFieldSchema extends BaseElementSchema {
|
|
160
|
+
type: 'group';
|
|
161
|
+
controls: (GroupFieldSchema | ControlSchema)[];
|
|
162
|
+
options?: ElementFormOptions;
|
|
163
|
+
}
|
|
164
|
+
interface FormSchema {
|
|
165
|
+
controls: (GroupFieldSchema | ControlSchema)[];
|
|
166
|
+
id?: string;
|
|
167
|
+
updateOn?: UpdateOn;
|
|
168
|
+
options?: FormOptions;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class FormRendererComponent<TModel> {
|
|
172
|
+
private readonly formService;
|
|
173
|
+
readonly schema: i0.InputSignal<FormSchema>;
|
|
174
|
+
readonly formSubmit: i0.OutputEmitterRef<TModel>;
|
|
175
|
+
readonly THEMES: {
|
|
176
|
+
readonly none: "none";
|
|
177
|
+
readonly default: "default";
|
|
178
|
+
};
|
|
179
|
+
readonly formSignal: i0.WritableSignal<_angular_forms.FormGroup<any> | null>;
|
|
180
|
+
constructor();
|
|
181
|
+
getControl(name: string): FormControl;
|
|
182
|
+
onSubmit(): void;
|
|
183
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormRendererComponent<any>, never>;
|
|
184
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormRendererComponent<any>, "forge-form-angular", never, { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare abstract class FormFieldContextComponent<T = unknown> {
|
|
188
|
+
control: i0.InputSignal<AbstractControl<T, T, any>>;
|
|
189
|
+
controlValue: i0.InputSignal<T>;
|
|
190
|
+
controlErrors: i0.InputSignal<ValidationErrors | null>;
|
|
191
|
+
controlSchema: i0.InputSignal<unknown>;
|
|
192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldContextComponent<any>, never>;
|
|
193
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormFieldContextComponent<any>, never, never, { "control": { "alias": "control"; "required": true; "isSignal": true; }; "controlValue": { "alias": "controlValue"; "required": true; "isSignal": true; }; "controlErrors": { "alias": "controlErrors"; "required": false; "isSignal": true; }; "controlSchema": { "alias": "controlSchema"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare const FORM_OPTIONS: InjectionToken<FormOptions>;
|
|
197
|
+
|
|
198
|
+
interface RendererDef {
|
|
199
|
+
type: string;
|
|
200
|
+
component: Type<FieldRenderer>;
|
|
201
|
+
}
|
|
202
|
+
declare const RENDERERS: InjectionToken<RendererDef[]>;
|
|
203
|
+
declare class RendererRegistry {
|
|
204
|
+
private map;
|
|
205
|
+
constructor(renderers?: RendererDef[][]);
|
|
206
|
+
get(type: string): Type<FieldRenderer>;
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RendererRegistry, never>;
|
|
208
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RendererRegistry>;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
interface ValidatorCredentials {
|
|
212
|
+
value?: number | string;
|
|
213
|
+
key?: string;
|
|
214
|
+
fn?: ValidatorFunction;
|
|
215
|
+
errorMessage?: ErrorMessageContent;
|
|
216
|
+
}
|
|
217
|
+
declare const required: (credentials?: ValidatorCredentials) => ValidatorSchema;
|
|
218
|
+
declare const minLength: ({ value, errorMessage, }: ValidatorCredentials) => ValidatorSchema;
|
|
219
|
+
declare const maxLength: ({ value, errorMessage, }: ValidatorCredentials) => ValidatorSchema;
|
|
220
|
+
declare const min: ({ value, errorMessage, }: ValidatorCredentials) => ValidatorSchema;
|
|
221
|
+
declare const max: ({ value, errorMessage, }: ValidatorCredentials) => ValidatorSchema;
|
|
222
|
+
declare const customValidator: ({ key, fn, errorMessage, }: ValidatorCredentials) => ValidatorSchema;
|
|
223
|
+
|
|
224
|
+
declare const ERROR_MESSAGES: InjectionToken<ErrorMessage[]>;
|
|
225
|
+
declare const DEFAULT_ERROR_FALLBACK: InjectionToken<string>;
|
|
226
|
+
declare const DEFAULT_ERROR_MESSAGES: ErrorMessage[];
|
|
227
|
+
|
|
228
|
+
export { DEFAULT_ERROR_FALLBACK, DEFAULT_ERROR_MESSAGES, ERROR_MESSAGES, FORM_OPTIONS, FormFieldContextComponent, FormRendererComponent, HINT_TYPES, ORIENTATION_OPTIONS, RENDERERS, RendererRegistry, THEMES, UPDATE_ON, VALIDATOR_TYPES, VISIBILITY_BEHAVIORS, customValidator, max, maxLength, min, minLength, required };
|
|
229
|
+
export type { BaseControlSchema, BaseElementSchema, BaseValidatorSchema, CheckboxControlSchema, ControlSchema, CustomValidatorSchema, ElementFormOptions, ErrorComponentDef, ErrorMessage, ErrorMessageContent, FieldRenderer, FormFieldOptions, FormOptions, FormSchema, GroupFieldSchema, HintComponentDef, HintContext, HintMessage, HintType, MaxLengthValidatorSchema, MaxValidatorSchema, MinLengthValidatorSchema, MinValidatorSchema, NumberControlSchema, OrientationOption, RendererDef, RequiredValidatorSchema, SelectControlSchema, SelectOption, TextControlSchema, ThemeOption, UpdateOn, ValidatorCredentials, ValidatorFunction, ValidatorSchema, ValidatorType, VisibilityBehavior, VisibilityContext, VisibilityFunction, VisibilitySchema };
|