@ngx-formbar/core 2.0.0-next.0 → 2.0.0-next.1

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.
@@ -1,87 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ViewContainerRef, input, computed, effect, Directive, Injectable, signal, untracked } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, signal, computed, effect, untracked } from '@angular/core';
3
3
  import * as acorn from 'acorn';
4
4
 
5
- const NGX_FW_COMPONENT_RESOLVER = new InjectionToken('NGX_FW_COMPONENT_RESOLVER');
6
-
7
- /**
8
- * Structural directive that renders the appropriate component based on the control's type.
9
- *
10
- * This directive acts as a dynamic renderer for form controls, blocks, and groups.
11
- * It works by:
12
- * 1. Receiving a content configuration and name
13
- * 2. Looking up the registered component for the content's type
14
- * 3. Creating an instance of that component and binding the content and name to it
15
- *
16
- * This allows forms to be composed declaratively through configuration objects
17
- * rather than explicit templates.
18
- *
19
- * @example
20
- * ```html
21
- * <!-- Used with ngFor to render a list of controls -->
22
- * @for (control of controls(); track control[0]) {
23
- * <ng-template *ngxfbAbstractControl="control" />
24
- * }
25
- *
26
- * <!-- Used directly with a specific control -->
27
- * <ng-template *ngxfbAbstractControl="['name', nameControlConfig]" />
28
- * ```
29
- */
30
- class NgxfbAbstractControlDirective {
31
- viewContainerRef = inject(ViewContainerRef);
32
- /**
33
- * Service for component registration
34
- * Provides access to component type mappings
35
- */
36
- contentRegistrationService = inject(NGX_FW_COMPONENT_RESOLVER);
37
- /**
38
- * Required input for control configuration
39
- * Defines properties like type, validation, and other control-specific settings
40
- */
41
- content = input.required({ ...(ngDevMode ? { debugName: "content" } : {}), alias: 'ngxfbAbstractControl' });
42
- controlName = computed(() => this.content()[0], ...(ngDevMode ? [{ debugName: "controlName" }] : []));
43
- controlConfig = computed(() => this.content()[1], ...(ngDevMode ? [{ debugName: "controlConfig" }] : []));
44
- /**
45
- * Registration map of component types
46
- * Maps control types to component implementations
47
- */
48
- registrations = this.contentRegistrationService.registrations;
49
- /**
50
- * Computed component type based on content.type
51
- * Looks up the component implementation from registrations map
52
- */
53
- component = computed(() => {
54
- const registrations = this.registrations();
55
- const content = this.controlConfig();
56
- const component = registrations.get(content.type);
57
- return component ?? null;
58
- }, ...(ngDevMode ? [{ debugName: "component" }] : []));
59
- constructor() {
60
- effect(() => {
61
- const component = this.component();
62
- this.viewContainerRef.clear();
63
- if (component) {
64
- const componentRef = this.viewContainerRef.createComponent(component);
65
- componentRef.setInput('content', this.controlConfig());
66
- componentRef.setInput('name', this.controlName());
67
- }
68
- });
69
- }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxfbAbstractControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
71
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: NgxfbAbstractControlDirective, isStandalone: true, selector: "[ngxfbAbstractControl]", inputs: { content: { classPropertyName: "content", publicName: "ngxfbAbstractControl", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxfbAbstractControlDirective, decorators: [{
74
- type: Directive,
75
- args: [{
76
- selector: '[ngxfbAbstractControl]',
77
- }]
78
- }], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngxfbAbstractControl", required: true }] }] } });
79
-
80
5
  const NGX_FW_COMPONENT_REGISTRATIONS = new InjectionToken('NGX_FW_COMPONENT_REGISTRATIONS', {
81
6
  providedIn: 'root',
82
7
  factory: () => new Map(),
83
8
  });
84
9
 
10
+ const NGX_FW_COMPONENT_RESOLVER = new InjectionToken('NGX_FW_COMPONENT_RESOLVER');
11
+
85
12
  const NGX_FW_DEFAULT_CONFIG = new InjectionToken('NGX_FW_DEFAULT_CONFIG', {
86
13
  providedIn: 'root',
87
14
  factory: () => ({}),
@@ -799,6 +726,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
799
726
  }]
800
727
  }] });
801
728
 
