@decaf-ts/for-angular 0.0.8 → 0.0.10

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.
Files changed (105) hide show
  1. package/dist/{lib/assets → assets}/i18n/en.json +10 -1
  2. package/dist/components/empty-state/empty-state.component.d.ts +301 -0
  3. package/dist/components/fieldset/fieldset.component.d.ts +199 -0
  4. package/dist/components/filter/filter.component.d.ts +505 -0
  5. package/dist/components/for-angular-components.module.d.ts +20 -0
  6. package/dist/components/index.d.ts +16 -0
  7. package/dist/components/layout/layout.component.d.ts +133 -0
  8. package/dist/components/list/constants.d.ts +29 -0
  9. package/dist/components/list/list.component.d.ts +849 -0
  10. package/dist/components/list-item/list-item.component.d.ts +390 -0
  11. package/dist/{lib/components → components}/model-renderer/model-renderer.component.d.ts +1 -1
  12. package/dist/components/pagination/constants.d.ts +7 -0
  13. package/dist/components/pagination/pagination.component.d.ts +264 -0
  14. package/dist/components/searchbar/searchbar.component.d.ts +407 -0
  15. package/dist/directives/collapsable.directive.d.ts +8 -0
  16. package/dist/directives/index.d.ts +1 -0
  17. package/dist/engine/NgxBaseComponent.d.ts +541 -0
  18. package/dist/{lib/engine → engine}/index.d.ts +1 -0
  19. package/dist/{lib/engine → engine}/types.d.ts +44 -0
  20. package/dist/{lib/esm2022 → esm2022}/components/component-renderer/component-renderer.component.mjs +3 -3
  21. package/dist/esm2022/components/crud-field/crud-field.component.mjs +301 -0
  22. package/dist/esm2022/components/crud-form/constants.mjs +14 -0
  23. package/dist/esm2022/components/crud-form/crud-form.component.mjs +139 -0
  24. package/dist/esm2022/components/crud-form/types.mjs +2 -0
  25. package/dist/esm2022/components/empty-state/empty-state.component.mjs +348 -0
  26. package/dist/esm2022/components/fieldset/fieldset.component.mjs +225 -0
  27. package/dist/esm2022/components/filter/filter.component.mjs +689 -0
  28. package/dist/esm2022/components/for-angular-components.module.mjs +71 -0
  29. package/dist/esm2022/components/index.mjs +20 -0
  30. package/dist/esm2022/components/layout/layout.component.mjs +176 -0
  31. package/dist/esm2022/components/list/constants.mjs +6 -0
  32. package/dist/esm2022/components/list/list.component.mjs +1236 -0
  33. package/dist/esm2022/components/list-item/list-item.component.mjs +408 -0
  34. package/dist/esm2022/components/model-renderer/model-renderer.component.mjs +138 -0
  35. package/dist/esm2022/components/pagination/constants.mjs +2 -0
  36. package/dist/esm2022/components/pagination/pagination.component.mjs +323 -0
  37. package/dist/esm2022/components/searchbar/searchbar.component.mjs +493 -0
  38. package/dist/esm2022/decaf-ts-for-angular.mjs +5 -0
  39. package/dist/esm2022/directives/collapsable.directive.mjs +28 -0
  40. package/dist/esm2022/directives/index.mjs +2 -0
  41. package/dist/esm2022/engine/DynamicModule.mjs +18 -0
  42. package/dist/esm2022/engine/NgxBaseComponent.mjs +539 -0
  43. package/dist/esm2022/engine/NgxCrudFormField.mjs +125 -0
  44. package/dist/esm2022/engine/NgxFormService.mjs +315 -0
  45. package/dist/esm2022/engine/NgxRenderingEngine.mjs +192 -0
  46. package/dist/esm2022/engine/NgxRenderingEngine2.mjs +332 -0
  47. package/dist/esm2022/engine/ValidatorFactory.mjs +102 -0
  48. package/dist/esm2022/engine/constants.mjs +160 -0
  49. package/dist/esm2022/engine/decorators.mjs +38 -0
  50. package/dist/esm2022/engine/index.mjs +17 -0
  51. package/dist/esm2022/engine/types.mjs +4 -0
  52. package/dist/esm2022/for-angular.module.mjs +118 -0
  53. package/dist/esm2022/helpers/index.mjs +13 -0
  54. package/dist/esm2022/helpers/utils.mjs +415 -0
  55. package/dist/esm2022/interfaces.mjs +2 -0
  56. package/dist/esm2022/public-apis.mjs +14 -0
  57. package/dist/fesm2022/decaf-ts-for-angular.mjs +7109 -0
  58. package/dist/fesm2022/decaf-ts-for-angular.mjs.map +1 -0
  59. package/dist/helpers/index.d.ts +12 -0
  60. package/dist/helpers/utils.d.ts +253 -0
  61. package/dist/{lib/public-apis.d.ts → public-apis.d.ts} +4 -3
  62. package/package.json +5 -3
  63. package/dist/lib/esm2022/components/crud-field/crud-field.component.mjs +0 -297
  64. package/dist/lib/esm2022/components/crud-form/constants.mjs +0 -14
  65. package/dist/lib/esm2022/components/crud-form/crud-form.component.mjs +0 -139
  66. package/dist/lib/esm2022/components/crud-form/types.mjs +0 -2
  67. package/dist/lib/esm2022/components/model-renderer/model-renderer.component.mjs +0 -138
  68. package/dist/lib/esm2022/decaf-ts-for-angular.mjs +0 -5
  69. package/dist/lib/esm2022/engine/DynamicModule.mjs +0 -18
  70. package/dist/lib/esm2022/engine/NgxCrudFormField.mjs +0 -123
  71. package/dist/lib/esm2022/engine/NgxFormService.mjs +0 -315
  72. package/dist/lib/esm2022/engine/NgxRenderingEngine.mjs +0 -192
  73. package/dist/lib/esm2022/engine/NgxRenderingEngine2.mjs +0 -332
  74. package/dist/lib/esm2022/engine/ValidatorFactory.mjs +0 -102
  75. package/dist/lib/esm2022/engine/constants.mjs +0 -160
  76. package/dist/lib/esm2022/engine/decorators.mjs +0 -38
  77. package/dist/lib/esm2022/engine/index.mjs +0 -16
  78. package/dist/lib/esm2022/engine/types.mjs +0 -2
  79. package/dist/lib/esm2022/for-angular.module.mjs +0 -118
  80. package/dist/lib/esm2022/interfaces.mjs +0 -2
  81. package/dist/lib/esm2022/public-apis.mjs +0 -13
  82. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs +0 -2153
  83. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs.map +0 -1
  84. /package/dist/{lib/README.md → README.md} +0 -0
  85. /package/dist/{lib/assets → assets}/images/angular-logo.svg +0 -0
  86. /package/dist/{lib/assets → assets}/images/decaf-logo-black.svg +0 -0
  87. /package/dist/{lib/assets → assets}/images/decaf-logo-lw.svg +0 -0
  88. /package/dist/{lib/assets → assets}/images/decaf-logo-white.svg +0 -0
  89. /package/dist/{lib/assets → assets}/images/decaf-logo.svg +0 -0
  90. /package/dist/{lib/components → components}/component-renderer/component-renderer.component.d.ts +0 -0
  91. /package/dist/{lib/components → components}/crud-field/crud-field.component.d.ts +0 -0
  92. /package/dist/{lib/components → components}/crud-form/constants.d.ts +0 -0
  93. /package/dist/{lib/components → components}/crud-form/crud-form.component.d.ts +0 -0
  94. /package/dist/{lib/components → components}/crud-form/types.d.ts +0 -0
  95. /package/dist/{lib/engine → engine}/DynamicModule.d.ts +0 -0
  96. /package/dist/{lib/engine → engine}/NgxCrudFormField.d.ts +0 -0
  97. /package/dist/{lib/engine → engine}/NgxFormService.d.ts +0 -0
  98. /package/dist/{lib/engine → engine}/NgxRenderingEngine.d.ts +0 -0
  99. /package/dist/{lib/engine → engine}/NgxRenderingEngine2.d.ts +0 -0
  100. /package/dist/{lib/engine → engine}/ValidatorFactory.d.ts +0 -0
  101. /package/dist/{lib/engine → engine}/constants.d.ts +0 -0
  102. /package/dist/{lib/engine → engine}/decorators.d.ts +0 -0
  103. /package/dist/{lib/for-angular.module.d.ts → for-angular.module.d.ts} +0 -0
  104. /package/dist/{lib/index.d.ts → index.d.ts} +0 -0
  105. /package/dist/{lib/interfaces.d.ts → interfaces.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"decaf-ts-for-angular.mjs","sources":["../../../src/lib/engine/constants.ts","../../../src/lib/engine/ValidatorFactory.ts","../../../src/lib/engine/NgxFormService.ts","../../../src/lib/engine/NgxRenderingEngine2.ts","../../../src/lib/engine/decorators.ts","../../../src/lib/engine/DynamicModule.ts","../../../src/lib/engine/NgxRenderingEngine.ts","../../../src/lib/engine/index.ts","../../../src/lib/components/component-renderer/component-renderer.component.ts","../../../src/lib/components/component-renderer/component-renderer.component.html","../../../src/lib/components/model-renderer/model-renderer.component.ts","../../../src/lib/components/model-renderer/model-renderer.component.html","../../../src/lib/engine/NgxCrudFormField.ts","../../../src/lib/components/crud-field/crud-field.component.ts","../../../src/lib/components/crud-field/crud-field.component.html","../../../src/lib/components/crud-form/constants.ts","../../../src/lib/components/crud-form/crud-form.component.ts","../../../src/lib/components/crud-form/crud-form.component.html","../../../src/lib/public-apis.ts","../../../src/lib/decaf-ts-for-angular.ts"],"sourcesContent":["import { UIKeys } from '@decaf-ts/ui-decorators';\nimport { VALIDATION_PARENT_KEY } from '@decaf-ts/decorator-validation';\n\n/**\n * @description Angular engine key constants\n * @summary Contains key strings used by the Angular rendering engine for reflection,\n * dynamic component creation, and other engine operations.\n * @typedef {Object} AngularEngineKeys\n * @property {string} REFLECT - Prefix for reflection metadata keys\n * @property {string} DYNAMIC - Key for dynamic component identification\n * @property {string} ANNOTATIONS - Key for component annotations\n * @property {string} ECMP - Key for embedded components\n * @property {string} NG_REFLECT - Prefix for Angular reflection attributes\n * @property {string} RENDERED - Prefix for rendered component markers\n * @property {string} MAPPER - Key for property mappers\n * @property {string} CHILDREN - Key for child components\n * @property {string} LISTABLE - Key for listable components\n * @property {string} RENDER - Key for renderable components\n * @property {string} RENDERED_ID - Template for rendered component IDs\n * @property {string} PARENT - Key for comparison decorators and validators\n * @const AngularEngineKeys\n * @memberOf module:engine\n */\nexport const AngularEngineKeys = {\n REFLECT: `${UIKeys.REFLECT}.angular.`,\n DYNAMIC: 'dynamic-component',\n ANNOTATIONS: '__annotations__',\n ECMP: 'ecmp',\n NG_REFLECT: 'ng-reflect-',\n RENDERED: 'rendered-as-',\n MAPPER: 'mapper',\n CHILDREN: 'children',\n LISTABLE: 'listable',\n RENDER: 'render',\n RENDERED_ID: 'rendered-as-{0}',\n PARENT: '_parent',\n VALIDATION_PARENT_KEY: VALIDATION_PARENT_KEY\n};\n\n/**\n * @description Form validation state constants\n * @summary Contains constants representing the possible validation states of a form.\n * These are used to check and handle form validation throughout the application.\n * @typedef {Object} FormConstants\n * @property {string} VALID - Constant representing a valid form state\n * @property {string} INVALID - Constant representing an invalid form state\n * @const FormConstants\n * @memberOf module:engine\n */\nexport const FormConstants = {\n VALID: 'VALID',\n INVALID: 'INVALID',\n};\n\n/**\n * @description Event name constants\n * @summary Enum containing constants for event names used throughout the application.\n * These are used to standardize event naming and handling.\n * @enum {string}\n * @readonly\n * @property {string} BACK_BUTTON_NAVIGATION - Event fired when back button navigation ends\n * @property {string} REFRESH_EVENT - Event fired when a refresh action occurs\n * @property {string} CLICK_EVENT - Event fired when a click action occurs\n * @property {string} SUBMIT_EVENT - Event fired when a form submission occurs\n * @memberOf module:engine\n */\nexport enum EventConstants {\n BACK_BUTTON_NAVIGATION = 'backButtonNavigationEndEvent',\n REFRESH_EVENT = 'RefreshEvent',\n CLICK_EVENT = 'ClickEvent',\n SUBMIT_EVENT = 'SubmitEvent',\n}\n\n/**\n * @description Logger level constants\n * @summary Enum defining the logging levels used in the application's logging system.\n * Lower values represent more verbose logging, while higher values represent more critical logs.\n * @enum {number}\n * @readonly\n * @property {number} ALL - Log everything (most verbose)\n * @property {number} DEBUG - Log debug information\n * @property {number} INFO - Log informational messages\n * @property {number} WARN - Log warnings\n * @property {number} ERROR - Log errors\n * @property {number} CRITICAL - Log critical errors (least verbose)\n * @memberOf module:engine\n */\nexport enum LoggerLevels {\n ALL = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n CRITICAL = 5\n};\n\n/**\n * @description Route direction constants\n * @summary Enum defining the possible navigation directions in the application.\n * Used for controlling navigation flow and animation directions.\n * @enum {string}\n * @readonly\n * @property {string} BACK - Navigate back to the previous page\n * @property {string} FORWARD - Navigate forward to the next page\n * @property {string} ROOT - Navigate to the root/home page\n * @memberOf module:engine\n */\nexport enum RouteDirections {\n BACK = 'back',\n FORWARD = 'forward',\n ROOT = 'root',\n}\n\n\n/**\n * @description Component tag name constants\n * @summary Enum defining the tag names for custom components used in the application.\n * These tag names are used for component registration and rendering.\n * @enum {string}\n * @readonly\n * @property {string} LIST_ITEM - Tag name for list item component\n * @property {string} LIST_INFINITE - Tag name for infinite scrolling list component\n * @property {string} LIST_PAGINATED - Tag name for paginated list component\n * @memberOf module:engine\n */\nexport enum ComponentsTagNames {\n LIST_ITEM = 'ngx-decaf-list-item',\n LIST_INFINITE = 'ngx-decaf-list-infinite',\n LIST_PAGINATED = 'ngx-decaf-list-paginated',\n}\n\n/**\n * @description Base component property name constants\n * @summary Enum defining the standard property names used by base components in the application.\n * These property names are used for consistent property access across components.\n * @enum {string}\n * @readonly\n * @property {string} MODEL - Property name for the component's data model\n * @property {string} LOCALE - Property name for localization settings\n * @property {string} PK - Property name for primary key\n * @property {string} ITEMS - Property name for collection items\n * @property {string} ROUTE - Property name for routing information\n * @property {string} OPERATIONS - Property name for available operations\n * @property {string} UID - Property name for unique identifier\n * @property {string} TRANSLATABLE - Property name for translation flag\n * @property {string} MAPPER - Property name for property mapper\n * @property {string} INITIALIZED - Property name for initialization state\n * @memberOf module:engine\n */\nexport enum BaseComponentProps {\n MODEL = 'model',\n LOCALE = 'locale',\n PK = 'pk',\n ITEMS = 'items',\n ROUTE = 'route',\n OPERATIONS = 'operations',\n UID = 'uid',\n TRANSLATABLE = 'translatable',\n MAPPER = 'mapper',\n INITIALIZED = 'initialized',\n}\n\n\n","import { AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport {\n ComparisonValidationKeys,\n DEFAULT_PATTERNS,\n PathProxy,\n PathProxyEngine,\n Validation,\n ValidationKeys,\n Validator,\n} from '@decaf-ts/decorator-validation';\nimport { FieldProperties, HTML5InputTypes, parseValueByType } from '@decaf-ts/ui-decorators';\nimport { AngularEngineKeys } from './constants';\nimport { KeyValue } from './types';\n\ntype ComparisonValidationKey = typeof ComparisonValidationKeys[keyof typeof ComparisonValidationKeys];\n\n/**\n *\n * Resolves the correct validator key and its associated properties based on the input key and type.\n *\n * When the validation key is TYPE, it's necessary to resolve the actual validator based on the\n * field's type (e.g., 'password', 'email', 'url') instead of using the generic getValidator(\"type\") logic.\n * This allows directly invoking specific validators like getValidator('password'), ensuring the correct\n * behavior for type-based validation.\n *\n * @param key - The validation key (e.g., 'type', 'required', etc.).\n * @param value - The value that needs be provided to the validator.\n * @param type - The field's declared type.\n * @returns An object containing the resolved validator key and its corresponding props.\n */\nconst resolveValidatorKeyProps = (key: string, value: unknown, type: string): {\n validatorKey: string;\n props: Record<string, unknown>;\n} => {\n const patternValidators: Record<string, unknown> = {\n [ValidationKeys.PASSWORD]: DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,\n [ValidationKeys.EMAIL]: DEFAULT_PATTERNS.EMAIL,\n [ValidationKeys.URL]: DEFAULT_PATTERNS.URL,\n };\n\n const isTypeBased = key === ValidationKeys.TYPE && Object.keys(patternValidators).includes(type);\n const validatorKey = isTypeBased ? type : key;\n const props: Record<string, unknown> = {\n [validatorKey]: value,\n // Email, Password, and URL are validated using the \"pattern\" key\n ...(isTypeBased && { [ValidationKeys.PATTERN]: patternValidators[type] }),\n };\n\n return { validatorKey, props };\n};\n\n\nexport class ValidatorFactory {\n static spawn(fieldProps: FieldProperties, key: string): ValidatorFn {\n if (!Validation.keys().includes(key))\n throw new Error('Unsupported custom validation');\n\n const validatorFn: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const { name, type } = fieldProps;\n const { validatorKey, props } = resolveValidatorKeyProps(key, fieldProps[key as keyof FieldProperties], type);\n const validator = Validation.get(validatorKey) as Validator;\n\n // parseValueByType does not support undefined values\n const value = typeof control.value !== 'undefined'\n ? parseValueByType(type, type === HTML5InputTypes.CHECKBOX ? name : control.value, fieldProps)\n : undefined;\n\n // Create a proxy to enable access to parent and child values\n let proxy: PathProxy<unknown> = ValidatorFactory.createProxy({} as AbstractControl);\n if (Object.values(ComparisonValidationKeys).includes(key as ComparisonValidationKey)) {\n const parent: FormGroup = control instanceof FormGroup ? control : (control as KeyValue)[AngularEngineKeys.PARENT];\n proxy = ValidatorFactory.createProxy(parent) as PathProxy<unknown>;\n }\n\n let errs: string | undefined;\n try {\n errs = validator.hasErrors(value, props, proxy);\n } catch (e: unknown) {\n errs = `${key} validator failed to validate: ${e}`;\n console.warn(errs);\n }\n\n return errs ? { [validatorKey]: true } : null;\n };\n\n Object.defineProperty(validatorFn, 'name', {\n value: `${key}Validator`,\n });\n\n return validatorFn;\n }\n\n /**\n * @summary Creates a proxy wrapper for an Angular AbstractControl to assist with custom validation logic.\n * @description Returns a structured proxy object that simulates a hierarchical tree of form values.\n * Enables Validators handling method to access parent and child properties using consistent dot-notation in Angular forms.\n *\n * @param {AbstractControl} control - The control to wrap in a proxy.\n * @returns {PathProxy<unknown>} A proxy object exposing form values and enabling recursive parent access.\n */\n static createProxy(control: AbstractControl): PathProxy<unknown> {\n return PathProxyEngine.create(control, {\n getValue(target: AbstractControl, prop: string): unknown {\n if (target instanceof FormControl)\n return target.value;\n\n if (target instanceof FormGroup) {\n const control = target.controls[prop];\n return control instanceof FormControl ? control.value : control;\n }\n\n // const value = target[prop];\n // if (value instanceof FormControl)\n // return value.value;\n //\n // if (value instanceof FormGroup) {\n // const control = value.controls[prop];\n // return control instanceof FormControl ? control.value : control;\n // }\n\n return (target as KeyValue)?.[prop];\n },\n getParent: function(target: AbstractControl) {\n return target?.['_parent'];\n },\n ignoreUndefined: true,\n ignoreNull: true,\n });\n }\n}\n","import { escapeHtml, FieldProperties, HTML5CheckTypes, HTML5InputTypes, parseToNumber } from '@decaf-ts/ui-decorators';\nimport { ComponentConfig, ComponentInput, FieldUpdateMode, FormParentGroup } from './types';\nimport { AbstractControl, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';\nimport { isValidDate, parseDate, Validation } from '@decaf-ts/decorator-validation';\nimport { ValidatorFactory } from './ValidatorFactory';\n\n\n/**\n * @description Service for managing Angular forms and form controls.\n * @summary The NgxFormService provides utility methods for creating, managing, and validating Angular forms and form controls. It includes functionality for registering forms, adding controls, validating fields, and handling form data.\n *\n * @class\n * @param {WeakMap<AbstractControl, FieldProperties>} controls - A WeakMap to store control properties.\n * @param {Map<string, FormGroup>} formRegistry - A Map to store registered forms.\n *\n * @example\n * // Creating a form from components\n * const components = [\n * { inputs: { name: 'username', type: 'text', required: true } },\n * { inputs: { name: 'password', type: 'password', minLength: 8 } }\n * ];\n * const form = NgxFormService.createFormFromComponents('loginForm', components, true);\n *\n * // Validating fields\n * NgxFormService.validateFields(form);\n *\n * // Getting form data\n * const formData = NgxFormService.getFormData(form);\n *\n * @mermaid\n * sequenceDiagram\n * participant C as Component\n * participant NFS as NgxFormService\n * participant AF as Angular Forms\n * C->>NFS: createFormFromComponents()\n * NFS->>AF: new FormGroup()\n * NFS->>NFS: addFormControl()\n * NFS->>AF: addControl()\n * NFS-->>C: Return FormGroup\n * C->>NFS: validateFields()\n * NFS->>AF: markAsTouched(), markAsDirty(), updateValueAndValidity()\n * C->>NFS: getFormData()\n * NFS->>AF: Get control values\n * NFS-->>C: Return form data\n */\nexport class NgxFormService {\n private static controls = new WeakMap<AbstractControl, FieldProperties>();\n private static formRegistry = new Map<string, FormGroup>();\n\n /**\n * @description Adds a form to the registry.\n * @summary Registers a FormGroup with a unique identifier. Throws an error if the identifier is already in use.\n * @param {string} formId - The unique identifier for the form.\n * @param {FormGroup} formGroup - The FormGroup to be registered.\n * @throws {Error} If a FormGroup with the given id is already registered.\n */\n static addRegistry(formId: string, formGroup: FormGroup): void {\n if (this.formRegistry.has(formId))\n throw new Error(`A FormGroup with id '${formId}' is already registered.`);\n this.formRegistry.set(formId, formGroup);\n }\n\n /**\n * @description Removes a form from the registry.\n * @summary Deletes a FormGroup from the registry using its unique identifier.\n * @param {string} formId - The unique identifier of the form to be removed.\n */\n static removeRegistry(formId: string): void {\n this.formRegistry.delete(formId);\n }\n\n /**\n * @description Resolves the parent group and control name from a path.\n * @summary Traverses the form group structure to find the parent group and control name for a given path.\n * @param {FormGroup} formGroup - The root FormGroup.\n * @param {string} path - The path to the control.\n * @return {FormParentGroup} A tuple containing the parent FormGroup and the control name.\n */\n private static resolveParentGroup(formGroup: FormGroup, path: string): FormParentGroup {\n const parts = path.split('.');\n const controlName = parts.pop() as string;\n let currentGroup = formGroup;\n for (const part of parts) {\n if (!currentGroup.get(part)) {\n currentGroup.addControl(part, new FormGroup({}));\n }\n currentGroup = currentGroup.get(part) as FormGroup;\n }\n return [currentGroup, controlName];\n }\n\n /**\n * @description Adds a form control to a form group.\n * @summary Creates and adds a form control to the specified form group based on the provided component properties.\n * @param {FormGroup} formGroup - The form group to add the control to.\n * @param {ComponentInput} componentProps - The properties of the component to create the control from.\n */\n private static addFormControl(formGroup: FormGroup, componentProps: ComponentInput): void {\n\n const { name, childOf } = componentProps;\n const fullPath = childOf ? `${childOf}.${name}` : name;\n const [parentGroup, controlName] = this.resolveParentGroup(formGroup, fullPath);\n\n if (!parentGroup.get(controlName)) {\n const control = NgxFormService.fromProps(\n componentProps,\n componentProps.updateMode || 'change',\n );\n NgxFormService.register(control, componentProps);\n parentGroup.addControl(controlName, control);\n }\n\n componentProps['formGroup'] = parentGroup;\n componentProps['formControl'] = parentGroup.get(controlName) as FormControl;\n }\n\n /**\n * @description Retrieves a control from a registered form.\n * @summary Finds and returns an AbstractControl from a registered form using the form id and optional path.\n * @param {string} formId - The unique identifier of the form.\n * @param {string} [path] - The path to the control within the form.\n * @return {AbstractControl} The requested AbstractControl.\n * @throws {Error} If the form is not found in the registry or the control is not found in the form.\n */\n static getControlFromForm(formId: string, path?: string): AbstractControl {\n const form = this.formRegistry.get(formId);\n if (!form)\n throw new Error(`Form with id '${formId}' not found in the registry.`);\n\n if (!path)\n return form;\n\n const control = form.get(path);\n if (!control)\n throw new Error(`Control with path '${path}' not found in form '${formId}'.`);\n return control;\n }\n\n /**\n * @description Creates a form from component configurations.\n * @summary Generates a FormGroup based on an array of component configurations and optionally registers it.\n * @param {string} id - The unique identifier for the form.\n * @param {ComponentConfig[]} components - An array of component configurations.\n * @param {boolean} [registry=false] - Whether to register the created form.\n * @return {FormGroup} The created FormGroup.\n */\n static createFormFromComponents(id: string, components: ComponentConfig[], registry: boolean = false): FormGroup {\n const form = new FormGroup({});\n components.forEach(component => {\n this.addFormControl(form, component.inputs);\n });\n\n if (registry)\n this.addRegistry(id, form);\n\n return form;\n }\n\n /**\n * @description Adds a control to a form based on component properties.\n * @summary Creates and adds a form control to a form (existing or new) based on the provided component properties.\n * @param {string} id - The unique identifier of the form.\n * @param {FieldProperties} componentProperties - The properties of the component to create the control from.\n * @return {AbstractControl} The form or created control.\n */\n static addControlFromProps(id: string, componentProperties: FieldProperties): AbstractControl {\n const form = this.formRegistry.get(id) ?? new FormGroup({});\n if (!this.formRegistry.has(id))\n this.addRegistry(id, form);\n\n if (componentProperties.path)\n this.addFormControl(form, componentProperties);\n\n return form;\n }\n\n /**\n * @description Retrieves form data from a FormGroup.\n * @summary Extracts and processes the data from a FormGroup, handling different input types and nested form groups.\n * @param {FormGroup} formGroup - The FormGroup to extract data from.\n * @return {Record<string, unknown>} An object containing the form data.\n */\n static getFormData(formGroup: FormGroup): Record<string, unknown> {\n const data: Record<string, unknown> = {};\n for (const key in formGroup.controls) {\n const control = formGroup.controls[key];\n if (!(control instanceof FormControl)) {\n data[key] = NgxFormService.getFormData(control as FormGroup);\n continue;\n }\n\n const props = NgxFormService.getPropsFromControl(control);\n let value = control.value;\n if (!HTML5CheckTypes.includes(props['type'])) {\n switch (props['type']) {\n case HTML5InputTypes.NUMBER:\n value = parseToNumber(value);\n break;\n case HTML5InputTypes.DATE:\n case HTML5InputTypes.DATETIME_LOCAL:\n value = new Date(value);\n break;\n default:\n value = escapeHtml(value);\n }\n }\n data[key] = value;\n }\n\n return data;\n }\n\n /**\n * @description Validates fields in a form control or form group.\n * @summary Recursively validates all fields in a form control or form group, marking them as touched and dirty.\n * @param {AbstractControl} control - The control or form group to validate.\n * @param {string} [path] - The path to the control within the form.\n * @return {boolean} True if all fields are valid, false otherwise.\n * @throws {Error} If no control is found at the specified path or if the control type is unknown.\n */\n static validateFields(control: AbstractControl, path?: string): boolean {\n control = path ? control.get(path) as AbstractControl : control;\n if (!control)\n throw new Error(`No control found at path: ${path || 'root'}.`);\n\n const isAllowed = [FormGroup, FormControl].some(type => control instanceof type);\n if (!isAllowed)\n throw new Error(`Unknown control type at: ${path || 'root'}`);\n\n control.markAsTouched();\n control.markAsDirty();\n control.updateValueAndValidity({ emitEvent: true });\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach((childControl) => {\n this.validateFields(childControl);\n });\n }\n\n return control.valid;\n }\n\n /**\n * @description Generates validators from component properties.\n * @summary Creates an array of ValidatorFn based on the supported validation keys in the component properties.\n * @param {FieldProperties} props - The component properties.\n * @return {ValidatorFn[]} An array of validator functions.\n */\n private static validatorsFromProps(props: FieldProperties): ValidatorFn[] {\n const supportedValidationKeys = Validation.keys();\n return Object.keys(props)\n .filter((k: string) => supportedValidationKeys.includes(k))\n .map((k: string) => {\n return ValidatorFactory.spawn(props, k);\n });\n }\n\n /**\n * @description Creates a FormControl from component properties.\n * @summary Generates a FormControl with validators based on the provided component properties.\n * @param {FieldProperties} props - The component properties.\n * @param {FieldUpdateMode} [updateMode='change'] - The update mode for the control.\n * @return {FormControl} The created FormControl.\n */\n static fromProps(props: FieldProperties, updateMode: FieldUpdateMode = 'change'): FormControl {\n const validators = this.validatorsFromProps(props);\n const composed = validators.length ? Validators.compose(validators) : null;\n return new FormControl(\n {\n value:\n props.value && props.type !== HTML5InputTypes.CHECKBOX\n ? props.type === HTML5InputTypes.DATE\n ? !isValidDate(parseDate(props.format as string, props.value as string))\n ? undefined : props.value :\n (props.value as unknown) : undefined,\n disabled: props.disabled,\n },\n {\n validators: composed,\n updateOn: updateMode,\n },\n );\n }\n\n /**\n * @description Retrieves properties from a FormControl.\n * @summary Gets the FieldProperties associated with a FormControl from the internal WeakMap.\n * @param {FormControl} control - The FormControl to get properties for.\n * @return {FieldProperties} The properties associated with the control.\n */\n static getPropsFromControl(control: FormControl): FieldProperties {\n return this.controls.get(control) || {} as FieldProperties;\n }\n\n /**\n * @description Finds a parent element with a specific tag.\n * @summary Traverses up the DOM tree to find the nearest parent element with the specified tag.\n * @param {HTMLElement} el - The starting element.\n * @param {string} tag - The tag name to search for.\n * @return {HTMLElement} The found parent element.\n * @throws {Error} If no parent with the specified tag is found.\n */\n static getParentEl(el: HTMLElement, tag: string) {\n let parent: HTMLElement | null;\n while ((parent = el.parentElement) !== null) {\n if (parent.tagName.toLowerCase() === tag.toLowerCase()) {\n return parent;\n }\n el = parent;\n }\n throw new Error(\n `No parent with the tag ${tag} was found for provided element`,\n );\n }\n\n /**\n * @description Registers a control with its properties.\n * @summary Associates a control with its properties in the internal WeakMap.\n * @param {AbstractControl} control - The control to register.\n * @param {FieldProperties} props - The properties to associate with the control.\n */\n static register(control: AbstractControl, props: FieldProperties) {\n this.controls.set(control, props);\n }\n\n /**\n * @description Unregisters a control.\n * @summary Removes a control and its associated properties from the internal WeakMap.\n * @param {AbstractControl} control - The control to unregister.\n * @return {boolean} True if the control was successfully unregistered, false otherwise.\n */\n static unregister(control: AbstractControl): boolean {\n return this.controls.delete(control);\n }\n\n /**\n * @description Resets a form group.\n * @summary Recursively resets all controls in a form group, clearing values, errors, and marking them as pristine and untouched.\n * @param {FormGroup} formGroup - The form group to reset.\n */\n static reset(formGroup: FormGroup) {\n for (const key in formGroup.controls) {\n const control = formGroup.controls[key];\n if (!(control instanceof FormControl)) {\n NgxFormService.reset(control as FormGroup);\n continue;\n }\n\n const { type } = NgxFormService.getPropsFromControl(control);\n if (!HTML5CheckTypes.includes(type))\n control.setValue(undefined);\n control.markAsPristine();\n control.markAsUntouched();\n control.setErrors(null);\n control.updateValueAndValidity();\n }\n }\n}\n","import { FieldDefinition, RenderingEngine } from '@decaf-ts/ui-decorators';\nimport { AngularDynamicOutput, AngularFieldDefinition, KeyValue } from './types';\nimport { AngularEngineKeys } from './constants';\nimport { Constructor, Model } from '@decaf-ts/decorator-validation';\nimport { InternalError } from '@decaf-ts/db-decorators';\nimport {\n ComponentMirror,\n ComponentRef,\n EnvironmentInjector,\n Injector,\n reflectComponentType,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgxFormService } from './NgxFormService';\n\n/**\n * @description Angular implementation of the RenderingEngine with enhanced features\n * @summary This class extends the base RenderingEngine to provide Angular-specific rendering capabilities\n * with additional features compared to NgxRenderingEngine. It handles the conversion of field definitions\n * to Angular components, manages component registration, and provides utilities for component creation\n * and input handling. This implementation uses Angular's newer component APIs.\n *\n * @template AngularFieldDefinition - Type for Angular-specific field definitions\n * @template AngularDynamicOutput - Type for Angular-specific component output\n *\n * @class NgxRenderingEngine2\n * @example\n * ```typescript\n * const engine = NgxRenderingEngine2.get();\n * engine.initialize();\n * const output = engine.render(myModel, {}, viewContainerRef, injector, templateRef);\n * ```\n *\n * @mermaid\n * sequenceDiagram\n * participant Client\n * participant Engine as NgxRenderingEngine2\n * participant Components as RegisteredComponents\n *\n * Client->>Engine: get()\n * Client->>Engine: initialize()\n * Client->>Engine: render(model, props, vcr, injector, tpl)\n * Engine->>Engine: toFieldDefinition(model, props)\n * Engine->>Engine: fromFieldDefinition(fieldDef, vcr, injector, tpl)\n * Engine->>Components: components(fieldDef.tag)\n * Components-->>Engine: component constructor\n * Engine->>Engine: createComponent(component, inputs, metadata, vcr, injector, template)\n * Engine-->>Client: return AngularDynamicOutput\n */\nexport class NgxRenderingEngine2 extends RenderingEngine<AngularFieldDefinition, AngularDynamicOutput> {\n\n /**\n * @description Registry of registered components\n * @summary Static registry that maps component names to their constructors.\n * This allows the engine to look up components by name when rendering.\n * @type {Record<string, { constructor: Constructor<unknown> }>}\n */\n private static _components: Record<string, { constructor: Constructor<unknown> }>;\n\n /**\n * @description Collection of child component outputs\n * @summary Stores the outputs of child components during rendering.\n * @type {AngularDynamicOutput[]}\n */\n private _childs!: AngularDynamicOutput[];\n\n /**\n * @description Current model being rendered\n * @summary Reference to the model currently being processed by the rendering engine.\n * @type {Model}\n */\n private _model!: Model;\n\n /**\n * @description Static reference to the current instance\n * @summary Singleton instance reference for the rendering engine.\n * @type {Type<unknown> | undefined}\n */\n private static _instance: Type<unknown> | undefined;\n\n /**\n * @description Creates a new instance of NgxRenderingEngine2\n * @summary Initializes the rendering engine with the 'angular' engine type.\n * This constructor sets up the base configuration needed for Angular-specific rendering.\n */\n constructor() {\n super('angular');\n }\n\n /**\n * @description Converts a field definition to an Angular component output\n * @summary This private method takes a field definition and creates the corresponding Angular component.\n * It handles component instantiation, input property mapping, and child component rendering.\n * The method validates input properties against the component's metadata and processes\n * child components recursively.\n *\n * @param {FieldDefinition<AngularFieldDefinition>} fieldDef - The field definition to convert\n * @param {ViewContainerRef} vcr - The view container reference for component creation\n * @param {Injector} injector - The Angular injector for dependency injection\n * @param {TemplateRef<any>} tpl - The template reference for content projection\n * @param {string} registryFormId - Form identifier for the component renderer\n * @return {AngularDynamicOutput} The Angular component output with component reference and inputs\n *\n * @mermaid\n * sequenceDiagram\n * participant Method as fromFieldDefinition\n * participant Components as NgxRenderingEngine2.components\n * participant Angular as Angular Core\n * participant Process as processChild\n *\n * Method->>Components: components(fieldDef.tag)\n * Components-->>Method: component constructor\n * Method->>Angular: reflectComponentType(component)\n * Angular-->>Method: componentMetadata\n * Method->>Method: Validate input properties\n * Method->>Method: Create result object\n * alt Has children\n * Method->>Process: Process children recursively\n * Process->>Method: Return processed children\n * Method->>Angular: Create embedded view\n * Method->>Method: Create component instance\n * end\n * Method-->>Caller: return AngularDynamicOutput\n */\n private fromFieldDefinition(\n fieldDef: FieldDefinition<AngularFieldDefinition>,\n vcr: ViewContainerRef,\n injector: Injector,\n tpl: TemplateRef<unknown>,\n registryFormId: string = Date.now().toString(36).toUpperCase(),\n ): AngularDynamicOutput {\n const cmp = (fieldDef as KeyValue)?.['component'] || NgxRenderingEngine2.components(fieldDef.tag);\n const component = cmp.constructor as unknown as Type<unknown>;\n\n const componentMetadata = reflectComponentType(component);\n if (!componentMetadata) {\n throw new InternalError(`Metadata for component ${fieldDef.tag} not found.`);\n }\n\n const { inputs: possibleInputs } = componentMetadata;\n const inputs = { ...fieldDef.props };\n\n const unmappedKeys = Object.keys(inputs).filter(input => {\n const isMapped = possibleInputs.find(({ propName }) => propName === input);\n if (!isMapped) delete inputs[input];\n return !isMapped;\n });\n\n if (unmappedKeys.length > 0)\n console.warn(`Unmapped input properties for component ${fieldDef.tag}: ${unmappedKeys.join(', ')}`);\n\n const result: AngularDynamicOutput = {\n component,\n inputs,\n injector,\n };\n\n if (fieldDef.rendererId)\n (result.inputs as Record<string, unknown>)['rendererId'] = fieldDef.rendererId;\n\n // process children\n if (fieldDef.children?.length) {\n result.children = fieldDef.children.map((child) => {\n // create a child form and add its controls as properties of child.props\n NgxFormService.addControlFromProps(registryFormId, child.props);\n return this.fromFieldDefinition(child, vcr, injector, tpl, registryFormId);\n });\n }\n\n // generating DOM\n vcr.clear();\n const template = vcr.createEmbeddedView(tpl, injector).rootNodes;\n const componentInstance = NgxRenderingEngine2.createComponent(\n component,\n { ...inputs, model: this._model },\n componentMetadata,\n vcr,\n injector,\n template,\n );\n\n result.instance = NgxRenderingEngine2._instance = componentInstance.instance as Type<unknown>;\n\n return result;\n }\n\n\n /**\n * @description Creates an Angular component instance\n * @summary This static utility method creates an Angular component instance with the specified\n * inputs and template. It uses Angular's component creation API to instantiate the component\n * and then sets the input properties using the provided metadata.\n *\n * @param {Type<unknown>} component - The component type to create\n * @param {KeyValue} [inputs={}] - The input properties to set on the component\n * @param {ComponentMirror<unknown>} metadata - The component metadata for input validation\n * @param {ViewContainerRef} vcr - The view container reference for component creation\n * @param {Injector} injector - The Angular injector for dependency injection\n * @param {Node[]} [template=[]] - The template nodes to project into the component\n * @return {ComponentRef<unknown>} The created component reference\n */\n static createComponent(component: Type<unknown>, inputs: KeyValue = {}, metadata: ComponentMirror<unknown>, vcr: ViewContainerRef, injector: Injector, template: Node[] = []): ComponentRef<unknown> {\n const componentInstance = vcr.createComponent(component as Type<unknown>, {\n environmentInjector: injector as EnvironmentInjector,\n projectableNodes: [template],\n });\n this.setInputs(componentInstance, inputs, metadata);\n return componentInstance;\n }\n\n /**\n * @description Extracts decorator metadata from a model\n * @summary This method provides access to the field definition generated from a model's\n * decorators. It's a convenience wrapper around the toFieldDefinition method that\n * converts a model to a field definition based on its decorators and the provided\n * global properties.\n *\n * @param {Model} model - The model to extract decorators from\n * @param {Record<string, unknown>} globalProps - Global properties to include in the field definition\n * @return {FieldDefinition<AngularFieldDefinition>} The field definition generated from the model\n */\n getDecorators(model: Model, globalProps: Record<string, unknown>): FieldDefinition<AngularFieldDefinition> {\n return this.toFieldDefinition(model, globalProps);\n }\n\n /**\n * @description Destroys the current engine instance\n * @summary This static method clears the current instance reference, effectively\n * destroying the singleton instance of the rendering engine. This can be used\n * to reset the engine state or to prepare for a new instance creation.\n *\n * @return {Promise<void>} A promise that resolves when the instance is destroyed\n */\n static async destroy(): Promise<void> {\n NgxRenderingEngine2._instance = undefined;\n }\n\n\n /**\n * @description Renders a model into an Angular component output\n * @summary This method takes a model and converts it to an Angular component output.\n * It first stores a reference to the model, then converts it to a field definition\n * using the base RenderingEngine's toFieldDefinition method, and finally converts\n * that field definition to an Angular component output using fromFieldDefinition.\n *\n * @template M - Type extending Model\n * @param {M} model - The model to render\n * @param {Record<string, unknown>} globalProps - Global properties to pass to the component\n * @param {ViewContainerRef} vcr - The view container reference for component creation\n * @param {Injector} injector - The Angular injector for dependency injection\n * @param {TemplateRef<any>} tpl - The template reference for content projection\n * @return {AngularDynamicOutput} The Angular component output with component reference and inputs\n *\n * @mermaid\n * sequenceDiagram\n * participant Client as Client Code\n * participant Render as render method\n * participant ToField as toFieldDefinition\n * participant FromField as fromFieldDefinition\n *\n * Client->>Render: render(model, globalProps, vcr, injector, tpl)\n * Render->>Render: Store model reference\n * Render->>ToField: toFieldDefinition(model, globalProps)\n * ToField-->>Render: fieldDef\n * Render->>FromField: fromFieldDefinition(fieldDef, vcr, injector, tpl)\n * FromField-->>Render: AngularDynamicOutput\n * Render-->>Client: return AngularDynamicOutput\n */\n override render<M extends Model>(\n model: M,\n globalProps: Record<string, unknown>,\n vcr: ViewContainerRef,\n injector: Injector,\n tpl: TemplateRef<unknown>,\n ): AngularDynamicOutput {\n let result: AngularDynamicOutput;\n try {\n this._model = model;\n const formId = Date.now().toString(36).toUpperCase();\n const fieldDef = this.toFieldDefinition(model, globalProps);\n result = this.fromFieldDefinition(fieldDef, vcr, injector, tpl, formId);\n\n (result!.instance! as KeyValue)['formGroup'] = NgxFormService.getControlFromForm(formId);\n NgxFormService.removeRegistry(formId);\n } catch (e: unknown) {\n throw new InternalError(\n `Failed to render Model ${model.constructor.name}: ${e}`,\n );\n }\n\n return result;\n }\n\n /**\n * @description Initializes the rendering engine\n * @summary This method initializes the rendering engine. It checks if the engine is already initialized\n * and sets the initialized flag to true. This method is called before the engine is used\n * to ensure it's properly set up for rendering operations.\n *\n * @return {Promise<void>} A promise that resolves when initialization is complete\n */\n override async initialize(): Promise<void> {\n if (this.initialized)\n return;\n // ValidatableByType[]\n this.initialized = true;\n }\n\n /**\n * @description Registers a component with the rendering engine\n * @summary This static method registers a component constructor with the rendering engine\n * under a specific name. It initializes the components registry if needed and throws\n * an error if a component is already registered under the same name to prevent\n * accidental overrides.\n *\n * @param {string} name - The name to register the component under\n * @param {Constructor<unknown>} constructor - The component constructor\n * @return {void}\n */\n static registerComponent(name: string, constructor: Constructor<unknown>): void {\n if (!this._components) this._components = {};\n if (name in this._components)\n throw new InternalError(`Component already registered under ${name}`);\n this._components[name] = {\n constructor: constructor,\n };\n }\n\n /**\n * @description Retrieves registered components from the rendering engine\n * @summary This static method retrieves either all registered components or a specific component\n * by its selector. When called without a selector, it returns an array of all registered\n * components. When called with a selector, it returns the specific component if found,\n * or throws an error if the component is not registered.\n *\n * @param {string} [selector] - Optional selector to retrieve a specific component\n * @return {Object|Array} Either a specific component or an array of all components\n */\n static components(selector?: string): object | string[] {\n if (!selector) return Object.values(this._components);\n if (!(selector in this._components))\n throw new InternalError(`No Component registered under ${selector}`);\n return this._components[selector];\n }\n\n /**\n * @description Generates a key for reflection metadata\n * @summary This static method generates a key for reflection metadata by prefixing the input key\n * with the Angular engine's reflection prefix. This is used for storing and retrieving\n * metadata in a namespaced way to avoid conflicts with other metadata.\n *\n * @param {string} key - The base key to prefix\n * @return {string} The prefixed key for reflection metadata\n */\n static override key(key: string): string {\n return `${AngularEngineKeys.REFLECT}${key}`;\n }\n\n /**\n * @description Sets input properties on a component instance\n * @summary This static utility method sets input properties on a component instance\n * based on the provided inputs object and component metadata. It handles both simple\n * values and nested objects, recursively processing object properties. The method\n * validates each input against the component's metadata to ensure only valid inputs\n * are set.\n *\n * @param {ComponentRef<unknown>} component - The component reference to set inputs on\n * @param {KeyValue} inputs - The input properties to set\n * @param {ComponentMirror<unknown>} metadata - The component metadata for input validation\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant Caller\n * participant SetInputs as setInputs\n * participant Parse as parseInputValue\n * participant Component as ComponentRef\n *\n * Caller->>SetInputs: setInputs(component, inputs, metadata)\n * SetInputs->>SetInputs: Iterate through inputs\n * loop For each input\n * SetInputs->>SetInputs: Check if input exists in metadata\n * alt Input is 'props'\n * SetInputs->>Parse: parseInputValue(component, value)\n * Parse->>Parse: Recursively process nested objects\n * Parse->>Component: setInput(key, value)\n * else Input is valid\n * SetInputs->>Component: setInput(key, value)\n * end\n * end\n */\n static setInputs(component: ComponentRef<unknown>, inputs: KeyValue, metadata: ComponentMirror<unknown>): void {\n function parseInputValue(component: ComponentRef<unknown>, input: KeyValue) {\n Object.keys(input).forEach(key => {\n const value = input[key];\n if (typeof value === 'object' && !!value)\n return parseInputValue(component, value);\n component.setInput(key, value);\n });\n }\n\n Object.entries(inputs).forEach(([key, value]) => {\n const prop = metadata.inputs.find((item: { propName: string }) => item.propName === key);\n if (prop) {\n if (key === 'props')\n parseInputValue(component, value);\n // if(key === 'locale' && !value)\n // value = getLocaleFromClassName(this._componentName);\n component.setInput(key, value);\n }\n });\n }\n}\n","import { apply, metadata } from '@decaf-ts/reflection';\nimport { NgxRenderingEngine2 } from './NgxRenderingEngine2';\nimport { AngularEngineKeys } from './constants';\nimport { Constructor } from '@decaf-ts/decorator-validation';\nimport { InternalError } from '@decaf-ts/db-decorators';\nimport { reflectComponentType, Type } from '@angular/core';\n\n/**\n * @description Marks an Angular component as dynamically loadable\n * @summary Decorator that registers an Angular component with the NgxRenderingEngine2 for dynamic loading.\n * This decorator must be applied before the @Component decorator to properly extract component metadata.\n * It adds metadata to the component class and registers it with the rendering engine using its selector.\n * @function Dynamic\n * @return {Function} A decorator function that can be applied to Angular component classes\n * @mermaid\n * sequenceDiagram\n * participant C as Component Class\n * participant D as Dynamic Decorator\n * participant R as NgxRenderingEngine2\n * participant M as Angular Metadata\n * C->>D: Apply decorator\n * D->>M: reflectComponentType()\n * M-->>D: Return component metadata\n * alt No metadata found\n * D->>D: Throw InternalError\n * else Metadata found\n * D->>R: registerComponent(selector, constructor)\n * D->>C: Apply metadata\n * end\n * @category Decorators\n */\nexport function Dynamic() {\n return apply(\n (original: object) => {\n const metadata = reflectComponentType(original as Type<unknown>);\n\n if (!metadata)\n throw new InternalError(\n `Could not find Component metadata. @Dynamic decorator must come above @Component`\n );\n\n NgxRenderingEngine2.registerComponent(\n metadata.selector,\n original as unknown as Constructor<unknown>\n );\n },\n metadata(NgxRenderingEngine2.key(AngularEngineKeys.DYNAMIC), true)\n );\n}\n","/**\n * @description Abstract base class for dynamic Angular modules\n * @summary The DynamicModule serves as a base class for Angular modules that need to be\n * dynamically loaded or configured at runtime. It provides a common type for the rendering\n * engine to identify and work with dynamic modules.\n * @class DynamicModule\n * @example\n * ```typescript\n * @NgModule({\n * declarations: [MyComponent],\n * imports: [CommonModule]\n * })\n * export class MyDynamicModule extends DynamicModule {}\n * ```\n */\nexport abstract class DynamicModule {}\n","import { FieldDefinition, RenderingEngine } from '@decaf-ts/ui-decorators';\nimport { AngularDynamicOutput, AngularFieldDefinition } from './types';\nimport { AngularEngineKeys } from './constants';\nimport { Constructor, Model } from '@decaf-ts/decorator-validation';\nimport { InternalError } from '@decaf-ts/db-decorators';\nimport {\n Injector,\n reflectComponentType,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * @description Angular implementation of the RenderingEngine\n * @summary This class extends the base RenderingEngine to provide Angular-specific rendering capabilities.\n * It handles the conversion of field definitions to Angular components and manages component registration.\n * @template AngularFieldDefinition - Type for Angular-specific field definitions\n * @template AngularDynamicOutput - Type for Angular-specific component output\n * @param {Injector} injector - Angular injector for dependency injection\n * @param {ViewContainerRef} vcr - View container reference for component creation\n * @param {TemplateRef<any>} tpl - Template reference for content projection\n * @class NgxRenderingEngine\n * @example\n * ```typescript\n * const engine = new NgxRenderingEngine();\n * engine.initialize();\n * const output = engine.render(myModel, {}, viewContainerRef, injector, templateRef);\n * ```\n * @mermaid\n * sequenceDiagram\n * participant Client\n * participant Engine as NgxRenderingEngine\n * participant Components as RegisteredComponents\n *\n * Client->>Engine: new NgxRenderingEngine()\n * Client->>Engine: initialize()\n * Client->>Engine: render(model, props, vcr, injector, tpl)\n * Engine->>Engine: toFieldDefinition(model, props)\n * Engine->>Engine: fromFieldDefinition(fieldDef, vcr, injector, tpl)\n * Engine->>Components: components(fieldDef.tag)\n * Components-->>Engine: component constructor\n * Engine->>Client: return AngularDynamicOutput\n */\nexport class NgxRenderingEngine extends RenderingEngine<\n AngularFieldDefinition,\n AngularDynamicOutput\n> {\n private static _components: Record<\n string,\n { constructor: Constructor<unknown> }\n >;\n\n constructor() {\n super('angular');\n }\n\n /**\n * @description Converts a field definition to an Angular component output\n * @summary This private method takes a field definition and creates the corresponding Angular component.\n * It handles component instantiation, input property mapping, and child component rendering.\n * @param {FieldDefinition<AngularFieldDefinition>} fieldDef - The field definition to convert\n * @param {ViewContainerRef} vcr - The view container reference for component creation\n * @param {Injector} injector - The Angular injector for dependency injection\n * @param {TemplateRef<any>} tpl - The template reference for content projection\n * @return {AngularDynamicOutput} The Angular component output with component reference and inputs\n * @mermaid\n * sequenceDiagram\n * participant Method as fromFieldDefinition\n * participant Components as NgxRenderingEngine.components\n * participant Angular as Angular Core\n *\n * Method->>Components: components(fieldDef.tag)\n * Components-->>Method: component constructor\n * Method->>Angular: reflectComponentType(component)\n * Angular-->>Method: componentMetadata\n * Method->>Method: Check input properties\n * Method->>Method: Create result object\n * Method->>Method: Process children if any\n * Method-->>Caller: return AngularDynamicOutput\n */\n private fromFieldDefinition(\n fieldDef: FieldDefinition<AngularFieldDefinition>,\n vcr: ViewContainerRef,\n injector: Injector,\n tpl: TemplateRef<unknown>,\n ): AngularDynamicOutput {\n const component = NgxRenderingEngine.components(fieldDef.tag)\n .constructor as unknown as Type<unknown>;\n\n const componentMetadata = reflectComponentType(component);\n if (!componentMetadata) {\n throw new InternalError(\n `Metadata for component ${fieldDef.tag} not found.`,\n );\n }\n const inputs = fieldDef.props;\n\n const possibleInputs = componentMetadata.inputs;\n const inputKeys = Object.keys(inputs);\n for (const input of possibleInputs) {\n const index = inputKeys.indexOf(input.propName);\n if (index !== -1) {\n inputKeys.splice(index, 1);\n }\n if (!inputKeys.length) break;\n }\n\n if (inputKeys.length)\n console.warn(\n `Unmapped input properties for component ${fieldDef.tag}: ${inputKeys.join(', ')}`,\n );\n\n const result: AngularDynamicOutput = {\n component: component,\n inputs: inputs || {},\n injector: injector,\n };\n\n if (fieldDef.rendererId) {\n (result.inputs as Record<string, unknown>)['rendererId'] =\n fieldDef.rendererId;\n }\n\n if (fieldDef.children && fieldDef.children.length) {\n result.children = fieldDef.children.map((child) => {\n return this.fromFieldDefinition(child, vcr, injector, tpl);\n });\n\n const template = vcr.createEmbeddedView(tpl, injector).rootNodes;\n result.content = [template];\n }\n\n return result;\n }\n\n /**\n * @description Renders a model into an Angular component output\n * @summary This method takes a model and converts it to an Angular component output.\n * It first converts the model to a field definition using the base RenderingEngine's\n * toFieldDefinition method, then converts that field definition to an Angular component output.\n * @template M - Type extending Model\n * @param {M} model - The model to render\n * @param {Record<string, unknown>} globalProps - Global properties to pass to the component\n * @param {ViewContainerRef} vcr - The view container reference for component creation\n * @param {Injector} injector - The Angular injector for dependency injection\n * @param {TemplateRef<any>} tpl - The template reference for content projection\n * @return {AngularDynamicOutput} The Angular component output with component reference and inputs\n * @mermaid\n * sequenceDiagram\n * participant Client as Client Code\n * participant Render as render method\n * participant ToField as toFieldDefinition\n * participant FromField as fromFieldDefinition\n *\n * Client->>Render: render(model, globalProps, vcr, injector, tpl)\n * Render->>ToField: toFieldDefinition(model, globalProps)\n * ToField-->>Render: fieldDef\n * Render->>FromField: fromFieldDefinition(fieldDef, vcr, injector, tpl)\n * FromField-->>Render: AngularDynamicOutput\n * Render-->>Client: return AngularDynamicOutput\n */\n override render<M extends Model>(\n model: M,\n globalProps: Record<string, unknown>,\n vcr: ViewContainerRef,\n injector: Injector,\n tpl: TemplateRef<unknown>,\n ): AngularDynamicOutput {\n let result: AngularDynamicOutput;\n try {\n const fieldDef = this.toFieldDefinition(model, globalProps);\n result = this.fromFieldDefinition(fieldDef, vcr, injector, tpl);\n } catch (e: unknown) {\n throw new InternalError(\n `Failed to render Model ${model.constructor.name}: ${e}`,\n );\n }\n\n return result;\n }\n\n /**\n * @description Initializes the rendering engine\n * @summary This method initializes the rendering engine. It checks if the engine is already initialized\n * and sets the initialized flag to true. This method is called before the engine is used.\n * @return {Promise<void>} A promise that resolves when initialization is complete\n */\n override async initialize(): Promise<void> {\n if (this.initialized) return;\n this.initialized = true;\n }\n\n /**\n * @description Registers a component with the rendering engine\n * @summary This static method registers a component constructor with the rendering engine\n * under a specific name. It throws an error if a component is already registered under the same name.\n * @param {string} name - The name to register the component under\n * @param {Constructor<unknown>} constructor - The component constructor\n * @return {void}\n */\n static registerComponent(name: string, constructor: Constructor<unknown>) {\n if (!this._components) this._components = {};\n if (name in this._components)\n throw new InternalError(`Component already registered under ${name}`);\n this._components[name] = {\n constructor: constructor,\n };\n }\n\n /**\n * @description Retrieves registered components from the rendering engine\n * @summary This static method retrieves either all registered components or a specific component\n * by its selector. It throws an error if the requested component is not registered.\n * @param {string} [selector] - Optional selector to retrieve a specific component\n * @return {Object|Array} Either a specific component or an array of all components\n */\n static components(selector?: string) {\n if (!selector) return Object.values(this._components);\n if (!(selector in this._components))\n throw new InternalError(`No Component registered under ${selector}`);\n return this._components[selector];\n }\n\n /**\n * @description Generates a key for reflection metadata\n * @summary This static method generates a key for reflection metadata by prefixing the input key\n * with the Angular engine's reflection prefix. This is used for storing and retrieving metadata.\n * @param {string} key - The base key to prefix\n * @return {string} The prefixed key for reflection metadata\n */\n static override key(key: string) {\n return `${AngularEngineKeys.REFLECT}${key}`;\n }\n}\n","/**\n * @module engine\n * @description Angular rendering engine for Decaf applications\n * @summary The engine module provides core functionality for rendering Angular components\n * in Decaf applications. It includes constants, decorators, rendering engines, and utility types\n * that enable dynamic component creation, property mapping, and component lifecycle management.\n * Key exports include {@link NgxRenderingEngine}, {@link DynamicModule}, and various decorators\n * for component configuration.\n */\nexport * from './constants';\nexport * from './decorators';\nexport * from './DynamicModule';\nexport * from './NgxRenderingEngine';\nexport * from './NgxRenderingEngine2';\nexport * from './types';\n","import {\n Component,\n ComponentMirror,\n ComponentRef,\n EnvironmentInjector,\n EventEmitter,\n inject,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n reflectComponentType,\n TemplateRef,\n Type,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgxRenderingEngine2 } from 'src/lib/engine/NgxRenderingEngine2';\nimport { BaseCustomEvent, KeyValue, RendererCustomEvent } from '../../engine';\nimport { ForAngularModule, getLogger } from 'src/lib/for-angular.module';\nimport { Logger } from '@decaf-ts/logging';\nimport { Model } from '@decaf-ts/decorator-validation';\n\n/**\n * @description Dynamic component renderer for Decaf Angular applications.\n * @summary This component provides a flexible way to dynamically render Angular components\n * at runtime based on a tag name. It handles the creation, property binding, and event\n * subscription for dynamically loaded components. This is particularly useful for\n * building configurable UIs where components need to be determined at runtime.\n *\n * @component {ComponentRendererComponent}\n * @example\n * <ngx-decaf-component-renderer\n * [tag]=\"tag\"\n * [globals]=\"globals\"\n * (listenEvent)=\"listenEvent($event)\">\n * </ngx-decaf-component-renderer>\n *\n * @mermaid\n * classDiagram\n * class ComponentRendererComponent {\n * +ViewContainerRef vcr\n * +string tag\n * +Record~string, unknown~ globals\n * +EnvironmentInjector injector\n * +ComponentRef~unknown~ component\n * +EventEmitter~RendererCustomEvent~ listenEvent\n * +ngOnInit()\n * +ngOnDestroy()\n * +ngOnChanges(changes)\n * -createComponent(tag, globals)\n * -subscribeEvents()\n * -unsubscribeEvents()\n * }\n * ComponentRendererComponent --|> OnInit\n * ComponentRendererComponent --|> OnChanges\n * ComponentRendererComponent --|> OnDestroy\n *\n * @implements {OnInit}\n * @implements {OnChanges}\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'ngx-decaf-component-renderer',\n templateUrl: './component-renderer.component.html',\n styleUrls: ['./component-renderer.component.scss'],\n imports: [ForAngularModule],\n standalone: true,\n})\nexport class ComponentRendererComponent\n implements OnInit, OnDestroy {\n /**\n * @description Reference to the container where the dynamic component will be rendered.\n * @summary This ViewContainerRef provides the container where the dynamically created\n * component will be inserted into the DOM. It's marked as static to ensure it's available\n * during the ngOnInit lifecycle hook when the component is created.\n *\n * @type {ViewContainerRef}\n * @memberOf ComponentRendererComponent\n */\n @ViewChild('componentViewContainer', { static: true, read: ViewContainerRef })\n vcr!: ViewContainerRef;\n\n /**\n * @description The tag name of the component to be dynamically rendered.\n * @summary This input property specifies which component should be rendered by providing\n * its registered tag name. The tag must correspond to a component that has been registered\n * with the NgxRenderingEngine2. This is a required input as it determines which component\n * to create.\n *\n * @type {string}\n * @required\n * @memberOf ComponentRendererComponent\n */\n @Input({ required: true })\n tag!: string;\n\n /**\n * @description Global properties to pass to the rendered component.\n * @summary This input property allows passing a set of properties to the dynamically\n * rendered component. These properties will be mapped to the component's inputs if they\n * match. Properties that don't match any input on the target component will be filtered out\n * with a warning.\n *\n * @type {Record<string, unknown>}\n * @default {}\n * @memberOf ComponentRendererComponent\n */\n @Input()\n globals: Record<string, unknown> = {};\n\n /**\n * @description Injector used for dependency injection in the dynamic component.\n * @summary This injector is used when creating the dynamic component to provide it with\n * access to the application's dependency injection system. It ensures that the dynamically\n * created component can access the same services and dependencies as statically created\n * components.\n *\n * @type {EnvironmentInjector}\n * @memberOf ComponentRendererComponent\n */\n injector: EnvironmentInjector = inject(EnvironmentInjector);\n\n /**\n * @description Reference to the dynamically created component.\n * @summary This property holds a reference to the ComponentRef of the dynamically created\n * component. It's used to interact with the component instance, subscribe to its events,\n * and properly destroy it when the renderer is destroyed.\n *\n * @type {ComponentRef<unknown>}\n * @memberOf ComponentRendererComponent\n */\n component!: ComponentRef<unknown>;\n\n /**\n * @description Event emitter for events from the rendered component.\n * @summary This output property emits events that originate from the dynamically rendered\n * component. It allows the parent component to listen for and respond to events from the\n * dynamic component, creating a communication channel between the parent and the dynamically\n * rendered child.\n *\n * @type {EventEmitter<RendererCustomEvent>}\n * @memberOf ComponentRendererComponent\n */\n @Output()\n listenEvent: EventEmitter<RendererCustomEvent> =\n new EventEmitter<RendererCustomEvent>();\n\n /**\n * @description Logger instance for the component.\n * @summary This property holds a Logger instance specific to this component.\n * It's used to log information, warnings, and errors related to the component's\n * operations, particularly useful for debugging and monitoring the dynamic\n * component rendering process.\n *\n * @type {Logger}\n * @memberOf ComponentRendererComponent\n */\n logger!: Logger;\n\n /**\n * @description Repository model for data operations.\n * @summary The data model repository that this component will use for CRUD operations.\n * This provides a connection to the data layer for retrieving and manipulating data.\n *\n * @type {Model| undefined}\n */\n @Input()\n model!: Model | undefined;\n\n @Input()\n parent: undefined | KeyValue = undefined;\n\n\n @ViewChild('inner', { read: TemplateRef, static: true })\n inner?: TemplateRef<unknown>;\n\n /**\n * @description Creates an instance of ComponentRendererComponent.\n * @summary Initializes a new ComponentRendererComponent. This component doesn't require\n * any dependencies to be injected in its constructor as it uses the inject function to\n * obtain the EnvironmentInjector.\n *\n * @memberOf ComponentRendererComponent\n */\n constructor() {\n this.logger = getLogger(this);\n }\n\n /**\n * @description Initializes the component after Angular first displays the data-bound properties.\n * @summary Sets up the component by creating the dynamic component specified by the tag input.\n * This method is called once when the component is initialized and triggers the dynamic\n * component creation process with the provided tag name and global properties.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant C as ComponentRendererComponent\n * participant R as NgxRenderingEngine2\n *\n * A->>C: ngOnInit()\n * C->>C: createComponent(tag, globals)\n * C->>R: components(tag)\n * R-->>C: Return component constructor\n * C->>C: Process component inputs\n * C->>C: Create component instance\n * C->>C: subscribeEvents()\n *\n * @return {void}\n * @memberOf ComponentRendererComponent\n */\n ngOnInit(): void {\n if (!this.parent) {\n this.createComponent(this.tag, this.globals);\n } else {\n this.createParentComponent();\n }\n }\n\n /**\n * @description Cleans up resources when the component is destroyed.\n * @summary Performs cleanup operations when the component is being destroyed by Angular.\n * This includes unsubscribing from all event emitters of the dynamic component and\n * destroying the rendering engine instance to prevent memory leaks.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant C as ComponentRendererComponent\n * participant R as NgxRenderingEngine2\n *\n * A->>C: ngOnDestroy()\n * alt component exists\n * C->>C: unsubscribeEvents()\n * C->>R: destroy()\n * end\n *\n * @return {Promise<void>} A promise that resolves when cleanup is complete\n * @memberOf ComponentRendererComponent\n */\n async ngOnDestroy(): Promise<void> {\n if (this.component) {\n this.unsubscribeEvents();\n NgxRenderingEngine2.destroy();\n }\n }\n\n /**\n * @description Creates and renders a dynamic component.\n * @summary This method handles the creation of a dynamic component based on the provided tag.\n * It retrieves the component constructor from the rendering engine, processes its inputs,\n * filters out unmapped properties, creates the component instance, and sets up event subscriptions.\n *\n * @param {string} tag - The tag name of the component to create\n * @param {KeyValue} globals - Global properties to pass to the component\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant C as ComponentRendererComponent\n * participant R as NgxRenderingEngine2\n * participant V as ViewContainerRef\n *\n * C->>R: components(tag)\n * R-->>C: Return component constructor\n * C->>C: reflectComponentType(component)\n * C->>C: Process input properties\n * C->>C: Filter unmapped properties\n * C->>V: clear()\n * C->>R: createComponent(component, props, metadata, vcr, injector, [])\n * R-->>C: Return component reference\n * C->>C: subscribeEvents()\n *\n * @private\n * @memberOf ComponentRendererComponent\n */\n private createComponent(tag: string, globals: KeyValue = {}): void {\n const component = NgxRenderingEngine2.components(tag)\n ?.constructor as Type<unknown>;\n const metadata = reflectComponentType(component);\n const componentInputs = (metadata as ComponentMirror<unknown>).inputs;\n const props = globals?.['item'] || globals?.['props'] || {};\n if(props?.['tag'])\n delete props['tag'];\n const inputKeys = Object.keys(props);\n const unmappedKeys = [];\n\n for (const input of inputKeys) {\n if (!inputKeys.length) break;\n const prop = componentInputs.find(\n (item: { propName: string }) => item.propName === input,\n );\n if (!prop) {\n delete props[input];\n unmappedKeys.push(input);\n }\n }\n this.vcr.clear();\n this.component = NgxRenderingEngine2.createComponent(\n component,\n props,\n metadata as ComponentMirror<unknown>,\n this.vcr,\n this.injector as Injector,\n [],\n );\n this.subscribeEvents();\n }\n\n createParentComponent() {\n const { component, inputs } = this.parent as KeyValue;\n const metadata = reflectComponentType(component) as ComponentMirror<unknown>;\n const template = this.vcr.createEmbeddedView(this.inner as TemplateRef<unknown>, this.injector).rootNodes;\n this.component = NgxRenderingEngine2.createComponent(\n component,\n inputs,\n metadata,\n this.vcr,\n this.injector,\n template,\n );\n this.subscribeEvents();\n }\n\n /**\n * @description Subscribes to events emitted by the dynamic component.\n * @summary This method sets up subscriptions to all EventEmitter properties of the\n * dynamically created component. When an event is emitted by the dynamic component,\n * it is captured and re-emitted through the listenEvent output property with additional\n * metadata about the event source.\n *\n * @mermaid\n * sequenceDiagram\n * participant C as ComponentRendererComponent\n * participant D as Dynamic Component\n * participant P as Parent Component\n *\n * C->>C: subscribeEvents()\n * C->>D: Get instance properties\n * loop For each property\n * C->>C: Check if property is EventEmitter\n * alt is EventEmitter\n * C->>D: Subscribe to event\n * D-->>C: Event emitted\n * C->>P: Re-emit event with metadata\n * end\n * end\n *\n * @private\n * @return {void}\n * @memberOf ComponentRendererComponent\n */\n private subscribeEvents(): void {\n if (this.component) {\n const instance = this.component?.instance as KeyValue;\n const componentKeys = Object.keys(instance);\n for (const key of componentKeys) {\n const value = instance[key];\n if (value instanceof EventEmitter)\n (instance as KeyValue)[key].subscribe(\n (event: Partial<BaseCustomEvent>) => {\n this.listenEvent.emit({\n name: key,\n ...event,\n } as RendererCustomEvent);\n },\n );\n }\n }\n }\n\n /**\n * @description Unsubscribes from all events of the dynamic component.\n * @summary This method cleans up event subscriptions when the component is being destroyed.\n * It iterates through all properties of the dynamic component instance and unsubscribes\n * from any EventEmitter properties to prevent memory leaks and unexpected behavior after\n * the component is destroyed.\n *\n * @mermaid\n * sequenceDiagram\n * participant C as ComponentRendererComponent\n * participant D as Dynamic Component\n *\n * C->>C: unsubscribeEvents()\n * C->>D: Get instance properties\n * loop For each property\n * C->>C: Check if property is EventEmitter\n * alt is EventEmitter\n * C->>D: Unsubscribe from event\n * end\n * end\n *\n * @private\n * @return {void}\n * @memberOf ComponentRendererComponent\n */\n private unsubscribeEvents(): void {\n if (this.component) {\n const instance = this.component?.instance as KeyValue;\n const componentKeys = Object.keys(instance);\n for (const key of componentKeys) {\n const value = instance[key];\n if (value instanceof EventEmitter) instance[key].unsubscribe();\n }\n }\n }\n}\n","<ng-template #componentViewContainer></ng-template>\n\n<ng-template #inner>\n @if(parent?.children?.length) {\n @for(child of parent.children; track child) {\n @if(!child.children?.length) {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n } @else {\n <ngx-decaf-component-renderer [parent]=\"child\"> </ngx-decaf-component-renderer>\n }\n }\n }\n</ng-template>\n\n\n","import {\n Component,\n EventEmitter,\n inject,\n Injector,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { Model, sf } from '@decaf-ts/decorator-validation';\nimport { NgComponentOutlet } from '@angular/common';\nimport {\n AngularDynamicOutput,\n AngularEngineKeys,\n BaseComponentProps,\n BaseCustomEvent,\n NgxRenderingEngine2,\n RenderedModel,\n} from '../../engine';\nimport { KeyValue, RendererCustomEvent } from 'src/lib/engine/types';\nimport { ForAngularModule } from 'src/lib/for-angular.module';\nimport { Renderable } from '@decaf-ts/ui-decorators';\nimport { ComponentRendererComponent } from '../component-renderer/component-renderer.component';\n\n/**\n * @description Component for rendering dynamic models\n * @summary This component is responsible for dynamically rendering models,\n * handling model changes, and managing event subscriptions for the rendered components.\n * It uses the NgxRenderingEngine2 to render the models and supports both string and Model inputs.\n * @class\n * @template M - Type extending Model\n * @param {Injector} injector - Angular Injector for dependency injection\n * @example\n * <ngx-decaf-model-renderer\n * [model]=\"myModel\"\n * [globals]=\"globalVariables\"\n * (listenEvent)=\"handleEvent($event)\">\n * </ngx-decaf-model-renderer>\n * @mermaid\n * sequenceDiagram\n * participant App\n * participant ModelRenderer\n * participant RenderingEngine\n * participant Model\n * App->>ModelRenderer: Input model\n * ModelRenderer->>Model: Parse if string\n * Model-->>ModelRenderer: Parsed model\n * ModelRenderer->>RenderingEngine: Render model\n * RenderingEngine-->>ModelRenderer: Rendered output\n * ModelRenderer->>ModelRenderer: Subscribe to events\n * ModelRenderer-->>App: Emit events\n */\n@Component({\n standalone: true,\n imports: [ForAngularModule, NgComponentOutlet, ComponentRendererComponent],\n selector: 'ngx-decaf-model-renderer',\n templateUrl: './model-renderer.component.html',\n styleUrl: './model-renderer.component.scss',\n})\nexport class ModelRendererComponent<M extends Model>\n implements OnChanges, OnDestroy, RenderedModel {\n\n /**\n * @description Input model to be rendered\n * @summary Can be a Model instance or a JSON string representation of a model\n */\n @Input({ required: true })\n model!: M | string | undefined;\n\n /**\n * @description Global variables to be passed to the rendered component\n */\n @Input()\n globals: Record<string, unknown> = {};\n\n /**\n * @description Template reference for inner content\n */\n @ViewChild('inner', { read: TemplateRef, static: true })\n inner?: TemplateRef<unknown>;\n\n /**\n * @description Output of the rendered model\n */\n output?: AngularDynamicOutput;\n\n /**\n * @description Unique identifier for the renderer\n */\n @Input()\n rendererId?: string;\n\n /**\n * @description View container reference for dynamic component rendering\n */\n @ViewChild('componentOuter', { static: true, read: ViewContainerRef })\n vcr!: ViewContainerRef;\n\n /**\n * @description Event emitter for custom events from the rendered component\n */\n @Output()\n listenEvent = new EventEmitter<RendererCustomEvent>();\n\n /**\n * @description Instance of the NgxRenderingEngine2\n */\n private render!: NgxRenderingEngine2;\n\n /**\n * @description Instance of the rendered component\n */\n private instance!: KeyValue | undefined;\n\n private injector: Injector = inject(Injector);\n\n // constructor() {}\n\n /**\n * @description Refreshes the rendered model\n * @param {string | M} model - The model to be rendered\n */\n private refresh(model: string | M) {\n model =\n typeof model === 'string'\n ? (Model.build({}, model) as M)\n : model;\n this.output = (model as unknown as Renderable).render<AngularDynamicOutput>(\n this.globals || {},\n this.vcr,\n this.injector,\n this.inner,\n );\n if (this.output?.inputs)\n this.rendererId = sf(\n AngularEngineKeys.RENDERED_ID,\n (this.output.inputs as Record<string, unknown>)['rendererId'] as string,\n );\n this.instance = this.output?.instance;\n this.subscribeEvents();\n }\n\n /**\n * @description Lifecycle hook that is called when data-bound properties of a directive change\n * @param {SimpleChanges} changes - Object containing changes\n */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[BaseComponentProps.MODEL]) {\n const { currentValue } = changes[BaseComponentProps.MODEL];\n this.refresh(currentValue);\n }\n }\n\n /**\n * @description Lifecycle hook that is called when a directive, pipe, or service is destroyed\n * @return {Promise<void>}\n */\n async ngOnDestroy(): Promise<void> {\n if (this.instance) {\n this.unsubscribeEvents();\n await NgxRenderingEngine2.destroy();\n }\n this.output = undefined;\n }\n\n private subscribeEvents(): void {\n if (this.instance) {\n const componentKeys = Object.keys(this.instance);\n for (const key of componentKeys) {\n const value = this.instance[key];\n if (value instanceof EventEmitter)\n (this.instance as KeyValue)[key].subscribe((event: Partial<BaseCustomEvent>) => {\n this.listenEvent.emit({\n component: this.output?.component.name || '',\n name: key,\n ...event,\n } as RendererCustomEvent);\n });\n }\n }\n }\n\n /**\n * @description Unsubscribes from events emitted by the rendered component\n */\n private unsubscribeEvents(): void {\n if (this.instance) {\n const componentKeys = Object.keys(this.instance);\n for (const key of componentKeys) {\n const value = this.instance[key];\n if (value instanceof EventEmitter)\n this.instance[key].unsubscribe();\n }\n }\n }\n\n protected readonly JSON = JSON;\n}\n"," <ng-template #componentOuter></ng-template>\n <ng-template #inner>\n <div [id]=\"rendererId || null\">\n @for (child of output?.children; track child) {\n @if(child?.children?.length) {\n <ngx-decaf-component-renderer [parent]=\"child\" />\n } @else {\n <ng-container\n #childComponents\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n }\n }\n </div>\n </ng-template>\n","import { FieldProperties, RenderingError } from '@decaf-ts/ui-decorators';\nimport { KeyValue, PossibleInputTypes } from './types';\nimport { CrudOperations, InternalError, OperationKeys } from '@decaf-ts/db-decorators';\nimport { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';\nimport { ElementRef, inject } from '@angular/core';\nimport { NgxFormService } from './NgxFormService';\nimport { sf } from '@decaf-ts/decorator-validation';\nimport { TranslateService } from '@ngx-translate/core';\n\n/**\n * @class NgxCrudFormField\n * @implements {FieldProperties}\n * @implements {ControlValueAccessor}\n * @summary Abstract class representing a CRUD form field for Angular applications\n * @description This class provides the base implementation for CRUD form fields in Angular,\n * implementing both CrudFormField and ControlValueAccessor interfaces.\n */\nexport abstract class NgxCrudFormField implements ControlValueAccessor, FieldProperties {\n /**\n * @summary Reference to the component's element\n * @description ElementRef representing the component's native element\n */\n component!: ElementRef;\n\n /**\n * @summary Current CRUD operation\n * @description Represents the current CRUD operation being performed\n */\n operation!: CrudOperations;\n\n /**\n * @summary Form group for the field\n * @description Angular FormGroup instance for the field\n */\n formGroup!: FormGroup | undefined;\n\n formControl!: FormControl;\n\n name!: string;\n\n path!: string;\n\n childOf?: string;\n\n type!: PossibleInputTypes;\n\n disabled?: boolean;\n\n // Validation\n\n format?: string;\n hidden?: boolean;\n max?: number | Date;\n maxlength?: number;\n min?: number | Date;\n minlength?: number;\n pattern?: string | undefined;\n readonly?: boolean;\n required?: boolean;\n step?: number;\n equals?: string;\n different?: string;\n lessThan?: string;\n lessThanOrEqual?: string;\n greaterThan?: string;\n greaterThanOrEqual?: string;\n\n value!: string | number | Date;\n\n private translateService = inject(TranslateService);\n\n /**\n * @summary Parent HTML element\n * @description Reference to the parent HTML element of the field\n */\n protected parent?: HTMLElement;\n\n // protected constructor() {}\n\n /**\n * @summary String formatting function\n * @description Provides access to the sf function for error message formatting\n * @prop {function(string, ...string): string} sf - String formatting function\n */\n sf = sf;\n\n /**\n * @summary Change callback function\n * @description Function called when the field value changes\n * @property {function(): unknown} onChange - onChange event handler\n */\n onChange: () => unknown = () => {};\n\n /**\n * @summary Touch callback function\n * @description Function called when the field is touched\n * @property {function(): unknown} onTouch - onTouch event handler\n */\n onTouch: () => unknown = () => {};\n\n /**\n * @summary Write value to the field\n * @description Sets the value of the field\n * @param {string} obj - The value to be set\n */\n writeValue(obj: string): void {\n this.value = obj;\n }\n\n /**\n * @summary Register change callback\n * @description Registers a function to be called when the field value changes\n * @param {function(): unknown} fn - The function to be called on change\n */\n registerOnChange(fn: () => unknown): void {\n this.onChange = fn;\n }\n\n /**\n * @summary Register touch callback\n * @description Registers a function to be called when the field is touched\n * @param {function(): unknown} fn - The function to be called on touch\n */\n registerOnTouched(fn: () => unknown): void {\n this.onTouch = fn;\n }\n\n /**\n * @summary Set disabled state\n * @description Sets the disabled state of the field\n * @param {boolean} isDisabled - Whether the field should be disabled\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * @summary After view initialization logic\n * @description Performs necessary setup after the view has been initialized\n * @returns {HTMLElement} The parent element of the field\n */\n afterViewInit(): HTMLElement {\n let parent: HTMLElement;\n switch (this.operation) {\n case OperationKeys.READ:\n case OperationKeys.DELETE:\n return this.component.nativeElement.parentElement;\n case OperationKeys.CREATE:\n case OperationKeys.UPDATE:\n try {\n parent = NgxFormService.getParentEl(this.component.nativeElement, 'div');\n } catch (e: unknown) {\n throw new RenderingError(`Unable to retrieve parent form element for the ${this.operation}: ${e instanceof Error ? e.message : e}`);\n }\n // NgxFormService.register(parent.id, this.formGroup, this as AngularFieldDefinition);\n return parent;\n default:\n throw new InternalError(`Invalid operation: ${this.operation}`);\n }\n }\n\n /**\n * @summary Cleanup on component destruction\n * @description Unregisters the field when the component is destroyed\n */\n onDestroy(): void {\n if(this.formGroup)\n NgxFormService.unregister(this.formGroup);\n }\n\n /**\n * @summary Get field errors\n * @description Retrieves all errors associated with the field\n * @returns {string|void} An array of error objects\n */\n getErrors(parent: HTMLElement): string | void {\n const formControl = this.formControl;\n if((!formControl.pristine || formControl.touched) && !formControl.valid) {\n const collapsableContainer = parent.closest('ion-accordion-group');\n if(collapsableContainer)\n collapsableContainer.setAttribute('value', 'open');\n const errors: Record<string, string>[] = Object.keys(formControl.errors ?? {}).map(key => ({\n key: key,\n message: key,\n }));\n for(const error of errors)\n return `* ${this.sf(this.translateService.instant(`errors.${error?.['message']}`), (this as KeyValue)[error?.['key']] ?? \"\")}`;\n }\n }\n}\n","import {\n AfterViewInit,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { AutocompleteTypes, SelectInterface } from '@ionic/core';\nimport { CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';\nimport { NgxCrudFormField } from '../../engine/NgxCrudFormField';\nimport { Dynamic } from '../../engine/decorators';\nimport { FieldUpdateMode, PossibleInputTypes, RadioOption, SelectOption, StringOrBoolean } from '../../engine/types';\nimport { ForAngularModule } from 'src/lib/for-angular.module';\nimport {\n IonCheckbox,\n IonInput,\n IonItem,\n IonLabel,\n IonRadio,\n IonRadioGroup,\n IonSelect,\n IonSelectOption,\n IonText,\n IonTextarea,\n} from '@ionic/angular/standalone';\nimport { HTML5InputTypes } from '@decaf-ts/ui-decorators';\n\n/**\n * @description A dynamic form field component for CRUD operations.\n * @summary The CrudFieldComponent is a versatile form field component that adapts to different\n * input types and CRUD operations. It extends NgxCrudFormField to inherit form handling capabilities\n * and implements lifecycle hooks to properly initialize, render, and clean up. This component\n * supports various input types (text, number, date, select, etc.), validation rules, and styling\n * options, making it suitable for building dynamic forms for create, read, update, and delete\n * operations.\n *\n * @param {CrudOperations} operation - The CRUD operation being performed (create, read, update, delete)\n * @param {string} name - The field name, used as form control identifier\n * @param {PossibleInputTypes} type - The input type (text, number, date, select, etc.)\n * @param {string|number|Date} value - The initial value of the field\n * @param {boolean} disabled - Whether the field is disabled\n * @param {string} label - The display label for the field\n * @param {string} placeholder - Placeholder text when field is empty\n * @param {string} format - Format pattern for the field value\n * @param {boolean} hidden - Whether the field should be hidden\n * @param {number|Date} max - Maximum allowed value\n * @param {number} maxlength - Maximum allowed length\n * @param {number|Date} min - Minimum allowed value\n * @param {number} minlength - Minimum allowed length\n * @param {string} pattern - Validation pattern\n * @param {boolean} readonly - Whether the field is read-only\n * @param {boolean} required - Whether the field is required\n * @param {number} step - Step value for number inputs\n * @param {FormGroup} formGroup - The parent form group\n * @param {StringOrBoolean} translatable - Whether field labels should be translated\n *\n * @component CrudFieldComponent\n * @example\n * <ngx-decaf-crud-field\n * operation=\"create\"\n * name=\"firstName\"\n * type=\"text\"\n * label=\"<NAME>\"\n * placeholder=\"<NAME>\"\n * [value]=\"model.firstName\"\n * [disabled]=\"model.readOnly\">\n *\n *\n * @memberOf module:for-angular\n */\n@Dynamic()\n@Component({\n standalone: true,\n imports: [\n ForAngularModule,\n IonInput,\n IonItem,\n IonCheckbox,\n IonRadioGroup,\n IonRadio,\n IonSelect,\n IonSelectOption,\n IonLabel,\n IonText,\n IonTextarea,\n\n ],\n selector: 'ngx-decaf-crud-field',\n templateUrl: './crud-field.component.html',\n styleUrl: './crud-field.component.scss',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnDestroy, AfterViewInit {\n\n /**\n * @description The CRUD operation being performed.\n * @summary Specifies which CRUD operation (Create, Read, Update, Delete) the field is being used for.\n * This affects how the field behaves and is rendered. For example, fields might be read-only in\n * 'read' mode but editable in 'create' or 'update' modes.\n *\n * @type {CrudOperations}\n * @memberOf CrudFieldComponent\n */\n @Input({ required: true })\n override operation!: CrudOperations;\n\n /**\n * @summary The flat field name used as the form control identifier in immediate parent FormGroup.\n * @description\n * Specifies the name of the field, which is used as the FormControl identifier in immediate parent FormGroup.\n * This value must be unique within the immediate parent FormGroup context and should not contain dots or nesting.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input({ required: true })\n override name!: string;\n\n\n /**\n * @summary The full field path used for form control resolution.\n * @description Specifies the hierarchical path of the field, used to resolve its location within the parent FormGroup (or nested FormGroups).\n * It is used as the identifier in the rendered HTML, and may include nesting (e.g., 'address.billing.street') and\n * should match the structure of the data model\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input({ required: true })\n override path!: string;\n\n /**\n * @description The parent field path, if this field is nested.\n * @summary Specifies the full dot-delimited path of the parent field. This is only set when the field is nested.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override childOf: string = '';\n\n /**\n * @description The input type of the field.\n * @summary Defines the type of input to render, such as text, number, date, select, etc.\n * This determines which Ionic form component will be used to render the field and how\n * the data will be formatted and validated.\n *\n * @type {PossibleInputTypes}\n * @memberOf CrudFieldComponent\n */\n @Input({ required: true })\n override type!: PossibleInputTypes;\n\n /**\n * @description The initial value of the field.\n * @summary Sets the initial value of the form field. This can be a string, number, or Date\n * depending on the field type. For select fields, this should match one of the option values.\n *\n * @type {string | number | Date}\n * @default ''\n * @memberOf CrudFieldComponent\n */\n @Input()\n override value: string | number | Date = '';\n\n /**\n * @description Whether the field is disabled.\n * @summary When true, the field will be rendered in a disabled state, preventing user interaction.\n * Disabled fields are still included in the form model but cannot be edited by the user.\n *\n * @type {boolean}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override disabled?: boolean;\n\n /**\n * @description The display label for the field.\n * @summary The text label displayed alongside the field to identify it to the user.\n * This label can be translated if the translatable property is set to true.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input({ required: true })\n label!: string;\n\n /**\n * @description Placeholder text when field is empty.\n * @summary Text that appears in the input when it has no value. This provides a hint to the user\n * about what kind of data is expected. The placeholder disappears when the user starts typing.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n placeholder!: string;\n\n /**\n * @description Format pattern for the field value.\n * @summary Specifies a format pattern for the field value, which can be used for date formatting,\n * number formatting, or other type-specific formatting requirements.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override format?: string;\n\n /**\n * @description Whether the field should be hidden.\n * @summary When true, the field will not be visible in the UI but will still be part of the form model.\n * This is useful for fields that need to be included in form submission but should not be displayed to the user.\n *\n * @type {boolean}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override hidden?: boolean;\n\n /**\n * @description Maximum allowed value for the field.\n * @summary For number inputs, this sets the maximum allowed numeric value.\n * For date inputs, this sets the latest allowed date.\n *\n * @type {number | Date}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override max?: number | Date;\n\n /**\n * @description Maximum allowed length for text input.\n * @summary For text inputs, this sets the maximum number of characters allowed.\n * This is used for validation and may also be used to limit input in the UI.\n *\n * @type {number}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override maxlength?: number;\n\n /**\n * @description Minimum allowed value for the field.\n * @summary For number inputs, this sets the minimum allowed numeric value.\n * For date inputs, this sets the earliest allowed date.\n *\n * @type {number | Date}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override min?: number | Date;\n\n /**\n * @description Minimum allowed length for text input.\n * @summary For text inputs, this sets the minimum number of characters required.\n * This is used for validation to ensure the input meets a minimum length requirement.\n *\n * @type {number}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override minlength?: number;\n\n /**\n * @description Validation pattern for text input.\n * @summary A regular expression pattern used to validate text input.\n * The input value must match this pattern to be considered valid.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override pattern?: string;\n\n /**\n * @description Whether the field is read-only.\n * @summary When true, the field will be rendered in a read-only state. Unlike disabled fields,\n * read-only fields are still focusable but cannot be modified by the user.\n *\n * @type {boolean}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override readonly?: boolean;\n\n /**\n * @description Whether the field is required.\n * @summary When true, the field must have a value for the form to be valid.\n * Required fields are typically marked with an indicator in the UI.\n *\n * @type {boolean}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override required?: boolean;\n\n /**\n * @description Step value for number inputs.\n * @summary For number inputs, this sets the increment/decrement step when using\n * the up/down arrows or when using a range slider.\n *\n * @type {number}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override step?: number;\n\n /**\n * @description Field name for equals comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override equals?: string;\n\n /**\n * @description Field name for different comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override different?: string;\n\n /**\n * @description Field name for less than comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override lessThan?: string;\n\n /**\n * @description Field name for less than or equal comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override lessThanOrEqual?: string;\n\n /**\n * @description Field name for greater than comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override greaterThan?: string;\n\n /**\n * @description Field name for greater than or equal comparison.\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override greaterThanOrEqual?: string;\n\n /**\n * @description Number of columns for textarea inputs.\n * @summary For textarea inputs, this sets the visible width of the text area in average character widths.\n * This is used alongside rows to define the dimensions of the textarea.\n *\n * @type {number}\n * @memberOf CrudFieldComponent\n */\n @Input()\n cols?: number;\n\n /**\n * @description Number of rows for textarea inputs.\n * @summary For textarea inputs, this sets the visible height of the text area in lines of text.\n * This is used alongside cols to define the dimensions of the textarea.\n *\n * @type {number}\n * @memberOf CrudFieldComponent\n */\n @Input()\n rows?: number;\n\n /**\n * @description Alignment of the field content.\n * @summary Controls the horizontal alignment of the field content.\n * This affects how the content is positioned within the field container.\n *\n * @type {'start' | 'center'}\n * @memberOf CrudFieldComponent\n */\n @Input()\n alignment?: 'start' | 'center';\n\n /**\n * @description Initial checked state for checkbox or toggle inputs.\n * @summary For checkbox or toggle inputs, this sets the initial checked state.\n * When true, the checkbox or toggle will be initially checked.\n *\n * @type {boolean}\n * @memberOf CrudFieldComponent\n */\n @Input()\n checked?: boolean;\n\n /**\n * @description Justification of items within the field.\n * @summary Controls how items are justified within the field container.\n * This is particularly useful for fields with multiple elements, such as radio groups.\n *\n * @type {'start' | 'end' | 'space-between'}\n * @memberOf CrudFieldComponent\n */\n @Input()\n justify?: 'start' | 'end' | 'space-between';\n\n /**\n * @description Text for the cancel button in select inputs.\n * @summary For select inputs with a cancel button, this sets the text displayed on the cancel button.\n * This is typically used in select dialogs to provide a way for users to dismiss the selection without making a change.\n *\n * @type {string}\n * @memberOf CrudFieldComponent\n */\n @Input()\n cancelText?: string;\n\n /**\n * @description Interface style for select inputs.\n * @summary Specifies the interface style for select inputs, such as 'alert', 'action-sheet', or 'popover'.\n * This determines how the select options are presented to the user.\n *\n * @type {SelectInterface}\n * @memberOf CrudFieldComponent\n */\n @Input()\n interface: SelectInterface = 'popover';\n\n /**\n * @description Options for select or radio inputs.\n * @summary Provides the list of options for select or radio inputs. Each option can have a value and a label.\n * This is used to populate the dropdown or radio group with choices.\n *\n * @type {SelectOption[] | RadioOption[]}\n * @memberOf CrudFieldComponent\n */\n @Input()\n options!: SelectOption[] | RadioOption[];\n\n /**\n * @description Mode of the field.\n * @summary Specifies the visual mode of the field, such as 'ios' or 'md'.\n * This affects the styling and appearance of the field to match the platform style.\n *\n * @type {'ios' | 'md'}\n * @memberOf CrudFieldComponent\n */\n @Input()\n mode?: 'ios' | 'md';\n\n /**\n * @description Spellcheck attribute for text inputs.\n * @summary Enables or disables spellchecking for text inputs.\n * When true, the browser will check the spelling of the input text.\n *\n * @type {boolean}\n * @default false\n * @memberOf CrudFieldComponent\n */\n @Input()\n spellcheck: boolean = false;\n\n /**\n * @description Input mode for text inputs.\n * @summary Hints at the type of data that might be entered by the user while editing the element.\n * This can affect the virtual keyboard layout on mobile devices.\n *\n * @type {'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'}\n * @default 'none'\n * @memberOf CrudFieldComponent\n */\n @Input()\n inputmode:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search' = 'none';\n\n /**\n * @description Autocomplete behavior for the field.\n * @summary Specifies whether and how the browser should automatically complete the input.\n * This can improve user experience by suggesting previously entered values.\n *\n * @type {AutocompleteTypes}\n * @default 'off'\n * @memberOf CrudFieldComponent\n */\n @Input()\n autocomplete: AutocompleteTypes = 'off';\n\n /**\n * @description Fill style for the field.\n * @summary Determines the fill style of the field, such as 'outline' or 'solid'.\n * This affects the border and background of the field.\n *\n * @type {'outline' | 'solid'}\n * @default 'outline'\n * @memberOf CrudFieldComponent\n */\n @Input()\n fill: 'outline' | 'solid' = 'outline';\n\n /**\n * @description Placement of the label relative to the field.\n * @summary Specifies where the label should be placed relative to the field.\n * Options include 'start', 'end', 'floating', 'stacked', and 'fixed'.\n *\n * @type {'start' | 'end' | 'floating' | 'stacked' | 'fixed'}\n * @default 'floating'\n * @memberOf CrudFieldComponent\n */\n @Input()\n labelPlacement: 'start' | 'end' | 'floating' | 'stacked' | 'fixed' =\n 'floating';\n\n /**\n * @description Update mode for the field.\n * @summary Determines when the field value should be updated in the form model.\n * Options include 'change', 'blur', and 'submit'.\n *\n * @type {FieldUpdateMode}\n * @default 'change'\n * @memberOf CrudFieldComponent\n */\n @Input()\n updateOn: FieldUpdateMode = 'change';\n\n /**\n * @description Reference to the field component.\n * @summary Provides a reference to the field component element, allowing direct access to its properties and methods.\n *\n * @type {ElementRef}\n * @memberOf CrudFieldComponent\n */\n @ViewChild('component', { read: ElementRef })\n override component!: ElementRef;\n\n /**\n * @description Parent form group.\n * @summary References the parent form group to which this field belongs.\n * This is necessary for integrating the field with Angular's reactive forms.\n *\n * @type {FormGroup}\n * @memberOf CrudFieldComponent\n */\n @Input()\n override formGroup: FormGroup | undefined;\n\n @Input()\n override formControl!: FormControl;\n\n /**\n * @description Translatability of field labels.\n * @summary Indicates whether the field labels should be translated based on the current language settings.\n * This is useful for applications supporting multiple languages.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf CrudFieldComponent\n */\n @Input()\n translatable: StringOrBoolean = true;\n\n /**\n * @description Unique identifier for the current record.\n * @summary A unique identifier for the current record being displayed or manipulated.\n * This is typically used in conjunction with the primary key for operations on specific records.\n *\n * @type {string | number}\n */\n @Input()\n uid!: string | number | undefined;\n\n // constructor() {\n\n // }\n\n ngOnInit(): void {\n // super.onInit(this.updateOn);\n if ([OperationKeys.READ, OperationKeys.DELETE].includes(this.operation)) {\n this.formGroup = undefined;\n } else {\n if (this.type === HTML5InputTypes.RADIO && !this.value)\n this.formGroup?.get(this.name)?.setValue(this.options[0].value); // TODO: migrate to RenderingEngine\n }\n\n }\n\n ngAfterViewInit() {\n if ([OperationKeys.READ, OperationKeys.DELETE].includes(this.operation))\n super.afterViewInit();\n }\n\n ngOnDestroy(): void {\n if ([OperationKeys.READ, OperationKeys.DELETE].includes(this.operation))\n this.onDestroy();\n }\n}\n","@if(operation === 'read' || operation === 'delete') {\n <ng-container #component>\n <div [class]=\"'dcf-input-item ' + operation\">\n <ion-item>\n <ion-label>\n {{ label | translate }}<br />\n @if(value) {\n <ion-text [innerHTML]=\"type === 'password' ? '********' : value\"></ion-text>\n } @else {\n <br />\n }\n </ion-label>\n </ion-item>\n </div>\n </ng-container>\n} @else {\n <ng-container #component [formGroup]=\"formGroup\">\n <div #container [class]=\"'dcf-input-item ' + (operation || 'create')\">\n @if(type === 'textarea') {\n <ion-textarea\n [mode]=\"mode\"\n [hidden]=\"hidden\"\n [required]=\"required !== undefined ? required : null\"\n [minlength]=\"minlength !== undefined ? minlength : null\"\n [maxlength]=\"maxlength !== undefined ? maxlength : null\"\n [readonly]=\"readonly !== undefined ? readonly : null\"\n [inputmode]=\"inputmode\"\n [spellcheck]=\"spellcheck\"\n [rows]=\"rows\"\n [labelPlacement]=\"labelPlacement\"\n [value]=\"value\"\n [fill]=\"fill\"\n [errorText]=\"getErrors(container)\"\n [placeholder]=\"translatable ? (placeholder | translate) : placeholder\"\n [formControlName]=\"name\"\n [label]=\"translatable ? (label | translate) : label\"\n >\n </ion-textarea>\n }\n @else if(type === 'checkbox') {\n <ion-item>\n <ion-checkbox\n #checkboxElement\n [name]=\"path\"\n [mode]=\"mode\"\n [errorText]=\"getErrors(container)\"\n [hidden]=\"hidden\"\n [labelPlacement]=\"labelPlacement\"\n [justify]=\"justify\"\n [value]=\"value\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n (ionChange)=\"checked = !checked\"\n [formControlName]=\"name\"\n >\n <span [innerHTML]=\"label | translate\"></span>\n </ion-checkbox>\n </ion-item>\n }\n @else if(type === 'radio') {\n <ion-radio-group [formControlName]=\"name\" [name]=\"path\" [value]=\"value\" #component>\n <label class=\"dcf-radio-group-label\" [for]=\"path\">{{label | translate}}</label>\n @for(option of options; track option) {\n <ion-item>\n <ion-radio\n [errorText]=\"getErrors(container)\"\n [mode]=\"mode\"\n [hidden]=\"hidden\"\n [labelPlacement]=\"labelPlacement\"\n [alignment]=\"alignment\"\n [justify]=\"justify\"\n [readonly]=\"readonly\"\n [value]=\"option.value\"\n >{{ translatable ? (option?.text | translate) : option?.text }}</ion-radio>\n </ion-item>\n }\n </ion-radio-group>\n }\n @else if(type === 'select') {\n <ion-select\n [name]=\"path\"\n [mode]=\"mode\"\n [hidden]=\"hidden\"\n [labelPlacement]=\"labelPlacement\"\n [label]=\"translatable ? (label | translate) : label\"\n [value]=\"value\"\n [fill]=\"fill\"\n [placeholder]=\"translatable ? (placeholder | translate) : placeholder\"\n [formControlName]=\"name\"\n [errorText]=\"getErrors(container)\"\n [interface]=\"interface\">\n @for(option of options; track option.value) {\n <ion-select-option [value]=\"option.value\">\n {{ translatable ? (option.text | translate) : options.text }}\n </ion-select-option>\n }\n </ion-select>\n }\n @else {\n <ion-input\n [name]=\"path\"\n [type]=\"type\"\n [mode]=\"mode\"\n [hidden]=\"hidden\"\n [inputmode]=\"inputmode\"\n [labelPlacement]=\"labelPlacement\"\n [required]=\"required !== undefined ? required : false\"\n [minlength]=\"minlength !== undefined ? minlength : null\"\n [maxlength]=\"maxlength !== undefined ? maxlength : null\"\n [readonly]=\"readonly !== undefined ? readonly : null\"\n [max]=\"max !== undefined ? max : null\"\n [min]=\"min !== undefined ? min : null\"\n [pattern]=\"pattern !== undefined ? pattern : null\"\n [step]=\"step !== undefined ? step : null\"\n [fill]=\"fill\"\n [placeholder]=\"translatable ? (placeholder | translate) : placeholder\"\n [formControlName]=\"name\"\n [errorText]=\"getErrors(container)\"\n [label]=\"translatable ? (label | translate) : label\">\n </ion-input>\n }\n </div>\n </ng-container>\n}\n\n","import { CrudFormOptions } from './types';\n\nexport const CssClasses = {\n BUTTONS_CONTAINER: 'buttons-container',\n};\n\nexport const DefaultFormReactiveOptions: CrudFormOptions = {\n buttons: {\n submit: {\n text: 'Submit',\n },\n clear: {\n text: 'Clear',\n },\n },\n};\n","import {\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { Location } from '@angular/common';\nimport { FormGroup } from '@angular/forms';\nimport { FormElement } from '../../interfaces';\nimport { NgxFormService } from '../../engine/NgxFormService';\nimport { CrudFormEvent, Dynamic, EventConstants, FieldUpdateMode, HTMLFormTarget, RenderedModel } from '../../engine';\nimport { CrudFormOptions } from './types';\nimport { CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';\nimport { DefaultFormReactiveOptions } from './constants';\nimport { ForAngularModule, getLogger } from 'src/lib/for-angular.module';\nimport { IonIcon } from '@ionic/angular/standalone';\nimport { Model } from '@decaf-ts/decorator-validation';\nimport { Logger } from '@decaf-ts/logging';\n\n\n/**\n * @component CrudFormComponent\n * @example <ngx-decaf-crud-form\n * action=\"create\"\n * operation=\"create\"\n * formGroup=\"formGroup\"\n * rendererId=\"rendererId\"\n * submitEvent=\"submitEvent\"\n * target=\"_self\"\n * method=\"event\">\n * </ngx-decaf-crud-form>\n *\n * @param {string} action - The action to be performed (create, read, update, delete)\n * @param {CrudOperations} operation - The CRUD operation being performed (create, read, update, delete)\n * @param {FormGroup} formGroup - The form group\n * @param {string} rendererId - The renderer id\n * @param {SubmitEvent} submitEvent - The submit event\n * @param {string} target - The target\n * @param {string} method - The method\n */\n@Dynamic()\n@Component({\n standalone: true,\n selector: 'ngx-decaf-crud-form',\n templateUrl: './crud-form.component.html',\n styleUrls: ['./crud-form.component.scss'],\n imports: [ForAngularModule, IonIcon],\n})\nexport class CrudFormComponent implements OnInit, FormElement, OnDestroy, RenderedModel {\n\n /**\n * @description Repository model for data operations.\n * @summary The data model repository that this component will use for CRUD operations.\n * This provides a connection to the data layer for retrieving and manipulating data.\n *\n * @type {Model| undefined}\n */\n @Input()\n model!: Model | undefined;\n\n @Input()\n updateOn: FieldUpdateMode = 'change';\n\n @ViewChild('reactiveForm', { static: false, read: ElementRef })\n component!: ElementRef;\n\n @Input()\n target: HTMLFormTarget = '_self';\n\n @Input()\n method: 'get' | 'post' | 'event' = 'event';\n\n @Input()\n options!: CrudFormOptions;\n\n @Input()\n action?: string;\n\n @Input({ required: true })\n operation!: CrudOperations;\n\n @Input()\n handlers!: Record<string, (...args: unknown[]) => unknown | Promise<unknown>>;\n\n @Input()\n formGroup!: FormGroup | undefined;\n\n /**\n * @description Path to the parent FormGroup, if nested.\n * @summary Full dot-delimited path of the parent FormGroup. Set only when is part of a nested structure.\n *\n * @type {string}\n * @memberOf CrudFormComponent\n */\n @Input()\n childOf?: string;\n\n @Input()\n rendererId!: string;\n\n /**\n * @description Unique identifier for the current record.\n * @summary A unique identifier for the current record being displayed or manipulated.\n * This is typically used in conjunction with the primary key for operations on specific records.\n *\n * @type {string | number}\n */\n @Input()\n uid!: string | number | undefined;\n\n\n @Output()\n submitEvent = new EventEmitter<CrudFormEvent>();\n\n /**\n * @description Logger instance for the component.\n * @summary Provides logging capabilities for the component, allowing for consistent\n * and structured logging of information, warnings, and errors. This logger is initialized\n * in the ngOnInit method using the getLogger function from the ForAngularModule.\n *\n * The logger is used throughout the component to record important events, debug information,\n * and potential issues. It helps in monitoring the component's behavior, tracking the flow\n * of operations, and facilitating easier debugging and maintenance.\n *\n * @type {Logger}\n * @private\n * @memberOf CrudFormComponent\n */\n private logger!: Logger;\n\n /**\n * @description Angular Location service.\n * @summary Injected service that provides access to the browser's URL and history.\n * This service is used for interacting with the browser's history API, allowing\n * for back navigation and URL manipulation outside of Angular's router.\n *\n * @private\n * @type {Location}\n * @memberOf CrudFormComponent\n */\n private location: Location = inject(Location);\n\n // ngAfterViewInit() {\n // if (![OperationKeys.READ, OperationKeys.DELETE].includes(this.operation))\n // NgxFormService.formAfterViewInit(this, this.rendererId);\n // }\n\n async ngOnInit() {\n if (!this.logger)\n this.logger = getLogger(this);\n if (this.operation === OperationKeys.READ || this.operation === OperationKeys.DELETE)\n this.formGroup = undefined;\n this.options = Object.assign(\n {},\n DefaultFormReactiveOptions,\n this.options || {},\n );\n\n }\n\n ngOnDestroy() {\n if (this.formGroup)\n NgxFormService.unregister(this.formGroup);\n }\n\n /**\n * @param {SubmitEvent} event\n */\n async submit(event: SubmitEvent): Promise<boolean | void> {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n\n if (!NgxFormService.validateFields(this.formGroup as FormGroup))\n return false;\n\n const data = NgxFormService.getFormData(this.formGroup as FormGroup);\n this.submitEvent.emit({\n data,\n component: 'CrudFormComponent',\n name: this.action || EventConstants.SUBMIT_EVENT,\n handlers: this.handlers,\n });\n }\n\n handleReset() {\n this.location.back();\n // if(OperationKeys.DELETE !== this.operation)\n // NgxFormService.reset(this.formGroup);\n // else\n // this.location.back();\n }\n\n handleDelete() {\n this.submitEvent.emit({\n data: this.uid,\n component: 'CrudFormComponent',\n name: EventConstants.SUBMIT_EVENT,\n });\n }\n\n protected readonly OperationKeys = OperationKeys;\n}\n","@if(operation !== 'read' && operation !== 'delete') {\n <form #reactiveForm [id]=\"rendererId\" [formGroup]=\"formGroup\" (submit)=\"submit($event)\" novalidate [target]=\"target\">\n <ng-content #formContent></ng-content>\n <div class=\"dcf-flex dcf-flex-right\">\n <div>\n @if(options.buttons.clear) {\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if(options.buttons.clear?.icon) {\n <ion-icon aria-hidden=\"true\" [slot]=\"options.buttons.clear?.iconSlot\" [name]=\"options.buttons.clear?.icon\"></ion-icon>\n }\n {{operation === 'update' ? 'Back' : options.buttons.clear?.text}}\n </ion-button>\n }\n\n <ion-button\n type=\"submit\">\n @if(options.buttons.submit.icon) {\n <ion-icon aria-hidden=\"true\" [slot]=\"options.buttons.submit.iconSlot\" [name]=\"options.buttons.submit.icon\"></ion-icon>\n }\n {{ action ? action : options.buttons.submit.text}}\n </ion-button>\n </div>\n </div>\n </form>\n} @else {\n <div [class]=\"'dcf-flex dcf-flex-right ' + operation\" id=\"dcf-buttons-container\">\n <div>\n @if(options.buttons.clear) {\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if(options.buttons.clear?.icon) {\n <ion-icon aria-hidden=\"true\" [slot]=\"options.buttons.clear?.iconSlot\" [name]=\"options.buttons.clear?.icon\"></ion-icon>\n }\n {{ ['delete', 'read', 'update'].includes(operation) ? 'Back' : options.buttons.clear?.text}}\n </ion-button>\n }\n @if(operation === 'delete' && uid) {\n <ion-button\n (click)=\"handleDelete()\"\n color=\"danger\"\n type=\"button\">\n @if(options.buttons.submit.icon) {\n <ion-icon aria-hidden=\"true\" [slot]=\"options.buttons.submit.iconSlot\" [name]=\"options.buttons.submit.icon\"></ion-icon>\n }\n Delete\n </ion-button>\n }\n @if(operation === OperationKeys.CREATE || operation === OperationKeys.UPDATE) {\n <ion-button\n type=\"submit\">\n @if(options.buttons.submit.icon) {\n <ion-icon aria-hidden=\"true\" [slot]=\"options.buttons.submit.iconSlot\" [name]=\"options.buttons.submit.icon\"></ion-icon>\n }\n {{options.buttons.submit.text}}\n </ion-button>\n }\n\n </div>\n </div>\n}\n\n","import '@decaf-ts/ui-decorators';\nexport * from './components/model-renderer/model-renderer.component';\nexport * from './components/crud-field/crud-field.component';\nexport * from './components/crud-form/crud-form.component';\nexport * from './engine';\n\n/**\n * @description Angular integration for the Decaf framework\n * @summary This module provides Angular components and services for integrating with the Decaf framework.\n * It includes components for rendering models, CRUD operations, and form handling, as well as\n * rendering engines and utility functions to facilitate Angular application development with Decaf.\n * @module for-angular\n */\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-apis';\n"],"names":["NgxRenderingEngine2","i1"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;AAmBG;AACU,MAAA,iBAAiB,GAAG;AAC/B,IAAA,OAAO,EAAE,CAAA,EAAG,MAAM,CAAC,OAAO,CAAW,SAAA,CAAA;AACrC,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,UAAU,EAAE,aAAa;AACzB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,qBAAqB,EAAE;;AAGzB;;;;;;;;;AASG;AACU,MAAA,aAAa,GAAG;AAC3B,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,OAAO,EAAE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iB,GAAA,UAAA,CAAA;AAR7B,IAAA,OAAO;AAQK,CAAA,EAAA,iBAAiB,CA0J7B;4FA1JY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,qBAAqB,EAAA,OAAA,EAGtB,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,k6EAAA,EAAA,MAAA,EAAA,CAAA,6DAAA,CAAA,EAAA;8BAYpC,KAAK,EAAA,CAAA;sBADJ;gBAID,QAAQ,EAAA,CAAA;sBADP;gBAID,SAAS,EAAA,CAAA;sBADR,SAAS;uBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE;gBAI9D,MAAM,EAAA,CAAA;sBADL;gBAID,MAAM,EAAA,CAAA;sBADL;gBAID,OAAO,EAAA,CAAA;sBADN;gBAID,MAAM,EAAA,CAAA;sBADL;gBAID,SAAS,EAAA,CAAA;sBADR,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAIzB,QAAQ,EAAA,CAAA;sBADP;gBAID,SAAS,EAAA,CAAA;sBADR;gBAWD,OAAO,EAAA,CAAA;sBADN;gBAID,UAAU,EAAA,CAAA;sBADT;gBAWD,GAAG,EAAA,CAAA;sBADF;gBAKD,WAAW,EAAA,CAAA;sBADV;;;AE9GH;;;;;;AAMG;;ACZH;;AAEG;;;;"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes