ng-form-foundry 0.2.1 → 0.3.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/README.md +9 -6
- package/fesm2022/ng-form-foundry.mjs +754 -169
- package/fesm2022/ng-form-foundry.mjs.map +1 -1
- package/index.d.ts +347 -40
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-form-foundry.mjs","sources":["../../../projects/ng-form-foundry/src/lib/types/dynamic-recursive.types.ts","../../../projects/ng-form-foundry/src/lib/core/dynamic-recursive-forms-builder.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/anon-leaf-renderer/anon-leaf-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/anon-leaf-renderer/anon-leaf-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component.html","../../../projects/ng-form-foundry/src/lib/core/utils.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/dynamic-recursive-form.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/dynamic-recursive-form.component.html","../../../projects/ng-form-foundry/src/lib/config-editor/config-editor.component.ts","../../../projects/ng-form-foundry/src/lib/config-editor/config-editor.component.html","../../../projects/ng-form-foundry/src/public-api.ts","../../../projects/ng-form-foundry/src/ng-form-foundry.ts"],"sourcesContent":["import { FormArray, FormControl, FormGroup } from '@angular/forms';\n\nexport type LeafRuntimeType<T> = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'enum'\n ? string | number\n : never;\n\nexport type LeafBase = {\n kind: 'leaf';\n name: string;\n required?: true | undefined;\n label?: string;\n description?: string;\n};\n\nexport type AnonLeaf = {\n [K in Leaf['type']]: { type: K };\n}[Leaf['type']];\n\nexport type LeafString = LeafBase & {\n type: 'string';\n default?: LeafRuntimeType<'string'>;\n};\nexport type LeafNumber = LeafBase & {\n type: 'number';\n default?: LeafRuntimeType<'number'>;\n};\nexport type LeafBoolean = LeafBase & {\n type: 'boolean';\n default?: LeafRuntimeType<'boolean'>;\n};\nexport type LeafEnum = LeafBase & {\n type: 'enum';\n default?: LeafRuntimeType<'enum'>;\n enumLabel?: string[];\n enum: LeafRuntimeType<'enum'>[];\n};\n\nexport type Appearance = {\n flatten?: boolean;\n noBorder?: boolean;\n}\n\nexport type Leaf = LeafString | LeafNumber | LeafBoolean | LeafEnum;\n\nexport type LeafList<TKind extends Leaf['type'] = Leaf['type']> = {\n kind: 'leafList';\n label?: string;\n name: string;\n description?: string;\n default?: Exclude<Leaf['default'], undefined>[];\n type: TKind;\n minItems?: number;\n maxItems?: number;\n};\n\nexport type NodeGroupList = {\n kind: 'nodeGroupList';\n name: string;\n label?: string;\n description?: string;\n type: NodeGroup;\n minItems?: number;\n maxItems?: number;\n};\n\nexport type NodeGroup = {\n kind: 'nodeGroup';\n name: string;\n subType?: string;\n label?: string;\n root?: boolean;\n /**\n * When true, the group is optional: rendered with an on/off toggle and present\n * in the form only while enabled. Its control is removed from the parent\n * FormGroup when absent (so it drops from `form.value`) and re-added when the\n * user toggles it on. The builder omits it unless an initial value is supplied.\n */\n presence?: boolean;\n description?: string;\n children: Record<string, NodeType>;\n appearance?: Appearance;\n};\n\n/**\n * A discriminated selection: the user picks one `case`, and only that case's\n * fields are present. In the form it is a FormGroup holding a `__case` control\n * (the active case name) plus that case's field controls; switching the case\n * swaps the field controls.\n */\nexport type NodeChoice = {\n kind: 'choice';\n name: string;\n label?: string;\n cases: Record<string, Record<string, NodeType>>;\n default?: string;\n mandatory?: boolean;\n};\n\n/** The control name that records which case of a {@link NodeChoice} is active. */\nexport const CASE_KEY = '__case';\n\nexport type NodeType = Leaf | LeafList | NodeGroup | NodeGroupList | NodeChoice;\nexport type DFormControl<T extends NodeType> = T extends Leaf\n ? FormControl<LeafRuntimeType<T['type']>>\n : T extends LeafList\n ? FormArray<FormControl<LeafRuntimeType<T['type']>>>\n : T extends NodeGroup\n ? DFormGroup<T>\n : T extends NodeGroupList\n ? FormArray<DFormGroup<T['type']>>\n : T extends NodeChoice\n ? FormGroup<any>\n : never;\n\nexport type FormGroupType<T extends NodeGroup> = {\n [TChild in keyof T['children']]: DFormControl<T['children'][TChild]>;\n};\nexport type DFormGroup<T extends NodeGroup> = FormGroup<FormGroupType<T>>;\n","import {\n FormArray,\n FormControl,\n FormGroup,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {\n CASE_KEY,\n DFormControl,\n DFormGroup,\n FormGroupType,\n Leaf,\n LeafEnum,\n LeafList,\n LeafRuntimeType,\n NodeChoice,\n NodeGroup,\n NodeGroupList,\n NodeType,\n} from '../types/dynamic-recursive.types';\n\n// --- type guards\nfunction isLeaf(node: NodeType): node is Leaf {\n return node.kind === 'leaf';\n}\n\nfunction isLeafList(node: NodeType): node is LeafList {\n return node.kind === 'leafList';\n}\nfunction isNodeGroup(node: NodeType): node is NodeGroup {\n return node.kind === 'nodeGroup';\n}\nfunction isNodeGroupList(node: NodeType): node is NodeGroupList {\n return node.kind === 'nodeGroupList';\n}\nfunction isChoice(node: NodeType): node is NodeChoice {\n return node.kind === 'choice';\n}\n\nfunction enumValidator(choices: readonly (string | number)[]): ValidatorFn {\n const set = new Set(choices);\n return (ctrl) =>\n ctrl.value == null || set.has(ctrl.value) ? null : { enum: true };\n}\n\nfunction buildLeafControl<L extends Leaf>(\n leaf: L,\n initial?: unknown,\n): FormControl<LeafRuntimeType<L['type']>> {\n const validators: ValidatorFn[] = [];\n if ('required' in leaf && leaf.required) validators.push(Validators.required);\n if ('type' in leaf && leaf.type === 'enum') {\n const choices = (leaf as LeafEnum).enum as (string | number)[];\n validators.push(enumValidator(choices));\n }\n const defaultValue =\n initial ?? ('default' in leaf ? (leaf as any).default : undefined) ?? null;\n return new FormControl<LeafRuntimeType<L['type']>>(defaultValue, {\n nonNullable: true,\n validators,\n });\n}\n\nfunction buildLeafListControl<L extends LeafList>(\n list: L,\n initial: LeafRuntimeType<L['type']>[] | null,\n): FormArray<FormControl<LeafRuntimeType<LeafList['type']> | null>> {\n const values = (Array.isArray(initial) ? initial : undefined) ??\n list.default ?? [null];\n return new FormArray(values.map((v) => new FormControl(v)));\n}\n\nfunction buildNodeGroupControl<G extends NodeGroup>(\n group: G,\n initial?: Record<string, unknown> | null,\n): DFormGroup<G> {\n const controls: any = {} as Partial<FormGroupType<G>>;\n for (const key in group.children) {\n const child = group.children[key];\n // Forward only this child's slice of the initial data, keyed by the child's\n // record key. Passing the whole `initial` object seeds every leaf with the\n // parent record and prevents list builders from sizing to the real data.\n controls[key] = buildControl(\n child,\n initial?.[key],\n ) as FormGroupType<G>[typeof key];\n }\n return new FormGroup(controls as FormGroupType<G>) as DFormGroup<G>;\n}\n\nfunction buildNodeGroupListControl<GL extends NodeGroupList>(\n list: GL,\n initial: unknown[] | null = null,\n): FormArray<DFormGroup<GL['type']>> {\n // `initial` is the runtime data array — one group per element. Fall back to a\n // single empty group only when no initial data is supplied.\n const values = Array.isArray(initial) ? initial : [null];\n return new FormArray(\n values.map((v) =>\n buildNodeGroupControl(list.type, v as Record<string, unknown> | null),\n ),\n );\n}\n\n/**\n * Build the `AbstractControl` for a single schema node.\n *\n * Dispatches on `node.kind`: a `leaf` becomes a `FormControl`, a `leafList` a\n * `FormArray` of controls, a `nodeGroup` a nested `FormGroup`, and a\n * `nodeGroupList` a `FormArray` of groups. `initial` is the runtime value for\n * this node — a scalar for a leaf, an array for a list, an object for a group —\n * and seeds the control's value (falling back to the node's `default`).\n *\n * Most callers use {@link buildFormFromSchema}; this is exposed for building a\n * control from a single non-root node.\n */\n/**\n * Build the FormGroup for a choice: a `__case` control holding the active case\n * name plus that case's field controls. Only the active case's fields are built,\n * matching the inline YANG encoding; switching the case swaps them.\n */\nfunction buildChoiceControl(\n choice: NodeChoice,\n initial?: Record<string, unknown> | null,\n): FormGroup {\n const active = (initial?.[CASE_KEY] as string | undefined) ?? choice.default;\n const controls: any = { [CASE_KEY]: new FormControl(active ?? null) };\n if (active && choice.cases[active]) {\n const caseChildren = choice.cases[active];\n for (const key in caseChildren) {\n controls[key] = buildControl(caseChildren[key], initial?.[key]);\n }\n }\n return new FormGroup(controls);\n}\n\nexport function buildControl<T extends NodeType>(\n node: T,\n initial?: unknown | null,\n): DFormControl<T> | FormControl<LeafRuntimeType<any>> | FormArray<any> {\n if (isLeaf(node)) {\n return buildLeafControl(node, initial);\n }\n if (isChoice(node)) {\n return buildChoiceControl(\n node,\n initial ? (initial as Record<string, unknown>) : null,\n ) as DFormControl<T>;\n }\n if (isLeafList(node)) {\n return buildLeafListControl(\n node,\n initial !== null\n ? (initial as LeafRuntimeType<(T & LeafList)['type']>[])\n : initial,\n ) as DFormControl<T>;\n }\n if (isNodeGroup(node)) {\n return buildNodeGroupControl(\n node,\n initial ? (initial as Record<string, unknown>) : null,\n ) as DFormControl<T>;\n }\n if (isNodeGroupList(node)) {\n return buildNodeGroupListControl(\n node,\n initial ? (initial as unknown[]) : null,\n ) as DFormControl<T>;\n }\n return new FormControl(initial ?? '') as DFormControl<T>;\n}\n\n/**\n * Build a typed `FormGroup` from a root `NodeGroup` schema.\n *\n * The returned group's control structure, keys, and value types are inferred\n * from the schema literal — a `leaf` of `type: 'number'` yields a\n * `FormControl<number>`, a `nodeGroup` a nested `FormGroup`, and so on. `initial`\n * is an optional value object keyed by the schema's `children` keys; each child\n * control is seeded from its matching slice (falling back to the node `default`).\n *\n * Inference only holds when `schema`'s literal type is preserved. Author schemas\n * with {@link defineSchema} or a `satisfies NodeGroup` annotation — never\n * `const schema: NodeGroup = ...`, which widens `children` and erases the field\n * names and value types.\n */\n/**\n * Remove presence groups that have no initial value so they are absent from the\n * built form (and from `form.value`) until the user toggles them on. Runs on the\n * fully-built, attached tree. `removeControl` is used rather than `disable`\n * because a disabled group is still included in `FormGroup.value`.\n */\nfunction applyPresence(\n group: FormGroup,\n schema: NodeGroup,\n initial?: Record<string, unknown> | null,\n): void {\n for (const key in schema.children) {\n const child = schema.children[key];\n if (child.kind !== 'nodeGroup') continue;\n const childInitial = (initial as Record<string, unknown> | null | undefined)?.[key];\n if (child.presence && childInitial == null) {\n group.removeControl(key);\n } else if (group.get(key) instanceof FormGroup) {\n applyPresence(group.get(key) as FormGroup, child, childInitial as Record<string, unknown> | null);\n }\n }\n}\n\nexport function buildFormFromSchema<S extends NodeGroup>(\n schema: S,\n initial: Record<string, unknown> | null = null,\n): DFormGroup<S> {\n const group = buildNodeGroupControl<S>(schema, initial);\n applyPresence(group, schema, initial);\n return group;\n}\n\n/**\n * Capture a schema literal with its exact type while checking it against\n * `NodeGroup`.\n *\n * This is an identity function whose only job is the `const` type parameter,\n * which keeps the narrow literal type of `schema` (field names, each node's\n * `type`) instead of widening it to `NodeGroup`. Assigning a schema to a\n * `: NodeGroup`-annotated constant widens `children` to\n * `Record<string, NodeType>` and erases that information, so\n * {@link buildFormFromSchema} can no longer infer a typed `FormGroup`. Passing\n * the schema through `defineSchema` (or annotating it `satisfies NodeGroup`)\n * preserves the schema-to-`FormGroup` inference.\n */\nexport function defineSchema<const S extends NodeGroup>(schema: S): S {\n return schema;\n}\n","import { Component, Input } from '@angular/core';\nimport { LeafEnum } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\n@Component({\n selector: 'nff-leaf-enum-renderer',\n standalone: true,\n imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './leaf-enum-renderer.component.html',\n styleUrl: './leaf-enum-renderer.component.scss',\n})\nexport class LeafEnumRendererComponent {\n @Input() leafEnum!: LeafEnum;\n @Input() initialValue!: string;\n @Input() control = new FormControl();\n @Input() removable: boolean = false;\n @Input() remove: any;\n @Input() editable: boolean = true;\n}\n","<mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ leafEnum.label ?? leafEnum.name }}</mat-label>\n <mat-select [formControl]=\"control\" value=\"{{ control.value }}\">\n @for (option of leafEnum.enum; track $index) {\n <mat-option [value]=\"option\">{{ leafEnum.enumLabel?.[$index] ?? option }}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { AnonLeaf, Leaf } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { LeafEnumRendererComponent } from '../leaf-enum-renderer/leaf-enum-renderer.component';\n\n@Component({\n selector: 'nff-leaf-renderer',\n standalone: true,\n imports: [\n MatFormFieldModule,\n ReactiveFormsModule,\n MatInputModule,\n MatCheckboxModule,\n MatSelectModule,\n MatIconModule,\n MatButtonModule,\n LeafEnumRendererComponent,\n ],\n templateUrl: './leaf-renderer.component.html',\n styleUrl: './leaf-renderer.component.scss',\n})\nexport class LeafRendererComponent implements OnInit {\n @Input() leaf_!: Leaf | AnonLeaf;\n @Input() control: FormControl = new FormControl();\n @Input() initialValue?: any;\n @Input() removable: boolean = false;\n @Input() editable = true;\n @Output() remove: EventEmitter<number> = new EventEmitter();\n\n ngOnInit(): void {\n if (this.initialValue) {\n this.control.patchValue(this.initialValue);\n }\n }\n}\n","@if ('name' in leaf_) {\n @if (leaf_.type === 'string') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ leaf_.label ?? leaf_.name }}</mat-label>\n <input [readonly]=\"!editable\" matInput type=\"text\" [formControl]=\"control\">\n </mat-form-field>\n } @else if (leaf_.type === 'number') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ leaf_.label ?? leaf_.name }}</mat-label>\n <input [readonly]=\"!editable\" matInput type=\"number\" [formControl]=\"control\">\n </mat-form-field>\n } @else if (leaf_.type === 'boolean') {\n <mat-checkbox [formControl]=\"control\">{{ leaf_.label ?? leaf_.name }}</mat-checkbox>\n } @else if (leaf_.type === 'enum') {\n <nff-leaf-enum-renderer [editable]=\"editable\" [leafEnum]=\"leaf_\" [control]=\"control\"></nff-leaf-enum-renderer>\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChildren\n} from '@angular/core';\nimport { NodeGroupList } from '../../types/dynamic-recursive.types';\nimport { FormArray, FormGroup } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { DynamicRecursiveFormComponent } from '../dynamic-recursive-form.component';\nimport { buildFormFromSchema } from '../../core/dynamic-recursive-forms-builder';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@Component({\n selector: 'nff-node-group-list-renderer',\n standalone: true,\n imports: [\n forwardRef(() => DynamicRecursiveFormComponent),\n MatButtonModule,\n MatIconModule,\n MatTooltipModule,\n ],\n templateUrl: './node-group-list-renderer.component.html',\n styleUrl: './node-group-list-renderer.component.scss',\n})\nexport class NodeGroupListRendererComponent implements OnInit, AfterViewInit {\n @Input() nodeGroupList!: NodeGroupList;\n @Input() initialValue!: number[] | string[] | boolean[];\n @Input() formArray = new FormArray<any>([]);\n @Input() editable: boolean = true;\n @Input() minItems: number = 1;\n @Input() maxItems: number = 1;\n @Output() message = new EventEmitter();\n // forwardRef: DynamicRecursiveFormComponent and this component import each\n // other, so the class reference is undefined when this query is evaluated at\n // decoration time. forwardRef defers the lookup and keeps the selector valid.\n @ViewChildren(forwardRef(() => DynamicRecursiveFormComponent))\n items!: QueryList<DynamicRecursiveFormComponent>;\n\n cdr = inject(ChangeDetectorRef);\n\n ngOnInit() {\n if (this.initialValue) {\n this.formArray.patchValue(this.initialValue);\n }\n if (this.nodeGroupList.maxItems) {\n this.maxItems = this.nodeGroupList.maxItems;\n }\n if (this.nodeGroupList.minItems) {\n this.minItems = this.nodeGroupList.minItems;\n }\n }\n\n ngAfterViewInit() {\n this.items.changes.subscribe(() => {\n this.setLastEditable();\n });\n }\n\n removeItem($index: number) {\n if (this.formArray.length <= this.minItems) {\n this.message.emit({\n message: `You cannot remove the last ${this.nodeGroupList.type.name} configuration!`,\n type: 'error',\n })\n return;\n }\n this.formArray.removeAt($index);\n }\n\n addItem = (index: number) => {\n this.formArray.push(buildFormFromSchema(this.nodeGroupList.type, null));\n }\n\n setLastEditable() {\n const lastItem = this.items.last;\n if (lastItem) {\n lastItem.editable = true;\n }\n this.cdr.detectChanges();\n }\n\n asFormGroup(group: any) {\n return group as FormGroup;\n }\n\n getTitle($index: number) {\n let title = `${this.nodeGroupList.type.label ?? this.nodeGroupList.type.name}`;\n if (this.formArray.length > 1) {\n return `${title} #${$index + 1}`;\n }\n else {\n return title;\n }\n\n }\n}\n","@if (formArray && nodeGroupList) {\n <div class=\"fields-container\">\n @for (group of formArray.controls; track $index) {\n <div class=\"field-item\">\n <nff-dynamic-recursive-form\n [schema]=\"nodeGroupList.type\"\n [formGroup]=\"asFormGroup(group)\"\n [title]=\"getTitle($index)\"\n [index]=\"0\"\n [removable]=\"formArray.length > minItems\"\n (remove)=\"removeItem($index)\"\n [editable]=\"editable\"\n [addButtonCallback]=\"addItem\"\n />\n </div>\n }\n </div>\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { AnonLeaf } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'nff-anon-leaf-renderer',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n MatCheckboxModule,\n MatInputModule,\n MatButtonModule,\n ],\n templateUrl: './anon-leaf-renderer.component.html',\n styleUrl: './anon-leaf-renderer.component.scss',\n})\nexport class AnonLeafRendererComponent {\n @Input() AnonLeaf!: AnonLeaf;\n @Input() initialValue!: string;\n @Input() control = new FormControl();\n @Input() removable: boolean = false;\n @Input() editable: boolean = true;\n @Input() index!: number;\n @Output() remove = new EventEmitter();\n @Input() label!: string;\n\n emitRemoveEvent() {\n this.remove.emit();\n }\n}\n","<div class=\"anon-leaf-container\">\n@if (AnonLeaf.type === 'string') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <input [readonly]=\"!editable\"\n [formControl]=\"control\"\n matInput type=\"text\" >\n @if (removable) {\n }\n </mat-form-field>\n} @else if (AnonLeaf.type === 'number') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <input [readonly]=\"!editable\"\n [formControl]=\"control\"\n matInput type=\"number\">\n </mat-form-field>\n} @else if (AnonLeaf.type === 'boolean') {\n <mat-checkbox [disabled]=\"!editable\" [formControl]=\"control\">value</mat-checkbox>\n}\n @else if (AnonLeaf.type === 'enum' && 'enum' in AnonLeaf) {\n <mat-form-field>\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <mat-select [formControl]=\"control\">\n @for (option of (AnonLeaf.type === 'enum' ? AnonLeaf.enum : []); track $index) {\n <mat-option [value]=\"option\">{{ option }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n}\n</div>\n","import { Component, EventEmitter, HostBinding, inject, Input, OnInit, Output } from '@angular/core';\nimport { LeafList } from '../../types/dynamic-recursive.types';\nimport { FormControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { AnonLeafRendererComponent } from '../anon-leaf-renderer/anon-leaf-renderer.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatPrefix } from '@angular/material/input';\n\n@Component({\n selector: 'nff-leaf-list-renderer',\n standalone: true,\n imports: [\n MatIconModule,\n AnonLeafRendererComponent,\n MatButtonModule,\n MatPrefix,\n ],\n templateUrl: './leaf-list-renderer.component.html',\n styleUrl: './leaf-list-renderer.component.scss',\n})\nexport class LeafListRendererComponent implements OnInit {\n @Input() leaf_!: LeafList;\n @Input() initialValue!: number[] | string[] | boolean[];\n @Input() formArray!: any;\n @Input() editable: boolean = true;\n @Input() minItems: number = 1;\n @Output() message = new EventEmitter();\n\n matDialog = inject(MatDialog);\n\n /**\n * Take a full-width row of its own once the array holds more than one entry.\n * A multi-entry array grows vertically as its items wrap; sitting inline next\n * to a regular leaf that would stretch the leaf to match. On its own line it\n * cannot. Consumed by the `:host(.stacked)` rule.\n */\n @HostBinding('class.stacked')\n get stacked(): boolean {\n return (this.formArray?.length ?? 0) > 1;\n }\n\n ngOnInit() {\n if (this.initialValue) {\n this.formArray.patchValue(this.initialValue);\n }\n }\n\n removeItem($index: number) {\n if (this.formArray.length <= this.minItems) {\n this.message.emit({\n message: 'You cannot remove the last item!',\n type: 'error',\n })\n return;\n }\n this.formArray.removeAt($index);\n }\n\n addItem() {\n this.formArray.push(new FormControl());\n }\n}\n","@if (formArray && leaf_) {\n @for (control of formArray.controls; track $index) {\n <div class=\"field-item\">\n <nff-anon-leaf-renderer\n [AnonLeaf]=\"leaf_\" [control]=\"control\"\n [removable]=\"minItems == null || formArray.length > minItems\"\n [index]=\"$index\"\n [editable]=\"editable\"\n [label]=\"leaf_.label ?? leaf_.name\"\n (remove)=\"removeItem($index)\"\n />\n @if (editable) {\n <div class=\"actions\">\n @if (formArray.length > minItems) {\n <button class=\"remove-button small-icon-button\" matIconButton (click)=\"removeItem($index)\">\n <mat-icon matPrefix>delete</mat-icon>\n </button>\n }\n @if ($last) {\n <button class=\"add-button small-icon-button\" matIconButton (click)=\"addItem()\">\n <mat-icon matPrefix>add</mat-icon>\n </button>\n }\n <div class=\"actions-spacer\"></div>\n </div>\n }\n </div>\n }\n}\n","import { FormArray, FormControl, FormGroup } from '@angular/forms';\nimport { Leaf, NodeGroup, NodeGroupList, NodeType } from '../types/dynamic-recursive.types';\n\nexport function nodeGroupChildrenList(schema: NodeGroup): Array<{ key: string; value: NodeType }> {\n const children = schema.children ?? {};\n return Object.entries(children).map(([key, value]) => ({\n key,\n value: value as NodeType,\n }));\n}\n\nexport function nodeGroupChildrenLeafs(schema: NodeGroup): Array<{ key: string; value: Leaf }> {\n const children = schema.children ?? {};\n return Object.entries(children).reduce((acc, [key, value]) => {\n if (value.kind === 'leaf') {\n acc.push({ key, value: value as Leaf });\n }\n return acc;\n }, [] as Array<{ key: string; value: Leaf }>);\n}\n\nexport function removeNullAndEmptyArrays(value: any): any {\n if (Array.isArray(value)) {\n const cleanedArray = value\n .map(removeNullAndEmptyArrays)\n .filter(v => v != null && (typeof v !== 'object' || Object.keys(v).length > 0));\n\n return cleanedArray.length > 0 ? cleanedArray : undefined;\n }\n\n if (value && typeof value === 'object') {\n const cleanedObject = Object.fromEntries(\n Object.entries(value)\n .map(([k, v]) => [k, removeNullAndEmptyArrays(v)])\n .filter(([_, v]) => v != null && (typeof v !== 'object' || Object.keys(v).length > 0))\n );\n\n return Object.keys(cleanedObject).length > 0 ? cleanedObject : undefined;\n }\n\n return value != null ? value : undefined;\n}\n\nexport function asFormControl(control: any) {\n return control as FormControl;\n}\n\nexport function asFormArray(control: any) {\n return control as FormArray;\n}\n\nexport function asFormGroup(control: any) {\n return control as FormGroup;\n}\n\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { LeafRendererComponent } from './leaf-renderer/leaf-renderer.component';\nimport { CASE_KEY, NodeChoice, NodeGroup, NodeType } from '../types/dynamic-recursive.types';\nimport {\n FormArray,\n FormControl,\n FormGroup,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { NodeGroupListRendererComponent } from './node-group-list-renderer/node-group-list-renderer.component';\nimport { LeafListRendererComponent } from './leaf-list-renderer/leaf-list-renderer.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { asFormArray, asFormControl, asFormGroup } from '../core/utils';\nimport { buildControl, buildFormFromSchema } from '../core/dynamic-recursive-forms-builder';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\n@Component({\n imports: [\n LeafRendererComponent,\n NodeGroupListRendererComponent,\n LeafListRendererComponent,\n ReactiveFormsModule,\n MatExpansionModule,\n MatIconModule,\n MatButtonModule,\n NgTemplateOutlet,\n MatCardModule,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTooltip,\n ],\n selector: 'nff-dynamic-recursive-form',\n standalone: true,\n styleUrl: './dynamic-recursive-form.component.scss',\n templateUrl: './dynamic-recursive-form.component.html',\n})\nexport class DynamicRecursiveFormComponent implements OnInit {\n @Input({ required: true }) schema!: NodeGroup;\n @Input() initialValue!: any;\n @Input() formGroup = new FormGroup<any>({});\n @Input() index: number | null = null;\n @Input() removable: boolean = false;\n @Output() remove = new EventEmitter();\n @Input() title!: string;\n @Input() editable = false;\n @Input() addButtonCallback: ((index: number) => void) | null = null;\n root: boolean = false;\n\n ngOnInit() {\n this.root = this.schema.root ?? false;\n if (this.initialValue) {\n this.formGroup.patchValue(this.initialValue);\n }\n }\n\n get nodeGroupChildrenList(): Array<{ key: string; value: NodeType }> {\n const children = this.schema.children ?? {};\n return Object.entries(children).map(([key, value]) => ({\n key,\n value: value as NodeType,\n }));\n }\n\n emitRemoveEvent() {\n this.remove.emit();\n }\n\n /**\n * Add or remove a presence group's control on this form. Removing it drops the\n * group from `form.value`; adding it rebuilds the sub-group from its schema.\n */\n togglePresence(key: string, schema: NodeGroup, present: boolean) {\n if (present) {\n if (!this.formGroup.get(key)) {\n this.formGroup.addControl(key, buildFormFromSchema(schema));\n }\n } else if (this.formGroup.get(key)) {\n this.formGroup.removeControl(key);\n }\n }\n\n protected readonly CASE_KEY = CASE_KEY;\n\n objectKeys(obj: Record<string, unknown>): string[] {\n return Object.keys(obj);\n }\n\n /** The active case name of a choice control, or null if none is selected. */\n activeCase(key: string): string | null {\n return (this.formGroup.get(key) as FormGroup | null)?.get(CASE_KEY)?.value ?? null;\n }\n\n /** A synthetic flattened NodeGroup used to render the active case's fields against the choice's FormGroup. */\n caseAsGroup(choice: NodeChoice, caseName: string): NodeGroup {\n return {\n kind: 'nodeGroup',\n name: choice.name,\n children: choice.cases[caseName] ?? {},\n appearance: { flatten: true },\n };\n }\n\n /** Swap a choice's field controls when the selected case changes. */\n switchCase(key: string, choice: NodeChoice, caseName: string) {\n const group = this.formGroup.get(key) as FormGroup;\n for (const name of Object.keys(group.controls)) {\n if (name !== CASE_KEY) group.removeControl(name);\n }\n const caseChildren = choice.cases[caseName] ?? {};\n for (const name in caseChildren) {\n group.addControl(name, buildControl(caseChildren[name]) as any);\n }\n }\n\n protected readonly asFormGroup = asFormGroup;\n protected readonly asFormArray = asFormArray;\n protected readonly asFormControl = asFormControl;\n}\n","@if (!root) {\n <ng-template #formRender>\n <div class=\"form-content\" [formGroup]=\"formGroup\">\n <div class=\"leafs-container\">\n <div class=\"fields\">\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leaf') {\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup.get(child.name))\n [removable]=false\n [editable]=editable\n [initialValue]=\"formGroup.get(child.name)?.value\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leafList') {\n <nff-leaf-list-renderer\n [leaf_]=\"child\"\n [editable]=editable\n [formArray]=\"asFormArray(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n />\n }\n }\n </div>\n </div>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroup' && child.presence) {\n <div class=\"presence-group\">\n <mat-checkbox\n [checked]=\"!!formGroup.get(childItem.key)\"\n [disabled]=\"!editable\"\n (change)=\"togglePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n @if (formGroup.get(childItem.key)) {\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup.get(childItem.key))\"\n [editable]=\"editable\"\n />\n }\n </div>\n }\n @else if (child.kind == 'nodeGroup') {\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n [editable]=\"editable\"\n />\n }\n @else if (child.kind == 'choice') {\n @let choiceGroup = asFormGroup(formGroup.get(childItem.key));\n @let selectedCase = activeCase(childItem.key);\n <div class=\"choice-group\" [formGroup]=\"choiceGroup\">\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ child.label ?? child.name }}</mat-label>\n <mat-select\n [formControlName]=\"CASE_KEY\"\n (selectionChange)=\"switchCase(childItem.key, child, $event.value)\"\n >\n @for (caseName of objectKeys(child.cases); track caseName) {\n <mat-option [value]=\"caseName\">{{ caseName }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedCase) {\n <nff-dynamic-recursive-form\n [schema]=\"caseAsGroup(child, selectedCase)\"\n [formGroup]=\"choiceGroup\"\n [editable]=\"editable\"\n />\n }\n </div>\n }\n }\n\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroupList') {\n <nff-node-group-list-renderer\n [nodeGroupList]=\"child\"\n [formArray]=\"asFormArray(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n [editable]=\"editable\"\n />\n }\n }\n </div>\n </ng-template>\n @if (schema.appearance?.flatten) {\n <div class=\"flattened-form\">\n <ng-container *ngTemplateOutlet=\"formRender\"></ng-container>\n <div class=\"flattened-actions\">\n @if (editable && index != null && addButtonCallback != null) {\n <button matIconButton matTooltip=\"+ Add new {{ schema.label ?? schema.name }}\" class=\"add-button small-icon-button\" (click)=\"addButtonCallback(index)\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable && removable) {\n <button matIconButton class=\"remove-button small-icon-button\" (click)=\"emitRemoveEvent(); $event.stopPropagation()\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </div>\n }\n @else {\n <mat-card appearance=\"outlined\" [class]=\"{ 'mat-card-no-broder': schema.appearance?.noBorder }\">\n <mat-card-header>\n <div class=\"card-actions\">\n <button matIconButton class=\"small-icon-button\" [class]=\"{ 'edit-icon': !editable}\" (click)=\"editable = !editable\">\n <mat-icon>edit</mat-icon>\n </button>\n @if (editable && index != null && addButtonCallback != null) {\n <button matIconButton matTooltip=\"+ Add new {{ schema.label ?? schema.name }}\" class=\"add-button small-icon-button\" (click)=\"addButtonCallback(index)\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable && removable) {\n <button matIconButton class=\"remove-button small-icon-button\" (click)=\"emitRemoveEvent(); $event.stopPropagation()\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n <mat-card-title class=\"config-form-subsection-card\">\n {{ title ?? schema.label ?? schema.name }}\n </mat-card-title>\n </mat-card-header>\n <mat-card-content>\n <ng-container *ngTemplateOutlet=\"formRender\"></ng-container>\n </mat-card-content>\n </mat-card>\n }\n} @else {\n <div class=\"form-content\" [formGroup]=\"formGroup\">\n <div class=\"leafs-container\">\n <div class=\"fields\">\n <button matIconButton class=\"small-icon-button\" [class]=\"{ 'edit-icon': !editable }\" (click)=\"editable = !editable\">\n <mat-icon>edit</mat-icon>\n </button>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leaf') {\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup.get(child.name))\n [removable]=false\n [editable]=editable\n [initialValue]=\"formGroup.get(child.name)?.value\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leafList') {\n <nff-leaf-list-renderer\n [leaf_]=\"child\"\n [editable]=editable\n [formArray]=\"asFormArray(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'choice') {\n @let choiceGroup = asFormGroup(formGroup.get(childItem.key));\n @let selectedCase = activeCase(childItem.key);\n <div class=\"choice-group\" [formGroup]=\"choiceGroup\">\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ child.label ?? child.name }}</mat-label>\n <mat-select\n [formControlName]=\"CASE_KEY\"\n (selectionChange)=\"switchCase(childItem.key, child, $event.value)\"\n >\n @for (caseName of objectKeys(child.cases); track caseName) {\n <mat-option [value]=\"caseName\">{{ caseName }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedCase) {\n <nff-dynamic-recursive-form\n [schema]=\"caseAsGroup(child, selectedCase)\"\n [formGroup]=\"choiceGroup\"\n [editable]=\"editable\"\n />\n }\n </div>\n }\n }\n </div>\n </div>\n <mat-accordion multi>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroupList') {\n <mat-expansion-panel togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{ title ?? child.label ?? child.name }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <nff-node-group-list-renderer\n [nodeGroupList]=\"child\"\n [formArray]=\"asFormArray(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n [editable]=\"editable\"\n />\n </mat-expansion-panel>\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroup' && child.presence) {\n <mat-expansion-panel togglePosition=\"before\" [expanded]=\"!!formGroup.get(childItem.key)\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-checkbox\n [checked]=\"!!formGroup.get(childItem.key)\"\n [disabled]=\"!editable\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"togglePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (formGroup.get(childItem.key)) {\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup.get(childItem.key))\"\n [editable]=\"editable\"\n />\n }\n </mat-expansion-panel>\n }\n @else if (child.kind == 'nodeGroup') {\n <mat-expansion-panel togglePosition=\"before\" expanded=\"true\">\n <mat-expansion-panel-header >\n <mat-panel-title>\n {{ title ?? child.label ?? child.name }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup.get(child.name))\"\n [initialValue]=\"formGroup.get(child.name)?.value\"\n [title]=\"child.name ?? 'General Settings'\"\n [editable]=\"editable\"\n />\n </mat-expansion-panel>\n }\n }\n </mat-accordion>\n </div>\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormArray, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Leaf, LeafList, NodeGroup } from '../types/dynamic-recursive.types';\nimport { asFormArray, asFormControl } from '../core/utils';\nimport { buildFormFromSchema } from '../core/dynamic-recursive-forms-builder';\nimport { LeafRendererComponent } from '../dynamic-recursive-form/leaf-renderer/leaf-renderer.component';\nimport { LeafListRendererComponent } from '../dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component';\n\n/** Metadata on a list-container node that lets the tree add items to its FormArray. */\ninterface ListRef {\n array: FormArray;\n itemSchema: NodeGroup;\n itemLabel: string;\n minItems: number;\n}\n\n/** A navigable node in the config tree. Groups and list items are tree nodes; leaves are their detail. */\ninterface TreeNode {\n id: string;\n label: string;\n children: TreeNode[];\n /** Leaves editable when this node is selected. Empty for list-container nodes. */\n leaves: { key: string; node: Leaf }[];\n leafLists: { key: string; node: LeafList }[];\n /** The FormGroup holding this node's leaves, or null for a list-container node. */\n group: FormGroup | null;\n /** Present on a nodeGroupList node: lets a `+` add an item. */\n list?: ListRef;\n /** Present on a list-item node: the FormArray and current index it can be removed from. */\n removable?: { array: FormArray; index: number };\n /** Present on an optional (presence) group node: lets a checkbox add/remove the group. */\n presence?: { parentGroup: FormGroup; key: string; schema: NodeGroup };\n /** For a presence node: whether the group is currently present. */\n present?: boolean;\n}\n\n/**\n * A tree/detail editor for a schema-built form: the structure (containers, lists,\n * groups) is a tree on the left, and selecting a node shows that node's leaf\n * fields for editing on the right. A `+` on a list node adds an entry; a delete\n * button on each item removes it. An alternative to the all-in-one\n * {@link DynamicRecursiveFormComponent} for large configs.\n */\n@Component({\n selector: 'nff-config-editor',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n NgTemplateOutlet,\n MatIconModule,\n MatButtonModule,\n MatCheckboxModule,\n MatTooltip,\n LeafRendererComponent,\n LeafListRendererComponent,\n ],\n templateUrl: './config-editor.component.html',\n styleUrl: './config-editor.component.scss',\n})\nexport class ConfigEditorComponent implements OnInit {\n @Input({ required: true }) schema!: NodeGroup;\n @Input({ required: true }) formGroup!: FormGroup;\n @Input() editable = true;\n\n root!: TreeNode;\n selected: TreeNode | null = null;\n readonly expanded = new Set<string>();\n\n private nextId = 0;\n\n ngOnInit() {\n this.root = this.buildTree(this.schema, this.formGroup, this.schema.label ?? this.schema.name);\n this.expanded.add(this.root.id);\n this.select(this.root);\n }\n\n select(node: TreeNode) {\n this.selected = node;\n // Reveal the node's direct children in the tree as it opens on the right.\n if (node.children.length) this.expanded.add(node.id);\n }\n\n /** Select a child (list item or sub-group) from the detail pane, keeping its parent expanded in the tree. */\n open(parent: TreeNode, child: TreeNode) {\n this.expanded.add(parent.id);\n this.select(child);\n }\n\n /**\n * Root-to-`target` path for the detail-pane breadcrumb (inclusive of both ends),\n * or an empty array if `target` is not in the current tree. Searched fresh each\n * call so it stays correct after add/remove/presence mutations rebuild subtrees.\n */\n pathTo(target: TreeNode): TreeNode[] {\n const walk = (node: TreeNode, trail: TreeNode[]): TreeNode[] | null => {\n const here = [...trail, node];\n if (node === target) return here;\n for (const child of node.children) {\n const found = walk(child, here);\n if (found) return found;\n }\n return null;\n };\n return this.root ? (walk(this.root, []) ?? []) : [];\n }\n\n toggle(node: TreeNode) {\n if (this.expanded.has(node.id)) this.expanded.delete(node.id);\n else this.expanded.add(node.id);\n }\n\n /** Append a new item to a list node's FormArray and to the tree, then select it. */\n addItem(listNode: TreeNode) {\n const list = listNode.list;\n if (!list) return;\n const group = buildFormFromSchema(list.itemSchema);\n list.array.push(group);\n const item = this.buildTree(list.itemSchema, group, list.itemLabel);\n item.removable = { array: list.array, index: list.array.length - 1 };\n listNode.children.push(item);\n this.renumber(listNode);\n this.expanded.add(listNode.id);\n this.select(item);\n }\n\n /** Remove a list item from its FormArray and the tree (down to `minItems`). */\n removeItem(listNode: TreeNode, item: TreeNode) {\n if (!listNode.list || !item.removable) return;\n if (listNode.list.array.length <= listNode.list.minItems) return;\n listNode.list.array.removeAt(item.removable.index);\n listNode.children.splice(listNode.children.indexOf(item), 1);\n this.renumber(listNode);\n if (this.selected === item) this.select(listNode);\n }\n\n /** Enable or disable an optional (presence) group by adding/removing its control. */\n setPresence(node: TreeNode, present: boolean) {\n const p = node.presence;\n if (!p) return;\n if (present) {\n if (!(p.parentGroup.get(p.key) instanceof FormGroup)) {\n const group = buildFormFromSchema(p.schema);\n p.parentGroup.addControl(p.key, group);\n const built = this.buildTree(p.schema, group, node.label);\n node.children = built.children;\n node.leaves = built.leaves;\n node.leafLists = built.leafLists;\n node.group = group;\n }\n node.present = true;\n this.select(node);\n } else {\n p.parentGroup.removeControl(p.key);\n node.children = [];\n node.leaves = [];\n node.leafLists = [];\n node.group = null;\n node.present = false;\n }\n }\n\n protected readonly asFormControl = asFormControl;\n protected readonly asFormArray = asFormArray;\n\n private placeholder(label: string): TreeNode {\n return { id: String(this.nextId++), label, children: [], leaves: [], leafLists: [], group: null };\n }\n\n /** Re-index and re-label a list node's item children (just \"#n\") after add/remove. */\n private renumber(listNode: TreeNode): void {\n listNode.children.forEach((child, i) => {\n if (child.removable) child.removable.index = i;\n child.label = `#${i + 1}`;\n });\n }\n\n private buildTree(schema: NodeGroup, group: FormGroup, label: string): TreeNode {\n const leaves: TreeNode['leaves'] = [];\n const leafLists: TreeNode['leafLists'] = [];\n const children: TreeNode[] = [];\n\n for (const key of Object.keys(schema.children)) {\n const child = schema.children[key];\n if (child.kind === 'leaf') {\n leaves.push({ key, node: child });\n } else if (child.kind === 'leafList') {\n leafLists.push({ key, node: child });\n } else if (child.kind === 'nodeGroup') {\n const childGroup = group.get(key);\n if (child.presence) {\n // Optional group: always a tree node — a placeholder when absent.\n const node =\n childGroup instanceof FormGroup\n ? this.buildTree(child, childGroup, child.label ?? key)\n : this.placeholder(child.label ?? key);\n node.presence = { parentGroup: group, key, schema: child };\n node.present = childGroup instanceof FormGroup;\n children.push(node);\n } else if (childGroup instanceof FormGroup) {\n children.push(this.buildTree(child, childGroup, child.label ?? key));\n }\n } else if (child.kind === 'nodeGroupList') {\n const array = group.get(key);\n const itemLabel = child.type.label ?? child.type.name;\n const items =\n array instanceof FormArray\n ? array.controls\n .filter((c): c is FormGroup => c instanceof FormGroup)\n .map((item, i) => {\n // Just \"#n\": the item sits under its list node, so repeating the\n // item name (e.g. \"Interface #1\") only echoes the parent.\n const node = this.buildTree(child.type, item, `#${i + 1}`);\n node.removable = { array, index: i };\n return node;\n })\n : [];\n children.push({\n id: String(this.nextId++),\n label: child.label ?? key,\n children: items,\n leaves: [],\n leafLists: [],\n group: null,\n list:\n array instanceof FormArray\n ? { array, itemSchema: child.type, itemLabel, minItems: child.minItems ?? 0 }\n : undefined,\n });\n }\n // choice nodes are not shown in the tree yet.\n }\n\n return { id: String(this.nextId++), label, children, leaves, leafLists, group };\n }\n}\n","<div class=\"editor\">\n <nav class=\"tree\">\n <ng-template #treeNode let-node let-depth=\"depth\" let-parent=\"parent\">\n <div\n class=\"tree-row\"\n [class.selected]=\"node === selected\"\n [style.padding-left.px]=\"8 + depth * 16\"\n (click)=\"select(node)\"\n >\n @if (node.children.length) {\n <button\n matIconButton\n class=\"twisty\"\n (click)=\"toggle(node); $event.stopPropagation()\"\n [attr.aria-label]=\"expanded.has(node.id) ? 'Collapse' : 'Expand'\"\n >\n <mat-icon>{{ expanded.has(node.id) ? 'expand_more' : 'chevron_right' }}</mat-icon>\n </button>\n } @else {\n <span class=\"twisty-spacer\"></span>\n }\n\n @if (node.presence) {\n <mat-checkbox\n class=\"presence-check\"\n [checked]=\"!!node.present\"\n [disabled]=\"!editable\"\n (change)=\"setPresence(node, $event.checked)\"\n (click)=\"$event.stopPropagation()\"\n ></mat-checkbox>\n }\n <span class=\"tree-label\" [class.absent]=\"node.presence && !node.present\">{{ node.label }}</span>\n\n @if (editable && node.list) {\n <button\n matIconButton\n class=\"row-btn add\"\n [matTooltip]=\"'Add ' + node.list.itemLabel\"\n (click)=\"addItem(node); $event.stopPropagation()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable && node.removable) {\n <button\n matIconButton\n class=\"row-btn remove\"\n matTooltip=\"Remove\"\n (click)=\"removeItem(parent, node); $event.stopPropagation()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n\n @if (expanded.has(node.id)) {\n @for (child of node.children; track child.id) {\n <ng-container\n *ngTemplateOutlet=\"treeNode; context: { $implicit: child, depth: depth + 1, parent: node }\"\n />\n }\n }\n </ng-template>\n\n <ng-container *ngTemplateOutlet=\"treeNode; context: { $implicit: root, depth: 0 }\" />\n </nav>\n\n <section class=\"detail\">\n @if (selected) {\n <nav class=\"breadcrumb\" aria-label=\"Breadcrumb\">\n @for (crumb of pathTo(selected); track crumb.id; let last = $last) {\n @if (last) {\n <span class=\"crumb-current\" aria-current=\"page\">{{ crumb.label }}</span>\n } @else {\n <button type=\"button\" class=\"item-link crumb-link\" (click)=\"select(crumb)\">{{ crumb.label }}</button>\n <span class=\"crumb-sep\" aria-hidden=\"true\">/</span>\n }\n }\n </nav>\n }\n @if (selected && selected.group) {\n <div class=\"group-body\">\n <div class=\"fields\" [formGroup]=\"selected.group\">\n @for (leaf of selected.leaves; track leaf.key) {\n <nff-leaf-renderer\n [leaf_]=\"leaf.node\"\n [control]=\"asFormControl(selected.group.get(leaf.key))\"\n [editable]=\"editable\"\n />\n }\n @for (list of selected.leafLists; track list.key) {\n <nff-leaf-list-renderer\n [leaf_]=\"list.node\"\n [formArray]=\"asFormArray(selected.group.get(list.key))\"\n [editable]=\"editable\"\n />\n }\n @if (!selected.leaves.length && !selected.leafLists.length && !selected.children.length) {\n <p class=\"empty\">This node has no fields.</p>\n }\n </div>\n @if (selected.children.length) {\n <nav class=\"child-links\">\n <h4 class=\"child-links-title\">Sections</h4>\n @for (child of selected.children; track child.id) {\n <button type=\"button\" class=\"item-link child-link\" (click)=\"open(selected, child)\">\n <mat-icon>chevron_right</mat-icon>{{ child.label }}\n </button>\n }\n </nav>\n }\n </div>\n } @else if (selected && selected.presence && !selected.present) {\n <p class=\"empty\">This optional group is off. Tick its box in the tree to add it.</p>\n } @else if (selected && selected.list) {\n @if (selected.children.length) {\n <ul class=\"item-list\">\n @for (item of selected.children; track item.id) {\n <li class=\"item-row\">\n <button type=\"button\" class=\"item-link\" (click)=\"open(selected, item)\">{{ item.label }}</button>\n @if (editable && item.removable) {\n <button\n matIconButton\n class=\"row-btn remove-item\"\n matTooltip=\"Remove\"\n (click)=\"removeItem(selected, item)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <p class=\"empty\">No {{ selected.list.itemLabel }} items yet.</p>\n }\n @if (editable) {\n <div class=\"list-actions\">\n <button matButton (click)=\"addItem(selected)\">\n <mat-icon>add</mat-icon> Add {{ selected.list.itemLabel }}\n </button>\n </div>\n }\n } @else {\n <p class=\"empty\">Select a node on the left to edit its fields.</p>\n }\n </section>\n</div>\n","/*\n * Public API Surface of ng-form-foundry\n */\n\nexport * from './lib/types/dynamic-recursive.types';\nexport * from './lib/core/dynamic-recursive-forms-builder';\nexport * from './lib/dynamic-recursive-form/dynamic-recursive-form.component';\nexport * from './lib/config-editor/config-editor.component';\nexport * from './lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component';\nexport * from './lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component';\nexport * from './lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component';\nexport * from './lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component';\n","/**\n * Generated bundle index. Do not edit.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A,UAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKhB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAhBjC,SAAS;+BACE,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP;wBACP,mBAAmB;wBACnB,gBAAgB;wBAChB,aAAa;wBACb,eAAe;wBACf,iBAAiB;wBACjB,UAAU;wBACV,qBAAqB;wBACrB,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,46KAAA,EAAA,MAAA,EAAA,CAAA,knFAAA,CAAA,EAAA;;sBAKA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB;;;AEnEH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-form-foundry.mjs","sources":["../../../projects/ng-form-foundry/src/lib/types/dynamic-recursive.types.ts","../../../projects/ng-form-foundry/src/lib/core/dynamic-recursive-forms-builder.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/anon-leaf-renderer/anon-leaf-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/anon-leaf-renderer/anon-leaf-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component.html","../../../projects/ng-form-foundry/src/lib/core/utils.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-map-renderer/node-map-renderer.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/node-map-renderer/node-map-renderer.component.html","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/dynamic-recursive-form.component.ts","../../../projects/ng-form-foundry/src/lib/dynamic-recursive-form/dynamic-recursive-form.component.html","../../../projects/ng-form-foundry/src/lib/config-editor/config-editor.component.ts","../../../projects/ng-form-foundry/src/lib/config-editor/config-editor.component.html","../../../projects/ng-form-foundry/src/public-api.ts","../../../projects/ng-form-foundry/src/ng-form-foundry.ts"],"sourcesContent":["import { FormArray, FormControl, FormGroup } from '@angular/forms';\n\nexport type LeafRuntimeType<T> = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'enum'\n ? string | number\n : never;\n\nexport type LeafBase = {\n kind: 'leaf';\n name: string;\n required?: true | undefined;\n label?: string;\n description?: string;\n /**\n * The value may be `null` (JSON Schema `type: [T, 'null']`). Builds a nullable\n * control (drops `nonNullable`), so `null` is a first-class value the\n * constraint validators accept and that survives the round-trip. Distinct from\n * {@link presence}: `nullable` is an explicit `null`, `presence` is an absent key.\n */\n nullable?: boolean;\n /**\n * Optional scalar whose *presence itself* is data (mirrors {@link NodeGroup.presence}).\n * Rendered with an on/off toggle; the control is removed from the parent group\n * when absent (so it drops from `form.value`) and re-added when toggled on. The\n * builder omits it unless an initial value is supplied.\n */\n presence?: boolean;\n /**\n * Render the field read-only even when the surrounding form is editable.\n * Combine with `default` to express a JSON Schema `const` (a fixed,\n * display-only value); single-element `enum` is the alternative for a constant.\n */\n readOnly?: boolean;\n};\n\nexport type AnonLeaf = {\n [K in Leaf['type']]: { type: K };\n}[Leaf['type']];\n\nexport type LeafString = LeafBase & {\n type: 'string';\n default?: LeafRuntimeType<'string'>;\n /**\n * Reject values that don't match this regular expression. Follows JSON Schema\n * `pattern` semantics — an *unanchored* `RegExp.test`, so it matches anywhere\n * in the value unless the pattern itself anchors with `^`/`$`.\n */\n pattern?: string;\n /** Minimum string length (JSON Schema `minLength`). */\n minLength?: number;\n /** Maximum string length (JSON Schema `maxLength`). */\n maxLength?: number;\n /** Semantic string format (JSON Schema `format`); adds a matching validator. */\n format?: 'email' | 'uri' | 'url';\n};\nexport type LeafNumber = LeafBase & {\n type: 'number';\n default?: LeafRuntimeType<'number'>;\n /** Require a whole-number value (JSON Schema `type: 'integer'`). */\n integer?: boolean;\n /** Inclusive lower bound (JSON Schema `minimum`). */\n min?: number;\n /** Inclusive upper bound (JSON Schema `maximum`). */\n max?: number;\n /** Require the value to be an integer multiple of this number (JSON Schema `multipleOf`). */\n multipleOf?: number;\n};\nexport type LeafBoolean = LeafBase & {\n type: 'boolean';\n default?: LeafRuntimeType<'boolean'>;\n};\nexport type LeafEnum = LeafBase & {\n type: 'enum';\n default?: LeafRuntimeType<'enum'>;\n enumLabel?: string[];\n enum: LeafRuntimeType<'enum'>[];\n};\n\nexport type Appearance = {\n flatten?: boolean;\n noBorder?: boolean;\n /** Start this node's section panel collapsed. Ignored when `flatten` is set. */\n collapsed?: boolean;\n}\n\nexport type Leaf = LeafString | LeafNumber | LeafBoolean | LeafEnum;\n\nexport type LeafList<TKind extends Leaf['type'] = Leaf['type']> = {\n kind: 'leafList';\n label?: string;\n name: string;\n description?: string;\n default?: Exclude<Leaf['default'], undefined>[];\n type: TKind;\n minItems?: number;\n maxItems?: number;\n};\n\nexport type NodeGroupList = {\n kind: 'nodeGroupList';\n name: string;\n label?: string;\n description?: string;\n type: NodeGroup;\n minItems?: number;\n maxItems?: number;\n};\n\nexport type NodeGroup = {\n kind: 'nodeGroup';\n name: string;\n subType?: string;\n label?: string;\n root?: boolean;\n /**\n * When true, the group is optional: rendered with an on/off toggle and present\n * in the form only while enabled. Its control is removed from the parent\n * FormGroup when absent (so it drops from `form.value`) and re-added when the\n * user toggles it on. The builder omits it unless an initial value is supplied.\n */\n presence?: boolean;\n description?: string;\n children: Record<string, NodeType>;\n appearance?: Appearance;\n};\n\n/**\n * One case of a {@link NodeChoice}: either a record of named fields (an object\n * branch), or a single node (a *leaf-bodied* case — e.g. an `anyOf` branch that\n * is a bare scalar). A single node is normalized to a one-field record keyed by\n * its `name` when the form is built.\n */\nexport type ChoiceCase = Record<string, NodeType> | NodeType;\n\n/**\n * A discriminated selection: the user picks one `case`, and only that case's\n * fields are present. In the form it is a FormGroup holding a `__case` control\n * (the active case name) plus that case's field controls; switching the case\n * swaps the field controls.\n *\n * Cases may be **anonymous / auto-named** (any string key) — for JSON Schema\n * `anyOf`/`oneOf` branches with no name. When a built form is seeded from inline\n * data that carries no `__case`, the builder **infers** the active case from the\n * data shape (the case whose fields best match), so a choice round-trips from\n * real instance data. See the schema reference for the required-set / `const`\n * discriminator recipe.\n */\nexport type NodeChoice = {\n kind: 'choice';\n name: string;\n label?: string;\n cases: Record<string, ChoiceCase>;\n /**\n * Display labels for cases, keyed by case name — for anonymous/auto-named\n * branches whose keys are not human-friendly. Falls back to the case name.\n */\n caseLabels?: Record<string, string>;\n default?: string;\n mandatory?: boolean;\n /** Optional choice: rendered with an on/off toggle, omitted from the value when absent. */\n presence?: boolean;\n appearance?: Appearance;\n};\n\n/** The control name that records which case of a {@link NodeChoice} is active. */\nexport const CASE_KEY = '__case';\n\n/**\n * An open, arbitrary-keyed record: unlike {@link NodeGroup} (a fixed, declared\n * key set), a map's keys are runtime data and every value conforms to one shared\n * `value` schema. Maps JSON Schema `additionalProperties: <schema>` /\n * `patternProperties`. In the form it is a `FormGroup` whose control *names* are\n * the entry keys, so `getRawValue()` is the map object directly; the renderer\n * lets the user add, remove, and rename entries.\n */\nexport type NodeMap = {\n kind: 'map';\n name: string;\n label?: string;\n description?: string;\n /** The schema every entry's value conforms to. */\n value: NodeType;\n /** Label for the key column in the editor. Defaults to \"Key\". */\n keyLabel?: string;\n /** `patternProperties`: entry keys must match this regular expression. */\n keyPattern?: string;\n /** Minimum number of entries (JSON Schema `minProperties`). */\n minEntries?: number;\n /** Maximum number of entries (JSON Schema `maxProperties`). */\n maxEntries?: number;\n /** Optional map: rendered with an on/off toggle, omitted from the value when absent. */\n presence?: boolean;\n appearance?: Appearance;\n};\n\nexport type NodeType = Leaf | LeafList | NodeGroup | NodeGroupList | NodeChoice | NodeMap;\nexport type DFormControl<T extends NodeType> = T extends Leaf\n ? FormControl<LeafRuntimeType<T['type']>>\n : T extends LeafList\n ? FormArray<FormControl<LeafRuntimeType<T['type']>>>\n : T extends NodeGroup\n ? DFormGroup<T>\n : T extends NodeGroupList\n ? FormArray<DFormGroup<T['type']>>\n : T extends NodeChoice\n ? FormGroup<any>\n : T extends NodeMap\n ? FormGroup<any>\n : never;\n\nexport type FormGroupType<T extends NodeGroup> = {\n [TChild in keyof T['children']]: DFormControl<T['children'][TChild]>;\n};\nexport type DFormGroup<T extends NodeGroup> = FormGroup<FormGroupType<T>>;\n","import {\n FormArray,\n FormControl,\n FormGroup,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {\n CASE_KEY,\n ChoiceCase,\n DFormControl,\n DFormGroup,\n FormGroupType,\n Leaf,\n LeafBase,\n LeafEnum,\n LeafList,\n LeafNumber,\n LeafRuntimeType,\n LeafString,\n NodeChoice,\n NodeGroup,\n NodeGroupList,\n NodeMap,\n NodeType,\n} from '../types/dynamic-recursive.types';\n\n// --- type guards\nfunction isLeaf(node: NodeType): node is Leaf {\n return node.kind === 'leaf';\n}\n\nfunction isLeafList(node: NodeType): node is LeafList {\n return node.kind === 'leafList';\n}\nfunction isNodeGroup(node: NodeType): node is NodeGroup {\n return node.kind === 'nodeGroup';\n}\nfunction isNodeGroupList(node: NodeType): node is NodeGroupList {\n return node.kind === 'nodeGroupList';\n}\nfunction isChoice(node: NodeType): node is NodeChoice {\n return node.kind === 'choice';\n}\nfunction isMap(node: NodeType): node is NodeMap {\n return node.kind === 'map';\n}\n\nfunction enumValidator(choices: readonly (string | number)[]): ValidatorFn {\n const set = new Set(choices);\n return (ctrl) =>\n ctrl.value == null || set.has(ctrl.value) ? null : { enum: true };\n}\n\n/**\n * JSON Schema `pattern`: an *unanchored* `RegExp.test`, unlike Angular's built-in\n * `Validators.pattern` which anchors the expression. An invalid regex disables\n * the check rather than throwing. Empty/absent values pass (use `required`).\n */\nfunction patternValidator(pattern: string): ValidatorFn {\n let re: RegExp;\n try {\n re = new RegExp(pattern);\n } catch {\n return () => null;\n }\n return (ctrl) => {\n const v = ctrl.value;\n if (v == null || v === '') return null;\n return re.test(String(v)) ? null : { pattern: { requiredPattern: pattern, actualValue: v } };\n };\n}\n\n/** JSON Schema `type: 'integer'`: reject a value that is not a whole number. */\nfunction integerValidator(): ValidatorFn {\n return (ctrl) => {\n const v = ctrl.value;\n if (v == null || v === '') return null;\n const num = typeof v === 'number' ? v : Number(v);\n return Number.isInteger(num) ? null : { integer: true };\n };\n}\n\n/** JSON Schema `multipleOf`: reject a value that is not an integer multiple of `step`. */\nfunction multipleOfValidator(step: number): ValidatorFn {\n return (ctrl) => {\n const v = ctrl.value;\n if (v == null || v === '') return null;\n const num = typeof v === 'number' ? v : Number(v);\n if (Number.isNaN(num)) return null;\n const ratio = num / step;\n // A small tolerance absorbs binary float drift (e.g. 0.3 / 0.1).\n return Math.abs(ratio - Math.round(ratio)) < 1e-9\n ? null\n : { multipleOf: { multipleOf: step, actual: num } };\n };\n}\n\n/** JSON Schema `format: uri`: reject a string that is not a parseable absolute URI. */\nfunction uriValidator(): ValidatorFn {\n return (ctrl) => {\n const v = ctrl.value;\n if (v == null || v === '') return null;\n try {\n new URL(String(v));\n return null;\n } catch {\n return { uri: true };\n }\n };\n}\n\nfunction buildLeafControl<L extends Leaf>(\n leaf: L,\n initial?: unknown,\n): FormControl<LeafRuntimeType<L['type']>> {\n const validators: ValidatorFn[] = [];\n if ('required' in leaf && leaf.required) validators.push(Validators.required);\n if ('type' in leaf && leaf.type === 'enum') {\n const choices = (leaf as LeafEnum).enum as (string | number)[];\n validators.push(enumValidator(choices));\n }\n if (leaf.type === 'string') {\n const s = leaf as LeafString;\n if (s.pattern != null) validators.push(patternValidator(s.pattern));\n if (s.minLength != null) validators.push(Validators.minLength(s.minLength));\n if (s.maxLength != null) validators.push(Validators.maxLength(s.maxLength));\n if (s.format === 'email') validators.push(Validators.email);\n else if (s.format === 'uri' || s.format === 'url') validators.push(uriValidator());\n } else if (leaf.type === 'number') {\n const n = leaf as LeafNumber;\n if (n.integer) validators.push(integerValidator());\n if (n.min != null) validators.push(Validators.min(n.min));\n if (n.max != null) validators.push(Validators.max(n.max));\n if (n.multipleOf != null) validators.push(multipleOfValidator(n.multipleOf));\n }\n const defaultValue =\n initial ?? ('default' in leaf ? (leaf as any).default : undefined) ?? null;\n // A nullable leaf drops `nonNullable`, so `null` is a first-class value that\n // `reset()` restores and that survives the round-trip (JSON Schema `null`).\n // The typed model still treats a leaf value as non-null, so the runtime\n // nullable control is cast back to the declared type.\n const nullable = 'nullable' in leaf && (leaf as LeafBase).nullable === true;\n return new FormControl<LeafRuntimeType<L['type']>>(defaultValue, {\n nonNullable: !nullable,\n validators,\n }) as FormControl<LeafRuntimeType<L['type']>>;\n}\n\nfunction buildLeafListControl<L extends LeafList>(\n list: L,\n initial: LeafRuntimeType<L['type']>[] | null,\n): FormArray<FormControl<LeafRuntimeType<LeafList['type']> | null>> {\n const values = (Array.isArray(initial) ? initial : undefined) ??\n list.default ?? [null];\n return new FormArray(values.map((v) => new FormControl(v)));\n}\n\nfunction buildNodeGroupControl<G extends NodeGroup>(\n group: G,\n initial?: Record<string, unknown> | null,\n): DFormGroup<G> {\n const controls: any = {} as Partial<FormGroupType<G>>;\n for (const key in group.children) {\n const child = group.children[key];\n // Forward only this child's slice of the initial data, keyed by the child's\n // record key. Passing the whole `initial` object seeds every leaf with the\n // parent record and prevents list builders from sizing to the real data.\n controls[key] = buildControl(\n child,\n initial?.[key],\n ) as FormGroupType<G>[typeof key];\n }\n return new FormGroup(controls as FormGroupType<G>) as DFormGroup<G>;\n}\n\nfunction buildNodeGroupListControl<GL extends NodeGroupList>(\n list: GL,\n initial: unknown[] | null = null,\n): FormArray<DFormGroup<GL['type']>> {\n // `initial` is the runtime data array — one group per element. Fall back to a\n // single empty group only when no initial data is supplied.\n const values = Array.isArray(initial) ? initial : [null];\n return new FormArray(\n values.map((v) =>\n buildNodeGroupControl(list.type, v as Record<string, unknown> | null),\n ),\n );\n}\n\n/**\n * Build the `AbstractControl` for a single schema node.\n *\n * Dispatches on `node.kind`: a `leaf` becomes a `FormControl`, a `leafList` a\n * `FormArray` of controls, a `nodeGroup` a nested `FormGroup`, and a\n * `nodeGroupList` a `FormArray` of groups. `initial` is the runtime value for\n * this node — a scalar for a leaf, an array for a list, an object for a group —\n * and seeds the control's value (falling back to the node's `default`).\n *\n * Most callers use {@link buildFormFromSchema}; this is exposed for building a\n * control from a single non-root node.\n */\n/**\n * Build the FormGroup for a choice: a `__case` control holding the active case\n * name plus that case's field controls. Only the active case's fields are built,\n * matching the inline YANG encoding; switching the case swaps them.\n */\n/**\n * Normalize a {@link ChoiceCase} to a field record. A field record is returned\n * as-is; a single node (a leaf-bodied case, e.g. a scalar `anyOf` branch) becomes\n * a one-field record keyed by the node's `name`. The discriminant is a top-level\n * `kind` string, which a field record never has (its keys are field names).\n */\nexport function caseFields(body: ChoiceCase): Record<string, NodeType> {\n return typeof (body as { kind?: unknown }).kind === 'string'\n ? { [(body as NodeType).name]: body as NodeType }\n : (body as Record<string, NodeType>);\n}\n\n/**\n * The active case of a choice: an explicit `__case` in the initial value, else\n * the case whose fields best match the initial data (inline wire data carries no\n * `__case`), else the schema `default`. This lets a choice seed from real\n * instance data whose branch is discriminated by which fields are present.\n */\nexport function resolveChoiceCase(\n choice: NodeChoice,\n initial?: Record<string, unknown> | null,\n): string | undefined {\n const explicit = initial?.[CASE_KEY];\n if (typeof explicit === 'string') return explicit;\n return inferChoiceCase(choice, initial) ?? choice.default;\n}\n\n/** Pick the case whose fields most overlap the initial data (none if nothing matches). */\nfunction inferChoiceCase(choice: NodeChoice, initial?: Record<string, unknown> | null): string | undefined {\n if (!initial) return undefined;\n let best: string | undefined;\n let bestScore = 0;\n for (const name of Object.keys(choice.cases)) {\n const fields = Object.keys(caseFields(choice.cases[name]));\n let score = 0;\n for (const field of fields) if (field in initial) score++;\n if (score > bestScore) {\n bestScore = score;\n best = name;\n }\n }\n return best;\n}\n\nfunction buildChoiceControl(\n choice: NodeChoice,\n initial?: Record<string, unknown> | null,\n): FormGroup {\n const active = resolveChoiceCase(choice, initial);\n const controls: any = { [CASE_KEY]: new FormControl(active ?? null) };\n if (active && choice.cases[active]) {\n const caseChildren = caseFields(choice.cases[active]);\n for (const key in caseChildren) {\n controls[key] = buildControl(caseChildren[key], initial?.[key]);\n }\n }\n return new FormGroup(controls);\n}\n\n/**\n * Switch a choice's FormGroup to `caseName`: sets `__case`, removes every other\n * control, and builds `caseName`'s fields (normalized via {@link caseFields})\n * with their defaults. An unknown case name leaves only `__case`.\n */\nexport function switchChoiceCase(group: FormGroup, choice: NodeChoice, caseName: string): void {\n group.get(CASE_KEY)?.setValue(caseName);\n for (const name of Object.keys(group.controls)) {\n if (name !== CASE_KEY) group.removeControl(name);\n }\n const caseChildren = choice.cases[caseName] ? caseFields(choice.cases[caseName]) : {};\n for (const name in caseChildren) {\n group.addControl(name, buildControl(caseChildren[name]) as any);\n }\n}\n\n/**\n * Append a map entry built from `map.value` and return its committed key, or\n * `null` when nothing was added. With no `key`, the first free `keyN`\n * placeholder is generated (not checked against `keyPattern` — placeholders are\n * meant to be renamed). An explicit `key` is rejected when it duplicates an\n * existing entry or violates `keyPattern`. Rejects when `maxEntries` is reached.\n */\nexport function addMapEntry(group: FormGroup, map: NodeMap, key?: string): string | null {\n if (map.maxEntries != null && Object.keys(group.controls).length >= map.maxEntries) return null;\n let committed: string;\n if (key != null) {\n if (group.contains(key)) return null;\n if (map.keyPattern && !new RegExp(map.keyPattern).test(key)) return null;\n committed = key;\n } else {\n let n = Object.keys(group.controls).length + 1;\n committed = `key${n}`;\n while (group.contains(committed)) committed = `key${++n}`;\n }\n group.addControl(committed, buildControl(map.value) as any);\n return committed;\n}\n\n/**\n * Rename entry `oldKey` to `newKey.trim()`, preserving the control instance\n * (remove + re-add, so the value survives). Returns whether the rename was\n * committed: an empty, unchanged, duplicate, or `keyPattern`-violating key is a\n * no-op, leaving the entry under its current name.\n */\nexport function renameMapEntry(group: FormGroup, map: NodeMap, oldKey: string, newKey: string): boolean {\n const committed = newKey.trim();\n if (!committed || committed === oldKey || group.contains(committed)) return false;\n if (map.keyPattern && !new RegExp(map.keyPattern).test(committed)) return false;\n const control = group.get(oldKey);\n if (!control) return false;\n group.removeControl(oldKey);\n group.addControl(committed, control);\n return true;\n}\n\n/** Remove entry `key` unless the map is at `minEntries`. Returns whether it was removed. */\nexport function removeMapEntry(group: FormGroup, map: NodeMap, key: string): boolean {\n if (!group.contains(key)) return false;\n if (map.minEntries != null && Object.keys(group.controls).length <= map.minEntries) return false;\n group.removeControl(key);\n return true;\n}\n\n/**\n * Build the FormGroup for a map: one control per entry, keyed by the entry key,\n * each built from the map's shared `value` schema. Because the entry keys are the\n * control names, `getRawValue()` is the map object directly. Empty when no\n * initial object is supplied; the renderer adds/removes/renames entries.\n */\nfunction buildMapControl(\n map: NodeMap,\n initial?: Record<string, unknown> | null,\n): FormGroup {\n const controls: any = {};\n const source = initial && typeof initial === 'object' && !Array.isArray(initial) ? initial : {};\n for (const key of Object.keys(source)) {\n controls[key] = buildControl(map.value, source[key]);\n }\n return new FormGroup(controls);\n}\n\nexport function buildControl<T extends NodeType>(\n node: T,\n initial?: unknown | null,\n): DFormControl<T> | FormControl<LeafRuntimeType<any>> | FormArray<any> {\n if (isLeaf(node)) {\n return buildLeafControl(node, initial);\n }\n if (isChoice(node)) {\n return buildChoiceControl(\n node,\n initial ? (initial as Record<string, unknown>) : null,\n ) as DFormControl<T>;\n }\n if (isMap(node)) {\n return buildMapControl(\n node,\n initial ? (initial as Record<string, unknown>) : null,\n ) as DFormControl<T>;\n }\n if (isLeafList(node)) {\n return buildLeafListControl(\n node,\n initial !== null\n ? (initial as LeafRuntimeType<(T & LeafList)['type']>[])\n : initial,\n ) as DFormControl<T>;\n }\n if (isNodeGroup(node)) {\n return buildNodeGroupControl(\n node,\n initial ? (initial as Record<string, unknown>) : null,\n ) as DFormControl<T>;\n }\n if (isNodeGroupList(node)) {\n return buildNodeGroupListControl(\n node,\n initial ? (initial as unknown[]) : null,\n ) as DFormControl<T>;\n }\n return new FormControl(initial ?? '') as DFormControl<T>;\n}\n\n/**\n * Build a typed `FormGroup` from a root `NodeGroup` schema.\n *\n * The returned group's control structure, keys, and value types are inferred\n * from the schema literal — a `leaf` of `type: 'number'` yields a\n * `FormControl<number>`, a `nodeGroup` a nested `FormGroup`, and so on. `initial`\n * is an optional value object keyed by the schema's `children` keys; each child\n * control is seeded from its matching slice (falling back to the node `default`).\n *\n * Inference only holds when `schema`'s literal type is preserved. Author schemas\n * with {@link defineSchema} or a `satisfies NodeGroup` annotation — never\n * `const schema: NodeGroup = ...`, which widens `children` and erases the field\n * names and value types.\n */\n/**\n * Remove presence nodes that have no initial value so they are absent from the\n * built form (and from `form.value`) until the user toggles them on. Applies to\n * presence groups, leaves, maps, and choices. Runs on the fully-built, attached\n * tree. `removeControl` is used rather than `disable` because a disabled control\n * is still included in `FormGroup.value`.\n */\nfunction applyPresence(\n group: FormGroup,\n schema: NodeGroup,\n initial?: Record<string, unknown> | null,\n): void {\n for (const key in schema.children) {\n const child = schema.children[key];\n const childInitial = (initial as Record<string, unknown> | null | undefined)?.[key];\n if (child.kind === 'leaf' || child.kind === 'map' || child.kind === 'choice') {\n if (child.presence && childInitial == null) group.removeControl(key);\n continue;\n }\n if (child.kind !== 'nodeGroup') continue;\n if (child.presence && childInitial == null) {\n group.removeControl(key);\n } else if (group.get(key) instanceof FormGroup) {\n applyPresence(group.get(key) as FormGroup, child, childInitial as Record<string, unknown> | null);\n }\n }\n}\n\nexport function buildFormFromSchema<S extends NodeGroup>(\n schema: S,\n initial: Record<string, unknown> | null = null,\n): DFormGroup<S> {\n const group = buildNodeGroupControl<S>(schema, initial);\n applyPresence(group, schema, initial);\n return group;\n}\n\n/**\n * Capture a schema literal with its exact type while checking it against\n * `NodeGroup`.\n *\n * This is an identity function whose only job is the `const` type parameter,\n * which keeps the narrow literal type of `schema` (field names, each node's\n * `type`) instead of widening it to `NodeGroup`. Assigning a schema to a\n * `: NodeGroup`-annotated constant widens `children` to\n * `Record<string, NodeType>` and erases that information, so\n * {@link buildFormFromSchema} can no longer infer a typed `FormGroup`. Passing\n * the schema through `defineSchema` (or annotating it `satisfies NodeGroup`)\n * preserves the schema-to-`FormGroup` inference.\n */\nexport function defineSchema<const S extends NodeGroup>(schema: S): S {\n return schema;\n}\n","import { Component, Input } from '@angular/core';\nimport { LeafEnum } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\n@Component({\n selector: 'nff-leaf-enum-renderer',\n standalone: true,\n imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './leaf-enum-renderer.component.html',\n styleUrl: './leaf-enum-renderer.component.scss',\n})\nexport class LeafEnumRendererComponent {\n @Input() leafEnum!: LeafEnum;\n @Input() initialValue!: string;\n @Input() control = new FormControl();\n @Input() removable: boolean = false;\n @Input() remove: any;\n @Input() editable: boolean = true;\n}\n","<mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ leafEnum.label ?? leafEnum.name }}</mat-label>\n <mat-select [formControl]=\"control\" value=\"{{ control.value }}\">\n @for (option of leafEnum.enum; track $index) {\n <mat-option [value]=\"option\">{{ leafEnum.enumLabel?.[$index] ?? option }}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { AnonLeaf, Leaf } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { LeafEnumRendererComponent } from '../leaf-enum-renderer/leaf-enum-renderer.component';\n\n@Component({\n selector: 'nff-leaf-renderer',\n standalone: true,\n imports: [\n MatFormFieldModule,\n ReactiveFormsModule,\n MatInputModule,\n MatCheckboxModule,\n MatSelectModule,\n MatIconModule,\n MatButtonModule,\n MatTooltip,\n LeafEnumRendererComponent,\n ],\n templateUrl: './leaf-renderer.component.html',\n styleUrl: './leaf-renderer.component.scss',\n})\nexport class LeafRendererComponent implements OnInit, AfterViewInit {\n @Input() leaf_!: Leaf | AnonLeaf;\n @Input() control: FormControl = new FormControl();\n @Input() initialValue?: any;\n @Input() removable: boolean = false;\n @Input() editable = true;\n /** Focus the field once rendered — for fields the user just added (e.g. an enabled presence leaf). */\n @Input() autofocus = false;\n @Output() remove: EventEmitter<number> = new EventEmitter();\n\n constructor(private readonly elementRef: ElementRef<HTMLElement>) {}\n\n ngOnInit(): void {\n if (this.initialValue) {\n this.control.patchValue(this.initialValue);\n }\n }\n\n ngAfterViewInit(): void {\n if (this.autofocus) {\n // Deferred out of the change-detection pass: focusing flips the form\n // field's label-float state, which would otherwise trip NG0100.\n setTimeout(() => this.elementRef.nativeElement.querySelector<HTMLElement>('input, mat-select')?.focus());\n }\n }\n\n /** Whether this field accepts input: the form is editable and the leaf is not `readOnly`. */\n get fieldEditable(): boolean {\n return this.editable && !('name' in this.leaf_ && this.leaf_.readOnly);\n }\n\n /**\n * A human-readable message for the control's active validation error, or `''`\n * when valid. `mat-form-field` only shows it once the field is in an error\n * state (invalid and touched), so it can be bound unconditionally.\n */\n get errorText(): string {\n const e = this.control.errors;\n if (!e) return '';\n const label = 'name' in this.leaf_ ? this.leaf_.label ?? this.leaf_.name : 'Value';\n if (e['required']) return `${label} is required`;\n if (e['minlength']) return `Must be at least ${e['minlength'].requiredLength} characters`;\n if (e['maxlength']) return `Must be at most ${e['maxlength'].requiredLength} characters`;\n if (e['pattern']) return `Must match ${e['pattern'].requiredPattern ?? 'the required pattern'}`;\n if (e['email']) return 'Must be a valid email address';\n if (e['uri']) return 'Must be a valid URI';\n if (e['min']) return `Must be ≥ ${e['min'].min}`;\n if (e['max']) return `Must be ≤ ${e['max'].max}`;\n if (e['multipleOf']) return `Must be a multiple of ${e['multipleOf'].multipleOf}`;\n if (e['enum']) return 'Not an allowed value';\n return 'Invalid value';\n }\n}\n","@if ('name' in leaf_) {\n @if (leaf_.type === 'string') {\n <mat-form-field [appearance]=\"fieldEditable ? 'fill' : 'outline'\">\n <mat-label>{{ leaf_.label ?? leaf_.name }}</mat-label>\n <input [readonly]=\"!fieldEditable\" matInput type=\"text\" [formControl]=\"control\">\n <mat-error>{{ errorText }}</mat-error>\n </mat-form-field>\n } @else if (leaf_.type === 'number') {\n <mat-form-field [appearance]=\"fieldEditable ? 'fill' : 'outline'\">\n <mat-label>{{ leaf_.label ?? leaf_.name }}</mat-label>\n <input [readonly]=\"!fieldEditable\" matInput type=\"number\" [formControl]=\"control\">\n <mat-error>{{ errorText }}</mat-error>\n </mat-form-field>\n } @else if (leaf_.type === 'boolean') {\n <mat-checkbox [formControl]=\"control\">{{ leaf_.label ?? leaf_.name }}</mat-checkbox>\n } @else if (leaf_.type === 'enum') {\n <nff-leaf-enum-renderer [editable]=\"fieldEditable\" [leafEnum]=\"leaf_\" [control]=\"control\"></nff-leaf-enum-renderer>\n }\n @if (removable && editable) {\n <button matIconButton class=\"remove-button small-icon-button\" matTooltip=\"Remove\" (click)=\"remove.emit(0)\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChildren\n} from '@angular/core';\nimport { NodeGroupList } from '../../types/dynamic-recursive.types';\nimport { FormArray, FormGroup } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { DynamicRecursiveFormComponent } from '../dynamic-recursive-form.component';\nimport { buildFormFromSchema } from '../../core/dynamic-recursive-forms-builder';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@Component({\n selector: 'nff-node-group-list-renderer',\n standalone: true,\n imports: [\n forwardRef(() => DynamicRecursiveFormComponent),\n MatButtonModule,\n MatIconModule,\n MatTooltipModule,\n ],\n templateUrl: './node-group-list-renderer.component.html',\n styleUrl: './node-group-list-renderer.component.scss',\n})\nexport class NodeGroupListRendererComponent implements OnInit, AfterViewInit {\n @Input() nodeGroupList!: NodeGroupList;\n @Input() initialValue!: number[] | string[] | boolean[];\n @Input() formArray = new FormArray<any>([]);\n @Input() editable: boolean = true;\n @Input() minItems: number = 1;\n @Input() maxItems: number = 1;\n @Output() message = new EventEmitter();\n // forwardRef: DynamicRecursiveFormComponent and this component import each\n // other, so the class reference is undefined when this query is evaluated at\n // decoration time. forwardRef defers the lookup and keeps the selector valid.\n @ViewChildren(forwardRef(() => DynamicRecursiveFormComponent))\n items!: QueryList<DynamicRecursiveFormComponent>;\n\n cdr = inject(ChangeDetectorRef);\n\n ngOnInit() {\n if (this.initialValue) {\n this.formArray.patchValue(this.initialValue);\n }\n if (this.nodeGroupList.maxItems) {\n this.maxItems = this.nodeGroupList.maxItems;\n }\n if (this.nodeGroupList.minItems) {\n this.minItems = this.nodeGroupList.minItems;\n }\n }\n\n ngAfterViewInit() {\n this.items.changes.subscribe(() => {\n this.setLastEditable();\n });\n }\n\n removeItem($index: number) {\n if (this.formArray.length <= this.minItems) {\n this.message.emit({\n message: `You cannot remove the last ${this.nodeGroupList.type.name} configuration!`,\n type: 'error',\n })\n return;\n }\n this.formArray.removeAt($index);\n }\n\n addItem = (index: number) => {\n this.formArray.push(buildFormFromSchema(this.nodeGroupList.type, null));\n }\n\n setLastEditable() {\n const lastItem = this.items.last;\n if (lastItem) {\n lastItem.editable.set(true);\n }\n this.cdr.detectChanges();\n }\n\n asFormGroup(group: any) {\n return group as FormGroup;\n }\n\n getTitle($index: number) {\n let title = `${this.nodeGroupList.type.label ?? this.nodeGroupList.type.name}`;\n if (this.formArray.length > 1) {\n return `${title} #${$index + 1}`;\n }\n else {\n return title;\n }\n\n }\n}\n","@if (formArray && nodeGroupList) {\n <div class=\"fields-container\">\n @for (group of formArray.controls; track $index) {\n <div class=\"field-item\">\n <nff-dynamic-recursive-form\n [schema]=\"nodeGroupList.type\"\n [formGroup]=\"asFormGroup(group)\"\n [title]=\"getTitle($index)\"\n [index]=\"0\"\n [removable]=\"formArray.length > minItems\"\n (remove)=\"removeItem($index)\"\n [editable]=\"editable\"\n [addButtonCallback]=\"addItem\"\n />\n </div>\n }\n </div>\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { AnonLeaf } from '../../types/dynamic-recursive.types';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'nff-anon-leaf-renderer',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n MatCheckboxModule,\n MatInputModule,\n MatButtonModule,\n ],\n templateUrl: './anon-leaf-renderer.component.html',\n styleUrl: './anon-leaf-renderer.component.scss',\n})\nexport class AnonLeafRendererComponent {\n @Input() AnonLeaf!: AnonLeaf;\n @Input() initialValue!: string;\n @Input() control = new FormControl();\n @Input() removable: boolean = false;\n @Input() editable: boolean = true;\n @Input() index!: number;\n @Output() remove = new EventEmitter();\n @Input() label!: string;\n\n emitRemoveEvent() {\n this.remove.emit();\n }\n}\n","<div class=\"anon-leaf-container\">\n@if (AnonLeaf.type === 'string') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <input [readonly]=\"!editable\"\n [formControl]=\"control\"\n matInput type=\"text\" >\n @if (removable) {\n }\n </mat-form-field>\n} @else if (AnonLeaf.type === 'number') {\n <mat-form-field [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <input [readonly]=\"!editable\"\n [formControl]=\"control\"\n matInput type=\"number\">\n </mat-form-field>\n} @else if (AnonLeaf.type === 'boolean') {\n <mat-checkbox [disabled]=\"!editable\" [formControl]=\"control\">value</mat-checkbox>\n}\n @else if (AnonLeaf.type === 'enum' && 'enum' in AnonLeaf) {\n <mat-form-field>\n <mat-label>{{ label }} #{{ index + 1}}</mat-label>\n <mat-select [formControl]=\"control\">\n @for (option of (AnonLeaf.type === 'enum' ? AnonLeaf.enum : []); track $index) {\n <mat-option [value]=\"option\">{{ option }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n}\n</div>\n","import { Component, EventEmitter, HostBinding, inject, Input, OnInit, Output } from '@angular/core';\nimport { LeafList } from '../../types/dynamic-recursive.types';\nimport { FormControl } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { AnonLeafRendererComponent } from '../anon-leaf-renderer/anon-leaf-renderer.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatPrefix } from '@angular/material/input';\n\n@Component({\n selector: 'nff-leaf-list-renderer',\n standalone: true,\n imports: [\n MatIconModule,\n AnonLeafRendererComponent,\n MatButtonModule,\n MatPrefix,\n ],\n templateUrl: './leaf-list-renderer.component.html',\n styleUrl: './leaf-list-renderer.component.scss',\n})\nexport class LeafListRendererComponent implements OnInit {\n @Input() leaf_!: LeafList;\n @Input() initialValue!: number[] | string[] | boolean[];\n @Input() formArray!: any;\n @Input() editable: boolean = true;\n @Input() minItems: number = 1;\n @Output() message = new EventEmitter();\n\n matDialog = inject(MatDialog);\n\n /**\n * Take a full-width row of its own once the array holds more than one entry.\n * A multi-entry array grows vertically as its items wrap; sitting inline next\n * to a regular leaf that would stretch the leaf to match. On its own line it\n * cannot. Consumed by the `:host(.stacked)` rule.\n */\n @HostBinding('class.stacked')\n get stacked(): boolean {\n return (this.formArray?.length ?? 0) > 1;\n }\n\n ngOnInit() {\n if (this.initialValue) {\n this.formArray.patchValue(this.initialValue);\n }\n }\n\n removeItem($index: number) {\n if (this.formArray.length <= this.minItems) {\n this.message.emit({\n message: 'You cannot remove the last item!',\n type: 'error',\n })\n return;\n }\n this.formArray.removeAt($index);\n }\n\n addItem() {\n this.formArray.push(new FormControl());\n }\n}\n","@if (formArray && leaf_) {\n @for (control of formArray.controls; track $index) {\n <div class=\"field-item\">\n <nff-anon-leaf-renderer\n [AnonLeaf]=\"leaf_\" [control]=\"control\"\n [removable]=\"minItems == null || formArray.length > minItems\"\n [index]=\"$index\"\n [editable]=\"editable\"\n [label]=\"leaf_.label ?? leaf_.name\"\n (remove)=\"removeItem($index)\"\n />\n @if (editable) {\n <div class=\"actions\">\n @if (formArray.length > minItems) {\n <button class=\"remove-button small-icon-button\" matIconButton (click)=\"removeItem($index)\">\n <mat-icon matPrefix>delete</mat-icon>\n </button>\n }\n @if ($last) {\n <button class=\"add-button small-icon-button\" matIconButton (click)=\"addItem()\">\n <mat-icon matPrefix>add</mat-icon>\n </button>\n }\n <div class=\"actions-spacer\"></div>\n </div>\n }\n </div>\n }\n}\n","import { FormArray, FormControl, FormGroup } from '@angular/forms';\nimport { Leaf, NodeGroup, NodeGroupList, NodeType } from '../types/dynamic-recursive.types';\n\nexport function nodeGroupChildrenList(schema: NodeGroup): Array<{ key: string; value: NodeType }> {\n const children = schema.children ?? {};\n return Object.entries(children).map(([key, value]) => ({\n key,\n value: value as NodeType,\n }));\n}\n\nexport function nodeGroupChildrenLeafs(schema: NodeGroup): Array<{ key: string; value: Leaf }> {\n const children = schema.children ?? {};\n return Object.entries(children).reduce((acc, [key, value]) => {\n if (value.kind === 'leaf') {\n acc.push({ key, value: value as Leaf });\n }\n return acc;\n }, [] as Array<{ key: string; value: Leaf }>);\n}\n\nexport function removeNullAndEmptyArrays(value: any): any {\n if (Array.isArray(value)) {\n const cleanedArray = value\n .map(removeNullAndEmptyArrays)\n .filter(v => v != null && (typeof v !== 'object' || Object.keys(v).length > 0));\n\n return cleanedArray.length > 0 ? cleanedArray : undefined;\n }\n\n if (value && typeof value === 'object') {\n const cleanedObject = Object.fromEntries(\n Object.entries(value)\n .map(([k, v]) => [k, removeNullAndEmptyArrays(v)])\n .filter(([_, v]) => v != null && (typeof v !== 'object' || Object.keys(v).length > 0))\n );\n\n return Object.keys(cleanedObject).length > 0 ? cleanedObject : undefined;\n }\n\n return value != null ? value : undefined;\n}\n\nexport function asFormControl(control: any) {\n return control as FormControl;\n}\n\nexport function asFormArray(control: any) {\n return control as FormArray;\n}\n\nexport function asFormGroup(control: any) {\n return control as FormGroup;\n}\n\n","import { Component, forwardRef, Input, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { Leaf, NodeGroup, NodeMap } from '../../types/dynamic-recursive.types';\nimport { addMapEntry, removeMapEntry, renameMapEntry } from '../../core/dynamic-recursive-forms-builder';\nimport { asFormControl, asFormGroup } from '../../core/utils';\nimport { LeafRendererComponent } from '../leaf-renderer/leaf-renderer.component';\nimport { DynamicRecursiveFormComponent } from '../dynamic-recursive-form.component';\n\n/**\n * Renders a {@link NodeMap}: an open, arbitrary-keyed record. Each entry is a row\n * with an editable key and the shared value schema's control; the user can add,\n * remove, and rename entries. The map's control is a `FormGroup` whose control\n * names are the entry keys, so the key is edited as a *rename* (remove + re-add\n * the same control) committed on blur — see {@link renameEntry}.\n */\n@Component({\n selector: 'nff-node-map-renderer',\n standalone: true,\n imports: [\n MatButtonModule,\n MatIconModule,\n MatFormFieldModule,\n MatInputModule,\n LeafRendererComponent,\n // node-map-renderer and dynamic-recursive-form import each other (a map value\n // may be a group); forwardRef defers the reference to break the cycle.\n forwardRef(() => DynamicRecursiveFormComponent),\n ],\n templateUrl: './node-map-renderer.component.html',\n styleUrl: './node-map-renderer.component.scss',\n})\nexport class NodeMapRendererComponent implements OnInit {\n @Input() nodeMap!: NodeMap;\n @Input() formGroup = new FormGroup<any>({});\n @Input() editable = true;\n\n /** Ordered view of entry keys, kept stable across renames (`addControl` appends). */\n entryKeys: string[] = [];\n\n ngOnInit(): void {\n this.entryKeys = Object.keys(this.formGroup.controls);\n }\n\n /** The value schema as a leaf (used when `value.kind === 'leaf'`). */\n get valueLeaf(): Leaf {\n return this.nodeMap.value as Leaf;\n }\n /** The value schema as a group (used when `value.kind === 'nodeGroup'`). */\n get valueGroup(): NodeGroup {\n return this.nodeMap.value as NodeGroup;\n }\n\n get atMax(): boolean {\n return this.nodeMap.maxEntries != null && this.entryKeys.length >= this.nodeMap.maxEntries;\n }\n get atMin(): boolean {\n return this.nodeMap.minEntries != null && this.entryKeys.length <= this.nodeMap.minEntries;\n }\n\n /** Append a new entry under a unique placeholder key. Delegates to {@link addMapEntry}. */\n addEntry(): void {\n const key = addMapEntry(this.formGroup, this.nodeMap);\n if (key != null) this.entryKeys = [...this.entryKeys, key];\n }\n\n /** Drop an entry (its control leaves the group, so it drops from the value). Delegates to {@link removeMapEntry}. */\n removeEntry(key: string): void {\n if (removeMapEntry(this.formGroup, this.nodeMap, key)) {\n this.entryKeys = this.entryKeys.filter((k) => k !== key);\n }\n }\n\n /**\n * Commit an edited key by renaming its control once (the value is preserved).\n * An empty, unchanged, duplicate, or `keyPattern`-violating key is a no-op,\n * leaving the entry under its current name. Delegates to {@link renameMapEntry}.\n */\n renameEntry(oldKey: string, rawKey: string): void {\n if (renameMapEntry(this.formGroup, this.nodeMap, oldKey, rawKey)) {\n const newKey = rawKey.trim();\n this.entryKeys = this.entryKeys.map((k) => (k === oldKey ? newKey : k));\n }\n }\n\n protected readonly asFormControl = asFormControl;\n protected readonly asFormGroup = asFormGroup;\n}\n","@if (formGroup && nodeMap) {\n <div class=\"map-node\">\n @for (key of entryKeys; track key) {\n <div class=\"map-entry\">\n <mat-form-field class=\"key-field\" [appearance]=\"editable ? 'fill' : 'outline'\">\n <mat-label>{{ nodeMap.keyLabel ?? 'Key' }}</mat-label>\n <input\n matInput\n #keyInput\n [readonly]=\"!editable\"\n [value]=\"key\"\n (change)=\"renameEntry(key, keyInput.value)\"\n >\n </mat-form-field>\n\n <div class=\"value-field\">\n @if (nodeMap.value.kind === 'leaf') {\n <nff-leaf-renderer\n [leaf_]=\"valueLeaf\"\n [control]=\"asFormControl(formGroup.get(key))\"\n [editable]=\"editable\"\n />\n } @else if (nodeMap.value.kind === 'nodeGroup') {\n <nff-dynamic-recursive-form\n [schema]=\"valueGroup\"\n [formGroup]=\"asFormGroup(formGroup.get(key))\"\n [editable]=\"editable\"\n />\n }\n </div>\n\n @if (editable && !atMin) {\n <button class=\"remove-button small-icon-button\" matIconButton (click)=\"removeEntry(key)\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n }\n @if (editable && !atMax) {\n <button class=\"add-button small-icon-button\" matIconButton (click)=\"addEntry()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </div>\n}\n","import { Component, computed, forwardRef, input, model, OnInit, output } from '@angular/core';\nimport { LeafRendererComponent } from './leaf-renderer/leaf-renderer.component';\nimport { CASE_KEY, Leaf, NodeChoice, NodeGroup, NodeType } from '../types/dynamic-recursive.types';\nimport {\n FormArray,\n FormControl,\n FormGroup,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { NodeGroupListRendererComponent } from './node-group-list-renderer/node-group-list-renderer.component';\nimport { LeafListRendererComponent } from './leaf-list-renderer/leaf-list-renderer.component';\nimport { NodeMapRendererComponent } from './node-map-renderer/node-map-renderer.component';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { asFormArray, asFormControl, asFormGroup } from '../core/utils';\nimport {\n buildControl,\n buildFormFromSchema,\n caseFields,\n switchChoiceCase,\n} from '../core/dynamic-recursive-forms-builder';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\n@Component({\n imports: [\n LeafRendererComponent,\n LeafListRendererComponent,\n // node-group-list-renderer and node-map-renderer import this component back\n // (list items and map values may be groups); forwardRef tolerates either\n // module-evaluation order for the cycle.\n forwardRef(() => NodeGroupListRendererComponent),\n forwardRef(() => NodeMapRendererComponent),\n ReactiveFormsModule,\n MatExpansionModule,\n MatIconModule,\n MatButtonModule,\n NgTemplateOutlet,\n MatCardModule,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTooltip,\n ],\n selector: 'nff-dynamic-recursive-form',\n standalone: true,\n styleUrl: './dynamic-recursive-form.component.scss',\n templateUrl: './dynamic-recursive-form.component.html',\n})\nexport class DynamicRecursiveFormComponent implements OnInit {\n /** The form-description schema to render (a root or nested `NodeGroup`). */\n readonly schema = input.required<NodeGroup>();\n /** Optional value object to seed the form; keyed by the schema's `children` keys. */\n readonly initialValue = input<Record<string, unknown> | null>(null);\n /** The reactive group this form binds to. Defaults to an empty group. */\n readonly formGroup = input<FormGroup>(new FormGroup({}));\n /** Index of this form within a parent list, used by `addButtonCallback`. */\n readonly index = input<number | null>(null);\n /** Whether this form may be removed from a parent list (shows a remove control). */\n readonly removable = input<boolean>(false);\n /** Emitted when the user removes this form from a parent list. */\n readonly remove = output<void>();\n /** Card/section title; falls back to the schema label or name. */\n readonly title = input<string>();\n /** Whether fields accept input. Two-way: also toggled by the built-in edit control. */\n readonly editable = model<boolean>(false);\n /** Invoked with {@link index} to append a new sibling form to a parent list. */\n readonly addButtonCallback = input<((index: number) => void) | null>(null);\n\n /** True when the schema is a root group (rendered flat, without a wrapping card). */\n readonly root = computed(() => this.schema().root ?? false);\n\n ngOnInit() {\n const initial = this.initialValue();\n if (initial) {\n this.formGroup().patchValue(initial);\n }\n }\n\n get nodeGroupChildrenList(): Array<{ key: string; value: NodeType }> {\n const children = this.schema().children ?? {};\n return Object.entries(children).map(([key, value]) => ({\n key,\n value: value as NodeType,\n }));\n }\n\n emitRemoveEvent() {\n this.remove.emit();\n }\n\n /**\n * Add or remove a presence group's control on this form. Removing it drops the\n * group from `form.value`; adding it rebuilds the sub-group from its schema.\n */\n togglePresence(key: string, schema: NodeGroup, present: boolean) {\n const group = this.formGroup();\n if (present) {\n if (!group.get(key)) {\n group.addControl(key, buildFormFromSchema(schema));\n }\n } else if (group.get(key)) {\n group.removeControl(key);\n }\n }\n\n /** The key of the presence leaf the user just enabled; its field grabs focus when rendered. */\n protected presenceFocusKey: string | null = null;\n\n /**\n * Add or remove a presence leaf's control on this form. Removing it drops the\n * leaf from `form.value`; adding it rebuilds the control from its schema and\n * focuses the rendered field.\n */\n toggleLeafPresence(key: string, schema: Leaf, present: boolean) {\n const group = this.formGroup();\n if (present) {\n if (!group.get(key)) {\n group.addControl(key, buildControl(schema) as never);\n this.presenceFocusKey = key;\n }\n } else if (group.get(key)) {\n group.removeControl(key);\n if (this.presenceFocusKey === key) this.presenceFocusKey = null;\n }\n }\n\n /**\n * Add or remove a presence map's or choice's control on this form. Removing it\n * drops the node from `form.value`; adding it rebuilds the control (an empty\n * map, or a choice group holding `__case`) from its schema.\n */\n toggleNodePresence(key: string, schema: NodeType, present: boolean) {\n const group = this.formGroup();\n if (present) {\n if (!group.get(key)) {\n group.addControl(key, buildControl(schema) as never);\n }\n } else if (group.get(key)) {\n group.removeControl(key);\n }\n }\n\n protected readonly CASE_KEY = CASE_KEY;\n\n objectKeys(obj: Record<string, unknown>): string[] {\n return Object.keys(obj);\n }\n\n /** The active case name of a choice control, or null if none is selected. */\n activeCase(key: string): string | null {\n return (this.formGroup().get(key) as FormGroup | null)?.get(CASE_KEY)?.value ?? null;\n }\n\n /** A synthetic flattened NodeGroup used to render the active case's fields against the choice's FormGroup. */\n caseAsGroup(choice: NodeChoice, caseName: string): NodeGroup {\n return {\n kind: 'nodeGroup',\n name: choice.name,\n children: choice.cases[caseName] ? caseFields(choice.cases[caseName]) : {},\n appearance: { flatten: true },\n };\n }\n\n /** The display label for a case: the schema's `caseLabels` entry, else the case name. */\n caseLabel(choice: NodeChoice, caseName: string): string {\n return choice.caseLabels?.[caseName] ?? caseName;\n }\n\n /**\n * A copy of a group flagged to render its fields inline (no inner panel). Used\n * for a presence group's body, whose container is the presence panel itself, so\n * the group's own section panel would be a redundant second box.\n */\n flatGroup(group: NodeGroup): NodeGroup {\n return { ...group, appearance: { ...group.appearance, flatten: true } };\n }\n\n /** Swap a choice's field controls when the selected case changes. Delegates to {@link switchChoiceCase}. */\n switchCase(key: string, choice: NodeChoice, caseName: string) {\n switchChoiceCase(this.formGroup().get(key) as FormGroup, choice, caseName);\n }\n\n protected readonly asFormGroup = asFormGroup;\n protected readonly asFormArray = asFormArray;\n protected readonly asFormControl = asFormControl;\n}\n","@if (!root()) {\n <ng-template #formRender>\n <div class=\"form-content\" [formGroup]=\"formGroup()\">\n <div class=\"leafs-container\">\n <div class=\"fields\">\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leaf' && child.presence) {\n @if (formGroup().get(childItem.key)) {\n <!-- Present: the field takes the add button's place in the row; its\n remove control drops the leaf back to the unchecked state. -->\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup().get(childItem.key))\n [removable]=true\n [editable]=\"editable()\"\n [initialValue]=\"formGroup().get(childItem.key)?.value\"\n [autofocus]=\"presenceFocusKey === childItem.key\"\n (remove)=\"toggleLeafPresence(childItem.key, child, false)\"\n />\n } @else {\n <button\n matButton=\"outlined\"\n class=\"presence-leaf-add\"\n [disabled]=\"!editable()\"\n (click)=\"toggleLeafPresence(childItem.key, child, true)\"\n >\n <mat-icon>add</mat-icon> Add {{ child.label ?? child.name }}\n </button>\n }\n } @else if (child.kind == 'leaf') {\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup().get(child.name))\n [removable]=false\n [editable]=\"editable()\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leafList') {\n <nff-leaf-list-renderer\n [leaf_]=\"child\"\n [editable]=\"editable()\"\n [formArray]=\"asFormArray(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n />\n }\n }\n </div>\n </div>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroup' && child.presence) {\n <div class=\"presence-group\">\n <mat-checkbox\n [checked]=\"!!formGroup().get(childItem.key)\"\n [disabled]=\"!editable()\"\n (change)=\"togglePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n @if (formGroup().get(childItem.key)) {\n <nff-dynamic-recursive-form\n [schema]=\"flatGroup(child)\"\n [formGroup]=\"asFormGroup(formGroup().get(childItem.key))\"\n [editable]=\"editable()\"\n />\n }\n </div>\n }\n @else if (child.kind == 'nodeGroup') {\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n [editable]=\"editable()\"\n />\n }\n @else if (child.kind == 'choice') {\n @let choiceGroup = asFormGroup(formGroup().get(childItem.key));\n @let selectedCase = activeCase(childItem.key);\n <mat-expansion-panel class=\"node-section\" [expanded]=\"child.presence ? !!choiceGroup : !child.appearance?.collapsed\" togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n @if (child.presence) {\n <mat-checkbox\n [checked]=\"!!choiceGroup\"\n [disabled]=\"!editable()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleNodePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n } @else {\n {{ child.label ?? child.name }}\n }\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (choiceGroup) {\n <div class=\"choice-group\" [formGroup]=\"choiceGroup\">\n <mat-form-field [appearance]=\"editable() ? 'fill' : 'outline'\">\n <mat-label>Selected option</mat-label>\n <mat-select\n [formControlName]=\"CASE_KEY\"\n (selectionChange)=\"switchCase(childItem.key, child, $event.value)\"\n >\n @for (caseName of objectKeys(child.cases); track caseName) {\n <mat-option [value]=\"caseName\">{{ caseLabel(child, caseName) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedCase) {\n <nff-dynamic-recursive-form\n [schema]=\"caseAsGroup(child, selectedCase)\"\n [formGroup]=\"choiceGroup\"\n [editable]=\"editable()\"\n />\n }\n </div>\n }\n </mat-expansion-panel>\n }\n }\n\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroupList') {\n <nff-node-group-list-renderer\n [nodeGroupList]=\"child\"\n [formArray]=\"asFormArray(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n [editable]=\"editable()\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'map') {\n @let mapGroup = asFormGroup(formGroup().get(childItem.key));\n <mat-expansion-panel class=\"node-section\" [expanded]=\"child.presence ? !!mapGroup : !child.appearance?.collapsed\" togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n @if (child.presence) {\n <mat-checkbox\n [checked]=\"!!mapGroup\"\n [disabled]=\"!editable()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleNodePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n } @else {\n {{ child.label ?? child.name }}\n }\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (mapGroup) {\n <nff-node-map-renderer\n [nodeMap]=\"child\"\n [formGroup]=\"mapGroup\"\n [editable]=\"editable()\"\n />\n }\n </mat-expansion-panel>\n }\n }\n </div>\n </ng-template>\n @if (schema().appearance?.flatten) {\n <div class=\"flattened-form\">\n <ng-container *ngTemplateOutlet=\"formRender\"></ng-container>\n <div class=\"flattened-actions\">\n @if (editable() && index() != null && addButtonCallback() != null) {\n <button matIconButton matTooltip=\"+ Add new {{ schema().label ?? schema().name }}\" class=\"add-button small-icon-button\" (click)=\"addButtonCallback()!(index()!)\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable() && removable()) {\n <button matIconButton class=\"remove-button small-icon-button\" (click)=\"emitRemoveEvent(); $event.stopPropagation()\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </div>\n }\n @else {\n <mat-expansion-panel class=\"node-section\" [expanded]=\"!schema().appearance?.collapsed\" togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title class=\"config-form-subsection-card\">\n {{ title() ?? schema().label ?? schema().name }}\n </mat-panel-title>\n <mat-panel-description class=\"section-actions\">\n <button matIconButton class=\"small-icon-button\" [class]=\"{ 'edit-icon': !editable() }\" (click)=\"editable.set(!editable()); $event.stopPropagation()\">\n <mat-icon>edit</mat-icon>\n </button>\n @if (editable() && index() != null && addButtonCallback() != null) {\n <button matIconButton matTooltip=\"+ Add new {{ schema().label ?? schema().name }}\" class=\"add-button small-icon-button\" (click)=\"addButtonCallback()!(index()!); $event.stopPropagation()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable() && removable()) {\n <button matIconButton class=\"remove-button small-icon-button\" (click)=\"emitRemoveEvent(); $event.stopPropagation()\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </mat-panel-description>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"formRender\"></ng-container>\n </mat-expansion-panel>\n }\n} @else {\n <div class=\"form-content\" [formGroup]=\"formGroup()\">\n <div class=\"leafs-container\">\n <div class=\"fields\">\n <button matIconButton class=\"small-icon-button\" [class]=\"{ 'edit-icon': !editable() }\" (click)=\"editable.set(!editable())\">\n <mat-icon>edit</mat-icon>\n </button>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leaf' && child.presence) {\n @if (formGroup().get(childItem.key)) {\n <!-- Present: the field takes the add button's place in the row; its\n remove control drops the leaf back to the unchecked state. -->\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup().get(childItem.key))\n [removable]=true\n [editable]=\"editable()\"\n [initialValue]=\"formGroup().get(childItem.key)?.value\"\n [autofocus]=\"presenceFocusKey === childItem.key\"\n (remove)=\"toggleLeafPresence(childItem.key, child, false)\"\n />\n } @else {\n <button\n matButton=\"outlined\"\n class=\"presence-leaf-add\"\n [disabled]=\"!editable()\"\n (click)=\"toggleLeafPresence(childItem.key, child, true)\"\n >\n <mat-icon>add</mat-icon> Add {{ child.label ?? child.name }}\n </button>\n }\n } @else if (child.kind == 'leaf') {\n <nff-leaf-renderer\n [leaf_]=child\n [control]=asFormControl(formGroup().get(child.name))\n [removable]=false\n [editable]=\"editable()\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n />\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'leafList') {\n <nff-leaf-list-renderer\n [leaf_]=\"child\"\n [editable]=\"editable()\"\n [formArray]=\"asFormArray(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n />\n }\n }\n </div>\n </div>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'choice') {\n @let choiceGroup = asFormGroup(formGroup().get(childItem.key));\n @let selectedCase = activeCase(childItem.key);\n <mat-expansion-panel class=\"node-section\" [expanded]=\"child.presence ? !!choiceGroup : !child.appearance?.collapsed\" togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n @if (child.presence) {\n <mat-checkbox\n [checked]=\"!!choiceGroup\"\n [disabled]=\"!editable()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleNodePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n } @else {\n {{ child.label ?? child.name }}\n }\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (choiceGroup) {\n <div class=\"choice-group\" [formGroup]=\"choiceGroup\">\n <mat-form-field [appearance]=\"editable() ? 'fill' : 'outline'\">\n <mat-label>Selected option</mat-label>\n <mat-select\n [formControlName]=\"CASE_KEY\"\n (selectionChange)=\"switchCase(childItem.key, child, $event.value)\"\n >\n @for (caseName of objectKeys(child.cases); track caseName) {\n <mat-option [value]=\"caseName\">{{ caseLabel(child, caseName) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedCase) {\n <nff-dynamic-recursive-form\n [schema]=\"caseAsGroup(child, selectedCase)\"\n [formGroup]=\"choiceGroup\"\n [editable]=\"editable()\"\n />\n }\n </div>\n }\n </mat-expansion-panel>\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'map') {\n @let mapGroup = asFormGroup(formGroup().get(childItem.key));\n <mat-expansion-panel class=\"node-section\" [expanded]=\"child.presence ? !!mapGroup : !child.appearance?.collapsed\" togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n @if (child.presence) {\n <mat-checkbox\n [checked]=\"!!mapGroup\"\n [disabled]=\"!editable()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleNodePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n } @else {\n {{ child.label ?? child.name }}\n }\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (mapGroup) {\n <nff-node-map-renderer\n [nodeMap]=\"child\"\n [formGroup]=\"mapGroup\"\n [editable]=\"editable()\"\n />\n }\n </mat-expansion-panel>\n }\n }\n <mat-accordion multi>\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroupList') {\n <mat-expansion-panel togglePosition=\"before\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{ title() ?? child.label ?? child.name }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <nff-node-group-list-renderer\n [nodeGroupList]=\"child\"\n [formArray]=\"asFormArray(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n [editable]=\"editable()\"\n />\n </mat-expansion-panel>\n }\n }\n @for (childItem of nodeGroupChildrenList; track $index) {\n @let child = childItem.value;\n @if (child.kind == 'nodeGroup' && child.presence) {\n <mat-expansion-panel togglePosition=\"before\" [expanded]=\"!!formGroup().get(childItem.key)\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-checkbox\n [checked]=\"!!formGroup().get(childItem.key)\"\n [disabled]=\"!editable()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"togglePresence(childItem.key, child, $event.checked)\"\n >{{ child.label ?? child.name }}</mat-checkbox>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (formGroup().get(childItem.key)) {\n <nff-dynamic-recursive-form\n [schema]=\"flatGroup(child)\"\n [formGroup]=\"asFormGroup(formGroup().get(childItem.key))\"\n [editable]=\"editable()\"\n />\n }\n </mat-expansion-panel>\n }\n @else if (child.kind == 'nodeGroup') {\n <nff-dynamic-recursive-form\n [schema]=\"child\"\n [formGroup]=\"asFormGroup(formGroup().get(child.name))\"\n [initialValue]=\"formGroup().get(child.name)?.value\"\n [editable]=\"editable()\"\n />\n }\n }\n </mat-accordion>\n </div>\n}\n","import { Component, input, OnInit } from '@angular/core';\nimport { AbstractControl, FormArray, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport {\n CASE_KEY,\n Leaf,\n LeafList,\n NodeChoice,\n NodeGroup,\n NodeMap,\n NodeType,\n} from '../types/dynamic-recursive.types';\nimport { asFormArray, asFormControl } from '../core/utils';\nimport {\n addMapEntry,\n buildControl,\n buildFormFromSchema,\n caseFields,\n removeMapEntry,\n renameMapEntry,\n switchChoiceCase,\n} from '../core/dynamic-recursive-forms-builder';\nimport { LeafRendererComponent } from '../dynamic-recursive-form/leaf-renderer/leaf-renderer.component';\nimport { LeafListRendererComponent } from '../dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component';\nimport { NodeMapRendererComponent } from '../dynamic-recursive-form/node-map-renderer/node-map-renderer.component';\n\n/** Metadata on a list-container node that lets the tree add items to its FormArray. */\ninterface ListRef {\n array: FormArray;\n itemSchema: NodeGroup;\n itemLabel: string;\n minItems: number;\n}\n\n/** An absent optional (presence) child, offered by its parent node's \"+ Optional field\" menu. */\ninterface OptionalEntry {\n key: string;\n schema: NodeType;\n label: string;\n /** Index in the parent schema's children iteration; keeps the menu in schema order. */\n order: number;\n}\n\n/** A navigable node in the config tree. Groups and list items are tree nodes; leaves are their detail. */\ninterface TreeNode {\n id: string;\n label: string;\n children: TreeNode[];\n /** Leaves editable when this node is selected. A presence leaf carries its `optional` entry so it can be removed back to the menu. */\n leaves: { key: string; node: Leaf; optional?: OptionalEntry }[];\n leafLists: { key: string; node: LeafList }[];\n /** The FormGroup holding this node's leaves, or null for a list-container or map node. */\n group: FormGroup | null;\n /** Present on a nodeGroupList node: lets a `+` add an item. */\n list?: ListRef;\n /** Present on a list-item node: the FormArray and current index it can be removed from. */\n removable?: { array: FormArray; index: number };\n /** Absent optional children of this node, offered by its \"+ Optional field\" menu. */\n optionals?: OptionalEntry[];\n /** Present on a present optional child node: drives the row's remove control; removal returns `entry` to the parent's menu. */\n presenceRemovable?: { entry: OptionalEntry };\n /** Present on a choice node: the choice schema and its FormGroup (holding `__case` + the active case's fields). */\n choice?: { schema: NodeChoice; group: FormGroup };\n /** Present on a map node. `complex` maps expand entries as child nodes; leaf-valued maps edit inline in the detail pane. */\n map?: { schema: NodeMap; group: FormGroup; complex: boolean };\n /** Present on a complex-map entry node: addresses the entry in its map for remove/rename. */\n mapEntry?: { mapGroup: FormGroup; mapSchema: NodeMap; key: string };\n}\n\n/**\n * A tree/detail editor for a schema-built form: the structure (groups, lists,\n * maps, choices) is a tree on the left, and selecting a node shows that node's\n * fields for editing on the right. A `+` on a list or map node adds an entry; a\n * delete button on each item removes it. Absent optional (presence) children are\n * offered by a \"+ Optional field\" menu row at the end of their parent's\n * children; present ones carry a delete button that returns them to the menu.\n *\n * The component draws no outer container — only a divider between the tree and\n * detail panes — so the embedding client owns the surrounding chrome. The tree\n * is built once from the `schema`/`formGroup` provided at initialization.\n * An alternative to the all-in-one {@link DynamicRecursiveFormComponent} for\n * large configs.\n */\n@Component({\n selector: 'nff-config-editor',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n NgTemplateOutlet,\n MatIconModule,\n MatButtonModule,\n MatMenuModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatTooltip,\n LeafRendererComponent,\n LeafListRendererComponent,\n NodeMapRendererComponent,\n ],\n templateUrl: './config-editor.component.html',\n styleUrl: './config-editor.component.scss',\n})\nexport class ConfigEditorComponent implements OnInit {\n /** The form-description schema whose structure the tree renders. */\n readonly schema = input.required<NodeGroup>();\n /** The schema-built reactive group the editor binds to and mutates. */\n readonly formGroup = input.required<FormGroup>();\n /** Whether fields accept input and structural controls (add/remove/menus) show. */\n readonly editable = input<boolean>(true);\n\n root!: TreeNode;\n selected: TreeNode | null = null;\n readonly expanded = new Set<string>();\n\n private nextId = 0;\n\n ngOnInit() {\n const schema = this.schema();\n this.root = this.buildTree(schema, this.formGroup(), schema.label ?? schema.name);\n this.expanded.add(this.root.id);\n this.select(this.root);\n }\n\n select(node: TreeNode) {\n this.selected = node;\n // Reveal the node's rows in the tree as it opens on the right. Navigating\n // also retires any pending just-added-leaf focus request.\n this.focusLeafKey = null;\n if (this.hasExpandableContent(node)) this.expanded.add(node.id);\n }\n\n /** Select a child (list item or sub-group) from the detail pane, keeping its parent expanded in the tree. */\n open(parent: TreeNode, child: TreeNode) {\n this.expanded.add(parent.id);\n this.select(child);\n }\n\n /**\n * Root-to-`target` path for the detail-pane breadcrumb (inclusive of both ends),\n * or an empty array if `target` is not in the current tree. Searched fresh each\n * call so it stays correct after add/remove/presence mutations rebuild subtrees.\n */\n pathTo(target: TreeNode): TreeNode[] {\n const walk = (node: TreeNode, trail: TreeNode[]): TreeNode[] | null => {\n const here = [...trail, node];\n if (node === target) return here;\n for (const child of node.children) {\n const found = walk(child, here);\n if (found) return found;\n }\n return null;\n };\n return this.root ? (walk(this.root, []) ?? []) : [];\n }\n\n toggle(node: TreeNode) {\n if (this.expanded.has(node.id)) this.expanded.delete(node.id);\n else this.expanded.add(node.id);\n }\n\n /** Whether the row shows an expand twisty: it has child rows to reveal (children or an optionals menu row). */\n hasExpandableContent(node: TreeNode): boolean {\n return node.children.length > 0 || (this.editable() && !!node.optionals?.length);\n }\n\n /**\n * Whether the node's form subtree holds a validation error. Group/choice, list,\n * and map nodes each check their backing control; `invalid` aggregates over\n * descendants, so an error anywhere below lights every ancestor row.\n */\n hasError(node: TreeNode): boolean {\n return !!(node.group?.invalid || node.list?.array.invalid || node.map?.group.invalid);\n }\n\n /** Append a new item to a list node's FormArray and to the tree, then select it. */\n addItem(listNode: TreeNode) {\n const list = listNode.list;\n if (!list) return;\n const group = buildFormFromSchema(list.itemSchema);\n list.array.push(group);\n const item = this.buildTree(list.itemSchema, group, list.itemLabel);\n item.removable = { array: list.array, index: list.array.length - 1 };\n listNode.children.push(item);\n this.renumber(listNode);\n this.expanded.add(listNode.id);\n this.select(item);\n }\n\n /** Remove a list item from its FormArray and the tree (down to `minItems`). */\n removeItem(listNode: TreeNode, item: TreeNode) {\n if (!listNode.list || !item.removable) return;\n if (listNode.list.array.length <= listNode.list.minItems) return;\n listNode.list.array.removeAt(item.removable.index);\n listNode.children.splice(listNode.children.indexOf(item), 1);\n this.renumber(listNode);\n this.reselectIfOrphaned(listNode);\n }\n\n /** The key of the optional leaf the user just added; its detail-pane field grabs focus when rendered. */\n protected focusLeafKey: string | null = null;\n\n /** Add an absent optional child from the menu: build its control, place it in the tree, and select it. */\n addOptional(node: TreeNode, entry: OptionalEntry) {\n if (!node.group || node.group.get(entry.key)) return;\n const control =\n entry.schema.kind === 'nodeGroup'\n ? buildFormFromSchema(entry.schema)\n : (buildControl(entry.schema) as AbstractControl);\n node.group.addControl(entry.key, control);\n node.optionals = node.optionals?.filter((o) => o !== entry);\n if (entry.schema.kind === 'leaf') {\n node.leaves.push({ key: entry.key, node: entry.schema, optional: entry });\n this.select(node);\n this.focusLeafKey = entry.key;\n return;\n }\n const child = this.buildChildNode(entry.schema, control, entry.label);\n if (!child) return;\n child.presenceRemovable = { entry };\n node.children.push(child);\n this.expanded.add(node.id);\n this.select(child);\n }\n\n /** Remove a present optional child node, returning its entry to the parent's menu. */\n removeOptional(parent: TreeNode, node: TreeNode) {\n const entry = node.presenceRemovable?.entry;\n if (!entry || !parent.group) return;\n parent.group.removeControl(entry.key);\n parent.children.splice(parent.children.indexOf(node), 1);\n this.reinsertOptional(parent, entry);\n this.reselectIfOrphaned(parent);\n }\n\n /** Remove a present optional leaf from the detail pane, returning its entry to the menu. */\n removeOptionalLeaf(node: TreeNode, leaf: { key: string; node: Leaf; optional?: OptionalEntry }) {\n if (!leaf.optional || !node.group) return;\n node.group.removeControl(leaf.key);\n node.leaves = node.leaves.filter((l) => l !== leaf);\n this.reinsertOptional(node, leaf.optional);\n }\n\n /** The active case name of a choice node, or null when none is selected. */\n activeCase(node: TreeNode): string | null {\n return (node.choice?.group.get(CASE_KEY)?.value as string | null) ?? null;\n }\n\n /** The display label of a choice node's active case, or null when no case is selected. */\n activeCaseLabel(node: TreeNode): string | null {\n const c = node.choice;\n const active = this.activeCase(node);\n return c && active ? this.caseLabel(c.schema, active) : null;\n }\n\n /** The display label for a case: the schema's `caseLabels` entry, else the case name. */\n caseLabel(choice: NodeChoice, caseName: string): string {\n return choice.caseLabels?.[caseName] ?? caseName;\n }\n\n /** Switch a choice node's active case: swap the group's controls and rebuild the subtree in place. */\n switchTreeCase(node: TreeNode, caseName: string) {\n const c = node.choice;\n if (!c) return;\n switchChoiceCase(c.group, c.schema, caseName);\n const rebuilt = this.buildTree(this.caseAsGroup(c.schema, caseName), c.group, node.label);\n node.children = rebuilt.children;\n node.leaves = rebuilt.leaves;\n node.leafLists = rebuilt.leafLists;\n node.optionals = rebuilt.optionals;\n this.expanded.add(node.id);\n this.select(node);\n }\n\n /** Append a new entry to a complex map node under a generated unique key, then select it. */\n addTreeMapEntry(mapNode: TreeNode) {\n const m = mapNode.map;\n if (!m) return;\n const key = addMapEntry(m.group, m.schema);\n if (key == null) return;\n const child = this.buildChildNode(m.schema.value, m.group.get(key), key);\n if (!child) return;\n child.mapEntry = { mapGroup: m.group, mapSchema: m.schema, key };\n mapNode.children.push(child);\n this.expanded.add(mapNode.id);\n this.select(child);\n }\n\n /** Remove a complex map entry (down to `minEntries`) from the form group and the tree. */\n removeTreeMapEntry(mapNode: TreeNode, entryNode: TreeNode) {\n const m = mapNode.map;\n const e = entryNode.mapEntry;\n if (!m || !e || !removeMapEntry(m.group, m.schema, e.key)) return;\n mapNode.children.splice(mapNode.children.indexOf(entryNode), 1);\n this.reselectIfOrphaned(mapNode);\n }\n\n /** Commit a rename-on-blur of a map entry's key; on success the node is relabeled. */\n renameTreeMapEntry(entryNode: TreeNode, rawKey: string) {\n const e = entryNode.mapEntry;\n if (!e) return;\n if (renameMapEntry(e.mapGroup, e.mapSchema, e.key, rawKey)) {\n const committed = rawKey.trim();\n e.key = committed;\n entryNode.label = committed;\n }\n }\n\n /** Whether a map node is at `maxEntries` (the add control is hidden). */\n mapAtMax(node: TreeNode | undefined): boolean {\n const m = node?.map;\n return !!m && m.schema.maxEntries != null && Object.keys(m.group.controls).length >= m.schema.maxEntries;\n }\n\n /** Whether a map node is at `minEntries` (entry remove controls are hidden). */\n mapAtMin(node: TreeNode | undefined): boolean {\n const m = node?.map;\n return !!m && m.schema.minEntries != null && Object.keys(m.group.controls).length <= m.schema.minEntries;\n }\n\n protected readonly asFormControl = asFormControl;\n protected readonly asFormArray = asFormArray;\n protected readonly CASE_KEY = CASE_KEY;\n\n objectKeys(obj: Record<string, unknown>): string[] {\n return Object.keys(obj);\n }\n\n /** Re-index and re-label a list node's item children (just \"#n\") after add/remove. */\n private renumber(listNode: TreeNode): void {\n listNode.children.forEach((child, i) => {\n if (child.removable) child.removable.index = i;\n child.label = `#${i + 1}`;\n });\n }\n\n /** Select `fallback` when the current selection is no longer reachable in the tree. */\n private reselectIfOrphaned(fallback: TreeNode): void {\n if (this.selected && this.pathTo(this.selected).length === 0) this.select(fallback);\n }\n\n /** Re-insert a removed optional's entry into the node's menu, keeping schema order. */\n private reinsertOptional(node: TreeNode, entry: OptionalEntry): void {\n const list = (node.optionals ??= []);\n const at = list.findIndex((o) => o.order > entry.order);\n if (at === -1) list.push(entry);\n else list.splice(at, 0, entry);\n }\n\n /** Synthetic group over a case's normalized fields, so a case body builds like any group. */\n private caseAsGroup(choice: NodeChoice, caseName: string): NodeGroup {\n return {\n kind: 'nodeGroup',\n name: choice.name,\n children: choice.cases[caseName] ? caseFields(choice.cases[caseName]) : {},\n };\n }\n\n private buildTree(schema: NodeGroup, group: FormGroup, label: string): TreeNode {\n const leaves: TreeNode['leaves'] = [];\n const leafLists: TreeNode['leafLists'] = [];\n const children: TreeNode[] = [];\n const optionals: OptionalEntry[] = [];\n\n const keys = Object.keys(schema.children);\n keys.forEach((key, order) => {\n const child = schema.children[key];\n const control = group.get(key);\n const entry: OptionalEntry = { key, schema: child, label: this.labelOf(child, key), order };\n if (child.kind === 'leaf') {\n if (child.presence && !control) optionals.push(entry);\n else if (control) leaves.push({ key, node: child, optional: child.presence ? entry : undefined });\n return;\n }\n if (child.kind === 'leafList') {\n leafLists.push({ key, node: child });\n return;\n }\n const presence = child.kind !== 'nodeGroupList' && child.presence;\n if (presence && !control) {\n optionals.push(entry);\n return;\n }\n const node = this.buildChildNode(child, control, entry.label);\n if (!node) return;\n if (presence) node.presenceRemovable = { entry };\n children.push(node);\n });\n\n const node: TreeNode = { id: String(this.nextId++), label, children, leaves, leafLists, group };\n if (optionals.length) node.optionals = optionals;\n return node;\n }\n\n /** Build the tree node for a single non-leaf child, dispatching on its kind. Null when its control is missing. */\n private buildChildNode(schema: NodeType, control: AbstractControl | null, label: string): TreeNode | null {\n if (schema.kind === 'nodeGroup') {\n return control instanceof FormGroup ? this.buildTree(schema, control, label) : null;\n }\n if (schema.kind === 'nodeGroupList') {\n const array = control;\n const itemLabel = schema.type.label ?? schema.type.name;\n const items =\n array instanceof FormArray\n ? array.controls\n .filter((c): c is FormGroup => c instanceof FormGroup)\n .map((item, i) => {\n // Just \"#n\": the item sits under its list node, so repeating the\n // item name (e.g. \"Interface #1\") only echoes the parent.\n const node = this.buildTree(schema.type, item, `#${i + 1}`);\n node.removable = { array, index: i };\n return node;\n })\n : [];\n return {\n id: String(this.nextId++),\n label,\n children: items,\n leaves: [],\n leafLists: [],\n group: null,\n list:\n array instanceof FormArray\n ? { array, itemSchema: schema.type, itemLabel, minItems: schema.minItems ?? 0 }\n : undefined,\n };\n }\n if (schema.kind === 'choice') {\n if (!(control instanceof FormGroup)) return null;\n const active = control.get(CASE_KEY)?.value as string | null;\n const node =\n active && schema.cases[active]\n ? this.buildTree(this.caseAsGroup(schema, active), control, label)\n : ({ id: String(this.nextId++), label, children: [], leaves: [], leafLists: [], group: control } as TreeNode);\n node.choice = { schema, group: control };\n return node;\n }\n if (schema.kind === 'map') {\n if (!(control instanceof FormGroup)) return null;\n const complex =\n schema.value.kind === 'nodeGroup' ||\n schema.value.kind === 'choice' ||\n schema.value.kind === 'map' ||\n schema.value.kind === 'nodeGroupList';\n const entries = complex\n ? Object.keys(control.controls)\n .map((key) => {\n const entryNode = this.buildChildNode(schema.value, control.get(key), key);\n if (entryNode) entryNode.mapEntry = { mapGroup: control, mapSchema: schema, key };\n return entryNode;\n })\n .filter((n): n is TreeNode => n !== null)\n : [];\n return {\n id: String(this.nextId++),\n label,\n children: entries,\n leaves: [],\n leafLists: [],\n group: null,\n map: { schema, group: control, complex },\n };\n }\n return null;\n }\n\n /** A node's display label: its schema `label`, else its record key. */\n private labelOf(node: NodeType, key: string): string {\n return ('label' in node ? node.label : undefined) ?? key;\n }\n}\n","<div class=\"editor\">\n <nav class=\"tree\">\n <ng-template #treeNode let-node let-depth=\"depth\" let-parent=\"parent\">\n <div\n class=\"tree-row\"\n [class.selected]=\"node === selected\"\n [class.error]=\"hasError(node)\"\n [style.padding-left.px]=\"8 + depth * 16\"\n (click)=\"select(node)\"\n >\n @if (hasExpandableContent(node)) {\n <button\n matIconButton\n class=\"twisty\"\n (click)=\"toggle(node); $event.stopPropagation()\"\n [attr.aria-label]=\"expanded.has(node.id) ? 'Collapse' : 'Expand'\"\n >\n <mat-icon>{{ expanded.has(node.id) ? 'expand_more' : 'chevron_right' }}</mat-icon>\n </button>\n } @else {\n <span class=\"twisty-spacer\"></span>\n }\n\n <span class=\"tree-label\" [matTooltip]=\"node.label\">{{ node.label }}</span>\n @if (node.choice && activeCaseLabel(node)) {\n <span class=\"tree-sublabel\" [matTooltip]=\"activeCaseLabel(node)\">{{ activeCaseLabel(node) }}</span>\n }\n\n @if (editable() && node.list) {\n <button\n matIconButton\n class=\"row-btn add\"\n [matTooltip]=\"'Add ' + node.list.itemLabel\"\n (click)=\"addItem(node); $event.stopPropagation()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable() && node.map?.complex && !mapAtMax(node)) {\n <button\n matIconButton\n class=\"row-btn add\"\n matTooltip=\"Add entry\"\n (click)=\"addTreeMapEntry(node); $event.stopPropagation()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (editable() && node.removable) {\n <button\n matIconButton\n class=\"row-btn remove\"\n matTooltip=\"Remove\"\n (click)=\"removeItem(parent, node); $event.stopPropagation()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n @if (editable() && node.presenceRemovable) {\n <button\n matIconButton\n class=\"row-btn remove\"\n matTooltip=\"Remove\"\n (click)=\"removeOptional(parent, node); $event.stopPropagation()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n @if (editable() && node.mapEntry && !mapAtMin(parent)) {\n <button\n matIconButton\n class=\"row-btn remove\"\n matTooltip=\"Remove entry\"\n (click)=\"removeTreeMapEntry(parent, node); $event.stopPropagation()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n\n @if (expanded.has(node.id)) {\n @for (child of node.children; track child.id) {\n <ng-container\n *ngTemplateOutlet=\"treeNode; context: { $implicit: child, depth: depth + 1, parent: node }\"\n />\n }\n @if (editable() && node.optionals?.length) {\n <button\n type=\"button\"\n class=\"tree-row optional-row\"\n [style.padding-left.px]=\"8 + (depth + 1) * 16\"\n [matMenuTriggerFor]=\"treeOptionalsMenu\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"twisty-spacer\"></span>\n <mat-icon class=\"optional-icon\">add</mat-icon>\n <span class=\"optional-label\">Optional field</span>\n </button>\n <mat-menu #treeOptionalsMenu=\"matMenu\">\n @for (opt of node.optionals; track opt.key) {\n <button mat-menu-item (click)=\"addOptional(node, opt)\">{{ opt.label }}</button>\n }\n </mat-menu>\n }\n }\n </ng-template>\n\n <ng-container *ngTemplateOutlet=\"treeNode; context: { $implicit: root, depth: 0 }\" />\n </nav>\n\n <section class=\"detail\">\n @if (selected) {\n <nav class=\"breadcrumb\" aria-label=\"Breadcrumb\">\n @for (crumb of pathTo(selected); track crumb.id; let last = $last) {\n @if (last) {\n <span class=\"crumb-current\" aria-current=\"page\">{{ crumb.label }}</span>\n } @else {\n <button type=\"button\" class=\"item-link crumb-link\" (click)=\"select(crumb)\">{{ crumb.label }}</button>\n <span class=\"crumb-sep\" aria-hidden=\"true\">/</span>\n }\n }\n </nav>\n\n @if (selected.choice; as choice) {\n @if (editable()) {\n <mat-form-field class=\"case-select\" appearance=\"fill\">\n <mat-label>Selected option</mat-label>\n <mat-select [value]=\"activeCase(selected)\" (selectionChange)=\"switchTreeCase(selected, $event.value)\">\n @for (caseName of objectKeys(choice.schema.cases); track caseName) {\n <mat-option [value]=\"caseName\">{{ caseLabel(choice.schema, caseName) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <mat-form-field class=\"case-select\" appearance=\"outline\">\n <mat-label>Selected option</mat-label>\n <input matInput readonly [value]=\"activeCaseLabel(selected) ?? ''\" />\n </mat-form-field>\n }\n }\n\n @if (selected.mapEntry; as entry) {\n <mat-form-field class=\"key-field\" [appearance]=\"editable() ? 'fill' : 'outline'\">\n <mat-label>{{ entry.mapSchema.keyLabel ?? 'Key' }}</mat-label>\n <input\n matInput\n #entryKey\n [readonly]=\"!editable()\"\n [value]=\"entry.key\"\n (change)=\"renameTreeMapEntry(selected, entryKey.value); entryKey.value = entry.key\"\n />\n </mat-form-field>\n }\n\n @if (selected.map && !selected.map.complex) {\n <nff-node-map-renderer\n [nodeMap]=\"selected.map.schema\"\n [formGroup]=\"selected.map.group\"\n [editable]=\"editable()\"\n />\n }\n\n @if (selected.group) {\n <div class=\"group-body\">\n <div class=\"fields\" [formGroup]=\"selected.group\">\n @for (leaf of selected.leaves; track leaf.key) {\n <nff-leaf-renderer\n [leaf_]=\"leaf.node\"\n [control]=\"asFormControl(selected.group.get(leaf.key))\"\n [editable]=\"editable()\"\n [removable]=\"!!leaf.optional\"\n [autofocus]=\"leaf.key === focusLeafKey\"\n (remove)=\"removeOptionalLeaf(selected, leaf)\"\n />\n }\n @for (list of selected.leafLists; track list.key) {\n <nff-leaf-list-renderer\n [leaf_]=\"list.node\"\n [formArray]=\"asFormArray(selected.group.get(list.key))\"\n [editable]=\"editable()\"\n />\n }\n @if (editable() && selected.optionals?.length) {\n <div class=\"detail-optional\">\n <button matButton [matMenuTriggerFor]=\"detailOptionalsMenu\">\n <mat-icon>add</mat-icon> Optional field\n </button>\n <mat-menu #detailOptionalsMenu=\"matMenu\">\n @for (opt of selected.optionals; track opt.key) {\n <button mat-menu-item (click)=\"addOptional(selected, opt)\">{{ opt.label }}</button>\n }\n </mat-menu>\n </div>\n }\n </div>\n @if (selected.children.length) {\n <nav class=\"child-links\">\n <h4 class=\"child-links-title\">Sections</h4>\n @for (child of selected.children; track child.id) {\n <button type=\"button\" class=\"item-link child-link\" [matTooltip]=\"child.label\" (click)=\"open(selected, child)\">\n <mat-icon>chevron_right</mat-icon>{{ child.label }}\n </button>\n }\n </nav>\n }\n </div>\n }\n\n @if (selected.list; as list) {\n @if (selected.children.length) {\n <ul class=\"item-list\">\n @for (item of selected.children; track item.id) {\n <li class=\"item-row\">\n <button type=\"button\" class=\"item-link\" [matTooltip]=\"item.label\" (click)=\"open(selected, item)\">{{ item.label }}</button>\n @if (editable() && item.removable) {\n <button\n matIconButton\n class=\"row-btn remove-item\"\n matTooltip=\"Remove\"\n (click)=\"removeItem(selected, item)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <p class=\"empty\">No {{ list.itemLabel }} items yet.</p>\n }\n @if (editable()) {\n <div class=\"list-actions\">\n <button matButton (click)=\"addItem(selected)\">\n <mat-icon>add</mat-icon> Add {{ list.itemLabel }}\n </button>\n </div>\n }\n }\n\n @if (selected.map && selected.map.complex) {\n @if (selected.children.length) {\n <ul class=\"item-list\">\n @for (item of selected.children; track item.id) {\n <li class=\"item-row\">\n <button type=\"button\" class=\"item-link\" [matTooltip]=\"item.label\" (click)=\"open(selected, item)\">{{ item.label }}</button>\n @if (editable() && !mapAtMin(selected)) {\n <button\n matIconButton\n class=\"row-btn remove-item\"\n matTooltip=\"Remove entry\"\n (click)=\"removeTreeMapEntry(selected, item)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <p class=\"empty\">No entries yet.</p>\n }\n @if (editable() && !mapAtMax(selected)) {\n <div class=\"list-actions\">\n <button matButton (click)=\"addTreeMapEntry(selected)\">\n <mat-icon>add</mat-icon> Add entry\n </button>\n </div>\n }\n }\n\n @if (\n !selected.choice &&\n !selected.mapEntry &&\n !selected.map &&\n !selected.list &&\n !selected.leaves.length &&\n !selected.leafLists.length &&\n !selected.children.length &&\n !(editable() && selected.optionals?.length)\n ) {\n <p class=\"empty\">This node has no fields.</p>\n }\n } @else {\n <p class=\"empty\">Select a node on the left to edit its fields.</p>\n }\n </section>\n</div>\n","/*\n * Public API Surface of ng-form-foundry\n */\n\nexport * from './lib/types/dynamic-recursive.types';\nexport * from './lib/core/dynamic-recursive-forms-builder';\nexport * from './lib/dynamic-recursive-form/dynamic-recursive-form.component';\nexport * from './lib/config-editor/config-editor.component';\nexport * from './lib/dynamic-recursive-form/leaf-renderer/leaf-renderer.component';\nexport * from './lib/dynamic-recursive-form/leaf-list-renderer/leaf-list-renderer.component';\nexport * from './lib/dynamic-recursive-form/leaf-enum-renderer/leaf-enum-renderer.component';\nexport * from './lib/dynamic-recursive-form/node-group-list-renderer/node-group-list-renderer.component';\nexport * from './lib/dynamic-recursive-form/node-map-renderer/node-map-renderer.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';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