729
+ /**
730
+ * Creates a static component registration entry.
731
+ * Use for eagerly imported components that don't need lazy loading.
732
+ *
733
+ * @example
734
+ * ```ts
735
+ * import { staticComponent } from '@ngx-formbar/core';
736
+ * import { TextComponent } from './text.component';
737
+ *
738
+ * const registrations = {
739
+ * text: staticComponent(TextComponent),
740
+ * };
741
+ * ```
742
+ */
743
+ function staticComponent(type) {
744
+ return { component: type };
745
+ }
746
+ /**
747
+ * Creates a lazy component registration entry.
748
+ * Use for components that should be loaded on demand.
749
+ *
750
+ * @example
751
+ * ```ts
752
+ * import { loadComponent } from '@ngx-formbar/core';
753
+ *
754
+ * const registrations = {
755
+ * text: loadComponent(() => import('./text.component').then(m => m.TextComponent)),
756
+ * };
757
+ * ```
758
+ */
759
+ function loadComponent(load) {
760
+ return { loadComponent: load };
761
+ }
762
+
802
763
  function toSafeString(value) {
803
764
  if (value === null) {
804
765
  return 'null';
@@ -1031,5 +992,5 @@ function resolveUpdateStrategy(controlUpdateOn, parentStrategy, defaultStrategy)
1031
992
  * Generated bundle index. Do not edit.
1032
993
  */
1033
994
 
1034
- export { ComponentRegistrationService, ExpressionService, NGX_FW_COMPONENT_REGISTRATIONS, NGX_FW_COMPONENT_RESOLVER, NGX_FW_CONFIG, NGX_FW_CONFIG_RESOLVED, NGX_FW_DEFAULT_CONFIG, NGX_FW_DEFAULT_UPDATE_STRATEGY, NgxFbConfigurationService, NgxfbAbstractControlDirective, resolveDisabledEffect, resolveExpression, resolveHiddenAttribute, resolveHiddenState, resolveInheritableExpression, resolveTestId, resolveUpdateStrategy, toSafeString };
995
+ export { ComponentRegistrationService, ExpressionService, NGX_FW_COMPONENT_REGISTRATIONS, NGX_FW_COMPONENT_RESOLVER, NGX_FW_CONFIG, NGX_FW_CONFIG_RESOLVED, NGX_FW_DEFAULT_CONFIG, NGX_FW_DEFAULT_UPDATE_STRATEGY, NgxFbConfigurationService, loadComponent, resolveDisabledEffect, resolveExpression, resolveHiddenAttribute, resolveHiddenState, resolveInheritableExpression, resolveTestId, resolveUpdateStrategy, staticComponent, toSafeString };
1035
996
  //# sourceMappingURL=ngx-formbar-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formbar-core.mjs","sources":["../../../../libs/core/src/lib/tokens/component-resolver.ts","../../../../libs/core/src/lib/directives/ngxfb-abstract-control.directive.ts","../../../../libs/core/src/lib/tokens/component-registrations.ts","../../../../libs/core/src/lib/tokens/global-config.ts","../../../../libs/core/src/lib/tokens/default-update-strategy.ts","../../../../libs/core/src/lib/services/expression.service.ts","../../../../libs/core/src/lib/services/component-registration.service.ts","../../../../libs/core/src/lib/services/configuration.service.ts","../../../../libs/core/src/lib/helper/string.ts","../../../../libs/core/src/lib/composables/resolve-expression.ts","../../../../libs/core/src/lib/composables/resolve-inheritable-expression.ts","../../../../libs/core/src/lib/composables/resolve-hidden-state.ts","../../../../libs/core/src/lib/composables/resolve-disabled-effect.ts","../../../../libs/core/src/lib/composables/resolve-test-id.ts","../../../../libs/core/src/lib/composables/resolve-hidden-attribute.ts","../../../../libs/core/src/lib/composables/resolve-update-strategy.ts","../../../../libs/core/src/ngx-formbar-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ComponentResolver } from '../types/component-resolver.type';\n\nexport const NGX_FW_COMPONENT_RESOLVER = new InjectionToken<ComponentResolver>(\n 'NGX_FW_COMPONENT_RESOLVER',\n);\n","import {\n computed,\n Directive,\n effect,\n inject,\n input,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgxFbBaseContent } from '../types/content.type';\nimport { NGX_FW_COMPONENT_RESOLVER } from '../tokens/component-resolver';\n\n/**\n * Structural directive that renders the appropriate component based on the control's type.\n *\n * This directive acts as a dynamic renderer for form controls, blocks, and groups.\n * It works by:\n * 1. Receiving a content configuration and name\n * 2. Looking up the registered component for the content's type\n * 3. Creating an instance of that component and binding the content and name to it\n *\n * This allows forms to be composed declaratively through configuration objects\n * rather than explicit templates.\n *\n * @example\n * ```html\n * <!-- Used with ngFor to render a list of controls -->\n * @for (control of controls(); track control[0]) {\n * <ng-template *ngxfbAbstractControl=\"control\" />\n * }\n *\n * <!-- Used directly with a specific control -->\n * <ng-template *ngxfbAbstractControl=\"['name', nameControlConfig]\" />\n * ```\n */\n@Directive({\n selector: '[ngxfbAbstractControl]',\n})\nexport class NgxfbAbstractControlDirective<T extends NgxFbBaseContent> {\n private viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Service for component registration\n * Provides access to component type mappings\n */\n private readonly contentRegistrationService = inject(\n NGX_FW_COMPONENT_RESOLVER,\n );\n\n /**\n * Required input for control configuration\n * Defines properties like type, validation, and other control-specific settings\n */\n readonly content = input.required<[string, T]>({\n alias: 'ngxfbAbstractControl',\n });\n\n readonly controlName = computed(() => this.content()[0]);\n readonly controlConfig = computed(() => this.content()[1]);\n\n /**\n * Registration map of component types\n * Maps control types to component implementations\n */\n readonly registrations = this.contentRegistrationService.registrations;\n\n /**\n * Computed component type based on content.type\n * Looks up the component implementation from registrations map\n */\n readonly component = computed(() => {\n const registrations = this.registrations();\n const content = this.controlConfig();\n\n const component = registrations.get(content.type);\n return component ?? null;\n });\n\n constructor() {\n effect(() => {\n const component = this.component();\n this.viewContainerRef.clear();\n if (component) {\n const componentRef = this.viewContainerRef.createComponent(component);\n componentRef.setInput('content', this.controlConfig());\n componentRef.setInput('name', this.controlName());\n }\n });\n }\n}\n","import { InjectionToken, Type } from '@angular/core';\n\nexport const NGX_FW_COMPONENT_REGISTRATIONS = new InjectionToken<\n ReadonlyMap<string, Type<unknown>>\n>('NGX_FW_COMPONENT_REGISTRATIONS', {\n providedIn: 'root',\n factory: () => new Map(),\n});\n","import { inject, InjectionToken } from '@angular/core';\nimport { NgxFbGlobalConfiguration } from '../types/global-configuration.type';\n\nexport const NGX_FW_DEFAULT_CONFIG =\n new InjectionToken<NgxFbGlobalConfiguration>('NGX_FW_DEFAULT_CONFIG', {\n providedIn: 'root',\n factory: () => ({}) as NgxFbGlobalConfiguration,\n });\n\nexport const NGX_FW_CONFIG = new InjectionToken<\n readonly Partial<NgxFbGlobalConfiguration>[]\n>('NGX_FW_CONFIG', {\n providedIn: 'root',\n factory: () => [],\n});\n\nexport const NGX_FW_CONFIG_RESOLVED =\n new InjectionToken<NgxFbGlobalConfiguration>('NGX_FW_CONFIG_RESOLVED', {\n providedIn: 'root',\n factory: () => {\n const base = inject(NGX_FW_DEFAULT_CONFIG);\n const extras = inject(NGX_FW_CONFIG, { optional: true }) ?? [];\n return mergeDeep(base, ...extras);\n },\n });\n\nfunction mergeDeep<T>(base: T, ...partials: readonly Partial<T>[]): T {\n const out = { ...base };\n for (const p of partials) {\n for (const k of Object.keys(p) as (keyof T)[]) {\n const src = (p as unknown as Record<keyof T, unknown>)[k];\n const dst = (out as unknown as Record<keyof T, unknown>)[k];\n\n const bothObjects =\n typeof dst === 'object' &&\n dst !== null &&\n typeof src === 'object' &&\n src !== null &&\n !Array.isArray(dst) &&\n !Array.isArray(src);\n\n if (bothObjects) {\n (out as unknown as Record<keyof T, unknown>)[k] = mergeDeep(\n dst as unknown as T,\n src as Partial<T>,\n );\n continue;\n }\n (out as unknown as Record<keyof T, unknown>)[k] = src;\n }\n }\n return out;\n}\n","import { InjectionToken } from '@angular/core';\nimport { UpdateStrategy } from '../types/content.type';\n\nexport const NGX_FW_DEFAULT_UPDATE_STRATEGY =\n new InjectionToken<UpdateStrategy>('NGX_FW_DEFAULT_UPDATE_STRATEGY', {\n providedIn: 'root',\n factory: () => 'change',\n });\n","import { Injectable } from '@angular/core';\nimport type {\n ArrayExpression,\n ArrowFunctionExpression,\n BinaryExpression,\n BinaryOperator,\n CallExpression,\n ConditionalExpression,\n Expression,\n Identifier,\n Literal,\n LogicalExpression,\n MemberExpression,\n ObjectExpression,\n PrivateIdentifier,\n Program,\n SequenceExpression,\n SpreadElement,\n Super,\n TemplateLiteral,\n UnaryExpression,\n} from 'acorn';\nimport * as acorn from 'acorn';\nimport type { FormContext } from '../types/expression.type';\n\n/**\n * Set of node types that are not supported in expressions for security or complexity reasons\n */\nconst UNSUPPORTED_NODE_TYPES = new Set([\n 'ThisExpression',\n 'Super',\n 'PrivateIdentifier',\n 'FunctionExpression',\n 'UpdateExpression',\n 'AssignmentExpression',\n 'NewExpression',\n 'YieldExpression',\n 'TaggedTemplateExpression',\n 'ClassExpression',\n 'MetaProperty',\n 'AwaitExpression',\n 'ImportExpression',\n]);\n\ntype SafeMethods = {\n string: string[];\n number: string[];\n boolean: string[];\n array: string[];\n};\n/**\n * Mapping of safe methods that can be called on various types during evaluation\n */\nconst SAFE_METHODS: SafeMethods = {\n string: [\n 'charAt',\n 'concat',\n 'includes',\n 'endsWith',\n 'indexOf',\n 'lastIndexOf',\n 'padEnd',\n 'padStart',\n 'repeat',\n 'replace',\n 'slice',\n 'split',\n 'startsWith',\n 'substring',\n 'toLowerCase',\n 'toUpperCase',\n 'trim',\n 'trimEnd',\n 'trimStart',\n 'toString',\n ],\n number: ['toFixed', 'toPrecision', 'toString'],\n boolean: ['toString'],\n array: [\n 'concat',\n 'every',\n 'filter',\n 'find',\n 'findIndex',\n 'includes',\n 'indexOf',\n 'join',\n 'lastIndexOf',\n 'map',\n 'reduce',\n 'reduceRight',\n 'slice',\n 'some',\n 'toString',\n ],\n} as const;\n\ntype ObjectWithMethod = Record<string, unknown>;\n\n/**\n * Service for parsing and evaluating JavaScript expressions within a context object\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExpressionService {\n /**\n * Cache for parsed ASTs to avoid re-parsing the same expression\n */\n private readonly astCache = new Map<string, Program>();\n\n /**\n * Parses an expression string into an abstract syntax tree (AST)\n * @param expressionString - The expression to parse\n * @returns The parsed AST or null\n */\n parseExpressionToAst(expressionString?: string): Program | null {\n if (!expressionString) {\n return null;\n }\n const cachedAst = this.astCache.get(expressionString);\n if (cachedAst) {\n return cachedAst;\n }\n\n const ast = acorn.parse(expressionString, { ecmaVersion: 2022 });\n this.astCache.set(expressionString, ast);\n return ast;\n }\n\n /**\n * Evaluates an expression AST within the provided context\n * @param ast - The parsed AST to evaluate\n * @param context - The context containing variables and objects referenced in the expression\n * @returns The result of evaluating the expression\n */\n evaluateExpression(ast?: Program | null, context?: FormContext): unknown {\n if (!context || !ast) {\n return null;\n }\n\n const node = ast.body[0];\n if (node.type !== 'ExpressionStatement') {\n throw new TypeError(`Unsupported statement type: ${node.type}`);\n }\n\n return this.evaluateAstNode(node.expression, context);\n }\n\n /**\n * Evaluates a node in the AST\n * @param node - The AST node to evaluate\n * @param context - The context containing variables and objects\n * @returns The result of evaluating the node\n */\n private evaluateAstNode(\n node: Expression | PrivateIdentifier | Super | SpreadElement,\n context: FormContext,\n ): unknown {\n // Check if the node type is unsupported first\n if (UNSUPPORTED_NODE_TYPES.has(node.type)) {\n throw new TypeError(`${node.type} is not supported in expressions`);\n }\n\n // Handle supported node types\n switch (node.type) {\n case 'Identifier':\n return this.evaluateIdentifier(node, context);\n case 'Literal':\n return this.evaluateLiteral(node);\n case 'ArrayExpression':\n return this.evaluateArrayExpression(node, context);\n case 'UnaryExpression':\n return this.evaluateUnaryExpression(node, context);\n case 'BinaryExpression':\n return this.evaluateBinaryExpression(node, context);\n case 'LogicalExpression':\n return this.evaluateLogicalExpression(node, context);\n case 'MemberExpression':\n return this.evaluateMemberExpression(node, context);\n case 'ConditionalExpression':\n return this.evaluateConditionalExpression(node, context);\n case 'ParenthesizedExpression':\n return this.evaluateAstNode(node.expression, context);\n case 'ObjectExpression':\n return this.evaluateObjectExpression(node, context);\n case 'SequenceExpression':\n return this.evaluateSequenceExpression(node, context);\n case 'TemplateLiteral':\n return this.evaluateTemplateLiteral(node, context);\n case 'CallExpression':\n return this.evaluateCallExpression(node, context);\n case 'ArrowFunctionExpression':\n return this.evaluateArrowFunctionExpression(node, context);\n case 'ChainExpression':\n return this.evaluateAstNode(node.expression, context);\n default:\n throw new TypeError(`Unsupported node type: ${node.type}`);\n }\n }\n\n /**\n * Evaluates a literal value node\n * @param node - The literal node to evaluate\n * @returns The literal value\n */\n private evaluateLiteral(node: Literal): unknown {\n return node.value;\n }\n\n /**\n * Evaluates a binary expression (e.g., a + b, x > y)\n * @param node - The binary expression node\n * @param context - The context containing variables and objects\n * @returns The result of the binary operation\n */\n private evaluateBinaryExpression(\n node: BinaryExpression,\n context: FormContext,\n ): unknown {\n const leftValue = this.evaluateAstNode(node.left, context);\n const rightValue = this.evaluateAstNode(node.right, context);\n return this.executeBinaryOperation(leftValue, node.operator, rightValue);\n }\n\n /**\n * Executes a binary operation with the given values and operator\n * @param leftValue - The left operand\n * @param operator - The binary operator\n * @param rightValue - The right operand\n * @returns The result of applying the operator to the operands\n */\n private executeBinaryOperation(\n leftValue: unknown,\n operator: BinaryOperator,\n rightValue: unknown,\n ): unknown {\n const isNumber = (value: unknown): value is number =>\n typeof value === 'number';\n const isString = (value: unknown): value is string =>\n typeof value === 'string';\n const isObject = (value: unknown): value is object =>\n value !== null && typeof value === 'object';\n\n switch (operator) {\n // Arithmetic operators\n case '+':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue + rightValue;\n }\n\n if (isString(leftValue) || isString(rightValue)) {\n return String(leftValue) + String(rightValue);\n }\n\n throw new TypeError('+ operator requires numbers or strings');\n\n case '-':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue - rightValue;\n }\n throw new TypeError('- operator requires numbers');\n\n case '*':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue * rightValue;\n }\n throw new TypeError('* operator requires numbers');\n\n case '/':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n if (rightValue === 0) {\n throw new Error('Division by zero');\n }\n return leftValue / rightValue;\n }\n throw new TypeError('/ operator requires numbers');\n\n case '%':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n if (rightValue === 0) {\n throw new Error('Modulo by zero');\n }\n return leftValue % rightValue;\n }\n throw new TypeError('% operator requires numbers');\n\n case '**':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue ** rightValue;\n }\n throw new TypeError('** operator requires numbers');\n\n // Comparison operators\n case '<':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue < rightValue;\n }\n throw new TypeError(\n '< operator requires operands of the same type (numbers or strings)',\n );\n\n case '>':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue > rightValue;\n }\n throw new TypeError(\n '> operator requires operands of the same type (numbers or strings)',\n );\n\n case '<=':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue <= rightValue;\n }\n throw new TypeError(\n '<= operator requires operands of the same type (numbers or strings)',\n );\n\n case '>=':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue >= rightValue;\n }\n throw new TypeError(\n '>= operator requires operands of the same type (numbers or strings)',\n );\n\n // Equality operators - maintain loose behavior as per specs\n case '==':\n return leftValue == rightValue;\n case '!=':\n return leftValue != rightValue;\n case '===':\n return leftValue === rightValue;\n case '!==':\n return leftValue !== rightValue;\n\n // Bitwise operators\n case '|':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue | rightValue;\n }\n throw new TypeError('| operator requires numbers');\n\n case '&':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue & rightValue;\n }\n throw new TypeError('& operator requires numbers');\n\n case '^':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue ^ rightValue;\n }\n throw new TypeError('^ operator requires numbers');\n\n case '<<':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue << rightValue;\n }\n throw new TypeError('<< operator requires numbers');\n\n case '>>':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue >> rightValue;\n }\n throw new TypeError('>> operator requires numbers');\n\n case '>>>':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue >>> rightValue;\n }\n throw new TypeError('>>> operator requires numbers');\n\n case 'in':\n if (!isObject(rightValue)) {\n throw new TypeError(\n 'Right operand must be an object for \"in\" operator',\n );\n }\n if (!isString(leftValue)) {\n throw new TypeError(\n 'Left operand must be of type string for \"in\" operator',\n );\n }\n return leftValue in rightValue;\n\n default:\n throw new Error(`Unsupported binary operator: ${operator}`);\n }\n }\n\n /**\n * Evaluates a member expression (e.g., obj.prop, arr[0]) with improved safety\n * @param node - The member expression node\n * @param context - The context containing variables and objects\n * @returns The value of the member\n */\n private evaluateMemberExpression(\n node: MemberExpression,\n context: FormContext,\n ): unknown {\n const propertyValue = node.computed\n ? this.evaluateAstNode(node.property, context)\n : (node.property as Identifier).name;\n\n if (\n typeof propertyValue !== 'string' &&\n typeof propertyValue !== 'number'\n ) {\n throw new Error(\n `Property accessor must be a string or number, but was ${typeof propertyValue}`,\n );\n }\n\n const objectValue = this.evaluateAstNode(node.object, context);\n\n const isOptional = node.optional;\n if (objectValue === null || objectValue === undefined) {\n if (isOptional) {\n return undefined;\n }\n const readObject = node.object;\n const readingFrom =\n readObject.type === 'Identifier' ? ` from ${readObject.name}` : '';\n throw new Error(\n `Cannot access properties of null or undefined (Reading: ${propertyValue.toString()}${readingFrom})`,\n );\n }\n\n if (typeof objectValue === 'object') {\n return this.getPropertyFromObject(\n objectValue as Record<string, unknown>,\n propertyValue,\n );\n }\n\n if (typeof objectValue === 'string') {\n if (\n propertyValue === 'length' ||\n typeof String.prototype[\n propertyValue as keyof typeof String.prototype\n ] === 'function'\n ) {\n return objectValue[propertyValue as keyof string];\n }\n\n if (\n typeof propertyValue === 'number' ||\n !Number.isNaN(Number(propertyValue))\n ) {\n return objectValue[propertyValue as keyof typeof objectValue];\n }\n\n throw new Error(`Invalid property access on string: ${propertyValue}`);\n }\n\n if (typeof objectValue === 'number') {\n throw new Error(\n `Cannot access properties on a number value: ${String(objectValue)}.${String(propertyValue)}`,\n );\n }\n\n if (typeof objectValue === 'boolean') {\n throw new Error(\n `Cannot access properties on a boolean value: ${String(objectValue)}.${String(propertyValue)}`,\n );\n }\n\n return this.getPropertyFromObject(\n objectValue as Record<string, unknown>,\n propertyValue,\n );\n }\n\n /**\n * Gets a property from an object by key\n * @param object - The object to retrieve the property from\n * @param propertyKey - The property key (string or number)\n * @returns The value of the property\n */\n private getPropertyFromObject(\n object: Record<string, unknown> | null | undefined,\n propertyKey: string | number,\n ): unknown {\n return object !== null && object !== undefined\n ? object[propertyKey]\n : undefined;\n }\n\n /**\n * Evaluates an identifier node by looking it up in the context\n * @param node - The identifier node\n * @param context - The context containing variables and objects\n * @returns The value of the identifier from the context\n */\n private evaluateIdentifier(node: Identifier, context: FormContext): unknown {\n if (typeof context === 'object' && node.name in context) {\n return context[node.name];\n }\n return undefined;\n }\n\n /**\n * Evaluates an array expression node\n * @param node - The array expression node\n * @param context - The context containing variables and objects\n * @returns The evaluated array\n */\n private evaluateArrayExpression(\n node: ArrayExpression,\n context: FormContext,\n ): unknown[] {\n const resultArray: unknown[] = [];\n\n for (const element of node.elements) {\n if (element === null) {\n resultArray.push(undefined);\n continue;\n }\n\n if (element.type !== 'SpreadElement') {\n resultArray.push(this.evaluateAstNode(element, context));\n continue;\n }\n\n const spreadValue = this.evaluateAstNode(element.argument, context);\n\n if (Array.isArray(spreadValue)) {\n resultArray.push(...(spreadValue as unknown[]));\n continue;\n }\n throw new TypeError(`Cannot spread non-array value in array literal`);\n }\n\n return resultArray;\n }\n\n /**\n * Evaluates a unary expression (e.g., !x, -value, typeof obj)\n * @param node - The unary expression node\n * @param context - The context containing variables and objects\n * @returns The result of the unary operation\n */\n private evaluateUnaryExpression(\n node: UnaryExpression,\n context: FormContext,\n ): unknown {\n const argumentValue = this.evaluateAstNode(node.argument, context);\n\n switch (node.operator) {\n case '-':\n if (typeof argumentValue !== 'number') {\n throw new TypeError('Unary - operator requires a number');\n }\n return -argumentValue;\n\n case '+':\n if (typeof argumentValue === 'string') {\n const numberValue = Number(argumentValue);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(\n `Cannot convert string \"${argumentValue}\" to number`,\n );\n }\n return numberValue;\n } else if (typeof argumentValue !== 'number') {\n throw new TypeError('Unary + operator requires a number or string');\n }\n return argumentValue;\n\n case '!':\n return !argumentValue;\n\n case '~':\n if (typeof argumentValue !== 'number') {\n throw new TypeError('Bitwise NOT (~) operator requires a number');\n }\n return ~argumentValue;\n\n case 'typeof':\n return typeof argumentValue;\n\n case 'void':\n return undefined;\n\n case 'delete':\n throw new Error('Delete operator is not supported in expressions');\n }\n }\n\n /**\n * Evaluates a logical expression (&&, ||, ??)\n * @param node - The logical expression node\n * @param context - The context containing variables and objects\n * @returns The result of the logical operation\n */\n private evaluateLogicalExpression(\n node: LogicalExpression,\n context: FormContext,\n ): unknown {\n const leftValue = this.evaluateAstNode(node.left, context);\n\n switch (node.operator) {\n case '&&':\n if (!leftValue) {\n return leftValue;\n }\n return this.evaluateAstNode(node.right, context);\n\n case '||':\n if (leftValue) {\n return leftValue;\n }\n return this.evaluateAstNode(node.right, context);\n\n case '??':\n if (leftValue === null || leftValue === undefined) {\n return this.evaluateAstNode(node.right, context);\n }\n return leftValue;\n }\n }\n\n /**\n * Evaluates a conditional (ternary) expression (condition ? trueValue : falseValue)\n * @param node - The conditional expression node\n * @param context - The context containing variables and objects\n * @returns The result based on the condition evaluation\n */\n private evaluateConditionalExpression(\n node: ConditionalExpression,\n context: FormContext,\n ): unknown {\n const condition = this.evaluateAstNode(node.test, context);\n const isConditionTrue = Boolean(condition);\n\n if (isConditionTrue) {\n return this.evaluateAstNode(node.consequent, context);\n }\n\n return this.evaluateAstNode(node.alternate, context);\n }\n\n /**\n * Evaluates an object expression (object literal)\n * @param node - The object expression node\n * @param context - The context containing variables and objects\n * @returns The evaluated object\n */\n private evaluateObjectExpression(\n node: ObjectExpression,\n context: FormContext,\n ): object {\n const result: Record<string, unknown> = {};\n\n for (const property of node.properties) {\n if (property.type !== 'Property') {\n continue;\n }\n\n const prop = property;\n\n let key: string;\n if (prop.key.type === 'Identifier' && !prop.computed) {\n key = prop.key.name;\n } else {\n const evaluatedKey = this.evaluateAstNode(prop.key, context);\n key = String(evaluatedKey);\n }\n\n result[key] = this.evaluateAstNode(prop.value, context);\n }\n\n return result;\n }\n\n /**\n * Evaluates a sequence expression (comma-separated expressions)\n * @param node - The sequence expression node\n * @param context - The context containing variables and objects\n * @returns The result of the last expression in the sequence\n */\n private evaluateSequenceExpression(\n node: SequenceExpression,\n context: FormContext,\n ): unknown {\n let result: unknown;\n\n for (const expression of node.expressions) {\n result = this.evaluateAstNode(expression, context);\n }\n\n return result;\n }\n\n /**\n * Evaluates a template literal\n * @param node - The template literal node\n * @param context - The context containing variables and objects\n * @returns The evaluated template string\n */\n private evaluateTemplateLiteral(\n node: TemplateLiteral,\n context: FormContext,\n ): string {\n let result = '';\n\n for (let i = 0; i < node.quasis.length; i++) {\n const cookedValue = node.quasis[i].value.cooked;\n result = result.concat(cookedValue ?? '');\n if (i < node.expressions.length) {\n const exprValue = this.evaluateAstNode(node.expressions[i], context);\n result = result.concat(String(exprValue));\n }\n }\n\n return result;\n }\n\n /**\n * Evaluates a function call expression with strict type checking\n * @param node - The function call expression node\n * @param context - The context containing variables and objects\n * @returns The result of the function call\n */\n private evaluateCallExpression(\n node: CallExpression,\n context: FormContext,\n ): unknown {\n if (node.callee.type !== 'MemberExpression') {\n throw new TypeError('Only method calls are supported');\n }\n\n const memberExpr = node.callee;\n const object = this.evaluateAstNode(memberExpr.object, context);\n\n const isOptionalCall = node.optional || memberExpr.optional;\n if (object === null || object === undefined) {\n if (isOptionalCall) {\n return undefined;\n }\n throw new Error('Cannot call methods on null || undefined');\n }\n\n let methodName: string;\n if (!memberExpr.computed && memberExpr.property.type === 'Identifier') {\n methodName = memberExpr.property.name;\n } else if (memberExpr.computed) {\n const propertyValue = this.evaluateAstNode(memberExpr.property, context);\n if (\n typeof propertyValue !== 'string' &&\n typeof propertyValue !== 'number'\n ) {\n throw new TypeError('Method name must be a string || number');\n }\n methodName = String(propertyValue);\n } else {\n throw new TypeError('Unexpected property type in method call');\n }\n\n const args: unknown[] = [];\n for (const arg of node.arguments) {\n args.push(this.evaluateAstNode(arg, context));\n }\n\n return this.callSafeMethod(object, methodName, args);\n }\n\n /**\n * Calls a method on an object after verifying it's safe to do so\n * @param object - The object to call the method on\n * @param methodName - The name of the method to call\n * @param args - The arguments to pass to the method\n * @returns The result of the method call\n */\n private callSafeMethod(\n object: unknown,\n methodName: string,\n args: unknown[],\n ): unknown {\n const objType: string = typeof object;\n const isAllowed = this.isAllowedMethod(objType, methodName, object);\n\n if (!isAllowed) {\n throw new TypeError(\n `Method ${methodName} is not supported on type ${objType}`,\n );\n }\n\n const objectWithMethod = object as ObjectWithMethod;\n const method = objectWithMethod[methodName];\n\n if (typeof method !== 'function') {\n throw new TypeError(`${methodName} is not a function`);\n }\n\n return method.apply(object, args);\n }\n\n private isAllowedMethod(\n objectType: string,\n methodName: string,\n object: unknown,\n ) {\n if (objectType === 'object' && object !== null) {\n const objectWithMethods = object as ObjectWithMethod;\n return (\n methodName in objectWithMethods &&\n typeof objectWithMethods[methodName] === 'function'\n );\n }\n\n if (!(objectType in SAFE_METHODS)) {\n return false;\n }\n return SAFE_METHODS[objectType as keyof SafeMethods].includes(methodName);\n }\n\n /**\n * Evaluates an arrow function expression\n * @param node - The arrow function expression node\n * @param context - The context containing variables and objects\n * @returns A function that can be called from other expressions\n */\n private evaluateArrowFunctionExpression(\n node: ArrowFunctionExpression,\n context: FormContext,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n ): Function {\n // We only support simple arrow functions with expression bodies\n if (\n node.body.type !== 'BlockStatement' &&\n node.body.type !== 'Identifier' &&\n node.body.type !== 'MemberExpression' &&\n node.body.type !== 'CallExpression' &&\n node.body.type !== 'BinaryExpression' &&\n node.body.type !== 'LogicalExpression' &&\n node.body.type !== 'TemplateLiteral'\n ) {\n throw new TypeError(\n `Unsupported arrow function body type: ${node.body.type}`,\n );\n }\n\n return (...args: unknown[]): unknown => {\n const arrowContext = { ...context };\n\n for (let i = 0; i < node.params.length && i < args.length; i++) {\n const param = node.params[i];\n if (param.type !== 'Identifier') {\n throw new TypeError(\n 'Only simple identifier parameters are supported in arrow functions',\n );\n }\n\n const paramName = param.name;\n arrowContext[paramName] = args[i];\n }\n\n if (node.body.type !== 'BlockStatement') {\n return this.evaluateAstNode(node.body, arrowContext);\n }\n\n throw new TypeError('Block-bodied arrow functions are not supported');\n };\n }\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { NGX_FW_COMPONENT_REGISTRATIONS } from '../tokens/component-registrations';\nimport { ComponentResolver } from '../types/component-resolver.type';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ComponentRegistrationService implements ComponentResolver {\n private readonly _registrations = signal(\n inject(NGX_FW_COMPONENT_REGISTRATIONS),\n );\n\n readonly registrations = this._registrations.asReadonly();\n}\n","import { inject, Injectable } from '@angular/core';\nimport { TestIdBuilderFn } from '../types/functions.type';\nimport { NGX_FW_CONFIG_RESOLVED } from '../tokens/global-config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgxFbConfigurationService {\n private readonly _config = inject(NGX_FW_CONFIG_RESOLVED);\n\n get testIdBuilder(): TestIdBuilderFn | undefined {\n return this._config.testIdBuilderFn;\n }\n}\n","export function toSafeString(value: unknown): string {\n if (value === null) {\n return 'null';\n }\n\n switch (typeof value) {\n case 'undefined':\n return 'undefined';\n case 'string':\n return value;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'number':\n case 'symbol':\n case 'bigint':\n case 'function':\n return value.toString();\n default:\n return JSON.stringify(value);\n }\n}\n","import { computed, Signal } from '@angular/core';\nimport { Program } from 'acorn';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\n\nfunction isExpressionFn<T>(\n value: Expression<T> | T,\n): value is (formValue: FormContext) => T {\n return typeof value === 'function';\n}\n\n/**\n * Resolves an expression option into a computed signal value\n *\n * Handles three expression types:\n * - **string**: Parsed to AST and evaluated against the form context\n * - **function**: Called with the form context as argument\n * - **static value / undefined**: Returned as-is\n *\n * Internally caches the parsed AST in a separate computed signal\n * so it is only recalculated when the option itself changes.\n *\n * @param option Signal containing the expression option (string, function, static value, or undefined)\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @returns Computed signal that resolves to the evaluated value or undefined\n */\nexport function resolveExpression<T>(\n option: Signal<Expression<T> | T | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n) {\n const ast = computed<Program | null>(() => {\n const value = option();\n if (typeof value !== 'string') {\n return null;\n }\n return expressionService.parseExpressionToAst(value);\n });\n\n return computed<T | undefined>(() => {\n const value = option();\n\n if (value === undefined) {\n return undefined;\n }\n\n if (isExpressionFn<T>(value)) {\n return value(formContext());\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n const parsedAst = ast();\n if (!parsedAst) {\n return undefined;\n }\n return expressionService.evaluateExpression(parsedAst, formContext()) as T;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\nimport { resolveExpression } from './resolve-expression';\n\n/**\n * Resolves an inheritable boolean expression with parent state fallback\n *\n * Used for states like disabled and readonly that follow a common pattern:\n * 1. If the option is undefined, inherit the parent state\n * 2. Otherwise, resolve the expression and default to false\n *\n * @param option Signal containing the expression option (boolean, string expression, function, or undefined)\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @param parentState Signal providing the parent group's state to inherit from\n * @returns Computed signal that resolves to a boolean state\n */\nexport function resolveInheritableExpression(\n option: Signal<Expression<boolean> | boolean | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n parentState: Signal<boolean>,\n) {\n const resolved = resolveExpression<boolean>(\n option,\n formContext,\n expressionService,\n );\n\n return computed(() => {\n if (option() === undefined) {\n return parentState();\n }\n return resolved() ?? false;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\nimport { resolveExpression } from './resolve-expression';\n\n/**\n * Resolves the hidden state with parent combination logic\n *\n * The hidden state differs from disabled/readonly inheritance:\n * 1. If the option is undefined, inherit the parent hidden state\n * 2. If the option is a function expression, use only the resolved value\n * 3. If the option is a string expression, OR with the parent hidden state\n * (a child is hidden if either its own condition or its parent is hidden)\n *\n * @param option Signal containing the hidden expression option\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @param parentHiddenState Signal providing the parent group's hidden state\n * @returns Computed signal that resolves to a boolean hidden state\n */\nexport function resolveHiddenState(\n option: Signal<Expression<boolean> | boolean | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n parentHiddenState: Signal<boolean>,\n) {\n const resolved = resolveExpression<boolean>(\n option,\n formContext,\n expressionService,\n );\n\n return computed<boolean>(() => {\n const hiddenOption = option();\n\n if (hiddenOption === undefined) {\n return parentHiddenState();\n }\n\n const isHidden = resolved() ?? false;\n\n if (typeof hiddenOption === 'function') {\n return isHidden;\n }\n\n return isHidden || parentHiddenState();\n });\n}\n","import { effect, Signal, untracked } from '@angular/core';\nimport { StateHandling } from '../types/registration.type';\nimport { SimpleFunction } from '../types/functions.type';\n\n/**\n * Creates an effect that manages disabled state transitions\n *\n * When disabledHandling is 'auto', calls the appropriate enable/disable\n * function based on the disabled signal. When 'manual', does nothing.\n *\n * @param options Configuration object for disabled effect\n * @param options.disabledSignal Signal that indicates if the component should be disabled\n * @param options.disabledHandlingSignal Signal that determines how disabled state changes should be handled\n * @param options.enableFunction Function to call when component should be enabled\n * @param options.disableFunction Function to call when component should be disabled\n */\nexport function resolveDisabledEffect(options: {\n disabledSignal: Signal<boolean>;\n disabledHandlingSignal: Signal<StateHandling>;\n enableFunction: SimpleFunction;\n disableFunction: SimpleFunction;\n}) {\n effect(() => {\n const disabled = options.disabledSignal();\n const disabledHandling = options.disabledHandlingSignal();\n\n if (disabledHandling === 'manual') {\n return;\n }\n\n if (!disabled) {\n untracked(() => {\n options.enableFunction();\n });\n return;\n }\n untracked(() => {\n options.disableFunction();\n });\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { NgxFbBaseContent } from '../types/content.type';\nimport { TestIdBuilderFn } from '../types/functions.type';\n\n/**\n * Resolves a test ID for a form element\n *\n * The test ID is determined using the following priority:\n * 1. A local testIdBuilder function if provided\n * 2. A global testIdBuilder function if provided\n * 3. Default: joins parentTestId and name with '-', or just name if no parent\n *\n * @param content Signal containing the base content configuration\n * @param name Signal containing the control/group name\n * @param testIdBuilder Signal holding an optional local testIdBuilder function\n * @param globalTestIdBuilder Optional global testIdBuilder function from configuration\n * @param parentTestId Signal providing the parent group's test ID\n * @returns Computed signal that resolves to the test ID string\n */\nexport function resolveTestId(\n content: Signal<NgxFbBaseContent>,\n name: Signal<string>,\n testIdBuilder: Signal<TestIdBuilderFn | undefined>,\n globalTestIdBuilder: TestIdBuilderFn | undefined,\n parentTestId: Signal<string | undefined>,\n) {\n return computed(() => {\n const contentValue = content();\n const id = name();\n const parentGroupTestId = parentTestId();\n const builderFn = testIdBuilder();\n\n if (builderFn) {\n return builderFn(contentValue, id, parentGroupTestId);\n }\n\n if (globalTestIdBuilder) {\n return globalTestIdBuilder(contentValue, id, parentGroupTestId);\n }\n\n if (!parentGroupTestId) {\n return id;\n }\n return [parentGroupTestId, id].join('-');\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { StateHandling } from '../types/registration.type';\n\n/**\n * Resolves the hidden attribute value for DOM binding\n *\n * When visibilityHandling is 'auto', returns `true` (attribute present)\n * or `null` (attribute absent) based on the hidden state.\n * When visibilityHandling is 'manual', always returns `null` so the\n * component can handle visibility itself.\n *\n * @param options Configuration object\n * @param options.hiddenSignal Signal indicating whether the element should be hidden\n * @param options.hiddenHandlingSignal Signal for the visibility handling strategy\n * @returns Computed signal resolving to `true` (hidden) or `null` (visible)\n */\nexport function resolveHiddenAttribute(options: {\n hiddenSignal: Signal<boolean>;\n hiddenHandlingSignal: Signal<StateHandling>;\n}) {\n return computed(() => {\n const isHidden = options.hiddenSignal();\n const visibilityHandling = options.hiddenHandlingSignal();\n if (visibilityHandling !== 'auto') {\n return null;\n }\n return isHidden ? true : null;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { UpdateStrategy } from '../types/content.type';\n\n/**\n * Resolves the update strategy for a form control or group\n *\n * The strategy is determined using the following priority:\n * 1. The control's own updateOn value if defined\n * 2. The parent group's strategy if defined\n * 3. The application-wide default strategy\n *\n * @param controlUpdateOn Signal containing the control's updateOn configuration\n * @param parentStrategy Signal providing the parent group's update strategy\n * @param defaultStrategy The application-wide default update strategy\n * @returns Computed signal providing the resolved update strategy\n */\nexport function resolveUpdateStrategy(\n controlUpdateOn: Signal<UpdateStrategy | undefined>,\n parentStrategy: Signal<UpdateStrategy | undefined>,\n defaultStrategy: UpdateStrategy,\n) {\n return computed<UpdateStrategy>(() => {\n return controlUpdateOn() ?? parentStrategy() ?? defaultStrategy;\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B;;ACO7B;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAIU,6BAA6B,CAAA;AAChC,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAEnD;;;AAGG;AACc,IAAA,0BAA0B,GAAG,MAAM,CAClD,yBAAyB,CAC1B;AAED;;;AAGG;IACM,OAAO,GAAG,KAAK,CAAC,QAAQ,mDAC/B,KAAK,EAAE,sBAAsB,EAAA,CAC7B;AAEO,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC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okens/component-resolver.ts","../../../../libs/core/src/lib/tokens/global-config.ts","../../../../libs/core/src/lib/tokens/default-update-strategy.ts","../../../../libs/core/src/lib/services/expression.service.ts","../../../../libs/core/src/lib/services/component-registration.service.ts","../../../../libs/core/src/lib/services/configuration.service.ts","../../../../libs/core/src/lib/helper/registration.ts","../../../../libs/core/src/lib/helper/string.ts","../../../../libs/core/src/lib/composables/resolve-expression.ts","../../../../libs/core/src/lib/composables/resolve-inheritable-expression.ts","../../../../libs/core/src/lib/composables/resolve-hidden-state.ts","../../../../libs/core/src/lib/composables/resolve-disabled-effect.ts","../../../../libs/core/src/lib/composables/resolve-test-id.ts","../../../../libs/core/src/lib/composables/resolve-hidden-attribute.ts","../../../../libs/core/src/lib/composables/resolve-update-strategy.ts","../../../../libs/core/src/ngx-formbar-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ComponentRegistrationEntry } from '../types/registration.type';\n\nexport const NGX_FW_COMPONENT_REGISTRATIONS = new InjectionToken<\n ReadonlyMap<string, ComponentRegistrationEntry>\n>('NGX_FW_COMPONENT_REGISTRATIONS', {\n providedIn: 'root',\n factory: () => new Map(),\n});\n","import { InjectionToken } from '@angular/core';\nimport { ComponentResolver } from '../types/component-resolver.type';\n\nexport const NGX_FW_COMPONENT_RESOLVER = new InjectionToken<ComponentResolver>(\n 'NGX_FW_COMPONENT_RESOLVER',\n);\n","import { inject, InjectionToken } from '@angular/core';\nimport { NgxFbGlobalConfiguration } from '../types/global-configuration.type';\n\nexport const NGX_FW_DEFAULT_CONFIG =\n new InjectionToken<NgxFbGlobalConfiguration>('NGX_FW_DEFAULT_CONFIG', {\n providedIn: 'root',\n factory: () => ({}) as NgxFbGlobalConfiguration,\n });\n\nexport const NGX_FW_CONFIG = new InjectionToken<\n readonly Partial<NgxFbGlobalConfiguration>[]\n>('NGX_FW_CONFIG', {\n providedIn: 'root',\n factory: () => [],\n});\n\nexport const NGX_FW_CONFIG_RESOLVED =\n new InjectionToken<NgxFbGlobalConfiguration>('NGX_FW_CONFIG_RESOLVED', {\n providedIn: 'root',\n factory: () => {\n const base = inject(NGX_FW_DEFAULT_CONFIG);\n const extras = inject(NGX_FW_CONFIG, { optional: true }) ?? [];\n return mergeDeep(base, ...extras);\n },\n });\n\nfunction mergeDeep<T>(base: T, ...partials: readonly Partial<T>[]): T {\n const out = { ...base };\n for (const p of partials) {\n for (const k of Object.keys(p) as (keyof T)[]) {\n const src = (p as unknown as Record<keyof T, unknown>)[k];\n const dst = (out as unknown as Record<keyof T, unknown>)[k];\n\n const bothObjects =\n typeof dst === 'object' &&\n dst !== null &&\n typeof src === 'object' &&\n src !== null &&\n !Array.isArray(dst) &&\n !Array.isArray(src);\n\n if (bothObjects) {\n (out as unknown as Record<keyof T, unknown>)[k] = mergeDeep(\n dst as unknown as T,\n src as Partial<T>,\n );\n continue;\n }\n (out as unknown as Record<keyof T, unknown>)[k] = src;\n }\n }\n return out;\n}\n","import { InjectionToken } from '@angular/core';\nimport { UpdateStrategy } from '../types/content.type';\n\nexport const NGX_FW_DEFAULT_UPDATE_STRATEGY =\n new InjectionToken<UpdateStrategy>('NGX_FW_DEFAULT_UPDATE_STRATEGY', {\n providedIn: 'root',\n factory: () => 'change',\n });\n","import { Injectable } from '@angular/core';\nimport type {\n ArrayExpression,\n ArrowFunctionExpression,\n BinaryExpression,\n BinaryOperator,\n CallExpression,\n ConditionalExpression,\n Expression,\n Identifier,\n Literal,\n LogicalExpression,\n MemberExpression,\n ObjectExpression,\n PrivateIdentifier,\n Program,\n SequenceExpression,\n SpreadElement,\n Super,\n TemplateLiteral,\n UnaryExpression,\n} from 'acorn';\nimport * as acorn from 'acorn';\nimport type { FormContext } from '../types/expression.type';\n\n/**\n * Set of node types that are not supported in expressions for security or complexity reasons\n */\nconst UNSUPPORTED_NODE_TYPES = new Set([\n 'ThisExpression',\n 'Super',\n 'PrivateIdentifier',\n 'FunctionExpression',\n 'UpdateExpression',\n 'AssignmentExpression',\n 'NewExpression',\n 'YieldExpression',\n 'TaggedTemplateExpression',\n 'ClassExpression',\n 'MetaProperty',\n 'AwaitExpression',\n 'ImportExpression',\n]);\n\ntype SafeMethods = {\n string: string[];\n number: string[];\n boolean: string[];\n array: string[];\n};\n/**\n * Mapping of safe methods that can be called on various types during evaluation\n */\nconst SAFE_METHODS: SafeMethods = {\n string: [\n 'charAt',\n 'concat',\n 'includes',\n 'endsWith',\n 'indexOf',\n 'lastIndexOf',\n 'padEnd',\n 'padStart',\n 'repeat',\n 'replace',\n 'slice',\n 'split',\n 'startsWith',\n 'substring',\n 'toLowerCase',\n 'toUpperCase',\n 'trim',\n 'trimEnd',\n 'trimStart',\n 'toString',\n ],\n number: ['toFixed', 'toPrecision', 'toString'],\n boolean: ['toString'],\n array: [\n 'concat',\n 'every',\n 'filter',\n 'find',\n 'findIndex',\n 'includes',\n 'indexOf',\n 'join',\n 'lastIndexOf',\n 'map',\n 'reduce',\n 'reduceRight',\n 'slice',\n 'some',\n 'toString',\n ],\n} as const;\n\ntype ObjectWithMethod = Record<string, unknown>;\n\n/**\n * Service for parsing and evaluating JavaScript expressions within a context object\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ExpressionService {\n /**\n * Cache for parsed ASTs to avoid re-parsing the same expression\n */\n private readonly astCache = new Map<string, Program>();\n\n /**\n * Parses an expression string into an abstract syntax tree (AST)\n * @param expressionString - The expression to parse\n * @returns The parsed AST or null\n */\n parseExpressionToAst(expressionString?: string): Program | null {\n if (!expressionString) {\n return null;\n }\n const cachedAst = this.astCache.get(expressionString);\n if (cachedAst) {\n return cachedAst;\n }\n\n const ast = acorn.parse(expressionString, { ecmaVersion: 2022 });\n this.astCache.set(expressionString, ast);\n return ast;\n }\n\n /**\n * Evaluates an expression AST within the provided context\n * @param ast - The parsed AST to evaluate\n * @param context - The context containing variables and objects referenced in the expression\n * @returns The result of evaluating the expression\n */\n evaluateExpression(ast?: Program | null, context?: FormContext): unknown {\n if (!context || !ast) {\n return null;\n }\n\n const node = ast.body[0];\n if (node.type !== 'ExpressionStatement') {\n throw new TypeError(`Unsupported statement type: ${node.type}`);\n }\n\n return this.evaluateAstNode(node.expression, context);\n }\n\n /**\n * Evaluates a node in the AST\n * @param node - The AST node to evaluate\n * @param context - The context containing variables and objects\n * @returns The result of evaluating the node\n */\n private evaluateAstNode(\n node: Expression | PrivateIdentifier | Super | SpreadElement,\n context: FormContext,\n ): unknown {\n // Check if the node type is unsupported first\n if (UNSUPPORTED_NODE_TYPES.has(node.type)) {\n throw new TypeError(`${node.type} is not supported in expressions`);\n }\n\n // Handle supported node types\n switch (node.type) {\n case 'Identifier':\n return this.evaluateIdentifier(node, context);\n case 'Literal':\n return this.evaluateLiteral(node);\n case 'ArrayExpression':\n return this.evaluateArrayExpression(node, context);\n case 'UnaryExpression':\n return this.evaluateUnaryExpression(node, context);\n case 'BinaryExpression':\n return this.evaluateBinaryExpression(node, context);\n case 'LogicalExpression':\n return this.evaluateLogicalExpression(node, context);\n case 'MemberExpression':\n return this.evaluateMemberExpression(node, context);\n case 'ConditionalExpression':\n return this.evaluateConditionalExpression(node, context);\n case 'ParenthesizedExpression':\n return this.evaluateAstNode(node.expression, context);\n case 'ObjectExpression':\n return this.evaluateObjectExpression(node, context);\n case 'SequenceExpression':\n return this.evaluateSequenceExpression(node, context);\n case 'TemplateLiteral':\n return this.evaluateTemplateLiteral(node, context);\n case 'CallExpression':\n return this.evaluateCallExpression(node, context);\n case 'ArrowFunctionExpression':\n return this.evaluateArrowFunctionExpression(node, context);\n case 'ChainExpression':\n return this.evaluateAstNode(node.expression, context);\n default:\n throw new TypeError(`Unsupported node type: ${node.type}`);\n }\n }\n\n /**\n * Evaluates a literal value node\n * @param node - The literal node to evaluate\n * @returns The literal value\n */\n private evaluateLiteral(node: Literal): unknown {\n return node.value;\n }\n\n /**\n * Evaluates a binary expression (e.g., a + b, x > y)\n * @param node - The binary expression node\n * @param context - The context containing variables and objects\n * @returns The result of the binary operation\n */\n private evaluateBinaryExpression(\n node: BinaryExpression,\n context: FormContext,\n ): unknown {\n const leftValue = this.evaluateAstNode(node.left, context);\n const rightValue = this.evaluateAstNode(node.right, context);\n return this.executeBinaryOperation(leftValue, node.operator, rightValue);\n }\n\n /**\n * Executes a binary operation with the given values and operator\n * @param leftValue - The left operand\n * @param operator - The binary operator\n * @param rightValue - The right operand\n * @returns The result of applying the operator to the operands\n */\n private executeBinaryOperation(\n leftValue: unknown,\n operator: BinaryOperator,\n rightValue: unknown,\n ): unknown {\n const isNumber = (value: unknown): value is number =>\n typeof value === 'number';\n const isString = (value: unknown): value is string =>\n typeof value === 'string';\n const isObject = (value: unknown): value is object =>\n value !== null && typeof value === 'object';\n\n switch (operator) {\n // Arithmetic operators\n case '+':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue + rightValue;\n }\n\n if (isString(leftValue) || isString(rightValue)) {\n return String(leftValue) + String(rightValue);\n }\n\n throw new TypeError('+ operator requires numbers or strings');\n\n case '-':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue - rightValue;\n }\n throw new TypeError('- operator requires numbers');\n\n case '*':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue * rightValue;\n }\n throw new TypeError('* operator requires numbers');\n\n case '/':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n if (rightValue === 0) {\n throw new Error('Division by zero');\n }\n return leftValue / rightValue;\n }\n throw new TypeError('/ operator requires numbers');\n\n case '%':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n if (rightValue === 0) {\n throw new Error('Modulo by zero');\n }\n return leftValue % rightValue;\n }\n throw new TypeError('% operator requires numbers');\n\n case '**':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue ** rightValue;\n }\n throw new TypeError('** operator requires numbers');\n\n // Comparison operators\n case '<':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue < rightValue;\n }\n throw new TypeError(\n '< operator requires operands of the same type (numbers or strings)',\n );\n\n case '>':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue > rightValue;\n }\n throw new TypeError(\n '> operator requires operands of the same type (numbers or strings)',\n );\n\n case '<=':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue <= rightValue;\n }\n throw new TypeError(\n '<= operator requires operands of the same type (numbers or strings)',\n );\n\n case '>=':\n if (\n (isNumber(leftValue) && isNumber(rightValue)) ||\n (isString(leftValue) && isString(rightValue))\n ) {\n return leftValue >= rightValue;\n }\n throw new TypeError(\n '>= operator requires operands of the same type (numbers or strings)',\n );\n\n // Equality operators - maintain loose behavior as per specs\n case '==':\n return leftValue == rightValue;\n case '!=':\n return leftValue != rightValue;\n case '===':\n return leftValue === rightValue;\n case '!==':\n return leftValue !== rightValue;\n\n // Bitwise operators\n case '|':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue | rightValue;\n }\n throw new TypeError('| operator requires numbers');\n\n case '&':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue & rightValue;\n }\n throw new TypeError('& operator requires numbers');\n\n case '^':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue ^ rightValue;\n }\n throw new TypeError('^ operator requires numbers');\n\n case '<<':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue << rightValue;\n }\n throw new TypeError('<< operator requires numbers');\n\n case '>>':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue >> rightValue;\n }\n throw new TypeError('>> operator requires numbers');\n\n case '>>>':\n if (isNumber(leftValue) && isNumber(rightValue)) {\n return leftValue >>> rightValue;\n }\n throw new TypeError('>>> operator requires numbers');\n\n case 'in':\n if (!isObject(rightValue)) {\n throw new TypeError(\n 'Right operand must be an object for \"in\" operator',\n );\n }\n if (!isString(leftValue)) {\n throw new TypeError(\n 'Left operand must be of type string for \"in\" operator',\n );\n }\n return leftValue in rightValue;\n\n default:\n throw new Error(`Unsupported binary operator: ${operator}`);\n }\n }\n\n /**\n * Evaluates a member expression (e.g., obj.prop, arr[0]) with improved safety\n * @param node - The member expression node\n * @param context - The context containing variables and objects\n * @returns The value of the member\n */\n private evaluateMemberExpression(\n node: MemberExpression,\n context: FormContext,\n ): unknown {\n const propertyValue = node.computed\n ? this.evaluateAstNode(node.property, context)\n : (node.property as Identifier).name;\n\n if (\n typeof propertyValue !== 'string' &&\n typeof propertyValue !== 'number'\n ) {\n throw new Error(\n `Property accessor must be a string or number, but was ${typeof propertyValue}`,\n );\n }\n\n const objectValue = this.evaluateAstNode(node.object, context);\n\n const isOptional = node.optional;\n if (objectValue === null || objectValue === undefined) {\n if (isOptional) {\n return undefined;\n }\n const readObject = node.object;\n const readingFrom =\n readObject.type === 'Identifier' ? ` from ${readObject.name}` : '';\n throw new Error(\n `Cannot access properties of null or undefined (Reading: ${propertyValue.toString()}${readingFrom})`,\n );\n }\n\n if (typeof objectValue === 'object') {\n return this.getPropertyFromObject(\n objectValue as Record<string, unknown>,\n propertyValue,\n );\n }\n\n if (typeof objectValue === 'string') {\n if (\n propertyValue === 'length' ||\n typeof String.prototype[\n propertyValue as keyof typeof String.prototype\n ] === 'function'\n ) {\n return objectValue[propertyValue as keyof string];\n }\n\n if (\n typeof propertyValue === 'number' ||\n !Number.isNaN(Number(propertyValue))\n ) {\n return objectValue[propertyValue as keyof typeof objectValue];\n }\n\n throw new Error(`Invalid property access on string: ${propertyValue}`);\n }\n\n if (typeof objectValue === 'number') {\n throw new Error(\n `Cannot access properties on a number value: ${String(objectValue)}.${String(propertyValue)}`,\n );\n }\n\n if (typeof objectValue === 'boolean') {\n throw new Error(\n `Cannot access properties on a boolean value: ${String(objectValue)}.${String(propertyValue)}`,\n );\n }\n\n return this.getPropertyFromObject(\n objectValue as Record<string, unknown>,\n propertyValue,\n );\n }\n\n /**\n * Gets a property from an object by key\n * @param object - The object to retrieve the property from\n * @param propertyKey - The property key (string or number)\n * @returns The value of the property\n */\n private getPropertyFromObject(\n object: Record<string, unknown> | null | undefined,\n propertyKey: string | number,\n ): unknown {\n return object !== null && object !== undefined\n ? object[propertyKey]\n : undefined;\n }\n\n /**\n * Evaluates an identifier node by looking it up in the context\n * @param node - The identifier node\n * @param context - The context containing variables and objects\n * @returns The value of the identifier from the context\n */\n private evaluateIdentifier(node: Identifier, context: FormContext): unknown {\n if (typeof context === 'object' && node.name in context) {\n return context[node.name];\n }\n return undefined;\n }\n\n /**\n * Evaluates an array expression node\n * @param node - The array expression node\n * @param context - The context containing variables and objects\n * @returns The evaluated array\n */\n private evaluateArrayExpression(\n node: ArrayExpression,\n context: FormContext,\n ): unknown[] {\n const resultArray: unknown[] = [];\n\n for (const element of node.elements) {\n if (element === null) {\n resultArray.push(undefined);\n continue;\n }\n\n if (element.type !== 'SpreadElement') {\n resultArray.push(this.evaluateAstNode(element, context));\n continue;\n }\n\n const spreadValue = this.evaluateAstNode(element.argument, context);\n\n if (Array.isArray(spreadValue)) {\n resultArray.push(...(spreadValue as unknown[]));\n continue;\n }\n throw new TypeError(`Cannot spread non-array value in array literal`);\n }\n\n return resultArray;\n }\n\n /**\n * Evaluates a unary expression (e.g., !x, -value, typeof obj)\n * @param node - The unary expression node\n * @param context - The context containing variables and objects\n * @returns The result of the unary operation\n */\n private evaluateUnaryExpression(\n node: UnaryExpression,\n context: FormContext,\n ): unknown {\n const argumentValue = this.evaluateAstNode(node.argument, context);\n\n switch (node.operator) {\n case '-':\n if (typeof argumentValue !== 'number') {\n throw new TypeError('Unary - operator requires a number');\n }\n return -argumentValue;\n\n case '+':\n if (typeof argumentValue === 'string') {\n const numberValue = Number(argumentValue);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(\n `Cannot convert string \"${argumentValue}\" to number`,\n );\n }\n return numberValue;\n } else if (typeof argumentValue !== 'number') {\n throw new TypeError('Unary + operator requires a number or string');\n }\n return argumentValue;\n\n case '!':\n return !argumentValue;\n\n case '~':\n if (typeof argumentValue !== 'number') {\n throw new TypeError('Bitwise NOT (~) operator requires a number');\n }\n return ~argumentValue;\n\n case 'typeof':\n return typeof argumentValue;\n\n case 'void':\n return undefined;\n\n case 'delete':\n throw new Error('Delete operator is not supported in expressions');\n }\n }\n\n /**\n * Evaluates a logical expression (&&, ||, ??)\n * @param node - The logical expression node\n * @param context - The context containing variables and objects\n * @returns The result of the logical operation\n */\n private evaluateLogicalExpression(\n node: LogicalExpression,\n context: FormContext,\n ): unknown {\n const leftValue = this.evaluateAstNode(node.left, context);\n\n switch (node.operator) {\n case '&&':\n if (!leftValue) {\n return leftValue;\n }\n return this.evaluateAstNode(node.right, context);\n\n case '||':\n if (leftValue) {\n return leftValue;\n }\n return this.evaluateAstNode(node.right, context);\n\n case '??':\n if (leftValue === null || leftValue === undefined) {\n return this.evaluateAstNode(node.right, context);\n }\n return leftValue;\n }\n }\n\n /**\n * Evaluates a conditional (ternary) expression (condition ? trueValue : falseValue)\n * @param node - The conditional expression node\n * @param context - The context containing variables and objects\n * @returns The result based on the condition evaluation\n */\n private evaluateConditionalExpression(\n node: ConditionalExpression,\n context: FormContext,\n ): unknown {\n const condition = this.evaluateAstNode(node.test, context);\n const isConditionTrue = Boolean(condition);\n\n if (isConditionTrue) {\n return this.evaluateAstNode(node.consequent, context);\n }\n\n return this.evaluateAstNode(node.alternate, context);\n }\n\n /**\n * Evaluates an object expression (object literal)\n * @param node - The object expression node\n * @param context - The context containing variables and objects\n * @returns The evaluated object\n */\n private evaluateObjectExpression(\n node: ObjectExpression,\n context: FormContext,\n ): object {\n const result: Record<string, unknown> = {};\n\n for (const property of node.properties) {\n if (property.type !== 'Property') {\n continue;\n }\n\n const prop = property;\n\n let key: string;\n if (prop.key.type === 'Identifier' && !prop.computed) {\n key = prop.key.name;\n } else {\n const evaluatedKey = this.evaluateAstNode(prop.key, context);\n key = String(evaluatedKey);\n }\n\n result[key] = this.evaluateAstNode(prop.value, context);\n }\n\n return result;\n }\n\n /**\n * Evaluates a sequence expression (comma-separated expressions)\n * @param node - The sequence expression node\n * @param context - The context containing variables and objects\n * @returns The result of the last expression in the sequence\n */\n private evaluateSequenceExpression(\n node: SequenceExpression,\n context: FormContext,\n ): unknown {\n let result: unknown;\n\n for (const expression of node.expressions) {\n result = this.evaluateAstNode(expression, context);\n }\n\n return result;\n }\n\n /**\n * Evaluates a template literal\n * @param node - The template literal node\n * @param context - The context containing variables and objects\n * @returns The evaluated template string\n */\n private evaluateTemplateLiteral(\n node: TemplateLiteral,\n context: FormContext,\n ): string {\n let result = '';\n\n for (let i = 0; i < node.quasis.length; i++) {\n const cookedValue = node.quasis[i].value.cooked;\n result = result.concat(cookedValue ?? '');\n if (i < node.expressions.length) {\n const exprValue = this.evaluateAstNode(node.expressions[i], context);\n result = result.concat(String(exprValue));\n }\n }\n\n return result;\n }\n\n /**\n * Evaluates a function call expression with strict type checking\n * @param node - The function call expression node\n * @param context - The context containing variables and objects\n * @returns The result of the function call\n */\n private evaluateCallExpression(\n node: CallExpression,\n context: FormContext,\n ): unknown {\n if (node.callee.type !== 'MemberExpression') {\n throw new TypeError('Only method calls are supported');\n }\n\n const memberExpr = node.callee;\n const object = this.evaluateAstNode(memberExpr.object, context);\n\n const isOptionalCall = node.optional || memberExpr.optional;\n if (object === null || object === undefined) {\n if (isOptionalCall) {\n return undefined;\n }\n throw new Error('Cannot call methods on null || undefined');\n }\n\n let methodName: string;\n if (!memberExpr.computed && memberExpr.property.type === 'Identifier') {\n methodName = memberExpr.property.name;\n } else if (memberExpr.computed) {\n const propertyValue = this.evaluateAstNode(memberExpr.property, context);\n if (\n typeof propertyValue !== 'string' &&\n typeof propertyValue !== 'number'\n ) {\n throw new TypeError('Method name must be a string || number');\n }\n methodName = String(propertyValue);\n } else {\n throw new TypeError('Unexpected property type in method call');\n }\n\n const args: unknown[] = [];\n for (const arg of node.arguments) {\n args.push(this.evaluateAstNode(arg, context));\n }\n\n return this.callSafeMethod(object, methodName, args);\n }\n\n /**\n * Calls a method on an object after verifying it's safe to do so\n * @param object - The object to call the method on\n * @param methodName - The name of the method to call\n * @param args - The arguments to pass to the method\n * @returns The result of the method call\n */\n private callSafeMethod(\n object: unknown,\n methodName: string,\n args: unknown[],\n ): unknown {\n const objType: string = typeof object;\n const isAllowed = this.isAllowedMethod(objType, methodName, object);\n\n if (!isAllowed) {\n throw new TypeError(\n `Method ${methodName} is not supported on type ${objType}`,\n );\n }\n\n const objectWithMethod = object as ObjectWithMethod;\n const method = objectWithMethod[methodName];\n\n if (typeof method !== 'function') {\n throw new TypeError(`${methodName} is not a function`);\n }\n\n return method.apply(object, args);\n }\n\n private isAllowedMethod(\n objectType: string,\n methodName: string,\n object: unknown,\n ) {\n if (objectType === 'object' && object !== null) {\n const objectWithMethods = object as ObjectWithMethod;\n return (\n methodName in objectWithMethods &&\n typeof objectWithMethods[methodName] === 'function'\n );\n }\n\n if (!(objectType in SAFE_METHODS)) {\n return false;\n }\n return SAFE_METHODS[objectType as keyof SafeMethods].includes(methodName);\n }\n\n /**\n * Evaluates an arrow function expression\n * @param node - The arrow function expression node\n * @param context - The context containing variables and objects\n * @returns A function that can be called from other expressions\n */\n private evaluateArrowFunctionExpression(\n node: ArrowFunctionExpression,\n context: FormContext,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n ): Function {\n // We only support simple arrow functions with expression bodies\n if (\n node.body.type !== 'BlockStatement' &&\n node.body.type !== 'Identifier' &&\n node.body.type !== 'MemberExpression' &&\n node.body.type !== 'CallExpression' &&\n node.body.type !== 'BinaryExpression' &&\n node.body.type !== 'LogicalExpression' &&\n node.body.type !== 'TemplateLiteral'\n ) {\n throw new TypeError(\n `Unsupported arrow function body type: ${node.body.type}`,\n );\n }\n\n return (...args: unknown[]): unknown => {\n const arrowContext = { ...context };\n\n for (let i = 0; i < node.params.length && i < args.length; i++) {\n const param = node.params[i];\n if (param.type !== 'Identifier') {\n throw new TypeError(\n 'Only simple identifier parameters are supported in arrow functions',\n );\n }\n\n const paramName = param.name;\n arrowContext[paramName] = args[i];\n }\n\n if (node.body.type !== 'BlockStatement') {\n return this.evaluateAstNode(node.body, arrowContext);\n }\n\n throw new TypeError('Block-bodied arrow functions are not supported');\n };\n }\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { NGX_FW_COMPONENT_REGISTRATIONS } from '../tokens/component-registrations';\nimport { ComponentResolver } from '../types/component-resolver.type';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ComponentRegistrationService implements ComponentResolver {\n private readonly _registrations = signal(\n inject(NGX_FW_COMPONENT_REGISTRATIONS),\n );\n\n readonly registrations = this._registrations.asReadonly();\n}\n","import { inject, Injectable } from '@angular/core';\nimport { TestIdBuilderFn } from '../types/functions.type';\nimport { NGX_FW_CONFIG_RESOLVED } from '../tokens/global-config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgxFbConfigurationService {\n private readonly _config = inject(NGX_FW_CONFIG_RESOLVED);\n\n get testIdBuilder(): TestIdBuilderFn | undefined {\n return this._config.testIdBuilderFn;\n }\n}\n","import { Type } from '@angular/core';\nimport {\n LazyRegistration,\n LoadComponentFn,\n StaticRegistration,\n} from '../types/registration.type';\n\n/**\n * Creates a static component registration entry.\n * Use for eagerly imported components that don't need lazy loading.\n *\n * @example\n * ```ts\n * import { staticComponent } from '@ngx-formbar/core';\n * import { TextComponent } from './text.component';\n *\n * const registrations = {\n * text: staticComponent(TextComponent),\n * };\n * ```\n */\nexport function staticComponent(type: Type<unknown>): StaticRegistration {\n return { component: type };\n}\n\n/**\n * Creates a lazy component registration entry.\n * Use for components that should be loaded on demand.\n *\n * @example\n * ```ts\n * import { loadComponent } from '@ngx-formbar/core';\n *\n * const registrations = {\n * text: loadComponent(() => import('./text.component').then(m => m.TextComponent)),\n * };\n * ```\n */\nexport function loadComponent(load: LoadComponentFn): LazyRegistration {\n return { loadComponent: load };\n}\n","export function toSafeString(value: unknown): string {\n if (value === null) {\n return 'null';\n }\n\n switch (typeof value) {\n case 'undefined':\n return 'undefined';\n case 'string':\n return value;\n case 'boolean':\n return value ? 'true' : 'false';\n case 'number':\n case 'symbol':\n case 'bigint':\n case 'function':\n return value.toString();\n default:\n return JSON.stringify(value);\n }\n}\n","import { computed, Signal } from '@angular/core';\nimport { Program } from 'acorn';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\n\nfunction isExpressionFn<T>(\n value: Expression<T> | T,\n): value is (formValue: FormContext) => T {\n return typeof value === 'function';\n}\n\n/**\n * Resolves an expression option into a computed signal value\n *\n * Handles three expression types:\n * - **string**: Parsed to AST and evaluated against the form context\n * - **function**: Called with the form context as argument\n * - **static value / undefined**: Returned as-is\n *\n * Internally caches the parsed AST in a separate computed signal\n * so it is only recalculated when the option itself changes.\n *\n * @param option Signal containing the expression option (string, function, static value, or undefined)\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @returns Computed signal that resolves to the evaluated value or undefined\n */\nexport function resolveExpression<T>(\n option: Signal<Expression<T> | T | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n) {\n const ast = computed<Program | null>(() => {\n const value = option();\n if (typeof value !== 'string') {\n return null;\n }\n return expressionService.parseExpressionToAst(value);\n });\n\n return computed<T | undefined>(() => {\n const value = option();\n\n if (value === undefined) {\n return undefined;\n }\n\n if (isExpressionFn<T>(value)) {\n return value(formContext());\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n const parsedAst = ast();\n if (!parsedAst) {\n return undefined;\n }\n return expressionService.evaluateExpression(parsedAst, formContext()) as T;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\nimport { resolveExpression } from './resolve-expression';\n\n/**\n * Resolves an inheritable boolean expression with parent state fallback\n *\n * Used for states like disabled and readonly that follow a common pattern:\n * 1. If the option is undefined, inherit the parent state\n * 2. Otherwise, resolve the expression and default to false\n *\n * @param option Signal containing the expression option (boolean, string expression, function, or undefined)\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @param parentState Signal providing the parent group's state to inherit from\n * @returns Computed signal that resolves to a boolean state\n */\nexport function resolveInheritableExpression(\n option: Signal<Expression<boolean> | boolean | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n parentState: Signal<boolean>,\n) {\n const resolved = resolveExpression<boolean>(\n option,\n formContext,\n expressionService,\n );\n\n return computed(() => {\n if (option() === undefined) {\n return parentState();\n }\n return resolved() ?? false;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { Expression, FormContext } from '../types/expression.type';\nimport { ExpressionService } from '../services/expression.service';\nimport { resolveExpression } from './resolve-expression';\n\n/**\n * Resolves the hidden state with parent combination logic\n *\n * The hidden state differs from disabled/readonly inheritance:\n * 1. If the option is undefined, inherit the parent hidden state\n * 2. If the option is a function expression, use only the resolved value\n * 3. If the option is a string expression, OR with the parent hidden state\n * (a child is hidden if either its own condition or its parent is hidden)\n *\n * @param option Signal containing the hidden expression option\n * @param formContext Signal providing the current form context for expression evaluation\n * @param expressionService Service used to parse and evaluate string expressions\n * @param parentHiddenState Signal providing the parent group's hidden state\n * @returns Computed signal that resolves to a boolean hidden state\n */\nexport function resolveHiddenState(\n option: Signal<Expression<boolean> | boolean | undefined>,\n formContext: Signal<FormContext>,\n expressionService: ExpressionService,\n parentHiddenState: Signal<boolean>,\n) {\n const resolved = resolveExpression<boolean>(\n option,\n formContext,\n expressionService,\n );\n\n return computed<boolean>(() => {\n const hiddenOption = option();\n\n if (hiddenOption === undefined) {\n return parentHiddenState();\n }\n\n const isHidden = resolved() ?? false;\n\n if (typeof hiddenOption === 'function') {\n return isHidden;\n }\n\n return isHidden || parentHiddenState();\n });\n}\n","import { effect, Signal, untracked } from '@angular/core';\nimport { StateHandling } from '../types/registration.type';\nimport { SimpleFunction } from '../types/functions.type';\n\n/**\n * Creates an effect that manages disabled state transitions\n *\n * When disabledHandling is 'auto', calls the appropriate enable/disable\n * function based on the disabled signal. When 'manual', does nothing.\n *\n * @param options Configuration object for disabled effect\n * @param options.disabledSignal Signal that indicates if the component should be disabled\n * @param options.disabledHandlingSignal Signal that determines how disabled state changes should be handled\n * @param options.enableFunction Function to call when component should be enabled\n * @param options.disableFunction Function to call when component should be disabled\n */\nexport function resolveDisabledEffect(options: {\n disabledSignal: Signal<boolean>;\n disabledHandlingSignal: Signal<StateHandling>;\n enableFunction: SimpleFunction;\n disableFunction: SimpleFunction;\n}) {\n effect(() => {\n const disabled = options.disabledSignal();\n const disabledHandling = options.disabledHandlingSignal();\n\n if (disabledHandling === 'manual') {\n return;\n }\n\n if (!disabled) {\n untracked(() => {\n options.enableFunction();\n });\n return;\n }\n untracked(() => {\n options.disableFunction();\n });\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { NgxFbBaseContent } from '../types/content.type';\nimport { TestIdBuilderFn } from '../types/functions.type';\n\n/**\n * Resolves a test ID for a form element\n *\n * The test ID is determined using the following priority:\n * 1. A local testIdBuilder function if provided\n * 2. A global testIdBuilder function if provided\n * 3. Default: joins parentTestId and name with '-', or just name if no parent\n *\n * @param content Signal containing the base content configuration\n * @param name Signal containing the control/group name\n * @param testIdBuilder Signal holding an optional local testIdBuilder function\n * @param globalTestIdBuilder Optional global testIdBuilder function from configuration\n * @param parentTestId Signal providing the parent group's test ID\n * @returns Computed signal that resolves to the test ID string\n */\nexport function resolveTestId(\n content: Signal<NgxFbBaseContent>,\n name: Signal<string>,\n testIdBuilder: Signal<TestIdBuilderFn | undefined>,\n globalTestIdBuilder: TestIdBuilderFn | undefined,\n parentTestId: Signal<string | undefined>,\n) {\n return computed(() => {\n const contentValue = content();\n const id = name();\n const parentGroupTestId = parentTestId();\n const builderFn = testIdBuilder();\n\n if (builderFn) {\n return builderFn(contentValue, id, parentGroupTestId);\n }\n\n if (globalTestIdBuilder) {\n return globalTestIdBuilder(contentValue, id, parentGroupTestId);\n }\n\n if (!parentGroupTestId) {\n return id;\n }\n return [parentGroupTestId, id].join('-');\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { StateHandling } from '../types/registration.type';\n\n/**\n * Resolves the hidden attribute value for DOM binding\n *\n * When visibilityHandling is 'auto', returns `true` (attribute present)\n * or `null` (attribute absent) based on the hidden state.\n * When visibilityHandling is 'manual', always returns `null` so the\n * component can handle visibility itself.\n *\n * @param options Configuration object\n * @param options.hiddenSignal Signal indicating whether the element should be hidden\n * @param options.hiddenHandlingSignal Signal for the visibility handling strategy\n * @returns Computed signal resolving to `true` (hidden) or `null` (visible)\n */\nexport function resolveHiddenAttribute(options: {\n hiddenSignal: Signal<boolean>;\n hiddenHandlingSignal: Signal<StateHandling>;\n}) {\n return computed(() => {\n const isHidden = options.hiddenSignal();\n const visibilityHandling = options.hiddenHandlingSignal();\n if (visibilityHandling !== 'auto') {\n return null;\n }\n return isHidden ? true : null;\n });\n}\n","import { computed, Signal } from '@angular/core';\nimport { UpdateStrategy } from '../types/content.type';\n\n/**\n * Resolves the update strategy for a form control or group\n *\n * The strategy is determined using the following priority:\n * 1. The control's own updateOn value if defined\n * 2. The parent group's strategy if defined\n * 3. The application-wide default strategy\n *\n * @param controlUpdateOn Signal containing the control's updateOn configuration\n * @param parentStrategy Signal providing the parent group's update strategy\n * @param defaultStrategy The application-wide default update strategy\n * @returns Computed signal providing the resolved update strategy\n */\nexport function resolveUpdateStrategy(\n controlUpdateOn: Signal<UpdateStrategy | undefined>,\n parentStrategy: Signal<UpdateStrategy | undefined>,\n defaultStrategy: UpdateStrategy,\n) {\n return computed<UpdateStrategy>(() => {\n return controlUpdateOn() ?? parentStrategy() ?? defaultStrategy;\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,8BAA8B,GAAG,IAAI,cAAc,CAE9D,gCAAgC,EAAE;AAClC,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,GAAG,EAAE;AACzB,CAAA;;MCLY,yBAAyB,GAAG,I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,MAAM,EAAE,GAAG,IAAI,EAAE;AACjB,QAAA,MAAM,iBAAiB,GAAG,YAAY,EAAE;AACxC,QAAA,MAAM,SAAS,GAAG,aAAa,EAAE;QAEjC,IAAI,SAAS,EAAE;YACb,OAAO,SAAS,CAAC,YAAY,EAAE,EAAE,EAAE,iBAAiB,CAAC;QACvD;QAEA,IAAI,mBAAmB,EAAE;YACvB,OAAO,mBAAmB,CAAC,YAAY,EAAE,EAAE,EAAE,iBAAiB,CAAC;QACjE;QAEA,IAAI,CAAC,iBAAiB,EAAE;AACtB,YAAA,OAAO,EAAE;QACX;QACA,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1C,IAAA,CAAC,CAAC;AACJ;;AC1CA;;;;;;;;;;;;AAYG;AACG,SAAU,sBAAsB,CAAC,OAGtC,EAAA;IACC,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,EAAE;AACvC,QAAA,MAAM,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,EAAE;AACzD,QAAA,IAAI,kBAAkB,KAAK,MAAM,EAAE;AACjC,YAAA,OAAO,IAAI;QACb;QACA,OAAO,QAAQ,GAAG,IAAI,GAAG,IAAI;AAC/B,IAAA,CAAC,CAAC;AACJ;;ACzBA;;;;;;;;;;;;AAYG;SACa,qBAAqB,CACnC,eAAmD,EACnD,cAAkD,EAClD,eAA+B,EAAA;IAE/B,OAAO,QAAQ,CAAiB,MAAK;AACnC,QAAA,OAAO,eAAe,EAAE,IAAI,cAAc,EAAE,IAAI,eAAe;AACjE,IAAA,CAAC,CAAC;AACJ;;ACxBA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngx-formbar/core",
3
- "version": "2.0.0-next.0",
3
+ "version": "2.0.0-next.1",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=19.2.0 <22.0.0"
6
6
  },
@@ -1,9 +1,52 @@
1
- import * as _angular_core from '@angular/core';
2
- import { Signal, Type, InjectionToken } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Type, Signal, InjectionToken } from '@angular/core';
3
3
  import { Program } from 'acorn';
