@decaf-ts/for-angular 0.0.11 → 0.0.13

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 (85) hide show
  1. package/package.json +19 -91
  2. package/LICENSE.md +0 -659
  3. package/dist/lib/README.md +0 -92
  4. package/dist/lib/assets/i18n/en.json +0 -140
  5. package/dist/lib/assets/images/angular-logo.svg +0 -45
  6. package/dist/lib/assets/images/decaf-logo-black.svg +0 -22
  7. package/dist/lib/assets/images/decaf-logo-lw.svg +0 -50
  8. package/dist/lib/assets/images/decaf-logo-white.svg +0 -22
  9. package/dist/lib/assets/images/decaf-logo.svg +0 -54
  10. package/dist/lib/components/component-renderer/component-renderer.component.d.ts +0 -276
  11. package/dist/lib/components/crud-field/crud-field.component.d.ts +0 -445
  12. package/dist/lib/components/crud-form/constants.d.ts +0 -5
  13. package/dist/lib/components/crud-form/crud-form.component.d.ts +0 -102
  14. package/dist/lib/components/crud-form/types.d.ts +0 -17
  15. package/dist/lib/components/empty-state/empty-state.component.d.ts +0 -301
  16. package/dist/lib/components/fieldset/fieldset.component.d.ts +0 -199
  17. package/dist/lib/components/filter/filter.component.d.ts +0 -505
  18. package/dist/lib/components/for-angular-components.module.d.ts +0 -20
  19. package/dist/lib/components/index.d.ts +0 -16
  20. package/dist/lib/components/layout/layout.component.d.ts +0 -133
  21. package/dist/lib/components/list/constants.d.ts +0 -29
  22. package/dist/lib/components/list/list.component.d.ts +0 -849
  23. package/dist/lib/components/list-item/list-item.component.d.ts +0 -390
  24. package/dist/lib/components/model-renderer/model-renderer.component.d.ts +0 -96
  25. package/dist/lib/components/pagination/constants.d.ts +0 -7
  26. package/dist/lib/components/pagination/pagination.component.d.ts +0 -264
  27. package/dist/lib/components/searchbar/searchbar.component.d.ts +0 -407
  28. package/dist/lib/directives/collapsable.directive.d.ts +0 -8
  29. package/dist/lib/directives/index.d.ts +0 -1
  30. package/dist/lib/engine/DynamicModule.d.ts +0 -17
  31. package/dist/lib/engine/NgxBaseComponent.d.ts +0 -541
  32. package/dist/lib/engine/NgxCrudFormField.d.ts +0 -118
  33. package/dist/lib/engine/NgxFormService.d.ts +0 -167
  34. package/dist/lib/engine/NgxRenderingEngine.d.ts +0 -127
  35. package/dist/lib/engine/NgxRenderingEngine2.d.ts +0 -250
  36. package/dist/lib/engine/ValidatorFactory.d.ts +0 -15
  37. package/dist/lib/engine/constants.d.ts +0 -151
  38. package/dist/lib/engine/decorators.d.ts +0 -25
  39. package/dist/lib/engine/index.d.ts +0 -16
  40. package/dist/lib/engine/types.d.ts +0 -381
  41. package/dist/lib/esm2022/components/component-renderer/component-renderer.component.mjs +0 -313
  42. package/dist/lib/esm2022/components/crud-field/crud-field.component.mjs +0 -301
  43. package/dist/lib/esm2022/components/crud-form/constants.mjs +0 -14
  44. package/dist/lib/esm2022/components/crud-form/crud-form.component.mjs +0 -139
  45. package/dist/lib/esm2022/components/crud-form/types.mjs +0 -2
  46. package/dist/lib/esm2022/components/empty-state/empty-state.component.mjs +0 -348
  47. package/dist/lib/esm2022/components/fieldset/fieldset.component.mjs +0 -225
  48. package/dist/lib/esm2022/components/filter/filter.component.mjs +0 -689
  49. package/dist/lib/esm2022/components/for-angular-components.module.mjs +0 -71
  50. package/dist/lib/esm2022/components/index.mjs +0 -20
  51. package/dist/lib/esm2022/components/layout/layout.component.mjs +0 -176
  52. package/dist/lib/esm2022/components/list/constants.mjs +0 -6
  53. package/dist/lib/esm2022/components/list/list.component.mjs +0 -1236
  54. package/dist/lib/esm2022/components/list-item/list-item.component.mjs +0 -408
  55. package/dist/lib/esm2022/components/model-renderer/model-renderer.component.mjs +0 -138
  56. package/dist/lib/esm2022/components/pagination/constants.mjs +0 -2
  57. package/dist/lib/esm2022/components/pagination/pagination.component.mjs +0 -323
  58. package/dist/lib/esm2022/components/searchbar/searchbar.component.mjs +0 -493
  59. package/dist/lib/esm2022/decaf-ts-for-angular.mjs +0 -5
  60. package/dist/lib/esm2022/directives/collapsable.directive.mjs +0 -28
  61. package/dist/lib/esm2022/directives/index.mjs +0 -2
  62. package/dist/lib/esm2022/engine/DynamicModule.mjs +0 -18
  63. package/dist/lib/esm2022/engine/NgxBaseComponent.mjs +0 -539
  64. package/dist/lib/esm2022/engine/NgxCrudFormField.mjs +0 -125
  65. package/dist/lib/esm2022/engine/NgxFormService.mjs +0 -315
  66. package/dist/lib/esm2022/engine/NgxRenderingEngine.mjs +0 -192
  67. package/dist/lib/esm2022/engine/NgxRenderingEngine2.mjs +0 -332
  68. package/dist/lib/esm2022/engine/ValidatorFactory.mjs +0 -102
  69. package/dist/lib/esm2022/engine/constants.mjs +0 -160
  70. package/dist/lib/esm2022/engine/decorators.mjs +0 -38
  71. package/dist/lib/esm2022/engine/index.mjs +0 -17
  72. package/dist/lib/esm2022/engine/types.mjs +0 -4
  73. package/dist/lib/esm2022/for-angular.module.mjs +0 -118
  74. package/dist/lib/esm2022/helpers/index.mjs +0 -13
  75. package/dist/lib/esm2022/helpers/utils.mjs +0 -415
  76. package/dist/lib/esm2022/interfaces.mjs +0 -2
  77. package/dist/lib/esm2022/public-apis.mjs +0 -14
  78. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs +0 -7109
  79. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs.map +0 -1
  80. package/dist/lib/for-angular.module.d.ts +0 -45
  81. package/dist/lib/helpers/index.d.ts +0 -12
  82. package/dist/lib/helpers/utils.d.ts +0 -253
  83. package/dist/lib/index.d.ts +0 -5
  84. package/dist/lib/interfaces.d.ts +0 -28
  85. package/dist/lib/public-apis.d.ts +0 -13
@@ -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/for-angular.module.ts","../../../src/lib/components/component-renderer/component-renderer.component.ts","../../../src/lib/components/component-renderer/component-renderer.component.html","../../../src/lib/engine/NgxCrudFormField.ts","../../../src/lib/engine/decorators.ts","../../../src/lib/components/crud-field/crud-field.component.ts","../../../src/lib/components/crud-field/crud-field.component.html","../../../src/lib/engine/DynamicModule.ts","../../../src/lib/engine/NgxRenderingEngine.ts","../../../src/lib/engine/types.ts","../../../src/lib/helpers/utils.ts","../../../src/lib/engine/NgxBaseComponent.ts","../../../src/lib/engine/index.ts","../../../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/helpers/index.ts","../../../src/lib/components/empty-state/empty-state.component.ts","../../../src/lib/components/empty-state/empty-state.component.html","../../../src/lib/directives/collapsable.directive.ts","../../../src/lib/components/fieldset/fieldset.component.ts","../../../src/lib/components/fieldset/fieldset.component.html","../../../src/lib/components/searchbar/searchbar.component.ts","../../../src/lib/components/searchbar/searchbar.component.html","../../../src/lib/components/filter/filter.component.ts","../../../src/lib/components/filter/filter.component.html","../../../src/lib/components/model-renderer/model-renderer.component.ts","../../../src/lib/components/model-renderer/model-renderer.component.html","../../../src/lib/components/layout/layout.component.ts","../../../src/lib/components/layout/layout.component.html","../../../src/lib/components/list-item/list-item.component.ts","../../../src/lib/components/list-item/list-item.component.html","../../../src/lib/components/pagination/pagination.component.ts","../../../src/lib/components/pagination/pagination.component.html","../../../src/lib/components/list/constants.ts","../../../src/lib/components/list/list.component.ts","../../../src/lib/components/list/list.component.html","../../../src/lib/components/for-angular-components.module.ts","../../../src/lib/components/index.ts","../../../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 { NgModule, CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NO_ERRORS_SCHEMA} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n IonApp,\n IonRouterOutlet,\n IonSplitPane,\n IonImg,\n IonContent,\n IonText,\n IonButton,\n IonRouterLink,\n IonTitle\n} from '@ionic/angular/standalone';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { TranslateModule, TranslatePipe } from '@ngx-translate/core';\nimport { Logger, Logging } from '@decaf-ts/logging';\nimport { FunctionLike } from './engine';\n\nconst ComponentsAndModules = [\n IonApp,\n IonRouterOutlet,\n IonSplitPane,\n IonImg,\n IonText,\n IonTitle,\n IonButton,\n IonRouterLink,\n IonContent,\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TranslateModule,\n TranslatePipe,\n];\n\nconst log = Logging.for(\"for-angular\");\nexport function getLogger(instance: string | FunctionLike | unknown): Logger {\n return log.for(instance as string | FunctionLike);\n}\n\n/**\n * @description Main Angular module for the Decaf framework\n * @summary The ForAngularModule provides the core functionality for integrating Decaf with Angular applications.\n * It imports and exports common Angular and Ionic components and modules needed for Decaf applications,\n * including form handling, translation support, and Ionic UI components. This module can be imported\n * directly or via the forRoot() method for proper initialization in the application's root module.\n *\n * @class ForAngularModule\n * @example\n * ```typescript\n * // In your app module:\n * @NgModule({\n * imports: [\n * ForAngularModule.forRoot(),\n * // other imports\n * ],\n * // ...\n * })\n * export class AppModule {}\n * ```\n */\n@NgModule({\n imports: ComponentsAndModules,\n declarations: [],\n exports: ComponentsAndModules,\n schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],\n})\nexport class ForAngularModule {\n /**\n * @description Creates a module with providers for root module import\n * @summary This static method provides the proper way to import the ForAngularModule in the application's\n * root module. It returns a ModuleWithProviders object that includes the ForAngularModule itself.\n * Using forRoot() ensures that the module and its providers are properly initialized and only\n * instantiated once in the application.\n *\n * @return {ModuleWithProviders<ForAngularModule>} The module with its providers\n */\n static forRoot(): ModuleWithProviders<ForAngularModule> {\n return {\n ngModule: ForAngularModule,\n };\n }\n}\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 '../../engine/NgxRenderingEngine2';\nimport { BaseCustomEvent, KeyValue, RendererCustomEvent } from '../../engine';\nimport { ForAngularModule, getLogger } from '../../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: string[] = [];\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 { 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 // eslint-disable-next-line @typescript-eslint/no-empty-function\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 // eslint-disable-next-line @typescript-eslint/no-empty-function\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 { 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","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 '../../for-angular.module';\nimport {\n IonCheckbox,\n IonIcon,\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';\nimport { addIcons } from 'ionicons';\nimport { chevronDownOutline, chevronUpOutline } from 'ionicons/icons';\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 IonIcon\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\n this.formGroup = undefined;\n } else {\n addIcons({chevronDownOutline, chevronUpOutline})\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 toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\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","/**\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","import { IonCheckbox, IonInput, IonSelect, IonTextarea } from '@ionic/angular';\nimport { TextFieldTypes } from '@ionic/core';\nimport { EnvironmentInjector, Injector, Type } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { FieldProperties } from '@decaf-ts/ui-decorators';\nimport { OrderDirection } from '@decaf-ts/core';\n\n/**\n * @description Generic key-value pair type\n * @summary Represents a generic object with string keys and any type of values.\n * This is commonly used for dynamic data structures where the properties are not known at compile time.\n * @typedef {Record<string, any>} KeyValue\n * @memberOf module:engine\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type KeyValue = Record<string, any>;\n\n/**\n * @description Generic function type\n * @summary Represents a function that accepts any number of arguments of any type\n * and returns any type. This is useful for defining function parameters or variables\n * where the exact function signature is not known at compile time.\n * @typedef FunctionLike\n * @memberOf module:engine\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type FunctionLike = (...args: any[]) => any;\n\n/**\n * @description Element size options for UI components\n * @summary Defines the possible size values that can be applied to UI elements.\n * These sizes control the dimensions and layout behavior of components.\n * @typedef {('small'|'medium'|'large'|'xlarge'|'2xlarge'|'auto'|'expand'|'block')} ElementSizes\n * @memberOf module:engine\n */\nexport type ElementSizes =\n | 'small'\n | 'medium'\n | 'large'\n | 'xlarge'\n | '2xlarge'\n | 'auto'\n | 'expand'\n | 'block';\n\n/**\n * @description Basic position options for UI elements\n * @summary Defines the possible position values that can be applied to UI elements.\n * These positions control the alignment and placement of components.\n * @typedef {('left'|'center'|'right'|'top'|'bottom')} ElementPositions\n * @memberOf module:engine\n */\nexport type ElementPositions = 'left' | 'center' | 'right' | 'top' | 'bottom';\n\n/**\n * @description Extended position options for flex layouts\n * @summary Extends the basic ElementPositions with additional flex-specific position values.\n * These positions are used for controlling alignment and distribution in flex containers.\n * @typedef {(ElementPositions|'stretch'|'middle'|'around'|'between')} FlexPositions\n * @memberOf module:engine\n */\nexport type FlexPositions =\n | ElementPositions\n | 'stretch'\n | 'middle'\n | 'around'\n | 'between';\n\n/**\n * @description Update mode options for form fields\n * @summary Defines when form field values should be updated in the model.\n * - 'change': Update on every change event\n * - 'blur': Update when the field loses focus\n * - 'submit': Update only when the form is submitted\n * @typedef {('change'|'blur'|'submit')} FieldUpdateMode\n * @memberOf module:engine\n */\nexport type FieldUpdateMode = 'change' | 'blur' | 'submit';\n\n/**\n * @description Metadata structure for Angular components\n * @summary Defines the structure of metadata for Angular components, including\n * change detection strategy, selector, standalone status, imports, template, and styles.\n * This is used for reflection and dynamic component creation.\n * @interface ComponentMetadata\n * @property {number} changeDetection - The change detection strategy number\n * @property {string} selector - The CSS selector for the component\n * @property {boolean} standalone - Whether the component is standalone\n * @property imports - Array of imported modules/components\n * @property {string} template - The HTML template for the component\n * @property {string[]} styles - Array of CSS styles for the component\n * @memberOf module:engine\n */\nexport interface ComponentMetadata {\n changeDetection: number;\n selector: string;\n standalone: boolean;\n imports: (new (...args: unknown[]) => unknown)[];\n template: string;\n styles: string[];\n}\n\n/**\n * @description Output structure from the Angular rendering engine\n * @summary Defines the structure of the output produced by the NgxRenderingEngine\n * when rendering a component. Contains the component type, inputs, injector,\n * content nodes, and child components.\n * @typedef {Object} AngularDynamicOutput\n * @property {Type<unknown>} component - The Angular component type\n * @property {string} [rendererId] - Optional unique ID for the rendered component\n * @property {Record<string, unknown>} [inputs] - Optional input properties for the component\n * @property {Injector} [injector] - Optional Angular injector for dependency injection\n * @property {Node[][]} [content] - Optional content nodes for projection\n * @property {AngularDynamicOutput[]} [children] - Optional child components\n * @property {Type<unknown>} [instance] - Optional component instance\n * @property {FormGroup} [formGroup] - Optional component FormGroup\n * @property {FormControl} [formControl] - Optional component FormControl\n * @memberOf module:engine\n */\nexport interface AngularDynamicOutput {\n component: Type<unknown>;\n rendererId?: string;\n inputs?: Record<string, unknown>;\n injector?: Injector;\n content?: Node[][];\n children?: AngularDynamicOutput[];\n instance?: Type<unknown>;\n formGroup?: FormGroup;\n formControl?: FormControl;\n}\n\n/**\n * @description Interface for models that can be rendered\n * @summary Defines the basic structure for models that can be rendered by the engine.\n * Contains an optional rendererId that uniquely identifies the rendered instance.\n * @interface RenderedModel\n * @property {string} [rendererId] - Optional unique ID for the rendered model instance\n * @memberOf module:engine\n */\nexport interface RenderedModel {\n rendererId?: string;\n}\n\n/**\n * @description Possible input types for form fields\n * @summary Defines the possible input types that can be used in form fields.\n * Includes standard HTML input types like checkbox, radio, and select,\n * as well as Ionic's TextFieldTypes and textarea.\n * @typedef {('checkbox'|'radio'|'select'|TextFieldTypes|'textarea')} PossibleInputTypes\n * @memberOf module:engine\n */\nexport type PossibleInputTypes =\n | 'checkbox'\n | 'radio'\n | 'select'\n | TextFieldTypes\n | 'textarea';\n\n/**\n * @description Field definition for Angular components\n * @summary A comprehensive type that combines properties from various Ionic components\n * to define the structure of a field in an Angular form. It omits certain properties\n * from IonInput, picks specific properties from IonSelect, IonTextarea, and IonCheckbox,\n * and adds custom properties like type and className.\n * @typedef {Object} AngularFieldDefinition\n * @property {PossibleInputTypes} type - The type of input field\n * @property {string|string[]} className - CSS class name(s) for the field\n * @property {string} [cancelText] - Text for the cancel button (from IonSelect)\n * @property {string} [interface] - Interface style for select (from IonSelect)\n * @property {string} [selectedText] - Text for selected option (from IonSelect)\n * @property {Object} [interfaceOptions] - Options for the interface (from IonSelect)\n * @property {number} [rows] - Number of rows for textarea (from IonTextarea)\n * @property {number} [cols] - Number of columns for textarea (from IonTextarea)\n * @property {string} [alignment] - Alignment of checkbox (from IonCheckbox)\n * @property {string} [justify] - Justification of checkbox (from IonCheckbox)\n * @property {boolean} [checked] - Whether checkbox is checked (from IonCheckbox)\n * @memberOf module:engine\n */\nexport type AngularFieldDefinition = Omit<\n IonInput,\n | 'ionInput'\n | 'ionFocus'\n | 'ionChange'\n | 'ionBlur'\n | 'getInputElement'\n | 'setFocus'\n | 'label'\n | 'el'\n | 'z'\n | 'type'\n> &\n Pick<\n IonSelect,\n 'cancelText' | 'interface' | 'selectedText' | 'interfaceOptions'\n > &\n Pick<IonTextarea, 'rows' | 'cols'> &\n Pick<IonCheckbox, 'alignment' | 'justify' | 'checked'> & {\n type: PossibleInputTypes;\n className: string | string[];\n} & Record<string, unknown>;\n\n/**\n * @description String or boolean representation of a boolean value\n * @summary Represents a value that can be either a boolean or a string representation of a boolean.\n * This is useful for handling attribute values that can be specified as either strings or booleans.\n * @typedef {('true'|'false'|boolean)} StringOrBoolean\n * @memberOf module:engine\n */\nexport type StringOrBoolean = 'true' | 'false' | boolean;\n\n/**\n * @description Option type for select inputs\n * @summary Extends the InputOption interface with a selected property to indicate\n * whether the option is selected by default.\n * @memberOf module:engine\n */\nexport type SelectOption = InputOption & { selected?: boolean };\n\n/**\n * @description Option type for radio inputs\n * @summary Extends the InputOption interface with a checked property to indicate\n * whether the option is checked by default.\n * @memberOf module:engine\n */\nexport type RadioOption = InputOption & { checked?: boolean };\n\n/**\n * @description Option type for checkbox inputs\n * @summary Alias for RadioOption, as checkbox options have the same structure as radio options.\n * @typedef {RadioOption} CheckboxOption\n * @memberOf module:engine\n */\nexport type CheckboxOption = RadioOption;\n\n/**\n * @description Base option type for input components\n * @summary Defines the common structure for options used in select, radio, and checkbox inputs.\n * Contains properties for the display text, value, disabled state, CSS class, and icon.\n * @interface InputOption\n * @property {string} text - The display text for the option\n * @property {string|number} value - The value associated with the option\n * @property {StringOrBoolean} [disabled] - Whether the option is disabled\n * @property {string} [className] - CSS class name for styling the option\n * @property {string} [icon] - Icon to display with the option\n * @memberOf module:engine\n */\nexport interface InputOption {\n text: string;\n value: string | number;\n disabled?: StringOrBoolean;\n className?: string;\n icon?: string;\n}\n\n/**\n * @description Target options for HTML forms\n * @summary Defines the possible target values for HTML forms, including standard targets\n * like '_blank', '_self', '_parent', and '_top', as well as custom string values.\n * @typedef {('_blank'|'_self'|'_parent'|'_top'|string)} HTMLFormTarget\n * @memberOf module:engine\n */\nexport type HTMLFormTarget = '_blank' | '_self' | '_parent' | '_top' | string;\n\n// export interface IListItemProp {\n// render?: string | boolean;\n// translateProps?: string | string[];\n// button?: StringOrBoolean;\n// icon?: string;\n// iconSlot?: 'start' | 'end';\n// title?: string;\n// descritpion?: string;\n// info?: string;\n// subinfo?: string;\n// }\n\n/**\n * @description Interface for list component refresh events\n * @summary Defines the structure of a refresh event for list components.\n * Contains an array of key-value pairs representing the new data for the list.\n * @interface IListComponentRefreshEvent\n * @property {KeyValue[]} data - Array of key-value pairs representing the new data\n * @memberOf module:engine\n */\nexport interface IListComponentRefreshEvent {\n data: KeyValue[];\n}\n\n/**\n * @description Form service control structure\n * @summary Defines the structure for a form control managed by the form service.\n * Contains the FormGroup control and the associated field properties for rendering.\n * @interface FormServiceControl\n * @property {FormGroup} control - The Angular FormGroup for the control\n * @property {AngularFieldDefinition} props - The field properties for rendering the control\n * @memberOf module:engine\n */\nexport interface FormServiceControl {\n control: FormGroup;\n props: AngularFieldDefinition;\n}\n\n/**\n * @description Type for form service controls\n * @summary Defines the structure of form controls managed by the form service.\n * It's a nested record where the outer key is the form group name, the inner key\n * is the control name, and the value contains the form group and field properties.\n * @typedef {Record<string, Record<string, { control: FormGroup; props: AngularFieldDefinition }>>} FormServiceControls\n * @memberOf module:engine\n */\nexport type FormServiceControls = Record<\n string,\n Record<string, FormServiceControl>\n>;\n\n/**\n * @description Renderer custom event type\n * @summary Combines BaseCustomEvent with KeyValue properties to create a flexible\n * custom event type for renderer components. This allows events to carry both\n * standard event properties and additional custom data.\n * @typedef RendererCustomEvent\n * @memberOf module:engine\n */\nexport type RendererCustomEvent = BaseCustomEvent & KeyValue;\n\n/**\n * @description Interface for list item custom events\n * @summary Defines the structure of custom events triggered by list items.\n * Extends BaseCustomEvent with additional properties for the action and primary key.\n * @interface ListItemCustomEvent\n * @property {string} action - The action performed on the list item\n * @property {string} [pk] - Optional primary key of the affected item\n * @property {any} data - The data associated with the event (inherited from BaseCustomEvent)\n * @property {HTMLElement} [target] - The target element (inherited from BaseCustomEvent)\n * @property {string} [name] - The name of the event (inherited from BaseCustomEvent)\n * @property {string} component - The component that triggered the event (inherited from BaseCustomEvent)\n * @memberOf module:engine\n */\nexport interface ListItemCustomEvent extends BaseCustomEvent {\n action: string;\n pk?: string;\n}\n\n/**\n * @description Base interface for custom events\n * @summary Defines the base structure for custom events in the application.\n * Contains properties for the event data, target element, name, and component.\n * @interface BaseCustomEvent\n * @property {any} data - The data associated with the event\n * @property {HTMLElement} [target] - The target element that triggered the event\n * @property {string} [name] - The name of the event\n * @property {string} component - The component that triggered the event\n * @memberOf module:engine\n */\nexport interface BaseCustomEvent {\n name: string;\n component: string;\n data?: unknown;\n target?: HTMLElement;\n}\n\n/**\n * @description CRUD form event type\n * @summary Extends BaseCustomEvent to include optional handlers for CRUD form operations.\n * This event type is used for form-related actions like create, read, update, and delete operations.\n * @typedef CrudFormEvent\n * @property {Record<string, any>} [handlers] - Optional handlers for form operations\n * @memberOf module:engine\n */\nexport type CrudFormEvent = BaseCustomEvent & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handlers?: Record<string, any>;\n};\n\n/**\n * @description Component input properties\n * @summary Extends FieldProperties with additional properties specific to Angular components.\n * Includes update mode for form controls and optional FormGroup and FormControl references.\n * @interface ComponentInput\n * @property {FieldUpdateMode} [updateMode] - When the field value should be updated\n * @property {FormGroup} [formGroup] - Optional FormGroup reference\n * @property {FormControl} [formControl] - Optional FormControl reference\n * @memberOf module:engine\n */\nexport interface ComponentInput extends FieldProperties {\n updateMode?: FieldUpdateMode;\n formGroup?: FormGroup;\n formControl?: FormControl;\n}\n\n/**\n * @description Component configuration structure\n * @summary Defines the configuration for dynamically creating Angular components.\n * Contains the component name, input properties, injector, and optional child components.\n * @interface ComponentConfig\n * @property {string} component - The name of the component to render\n * @property {ComponentInput} inputs - The input properties for the component\n * @property {EnvironmentInjector | Injector} injector - The Angular injector for dependency injection\n * @property {ComponentConfig[]} [children] - Optional child component configurations\n * @memberOf module:engine\n */\nexport interface ComponentConfig {\n component: string;\n inputs: ComponentInput;\n injector: EnvironmentInjector | Injector;\n children?: ComponentConfig[];\n}\n\n/**\n * @description Form parent group tuple\n * @summary Represents a tuple containing a FormGroup and its associated string identifier.\n * This is used for managing hierarchical form structures and parent-child relationships.\n * @typedef {[FormGroup, string]} FormParentGroup\n * @memberOf module:engine\n */\nexport type FormParentGroup = [FormGroup, string];\n\n/**\n * @description Interface for individual filter query items\n * @summary Defines the structure of a single filter criterion in a filter query.\n * Each item represents one condition to be applied to the data, consisting of\n * an index (field name), a condition (comparison operator), and a value to compare against.\n * @interface IFilterQueryItem\n * @property {string} [index] - Optional field name or index to filter on\n * @property {string} [condition] - Optional comparison condition (e.g., 'Equal', 'Contains', 'Greater Than')\n * @property {string} [value] - Optional value to compare the field against\n * @memberOf module:engine\n */\nexport interface IFilterQueryItem {\n index?: string,\n condition?: string,\n value?: string\n};\n\n/**\n * @description Interface for sorting configuration objects\n * @summary Defines the structure for specifying sort criteria including the field\n * to sort by and the direction of the sort (ascending or descending).\n * @interface ISortObject\n * @property {string} value - The field name or property to sort by\n * @property {OrderDirection} direction - The sort direction (ASC or DSC)\n * @memberOf module:engine\n */\nexport interface ISortObject {\n value: string,\n direction: OrderDirection\n};\n\n/**\n * @description Interface for complete filter query configuration\n * @summary Defines the complete structure for filter and sort operations.\n * Combines multiple filter criteria with sorting configuration to provide\n * comprehensive data filtering and ordering capabilities.\n * @interface IFilterQuery\n * @property {IFilterQueryItem[] | undefined} query - Array of filter criteria or undefined for no filtering\n * @property {ISortObject} sort - Sorting configuration specifying field and direction\n * @memberOf module:engine\n */\nexport interface IFilterQuery {\n query: IFilterQueryItem[] | undefined,\n sort: ISortObject\n}\n","import { isDevMode } from '@angular/core';\nimport { InjectableRegistryImp, InjectablesRegistry } from '@decaf-ts/injectable-decorators';\nimport { Primitives } from '@decaf-ts/decorator-validation';\nimport { KeyValue, StringOrBoolean, } from '../engine/types';\nimport { FunctionLike } from '../engine/types';\nimport { getLogger } from '../for-angular.module';\n\nlet injectableRegistry: InjectablesRegistry;\n\n/**\n * @description Retrieves the singleton instance of the injectables registry\n * @summary This function implements the singleton pattern for the InjectablesRegistry.\n * It returns the existing registry instance if one exists, or creates a new instance\n * if none exists. The registry is used to store and retrieve injectable dependencies\n * throughout the application.\n *\n * @return {InjectablesRegistry} The singleton injectables registry instance\n *\n * @function getInjectablesRegistry\n * @memberOf module:for-angular\n */\nexport function getInjectablesRegistry(): InjectablesRegistry {\n if (!injectableRegistry)\n injectableRegistry = new InjectableRegistryImp();\n return injectableRegistry;\n}\n\n/**\n * @description Determines if the application is running in development mode\n * @summary This function checks whether the application is currently running in a development\n * environment. It uses Angular's isDevMode() function and also checks the window context\n * and hostname against the provided context parameter. This is useful for enabling\n * development-specific features or logging.\n *\n * @param {string} [context='localhost'] - The context string to check against the current environment\n * @return {boolean} True if the application is running in development mode, false otherwise\n *\n * @function isDevelopmentMode\n * @memberOf module:for-angular\n */\nexport function isDevelopmentMode(context: string = 'localhost'): boolean {\n if (!context)\n return isDevMode();\n const win = getWindow();\n return (\n isDevMode() ||\n win?.['env']?.['CONTEXT'].toLowerCase() !== context.toLowerCase() ||\n win?.['location']?.hostname?.includes(context)\n );\n}\n\n/**\n * @description Dispatches a custom event to the document window\n * @summary This function creates and dispatches a custom event to the browser window.\n * It's useful for cross-component communication or for triggering application-wide events.\n * The function allows specifying the event name, detail data, and additional event properties.\n *\n * @param {string} name - The name of the custom event to dispatch\n * @param {unknown} detail - The data to include in the event's detail property\n * @param {object} [props] - Optional additional properties for the custom event\n * @return {void}\n *\n * @function windowEventEmitter\n * @memberOf module:for-angular\n */\nexport function windowEventEmitter(\n name: string,\n detail: unknown,\n props?: object\n): void {\n const data = Object.assign(\n {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: detail,\n },\n props || {}\n );\n (getWindow() as Window).dispatchEvent(new CustomEvent(name, data));\n}\n/**\n * @description Retrieves a property from the window's document object\n * @summary This function provides a safe way to access properties on the window's document object.\n * It uses the getWindowDocument function to get a reference to the document, then accesses\n * the specified property. This is useful for browser environment interactions that need\n * to access document properties.\n *\n * @param {string} key - The name of the property to retrieve from the document object\n * @return {any} The value of the specified property, or undefined if the document or property doesn't exist\n *\n * @function getOnWindowDocument\n * @memberOf module:for-angular\n */\nexport function getOnWindowDocument(key: string): Document | undefined {\n const doc = getWindowDocument()?.[key as keyof Document];\n return doc instanceof Document ?\n doc : undefined;\n}\n\n/**\n * @description Retrieves the document object from the window\n * @summary This function provides a safe way to access the document object from the window.\n * It uses the getOnWindow function to retrieve the 'document' property from the window object.\n * This is useful for browser environment interactions that need access to the document.\n *\n * @return {Document | undefined} The window's document object, or undefined if it doesn't exist\n *\n * @function getWindowDocument\n * @memberOf module:for-angular\n */\nexport function getWindowDocument(): Document | undefined {\n return getOnWindow('document') as Document;\n}\n\n/**\n * @description Retrieves a property from the window object\n * @summary This function provides a safe way to access properties on the window object.\n * It uses the getWindow function to get a reference to the window, then accesses\n * the specified property. This is useful for browser environment interactions that need\n * to access window properties or APIs.\n *\n * @param {string} key - The name of the property to retrieve from the window object\n * @return {unknown | undefined} The value of the specified property, or undefined if the window or property doesn't exist\n *\n * @function getOnWindow\n * @memberOf module:for-angular\n */\nexport function getOnWindow(key: string): unknown | undefined {\n return getWindow()?.[key];\n}\n\n/**\n * @description Sets a property on the window object\n * @summary This function provides a way to set properties on the window object.\n * It uses the getWindow function to get a reference to the window, then sets\n * the specified property to the provided value. This is useful for storing\n * global data or functions that need to be accessible across the application.\n *\n * @param {string} key - The name of the property to set on the window object\n * @param {any} value - The value to assign to the property\n * @return {void}\n *\n * @function setOnWindow\n * @memberOf module:for-angular\n */\nexport function setOnWindow(key: string, value: unknown): void {\n getWindow()[key] = value;\n}\n\n/**\n * @description Retrieves the global window object\n * @summary This function provides a safe way to access the global window object.\n * It uses globalThis to ensure compatibility across different JavaScript environments.\n * This is the core function used by other window-related utility functions to\n * access the window object.\n *\n * @return {Window} The global window object\n *\n * @function getWindow\n * @memberOf module:for-angular\n */\nexport function getWindow(): Window & KeyValue {\n return (globalThis as KeyValue)?.['window'] as Window & KeyValue;\n}\n\n/**\n * @description Retrieves the width of the browser window\n * @summary This function provides a convenient way to get the current width of the browser window.\n * It uses the getOnWindow function to access the 'innerWidth' property of the window object.\n * This is useful for responsive design implementations and viewport-based calculations.\n *\n * @return {number | undefined} The current width of the browser window in pixels\n *\n * @function getWindowWidth\n * @memberOf module:for-angular\n */\nexport function getWindowWidth(): number {\n return getOnWindow('innerWidth') as number || 0;\n}\n\n/**\n * @description Checks if a value is not undefined\n * @summary This utility function determines whether a given value is not undefined.\n * It's a simple wrapper that makes code more readable when checking for defined values.\n * The function is particularly useful for checking StringOrBoolean properties that might be undefined.\n *\n * @param {StringOrBoolean | undefined} prop - The property to check\n * @return {boolean} True if the property is not undefined, false otherwise\n *\n * @function isNotUndefined\n * @memberOf module:for-angular\n */\nexport function isNotUndefined(prop: StringOrBoolean | undefined): boolean {\n return (prop !== undefined) as boolean;\n}\n\n/**\n * @description Generates a locale string from a class name or instance\n * @summary This utility function converts a class name or instance into a locale string\n * that can be used for internationalization purposes. It handles different input types\n * (string, function, or object) and applies formatting rules to generate a consistent\n * locale identifier. For short names (less than 3 parts), it reverses the dot-separated\n * string. For longer names, it uses the last part as a prefix and joins the rest with\n * underscores.\n *\n * @param {string|FunctionLike|object} instance - The input to generate the locale from (class name, constructor, or instance)\n * @param {string} [suffix] - Optional string to append to the instance name before processing\n * @return {string} A formatted locale string derived from the input\n *\n * @function getLocaleFromClassName\n * @memberOf module:for-angular\n */\nexport function getLocaleFromClassName(\n instance: string | FunctionLike | object,\n suffix?: string\n): string {\n if (typeof instance !== 'string')\n instance =\n (instance as FunctionLike).name || (instance as object)?.constructor?.name;\n\n let name: string | string[] = instance;\n\n if (suffix) name = `${instance}${suffix.charAt(0).toUpperCase() + suffix.slice(1)}`;\n\n name = name\n .replace(/_|-/g, '')\n .replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (word: string, index: number) => {\n if (index > 1) word = '.' + word;\n return word.toLowerCase();\n })\n .split('.');\n\n if (name.length < 3)\n return name.reverse().join('.');\n\n const preffix = name[name.length - 1];\n name.pop();\n name = name.join('_');\n return `${preffix}.${name}`;\n\n\n}\n\n/**\n * @description Generates a localized string by combining locale and phrase\n * @summary This utility function creates a properly formatted locale string by combining\n * a locale identifier with a phrase. It handles edge cases such as empty phrases,\n * missing locales, and phrases that already include the locale prefix. This function\n * is useful for ensuring consistent formatting of localized strings throughout the application.\n *\n * @param {string} locale - The locale identifier (e.g., 'en', 'fr')\n * @param {string | undefined} phrase - The phrase to localize\n * @return {string} The formatted locale string, or empty string if phrase is undefined\n *\n * @function generateLocaleFromString\n * @memberOf module:for-angular\n */\nexport function generateLocaleFromString(\n locale: string,\n phrase: string | undefined\n): string {\n if (!phrase) return '';\n if (!locale || phrase.includes(`${locale}.`)) return phrase;\n return `${locale}.${phrase}`;\n}\n\n\n/**\n * @description Retrieves the current locale language\n * @summary This utility function gets the current locale language based on the user's browser settings.\n * It provides a consistent way to access the user's language preference throughout the application.\n * The function returns the browser's navigator.language value, defaulting to 'en' if not available.\n *\n * @return {string} The current locale language (e.g., 'en', 'fr')\n *\n * @function getLocaleLanguage\n * @memberOf module:for-angular\n */\nexport function getLocaleLanguage(): string {\n const win = getWindow();\n return (win as Window).navigator.language || \"en\";\n // return win?.[WINDOW_KEYS.LANGUAGE_SELECTED] || (win.navigator.language || '').split('-')[0] || \"en\";\n}\n\n\n\n/**\n * @description Generates a random string or number of specified length\n * @summary This utility function creates a random string of a specified length.\n * It can generate either alphanumeric strings (including uppercase and lowercase letters)\n * or numeric-only strings. This is useful for creating random IDs, temporary passwords,\n * or other random identifiers throughout the application.\n *\n * @param {number} [length=8] - The length of the random value to generate\n * @param {boolean} [onlyNumbers=false] - Whether to generate only numeric characters\n * @return {string} A randomly generated string of the specified length and character set\n *\n * @function generateRandomValue\n * @memberOf module:for-angular\n */\nexport function generateRandomValue(length: number = 8, onlyNumbers: boolean = false): string {\n const chars = onlyNumbers\n ? '0123456789'\n : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++)\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n\n return result;\n}\n\n\n/**\n * Converts a string representation of a boolean or a boolean value to a boolean type.\n *\n * @export\n * @param {('true' | 'false' | boolean)} prop - The value to convert. Can be the string 'true', 'false', or a boolean.\n * @returns {boolean} The boolean representation of the input value. Returns true if the input is the string 'true' or boolean true, false otherwise.\n */\nexport function stringToBoolean(prop: 'true' | 'false' | boolean): boolean {\n if(typeof prop === 'string')\n prop = prop.toLowerCase() === 'true' ? true : false;\n return prop;\n}\n\n\n/**\n * Checks if a value is a valid Date object\n *\n * @param {(string | Date | number)} date - The value to check. Can be a Date object, a timestamp number, or a date string\n * @return {boolean} Returns true if the value is a valid Date object (not NaN), otherwise false\n */\nexport function isValidDate(date: string | Date | number): boolean {\n try {\n return (date instanceof Date && !isNaN(date as unknown as number)) || (() => {\n const testRegex = new RegExp(/^\\d{4}-\\d{2}-\\d{2}$/).test(date as string)\n if(typeof date !== Primitives.STRING || !(date as string)?.includes('T') && !testRegex)\n return false;\n\n date = (date as string).split('T')[0];\n if(!new RegExp(/^\\d{4}-\\d{2}-\\d{2}$/).test(date))\n return false;\n\n return !!(new Date(date));\n })();\n } catch(error: unknown) {\n getLogger(isValidDate).error(error as Error | string);\n return false;\n }\n}\n\n/**\n * Formats a date into a localized string representation\n *\n * @param {(string | Date | number)} date - The date to format. Can be a Date object, a timestamp number, or a date string\n * @param {string} [locale] - The locale to use for formatting. If not provided, the system's locale will be used\n * @return {(Date | string)} A formatted date string in the format DD/MM/YYYY according to the specified locale,\n * or the original input as a string if the date is invalid\n */\nexport function formatDate(date: string | Date | number, locale?: string | undefined): Date | string {\n\n if(!locale)\n locale = getLocaleLanguage();\n\n if(typeof date === 'string' || typeof date === 'number')\n date = new Date(typeof date === 'string' ? date.replace(/\\//g, '-') : date);\n\n if(!isValidDate(date))\n return `${date}` as string;\n const r = date.toLocaleString(locale, {\n year: \"numeric\",\n day: \"2-digit\",\n month: '2-digit'\n });\n\n\n return r;\n}\n\n/**\n * Attempts to parse a date string, Date object, or number into a valid Date object\n *\n * @param {(string | Date | number)} date - The date to parse. Can be a Date object, a timestamp number,\n * or a date string in the format \"DD/MM/YYYY HH:MM:SS:MS\"\n * @return {(Date | null)} A valid Date object if parsing is successful, or null if the date is invalid\n * or doesn't match the expected format\n */\nexport function parseToValidDate(date: string | Date | number): Date | null {\n if(isValidDate(date))\n return date as Date;\n\n if(!`${date}`.includes('/'))\n return null;\n\n const [dateString, timeString] = (date as string).split(' ');\n const [day, month, year] = dateString.split('/').map(Number);\n const [hours, minutes, seconds, milliseconds] = timeString.split(':').map(Number);\n date = new Date(year, month - 1, day, hours, minutes, seconds, milliseconds);\n\n if(!isValidDate(date)) {\n console.warn('parseToValidDate - Invalid date format', date);\n return null;\n }\n\n return date;\n}\n\n\n/**\n * Maps an item object using a provided mapper object and optional additional properties.\n *\n * @param {KeyValue} item - The source object to be mapped.\n * @param {KeyValue} mapper - An object that defines the mapping rules. Keys represent the new property names,\n * and values represent the path to the corresponding values in the source object.\n * @param {KeyValue} [props] - Optional additional properties to be included in the mapped object.\n * @returns {KeyValue} A new object with properties mapped according to the mapper object and including any additional properties.\n */\nexport function itemMapper(item: KeyValue, mapper: KeyValue, props?: KeyValue): KeyValue {\n return Object.entries(mapper).reduce((accum: KeyValue, [key, value]) => {\n const arrayValue = (value as string).split('.');\n if (!value) {\n accum[key] = value;\n } else {\n if (arrayValue.length === 1) {\n accum[key] = item?.[value as string] || value;\n } else {\n let val;\n\n for (const _value of arrayValue)\n val = !val\n ? item[_value]\n : (typeof val === 'string' ? JSON.parse(val) : val)[_value];\n\n if (isValidDate(new Date(val))) val = `${formatDate(val)}`;\n\n accum[key] = val === null || val === undefined ? value : val;\n }\n }\n return Object.assign({}, props || {}, accum);\n }, {});\n}\n\n/**\n * Maps an array of data objects using a provided mapper object.\n *\n * @template T - The type of the resulting mapped items.\n * @param {any[]} data - The array of data objects to be mapped.\n * @param {KeyValue} mapper - An object that defines the mapping rules.\n * @param {KeyValue} [props] - Additional properties to be included in the mapped items.\n *\n * @returns {T[]} - The array of mapped items. If an item in the original array does not have any non-null values after mapping,\n * the original item is returned instead.\n */\nexport function dataMapper<T>(data: T[], mapper: KeyValue, props?: KeyValue): T[] {\n if (!data || !data.length) return [];\n return data.reduce((accum: T[], curr) => {\n const item = itemMapper(curr as KeyValue, mapper, props) as T;\n const hasValues =\n [...new Set(Object.values(item as T[]))].filter((value) => value).length >\n 0;\n // caso o item filtrado não possua nenhum valor, passar o objeto original\n accum.push(hasValues ? item : curr);\n return accum;\n }, []);\n}\n\n\nexport function removeFocusTrap(): void {\n const doc = getWindowDocument();\n if(doc?.activeElement)\n (doc.activeElement as HTMLElement)?.blur();\n}\n","import {\n Input,\n Component,\n Inject,\n ViewChild,\n ElementRef,\n OnChanges,\n SimpleChanges,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { KeyValue, RendererCustomEvent, StringOrBoolean } from './types';\nimport {\n getInjectablesRegistry,\n getLocaleFromClassName,\n stringToBoolean\n} from '../helpers/utils';\nimport { Model } from '@decaf-ts/decorator-validation';\nimport {\n CrudOperations,\n InternalError,\n OperationKeys\n} from '@decaf-ts/db-decorators';\nimport { BaseComponentProps } from './constants';\nimport { NgxRenderingEngine2 } from './NgxRenderingEngine2';\nimport { Logger } from '@decaf-ts/logging';\nimport { getLogger } from '../for-angular.module';\nimport { DecafRepository } from '../components/list/constants';\nimport { Repository } from '@decaf-ts/core';\n\n/**\n * @description Base component class that provides common functionality for all Decaf components.\n * @summary The NgxBaseComponent serves as the foundation for all Decaf UI components, providing\n * shared functionality for localization, element references, and styling. This abstract class\n * implements common properties and methods that are used across the component library, ensuring\n * consistent behavior and reducing code duplication. Components that extend this class inherit\n * its capabilities for handling translations, accessing DOM elements, and applying custom styling.\n *\n * @template M - The model type that this component works with\n * @param {string} instance - The component instance token used for identification\n * @param {string} locale - The locale to be used for translations\n * @param {StringOrBoolean} translatable - Whether the component should be translated\n * @param {string} className - Additional CSS classes to apply to the component\n * @param {\"ios\" | \"md\" | undefined} mode - Component platform style\n *\n * @component NgxBaseComponent\n * @example\n * ```typescript\n * @Component({\n * selector: 'app-my-component',\n * templateUrl: './my-component.component.html',\n * styleUrls: ['./my-component.component.scss']\n * })\n * export class MyComponent extends NgxBaseComponent {\n * constructor(@Inject('instanceToken') instance: string) {\n * super(instance);\n * }\n *\n * ngOnInit() {\n * this.initialize();\n * // Component-specific initialization\n * }\n * }\n * ```\n * @mermaid\n * sequenceDiagram\n * participant App as Application\n * participant Comp as Component\n * participant Base as NgxBaseComponent\n * participant Engine as NgxRenderingEngine2\n *\n * App->>Comp: Create component\n * Comp->>Base: super(instance)\n * Base->>Base: Set componentName & componentLocale\n *\n * App->>Comp: Set @Input properties\n * Comp->>Base: ngOnChanges(changes)\n *\n * alt model changed\n * Base->>Base: getModel(model)\n * Base->>Engine: getDecorators(model, {})\n * Engine-->>Base: Return decorator metadata\n * Base->>Base: Configure mapper and item\n * Base->>Base: getLocale(translatable)\n * else locale/translatable changed\n * Base->>Base: getLocale(translatable)\n * end\n *\n * App->>Comp: ngOnInit()\n * Comp->>Base: initialize()\n * Base->>Base: Set initialized flag\n */\n@Component({\n standalone: true,\n template: '',\n})\nexport abstract class NgxBaseComponent implements OnChanges {\n /**\n * @description Reference to the component's element.\n * @summary Provides direct access to the native DOM element of the component through Angular's\n * ViewChild decorator. This reference can be used to manipulate the DOM element directly,\n * apply custom styles, or access native element properties and methods. The element is\n * identified by the 'component' template reference variable.\n *\n * @type {ElementRef}\n * @memberOf NgxBaseComponent\n */\n @ViewChild('component', { read: ElementRef, static: true })\n component!: ElementRef;\n\n /**\n * @description The name of the component.\n * @summary Stores the name of the component, which is typically derived from the class name.\n * This property is used internally for various purposes such as logging, deriving the default\n * locale, and potentially for component identification in debugging or error reporting.\n *\n * The `componentName` is set during the component's initialization process and should not\n * be modified externally. It's marked as protected to allow access in derived classes while\n * preventing direct access from outside the component hierarchy.\n *\n * @type {string}\n * @protected\n * @memberOf NgxBaseComponent\n *\n * @example\n * // Inside a derived component class\n * console.log(this.componentName); // Outputs: \"MyCustomComponent\"\n */\n componentName!: string;\n\n /**\n * @description Unique identifier for the renderer.\n * @summary A unique identifier used to reference the component's renderer instance.\n * This can be used for targeting specific renderer instances when multiple components\n * are present on the same page.\n *\n * @type {string}\n * @memberOf NgxBaseComponent\n */\n @Input()\n rendererId!: string;\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 * @memberOf NgxBaseComponent\n */\n @Input()\n model!: Model | undefined;\n\n /**\n * @description The repository for interacting with the data model.\n * @summary Provides a connection to the data layer for retrieving and manipulating data.\n * This is an instance of the `DecafRepository` class from the `@decaf-ts/core` package,\n * which is initialized in the `repository` getter method.\n *\n * The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the\n * data model, such as fetching data, creating new items, updating existing items, and deleting\n * items. It also provides methods for querying and filtering data based on specific criteria.\n *\n * @type {DecafRepository<Model>}\n * @private\n * @memberOf NgxBaseComponent\n */\n protected _repository?: DecafRepository<Model>;\n\n /**\n * @description Dynamic properties configuration object.\n * @summary Contains key-value pairs of dynamic properties that can be applied to the component\n * at runtime. This flexible configuration object allows for dynamic property assignment without\n * requiring explicit input bindings for every possible configuration option. Properties from\n * this object are parsed and applied to the component instance through the parseProps method,\n * enabling customizable component behavior based on external configuration.\n *\n * @type {Record<string, unknown>}\n * @default {}\n * @memberOf NgxBaseComponent\n */\n @Input()\n props: Record<string, unknown> = {};\n\n /**\n * @description Configuration for list item rendering\n * @summary Defines how list items should be rendered in the component.\n * This property holds a configuration object that specifies the tag name\n * and other properties needed to render list items correctly. The tag property\n * identifies which component should be used to render each item in a list.\n * Additional properties can be included to customize the rendering behavior.\n *\n * @type {Record<string, unknown>}\n * @default {tag: \"\"}\n * @memberOf NgxBaseComponent\n */\n @Input()\n item: Record<string, unknown> = { tag: '' };\n\n /**\n * @description Primary key field name for the model.\n * @summary Specifies which field in the model should be used as the primary key.\n * This is typically used for identifying unique records in operations like update and delete.\n *\n * @type {string}\n * @default 'id'\n * @memberOf NgxBaseComponent\n */\n @Input()\n pk: string = 'id';\n\n /**\n * @description Base route for navigation related to this component.\n * @summary Defines the base route path used for navigation actions related to this component.\n * This is often used as a prefix for constructing navigation URLs.\n *\n * @type {string}\n * @memberOf NgxBaseComponent\n */\n @Input()\n route!: string;\n\n /**\n * @description Available CRUD operations for this component.\n * @summary Defines which CRUD operations (Create, Read, Update, Delete) are available\n * for this component. This affects which operations can be performed on the data.\n *\n * @default [OperationKeys.READ]\n * @memberOf NgxBaseComponent\n */\n @Input()\n operations: CrudOperations[] = [OperationKeys.READ];\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 * @memberOf NgxBaseComponent\n */\n @Input()\n uid!: string | number;\n\n /**\n * @description Field mapping configuration.\n * @summary Defines how fields from the data model should be mapped to properties used by the component.\n * This allows for flexible data binding between the model and the component's display logic.\n *\n * @type {Record<string, string>}\n * @memberOf NgxBaseComponent\n */\n @Input()\n mapper: Record<string, string> = {};\n\n /**\n * @description The locale to be used for translations.\n * @summary Specifies the locale identifier to use when translating component text.\n * This can be set explicitly via input property to override the automatically derived\n * locale from the component name. The locale is typically a language code (e.g., 'en', 'fr')\n * or a language-region code (e.g., 'en-US', 'fr-CA') that determines which translation\n * set to use for the component's text content.\n *\n * @type {string}\n * @memberOf NgxBaseComponent\n */\n @Input()\n locale!: string;\n\n /**\n * @description Determines if the component should be translated.\n * @summary Controls whether the component's text content should be processed for translation.\n * When true, the component will attempt to translate text using the specified locale.\n * When false, text is displayed as-is without translation. This property accepts either\n * a boolean value or a string that can be converted to a boolean (e.g., 'true', 'false', '1', '0').\n *\n * @type {StringOrBoolean}\n * @default false\n * @memberOf NgxBaseComponent\n */\n @Input()\n translatable: StringOrBoolean = true;\n\n /**\n * @description Additional CSS class names to apply to the component.\n * @summary Allows custom CSS classes to be added to the component's root element.\n * These classes are appended to any automatically generated classes based on other\n * component properties. Multiple classes can be provided as a space-separated string.\n * This provides a way to customize the component's appearance beyond the built-in styling options.\n *\n * @type {string}\n * @default \"\"\n * @memberOf NgxBaseComponent\n */\n @Input()\n className: string = '';\n\n /**\n * @description Component platform style.\n * @summary Controls the visual appearance of the component based on platform design guidelines.\n * The 'ios' mode follows iOS design patterns, while 'md' (Material Design) follows Android/Google\n * design patterns. This property affects various visual aspects such as animations, form elements,\n * and icons. Setting this property allows components to maintain platform-specific styling\n * for a more native look and feel.\n *\n * @type {(\"ios\" | \"md\" | undefined)}\n * @default \"md\"\n * @memberOf NgxBaseComponent\n */\n @Input()\n mode: 'ios' | 'md' | undefined = 'md';\n\n /**\n * @description The locale derived from the component's class name.\n * @summary Stores the automatically derived locale based on the component's class name.\n * This is determined during component initialization and serves as a fallback when no\n * explicit locale is provided via the locale input property. The derivation is handled\n * by the getLocaleFromClassName utility function, which extracts a locale identifier\n * from the component's class name.\n *\n * @type {string}\n * @memberOf NgxBaseComponent\n */\n componentLocale!: string;\n\n /**\n * @description Controls whether child components should be rendered\n * @summary Determines if child components should be rendered by the component.\n * This can be set to a boolean value or a string that can be converted to a boolean.\n * When true, child components defined in the model will be rendered. When false,\n * child components will be skipped. This provides control over the rendering depth.\n *\n * @type {string | StringOrBoolean}\n * @default true\n * @memberOf NgxBaseComponent\n */\n @Input()\n renderChild: string | StringOrBoolean = true;\n\n /**\n * @description Flag indicating if the component has been initialized\n * @summary Tracks whether the component has completed its initialization process.\n * This flag is used to prevent duplicate initialization and to determine if\n * certain operations that require initialization can be performed.\n *\n * @type {boolean}\n * @default false\n */\n initialized: boolean = false;\n\n /**\n * @description Event emitter for custom renderer events.\n * @summary Emits custom events that occur within child components or the layout itself.\n * This allows parent components to listen for and respond to user interactions or\n * state changes within the grid layout. Events are passed up the component hierarchy\n * to enable coordinated behavior across the application.\n *\n * @type {EventEmitter<RendererCustomEvent>}\n * @memberOf NgxBaseComponent\n */\n @Output()\n listenEvent: EventEmitter<RendererCustomEvent> = new EventEmitter<RendererCustomEvent>();\n\n /**\n * @description Reference to the rendering engine instance\n * @summary Provides access to the NgxRenderingEngine2 singleton instance,\n * which handles the rendering of components based on model definitions.\n * This engine is used to extract decorator metadata and render child components.\n *\n * @type {NgxRenderingEngine2}\n */\n renderingEngine: NgxRenderingEngine2 =\n NgxRenderingEngine2.get() as unknown as NgxRenderingEngine2;\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 NgxBaseComponent\n */\n logger!: Logger;\n\n /**\n * @description Creates an instance of NgxBaseComponent.\n * @summary Initializes a new instance of the base component with the provided instance token.\n * This constructor sets up the fundamental properties required by all Decaf components,\n * including the component name, locale settings, and logging capabilities. The instance\n * token is used for component identification and locale derivation.\n *\n * The constructor performs the following initialization steps:\n * 1. Sets the componentName from the provided instance token\n * 2. Derives the componentLocale from the class name using utility functions\n * 3. Initializes the logger instance for the component\n *\n * @param {string} instance - The component instance token used for identification\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular\n * participant C as Component\n * participant B as NgxBaseComponent\n * participant U as Utils\n * participant L as Logger\n *\n * A->>C: new Component(instance)\n * C->>B: super(instance)\n * B->>B: Set componentName = instance\n * B->>U: getLocaleFromClassName(instance)\n * U-->>B: Return derived locale\n * B->>B: Set componentLocale\n * B->>L: getLogger(this)\n * L-->>B: Return logger instance\n * B->>B: Set logger\n *\n * @memberOf NgxBaseComponent\n */\n // eslint-disable-next-line @angular-eslint/prefer-inject\n protected constructor(@Inject('instanceToken') protected instance: string) {\n this.componentName = instance;\n this.componentLocale = getLocaleFromClassName(instance);\n this.logger = getLogger(this);\n this.getLocale(this.translatable);\n }\n\n /**\n * @description Getter for the repository instance.\n * @summary Provides a connection to the data layer for retrieving and manipulating data.\n * This method initializes the `_repository` property if it is not already set, ensuring\n * that a single instance of the repository is used throughout the component.\n *\n * The repository is used to perform CRUD operations on the data model, such as fetching data,\n * creating new items, updating existing items, and deleting items. It also provides methods\n * for querying and filtering data based on specific criteria.\n *\n * @returns {DecafRepository<Model>} The initialized repository instance.\n * @private\n * @memberOf NgxBaseComponent\n */\n protected get repository(): DecafRepository<Model> {\n try {\n if (!this._repository) {\n const modelName = (this.model as Model).constructor.name\n const constructor = Model.get(modelName);\n if (!constructor)\n throw new InternalError(\n 'Cannot find model. was it registered with @model?',\n );\n this._repository = Repository.forModel(constructor);\n this.model = new constructor() as Model;\n }\n } catch (error: unknown) {\n throw new InternalError(\n (error as Error)?.message || error as string\n );\n }\n return this._repository;\n }\n\n /**\n * @description Parses and applies properties from the props object to the component instance.\n * @summary This method iterates through the properties of the provided instance object\n * and applies any matching properties from the component's props configuration to the\n * component instance. This allows for dynamic property assignment based on configuration\n * stored in the props object, enabling flexible component customization without requiring\n * explicit property binding for every possible configuration option.\n *\n * The method performs a safe property assignment by checking if each key from the instance\n * exists in the props object before applying it. This prevents accidental property\n * overwriting and ensures only intended properties are modified.\n *\n * @param {KeyValue} instance - The component instance object to process\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant C as Component\n * participant B as NgxBaseComponent\n * participant P as Props Object\n *\n * C->>B: parseProps(instance)\n * B->>B: Get Object.keys(instance)\n * loop For each key in instance\n * B->>P: Check if key exists in this.props\n * alt Key exists in props\n * B->>B: Set this[key] = this.props[key]\n * else Key not in props\n * Note over B: Skip this key\n * end\n * end\n *\n * @protected\n * @memberOf NgxBaseComponent\n */\n protected parseProps(instance: KeyValue): void {\n Object.keys(instance).forEach((key) => {\n if(Object.keys(this.props).includes(key))\n (this as KeyValue)[key] = this.props[key];\n })\n }\n\n /**\n * @description Handles changes to component inputs\n * @summary This Angular lifecycle hook is called when input properties change.\n * It responds to changes in the model, locale, or translatable properties by\n * updating the component's internal state accordingly. When the model changes,\n * it calls getModel to process the new model and getLocale to update the locale.\n * When locale or translatable properties change, it calls getLocale to update\n * the translation settings.\n *\n * @param {SimpleChanges} changes - Object containing changed properties\n * @return {void}\n */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[BaseComponentProps.MODEL]) {\n const { currentValue } = changes[BaseComponentProps.MODEL];\n if (currentValue) this.getModel(currentValue);\n this.getLocale(this.translatable);\n }\n if (\n changes[BaseComponentProps.INITIALIZED] ||\n changes[BaseComponentProps.LOCALE] ||\n changes[BaseComponentProps.TRANSLATABLE]\n )\n this.getLocale(this.translatable);\n }\n\n /**\n * @description Gets the appropriate locale string based on the translatable flag and available locales.\n * @summary Determines which locale string to use for translation based on the translatable flag\n * and available locale settings. This method first converts the translatable parameter to a boolean\n * using the stringToBoolean utility function. If translatable is false, it returns an empty string,\n * indicating no translation should be performed. If translatable is true, it checks for an explicitly\n * provided locale via the locale property. If no explicit locale is available, it falls back to the\n * componentLocale derived from the component's class name.\n *\n * @param {StringOrBoolean} translatable - Whether the component should be translated\n * @return {string} The locale string to use for translation, or empty string if not translatable\n *\n * @mermaid\n * sequenceDiagram\n * participant C as Component\n * participant N as NgxBaseComponent\n * participant S as StringUtils\n *\n * C->>N: getLocale(translatable)\n * N->>S: stringToBoolean(translatable)\n * S-->>N: Return boolean value\n * N->>N: Store in this.translatable\n * alt translatable is false\n * N-->>C: Return empty string\n * else translatable is true\n * alt this.locale is defined\n * N-->>C: Return this.locale\n * else this.locale is not defined\n * N-->>C: Return this.componentLocale\n * end\n * end\n */\n getLocale(translatable: StringOrBoolean): string {\n this.translatable = stringToBoolean(translatable);\n if (!this.translatable)\n return '';\n if (!this.locale)\n this.locale = this.componentLocale;\n return this.locale;\n }\n\n /**\n * @description Gets the route for the component\n * @summary Retrieves the route path for the component, generating one based on the model\n * if no route is explicitly set. This method checks if a route is already defined, and if not,\n * it creates a default route based on the model's constructor name. The generated route follows\n * the pattern '/model/{ModelName}'. This is useful for automatic routing in CRUD operations.\n *\n * @return {string} The route path for the component, or empty string if no route is available\n */\n getRoute(): string {\n if (!this.route && this.model instanceof Model)\n this.route = `/model/${this.model?.constructor.name}`;\n return this.route || '';\n }\n\n /**\n * @description Resolves and sets the component's model\n * @summary Processes the provided model parameter, which can be either a Model instance\n * or a string identifier. If a string is provided, it attempts to resolve the actual model\n * from the injectables registry. After resolving the model, it calls setModelDefinitions\n * to configure the component based on the model's metadata.\n *\n * @param {string | Model} model - The model instance or identifier string\n * @return {void}\n */\n getModel(model: string | Model): void {\n if (!(model instanceof Model))\n this.model = getInjectablesRegistry().get(model) as Model;\n this.setModelDefinitions(this.model as Model);\n }\n\n /**\n * @description Configures component properties based on model metadata\n * @summary Extracts and applies configuration from the model's decorators to set up\n * the component. This method uses the rendering engine to retrieve decorator metadata\n * from the model, then configures the component's mapper and item properties accordingly.\n * It ensures the route is properly set and merges various properties from the model's\n * metadata into the component's configuration.\n *\n * @param {Model} model - The model to extract configuration from\n * @return {void}\n */\n setModelDefinitions(model: Model): void {\n if (model instanceof Model) {\n this.getRoute();\n this.model = model;\n const field = this.renderingEngine.getDecorators(this.model as Model, {});\n const{ props, item, children } = field;\n this.props = Object.assign(props || {}, {children: children || []});\n if(item?.props?.['mapper'])\n this.mapper = item?.props!['mapper'] || {};\n this.item = {\n tag: item?.tag || '',\n ...item?.props,\n ...(this.mapper ? {mapper: this.mapper} : {}),\n ...{ route: item?.props?.['route'] || this.route },\n };\n }\n }\n\n /**\n * @description Initializes the component\n * @summary Performs one-time initialization of the component. This method checks if\n * the component has already been initialized to prevent duplicate initialization.\n * When called for the first time, it sets the initialized flag to true and logs\n * an initialization message with the component name. This method is typically called\n * during the component's lifecycle setup.\n */\n initialize(): void {\n this.initialized = true;\n }\n\n /**\n * @description Handles custom events from child components.\n * @summary Receives events from child renderer components and forwards them to parent\n * components through the listenEvent output. This creates an event propagation chain\n * that allows events to bubble up through the component hierarchy, enabling coordinated\n * responses to user interactions across the layout structure.\n *\n * @param {RendererCustomEvent} event - The custom event from a child component\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant C as Child Component\n * participant L as NgxBaseComponent\n * participant P as Parent Component\n *\n * C->>L: Emit RendererCustomEvent\n * L->>L: handleEvent(event)\n * L->>P: listenEvent.emit(event)\n * Note over P: Handle event in parent\n *\n * @memberOf NgxBaseComponent\n */\n handleEvent(event: RendererCustomEvent): void {\n this.listenEvent.emit(event);\n }\n\n /**\n * @description Tracks items in ngFor loops for optimal change detection.\n * @summary Provides a tracking function for Angular's *ngFor directive to optimize rendering\n * performance. This method generates unique identifiers for list items based on their index\n * and content, allowing Angular to efficiently track changes and minimize DOM manipulations\n * during list updates. The tracking function is essential for maintaining component state\n * and preventing unnecessary re-rendering of unchanged items.\n *\n * @param {number} index - The index of the item in the list\n * @param {KeyValue | string | number} item - The item data to track\n * @returns {string | number} A unique identifier for the item\n * @memberOf NgxBaseComponent\n */\n trackItemFn(index: number, item: KeyValue | string | number): string | number {\n return `${index}-${item}`;\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';\nexport * from './NgxBaseComponent';\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 '../../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 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 id=\"dcf-buttons-container\" class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-left\">\n <div>\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 @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 {{ ['create', 'update'].includes(operation) ? 'Back' : options.buttons.clear?.text}}\n </ion-button>\n }\n </div>\n </div>\n </form>\n} @else {\n <div [class]=\"'dcf-grid dcf-grid-collapse dcf-flex dcf-flex-left ' + operation\" id=\"dcf-buttons-container\">\n\n @if(operation === 'delete' && uid) {\n <div>\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 </div>\n\n }\n @if(operation === OperationKeys.CREATE || operation === OperationKeys.UPDATE) {\n <div>\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 </div>\n }\n\n @if(options.buttons.clear) {\n <div>\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 </div>\n\n }\n </div>\n}\n\n","/**\n * @module helpers\n * @description Utility helpers for Angular Decaf applications\n * @summary The helpers module provides a collection of utility functions and types\n * that assist with common tasks in Decaf Angular applications. It includes functions\n * for array manipulation, date formatting, logging, string operations, and various\n * utility functions for working with Angular components and services. These helpers\n * simplify common operations and promote code reuse across the application.\n * Key exports include logging utilities, string manipulation functions, and component\n * utility functions.\n */\nexport * from './utils';\n","import { Component, inject, Input, OnInit } from '@angular/core';\nimport { Color, PredefinedColors } from '@ionic/core';\nimport {\n IonCard,\n IonCardContent,\n IonIcon,\n IonTitle,\n NavController\n}\nfrom '@ionic/angular/standalone';\nimport * as allIcons from 'ionicons/icons';\nimport { addIcons } from 'ionicons';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { Dynamic, StringOrBoolean } from '../../engine';\nimport { stringToBoolean } from '../../helpers';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { TranslateService } from '@ngx-translate/core';\nimport { FunctionLike } from '../../engine/types';\n\n\n/**\n * @description Component for displaying empty state messages with optional actions.\n * @summary This component provides a standardized way to display empty state messages\n * when no data is available or when a user needs to take an action to populate content.\n * It includes customizable title, subtitle, icon, and action button elements that can be\n * styled and configured through input properties. The component supports localization\n * and can trigger navigation or custom actions when the button is clicked.\n *\n * @mermaid\n * classDiagram\n * class EmptyStateComponent {\n * +string title\n * +string titleColor\n * +string subtitle\n * +string subtitleColor\n * +StringOrBoolean showIcon\n * +string icon\n * +string iconSize\n * +PredefinedColors iconColor\n * +string|Function buttonLink\n * +string buttonText\n * +string buttonFill\n * +Color buttonColor\n * +string buttonSize\n * +string searchValue\n * -NavController navController\n * +ngOnInit()\n * +handleClick()\n * }\n * EmptyStateComponent --|> NgxBaseComponent\n * EmptyStateComponent --|> OnInit\n *\n * @extends {NgxBaseComponent}\n * @implements {OnInit}\n */\n@Dynamic()\n@Component({\n selector: 'ngx-decaf-empty-state',\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n standalone: true,\n imports: [\n ForAngularModule,\n IonCard,\n IonCardContent,\n IonTitle,\n IonIcon\n ]\n\n})\nexport class EmptyStateComponent extends NgxBaseComponent implements OnInit {\n\n /**\n * @description The main title displayed in the empty state.\n * @summary Specifies the primary message to show in the empty state component.\n * This text is typically used to inform the user about why they're seeing an empty view.\n * If translatable is true, this will be processed through the localization system.\n *\n * @type {string}\n * @default \"title\"\n * @memberOf EmptyStateComponent\n */\n @Input()\n title: string = \"title\";\n\n /**\n * @description The color of the title text.\n * @summary Specifies the color for the title text using the application's color system.\n * The value should correspond to a color variable defined in the application's theme.\n * The component will automatically prefix this with \"color-\" to create the CSS class.\n *\n * @type {string}\n * @default 'gray-6'\n * @memberOf EmptyStateComponent\n */\n @Input()\n titleColor = 'gray-6';\n\n /**\n * @description The secondary message displayed in the empty state.\n * @summary Provides additional context or instructions below the main title.\n * This text is typically used to guide the user on what actions they can take.\n * If translatable is true, this will be processed through the localization system.\n *\n * @type {string | undefined}\n * @memberOf EmptyStateComponent\n */\n @Input()\n subtitle: string = \"\";\n\n /**\n * @description The color of the subtitle text.\n * @summary Specifies the color for the subtitle text using the application's color system.\n * The value should correspond to a color variable defined in the application's theme.\n * The component will automatically prefix this with \"color-\" to create the CSS class.\n *\n * @type {string}\n * @default 'gray-4'\n * @memberOf EmptyStateComponent\n */\n @Input()\n subtitleColor: string = 'gray-4';\n\n /**\n * @description Controls whether the icon is displayed.\n * @summary Determines if the visual icon should be shown in the empty state.\n * This can be provided as a boolean or a string that will be converted to a boolean.\n * Icons help visually communicate the empty state context to users.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf EmptyStateComponent\n */\n @Input()\n showIcon: StringOrBoolean = true;\n\n /**\n * @description The name of the icon to display.\n * @summary Specifies which icon to show when showIcon is true.\n * The component uses the icon system defined in the application,\n * and this value should correspond to an available icon name.\n *\n * @type {string}\n * @default \"ti-info-square-rounded\"\n * @memberOf EmptyStateComponent\n */\n @Input()\n icon: string = \"ti-info-square-rounded\";\n\n /**\n * @description The size of the displayed icon.\n * @summary Controls the size of the icon shown in the empty state.\n * Can be either 'large' or 'small' to accommodate different layout needs.\n *\n * @type {'large' | 'small' | undefined}\n * @default 'large'\n * @memberOf EmptyStateComponent\n */\n @Input()\n iconSize?: 'large' | 'small' = 'large';\n\n /**\n * @description The color of the displayed icon.\n * @summary Specifies the color for the icon using Ionic's predefined color system.\n * This allows the icon to match the application's color scheme.\n *\n * @type {PredefinedColors | undefined}\n * @default 'medium'\n * @memberOf EmptyStateComponent\n */\n @Input()\n iconColor?: PredefinedColors = 'medium';\n\n /**\n * @description The navigation target or action for the button.\n * @summary Specifies where the button should navigate to when clicked or what function\n * it should execute. This can be either a URL string or a function that handles navigation.\n * When not provided, the button will not perform any action.\n *\n * @type {string | FunctionLike | undefined}\n * @memberOf EmptyStateComponent\n */\n @Input()\n buttonLink?: string | FunctionLike;\n\n /**\n * @description The text displayed on the action button.\n * @summary Specifies the label for the action button in the empty state.\n * If translatable is true, this will be processed through the localization system.\n * If not provided, the button will not display any text.\n *\n * @type {string | undefined}\n * @memberOf EmptyStateComponent\n */\n @Input()\n buttonText?: string;\n\n /**\n * @description The fill style of the action button.\n * @summary Controls the visual style of the button using Ionic's button fill options.\n * 'solid' creates a button with a solid background, 'outline' creates a button with\n * just a border, and 'clear' creates a button with no background or border.\n *\n * @type {'clear' | 'solid' | 'outline'}\n * @default 'solid'\n * @memberOf EmptyStateComponent\n */\n @Input()\n buttonFill: 'clear' | 'solid' | 'outline' = 'solid';\n\n /**\n * @description The color of the action button.\n * @summary Specifies the color for the button using Ionic's color system.\n * This allows the button to match the application's color scheme.\n *\n * @type {Color}\n * @default 'primary'\n * @memberOf EmptyStateComponent\n */\n @Input()\n buttonColor: Color = 'primary';\n\n /**\n * @description The size of the action button.\n * @summary Controls the size of the button shown in the empty state.\n * Can be 'large', 'small', or 'default' to accommodate different layout needs.\n *\n * @type {'large' | 'small' | 'default'}\n * @default 'default'\n * @memberOf EmptyStateComponent\n */\n @Input()\n buttonSize: 'large' | 'small' | 'default' = 'default';\n\n /**\n * @description The search value that resulted in no results.\n * @summary When the empty state is shown due to a search with no results,\n * this property can hold the search term that was used. This can be displayed\n * in the empty state message to provide context to the user.\n *\n * @type {string}\n * @memberOf EmptyStateComponent\n */\n @Input()\n searchValue!: string;\n\n /**\n * @description Service for handling navigation operations.\n * @summary Injected service that provides methods for navigating between routes.\n * This service is used when the buttonLink is a string URL to navigate to that location.\n *\n * @private\n * @type {NavController}\n * @memberOf EmptyStateComponent\n */\n private navController: NavController = inject(NavController);\n\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n\n private translate: TranslateService = inject(TranslateService);\n\n searchSubtitle!: SafeHtml\n\n\n /**\n * @description Creates an instance of EmptyStateComponent.\n * @summary Initializes a new EmptyStateComponent by calling the parent class constructor\n * with the component name for logging and identification purposes. This component provides\n * a standardized way to display empty state messages with optional icons and action buttons.\n *\n * @memberOf EmptyStateComponent\n */\n constructor() {\n super(\"EmptyStateComponent\");\n addIcons(allIcons);\n }\n\n /**\n * @description Initializes the component after Angular first displays the data-bound properties.\n * @summary Sets up the component by processing boolean inputs, applying localization to text\n * elements if translation is enabled, and formatting CSS classes for title and subtitle colors.\n * This method prepares the component for user interaction by ensuring all properties are\n * properly initialized and localized.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant E as EmptyStateComponent\n *\n * A->>E: ngOnInit()\n * E->>E: Process translatable flag\n * E->>E: Process showIcon flag\n * E->>E: Get locale settings\n * alt translatable is true\n * E->>E: Localize title\n * E->>E: Localize subtitle\n * E->>E: Localize buttonText\n * end\n * E->>E: Format title CSS class\n * E->>E: Format subtitle CSS class\n *\n * @return {Promise<void>}\n * @memberOf EmptyStateComponent\n */\n async ngOnInit(): Promise<void> {\n this.parseProps(this);\n this.translatable = stringToBoolean(this.translatable);\n this.showIcon = stringToBoolean(this.showIcon);\n this.locale = this.getLocale(this.translatable);\n\n // if(this.translatable) {\n // this.title = generateLocaleFromString(this.locale, this.title);\n // this.subtitle = generateLocaleFromString(this.locale, this.subtitle);\n // this.buttonText = generateLocaleFromString(this.locale, this.buttonText);\n // }\n\n this.titleColor = `dcf-title color-${this.titleColor}`;\n this.subtitleColor = `dcf-subtitle color-${this.titleColor}`;\n\n if(this.searchValue && this.translatable)\n this.searchSubtitle = await this.getSearchSubtitle(this.subtitle as string);\n }\n\n /**\n * @description Handles click events on the action button.\n * @summary This method is triggered when the user clicks the action button in the empty state\n * component. It supports three navigation patterns: 1) no action when buttonLink is not provided,\n * 2) custom function execution when buttonLink is a function, and 3) navigation to a specific URL\n * when buttonLink is a string. This flexibility allows the empty state to trigger various actions\n * based on the context in which it's used.\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant E as EmptyStateComponent\n * participant N as NavController\n *\n * U->>E: Click action button\n * E->>E: handleClick()\n * alt buttonLink is not provided\n * E-->>U: Return false (no action)\n * else buttonLink is a function\n * E->>E: Execute buttonLink function\n * E-->>U: Return function result\n * else buttonLink is a URL string\n * E->>N: navigateForward(buttonLink)\n * N-->>E: Return navigation result\n * E-->>U: Return navigation result\n * end\n *\n * @return {boolean | void | Promise<boolean>}\n * - false if no action is taken\n * - The result of the buttonLink function if it's a function\n * - A Promise resolving to the navigation result if buttonLink is a URL\n * @memberOf EmptyStateComponent\n */\n handleClick(): boolean | void | Promise<boolean> {\n const fn = this.buttonLink;\n if(!fn)\n return false;\n if(fn instanceof Function)\n return fn();\n return this.navController.navigateForward(fn as string);\n }\n\n\n /**\n * @description Generates a localized and sanitized subtitle for search results.\n * @summary This method takes a content string, typically the subtitle, and processes it\n * through the translation service. It replaces a placeholder ('value0') with the actual\n * search value, then sanitizes the result to safely use as HTML. This is particularly\n * useful for displaying dynamic, localized messages in the empty state when a search\n * yields no results.\n *\n * @param {string} content - The content string to be translated and processed\n * @return {Promise<SafeHtml>} A promise that resolves to a sanitized HTML string\n *\n * @mermaid\n * sequenceDiagram\n * participant E as EmptyStateComponent\n * participant T as TranslateService\n * participant S as DomSanitizer\n *\n * E->>T: instant(content, {'value0': searchValue})\n * T-->>E: Return translated string\n * E->>S: bypassSecurityTrustHtml(translatedString)\n * S-->>E: Return sanitized SafeHtml\n *\n * @memberOf EmptyStateComponent\n */\n async getSearchSubtitle(content: string): Promise<SafeHtml> {\n const result = await this.translate.instant(content, {'value0': this.searchValue});\n return this.sanitizer.bypassSecurityTrustHtml(result);\n }\n}\n","\n<ion-card id=\"dcf-card-empty-state\" [ngClass]=\"className\">\n <ion-card-content>\n @if(icon && showIcon) {\n <div class=\"dcf-icon-container\">\n <ion-icon\n name=\"alert-circle-outline\"\n size=\"large\"\n color=\"danger\"\n />\n </div>\n }\n @if(title) {\n <h5 [class]=\"titleColor\" [innerHTML]=\"title\"></h5>\n }\n @if(subtitle) {\n @if(!searchValue) {\n <p [class]=\"subtitleColor\" [innerHTML]=\"subtitle\"></p>\n } @else {\n <p [class]=\"subtitleColor\" [innerHTML]=\"searchSubtitle\"></p>\n }\n }\n @if(buttonLink && buttonText) {\n <div>\n <ion-button\n [size]=\"buttonSize\"\n [fill]=\"buttonFill\"\n [color]=\"buttonColor\"\n (click)=\"handleClick()\">\n {{ buttonText }}\n </ion-button>\n </div>\n }\n </ion-card-content>\n</ion-card>\n","import { Directive, ElementRef, inject, OnInit } from '@angular/core';\n\n\n@Directive({\n selector: '[decafCollapsable]',\n standalone: true\n})\nexport class CollapsableDirective implements OnInit{\n\n private element: ElementRef<HTMLElement> = inject(ElementRef);\n // constructor() {}\n\n ngOnInit() {\n const element = this.element?.nativeElement;\n if(element) {\n const requiredFields = element.querySelectorAll('[required]') as NodeListOf<Element>;\n if(requiredFields.length) {\n const accordion = element?.closest('ion-accordion-group') as HTMLElement;\n accordion.setAttribute('value', 'open');\n }\n }\n }\n}\n","\nimport { AfterViewInit, ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA, ElementRef, inject, Input, ViewChild } from '@angular/core';\nimport { Dynamic, HTMLFormTarget } from '../../engine';\nimport { CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { CollapsableDirective } from '../../directives/collapsable.directive';\nimport { IonAccordion, IonAccordionGroup, IonItem } from '@ionic/angular/standalone';\n\n/**\n * @description Dynamic fieldset component with collapsible accordion functionality.\n * @summary This component provides a sophisticated fieldset container that automatically\n * adapts its behavior based on CRUD operations. It integrates seamlessly with Ionic's\n * accordion components to create expandable/collapsible sections for organizing form\n * content and related information. The component intelligently determines its initial\n * state based on the operation type, opening automatically for READ and DELETE operations\n * while remaining closed for CREATE and UPDATE operations.\n *\n * @example\n * ```html\n * <!-- Basic usage with automatic state management -->\n * <ngx-decaf-fieldset\n * name=\"Personal Information\"\n * [operation]=\"OperationKeys.READ\"\n * target=\"_self\">\n * <ion-input label=\"Name\" placeholder=\"Enter name\"></ion-input>\n * <ion-input label=\"Email\" type=\"email\" placeholder=\"Enter email\"></ion-input>\n * </ngx-decaf-fieldset>\n *\n * <!-- Advanced usage with custom operation -->\n * <ngx-decaf-fieldset\n * name=\"Contact Details\"\n * [operation]=\"currentOperation\"\n * target=\"_blank\">\n * <!-- Complex form fields -->\n * </ngx-decaf-fieldset>\n * ```\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant F as FieldsetComponent\n * participant I as Ionic Accordion\n * participant D as DOM\n *\n * F->>F: ngAfterViewInit()\n * alt operation is READ or DELETE\n * F->>F: Set isOpen = true\n * F->>D: Query accordion element\n * F->>I: Set value attribute to 'open'\n * F->>F: Trigger change detection\n * end\n * U->>I: Click accordion header\n * I->>F: handleChange(event)\n * F->>F: Update isOpen state\n * F->>I: Reflect new state\n *\n * @memberOf ForAngularModule\n */\n@Dynamic()\n@Component({\n standalone: true,\n selector: 'ngx-decaf-fieldset',\n templateUrl: './fieldset.component.html',\n styleUrls: ['./fieldset.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [ForAngularModule, IonAccordionGroup, IonAccordion, IonItem, CollapsableDirective],\n})\nexport class FieldsetComponent implements AfterViewInit {\n\n /**\n * @description Reference to the component's native DOM element.\n * @summary ViewChild reference that provides direct access to the component's root DOM element.\n * This is essential for manipulating the Ionic accordion group after view initialization,\n * particularly for setting the initial open state programmatically. The reference is used\n * to query and modify accordion attributes that control the component's expanded state.\n *\n * @type {ElementRef}\n * @memberOf FieldsetComponent\n */\n @ViewChild('component', { static: false, read: ElementRef })\n component!: ElementRef;\n\n /**\n * @description The display name or title of the fieldset section.\n * @summary Sets the legend or header text that appears in the accordion header. This text\n * provides a clear label for the collapsible section, helping users understand what content\n * is contained within. The name is displayed prominently and serves as the clickable area\n * for expanding/collapsing the fieldset.\n *\n * @type {string}\n * @default 'Child'\n * @memberOf FieldsetComponent\n */\n @Input()\n name: string = 'Child';\n\n /**\n * @description The current CRUD operation context.\n * @summary Determines the component's initial behavior and state based on the current operation.\n * This input is crucial for auto-state management: READ and DELETE operations automatically\n * open the fieldset to show content, while CREATE and UPDATE operations keep it closed\n * initially. This provides an intuitive user experience aligned with operation semantics.\n *\n * @type {OperationKeys}\n * @default OperationKeys.READ\n * @memberOf FieldsetComponent\n */\n @Input()\n operation: OperationKeys = OperationKeys.READ;\n\n /**\n * @description Form target attribute for nested form submissions.\n * @summary Specifies where to display the response after submitting forms contained within\n * the fieldset. This attribute mirrors the HTML form target behavior, allowing control over\n * whether form submissions open in the same window, new window, or specific frame. Useful\n * for complex form workflows and multi-step processes.\n *\n * @type {HTMLFormTarget}\n * @default '_self'\n * @memberOf FieldsetComponent\n */\n @Input()\n target: HTMLFormTarget = '_self';\n\n /**\n * @description Current state of the accordion (expanded or collapsed).\n * @summary Boolean flag that tracks whether the fieldset accordion is currently open or closed.\n * This property is automatically managed based on user interactions and initial operation state.\n * It serves as the single source of truth for the component's visibility state and is used\n * to coordinate between user actions and programmatic state changes.\n *\n * @type {boolean}\n * @default false\n * @memberOf FieldsetComponent\n */\n isOpen: boolean = false;\n\n /**\n * @description Reference to CRUD operation constants for template usage.\n * @summary Exposes the OperationKeys enum to the component template, enabling conditional\n * rendering and behavior based on operation types. This protected readonly property ensures\n * that template logic can access operation constants while maintaining encapsulation and\n * preventing accidental modification of the enum values.\n *\n * @type {CrudOperations}\n * @default OperationKeys.CREATE\n * @memberOf FieldsetComponent\n */\n protected readonly OperationKeys: CrudOperations = OperationKeys.CREATE;\n\n /**\n * @description Angular change detection service.\n * @summary Injected service that provides manual control over change detection cycles.\n * This is essential for ensuring that programmatic DOM changes (like setting accordion\n * attributes) are properly reflected in the component's state and trigger appropriate\n * view updates when modifications occur outside the normal Angular change detection flow.\n *\n * @private\n * @type {ChangeDetectorRef}\n * @memberOf FieldsetComponent\n */\n private changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * @description Initializes the component state after view and child components are rendered.\n * @summary This lifecycle hook implements intelligent auto-state management based on the current\n * CRUD operation. For READ and DELETE operations, the fieldset automatically opens to provide\n * immediate access to information, while CREATE and UPDATE operations keep it closed to maintain\n * a clean initial interface. The method directly manipulates the DOM to ensure proper accordion\n * synchronization and triggers change detection to reflect the programmatic state changes.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant F as FieldsetComponent\n * participant D as DOM\n * participant C as ChangeDetector\n *\n * A->>F: ngAfterViewInit()\n * alt operation is READ or DELETE\n * F->>F: Set isOpen = true\n * F->>D: Query ion-accordion-group element\n * alt accordion element exists\n * F->>D: Set value attribute to 'open'\n * end\n * end\n * F->>C: detectChanges()\n * C->>F: Update view with new state\n *\n * @returns {void}\n * @memberOf FieldsetComponent\n */\n ngAfterViewInit(): void {\n if (this.operation === OperationKeys.READ || this.operation === OperationKeys.DELETE) {\n this.isOpen = true;\n const accordionElement = this.component?.nativeElement.querySelector('ion-accordion-group');\n if(accordionElement)\n accordionElement.setAttribute('value', 'open');\n }\n this.changeDetectorRef.detectChanges();\n }\n\n /**\n * @description Handles accordion state change events from user interactions.\n * @summary Processes CustomEvent objects triggered when users expand or collapse the accordion.\n * This method extracts the new state from the event details and updates the component's\n * internal state accordingly. It specifically listens for ION-ACCORDION-GROUP events to\n * ensure proper event source validation and prevent handling of unrelated events.\n *\n * @param {CustomEvent} event - The event object containing accordion state change details\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant I as Ion-Accordion\n * participant F as FieldsetComponent\n *\n * U->>I: Click accordion header\n * I->>F: handleChange(CustomEvent)\n * F->>F: Extract target and detail from event\n * F->>F: Validate target is ION-ACCORDION-GROUP\n * alt valid target\n * F->>F: Update isOpen = !!value\n * end\n * F->>I: Reflect updated state\n *\n * @memberOf FieldsetComponent\n */\n handleChange(event: CustomEvent): void {\n const { target, detail } = event;\n const { value } = detail;\n if ((target as HTMLIonAccordionGroupElement).tagName === 'ION-ACCORDION-GROUP')\n this.isOpen = !!value;\n }\n}\n","<fieldset [class]=\"'dcf-fieldset ' + operation\" #component>\n <ion-accordion-group (ionChange)=\"handleChange($event)\">\n <ion-accordion value=\"open\">\n <ion-item slot=\"header\" >\n <legend>{{ name }}</legend>\n </ion-item>\n <div slot=\"content\" [attr.aria-hidden]=\"!isOpen\" decafCollapsable>\n <ng-content></ng-content>\n </div>\n </ion-accordion>\n </ion-accordion-group>\n</fieldset>\n","import { Component, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core';\nimport { AutocompleteTypes, PredefinedColors} from '@ionic/core';\nimport { StringOrBoolean } from '../../engine/types';\nimport {windowEventEmitter} from '../../helpers/utils';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { stringToBoolean } from '../../helpers/utils';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { IonSearchbar } from '@ionic/angular/standalone';\nimport * as allIcons from 'ionicons/icons';\nimport { addIcons } from 'ionicons';\n\n/**\n * @description Searchbar component for Angular applications.\n * @summary The SearchbarComponent provides a highly customizable search input field with comprehensive\n * options for appearance, behavior, and interaction patterns. It extends NgxBaseComponent to inherit\n * common functionality and implements OnInit for proper lifecycle management. This component features\n * debounced input handling, window event integration, visibility controls, and extensive styling options.\n * It's designed to be flexible and adaptable to different search requirements within modern web applications.\n *\n * @class SearchbarComponent\n * @extends {NgxBaseComponent}\n * @implements {OnInit}\n * @memberOf SearchbarComponent\n */\n@Component({\n selector: 'ngx-decaf-searchbar',\n templateUrl: './searchbar.component.html',\n styleUrls: ['./searchbar.component.scss'],\n standalone: true,\n imports: [ForAngularModule, IonSearchbar],\n})\nexport class SearchbarComponent extends NgxBaseComponent implements OnInit {\n\n /**\n * @description The mode of the searchbar.\n * @summary Determines the visual style of the searchbar, either iOS or Material Design.\n * @type {\"ios\" | \"md\" | undefined}\n * @default \"ios\"\n */\n // @Input()\n // override mode: \"ios\" | \"md\" | undefined = \"md\";\n\n /**\n * @description The autocomplete attribute for the searchbar input.\n * @summary Specifies whether the browser should enable autocomplete for the input field.\n * This controls the browser's built-in autocomplete functionality, helping users by\n * suggesting previously entered values or common inputs. Setting to 'off' disables\n * this feature for privacy or security reasons.\n *\n * @type {AutocompleteTypes | undefined}\n * @default \"off\"\n * @memberOf SearchbarComponent\n */\n @Input()\n autocomplete: AutocompleteTypes | undefined = \"off\";\n\n /**\n * @description The autocorrect attribute for the searchbar input.\n * @summary Controls whether the browser should enable autocorrect functionality for the input field.\n * When enabled, the browser will automatically correct spelling mistakes as the user types.\n * This is typically disabled for search fields to preserve the user's exact search terms.\n *\n * @type {\"on\" | \"off\"}\n * @default \"off\"\n * @memberOf SearchbarComponent\n */\n @Input()\n autocorrect: \"on\" | \"off\" = \"off\";\n\n /**\n * @description Whether the searchbar should animate.\n * @summary Controls the animation behavior of the searchbar during appearance and disappearance transitions.\n * When enabled, the searchbar will use smooth animations for state changes, providing a more\n * polished user experience. This affects transitions like showing/hiding the component.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf SearchbarComponent\n */\n @Input()\n animated: StringOrBoolean = true;\n\n /**\n * @description The text for the cancel button.\n * @summary Specifies the localized text to be displayed on the cancel button of the searchbar.\n * This text appears when the cancel button is visible and provides users with a clear\n * indication of how to dismiss the search interface. The text can be customized for\n * different languages and cultural contexts.\n *\n * @type {string}\n * @default \"Cancel\"\n * @memberOf SearchbarComponent\n */\n @Input()\n buttonCancelText: string = \"Cancel\";\n\n /**\n * @description The icon to use for the clear button.\n * @summary Specifies the icon to be displayed for the clear button of the searchbar.\n * @type {string | undefined}\n * @default undefined\n * @memberOf SearchbarComponent\n */\n @Input()\n clearIcon: string | undefined = undefined;\n\n /**\n * @description The color of the searchbar.\n * @summary Specifies the color theme to be applied to the searchbar.\n * @type {string | undefined}\n * @default undefined\n * @memberOf SearchbarComponent\n */\n @Input()\n color: string | undefined = undefined;\n\n /**\n * @description The amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.\n * @summary Controls the debounce time for the search input to reduce the frequency of event emissions.\n * @type {number}\n * @default 500\n * @memberOf SearchbarComponent\n */\n @Input()\n debounce: number = 500;\n\n /**\n * @description Whether the searchbar is disabled.\n * @summary Controls whether the searchbar is interactive or not.\n * @type {StringOrBoolean}\n * @default false\n * @memberOf SearchbarComponent\n */\n @Input()\n disabled: StringOrBoolean = false;\n\n /**\n * @description A hint to the browser for which enter key to display.\n * @summary Specifies the type of action that will be performed when the enter key is pressed.\n * @type {\"search\" | \"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"send\" | undefined}\n * @default \"enter\"\n * @memberOf SearchbarComponent\n */\n @Input()\n enterkeyhint: \"search\" | \"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"send\" | undefined = \"enter\";\n\n /**\n * @description The input mode for the searchbar.\n * @summary Specifies the type of data that might be entered by the user while editing the element or its contents.\n * @type {\"text\" | \"search\" | \"none\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined}\n * @default 'search'\n * @memberOf SearchbarComponent\n */\n @Input()\n inputmode: \"text\" | \"search\" | \"none\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined = 'search';\n\n /**\n * @description The placeholder for the searchbar input.\n * @summary Specifies the placeholder text to be displayed in the searchbar when it's empty.\n * @type {string}\n * @default \"Search\"\n * @memberOf SearchbarComponent\n */\n @Input()\n placeholder = \"Search\";\n\n /**\n * @description The icon to use for the search button.\n * @summary Specifies the icon to be displayed for the search button of the searchbar.\n * @type {string | undefined}\n * @default \"search-outline\"\n * @memberOf SearchbarComponent\n */\n @Input()\n searchIcon: string | undefined = \"search-outline\";\n\n /**\n * @description When to show the cancel button.\n * @summary Controls the visibility of the cancel button in different states of the searchbar.\n * @type {\"always\" | \"focus\" | \"never\"}\n * @default \"never\"\n * @memberOf SearchbarComponent\n */\n @Input()\n showCancelButton: \"always\" | \"focus\" | \"never\" = \"never\";\n\n /**\n * @description When to show the clear button.\n * @summary Controls the visibility of the clear button in different states of the searchbar.\n * @type {\"always\" | \"focus\" | \"never\"}\n * @default \"focus\"\n * @memberOf SearchbarComponent\n */\n @Input()\n showClearButton: \"always\" | \"focus\" | \"never\" = \"focus\";\n\n /**\n * @description Whether to enable spellcheck on the searchbar input.\n * @summary Controls whether the browser's spellcheck feature is enabled for the searchbar input.\n * @type {boolean}\n * @default false\n * @memberOf SearchbarComponent\n */\n @Input()\n spellcheck: boolean = false;\n\n /**\n * @description The type of input to use for the searchbar.\n * @summary Specifies the type of control to display for the searchbar input.\n * @type {\"number\" | \"text\" | \"search\" | \"email\" | \"password\" | \"tel\" | \"url\" | undefined}\n * @default \"search\"\n * @memberOf SearchbarComponent\n */\n @Input()\n type: \"number\" | \"text\" | \"search\" | \"email\" | \"password\" | \"tel\" | \"url\" | undefined = \"search\";\n\n /**\n * @description The value of the searchbar input.\n * @summary Specifies the current value of the searchbar input.\n * @type {null | string | undefined}\n * @default \"\"\n * @memberOf SearchbarComponent\n */\n @Input()\n value: null | string | undefined = \"\";\n\n /**\n * @description The keys to use for querying.\n * @summary Specifies the keys to be used when performing a search query.\n * @type {string | string[]}\n * @default \"name\"\n * @memberOf SearchbarComponent\n */\n @Input()\n queryKeys: string | string[] = \"name\";\n\n /**\n * @description Whether the searchbar is visible.\n * @summary Controls the visibility of the searchbar component.\n * @type {StringOrBoolean}\n * @default false\n * @memberOf SearchbarComponent\n */\n @Input()\n isVisible: StringOrBoolean = false;\n\n /**\n * @description Whether to wrap the searchbar in a container.\n * @summary Controls whether the searchbar is wrapped in an additional container element.\n * @type {StringOrBoolean}\n * @default false\n * @memberOf SearchbarComponent\n */\n @Input()\n wrapper: StringOrBoolean = false;\n\n /**\n * @description The color of the wrapper.\n * @summary Specifies the color theme to be applied to the wrapper container, if present.\n * @type {PredefinedColors}\n * @default \"primary\"\n * @memberOf SearchbarComponent\n */\n @Input()\n wrapperColor: PredefinedColors = \"primary\";\n\n /**\n * @description Whether to emit events to the window.\n * @summary Controls whether search events should be emitted as window events.\n * @type {StringOrBoolean}\n * @default true\n * @memberOf SearchbarComponent\n */\n @Input()\n emitEventToWindow: StringOrBoolean = true;\n\n /**\n * @description The current value of the searchbar.\n * @summary Stores the current value of the searchbar input for internal state management and processing.\n * This property is used to track the search term throughout the component's lifecycle and\n * coordinate between different event handlers and methods.\n *\n * @type {string | undefined}\n * @memberOf SearchbarComponent\n */\n currentValue: string | undefined;\n\n /**\n * @description Event emitter for search events.\n * @summary Emits search events when the user interacts with the searchbar, providing a reactive\n * interface for parent components to respond to search actions. This event is triggered by\n * various user interactions including typing, clearing, and explicit search actions.\n *\n * @type {EventEmitter<string>}\n * @memberOf SearchbarComponent\n */\n @Output()\n searchEvent: EventEmitter<string> = new EventEmitter<string>();\n\n /**\n * @description Creates an instance of SearchbarComponent.\n * @summary Initializes the SearchbarComponent with all necessary dependencies and configurations.\n * During initialization, it adds all available Ionicons to the application's icon registry,\n * ensuring that search and clear icons are available for use throughout the component's lifecycle.\n *\n * @memberOf SearchbarComponent\n */\n constructor() {\n super('SearchbarComponent');\n addIcons(allIcons)\n }\n\n /**\n * @description Initializes the component after Angular first displays the data-bound properties.\n * @summary Performs essential component initialization by converting string-based boolean inputs\n * to proper boolean values using the stringToBoolean utility. This ensures that all boolean\n * properties work correctly regardless of how they were passed from parent components or templates.\n *\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant S as SearchbarComponent\n * participant U as Utility Functions\n *\n * A->>S: ngOnInit()\n * S->>U: stringToBoolean(emitEventToWindow)\n * U-->>S: boolean value\n * S->>U: stringToBoolean(wrapper)\n * U-->>S: boolean value\n * S->>U: stringToBoolean(isVisible)\n * U-->>S: boolean value\n * S->>U: stringToBoolean(disabled)\n * U-->>S: boolean value\n * S->>U: stringToBoolean(animated)\n * U-->>S: boolean value\n * Note over S: Component ready for interaction\n *\n * @memberOf SearchbarComponent\n */\n ngOnInit(): void {\n this.emitEventToWindow = stringToBoolean(this.emitEventToWindow);\n this.wrapper = stringToBoolean(this.wrapper);\n this.isVisible = stringToBoolean(this.isVisible);\n this.disabled = stringToBoolean(this.disabled);\n this.animated = stringToBoolean(this.animated);\n }\n\n /**\n * @description Handles the visibility toggle of the searchbar component.\n * @summary Listens for global window events to toggle the visibility state of the searchbar.\n * When the searchbar becomes visible, it automatically focuses on the input field after a brief\n * delay to ensure smooth animation completion. This provides a seamless user experience for\n * search activation through keyboard shortcuts or programmatic triggers.\n *\n * @param {CustomEvent} event - The custom event triggering the visibility toggle (unused but required by HostListener)\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant W as Window\n * participant S as SearchbarComponent\n * participant E as DOM Element\n *\n * W->>S: toggleSearchbarVisibility event\n * S->>S: handleToggleVisibility()\n * S->>S: Toggle isVisible state\n * alt isVisible is true AND component exists\n * S->>S: setTimeout(125ms)\n * S->>E: setFocus() on ion-searchbar\n * end\n *\n * @memberOf SearchbarComponent\n */\n @HostListener(\"window:toggleSearchbarVisibility\", ['$event'])\n handleToggleVisibility(): void {\n this.isVisible = !this.isVisible;\n if(this.isVisible && !!this.component.nativeElement) {\n setTimeout(() => {\n (this.component.nativeElement as HTMLIonSearchbarElement).setFocus();\n }, 125);\n }\n }\n\n /**\n * @description Triggers a manual search event with the current searchbar value.\n * @summary Retrieves the current value from the searchbar's native element and emits it as a search event.\n * This method provides a programmatic way to trigger search functionality, useful for external\n * components or keyboard shortcuts that need to execute search without user interaction with the searchbar itself.\n *\n * @return {void}\n * @memberOf SearchbarComponent\n */\n search(): void {\n const element = this.component.nativeElement as HTMLIonSearchbarElement;\n this.searchEvent.emit(element.value || undefined);\n }\n\n /**\n * @description Handles value changes in the searchbar input field.\n * @summary Processes change events from the Ionic searchbar component and extracts the new value\n * to emit as a search event. This method is triggered when the user finishes editing the searchbar\n * value, providing a way to react to completed input changes rather than real-time typing.\n *\n * @param {CustomEvent} event - The change event from the Ionic searchbar containing the new value\n * @return {void}\n * @memberOf SearchbarComponent\n */\n handleChange(event: CustomEvent): void {\n this.emitEvent(event?.detail?.value ?? undefined);\n }\n\n /**\n * @description Handles clearing of the searchbar input field.\n * @summary Emits an undefined value as a search event when the searchbar is cleared by the user.\n * This method is typically triggered when the user clicks the clear button or uses other\n * clear mechanisms, signaling that the search should be reset or cleared.\n *\n * @return {void}\n * @memberOf SearchbarComponent\n */\n handleClear(): void {\n this.emitEvent(undefined);\n }\n\n /**\n * @description Handles real-time input events on the searchbar.\n * @summary Processes input events as the user types, providing immediate feedback for search functionality.\n * This method implements smart clearing behavior - if the input becomes empty, it automatically\n * triggers the clear handler. Otherwise, it emits the current value for real-time search suggestions\n * or filtering. This enables responsive search experiences with debounced event handling.\n *\n * @param {CustomEvent} event - The input event from the Ionic searchbar containing the current value\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant S as SearchbarComponent\n * participant E as Event System\n *\n * U->>S: Type in searchbar\n * S->>S: handleInput(event)\n * S->>S: Extract value from event\n * alt value is empty or null\n * S->>S: handleClear()\n * S->>E: Emit undefined\n * else value has content\n * S->>S: emitEvent(value)\n * S->>E: Emit search value\n * end\n *\n * @memberOf SearchbarComponent\n */\n handleInput(event: CustomEvent): void {\n const value = event?.detail?.value;\n if(!value || !value?.length)\n return this.handleClear();\n this.emitEvent(value);\n }\n\n /**\n * @description Handles blur events on the searchbar.\n * @summary Currently an empty method, can be implemented for specific blur behavior.\n * @param {CustomEvent} event - The blur event from the searchbar\n * @return {void}\n */\n // handleBlur(event: CustomEvent): void {}\n\n /**\n * @description Emits search events through multiple channels.\n * @summary Orchestrates the emission of search events both as component output events and optionally\n * as global window events. This dual-channel approach enables both direct parent-child communication\n * and application-wide event broadcasting, supporting flexible integration patterns and loose coupling\n * between components that need to respond to search actions.\n *\n * @param {string | undefined} value - The search value to emit across all configured channels\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant S as SearchbarComponent\n * participant P as Parent Component\n * participant W as Window Event System\n *\n * S->>S: emitEvent(value)\n * S->>P: searchEvent.emit(value)\n * alt emitEventToWindow is true\n * S->>W: windowEventEmitter('searchbarEvent', {value})\n * end\n *\n * @memberOf SearchbarComponent\n */\n emitEvent(value: string | undefined): void {\n this.searchEvent.emit(value);\n if(this.emitEventToWindow)\n windowEventEmitter('searchbarEvent', {value: value})\n }\n\n /**\n * @description Prevents default behavior of DOM events.\n * @summary Utility method to prevent unwanted default actions on DOM events, such as form submissions\n * or navigation triggers. This is commonly used in event handlers where the default browser behavior\n * would interfere with the component's custom logic or user experience design.\n *\n * @param {Event} event - The DOM event whose default behavior should be prevented\n * @return {void}\n * @memberOf SearchbarComponent\n */\n preventChange(event: Event): void {\n event.preventDefault();\n }\n}\n","<ion-searchbar\n ngClass=\"dcf-searchbar\"\n name=\"search\"\n mode=\"ios\"\n (keyup.enter)=\"preventChange($event)\"\n (ionChange)=\"handleChange($event)\"\n (ionInput)=\"handleInput($event)\"\n (ionClear)=\"handleClear()\"\n [autocomplete]=\"autocomplete\"\n [showCancelButton]=\"showCancelButton\"\n [cancelButtonText]=\"buttonCancelText\"\n [clearIcon]=\"clearIcon\"\n [color]=\"color\"\n [debounce]=\"debounce\"\n [disabled]=\"disabled\"\n [enterkeyhint]=\"enterkeyhint\"\n [inputmode]=\"inputmode\"\n [placeholder]=\"placeholder\"\n [searchIcon]=\"searchIcon\"\n [showClearButton]=\"showClearButton\"\n [spellcheck]=\"spellcheck\"\n [type]=\"type\"\n #component\n />\n","import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { IonChip, IonIcon, IonItem, IonLabel, IonSelect} from '@ionic/angular/standalone';\nimport { Dynamic, IFilterQuery, IFilterQueryItem } from '../../engine';\nimport { getWindowWidth } from '../../helpers/utils';\nimport { debounceTime, fromEvent, Subscription } from 'rxjs';\nimport { OrderDirection, Repository } from '@decaf-ts/core';\nimport { Model } from '@decaf-ts/decorator-validation';\nimport { SearchbarComponent } from '../searchbar/searchbar.component';\nimport { addIcons } from 'ionicons';\nimport { chevronDownOutline, chevronUpOutline } from 'ionicons/icons';\n\n/**\n * @description Advanced filter component for creating dynamic search filters with step-by-step construction.\n * @summary This component provides a comprehensive filtering interface that allows users to build\n * complex search criteria using a three-step approach: select index → select condition → enter value.\n * It supports filtering by multiple field indexes, comparison conditions, and values, displaying\n * selected filters as removable chips. The component is responsive and includes auto-suggestions\n * with keyboard navigation support.\n *\n * @example\n * ```html\n * <ngx-decaf-filter\n * [indexes]=\"['name', 'email', 'department', 'status']\"\n * [conditions]=\"['Equal', 'Contains', 'Greater Than', 'Less Than']\"\n * [sort]=\"['createdAt', 'updatedAt']\"\n * [disableSort]=\"false\"\n * (filterEvent)=\"onFiltersChanged($event)\">\n * </ngx-decaf-filter>\n * ```\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant F as FilterComponent\n * participant P as Parent Component\n *\n * U->>F: Focus input field\n * F->>F: handleFocus() - Show available indexes\n * U->>F: Select index (e.g., \"name\")\n * F->>F: addFilter() - Step 1 completed\n * F->>F: Show available conditions\n * U->>F: Select condition (e.g., \"Contains\")\n * F->>F: addFilter() - Step 2 completed\n * F->>F: Show value input prompt\n * U->>F: Enter value and press Enter\n * F->>F: addFilter() - Step 3 completed\n * F->>F: Create complete filter object\n * F->>P: Emit filterEvent with new filter array\n * F->>F: Reset to step 1 for next filter\n *\n * @memberOf ForAngularModule\n */\n@Dynamic()\n@Component({\n selector: 'ngx-decaf-filter',\n templateUrl: './filter.component.html',\n styleUrls: ['./filter.component.scss'],\n imports: [\n ForAngularModule,\n IonLabel,\n IonItem,\n IonChip,\n IonIcon,\n IonSelect,\n IonIcon,\n SearchbarComponent\n ],\n standalone: true,\n})\nexport class FilterComponent extends NgxBaseComponent implements OnInit, OnDestroy {\n\n /**\n * @description Reference to the dropdown options container element.\n * @summary ViewChild reference used to access and manipulate the dropdown options element\n * for highlighting filtered items and managing visual feedback during option selection.\n * This element contains the filterable suggestions that users can interact with.\n *\n * @type {ElementRef}\n * @memberOf FilterComponent\n */\n @ViewChild('optionsFilterElement', { read: ElementRef, static: false })\n optionsFilterElement!: ElementRef;\n\n /**\n * @description Available field indexes for filtering operations.\n * @summary Defines the list of field names that users can filter by. These represent\n * the data properties available for filtering operations. Each index corresponds to\n * a field in the data model that supports comparison operations.\n *\n * @type {string[]}\n * @default []\n * @memberOf FilterComponent\n */\n @Input()\n indexes: string[] = [];\n\n /**\n * @description Available comparison conditions for filters.\n * @summary Defines the list of comparison operators that can be used when creating filters.\n * These conditions determine how the filter value is compared against the field value.\n * Common conditions include equality, containment, and numerical comparison operations.\n *\n * @type {string[]}\n * @default []\n * @memberOf FilterComponent\n */\n @Input()\n conditions: string[] = ['Equal', 'Contains', 'Not Contains', 'Greater Than', 'Less Than', 'Not Equal'];\n\n /**\n * @description Available sorting options for the filtered data.\n * @summary Defines the list of field names that can be used for sorting the filtered results.\n * When disableSort is false, this array is automatically merged with the indexes array\n * to provide comprehensive sorting capabilities.\n *\n * @type {string[]}\n * @default []\n * @memberOf FilterComponent\n */\n @Input()\n sortBy: string[] = [];\n\n /**\n * @description Controls whether sorting functionality is disabled.\n * @summary When set to true, prevents the automatic merging of sort and indexes arrays,\n * effectively disabling sorting capabilities. This is useful when you want to provide\n * filtering without sorting options.\n *\n * @type {boolean}\n * @default false\n * @memberOf FilterComponent\n */\n @Input()\n disableSort: boolean = false;\n\n /**\n * @description Current window width for responsive behavior.\n * @summary Stores the current browser window width in pixels. This value is updated\n * on window resize events to enable responsive filtering behavior and layout adjustments\n * based on available screen space.\n *\n * @type {number}\n * @memberOf FilterComponent\n */\n windowWidth!: number;\n\n /**\n * @description Available options for the current filter step.\n * @summary Contains the list of options available for selection in the current step.\n * This array changes dynamically based on the current step: indexes → conditions → empty for value input.\n *\n * @type {string[]}\n * @default []\n * @memberOf FilterComponent\n */\n options: string[] = [];\n\n /**\n * @description Filtered options based on user input.\n * @summary Contains the subset of options that match the current user input for real-time\n * filtering. This array is updated as the user types to show only relevant suggestions\n * in the dropdown menu.\n *\n * @type {string[]}\n * @default []\n * @memberOf FilterComponent\n */\n filteredOptions: string[] = [];\n\n /**\n * @description Complete filter objects created by the user.\n * @summary Array of complete filter objects, each containing index, condition, and value properties.\n * These represent the active filters that can be applied to data operations.\n *\n * @type {KeyValue[]}\n * @default []\n * @memberOf FilterComponent\n */\n filterValue: IFilterQueryItem[] = [];\n\n /**\n * @description Current filter being constructed.\n * @summary Temporary object that accumulates filter properties (index, condition, value)\n * during the three-step filter creation process. Gets added to filterValue when complete.\n *\n * @type {KeyValue}\n * @default {}\n * @memberOf FilterComponent\n */\n lastFilter: IFilterQueryItem = {};\n\n /**\n * @description Current step in the filter creation process.\n * @summary Tracks the current step of filter creation: 1 = index selection, 2 = condition selection,\n * 3 = value input. Automatically resets to 1 after completing a filter.\n *\n * @type {number}\n * @default 1\n * @memberOf FilterComponent\n */\n step: number = 1;\n\n /**\n * @description Controls dropdown visibility state.\n * @summary Boolean flag that determines whether the options dropdown is currently visible.\n * Used to manage the dropdown's open/close state and coordinate with focus/blur events.\n *\n * @type {boolean}\n * @default false\n * @memberOf FilterComponent\n */\n dropdownOpen: boolean = false;\n\n /**\n * @description Current input field value.\n * @summary Stores the current text input value that the user is typing. This value is\n * bound to the input field and is cleared after each successful filter step completion.\n *\n * @type {string}\n * @default ''\n * @memberOf FilterComponent\n */\n value: string = '';\n\n /**\n * @description Current sorting field value.\n * @summary Stores the field name currently selected for sorting operations.\n * This value determines which field is used to order the filtered results.\n * Defaults to 'id' and can be changed through the sort dropdown selection.\n *\n * @type {string}\n * @default 'id'\n * @memberOf FilterComponent\n */\n sortValue: string = 'id';\n\n /**\n * @description Current sorting direction.\n * @summary Defines the direction of the sort operation - ascending or descending.\n * This value works in conjunction with sortValue to determine the complete\n * sorting configuration for filtered results.\n *\n * @type {OrderDirection}\n * @default OrderDirection.DSC\n * @memberOf FilterComponent\n */\n sortDirection: OrderDirection = OrderDirection.DSC;\n\n /**\n * @description Subscription for window resize events.\n * @summary RxJS subscription that listens for window resize events with debouncing\n * to update the windowWidth property. This enables responsive behavior and prevents\n * excessive updates during resize operations.\n *\n * @type {Subscription}\n * @memberOf FilterComponent\n */\n windowResizeSubscription!: Subscription;\n\n /**\n * @description Event emitter for filter changes.\n * @summary Emits filter events when the user creates, modifies, or clears filters.\n * The emitted value contains an array of complete filter objects or undefined when\n * filters are cleared. Parent components listen to this event to update their data display.\n *\n * @type {EventEmitter<KeyValue[] | undefined>}\n * @memberOf FilterComponent\n */\n @Output()\n filterEvent: EventEmitter<IFilterQuery | undefined> = new EventEmitter<IFilterQuery | undefined>();\n\n /**\n * @description Event emitter for search events.\n * @summary Emits search events when the user interacts with the searchbar.\n * @type {EventEmitter<string>}\n * @memberOf FilterComponent\n */\n @Output()\n searchEvent: EventEmitter<string> = new EventEmitter<string>();\n\n\n /**\n * @description Constructor for FilterComponent.\n * @summary Initializes a new instance of the FilterComponent.\n * Calls the parent constructor with the component name to establish base locale string generation\n * and internationalization support.\n *\n * @memberOf FilterComponent\n */\n constructor() {\n super(\"FilterComponent\");\n addIcons({chevronDownOutline, chevronUpOutline});\n }\n\n /**\n * @description Initializes the component after Angular first displays the data-bound properties.\n * @summary Sets up the component by initializing window width tracking, setting up resize event\n * subscriptions with debouncing, configuring sorting options, and calling the base initialization.\n * This method prepares the component for user interaction and responsive behavior.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant F as FilterComponent\n * participant W as Window\n * participant R as RxJS\n *\n * A->>F: ngOnInit()\n * F->>W: getWindowWidth()\n * W-->>F: Return current width\n * F->>R: Setup resize subscription with debounce\n * R-->>F: Subscription created\n * alt disableSort is false\n * F->>F: Merge sort and indexes arrays\n * end\n * F->>F: Call initialize()\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n ngOnInit(): void {\n this.windowWidth = getWindowWidth() as number;\n this.windowResizeSubscription = fromEvent(window, 'resize')\n .pipe(debounceTime(300))\n .subscribe(() => {\n this.windowWidth = getWindowWidth() as number;\n });\n\n this.getIndexes();\n this.initialize();\n }\n\n /**\n * @description Retrieves and configures available indexes for filtering and sorting.\n * @summary Extracts field indexes from the model if available and merges them with\n * sorting options when sorting is enabled. This method sets up the available field\n * options for both filtering and sorting operations based on the model structure.\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n getIndexes(): void {\n if(this.model)\n this.indexes = Object.keys(Repository.indexes(this.model as Model) || {});\n if(!this.disableSort)\n this.sortBy = [... this.sortBy, ...this.indexes];\n }\n\n\n /**\n * @description Cleanup method called when the component is destroyed.\n * @summary Unsubscribes from window resize events to prevent memory leaks.\n * This is essential for proper cleanup of RxJS subscriptions when the component\n * is removed from the DOM.\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n ngOnDestroy(): void {\n this.windowResizeSubscription.unsubscribe();\n this.clear();\n }\n\n /**\n * @description Handles input events from the text field.\n * @summary Processes user input and filters the available options based on the typed value.\n * This method provides real-time filtering of suggestions as the user types in the input field.\n *\n * @param {InputEvent} event - The input event containing the new value\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleInput(event: InputEvent): void {\n const {value} = event.target as HTMLInputElement;\n this.filteredOptions = this.filterOptions(value);\n }\n\n /**\n * @description Handles focus events on the input field.\n * @summary Sets up the available options when the input field receives focus and opens the dropdown.\n * If no options are provided, automatically determines the appropriate options based on current step.\n * This method initializes the dropdown with contextually relevant suggestions.\n *\n * @param {string[]} options - Optional array of options to display\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleFocus(options: string[] = []): void {\n if(!options.length)\n options = this.getOptions();\n this.filteredOptions = this.options = options;\n this.dropdownOpen = true;\n }\n\n /**\n * @description Handles blur events on the input field with delayed closing.\n * @summary Manages the dropdown closing behavior with a delay to allow for option selection.\n * Uses a two-phase approach to prevent premature closing when users click on dropdown options.\n *\n * @param {boolean} close - Internal flag to control the closing phase\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleBlur(close: boolean = false): void {\n if(!close) {\n this.dropdownOpen = false;\n setTimeout(() => {\n this.handleBlur(true);\n }, 100);\n } else {\n if(!this.dropdownOpen && this.options.length) {\n setTimeout(() => {\n this.options = [];\n this.dropdownOpen = false;\n }, 50);\n }\n }\n }\n\n /**\n * @description Determines the appropriate options based on the current filter step.\n * @summary Returns the contextually relevant options for the current step in the filter creation process.\n * Step 1 shows indexes, Step 2 shows conditions, Step 3 shows no options (value input).\n *\n * @returns {string[]} Array of options appropriate for the current step\n * @memberOf FilterComponent\n */\n getOptions(): string[] {\n switch (this.step) {\n case 1:\n this.options = this.indexes;\n break;\n case 2:\n this.options = this.conditions;\n break;\n case 3:\n this.options = [];\n break;\n }\n return this.options\n }\n\n /**\n * @description Adds a filter step or completes filter creation through a three-step process.\n * @summary Core method for building filters step by step: Step 1 (Index) → Step 2 (Condition) → Step 3 (Value).\n * When all steps are complete, creates a complete filter object and adds it to the filter collection.\n * Handles both keyboard events (Enter to submit) and programmatic calls.\n *\n * @param {string} value - The value to add for the current step\n * @param {CustomEvent} event - Optional event (KeyboardEvent triggers submission when value is empty)\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant F as FilterComponent\n *\n * U->>F: addFilter(value, event)\n * F->>F: Trim and validate value\n * alt KeyboardEvent && empty value\n * F->>F: submit() - Send current filters\n * else Valid value or step 3\n * alt Step 1 (Index)\n * F->>F: lastFilter.index = value\n * F->>F: options = conditions\n * else Step 2 (Condition)\n * F->>F: lastFilter.condition = value\n * F->>F: options = []\n * else Step 3 (Value)\n * F->>F: lastFilter.value = value\n * F->>F: Add complete filter to filterValue\n * F->>F: Reset step to 1\n * end\n * F->>F: Increment step\n * F->>F: Clear input & focus\n * F->>F: Show next options\n * end\n *\n * @memberOf FilterComponent\n */\n addFilter(value: string, event?: CustomEvent): void {\n value = value.trim();\n if(event instanceof KeyboardEvent && !value) {\n this.submit();\n } else {\n if((value && (!(event instanceof KeyboardEvent)) || this.step === 3)) {\n const filter = this.lastFilter;\n switch (this.step) {\n case 1:\n filter['index'] = value;\n this.options = this.conditions;\n break;\n case 2:\n filter['condition'] = value;\n this.options = [];\n break;\n case 3:\n filter['value'] = value;\n this.options = this.indexes;\n break;\n }\n if(!this.filterValue.length) {\n this.filterValue.push(filter);\n } else {\n if(this.step === 1)\n this.filterValue.push(filter);\n }\n if(this.step === 3) {\n this.step = 0;\n this.filterValue[this.filterValue.length - 1] = filter;\n this.lastFilter = {};\n }\n this.step++;\n this.value = '';\n if(this.options.length)\n this.handleFocus(this.options);\n this.component.nativeElement.focus();\n }\n }\n }\n\n /**\n * @description Selects an option from the dropdown suggestions.\n * @summary Handles option selection when a user clicks on a suggestion in the dropdown.\n * This method acts as a bridge between dropdown clicks and the main addFilter logic.\n *\n * @param {CustomEvent} event - The click event from the dropdown option\n * @param {string} value - The selected option value\n * @returns {void}\n * @memberOf FilterComponent\n */\n selectOption(value: string): void {\n this.addFilter(value);\n }\n\n /**\n * @description Determines if a filter option can be individually removed.\n * @summary Checks whether a filter component should display a close icon for removal.\n * Only value options can be removed individually; index and condition options are part\n * of the complete filter structure and cannot be removed separately.\n *\n * @param {string} option - The filter option text to check\n * @returns {boolean} True if the option can be cleared individually, false otherwise\n * @memberOf FilterComponent\n */\n allowClear(option: string): boolean {\n return this.indexes.indexOf(option) === -1 && this.conditions.indexOf(option) === -1;\n }\n\n /**\n * @description Removes a complete filter from the collection based on filter value.\n * @summary Removes a complete filter by matching the provided value against filter values\n * in the collection. Uses string normalization to handle accents and case differences.\n * After removal, resets the interface to show available indexes for new filter creation.\n *\n * @param {string} filter - The filter value to remove (matches against filter.value property)\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant F as FilterComponent\n *\n * U->>F: removeFilter(filterValue)\n * F->>F: cleanString(filterValue)\n * F->>F: Filter out matching filter objects\n * F->>F: Clear input value\n * F->>F: handleFocus(indexes) - Reset to index selection\n * Note over F: Filter removed and UI reset\n *\n * @memberOf FilterComponent\n */\n removeFilter(filter: string): void {\n function cleanString(filter: string): string {\n return filter\n .toLowerCase() // convert all characters to lowercase\n .normalize(\"NFD\") // separate accent marks from characters\n .replace(/[\\u0300-\\u036f]/g, \"\") // remove accent marks\n .replace(/\\s+/g, \"\"); // remove all whitespace\n }\n this.value = \"\";\n this.filterValue = this.filterValue.filter((item) => item?.['value'] && cleanString(item?.['value']) !== cleanString(filter));\n if(this.filterValue.length === 0) {\n this.step = 1;\n this.lastFilter = {};\n }\n this.handleFocus(this.indexes);\n }\n\n /**\n * @description Resets the component to its initial state.\n * @summary Clears all filter data, options, and resets the step counter to 1.\n * This method provides a clean slate for new filter creation without emitting events.\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n reset(): void {\n this.options = this.filteredOptions = this.filterValue = [];\n this.step = 1;\n this.lastFilter = {};\n this.value = '';\n setTimeout(() => {\n this.submit();\n }, 100);\n }\n\n /**\n * @description Clears all filters and notifies parent components.\n * @summary Resets the component state and emits undefined to notify parent components\n * that all filters have been cleared. This triggers any connected data refresh logic.\n *\n * @param {string} value - Optional parameter (currently unused)\n * @returns {void}\n * @memberOf FilterComponent\n */\n clear(value?: string): void {\n if(!value)\n this.reset();\n }\n\n /**\n * @description Submits the current filter collection to parent components.\n * @summary Emits the current filter array to parent components when filters are ready\n * to be applied. Only emits if there are active filters. Clears options after submission.\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n submit(): void {\n this.filterEvent.emit({\n query: this.filterValue.length > 0 ? this.filterValue : undefined,\n sort: {\n value: this.sortValue,\n direction: this.sortDirection\n }\n } as IFilterQuery);\n if(this.filterValue.length === 0)\n this.options = [];\n }\n\n /**\n * @description Toggles the sort direction between ascending and descending.\n * @summary Handles sort direction changes by toggling between ASC and DSC values.\n * When the direction changes, automatically triggers a submit to apply the new\n * sorting configuration to the filtered results.\n *\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleSortDirectionChange(): void {\n const direction = this.sortDirection === OrderDirection.ASC ? OrderDirection.DSC : OrderDirection.ASC;\n if(direction !== this.sortDirection) {\n this.sortDirection = direction;\n this.submit();\n }\n }\n\n /**\n * @description Handles sort field selection changes from the dropdown.\n * @summary Processes sort field changes when users select a different field\n * from the sort dropdown. Updates the sortValue property and triggers\n * a submit to apply the new sorting configuration if the value has changed.\n *\n * @param {CustomEvent} event - The select change event containing the new sort field value\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleSortChange(event: CustomEvent): void {\n const target = event.target as HTMLIonSelectElement;\n const value = target.value;\n if(value !== this.sortValue) {\n this.sortValue = value as string;\n this.submit();\n }\n }\n\n /**\n * @description Filters available options based on user input with visual highlighting.\n * @summary Performs real-time filtering of available options based on user input.\n * Also handles visual highlighting of matching options in the dropdown. Returns all\n * options if input is less than 2 characters for performance optimization.\n *\n * @param {string | null | undefined} value - The search value to filter by\n * @returns {string[]} Array of filtered options that match the input\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant F as FilterComponent\n * participant D as DOM\n *\n * U->>F: filterOptions(inputValue)\n * alt inputValue < 2 characters\n * F->>D: Remove existing highlights\n * F-->>U: Return all options\n * else inputValue >= 2 characters\n * F->>D: Query all option elements\n * F->>D: Add highlight to first matching option\n * F->>F: Filter options by substring match\n * F-->>U: Return filtered options\n * end\n *\n * @memberOf FilterComponent\n */\n filterOptions(value: string | null | undefined): string[] {\n const optionsElement = this.optionsFilterElement.nativeElement;\n if(!value?.length || !value || value.length < 2) {\n const filteredOption = optionsElement.querySelector('.dcf-filtering-item');\n if(filteredOption)\n filteredOption.classList.remove('dcf-filtering-item');\n return this.options;\n }\n const options = optionsElement.querySelectorAll('.dcf-item');\n for (const option of options) {\n const isActive = option.textContent?.toLowerCase().includes(value.toLowerCase());\n if(isActive) {\n option.classList.add('dcf-filtering-item');\n break;\n }\n }\n return this.options.filter((option: string) => option.toLowerCase().includes(value.toLowerCase() as string));\n }\n\n /**\n * @description Handles search events from the integrated searchbar component.\n * @summary Processes search input from the searchbar and emits search events\n * to parent components. This method acts as a bridge between the internal\n * searchbar component and external search event listeners.\n *\n * @param {string | undefined} value - The search value entered by the user\n * @returns {void}\n * @memberOf FilterComponent\n */\n handleSearch(value: string | undefined): void {\n this.searchEvent.emit(value);\n }\n\n}\n","\n@if(!indexes.length) {\n <ngx-decaf-searchbar [emitEventToWindow]=\"false\" [debounce]=\"500\" (searchEvent)=\"handleSearch($event)\" />\n}\n\n<div class=\"dcf-grid dcf-grid-small dcf-grid-match dcf-filter-grid\" [ngClass]=\"{'dcf-hidden': !indexes.length}\">\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-filter\">\n <div class=\"dcf-input\">\n @for(filter of filterValue; track trackItemFn($index, filter?.['index'])) {\n @if(filter?.['index']) {\n <ion-chip [outline]=\"true\">{{ filter?.['index'] }}</ion-chip>\n }\n @if(filter?.['condition']) {\n <ion-chip [outline]=\"true\">{{ filter?.['condition'] }}</ion-chip>\n }\n @if(filter?.['value']) {\n <ion-chip [outline]=\"true\" class=\"dcf-filter-value\">\n {{ filter?.['value'] }}\n <ion-icon name=\"close\" (click)=\"removeFilter(filter?.['value'])\" size=\"small\"></ion-icon>\n </ion-chip>\n }\n }\n <div class=\"dcf-width-1-1\">\n <input\n fill=\"none\"\n [(ngModel)]=\"value\"\n (keydown.enter)=\"addFilter(value, $event)\"\n (keydown.backspace)=\"clear(value)\"\n (input)=\"handleInput($event)\"\n (click)=\"handleFocus()\"\n (blur)=\"handleBlur()\"\n type=\"text\"\n [readonly]=\"step !== 3\"\n placeholder=\"{{ locale + (step === 3 ? '.type' : '.select') | translate }}\"\n #component\n />\n @if(windowWidth >= 768) {\n <div [class]=\"'dcf-dropdown ' + (options.length > 0 ? ' dcf-active' : '')\" #optionsFilterElement>\n <div>\n @if(filteredOptions.length > 0) {\n @for(key of filteredOptions; track key) {\n <div\n class=\"dcf-item\"\n tabindex=\"0\"\n (keydown.enter)=\"selectOption(key)\"\n (click)=\"selectOption(key)\">\n {{ key }}\n </div>\n }\n } @else {\n <div class=\"dcf-empty\"\n (click)=\"filteredOptions = options; value = ''\"\n tabindex=\"0\"\n (keydown.enter)=\"filteredOptions = options; value = ''\"\n >\n {{ 'no_suggestions' | translate }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n @if(filterValue.length > 0) {\n <div class=\"dcf-icon-clear\">\n <ion-button fill=\"clear\" size=\"small\" (click)=\"clear()\">\n <ion-icon name=\"trash-outline\" color=\"dark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </div>\n }\n <div class=\"dcf-icon-search\">\n <ion-button fill=\"clear\" size=\"small\" (click)=\"submit()\">\n <ion-icon name=\"search-outline\" color=\"dark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </div>\n </div>\n @if(windowWidth < 768) {\n <div [class]=\"'dcf-dropdown ' + (options.length > 0 ? ' dcf-active' : '')\" #optionsFilterElement>\n <div>\n @if(filteredOptions.length > 0) {\n @for(key of filteredOptions; track key) {\n <div\n class=\"dcf-item\"\n tabindex=\"0\"\n (keydown.enter)=\"selectOption(key)\"\n (click)=\"selectOption(key)\">\n {{ key }}\n </div>\n }\n } @else {\n <div class=\"dcf-empty\"\n (click)=\"filteredOptions = options; value = ''\"\n tabindex=\"0\"\n (keydown.enter)=\"filteredOptions = options; value = ''\"\n >\n {{ 'no_suggestions' | translate }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n @if(!disableSort) {\n <div class=\"dcf-width-1-5@m dcf-width-1-1 dcf-sort-container\">\n <div class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-middle dcf-grid-match\">\n <div class=\"dcf-width-expand\">\n <ion-select\n toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\n class=\"dcf-sort-select\"\n (ionChange)=\"handleSortChange($event)\"\n interface=\"popover\"\n [value]=\"sortValue\"\n label-placement=\"floating\"\n fill=\"outline\"\n >\n @for(sort of sortBy; track sort) {\n aa\n <ion-select-option [value]=\"sort\">{{ sort | translate }}</ion-select-option>\n }\n </ion-select>\n </div>\n <div class=\"dcf-width-auto\">\n <ion-button (click)=\"handleSortDirectionChange()\" fill=\"clear\">\n <ion-icon slot=\"icon-only\" [name]=\"sortDirection === 'desc' ? 'arrow-down-outline' : 'arrow-up-outline'\"></ion-icon>\n </ion-button>\n </div>\n </div>\n </div>\n }\n</div>\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 '../../engine/types';\nimport { ForAngularModule } from '../../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 { Component, Input, OnInit} from '@angular/core';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { KeyValue } from '../../engine';\nimport { ComponentRendererComponent } from '../component-renderer/component-renderer.component';\nimport { ModelRendererComponent } from '../model-renderer/model-renderer.component';\nimport { UIMediaBreakPoints } from '@decaf-ts/ui-decorators';\n\n/**\n * @description Layout component for creating responsive grid layouts in Angular applications.\n * @summary This component provides a flexible grid system that can be configured with dynamic\n * rows and columns. It supports responsive breakpoints and can render child components within\n * the grid structure. The component extends NgxBaseComponent to inherit common functionality\n * and integrates with the model and component renderer systems.\n *\n * @class LayoutComponent\n * @extends {NgxBaseComponent}\n * @implements {OnInit}\n * @memberOf LayoutComponent\n */\n@Component({\n selector: 'ngx-decaf-layout',\n templateUrl: './layout.component.html',\n styleUrls: ['./layout.component.scss'],\n imports: [ForAngularModule, ModelRendererComponent, ComponentRendererComponent],\n standalone: true,\n\n})\nexport class LayoutComponent extends NgxBaseComponent implements OnInit {\n\n /**\n * @description Number of columns or array of column definitions for the grid layout.\n * @summary Defines the column structure of the grid. When a number is provided, it creates\n * that many equal-width columns. When an array is provided, each element can define specific\n * column properties or sizing. This allows for flexible grid layouts that can adapt to\n * different content requirements.\n *\n * @type {(number | string[])}\n * @default 1\n * @memberOf LayoutComponent\n */\n @Input()\n cols: number | string[] = 1;\n\n /**\n * @description Number of rows or array of row definitions for the grid layout.\n * @summary Defines the row structure of the grid. When a number is provided, it creates\n * that many equal-height rows. When an array is provided, each element can define specific\n * row properties or sizing. This provides control over vertical spacing and content organization.\n *\n * @type {(number | string[])}\n * @default 1\n * @memberOf LayoutComponent\n */\n @Input()\n rows: number | KeyValue[] | string[] = 1;\n\n /**\n * @description Media breakpoint for responsive behavior.\n * @summary Determines the responsive breakpoint at which the layout should adapt.\n * This affects how the grid behaves on different screen sizes, allowing for\n * mobile-first or desktop-first responsive design patterns. The breakpoint\n * is automatically processed to ensure compatibility with the UI framework.\n *\n * @type {UIMediaBreakPoints}\n * @default 'medium'\n * @memberOf LayoutComponent\n */\n @Input()\n breakpoint: UIMediaBreakPoints = 'medium';\n\n /**\n * @description Array of child components or data to render within the grid.\n * @summary Contains the child elements that will be distributed across the grid layout.\n * Each item in the array represents content that will be rendered using the appropriate\n * renderer component (ModelRenderer or ComponentRenderer). This allows for mixed content\n * types within a single layout structure.\n *\n * @type {KeyValue[]}\n * @default []\n * @memberOf LayoutComponent\n */\n @Input()\n children: KeyValue[] = [];\n\n /**\n * @description Creates an instance of LayoutComponent.\n * @summary Initializes a new LayoutComponent with the component name \"LayoutComponent\".\n * This constructor calls the parent NgxBaseComponent constructor to set up base\n * functionality and component identification.\n *\n * @memberOf LayoutComponent\n */\n constructor() {\n super(\"LayoutComponent\")\n }\n\n /**\n * @description Getter that converts columns input to an array format.\n * @summary Transforms the cols input property into a standardized string array format.\n * When cols is a number, it creates an array with that many empty string elements.\n * When cols is already an array, it returns the array as-is. This normalization\n * ensures consistent handling of column definitions in the template.\n *\n * @type {string[]}\n * @readonly\n * @memberOf LayoutComponent\n */\n get _cols(): string[] {\n let cols = this.cols;\n if(typeof cols === \"number\")\n cols = Array.from({length: Number(cols)}, () => ``);\n return cols;\n }\n\n /**\n * @description Getter that converts rows input to an array format.\n * @summary Transforms the rows input property into a standardized string array format.\n * When rows is a number, it creates an array with that many empty string elements.\n * When rows is already an array, it returns the array as-is. This normalization\n * ensures consistent handling of row definitions in the template.\n *\n * @type {KeyValue[]}\n * @readonly\n * @memberOf LayoutComponent\n */\n get _rows(): KeyValue[] {\n let rows = this.rows;\n if(typeof rows === \"number\")\n rows = Array.from({length: Number(rows)}, () => ({title: ''}));\n return rows.map((row, index) => {\n return {\n title: (row as KeyValue)?.['title'],\n cols: this.children.filter(child => {\n if(child['row'] === index + 1)\n return child;\n })\n };\n });\n }\n\n /**\n * @description Angular lifecycle hook that runs after component initialization.\n * @summary Called once, after the first ngOnChanges(). This method triggers the\n * component's initialization process, which includes property parsing and grid\n * setup. It ensures the component is properly configured before rendering.\n *\n * @memberOf LayoutComponent\n */\n ngOnInit(): void {\n this.initialize();\n }\n\n /**\n * @description Initializes the layout component with processed properties.\n * @summary Overrides the base component's initialize method to set up the grid layout.\n * This method processes input properties, normalizes the breakpoint value, converts\n * rows and columns to their array representations, and marks the component as initialized.\n * The initialization ensures all properties are in the correct format for rendering.\n *\n * @mermaid\n * sequenceDiagram\n * participant L as LayoutComponent\n * participant B as NgxBaseComponent\n *\n * L->>B: parseProps(this)\n * Note over L: Process component properties\n * L->>L: Normalize breakpoint to lowercase\n * L->>L: Convert rows to array format\n * L->>L: Convert cols to array format\n * L->>L: Set initialized = true\n *\n * @override\n * @memberOf LayoutComponent\n */\n override initialize() {\n this.parseProps(this);\n this.breakpoint = this.breakpoint.slice(0, 2).toLowerCase() as UIMediaBreakPoints;\n this.cols = this._cols;\n this.rows = this._rows;\n this.initialized = true;\n }\n}\n","\n@if(initialized) {\n @for (row of rows; track trackItemFn($index, row); let rowIndex = $index) {\n <div class=\"dcf-grid dcf-grid-collapse dcf-grid-match\">\n @if(row) {\n <div class=\"dcf-width-1-1 dcf-grid-title\">\n <ion-card class=\"dcf-grid-title\">\n {{row.title | translate}}\n </ion-card>\n </div>\n }\n @for (child of row.cols; track trackItemFn($index, child.col); let colIndex = $index) {\n <div [class]=\"(child.col === cols.length ? 'dcf-width-1-1' : 'dcf-width-'+child.col+'-'+cols.length+'@'+breakpoint)\">\n <div [class]=\"'dcf-grid-child '+child.col \">\n @if(child.tag === 'ngx-decaf-crud-form') {\n <ion-card [class]=\"'dcf-height-1-1 ' + className\">\n <ion-card-content>\n <ngx-decaf-model-renderer\n [model]=\"child.props.name\"\n (listenEvent)=\"handleEvent($event)\"\n />\n </ion-card-content>\n </ion-card>\n } @else {\n <ngx-decaf-component-renderer\n [tag]=\"child.tag\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{props: child.props}\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n}\n","import { Component, EventEmitter, HostListener, inject, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';\nimport { StringOrBoolean } from '../../engine/types';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { removeFocusTrap, stringToBoolean } from '../../helpers/utils';\nimport { getWindowWidth, windowEventEmitter } from '../../helpers/utils';\nimport { Dynamic, EventConstants, ListItemCustomEvent } from '../../engine';\nimport { NavController } from '@ionic/angular';\nimport {\n IonButton,\n IonItem,\n IonLabel,\n IonList,\n IonContent,\n IonIcon,\n IonListHeader,\n IonPopover,\n IonItemSliding,\n IonItemOptions,\n IonItemOption\n} from '@ionic/angular/standalone';\nimport * as AllIcons from 'ionicons/icons';\nimport { addIcons } from 'ionicons';\n\n\n/**\n * @description A component for displaying a list item with various customization options.\n * @summary The ListItemComponent is an Angular component that extends NgxBaseComponent. It provides a flexible and customizable list item interface with support for icons, buttons, and various text elements. The component also handles actions and navigation based on user interactions.\n *\n * @class\n * @extends NgxBaseComponent\n *\n * @param {string} [lines='none'] - Determines the line style of the item. Can be 'inset', 'inseet', or 'none'.\n * @param {Record<string, any>} item - The data item to be displayed in the list item.\n * @param {string} icon - The name of the icon to be displayed.\n * @param {'start' | 'end'} [iconSlot='start'] - The position of the icon within the item.\n * @param {StringOrBoolean} [button=true] - Determines if the item should behave as a button.\n * @param {string} [title] - The main title of the list item.\n * @param {string} [description] - A description for the list item.\n * @param {string} [info] - Additional information for the list item.\n * @param {string} [subinfo] - Sub-information for the list item.\n *\n * @example\n * <ngx-decaf-list-item\n * [item]=\"dataItem\"\n * icon=\"star\"\n * title=\"Item Title\"\n * description=\"Item Description\"\n * (clickEvent)=\"handleItemClick($event)\">\n * </ngx-decaf-list-item>\n *\n * @mermaid\n * sequenceDiagram\n * participant C as Component\n * participant V as View\n * participant U as User\n * C->>V: Initialize component\n * V->>U: Display list item\n * U->>V: Click on item or action\n * V->>C: Trigger handleAction()\n * C->>C: Process action\n * C->>V: Update view or navigate\n */\n@Dynamic()\n@Component({\n selector: 'ngx-decaf-list-item',\n templateUrl: './list-item.component.html',\n styleUrls: ['./list-item.component.scss'],\n standalone: true,\n imports: [\n ForAngularModule,\n IonList,\n IonListHeader,\n IonItem,\n IonItemSliding,\n IonItemOptions,\n IonItemOption,\n IonIcon,\n IonLabel,\n IonButton,\n IonContent,\n IonPopover\n ]\n\n})\nexport class ListItemComponent extends NgxBaseComponent implements OnInit {\n\n /**\n * @description Reference to the action menu popover component.\n * @summary ViewChild reference that provides access to the HTMLIonPopoverElement\n * used for displaying action menus. This reference is used to programmatically\n * control the popover, such as dismissing it when necessary.\n *\n * @type {HTMLIonPopoverElement}\n * @memberOf ListItemComponent\n */\n @ViewChild('actionMenuComponent')\n actionMenuComponent!: HTMLIonPopoverElement;\n\n /**\n * @description Controls the display of lines around the list item.\n * @summary Determines how lines are displayed around the list item borders.\n * 'inset' shows lines with padding, 'full' shows full-width lines, and 'none'\n * removes all lines. This affects the visual separation between list items.\n *\n * @type {'inset' | 'full' | 'none'}\n * @default 'inset'\n * @memberOf ListItemComponent\n */\n @Input()\n lines: 'inset' | 'full' | 'none' = 'inset';\n\n /**\n * @description The data object associated with this list item.\n * @summary Contains the raw data that this list item represents. This object\n * is used to extract display information and for passing to event handlers\n * when the item is interacted with. It overrides the base item property.\n *\n * @type {Record<string, unknown>}\n * @memberOf ListItemComponent\n */\n @Input()\n override item!: Record<string, unknown>;\n\n /**\n * @description The name of the icon to display in the list item.\n * @summary Specifies which icon to display using Ionic's icon system.\n * The icon name should correspond to an available Ionic icon or a custom\n * icon that has been registered with the icon registry.\n *\n * @type {string}\n * @memberOf ListItemComponent\n */\n @Input()\n icon!: string;\n\n /**\n * @description Position of the icon within the list item.\n * @summary Determines whether the icon appears at the start (left in LTR languages)\n * or end (right in LTR languages) of the list item. This affects the overall\n * layout and visual hierarchy of the item content.\n *\n * @type {'start' | 'end'}\n * @default 'start'\n * @memberOf ListItemComponent\n */\n @Input()\n iconSlot: 'start' | 'end' ='start';\n\n /**\n * @description Controls whether the list item behaves as a clickable button.\n * @summary When set to true, the list item will have button-like behavior including\n * hover effects, click handling, and appropriate accessibility attributes.\n * When false, the item is displayed as static content without interactive behavior.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListItemComponent\n */\n @Input()\n button: StringOrBoolean = true;\n\n /**\n * @description The main title text displayed in the list item.\n * @summary Sets the primary text content that appears prominently in the list item.\n * This is typically the most important information about the item and is displayed\n * with emphasis in the component's visual hierarchy.\n *\n * @type {string}\n * @memberOf ListItemComponent\n */\n @Input()\n title?: string;\n\n /**\n * @description Secondary descriptive text for the list item.\n * @summary Provides additional context or details about the item. This text\n * is typically displayed below the title with less visual emphasis.\n * Useful for providing context without cluttering the main title.\n *\n * @type {string}\n * @memberOf ListItemComponent\n */\n @Input()\n description?: string;\n\n /**\n * @description Additional information text for the list item.\n * @summary Displays supplementary information that provides extra context\n * about the item. This could include metadata, status information, or\n * other relevant details that don't fit in the title or description.\n *\n * @type {string}\n * @memberOf ListItemComponent\n */\n @Input()\n info?: string;\n\n /**\n * @description Sub-information text displayed in the list item.\n * @summary Provides tertiary level information that complements the info field.\n * This is typically used for additional metadata or contextual details\n * that are useful but not critical for understanding the item.\n *\n * @type {string}\n * @memberOf ListItemComponent\n */\n @Input()\n subinfo?: string;\n\n /**\n * @description Event emitter for list item click interactions.\n * @summary Emits custom events when the list item is clicked or when actions\n * are performed on it. The emitted event contains information about the action,\n * the item data, and other relevant context for parent components to handle.\n *\n * @type {EventEmitter<ListItemCustomEvent>}\n * @memberOf ListItemComponent\n */\n @Output()\n clickEvent: EventEmitter<ListItemCustomEvent> = new EventEmitter<ListItemCustomEvent>();\n\n /**\n * @description Flag indicating whether slide items are currently enabled.\n * @summary Controls the visibility of slide actions based on screen size and\n * available operations. When true, users can swipe on the item to reveal\n * action buttons for operations like edit and delete.\n *\n * @type {boolean}\n * @default false\n * @memberOf ListItemComponent\n */\n showSlideItems: boolean = false;\n\n /**\n * @description Current window width in pixels.\n * @summary Stores the current browser window width which is used to determine\n * responsive behavior, such as when to show or hide slide items based on\n * screen size. Updated automatically on window resize events.\n *\n * @type {number}\n * @memberOf ListItemComponent\n */\n windowWidth!: number;\n\n /**\n * @description Flag indicating whether the action menu popover is currently open.\n * @summary Tracks the state of the action menu to prevent multiple instances\n * from being opened simultaneously and to ensure proper cleanup when actions\n * are performed. Used for managing the popover lifecycle.\n *\n * @type {boolean}\n * @default false\n * @memberOf ListItemComponent\n */\n actionMenuOpen: boolean = false;\n\n /**\n * @description Angular NavController service for handling navigation.\n * @summary Injected service that provides methods for programmatic navigation\n * within the Ionic application. Used for navigating to different routes when\n * list item actions are performed or when the item itself is clicked.\n *\n * @private\n * @type {NavController}\n * @memberOf ListItemComponent\n */\n private navController: NavController = inject(NavController);\n\n /**\n * @description Creates an instance of ListItemComponent.\n * @summary Initializes a new ListItemComponent by calling the parent class constructor\n * with the component name for logging and identification purposes. Also registers\n * all available Ionic icons to ensure they can be displayed in the component.\n *\n * @memberOf ListItemComponent\n */\n constructor() {\n super(\"ListItemComponent\");\n addIcons(AllIcons)\n }\n\n /**\n * @description Initializes the component after Angular first displays the data-bound properties.\n * @summary Sets up the component by determining slide item visibility, processing boolean inputs,\n * building CSS class names based on properties, and capturing the current window width.\n * This method prepares the component for user interaction by ensuring all properties are\n * properly initialized and responsive behavior is configured.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant L as ListItemComponent\n * participant W as Window\n *\n * A->>L: ngOnInit()\n * L->>L: enableSlideItems()\n * L->>L: Process button boolean\n * L->>L: Build className with flex classes\n * alt operations exist\n * L->>L: Add 'action' class\n * end\n * L->>W: getWindowWidth()\n * W-->>L: Return current width\n * L->>L: Store windowWidth\n *\n * @return {Promise<void>}\n * @memberOf ListItemComponent\n */\n async ngOnInit(): Promise<void> {\n this.showSlideItems = this.enableSlideItems();\n this.button = stringToBoolean(this.button);\n\n this.className = `${this.className} dcf-flex dcf-flex-middle grid-item`;\n if(this.operations?.length)\n this.className += ` action`;\n this.windowWidth = getWindowWidth() as number;\n }\n\n /**\n * @description Handles user interactions and actions performed on the list item.\n * @summary This method is the central action handler for list item interactions. It manages\n * event propagation, dismisses open action menus, removes focus traps, and either emits\n * events for parent components to handle or performs navigation based on the component's\n * route configuration. This method supports both event-driven and navigation-driven architectures.\n *\n * @param {CrudOperations} action - The type of CRUD operation being performed\n * @param {Event} event - The browser event that triggered the action\n * @param {HTMLElement} [target] - Optional target element for the event\n * @return {Promise<boolean|void>} A promise that resolves to navigation success or void for events\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant L as ListItemComponent\n * participant P as Parent Component\n * participant N as NavController\n * participant E as Event System\n *\n * U->>L: Perform action (click/swipe)\n * L->>L: stopPropagation()\n * alt actionMenuOpen\n * L->>L: Dismiss action menu\n * end\n * L->>L: removeFocusTrap()\n * alt No route configured\n * L->>E: windowEventEmitter()\n * L->>P: clickEvent.emit()\n * else Route configured\n * L->>N: redirect(action, uid)\n * N-->>L: Return navigation result\n * end\n *\n * @memberOf ListItemComponent\n */\n async handleAction(action: CrudOperations, event: Event, target?: HTMLElement): Promise<boolean|void> {\n event.stopPropagation();\n if(this.actionMenuOpen)\n await this.actionMenuComponent.dismiss();\n // forcing trap focus\n removeFocusTrap();\n if(!this.route) {\n const event = {target: target, action, pk: this.pk, data: this.uid, name: EventConstants.CLICK_EVENT, component: this.componentName } as ListItemCustomEvent;\n windowEventEmitter(`ListItem${EventConstants.CLICK_EVENT}`, event);\n return this.clickEvent.emit(event);\n }\n return await this.redirect(action, (typeof this.uid === 'number' ? `${this.uid}`: this.uid));\n }\n\n /**\n * @description Responsive handler that enables or disables slide items based on screen size and operations.\n * @summary This method is automatically called when the window is resized and also during component\n * initialization. It determines whether slide actions should be available based on the current\n * window width and the presence of UPDATE or DELETE operations. Slide items are typically hidden\n * on larger screens where there's space for dedicated action buttons.\n *\n * @return {boolean} True if slide items should be shown, false otherwise\n *\n * @mermaid\n * sequenceDiagram\n * participant W as Window\n * participant L as ListItemComponent\n * participant U as UI\n *\n * W->>L: resize event\n * L->>W: getWindowWidth()\n * W-->>L: Return current width\n * L->>L: Store windowWidth\n * alt No operations OR width > 768px\n * L->>U: showSlideItems = false\n * else Operations include UPDATE/DELETE\n * L->>U: showSlideItems = true\n * end\n * L-->>U: Return showSlideItems value\n *\n * @memberOf ListItemComponent\n */\n @HostListener('window:resize', ['$event'])\n enableSlideItems(): boolean {\n this.windowWidth = getWindowWidth() as number;\n if(!this.operations?.length || this.windowWidth > 768)\n return this.showSlideItems = false;\n this.showSlideItems = this.operations.includes(OperationKeys.UPDATE) || this.operations.includes(OperationKeys.DELETE);\n return this.showSlideItems;\n }\n\n /**\n * @description Animates and removes an element from the DOM.\n * @summary This method applies CSS animation classes to create a smooth fade-out effect\n * before removing the element from the DOM. The animation enhances user experience by\n * providing visual feedback when items are deleted or removed from lists. The timing\n * is coordinated with the CSS animation duration to ensure the element is removed\n * after the animation completes.\n *\n * @param {HTMLElement} element - The DOM element to animate and remove\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant L as ListItemComponent\n * participant E as HTMLElement\n * participant D as DOM\n *\n * L->>E: Add animation classes\n * Note over E: uk-animation-fade, uk-animation-medium, uk-animation-reverse\n * E->>E: Start fade animation\n * L->>L: setTimeout(600ms)\n * Note over L: Wait for animation to complete\n * L->>D: element.remove()\n * D->>D: Remove element from DOM\n *\n * @memberOf ListItemComponent\n */\n removeElement(element: HTMLElement): void {\n element.classList.add('uk-animation-fade', 'uk-animation-medium', 'uk-animation-reverse');\n setTimeout(() => {element.remove()}, 600)\n }\n\n /**\n * @description Navigates to a new route based on the specified action and item ID.\n * @summary This method constructs a navigation URL using the component's route configuration,\n * the specified action, and an item identifier. It uses Ionic's NavController to perform\n * forward navigation with appropriate animations. This method is typically used for\n * CRUD operations where each action (create, read, update, delete) has its own route.\n *\n * @param {string} action - The action to be performed (e.g., 'edit', 'view', 'delete')\n * @param {string} [id] - The unique identifier of the item to be acted upon\n * @return {Promise<boolean>} A promise that resolves to true if navigation was successful\n *\n * @mermaid\n * sequenceDiagram\n * participant L as ListItemComponent\n * participant N as NavController\n * participant R as Router\n *\n * L->>L: redirect(action, id)\n * L->>L: Construct URL: /{route}/{action}/{id}\n * L->>N: navigateForward(url)\n * N->>R: Navigate to constructed URL\n * R-->>N: Return navigation result\n * N-->>L: Return boolean success\n *\n * @memberOf ListItemComponent\n */\n async redirect(action: string, id?: string): Promise<boolean> {\n return await this.navController.navigateForward(`/${this.route}/${action}/${id || this.uid}`);\n }\n\n /**\n * @description Presents the actions menu popover for the list item.\n * @summary This method handles the display of a contextual action menu when triggered by user\n * interaction (typically a long press or right-click). It stops event propagation to prevent\n * unwanted side effects, removes any existing focus traps for accessibility, configures the\n * popover with the triggering event, and opens the action menu. The menu typically contains\n * available CRUD operations for the item.\n *\n * @param {Event} event - The event that triggered the action menu request\n * @return {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant L as ListItemComponent\n * participant P as Popover\n * participant A as Accessibility\n *\n * U->>L: Trigger action menu (long press/right-click)\n * L->>L: stopPropagation()\n * L->>A: removeFocusTrap()\n * L->>P: Set event reference\n * L->>L: actionMenuOpen = true\n * L->>P: Display popover with actions\n *\n * @memberOf ListItemComponent\n */\n presentActionsMenu(event: Event): void {\n event.stopPropagation();\n // forcing trap focus\n removeFocusTrap();\n this.actionMenuComponent.event = event;\n this.actionMenuOpen = true;\n }\n}\n","\n@if(title || description) {\n <ion-item-sliding #component>\n <ion-item\n [lines]=\"lines\"\n [button]=\"button\"\n [class]=\"className\"\n (click)=\"operations?.includes('read') ? handleAction('read', $event, component) : ''\n \">\n @if(icon && lines !== 'inset') {\n <div class=\"dcf-icon\" [slot]=\"iconSlot\">\n <ion-button shape=\"round\" fill=\"clear\">\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" color=\"dark\" size=\"default\"></ion-icon>\n </ion-button>\n </div>\n }\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-flex dcf-flex-middle dcf-grid-collapse\" dcf-grid>\n @if(icon && lines === 'inset') {\n <div class=\"dcf-icon dcf-grid-icon\">\n <ion-button shape=\"round\" fill=\"clear\">\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" color=\"dark\" size=\"default\"></ion-icon>\n </ion-button>\n </div>\n }\n <div class=\"dcf-width-expand@s dcf-width-1-1 dcf-label\">\n <ion-label class=\"dcf-item-title\" [innerHTML]=\"uid + ' - ' + title\" ></ion-label>\n <div *ngIf =\"description\" class=\"dcf-description\" [innerHTML]=\"description\"></div>\n </div>\n @if(info || subinfo) {\n <div class=\"dcf-width-auto@s dcf-width-expand dcf-info dcf-flex dcf-flex-right@s\">\n <div>\n <span *ngIf=\"info\" [innerHTML]=\"info\"></span>\n <div *ngIf=\"subinfo\" class=\"dcf-subinfo dcf-text-truncate\" [innerHTML]=\"subinfo\" ></div>\n </div>\n </div>\n }\n\n <div class=\"dcf-width-auto dcf-flex dcf-flex-middle dcf-flex-right\">\n @if((operations.includes('delete') || operations.includes('update')) && uid) {\n <div class=\"dcf-visible@m\" id=\"dcf-actions\">\n <ion-button class=\"dcf-hidden@m\" shape=\"round\" fill=\"clear\" color=\"primary\" (click)=\"presentActionsMenu($event)\">\n <ion-icon slot=\"icon-only\" aria-hidden=\"true\" name=\"ellipsis-vertical-outline\"></ion-icon>\n </ion-button>\n <ion-popover\n #actionMenuComponent\n side=\"bottom\"\n alignment=\"left\"\n\n [isOpen]=\"actionMenuOpen\"\n (didDismiss)=\"actionMenuOpen = false\">\n <ng-template>\n <ion-content class=\"ion-padding\">\n <ion-list lines=\"none\">\n <ion-list-header>\n <h4 class=\"dcf-text-capitalize\" [innerHTML]=\"'actions' | translate\"></h4>\n </ion-list-header>\n @for (operation of ['update', 'delete']; track operation) {\n @if(operations.includes(operation)) {\n <ion-item [button]=\"true\" (click)=\"handleAction(operation, $event, component)\">\n <ion-avatar class=\"dcf-flex dcf-flex-middle\" aria-hidden=\"true\" slot=\"start\">\n @if(operation === 'update') {\n <ion-icon color=\"primary\" aria-hidden=\"true\" name=\"create-outline\"></ion-icon>\n } @else {\n <ion-icon color=\"danger\" aria-hidden=\"true\" name=\"trash\"></ion-icon>\n }\n </ion-avatar>\n <ion-label class=\"dcf-text-capitalize\">{{ operation | translate }}</ion-label>\n </ion-item>\n }\n }\n </ion-list>\n </ion-content>\n </ng-template>\n </ion-popover>\n </div>\n }\n <!-- @if(operations?.length && uid) {\n <div class=\"dcf-visible@m\" id=\"dcf-actions\">\n @if(operations?.includes('update')) {\n <ion-button fill=\"clear\" size=\"small\" color=\"primary\" (click)=\"handleAction('update', component)\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\"></ion-icon>\n </ion-button>\n }\n @if(operations?.includes('delete')) {\n <ion-button fill=\"clear\" size=\"small\" color=\"danger\" (click)=\"handleAction('delete', component)\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\"></ion-icon>\n </ion-button>\n }\n </div>\n } -->\n @if(windowWidth > 768) {\n <div id=\"end\">\n <ng-content select=\"[slot='end']\"></ng-content>\n </div>\n }\n </div>\n </div>\n </div>\n </ion-item>\n @if(showSlideItems && uid) {\n <ion-item-options side=\"end\" (ionSwipe)=\"operations.length === 1 ? handleAction(operations[0], $event, component) : ''\">\n @if(operations?.includes('update')) {\n <ion-item-option class=\"update\" (click)=\"handleAction('update', $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\"></ion-icon>\n </ion-item-option>\n }\n @if(operations?.includes('delete')) {\n <ion-item-option class=\"delete\" (click)=\"handleAction('delete', $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\"></ion-icon>\n </ion-item-option>\n }\n </ion-item-options>\n }\n </ion-item-sliding>\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { IonIcon } from '@ionic/angular/standalone';\nimport { addIcons } from 'ionicons';\nimport { chevronBackOutline, chevronForwardOutline } from 'ionicons/icons';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport { EventConstants, KeyValue, StringOrBoolean } from '../../engine';\nimport { PaginationCustomEvent } from './constants';\n\n/**\n * @description A pagination component for navigating through multiple pages of content.\n * @summary This component provides a user interface for paginated content navigation,\n * displaying page numbers and navigation controls. It supports customizable page counts,\n * current page tracking, and emits events when users navigate between pages.\n *\n * The component intelligently handles large numbers of pages by showing a subset of page\n * numbers with ellipses to indicate skipped pages, ensuring the UI remains clean and usable\n * even with many pages.\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant P as PaginationComponent\n * participant E as External Component\n *\n * U->>P: Click page number\n * P->>P: navigate(page)\n * P->>P: handleClick(direction, page)\n * P->>E: Emit clickEvent with PaginationCustomEvent\n *\n * U->>P: Click next button\n * P->>P: next()\n * P->>P: handleClick('next')\n * P->>E: Emit clickEvent with PaginationCustomEvent\n *\n * U->>P: Click previous button\n * P->>P: previous()\n * P->>P: handleClick('previous')\n * P->>E: Emit clickEvent with PaginationCustomEvent\n *\n * @example\n * <ngx-decaf-pagination\n * [pages]=\"10\"\n * [current]=\"3\"\n * (clickEvent)=\"handlePageChange($event)\">\n * </ngx-decaf-pagination>\n *\n * @extends {NgxBaseComponent}\n * @implements {OnInit}\n */\n@Component({\n selector: 'ngx-decaf-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: ['./pagination.component.scss'],\n imports: [\n ForAngularModule,\n IonIcon\n ],\n standalone: true,\n\n})\nexport class PaginationComponent extends NgxBaseComponent implements OnInit {\n\n /**\n * @description Controls whether the component uses translation services.\n * @summary When set to true, the component will attempt to use translation services\n * for any text content. This allows for internationalization of the pagination component.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf PaginationComponent\n */\n override translatable: StringOrBoolean = true;\n\n /**\n * @description The total number of pages to display in the pagination component.\n * @summary Specifies the total number of pages available for navigation. This is a required\n * input that determines how many page numbers will be generated and displayed.\n *\n * @type {number}\n * @required\n * @memberOf PaginationComponent\n */\n @Input({ required: true })\n totalPages!: number;\n\n /**\n * @description The currently active page number.\n * @summary Specifies which page is currently active or selected. This value is used\n * to highlight the current page in the UI and as a reference point for navigation.\n *\n * @type {number}\n * @default 1\n * @memberOf PaginationComponent\n */\n @Input()\n current = 1;\n\n /**\n * @description Array of page objects for rendering in the template.\n * @summary Contains the processed page data used for rendering the pagination UI.\n * Each object includes an index (page number) and text representation.\n *\n * @type {KeyValue[]}\n * @memberOf PaginationComponent\n */\n pages!: KeyValue[];\n\n /**\n * @description The last page number in the pagination.\n * @summary Stores the number of the last page for boundary checking during navigation.\n *\n * @type {number}\n * @memberOf PaginationComponent\n */\n last!: number;\n\n /**\n * @description Event emitter for pagination navigation events.\n * @summary Emits a custom event when users navigate between pages, either by clicking\n * on page numbers or using the next/previous buttons. The event contains information\n * about the navigation direction and the target page number.\n *\n * @type {EventEmitter<PaginationCustomEvent>}\n * @memberOf PaginationComponent\n */\n @Output()\n clickEvent: EventEmitter<PaginationCustomEvent> = new EventEmitter<PaginationCustomEvent>();\n\n /**\n * @constructor\n * @description Initializes a new instance of the PaginationComponent.\n * Calls the parent constructor with the component name for generate base locale string.\n */\n constructor() {\n super(\"PaginationComponent\");\n addIcons({chevronBackOutline, chevronForwardOutline});\n }\n\n /**\n * @description Initializes the component after Angular sets the input properties.\n * @summary Sets up the component by initializing the locale settings based on the\n * translatable property, generating the page numbers based on the total pages and\n * current page, and storing the last page number for boundary checking.\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant P as PaginationComponent\n *\n * A->>P: ngOnInit()\n * P->>P: getLocale(translatable)\n * P->>P: Set locale\n * P->>P: getPages(data, current)\n * P->>P: Set pages array\n * P->>P: Set last page number\n *\n * @returns {void}\n * @memberOf PaginationComponent\n */\n ngOnInit(): void {\n this.locale = this.getLocale(this.translatable);\n this.pages = this.getPages(this.totalPages, this.current) as KeyValue[];\n this.last = this.totalPages;\n }\n\n /**\n * @description Handles click events on pagination controls.\n * @summary Processes user interactions with the pagination component, updating the\n * current page if specified and emitting an event with navigation details. This method\n * is called when users click on page numbers or navigation buttons.\n *\n * @param {('next' | 'previous')} direction - The direction of navigation\n * @param {number} [page] - Optional page number to navigate to directly\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant P as PaginationComponent\n * participant E as External Component\n *\n * U->>P: Click pagination control\n * P->>P: handleClick(direction, page?)\n * alt page is provided\n * P->>P: Update current page\n * end\n * P->>E: Emit clickEvent with direction and page\n *\n * @memberOf PaginationComponent\n */\n handleClick(direction: 'next' | 'previous', page?: number): void {\n if(page)\n this.current = page;\n this.clickEvent.emit({\n name: EventConstants.CLICK_EVENT,\n data: {\n direction,\n page: this.current\n },\n component: this.componentName\n } as PaginationCustomEvent);\n }\n\n /**\n * @description Generates the array of page objects for display.\n * @summary Creates an array of page objects based on the total number of pages and\n * the current page. For small page counts (≤5), all pages are shown. For larger page\n * counts, a subset is shown with ellipses to indicate skipped pages. This ensures\n * the pagination UI remains clean and usable even with many pages.\n *\n * @param {number} total - The total number of pages\n * @param {number} [current] - The current active page (defaults to this.current)\n * @returns {KeyValue[]} Array of page objects with index and text properties\n *\n * @mermaid\n * flowchart TD\n * A[Start] --> B{total <= 5?}\n * B -->|Yes| C[Show all pages]\n * B -->|No| D[Show first page]\n * D --> E[Show last pages]\n * E --> F[Add ellipses for skipped pages]\n * C --> G[Return pages array]\n * F --> G\n *\n * @memberOf PaginationComponent\n */\n getPages(total: number, current?: number): KeyValue[] {\n if (!current) current = this.current;\n\n const pages: KeyValue[] = [];\n\n function getPage(index: number | null, text = '') {\n if (pages.some(item => item['index'] === index)) return;\n pages.push({ index, text: index != null ? index.toString().padStart(2, '0') : text });\n }\n\n if (total <= 5) {\n for (let i = 1; i <= total; i++) getPage(i);\n } else {\n // Adiciona os dois primeiros\n getPage(1);\n getPage(2);\n\n // Adiciona \"...\" entre os blocos\n if (current && current > 3) getPage(null, '...');\n\n // Adiciona a página atual (se estiver no meio)\n if (current && current > 2 && current < total - 1) getPage(current);\n\n // Adiciona \"...\" entre os blocos\n if (current && current < total - 2) getPage(null, '...');\n\n // Adiciona os dois últimos\n getPage(total - 1);\n getPage(total);\n }\n\n return pages;\n }\n\n /**\n * @description Gets the current active page number.\n * @summary Returns the current page number that is active in the pagination component.\n * This method provides a way to access the current page state from outside the component.\n *\n * @returns {number} The current page number\n * @memberOf PaginationComponent\n */\n getCurrent(): number {\n return this.current;\n }\n\n /**\n * @description Navigates to the next page.\n * @summary Increments the current page number if not at the last page and triggers\n * the click event handler with 'next' direction. This method is typically called\n * when the user clicks on the \"next\" button in the pagination UI.\n *\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant P as PaginationComponent\n *\n * U->>P: Click next button\n * P->>P: next()\n * alt page <= max pages\n * P->>P: Increment current page\n * P->>P: handleClick('next')\n * end\n *\n * @memberOf PaginationComponent\n */\n next(): void {\n const page = this.current + 1;\n if(page <= Object.keys(this.pages)?.length || 0) {\n this.current = page;\n this.handleClick('next');\n }\n }\n\n /**\n * @description Navigates to the previous page.\n * @summary Decrements the current page number if not at the first page and triggers\n * the click event handler with 'previous' direction. This method is typically called\n * when the user clicks on the \"previous\" button in the pagination UI.\n *\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant P as PaginationComponent\n *\n * U->>P: Click previous button\n * P->>P: previous()\n * alt page > 0\n * P->>P: Decrement current page\n * P->>P: handleClick('previous')\n * end\n *\n * @memberOf PaginationComponent\n */\n previous(): void {\n const page = this.current - 1;\n if(page > 0) {\n this.current = page;\n this.handleClick('previous');\n }\n }\n\n /**\n * @description Navigates to a specific page number.\n * @summary Updates the current page to the specified page number and triggers\n * the click event handler with the appropriate direction. This method is typically\n * called when the user clicks directly on a page number in the pagination UI.\n *\n * @param {number | null} page - The page number to navigate to\n * @returns {void}\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant P as PaginationComponent\n *\n * U->>P: Click page number\n * P->>P: navigate(page)\n * alt page is not null and different from current\n * P->>P: Determine direction (next/previous)\n * P->>P: handleClick(direction, page)\n * end\n *\n * @memberOf PaginationComponent\n */\n navigate(page: number | null): void {\n if(page !== null && this.current !== page as number)\n this.handleClick(page > this.current ? 'next' : 'previous', page);\n }\n}\n"," <div id=\"dcf-paginator-container\" class=\"dcf-flex dcf-flex-center\">\n <div class=\"dcf-width-1-1\">\n <div class=\"dcf-pagination-resume\" [innerHTML]=\"locale + '.resume' | translate: {value0: current, value1: last}\"></div>\n <div #paginationComponent class=\"dcf-pagination aeon-pagination dcf-flex-center\">\n <div\n aria-label=\"previous\"\n tabindex=\"0\"\n (click)=\"previous()\"\n (keydown.enter)=\"previous()\" [ngClass]=\"{'dcf-disabled': current === 1}\">\n <ion-icon name=\"chevron-back-outline\" aria-hidden=\"true\"></ion-icon>\n </div>\n @for(page of pages; track page) {\n <div tabindex=\"0\" (click)=\"navigate(page['index'])\"\n (keydown.enter)=\"navigate(page['index'])\"\n [ngClass]=\"{'dcf-active': current === page['index'], 'dcf-disabled': page['index'] === ndivl}\">\n <span class=\"page-item\">{{ page['text'] }}</span>\n </div>\n }\n <div\n tabindex=\"0\" (click)=\"next()\"\n (keydown.enter)=\"next()\"\n [ngClass]=\"{'dcf-disabled': current === last}\">\n <ion-icon name=\"chevron-forward-outline\" aria-hidden=\"true\"></ion-icon>\n </div>\n </div>\n </div>\n</div>\n","import { Adapter, Repository } from \"@decaf-ts/core\";\nimport { Context, RepositoryFlags } from \"@decaf-ts/db-decorators\";\nimport { Constructor, Model } from \"@decaf-ts/decorator-validation\";\n\nexport enum ListComponentsTypes {\n INFINITE = 'infinite',\n PAGINATED = 'paginated'\n}\n\nexport interface IListEmptyResult {\n title: string;\n subtitle: string;\n showButton: boolean;\n buttonText: string;\n link: string;\n icon: string;\n}\n\nexport interface RawQuery<M extends Model> {\n select: undefined | (keyof M)[];\n from: Constructor<M>;\n where: (el: M) => boolean;\n sort?: (el: M, el2: M) => number;\n limit?: number;\n skip?: number;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DecafRepositoryAdapter = Adapter<Map<string, Map<string | number, any>>, RawQuery<any>, RepositoryFlags & {UUIID?: string}, Context<RepositoryFlags & {UUIID?: string}>>\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DecafRepository<M extends Model> = Repository<M, RawQuery<any>, DecafRepositoryAdapter, RepositoryFlags, Context<RepositoryFlags>>;\n","import { Component, OnInit, EventEmitter, Output, Input, HostListener, OnDestroy } from '@angular/core';\nimport { InfiniteScrollCustomEvent, RefresherCustomEvent, SpinnerTypes } from '@ionic/angular';\nimport {\n IonInfiniteScroll,\n IonInfiniteScrollContent,\n IonItem,\n IonLabel,\n IonList,\n IonRefresher,\n IonRefresherContent,\n IonSkeletonText,\n IonText,\n IonThumbnail,\n IonLoading\n} from '@ionic/angular/standalone';\nimport { debounceTime, Subject } from 'rxjs';\nimport { OperationKeys } from '@decaf-ts/db-decorators';\nimport { Model, Primitives } from '@decaf-ts/decorator-validation';\nimport { Condition, Observer, OrderDirection, Paginator } from '@decaf-ts/core';\nimport {\n BaseCustomEvent,\n Dynamic,\n EventConstants,\n ComponentsTagNames,\n RendererCustomEvent,\n StringOrBoolean,\n KeyValue,\n ListItemCustomEvent\n} from '../../engine';\nimport { ForAngularModule } from '../../for-angular.module';\nimport { NgxBaseComponent } from '../../engine/NgxBaseComponent';\nimport {\n stringToBoolean,\n formatDate,\n isValidDate\n} from '../../helpers';\nimport { SearchbarComponent } from '../searchbar/searchbar.component';\nimport { EmptyStateComponent } from '../empty-state/empty-state.component';\nimport { ListItemComponent } from '../list-item/list-item.component';\nimport { ComponentRendererComponent } from '../component-renderer/component-renderer.component';\nimport { PaginationComponent } from '../pagination/pagination.component';\nimport { PaginationCustomEvent } from '../pagination/constants';\nimport { IListEmptyResult, ListComponentsTypes, DecafRepository } from './constants';\nimport { FunctionLike, IFilterQuery, IFilterQueryItem } from '../../engine/types';\nimport { FilterComponent } from '../filter/filter.component';\n\n/**\n * @description A versatile list component that supports various data display modes.\n * @summary This component provides a flexible way to display lists of data with support\n * for infinite scrolling, pagination, searching, and custom item rendering. It can fetch\n * data from various sources including models, functions, or direct data input.\n *\n * The component supports two main display types:\n * 1. Infinite scrolling - Loads more data as the user scrolls\n * 2. Pagination - Displays data in pages with navigation controls\n *\n * Additional features include:\n * - Pull-to-refresh functionality\n * - Search filtering\n * - Empty state customization\n * - Custom item rendering\n * - Event emission for interactions\n *\n * @mermaid\n * sequenceDiagram\n * participant U as User\n * participant L as ListComponent\n * participant D as Data Source\n * participant E as External Components\n *\n * U->>L: Initialize component\n * L->>L: ngOnInit()\n * L->>D: Request initial data\n * D-->>L: Return data\n * L->>L: Process and display data\n *\n * alt User scrolls (Infinite mode)\n * U->>L: Scroll to bottom\n * L->>D: Request more data\n * D-->>L: Return additional data\n * L->>L: Append to existing data\n * else User changes page (Paginated mode)\n * U->>L: Click page number\n * L->>L: handlePaginate()\n * L->>D: Request data for page\n * D-->>L: Return page data\n * L->>L: Replace displayed data\n * end\n *\n * alt User searches\n * U->>L: Enter search term\n * L->>L: handleSearch()\n * L->>D: Filter data by search term\n * D-->>L: Return filtered data\n * L->>L: Update displayed data\n * end\n *\n * alt User clicks item\n * U->>L: Click list item\n * L->>L: handleClick()\n * L->>E: Emit clickEvent\n * end\n *\n * @example\n * <ngx-decaf-list\n * [source]=\"dataSource\"\n * [limit]=\"10\"\n * [type]=\"'infinite'\"\n * [showSearchbar]=\"true\"\n * (clickEvent)=\"handleItemClick($event)\"\n * (refreshEvent)=\"handleRefresh($event)\">\n * </ngx-decaf-list>\n *\n * @extends {NgxBaseComponent}\n * @implements {OnInit}\n */\n@Dynamic()\n@Component({\n selector: 'ngx-decaf-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.scss'],\n standalone: true,\n imports: [\n ForAngularModule,\n IonRefresher,\n IonLoading,\n PaginationComponent,\n IonList,\n IonItem,\n IonThumbnail,\n IonSkeletonText,\n IonLabel,\n IonText,\n IonRefresherContent,\n IonInfiniteScroll,\n IonInfiniteScrollContent,\n IonThumbnail,\n IonSkeletonText,\n SearchbarComponent,\n EmptyStateComponent,\n ListItemComponent,\n FilterComponent,\n ComponentRendererComponent\n ]\n})\nexport class ListComponent extends NgxBaseComponent implements OnInit, OnDestroy {\n\n /**\n * @description The display mode for the list component.\n * @summary Determines how the list data is loaded and displayed. Options include:\n * - INFINITE: Loads more data as the user scrolls (infinite scrolling)\n * - PAGINATED: Displays data in pages with navigation controls\n *\n * @type {ListComponentsTypes}\n * @default ListComponentsTypes.INFINITE\n * @memberOf ListComponent\n */\n @Input()\n type: ListComponentsTypes = ListComponentsTypes.INFINITE;\n\n /**\n * @description Controls whether the component uses translation services.\n * @summary When set to true, the component will attempt to use translation services\n * for any text content. This allows for internationalization of the list component.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListComponent\n */\n @Input()\n override translatable: StringOrBoolean = true;\n\n /**\n * @description Controls the visibility of the search bar.\n * @summary When set to true, displays a search bar at the top of the list that allows\n * users to filter the list items. The search functionality works by filtering the\n * existing data or by triggering a new data fetch with search parameters.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListComponent\n */\n @Input()\n showSearchbar: StringOrBoolean = true;\n\n /**\n * @description Direct data input for the list component.\n * @summary Provides a way to directly pass data to the list component instead of\n * fetching it from a source. When both data and source are provided, the component\n * will use the source to fetch data only if the data array is empty.\n *\n * @type {KeyValue[] | undefined}\n * @default undefined\n * @memberOf ListComponent\n */\n @Input()\n data?: KeyValue[] | undefined = undefined;\n\n /**\n * @description The data source for the list component.\n * @summary Specifies where the list should fetch its data from. This can be either:\n * - A string URL or endpoint identifier\n * - A function that returns data when called\n * The component will call this source when it needs to load or refresh data.\n *\n * @type {string | FunctionLike}\n * @required\n * @memberOf ListComponent\n */\n @Input()\n source!: string | FunctionLike;\n\n /**\n * @description The starting index for data fetching.\n * @summary Specifies the index from which to start fetching data. This is used\n * for pagination and infinite scrolling to determine which subset of data to load.\n *\n * @type {number}\n * @default 0\n * @memberOf ListComponent\n */\n @Input()\n start: number = 0;\n\n /**\n * @description The number of items to fetch per page or load operation.\n * @summary Determines how many items are loaded at once during pagination or\n * infinite scrolling. This affects the size of data chunks requested from the source.\n *\n * @type {number}\n * @default 10\n * @memberOf ListComponent\n */\n @Input()\n limit: number = 10;\n\n /**\n * @description Controls whether more data can be loaded.\n * @summary When set to true, the component will allow loading additional data\n * through infinite scrolling or pagination. When false, the component will not\n * attempt to load more data beyond what is initially displayed.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListComponent\n */\n @Input()\n loadMoreData: StringOrBoolean = true\n\n /**\n * @description The style of dividing lines between list items.\n * @summary Determines how dividing lines appear between list items. Options include:\n * - \"inset\": Lines are inset from the edges\n * - \"full\": Lines extend the full width\n * - \"none\": No dividing lines\n *\n * @type {\"inset\" | \"full\" | \"none\"}\n * @default \"full\"\n * @memberOf ListComponent\n */\n @Input()\n lines: \"inset\" | \"full\" | \"none\" = \"full\";\n\n /**\n * @description Controls whether the list has inset styling.\n * @summary When set to true, the list will have inset styling with rounded corners\n * and margin around the edges. This creates a card-like appearance for the list.\n *\n * @type {StringOrBoolean}\n * @default false\n * @memberOf ListComponent\n */\n @Input()\n inset: StringOrBoolean = false;\n\n /**\n * @description The threshold for triggering infinite scroll loading.\n * @summary Specifies how close to the bottom of the list the user must scroll\n * before the component triggers loading of additional data. This is expressed\n * as a percentage of the list height.\n *\n * @type {string}\n * @default \"15%\"\n * @memberOf ListComponent\n */\n @Input()\n scrollThreshold: string = \"15%\";\n\n /**\n * @description The position where new items are added during infinite scrolling.\n * @summary Determines whether new items are added to the top or bottom of the list\n * when loading more data through infinite scrolling.\n *\n * @type {\"bottom\" | \"top\"}\n * @default \"bottom\"\n * @memberOf ListComponent\n */\n @Input()\n scrollPosition: \"bottom\" | \"top\" = \"bottom\";\n\n /**\n * @description Custom text to display during loading operations.\n * @summary Specifies the text shown in the loading indicator when the component\n * is fetching data. If not provided, a default loading message will be used.\n *\n * @type {string | undefined}\n * @memberOf ListComponent\n */\n @Input()\n loadingText?: string;\n\n /**\n * @description Controls the visibility of the pull-to-refresh feature.\n * @summary When set to true, enables the pull-to-refresh functionality that allows\n * users to refresh the list data by pulling down from the top of the list.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListComponent\n */\n @Input()\n showRefresher: StringOrBoolean = true;\n\n /**\n * @description The type of spinner to display during loading operations.\n * @summary Specifies the visual style of the loading spinner shown during data\n * fetching operations. Uses Ionic's predefined spinner types.\n *\n * @type {SpinnerTypes}\n * @default \"circular\"\n * @memberOf ListComponent\n */\n @Input()\n loadingSpinner: SpinnerTypes = \"circular\";\n\n // /**\n // * @description Query parameters for data fetching.\n // * @summary Specifies additional query parameters to use when fetching data from\n // * the source. This can be provided as a string (JSON) or a direct object.\n // *\n // * @type {string | KeyValue | undefined}\n // * @memberOf ListComponent\n // */\n // @Input()\n // query?: string | KeyValue;\n\n /**\n * @description Controls whether the filtering functionality is enabled.\n * @summary When set to true, enables the filter component that allows users to create\n * complex search criteria with multiple field filters, conditions, and values.\n * When false, disables the filter interface entirely.\n *\n * @type {StringOrBoolean}\n * @default true\n * @memberOf ListComponent\n */\n @Input()\n enableFilter: StringOrBoolean = true;\n\n /**\n * @description Sorting parameters for data fetching.\n * @summary Specifies how the fetched data should be sorted. This can be provided\n * as a string (field name with optional direction) or a direct object.\n *\n * @type {string | KeyValue | undefined}\n * @memberOf ListComponent\n */\n @Input()\n sortDirection: OrderDirection = OrderDirection.DSC;\n\n\n /**\n * @description Sorting parameters for data fetching.\n * @summary Specifies how the fetched data should be sorted. This can be provided\n * as a string (field name with optional direction) or a direct object.\n *\n * @type {string | KeyValue | undefined}\n * @memberOf ListComponent\n */\n @Input()\n sortBy!: string;\n\n\n /**\n * @description Controls whether sorting functionality is disabled.\n * @summary When set to true, disables the sort controls and prevents users from\n * changing the sort order or field. The list will maintain its default or\n * programmatically set sort configuration without user interaction.\n *\n * @type {StringOrBoolean}\n * @default false\n * @memberOf ListComponent\n */\n @Input()\n disableSort: StringOrBoolean = false;\n\n\n /**\n * @description Icon to display when the list is empty.\n * @summary Specifies the icon shown in the empty state when no data is available.\n * This can be any icon name supported by the application's icon system.\n *\n * @type {string | undefined}\n * @default 'ti-database-exclamation'\n * @memberOf ListComponent\n */\n @Input()\n emptyIcon?: string = 'ti-database-exclamation';\n\n /**\n * @description Configuration for the empty state display.\n * @summary Customizes how the empty state is displayed when no data is available.\n * This includes the title, subtitle, button text, icon, and navigation link.\n *\n * @type {Partial<IListEmptyResult>}\n * @default {\n * title: 'empty.title',\n * subtitle: 'empty.subtitle',\n * showButton: false,\n * icon: 'alert-circle-outline',\n * buttonText: 'locale.empty.button',\n * link: ''\n * }\n * @memberOf ListComponent\n */\n @Input()\n empty: Partial<IListEmptyResult> = {\n title: 'empty.title',\n subtitle: 'empty.subtitle',\n showButton: false,\n icon: 'alert-circle-outline',\n buttonText: 'locale.empty.button',\n link: ''\n }\n\n /**\n * @description The current page number in paginated mode.\n * @summary Tracks which page is currently being displayed when the component\n * is in paginated mode. This is used for pagination controls and data fetching.\n *\n * @type {number}\n * @default 1\n * @memberOf ListComponent\n */\n page: number = 1;\n\n /**\n * @description The total number of pages available.\n * @summary Stores the calculated total number of pages based on the data size\n * and limit. This is used for pagination controls and boundary checking.\n *\n * @type {number}\n * @memberOf ListComponent\n */\n pages!: number;\n\n /**\n * @description Indicates whether a refresh operation is in progress.\n * @summary When true, the component is currently fetching new data. This is used\n * to control loading indicators and prevent duplicate refresh operations from\n * being triggered simultaneously.\n *\n * @type {boolean}\n * @default false\n * @memberOf ListComponent\n */\n refreshing: boolean = false;\n\n /**\n * @description Array used for rendering skeleton loading placeholders.\n * @summary Contains placeholder items that are displayed during data loading.\n * The length of this array determines how many skeleton items are shown.\n *\n * @type {string[]}\n * @default new Array(2)\n * @memberOf ListComponent\n */\n skeletonData: string[] = new Array(2);\n\n /**\n * @description The processed list items ready for display.\n * @summary Stores the current set of items being displayed in the list after\n * processing from the raw data source. This may be a subset of the full data\n * when using pagination or infinite scrolling.\n *\n * @type {KeyValue[]}\n * @memberOf ListComponent\n */\n items!: KeyValue[];\n\n /**\n * @description The current search query value.\n * @summary Stores the text entered in the search bar. This is used to filter\n * the list data or to send as a search parameter when fetching new data.\n *\n * @type {string | undefined}\n * @memberOf ListComponent\n */\n searchValue?: string | IFilterQuery | undefined;\n\n /**\n * @description A paginator object for handling pagination operations.\n * @summary Provides a paginator object that can be used to retrieve and navigate\n * through data in chunks, reducing memory usage and improving performance.\n *\n * The paginator object is initialized in the `ngOnInit` lifecycle hook and is\n * used to fetch and display data in the pagination component. It is an instance\n * of the `Paginator` class from the `@decaf-ts/core` package, which provides\n * methods for querying and manipulating paginated data.\n *\n * @type {Paginator<Model>}\n * @memberOf PaginationComponent\n */\n paginator!: Paginator<Model> | undefined;\n\n /**\n * @description The last page number that was displayed.\n * @summary Keeps track of the previously displayed page number, which is useful\n * for handling navigation and search operations in paginated mode.\n *\n * @type {number}\n * @default 1\n * @memberOf ListComponent\n */\n lastPage: number = 1\n\n /**\n * @description Event emitter for refresh operations.\n * @summary Emits an event when the list data is refreshed, either through pull-to-refresh\n * or programmatic refresh. The event includes the refreshed data and component information.\n *\n * @type {EventEmitter<BaseCustomEvent>}\n * @memberOf ListComponent\n */\n @Output()\n refreshEvent: EventEmitter<BaseCustomEvent> = new EventEmitter<BaseCustomEvent>();\n\n /**\n * @description Event emitter for item click interactions.\n * @summary Emits an event when a list item is clicked. The event includes the data\n * of the clicked item, allowing parent components to respond to the interaction.\n *\n * @type {EventEmitter<KeyValue>}\n * @memberOf ListComponent\n */\n @Output()\n clickEvent: EventEmitter<ListItemCustomEvent|RendererCustomEvent> = new EventEmitter<ListItemCustomEvent|RendererCustomEvent>();\n\n /**\n * @description Subject for debouncing click events.\n * @summary Uses RxJS Subject to collect click events and emit them after a debounce\n * period. This prevents multiple rapid clicks from triggering multiple events.\n *\n * @private\n * @type {Subject<CustomEvent | ListItemCustomEvent | RendererCustomEvent>}\n * @memberOf ListComponent\n */\n private clickItemSubject: Subject<CustomEvent | ListItemCustomEvent | RendererCustomEvent> = new Subject<CustomEvent | ListItemCustomEvent | RendererCustomEvent>();\n\n\n /**\n * @description Subject for debouncing repository observation events.\n * @summary RxJS Subject that collects repository change events and emits them after\n * a debounce period. This prevents multiple rapid repository changes from triggering\n * multiple list refresh operations, improving performance and user experience.\n *\n * @private\n * @type {Subject<any>}\n * @memberOf ListComponent\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private observerSubjet: Subject<any> = new Subject<any>();\n\n /**\n * @description Observer object for repository change notifications.\n * @summary Implements the Observer interface to receive notifications when the\n * underlying data repository changes. This enables automatic list updates when\n * data is created, updated, or deleted through the repository.\n *\n * @private\n * @type {Observer}\n * @memberOf ListComponent\n */\n private observer: Observer = { refresh: async (... args: unknown[]): Promise<void> => this.observeRepository(...args)}\n\n /**\n * @description List of available indexes for data querying and filtering.\n * @summary Provides a list of index names that can be used to optimize data querying and filtering\n * operations, especially in scenarios with large datasets.\n *\n * Indexes can significantly improve the performance of data retrieval by allowing the database\n * to quickly locate and retrieve relevant data based on indexed fields.\n *\n * @type {string[]}\n * @default []\n * @memberOf ListComponent\n */\n indexes!: string[];\n\n /**\n * @description Initializes a new instance of the ListComponent.\n * @summary Creates a new ListComponent and sets up the base component with the appropriate\n * component name. This constructor is called when Angular instantiates the component and\n * before any input properties are set. It passes the component name to the parent class\n * constructor to enable proper localization and component identification.\n *\n * The constructor is intentionally minimal, with most initialization logic deferred to\n * the ngOnInit lifecycle hook. This follows Angular best practices by keeping the constructor\n * focused on dependency injection and basic setup, while complex initialization that depends\n * on input properties is handled in ngOnInit.\n *\n * @memberOf ListComponent\n */\n constructor() {\n super(\"ListComponent\");\n }\n\n\n /**\n * @description Initializes the component after Angular sets the input properties.\n * @summary Sets up the component by initializing event subscriptions, processing boolean\n * inputs, and loading the initial data. This method prepares the component for user\n * interaction by ensuring all properties are properly initialized and data is loaded.\n *\n * @returns {Promise<void>}\n *\n * @mermaid\n * sequenceDiagram\n * participant A as Angular Lifecycle\n * participant L as ListComponent\n * participant D as Data Source\n *\n * A->>L: ngOnInit()\n * L->>L: Set up click event debouncing\n * L->>L: Process boolean inputs\n * L->>L: Configure component based on inputs\n * L->>L: refresh()\n * L->>D: Request initial data\n * D-->>L: Return data\n * L->>L: Process and display data\n * L->>L: Configure empty state if needed\n * L->>L: initialize()\n *\n * @memberOf ListComponent\n */\n async ngOnInit(): Promise<void> {\n this.clickItemSubject.pipe(debounceTime(100)).subscribe(event => this.clickEventEmit(event as ListItemCustomEvent | RendererCustomEvent));\n this.observerSubjet.pipe(debounceTime(100)).subscribe(args => this.handleObserveEvent(args[0], args[1], args[2]));\n this.enableFilter = stringToBoolean(this.enableFilter);\n this.limit = Number(this.limit);\n this.start = Number(this.start);\n this.inset = stringToBoolean(this.inset);\n this.showRefresher = stringToBoolean(this.showRefresher);\n this.loadMoreData = stringToBoolean(this.loadMoreData);\n this.showSearchbar = stringToBoolean(this.showSearchbar);\n this.disableSort = stringToBoolean(this.disableSort);\n if(typeof this.item?.['tag'] === 'boolean' && this.item?.['tag'] === true)\n this.item['tag'] = ComponentsTagNames.LIST_ITEM as string;\n\n await this.refresh();\n\n if(this.operations.includes(OperationKeys.CREATE) && this.route)\n this.empty.link = `${this.route}/${OperationKeys.CREATE}`;\n\n this.initialize();\n\n if(this.model instanceof Model && this._repository)\n this._repository.observe(this.observer);\n }\n\n /**\n * @description Cleans up resources when the component is destroyed.\n * @summary Performs cleanup operations when the component is being removed from the DOM.\n * This includes clearing references to models and data to prevent memory leaks.\n *\n * @returns {void}\n * @memberOf ListComponent\n */\n ngOnDestroy(): void {\n if(this._repository)\n this._repository.unObserve(this.observer);\n this.data = this.model = this._repository = this.paginator = undefined;\n }\n\n /**\n * @description Handles repository observation events with debouncing.\n * @summary Processes repository change notifications and routes them appropriately.\n * For CREATE events with a UID, handles them immediately. For other events,\n * passes them to the debounced observer subject to prevent excessive updates.\n *\n * @param {...unknown[]} args - The repository event arguments including table, event type, and UID\n * @returns {Promise<void>}\n * @memberOf ListComponent\n */\n async observeRepository(...args: unknown[]): Promise<void> {\n const [table, event, uid] = args;\n if(event === OperationKeys.CREATE && !!uid)\n return this.handleObserveEvent(table as string, event, uid as string | number);\n return this.observerSubjet.next(args);\n }\n\n /**\n * @description Handles specific repository events and updates the list accordingly.\n * @summary Processes repository change events (CREATE, UPDATE, DELETE) and performs\n * the appropriate list operations. This includes adding new items, updating existing\n * ones, or removing deleted items from the list display.\n *\n * @param {string} table - The table/model name that changed\n * @param {OperationKeys} event - The type of operation (CREATE, UPDATE, DELETE)\n * @param {string | number} uid - The unique identifier of the affected item\n * @returns {Promise<void>}\n * @memberOf ListComponent\n */\n async handleObserveEvent(table: string, event: OperationKeys, uid: string | number): Promise<void> {\n if(event === OperationKeys.CREATE) {\n if(uid) {\n await this.handleCreate(uid);\n } else {\n await this.refresh(true);\n }\n } else {\n if(event === OperationKeys.UPDATE)\n await this.handleUpdate(uid);\n if(event === OperationKeys.DELETE)\n this.handleDelete(uid);\n this.refreshEventEmit();\n }\n }\n\n\n /**\n * @description Function for tracking items in the list.\n * @summary Provides a tracking function for the `*ngFor` directive in the component template.\n * This function is used to identify and control the rendering of items in the list,\n * preventing duplicate or unnecessary rendering.\n *\n * The `trackItemFn` function takes two parameters: `index` (the index of the item in the list)\n * and `item` (the actual item from the list). It returns the tracking key, which in this case\n * is the union of the `uid` of the item with the model name.\n *\n * @param {number} index - The index of the item in the list.\n\n * @param {KeyValue | string | number} item - The actual item from the list.\n * @returns {string | number} The tracking key for the item.\n * @memberOf ListComponent\n */\n override trackItemFn(index: number, item: KeyValue | string | number): string | number {\n return `${ (item as KeyValue)?.['uid'] || (item as KeyValue)?.[this.pk]}-${index}`;\n }\n\n\n /**\n * Handles the create event from the repository.\n *\n * @param {string | number} uid - The ID of the item to create.\n * @returns {Promise<void>} A promise that resolves when the item is created and added to the list.\n */\n async handleCreate(uid: string | number): Promise<void> {\n const result = await this._repository?.read(uid);\n const item = this.mapResults([result as KeyValue])[0];\n this.items = this.data = [item, ...this.items || []];\n }\n\n\n /**\n * @description Handles the update event from the repository.\n * @summary Updates the list item with the specified ID based on the new data.\n *\n * @param {string | number} uid - The ID of the item to update\n * @returns {Promise<void>}\n * @private\n * @memberOf ListComponent\n */\n async handleUpdate(uid: string | number): Promise<void> {\n const item: KeyValue = this.itemMapper(await this._repository?.read(uid) || {}, this.mapper);\n this.data = [];\n for(const key in this.items as KeyValue[]) {\n const child = this.items[key] as KeyValue;\n if(child['uid'] === item['uid']) {\n this.items[key] = Object.assign({}, child, item);\n break;\n }\n }\n setTimeout(() => {\n this.data = [ ...this.items];\n }, 0);\n }\n\n /**\n * @description Removes an item from the list by ID.\n * @summary Filters out an item with the specified ID from the data array and\n * refreshes the list display. This is typically used after a delete operation.\n *\n * @param {string} uid - The ID of the item to delete\n * @param {string} pk - The primary key field name\n * @returns {Promise<void>}\n *\n * @memberOf ListComponent\n */\n handleDelete(uid: string | number, pk?: string): void {\n if(!pk)\n pk = this.pk;\n this.items = this.data?.filter((item: KeyValue) => item['uid'] !== uid) || [];\n }\n\n\n /**\n * @description Handles click events from list items.\n * @summary Listens for global ListItemClickEvent events and passes them to the\n * debounced click subject. This allows the component to respond to clicks on\n * list items regardless of where they originate from.\n *\n * @param {ListItemCustomEvent | RendererCustomEvent} event - The click event\n * @returns {void}\n *\n * @memberOf ListComponent\n */\n @HostListener('window:ListItemClickEvent', ['$event'])\n handleClick(event: ListItemCustomEvent | RendererCustomEvent): void {\n this.clickItemSubject.next(event);\n }\n\n /**\n * @description Handles search events from the search bar.\n * @summary Processes search queries from the search bar component, updating the\n * displayed data based on the search term. The behavior differs between infinite\n * and paginated modes to provide the best user experience for each mode.\n *\n * @param {string | undefined} value - The search term or undefined to clear search\n * @returns {Promise<void>}\n *\n * @mermaid\n * flowchart TD\n * A[Search Event] --> B{Type is Infinite?}\n * B -->|Yes| C[Disable loadMoreData]\n * B -->|No| D[Enable loadMoreData]\n * C --> E{Search value undefined?}\n * E -->|Yes| F[Enable loadMoreData]\n * E -->|No| G[Store search value]\n * D --> G\n * F --> H[Reset page to 1]\n * G --> I[Refresh data]\n * H --> I\n *\n * @memberOf ListComponent\n */\n @HostListener('window:searchbarEvent', ['$event'])\n async handleSearch(value: string | IFilterQuery | undefined): Promise<void> {\n if(this.type === ListComponentsTypes.INFINITE) {\n this.loadMoreData = false;\n if(value === undefined) {\n this.loadMoreData = true;\n this.page = 1;\n }\n this.searchValue = value;\n await this.refresh(true);\n } else {\n this.loadMoreData = true;\n this.searchValue = value;\n if(value === undefined)\n this.page = this.lastPage;\n await this.refresh(true);\n }\n }\n\n\n /**\n * @description Handles filter events from the filter component.\n * @summary Processes filter queries from the filter component and applies them\n * to the list data. This method acts as a bridge between the filter component\n * and the search functionality, converting filter queries into search operations.\n *\n * @param {IFilterQuery | undefined} value - The filter query object or undefined to clear filters\n * @returns {Promise<void>}\n * @memberOf ListComponent\n */\n async handleFilter(value: IFilterQuery | undefined): Promise<void> {\n await this.handleSearch(value);\n }\n\n /**\n * @description Clears the current search and resets the list.\n * @summary Convenience method that clears the search by calling handleSearch\n * with undefined. This resets the list to show all data without filtering.\n *\n * @returns {Promise<void>}\n * @memberOf ListComponent\n */\n async clearSearch(): Promise<void> {\n await this.handleSearch(undefined);\n }\n\n /**\n * @description Emits a refresh event with the current data.\n * @summary Creates and emits a refresh event containing the current list data.\n * This notifies parent components that the list data has been refreshed.\n *\n * @param {KeyValue[]} [data] - Optional data to include in the event\n * @returns {void}\n *\n * @memberOf ListComponent\n */\n refreshEventEmit(data?: KeyValue[]): void {\n if(!data)\n data = this.items;\n this.skeletonData = new Array(data?.length || 2);\n this.refreshEvent.emit({\n name: EventConstants.REFRESH_EVENT,\n data: data || [],\n component: this.componentName\n });\n }\n\n /**\n * @description Emits a click event for a list item.\n * @summary Processes and emits a click event when a list item is clicked.\n * This extracts the relevant data from the event and passes it to parent components.\n *\n * @private\n * @param {ListItemCustomEvent | RendererCustomEvent} event - The click event\n * @returns {void}\n *\n * @memberOf ListComponent\n */\n private clickEventEmit(event: ListItemCustomEvent | RendererCustomEvent): void {\n this.clickEvent.emit(event);\n }\n\n /**\n * @description Refreshes the list data from the configured source.\n * @summary This method handles both initial data loading and subsequent refresh operations,\n * including pull-to-refresh and infinite scrolling. It manages the data fetching process,\n * updates the component's state, and handles pagination or infinite scrolling logic based\n * on the component's configuration.\n *\n * The method performs the following steps:\n * 1. Sets the refreshing flag to indicate a data fetch is in progress\n * 2. Calculates the appropriate start and limit values based on pagination settings\n * 3. Fetches data from the appropriate source (model or request)\n * 4. Updates the component's data and emits a refresh event\n * 5. Handles pagination or infinite scrolling state updates\n * 6. Completes any provided event (like InfiniteScrollCustomEvent)\n *\n * @param {InfiniteScrollCustomEvent | RefresherCustomEvent | boolean} event - The event that triggered the refresh,\n * or a boolean flag indicating if this is a forced refresh\n * @returns {Promise<void>} A promise that resolves when the refresh operation is complete\n *\n * @mermaid\n * sequenceDiagram\n * participant L as ListComponent\n * participant D as Data Source\n * participant E as Event System\n *\n * L->>L: refresh(event)\n * L->>L: Set refreshing flag\n * L->>L: Calculate start and limit\n * alt Using model\n * L->>D: getFromModel(force, start, limit)\n * D-->>L: Return data\n * else Using request\n * L->>D: getFromRequest(force, start, limit)\n * D-->>L: Return data\n * end\n * L->>E: refreshEventEmit()\n * alt Infinite scrolling mode\n * L->>L: Check if reached last page\n * alt Last page reached\n * L->>L: Complete scroll event\n * L->>L: Disable loadMoreData\n * else More pages available\n * L->>L: Increment page number\n * L->>L: Complete scroll event after delay\n * end\n * else Paginated mode\n * L->>L: Clear refreshing flag after delay\n * end\n *\n * @memberOf ListComponent\n */\n @HostListener('window:BackButtonNavigationEndEvent', ['$event'])\n async refresh(event: InfiniteScrollCustomEvent | RefresherCustomEvent | boolean = false): Promise<void> {\n // if(typeof force !== 'boolean' && force.type === EventConstants.BACK_BUTTON_NAVIGATION) {\n // const {refresh} = (force as CustomEvent).detail;\n // if(!refresh)\n // return false;\n // }\n\n this.refreshing = true;\n const start: number = this.page > 1 ? (this.page - 1) * this.limit : this.start;\n const limit: number = (this.page * (this.limit > 12 ? 12 : this.limit));\n\n this.data = !this.model ?\n await this.getFromRequest(!!event, start, limit)\n : await this.getFromModel(!!event) as KeyValue[];\n\n this.refreshEventEmit();\n\n if(this.type === ListComponentsTypes.INFINITE) {\n if(this.page === this.pages) {\n if((event as InfiniteScrollCustomEvent)?.target)\n (event as InfiniteScrollCustomEvent).target.complete();\n this.loadMoreData = false;\n } else {\n this.page += 1;\n this.refreshing = false;\n setTimeout(() => {\n if((event as InfiniteScrollCustomEvent)?.target && (event as CustomEvent)?.type !== EventConstants.BACK_BUTTON_NAVIGATION)\n (event as InfiniteScrollCustomEvent).target.complete();\n }, 200);\n }\n } else {\n setTimeout(() => {\n this.refreshing = false;\n }, 200)\n }\n }\n\n /**\n * @description Handles pagination events from the pagination component.\n * @summary Processes pagination events by updating the current page number and\n * refreshing the list data to display the selected page. This method is called\n * when a user interacts with the pagination controls to navigate between pages.\n *\n * @param {PaginationCustomEvent} event - The pagination event containing page information\n * @returns {void}\n *\n * @memberOf ListComponent\n */\nhandlePaginate(event: PaginationCustomEvent): void {\n const { page} = event.data;\n this.page = page;\n this.refresh(true);\n}\n\n/**\n * @description Handles pull-to-refresh events from the refresher component.\n * @summary Processes refresh events triggered by the user pulling down on the list\n * or by programmatic refresh requests. This method refreshes the list data and\n * completes the refresher animation when the data is loaded.\n *\n * @param {InfiniteScrollCustomEvent | CustomEvent} [event] - The refresh event\n * @returns {Promise<void>} A promise that resolves when the refresh operation is complete\n *\n * @memberOf ListComponent\n */\nasync handleRefresh(event?: InfiniteScrollCustomEvent | CustomEvent): Promise<void> {\n await this.refresh(event as InfiniteScrollCustomEvent || true);\n if(event instanceof CustomEvent)\n setTimeout(() => {\n // Any calls to load data go here\n (event.target as HTMLIonRefresherElement).complete();\n }, 400);\n}\n\n/**\n * @description Filters data based on a search string.\n * @summary Processes the current data array to find items that match the provided\n * search string. This uses the arrayQueryByString utility to perform the filtering\n * across all properties of the items.\n *\n * @param {KeyValue[]} results - The array of items to search through\n * @param {string} search - The search string to filter by\n * @returns {KeyValue[]} A promise that resolves to the filtered array of items\n *\n * @memberOf ListComponent\n */\n parseSearchResults(results: KeyValue[], search: string): KeyValue[] {\n return results.filter((item: KeyValue) =>\n Object.values(item).some(value =>\n value.toString().toLowerCase().includes((search as string)?.toLowerCase())\n )\n );\n }\n\n/**\n * @description Fetches data from a request source.\n * @summary Retrieves data from the configured source function or URL, processes it,\n * and updates the component's data state. This method handles both initial data loading\n * and subsequent refresh operations when using an external data source rather than a model.\n *\n * @param {boolean} force - Whether to force a refresh even if data already exists\n * @param {number} start - The starting index for pagination\n * @param {number} limit - The maximum number of items to retrieve\n * @returns {Promise<KeyValue[]>} A promise that resolves to the fetched data\n *\n * @memberOf ListComponent\n */\nasync getFromRequest(force: boolean = false, start: number, limit: number): Promise<KeyValue[]> {\n let request: KeyValue[] = [];\n if(!this.data?.length || force || (this.searchValue as string)?.length || !!(this.searchValue as IFilterQuery)) {\n // (self.data as ListItem[]) = [];\n if(!(this.searchValue as string)?.length && !(this.searchValue as IFilterQuery)) {\n if(!this.source && !this.data?.length) {\n this.logger.info('No data and source passed to infinite list');\n return [];\n }\n\n if(this.source instanceof Function)\n request = await this.source();\n\n if(!Array.isArray(request))\n request = request?.['response']?.['data'] || request?.['results'] || [];\n this.data = [... await this.parseResult(request)];\n if(this.data?.length)\n this.items = this.type === ListComponentsTypes.INFINITE ?\n (this.items || []).concat([...this.data.slice(start, limit)]) : [...request.slice(start, limit) as KeyValue[]];\n } else {\n this.data = this.parseSearchResults(this.data as [], this.searchValue as string);\n this.items = this.data;\n }\n }\n\n if(this.loadMoreData && this.type === ListComponentsTypes.PAGINATED)\n this.getMoreData(this.data?.length || 0);\n return this.data || [] as KeyValue[];\n}\n\n/**\n * @description Fetches data from a model source.\n * @summary Retrieves data from the configured model using its pagination or find methods,\n * processes it, and updates the component's data state. This method handles both initial\n * data loading and subsequent refresh operations when using a model as the data source.\n *\n * @param {boolean} force - Whether to force a refresh even if data already exists\n * @param {number} start - The starting index for pagination\n * @param {number} limit - The maximum number of items to retrieve\n * @returns {Promise<KeyValue[]>} A promise that resolves to the fetched data\n *\n * @memberOf ListComponent\n */\nasync getFromModel(force: boolean = false): Promise<KeyValue[]> {\n let data = [ ... this.data || []];\n let request: KeyValue[] = [];\n\n // getting model repository\n if(!this._repository)\n this._repository = this.repository;\n const repo = this._repository as DecafRepository<Model>;\n if(!this.data?.length || force || (this.searchValue as string)?.length || !!(this.searchValue as IFilterQuery)) {\n try {\n if(!(this.searchValue as string)?.length && !(this.searchValue as IFilterQuery)) {\n (this.data as KeyValue[]) = [];\n // const rawQuery = this.parseQuery(self.model as Repository<Model>, start, limit);\n // request = this.parseResult(await (this.model as any)?.paginate(start, limit));\n if(!this.paginator) {\n this.paginator = await repo\n .select()\n .orderBy([this.pk as keyof Model, this.sortDirection])\n .paginate(this.limit);\n }\n request = await this.parseResult(this.paginator);\n } else {\n\n if(!this.indexes)\n this.indexes = (Object.values(this.mapper) || [this.pk]);\n\n const condition = this.parseConditions(this.searchValue as string | number | IFilterQuery);\n request = await this.parseResult(await repo.query(condition, (this.sortBy || this.pk) as keyof Model, this.sortDirection));\n data = [];\n }\n data = this.type === ListComponentsTypes.INFINITE ? [... (data).concat(request)] : [...request];\n } catch(error: unknown) {\n this.logger.error((error as Error)?.message || `Unable to find ${this.model} on registry. Return empty array from component`);\n }\n }\n\n if(data?.length) {\n if(this.searchValue) {\n this.items = [...data];\n if(this.items?.length <= this.limit)\n this.loadMoreData = false;\n } else {\n this.items = [...data];\n }\n }\n if(this.type === ListComponentsTypes.PAGINATED && this.paginator)\n this.getMoreData(this.paginator.total);\n return data || [] as KeyValue[];\n}\n\n/**\n * @description Converts search values or filter queries into database conditions.\n * @summary Transforms search input or complex filter queries into Condition objects\n * that can be used for database querying. Handles both simple string/number searches\n * across indexed fields and complex filter queries with multiple criteria.\n *\n * For simple searches (string/number):\n * - Creates conditions that search across all indexed fields\n * - Uses equality for numeric values and regex for string values\n * - Combines conditions with OR logic to search multiple fields\n *\n * For complex filter queries:\n * - Processes each filter item with its specific condition type\n * - Supports Equal, Not Equal, Contains, Not Contains, Greater Than, Less Than\n * - Updates sort configuration based on the filter query\n * - Combines multiple filter conditions with OR logic\n *\n * @param {string | number | IFilterQuery} value - The search value or filter query object\n * @returns {Condition<Model>} A Condition object for database querying\n * @memberOf ListComponent\n */\nparseConditions(value: string | number | IFilterQuery): Condition<Model> {\n let _condition: Condition<Model>;\n if(typeof value === Primitives.STRING || typeof value === Primitives.NUMBER) {\n _condition = Condition.attribute<Model>(this.pk as keyof Model).eq(!isNaN(value as number) ? Number(value) : value);\n for (const index of this.indexes) {\n if(index === this.pk)\n continue;\n let orCondition;\n if(!isNaN(value as number)) {\n orCondition = Condition.attribute<Model>(index as keyof Model).eq(Number(value));\n } else {\n orCondition = Condition.attribute<Model>(index as keyof Model).regexp(value as string);\n }\n _condition = _condition.or(orCondition);\n }\n } else {\n const {query, sort} = value as IFilterQuery;\n _condition = Condition.attribute<Model>(this.pk as keyof Model).dif('null');\n\n if(query?.length)\n _condition = undefined as unknown as Condition<Model>;\n\n (query || []).forEach((item: IFilterQueryItem) => {\n const {value, condition, index} = item;\n let val = value as string | number;\n if(index === this.pk || !isNaN(val as number))\n val = Number(val);\n let orCondition;\n switch (condition) {\n case \"Equal\":\n orCondition = Condition.attribute<Model>(index as keyof Model).eq(val);\n break;\n case \"Not Equal\":\n orCondition = Condition.attribute<Model>(index as keyof Model).dif(val);\n break;\n case \"Not Contains\":\n orCondition = !Condition.attribute<Model>(index as keyof Model).regexp(new RegExp(`^(?!.*${val}).*$`));\n break;\n case \"Contains\":\n orCondition = Condition.attribute<Model>(index as keyof Model).regexp(val as string);\n break;\n case \"Greater Than\":\n orCondition = Condition.attribute<Model>(index as keyof Model).gte(val);\n break;\n case \"Less Than\":\n orCondition = Condition.attribute<Model>(index as keyof Model).lte(val);\n break;\n }\n _condition = (!_condition ?\n orCondition : _condition.and(orCondition as unknown as Condition<Model>)) as Condition<Model>;\n });\n\n this.sortBy = sort?.value as keyof Model || this.pk;\n this.sortDirection = sort?.direction || this.sortDirection;\n }\n console.log(_condition);\n return _condition as Condition<Model>;\n\n}\n\n/**\n * @description Processes query results into a standardized format.\n * @summary Handles different result formats from various data sources, extracting\n * pagination information when available and applying any configured data mapping.\n * This ensures consistent data structure regardless of the source.\n *\n * @protected\n * @param {KeyValue[] | Paginator} result - The raw query result\n * @returns {KeyValue[]} The processed array of items\n *\n * @memberOf ListComponent\n */\nprotected async parseResult(result: KeyValue[] | Paginator<Model>): Promise<KeyValue[]> {\n if(!Array.isArray(result) && ('page' in result && 'total' in result)) {\n const paginator = result as Paginator<Model>;\n result = await paginator.page(this.page);\n // TODO: Chage for result.total;\n this.getMoreData(paginator.total);\n } else {\n this.getMoreData((result as KeyValue[])?.length || 0);\n }\n return (Object.keys(this.mapper || {}).length) ?\n this.mapResults(result) : result;\n}\n\n/**\n * @description Updates pagination state based on data length.\n * @summary Calculates whether more data is available and how many pages exist\n * based on the total number of items and the configured limit per page.\n * This information is used to control pagination UI and infinite scrolling behavior.\n *\n * @param {number} length - The total number of items available\n * @returns {void}\n *\n * @memberOf ListComponent\n */\ngetMoreData(length: number): void {\n if(this.type === ListComponentsTypes.INFINITE) {\n if(this.paginator)\n length = length * this.limit;\n if(length <= this.limit) {\n this.loadMoreData = false;\n } else {\n this.pages = Math.floor(length / this.limit);\n if((this.pages * this.limit) < length)\n this.pages += 1;\n if(this.pages === 1)\n this.loadMoreData = false;\n }\n } else {\n this.pages = length;\n if(this.pages === 1)\n this.loadMoreData = false;\n }\n}\n\n/**\n * @description Maps a single item using the configured mapper.\n * @summary Transforms a data item according to the mapping configuration,\n * extracting nested properties and formatting values as needed. This allows\n * the component to display data in a format different from how it's stored.\n *\n * @protected\n * @param {KeyValue} item - The item to map\n * @param {KeyValue} mapper - The mapping configuration\n * @param {KeyValue} [props] - Additional properties to include\n * @returns {KeyValue} The mapped item\n *\n * @memberOf ListComponent\n */\nprotected itemMapper(item: KeyValue, mapper: KeyValue, props?: KeyValue): KeyValue {\n return Object.entries(mapper).reduce((accum: KeyValue, [key, value]) => {\n const arrayValue = value.split('.');\n if (!value) {\n accum[key] = value;\n } else {\n if (arrayValue.length === 1) {\n value = item?.[value] || value;\n if(isValidDate(value))\n value = `${formatDate(value)}`;\n accum[key] = value;\n } else {\n let val;\n\n for (const _value of arrayValue)\n val = !val\n ? item[_value]\n : (typeof val === 'string' ? JSON.parse(val) : val)[_value];\n\n\n if (isValidDate(new Date(val)))\n val = `${formatDate(val)}`;\n\n accum[key] = val === null || val === undefined ? value : val;\n }\n }\n return Object.assign({}, props || {}, accum);\n }, {});\n}\n\n/**\n * @description Maps all result items using the configured mapper.\n * @summary Applies the itemMapper to each item in the result set, adding\n * common properties like operations and route information. This transforms\n * the raw data into the format expected by the list item components.\n *\n * @param {KeyValue[]} data - The array of items to map\n * @returns {KeyValue[]} The array of mapped items\n *\n * @memberOf ListComponent\n */\n mapResults(data: KeyValue[]): KeyValue[] {\n if(!data || !data.length)\n return [];\n // passing uid as prop to mapper\n this.mapper = {... this.mapper, ... {uid: this.pk}};\n const props = Object.assign({\n operations: this.operations,\n route: this.route,\n ... Object.keys(this.item).reduce((acc: KeyValue, key: string) => {\n acc[key] = this.item[key];\n return acc;\n }, {}),\n // ... (!this.item.render ? {} : Object.keys(this.item).reduce((acc: KeyValue, key: string) => {\n // acc[key] = this.item[key as keyof IListItemProp];\n // return acc;\n // }, {}))\n });\n return data.reduce((accum: KeyValue[], curr) => {\n accum.push({... this.itemMapper(curr, this.mapper as KeyValue, props), ... {pk: this.pk}});\n return accum;\n }, []);\n }\n}\n\n","\n@if(showRefresher) {\n <ion-refresher slot=\"fixed\" [pullFactor]=\"1\" [pullMin]=\"100\" [pullMax]=\"200\" (ionRefresh)=\"handleRefresh($event)\">\n <ion-refresher-content />\n </ion-refresher>\n}\n\n@if(showSearchbar) {\n @if(model && enableFilter) {\n <ngx-decaf-filter\n [model]=\"model\"\n [sortDirection]=\"sortDirection\"\n [disableSort]=\"disableSort\"\n (filterEvent)=\"handleFilter($event)\"\n (searchEvent)=\"handleSearch($event)\"\n />\n } @else {\n <ngx-decaf-searchbar [emitEventToWindow]=\"false\" [debounce]=\"500\" (searchEvent)=\"handleSearch($event)\" />\n }\n}\n\n@if(data?.length) {\n <ion-list [inset]=\"inset\" [lines]=\"lines\" #component>\n @if(item?.tag) {\n @for(child of items; track trackItemFn($index, child)) {\n <ngx-decaf-component-renderer\n [tag]=\"item.tag\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]='{\n item: child,\n mapper: mapper,\n route: route\n }'>\n </ngx-decaf-component-renderer>\n }\n } @else {\n <ng-content></ng-content>\n }\n </ion-list>\n\n @if(loadMoreData) {\n @if(pages > 0 && type === 'paginated' && !searchValue?.length) {\n <ngx-decaf-pagination\n [totalPages]=\"pages\"\n [current]=\"page\"\n (clickEvent)=\"handlePaginate($event)\"\n />\n\n } @else {\n <ion-infinite-scroll\n [class]=\"searchValue?.length ? 'dcf-hidden' : ''\"\n [position]=\"scrollPosition\"\n [threshold]=\"scrollThreshold\"\n (ionInfinite)=\"handleRefresh($event)\">\n <ion-infinite-scroll-content [loadingSpinner]=\"loadingSpinner\" [loadingText]=\"loadingText\" />\n </ion-infinite-scroll>\n }\n }\n} @else {\n @if(refreshing) {\n <ion-item *ngFor=\"let skl of skeletonData\">\n <ion-thumbnail slot=\"start\">\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n </ion-thumbnail>\n <ion-label>\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n <ion-text class=\"date\" style=\"width: 20%;\"><ion-skeleton-text [animated]=\"true\"></ion-skeleton-text></ion-text>\n </ion-label>\n </ion-item>\n } @else {\n @if(!searchValue?.length) {\n <ngx-decaf-empty-state\n [title]=\"(locale + '.'+ empty.title) | translate\"\n [subtitle]=\"(locale + '.'+ empty.subtitle) | translate\"\n [buttonText]=\"empty.showButton ? (locale + '.'+ empty.button | translate) : ''\"\n [buttonLink]=\"empty.showButton ? empty.route : ''\"\n />\n } @else {\n <ngx-decaf-empty-state\n icon=\"search-outline\"\n ngClass=\"empty-search\"\n [translatable]=\"true\"\n title=\"search.title\"\n subtitle=\"search.subtitle\"\n [searchValue]=\"searchValue\"\n />\n }\n }\n}\n\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CrudFieldComponent } from './crud-field/crud-field.component';\nimport { CrudFormComponent } from './crud-form/crud-form.component';\nimport { ModelRendererComponent } from './model-renderer/model-renderer.component';\nimport { ForAngularModule } from '../for-angular.module';\nimport { SearchbarComponent } from './searchbar/searchbar.component';\nimport { EmptyStateComponent } from './empty-state/empty-state.component';\nimport { ListItemComponent } from './list-item/list-item.component';\nimport { ComponentRendererComponent } from './component-renderer/component-renderer.component';\nimport { PaginationComponent } from './pagination/pagination.component';\nimport { ListComponent } from './list/list.component';\nimport { FieldsetComponent } from './fieldset/fieldset.component';\nimport { CollapsableDirective } from '../directives/collapsable.directive';\nimport { LayoutComponent } from './layout/layout.component';\nimport { FilterComponent } from './filter/filter.component';\n\nconst Directives = [CollapsableDirective];\nconst Components = [\n ModelRendererComponent,\n ComponentRendererComponent,\n CrudFieldComponent,\n CrudFormComponent,\n EmptyStateComponent,\n ListComponent,\n ListItemComponent,\n SearchbarComponent,\n PaginationComponent,\n CrudFormComponent,\n FieldsetComponent,\n LayoutComponent,\n FilterComponent\n];\n\n@NgModule({\n imports: [Components, Directives],\n declarations: [],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n exports: [Components, Directives, ForAngularModule],\n})\nexport class ForAngularComponentsModule {}\n","// Component exports\nexport * from './component-renderer/component-renderer.component';\nexport * from './crud-field/crud-field.component';\nexport * from './crud-form/crud-form.component';\nexport * from './empty-state/empty-state.component';\nexport * from './fieldset/fieldset.component';\nexport * from './filter/filter.component';\nexport * from './layout/layout.component';\nexport * from './list/list.component';\nexport * from './list-item/list-item.component';\nexport * from './model-renderer/model-renderer.component';\nexport * from './pagination/pagination.component';\nexport * from './searchbar/searchbar.component';\n\n// Constants exports\nexport * from './crud-form/constants';\nexport * from './list/constants';\nexport * from './pagination/constants';\n\n// Module export\nexport * from './for-angular-components.module';\n","import '@decaf-ts/ui-decorators';\nexport * from './components';\nexport * from './engine';\nexport * from './directives';\nexport * from './helpers';\nexport * from './for-angular.module';\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":["isValidDate","i1","i2","i3","i4","NavController","AllIcons"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