4
+ import * as _ngx_formbar_core from '@ngx-formbar/core';
5
+
6
+ /**
7
+ * Function that lazily loads a component.
8
+ * Works analog to lazily loading a component for a route.
9
+ */
10
+ type LoadComponentFn = () => Promise<Type<unknown>>;
11
+ /**
12
+ * Registration entry for a statically imported component.
13
+ */
14
+ interface StaticRegistration {
15
+ component: Type<unknown>;
16
+ }
17
+ /**
18
+ * Registration entry for a lazily loaded component.
19
+ */
20
+ interface LazyRegistration {
21
+ loadComponent: LoadComponentFn;
22
+ }
23
+ /**
24
+ * A component registration entry — either static or lazy.
25
+ *
26
+ * - Static: `{ component: MyComponent }` — component is eagerly imported
27
+ * - Lazy: `{ loadComponent: () => import(...).then(m => m.MyComponent) }` — loaded on demand
28
+ */
29
+ type ComponentRegistrationEntry = StaticRegistration | LazyRegistration;
30
+ /**
31
+ * Configuration for registering component types.
32
+ *
33
+ * Maps string type identifiers to component implementations for dynamic rendering.
34
+ * Supports both static and lazy component registrations.
35
+ */
36
+ type ComponentRegistrationConfig = Record<string, ComponentRegistrationEntry>;
37
+ /**
38
+ * Strategy for handling component states
39
+ *
40
+ * Determines how visibility, disabled, and other component states
41
+ * are managed.
42
+ *
43
+ * - 'auto': Formbar automatically manages the state
44
+ * - 'manual': The component/host manages the state itself
45
+ */
46
+ type StateHandling = 'auto' | 'manual';
4
47
 
5
48
  interface ComponentResolver {
6
- registrations: Signal<ReadonlyMap<string, Type<unknown>>>;
49
+ registrations: Signal<ReadonlyMap<string, ComponentRegistrationEntry>>;
7
50
  }
8
51
 
9
52
  type FormContext = Record<string, unknown>;
@@ -157,77 +200,7 @@ interface NgxFbGlobalConfiguration {
157
200
  testIdBuilderFn: TestIdBuilderFn | undefined;
158
201
  }
159
202
 
160
- /**
161
- * Configuration for registering component types
162
- *
163
- * Used to map string type identifiers to component implementations
164
- * for dynamic rendering.
165
- */
166
- type ComponentRegistrationConfig = Record<string, Type<unknown>>;
167
- /**
168
- * Strategy for handling component states
169
- *
170
- * Determines how visibility, disabled, and other component states
171
- * are managed.
172
- *
173
- * - 'auto': Formbar automatically manages the state
174
- * - 'manual': The component/host manages the state itself
175
- */
176
- type StateHandling = 'auto' | 'manual';
177
-
178
- /**
179
- * Structural directive that renders the appropriate component based on the control's type.
180
- *
181
- * This directive acts as a dynamic renderer for form controls, blocks, and groups.
182
- * It works by:
183
- * 1. Receiving a content configuration and name
184
- * 2. Looking up the registered component for the content's type
185
- * 3. Creating an instance of that component and binding the content and name to it
186
- *
187
- * This allows forms to be composed declaratively through configuration objects
188
- * rather than explicit templates.
189
- *
190
- * @example
191
- * ```html
192
- * <!-- Used with ngFor to render a list of controls -->
193
- * @for (control of controls(); track control[0]) {
194
- * <ng-template *ngxfbAbstractControl="control" />
195
- * }
196
- *
197
- * <!-- Used directly with a specific control -->
198
- * <ng-template *ngxfbAbstractControl="['name', nameControlConfig]" />
199
- * ```
200
- */
201
- declare class NgxfbAbstractControlDirective<T extends NgxFbBaseContent> {
202
- private viewContainerRef;
203
- /**
204
- * Service for component registration
205
- * Provides access to component type mappings
206
- */
207
- private readonly contentRegistrationService;
208
- /**
209
- * Required input for control configuration
210
- * Defines properties like type, validation, and other control-specific settings
211
- */
212
- readonly content: _angular_core.InputSignal<[string, T]>;
213
- readonly controlName: _angular_core.Signal<string>;
214
- readonly controlConfig: _angular_core.Signal<T>;
215
- /**
216
- * Registration map of component types
217
- * Maps control types to component implementations
218
- */
219
- readonly registrations: _angular_core.Signal<ReadonlyMap<string, _angular_core.Type<unknown>>>;
220
- /**
221
- * Computed component type based on content.type
222
- * Looks up the component implementation from registrations map
223
- */
224
- readonly component: _angular_core.Signal<_angular_core.Type<unknown> | null>;
225
- constructor();
226
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxfbAbstractControlDirective<any>, never>;
227
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxfbAbstractControlDirective<any>, "[ngxfbAbstractControl]", never, { "content": { "alias": "ngxfbAbstractControl"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
228
- }
229
-
230
- declare const NGX_FW_COMPONENT_REGISTRATIONS: InjectionToken<ReadonlyMap<string, Type<unknown>>>;
203
+ declare const NGX_FW_COMPONENT_REGISTRATIONS: InjectionToken<ReadonlyMap<string, ComponentRegistrationEntry>>;
231
204
 
232
205
  declare const NGX_FW_COMPONENT_RESOLVER: InjectionToken<ComponentResolver>;
233
206
 
@@ -379,24 +352,54 @@ declare class ExpressionService {
379
352
  * @returns A function that can be called from other expressions
380
353
  */
381
354
  private evaluateArrowFunctionExpression;
382
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpressionService, never>;
383
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ExpressionService>;
355
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExpressionService, never>;
356
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExpressionService>;
384
357
  }
385
358
 
386
359
  declare class ComponentRegistrationService implements ComponentResolver {
387
360
  private readonly _registrations;
388
- readonly registrations: _angular_core.Signal<ReadonlyMap<string, _angular_core.Type<unknown>>>;
389
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentRegistrationService, never>;
390
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ComponentRegistrationService>;
361
+ readonly registrations: i0.Signal<ReadonlyMap<string, _ngx_formbar_core.ComponentRegistrationEntry>>;
362
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRegistrationService, never>;
363
+ static ɵprov: i0.ɵɵInjectableDeclaration<ComponentRegistrationService>;
391
364
  }
392
365
 
393
366
  declare class NgxFbConfigurationService {
394
367
  private readonly _config;
395
368
  get testIdBuilder(): TestIdBuilderFn | undefined;
396
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxFbConfigurationService, never>;
397
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxFbConfigurationService>;
369
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxFbConfigurationService, never>;
370
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxFbConfigurationService>;
398
371
  }
399
372
 
373
+ /**
374
+ * Creates a static component registration entry.
375
+ * Use for eagerly imported components that don't need lazy loading.
376
+ *
377
+ * @example
378
+ * ```ts
379
+ * import { staticComponent } from '@ngx-formbar/core';
380
+ * import { TextComponent } from './text.component';
381
+ *
382
+ * const registrations = {
383
+ * text: staticComponent(TextComponent),
384
+ * };
385
+ * ```
386
+ */
387
+ declare function staticComponent(type: Type<unknown>): StaticRegistration;
388
+ /**
389
+ * Creates a lazy component registration entry.
390
+ * Use for components that should be loaded on demand.
391
+ *
392
+ * @example
393
+ * ```ts
394
+ * import { loadComponent } from '@ngx-formbar/core';
395
+ *
396
+ * const registrations = {
397
+ * text: loadComponent(() => import('./text.component').then(m => m.TextComponent)),
398
+ * };
399
+ * ```
400
+ */
401
+ declare function loadComponent(load: LoadComponentFn): LazyRegistration;
402
+
400
403
  declare function toSafeString(value: unknown): string;
401
404
 
402
405
  /**
@@ -518,5 +521,5 @@ declare function resolveHiddenAttribute(options: {
518
521
  */
519
522
  declare function resolveUpdateStrategy(controlUpdateOn: Signal<UpdateStrategy | undefined>, parentStrategy: Signal<UpdateStrategy | undefined>, defaultStrategy: UpdateStrategy): Signal<UpdateStrategy>;
520
523
 
521
- export { ComponentRegistrationService, ExpressionService, NGX_FW_COMPONENT_REGISTRATIONS, NGX_FW_COMPONENT_RESOLVER, NGX_FW_CONFIG, NGX_FW_CONFIG_RESOLVED, NGX_FW_DEFAULT_CONFIG, NGX_FW_DEFAULT_UPDATE_STRATEGY, NgxFbConfigurationService, NgxfbAbstractControlDirective, resolveDisabledEffect, resolveExpression, resolveHiddenAttribute, resolveHiddenState, resolveInheritableExpression, resolveTestId, resolveUpdateStrategy, toSafeString };
522
- export type { ComponentRegistrationConfig, ComponentResolver, Expression, FormContext, HideStrategy, NgxFbAbstractControl, NgxFbBaseContent, NgxFbBlock, NgxFbContent, NgxFbControl, NgxFbForm, NgxFbFormGroup, NgxFbGlobalConfiguration, SimpleFunction, StateHandling, TestIdBuilderFn, UpdateStrategy, ValueHandleFunction, ValueStrategy };
524
+ export { ComponentRegistrationService, ExpressionService, NGX_FW_COMPONENT_REGISTRATIONS, NGX_FW_COMPONENT_RESOLVER, NGX_FW_CONFIG, NGX_FW_CONFIG_RESOLVED, NGX_FW_DEFAULT_CONFIG, NGX_FW_DEFAULT_UPDATE_STRATEGY, NgxFbConfigurationService, loadComponent, resolveDisabledEffect, resolveExpression, resolveHiddenAttribute, resolveHiddenState, resolveInheritableExpression, resolveTestId, resolveUpdateStrategy, staticComponent, toSafeString };
525
+ export type { ComponentRegistrationConfig, ComponentRegistrationEntry, ComponentResolver, Expression, FormContext, HideStrategy, LazyRegistration, LoadComponentFn, NgxFbAbstractControl, NgxFbBaseContent, NgxFbBlock, NgxFbContent, NgxFbControl, NgxFbForm, NgxFbFormGroup, NgxFbGlobalConfiguration, SimpleFunction, StateHandling, StaticRegistration, TestIdBuilderFn, UpdateStrategy, ValueHandleFunction, ValueStrategy };