commons-shared-web-ui 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"commons-shared-web-ui.mjs","sources":["../../../src/lib/modules/material/material.module.ts","../../../src/lib/modules/alert/components/alert/alert.component.ts","../../../src/lib/modules/alert/components/alert/alert.component.html","../../../src/lib/modules/alert/alert.module.ts","../../../src/lib/modules/button/components/button/button.component.ts","../../../src/lib/modules/button/components/button/button.component.html","../../../src/lib/modules/button/button.module.ts","../../../src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts","../../../src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html","../../../src/lib/modules/confirmation-modal/confirmation-modal.module.ts","../../../src/lib/modules/form-components/components/input/input.component.ts","../../../src/lib/modules/form-components/components/input/input.component.html","../../../src/lib/modules/form-components/directives/click-outside.directive.ts","../../../src/lib/modules/form-components/components/dropdown/dropdown.component.ts","../../../src/lib/modules/form-components/components/dropdown/dropdown.component.html","../../../src/lib/modules/form-components/components/checkbox/checkbox.component.ts","../../../src/lib/modules/form-components/components/checkbox/checkbox.component.html","../../../src/lib/modules/form-components/components/radio/radio.component.ts","../../../src/lib/modules/form-components/components/radio/radio.component.html","../../../src/lib/modules/form-components/components/toggle/toggle.component.ts","../../../src/lib/modules/form-components/components/toggle/toggle.component.html","../../../src/lib/modules/form-components/components/datepicker/datepicker.component.ts","../../../src/lib/modules/form-components/components/datepicker/datepicker.component.html","../../../src/lib/modules/form-components/components/search/search.component.ts","../../../src/lib/modules/form-components/components/search/search.component.html","../../../src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts","../../../src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html","../../../src/lib/modules/form-components/form-components.module.ts","../../../src/lib/modules/filter-sidebar/filter-sidebar.module.ts","../../../src/lib/modules/summary-card/components/summary-card/summary-card.component.ts","../../../src/lib/modules/summary-card/components/summary-card/summary-card.component.html","../../../src/lib/modules/summary-card/summary-card.module.ts","../../../src/lib/utils/translation.utils.ts","../../../src/lib/modules/configurable-form/component/configurable-form.component.ts","../../../src/lib/modules/configurable-form/component/configurable-form.component.html","../../../src/lib/modules/configurable-form/configurable-form.module.ts","../../../src/lib/modules/smart-form/services/smart-form-controller.service.ts","../../../src/lib/modules/smart-form/utils/translation.utils.ts","../../../src/lib/modules/smart-form/services/expression.service.ts","../../../src/lib/modules/snackbar/components/snackbar.component.ts","../../../src/lib/modules/snackbar/components/snackbar.component.html","../../../src/lib/modules/snackbar/services/snackbar.service.ts","../../../src/lib/utils/string.utils.ts","../../../src/lib/modules/smart-form/utils/trusted-url.pipe.ts","../../../src/lib/modules/smart-form/components/form-field/form-field.component.ts","../../../src/lib/modules/smart-form/components/form-field/form-field.component.html","../../../src/lib/modules/smart-form/components/form-section/form-section.component.ts","../../../src/lib/modules/smart-form/components/form-section/form-section.component.html","../../../src/lib/modules/smart-form/components/smart-form/smart-form.component.ts","../../../src/lib/modules/smart-form/components/smart-form/smart-form.component.html","../../../src/lib/modules/smart-form/smart-form.module.ts","../../../src/lib/utils/constants.ts","../../../src/lib/modules/side-nav/components/side-nav/side-nav.component.ts","../../../src/lib/modules/side-nav/components/side-nav/side-nav.component.html","../../../src/lib/modules/side-nav/side-nav.module.ts","../../../src/lib/shared-ui.module.ts","../../../src/lib/utils/storage.utils.ts","../../../src/lib/modules/configurable-form/configurable-form.examples.ts","../../../src/lib/modules/pagination/components/pagination/pagination.component.ts","../../../src/lib/modules/pagination/components/pagination/pagination.component.html","../../../src/lib/modules/pagination/pagination.module.ts","../../../src/lib/modules/nav/components/nav/nav.component.ts","../../../src/lib/modules/nav/components/nav/nav.component.html","../../../src/lib/modules/nav/nav.module.ts","../../../src/lib/modules/filter/components/filter/filter.component.ts","../../../src/lib/modules/filter/components/filter/filter.component.html","../../../src/lib/modules/filter/filter.module.ts","../../../src/lib/modules/smart-table/components/smart-table/smart-table.component.ts","../../../src/lib/modules/smart-table/components/smart-table/smart-table.component.html","../../../src/lib/modules/smart-table/smart-table.module.ts","../../../src/lib/modules/smart-table/utils/smart-table.utils.ts","../../../src/lib/modules/smart-form/utils/validation.utils.ts","../../../src/lib/modules/smart-form/smart-form.examples.ts","../../../src/lib/modules/snackbar/snackbar.module.ts","../../../src/public-api.ts","../../../src/commons-shared-web-ui.ts"],"sourcesContent":["import { NgModule } from \"@angular/core\";\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\nimport { MatCheckboxModule } from '@angular/material/checkbox'\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatNativeDateModule } from \"@angular/material/core\";\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {MatSliderModule} from '@angular/material/slider';\nimport {MatListModule} from '@angular/material/list';\nimport {MatChipsModule} from '@angular/material/chips';\nimport {MatPaginatorModule} from '@angular/material/paginator';\nimport {MatTableModule} from '@angular/material/table';\nimport {MatExpansionModule} from '@angular/material/expansion';\nimport {CdkAccordionModule} from '@angular/cdk/accordion';\nimport { MatSortModule } from \"@angular/material/sort\";\nimport {MatAutocompleteModule} from '@angular/material/autocomplete';\nimport {MatSlideToggleModule} from '@angular/material/slide-toggle';\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\n\n@NgModule({\n imports: [\n MatCardModule,\n MatSnackBarModule,\n MatCheckboxModule,\n MatDividerModule,\n MatSelectModule,\n MatRadioModule,\n MatDialogModule,\n MatFormFieldModule,\n MatDatepickerModule,\n MatNativeDateModule,\n MatInputModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatTabsModule,\n MatButtonModule,\n MatMenuModule,\n MatTabsModule,\n MatProgressBarModule,\n MatTooltipModule,\n MatSliderModule,\n MatListModule,\n MatChipsModule,\n MatSortModule,\n MatAutocompleteModule,\n MatSlideToggleModule,\n MatButtonToggleModule\n ],\n exports: [\n MatCardModule,\n MatSnackBarModule,\n MatCheckboxModule,\n MatDividerModule,\n MatSelectModule,\n MatRadioModule,\n MatDialogModule,\n MatFormFieldModule,\n MatDatepickerModule,\n MatNativeDateModule,\n MatInputModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatTabsModule,\n MatButtonModule,\n MatMenuModule,\n MatTabsModule,\n MatProgressBarModule,\n MatTooltipModule,\n MatSliderModule,\n MatListModule,\n MatChipsModule,\n MatPaginatorModule,\n MatTableModule,\n MatExpansionModule,\n CdkAccordionModule,\n MatSortModule,\n MatAutocompleteModule,\n MatSlideToggleModule,\n MatButtonToggleModule\n ]\n})\nexport class MaterialModule { }\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AlertLabels, AlertVariant, IconInput } from '../../alert.models';\r\n\r\n@Component({\r\n selector: 'lib-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n standalone: false\r\n})\r\nexport class AlertComponent implements OnInit {\r\n @Input() variant: AlertVariant = 'info';\r\n @Input() title: string = '';\r\n @Input() message: string = '';\r\n @Input() icon: IconInput = true;\r\n @Input() customIcon: string = ''; // New input for custom class\r\n @Input() labels?: AlertLabels;\r\n\r\n // Customization Inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() padding?: string;\r\n @Input() gap?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() color?: string; // New input for custom text color\r\n @Input() borderColor?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() boxShadow?: string;\r\n\r\n // Granular Border Radius Customization\r\n @Input() borderTopLeftRadius?: string;\r\n @Input() borderTopRightRadius?: string;\r\n @Input() borderBottomLeftRadius?: string;\r\n @Input() borderBottomRightRadius?: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n get isDefaultIcon(): boolean {\r\n return this.icon === true;\r\n }\r\n\r\n get isStringIcon(): boolean {\r\n return typeof this.icon === 'string';\r\n }\r\n\r\n get isObjectIcon(): boolean {\r\n return typeof this.icon === 'object' && this.icon !== null;\r\n }\r\n\r\n get iconString(): string {\r\n return typeof this.icon === 'string' ? this.icon : '';\r\n }\r\n\r\n get isImgIcon(): boolean {\r\n const icon = this.icon;\r\n if (typeof icon === 'string') {\r\n return icon.includes('/') || icon.includes('.') || icon.startsWith('http');\r\n }\r\n return typeof icon === 'object' && icon !== null && icon.type === 'img';\r\n }\r\n\r\n get iconObject(): { type: string; value: string } {\r\n return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };\r\n }\r\n\r\n get defaultIconClass(): string {\r\n switch (this.variant) {\r\n case 'success': return 'fa-solid fa-circle-check';\r\n case 'warning':\r\n case 'warning-shadow': return 'fa-solid fa-triangle-exclamation';\r\n case 'error': return 'fa-solid fa-triangle-exclamation';\r\n case 'info':\r\n default: return 'fa-solid fa-circle-info';\r\n }\r\n }\r\n}\r\n","<div class=\"cc-alert\" [ngClass]=\"'cc-alert-' + variant\" [style.width]=\"width\" [style.height]=\"height\"\r\n [style.border-radius]=\"borderRadius\" [style.border-top-left-radius]=\"borderTopLeftRadius\"\r\n [style.border-top-right-radius]=\"borderTopRightRadius\" [style.border-bottom-left-radius]=\"borderBottomLeftRadius\"\r\n [style.border-bottom-right-radius]=\"borderBottomRightRadius\" [style.padding]=\"padding\" [style.gap]=\"gap\"\r\n [style.background-color]=\"backgroundColor\" [style.color]=\"color\" [style.border-color]=\"borderColor\"\r\n [style.font-size]=\"fontSize\" [style.font-weight]=\"fontWeight\" [style.box-shadow]=\"boxShadow\">\r\n\r\n <div class=\"cc-alert-icon\" *ngIf=\"icon\">\r\n <i *ngIf=\"customIcon\" [ngClass]=\"customIcon\"></i>\r\n <i *ngIf=\"!customIcon && isDefaultIcon\" [ngClass]=\"defaultIconClass\"></i>\r\n <i *ngIf=\"!customIcon && isStringIcon && !isImgIcon\" [ngClass]=\"iconString\"></i>\r\n <img *ngIf=\"!customIcon && isStringIcon && isImgIcon\" [src]=\"iconString\"\r\n [attr.alt]=\"labels?.iconAltText || 'alert icon'\" />\r\n <ng-container *ngIf=\"isObjectIcon\">\r\n <i *ngIf=\"iconObject.type === 'fontawesome'\" [ngClass]=\"iconObject.value\"></i>\r\n <span *ngIf=\"iconObject.type === 'material'\" class=\"material-icons\">{{ iconObject.value }}</span>\r\n <img *ngIf=\"iconObject.type === 'img'\" [src]=\"iconObject.value\"\r\n [attr.alt]=\"labels?.iconAltText || 'alert icon'\" />\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"cc-alert-content\">\r\n <div class=\"cc-alert-title\" *ngIf=\"title\">{{ title }}</div>\r\n <div class=\"cc-alert-message\" *ngIf=\"message\">{{ message }}</div>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AlertComponent } from './components/alert/alert.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n AlertComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n AlertComponent\r\n ]\r\n})\r\nexport class AlertModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\nimport { ButtonLabels, ButtonVariant } from '../../button.models';\r\n\r\n@Component({\r\n selector: 'lib-button',\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss'],\r\n standalone: false\r\n})\r\nexport class ButtonComponent implements OnInit {\r\n\r\n @Input() variant: ButtonVariant = 'primary';\r\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\r\n @Input() disabled: boolean = false;\r\n\r\n // Customization Inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() color?: string;\r\n @Input() border?: string;\r\n @Input() icon: boolean | string | { type: 'material' | 'fontawesome' | 'img'; value: string } = '';\r\n @Input() labels?: ButtonLabels;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n get isDefaultIcon(): boolean {\r\n return this.icon === true;\r\n }\r\n\r\n get isStringIcon(): boolean {\r\n return typeof this.icon === 'string' && this.icon !== '';\r\n }\r\n\r\n get isImgIcon(): boolean {\r\n const icon = this.icon;\r\n if (typeof icon === 'string') {\r\n return icon.includes('/') || icon.includes('.') || icon.startsWith('http');\r\n }\r\n return typeof icon === 'object' && icon !== null && !!icon.value && (icon.type === 'img' || icon.value.includes('/') || icon.value.includes('.') || icon.value.startsWith('http'));\r\n }\r\n\r\n get isObjectIcon(): boolean {\r\n return typeof this.icon === 'object' && this.icon !== null;\r\n }\r\n\r\n get iconString(): string {\r\n return typeof this.icon === 'string' ? this.icon : '';\r\n }\r\n\r\n get iconObject(): { type: string; value: string } {\r\n return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };\r\n }\r\n\r\n}\r\n","<button [type]=\"type\" [disabled]=\"disabled\" class=\"cc-btn\" [ngClass]=\"'cc-btn-' + variant\" [style.width]=\"width\"\r\n [style.height]=\"height\" [style.border-radius]=\"borderRadius\" [style.font-size]=\"fontSize\"\r\n [style.font-weight]=\"fontWeight\" [style.background-color]=\"backgroundColor\" [style.color]=\"color\"\r\n [style.border]=\"border\">\r\n <div class=\"cc-btn-icon-wrapper\" *ngIf=\"icon\">\r\n <!-- String Icons -->\r\n <ng-container *ngIf=\"isStringIcon\">\r\n <i *ngIf=\"!isImgIcon\" [ngClass]=\"iconString\" class=\"cc-btn-icon\"></i>\r\n <img *ngIf=\"isImgIcon\" [src]=\"iconString\" [attr.alt]=\"labels?.iconAltText || 'button icon'\"\r\n class=\"cc-btn-icon cc-btn-img-icon\" />\r\n </ng-container>\r\n\r\n <!-- Object Icons -->\r\n <ng-container *ngIf=\"isObjectIcon\">\r\n <i *ngIf=\"iconObject.type === 'fontawesome'\" [ngClass]=\"iconObject.value\" class=\"cc-btn-icon\"></i>\r\n <span *ngIf=\"iconObject.type === 'material'\" class=\"material-icons cc-btn-icon\">{{ iconObject.value }}</span>\r\n <img *ngIf=\"iconObject.type === 'img'\" [src]=\"iconObject.value\" [attr.alt]=\"labels?.iconAltText || 'button icon'\"\r\n class=\"cc-btn-icon cc-btn-img-icon\" />\r\n </ng-container>\r\n </div>\r\n <ng-content></ng-content>\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ButtonComponent } from './components/button/button.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n ButtonComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n ButtonComponent\r\n ]\r\n})\r\nexport class ButtonModule { }\r\n","import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnInit,\r\n OnDestroy,\r\n HostListener\r\n} from '@angular/core';\r\nimport { ConfirmationModalConfig } from '../../confirmation-modal.models';\r\n\r\n@Component({\r\n selector: 'cc-confirmation-modal',\r\n templateUrl: './confirmation-modal.component.html',\r\n styleUrls: ['./confirmation-modal.component.scss'],\r\n standalone: false\r\n})\r\nexport class ConfirmationModalComponent implements OnInit, OnDestroy {\r\n @Input() config!: ConfirmationModalConfig;\r\n @Input() isOpen = false;\r\n\r\n @Output() confirm = new EventEmitter<void>();\r\n @Output() cancel = new EventEmitter<void>();\r\n @Output() close = new EventEmitter<void>();\r\n @Output() showCodeSnippet = new EventEmitter<void>();\r\n\r\n // Default configuration\r\n private defaultConfig: Partial<ConfirmationModalConfig> = {\r\n headerTheme: 'dark', // Changed to dark as per new default requirement\r\n width: '560px',\r\n size: 'md',\r\n closeOnBackdrop: true,\r\n closeOnEsc: true,\r\n showCloseButton: true,\r\n cancelButton: {\r\n label: '',\r\n show: true\r\n }\r\n };\r\n\r\n mergedConfig!: ConfirmationModalConfig;\r\n private previousActiveElement: HTMLElement | null = null;\r\n\r\n ngOnInit(): void {\r\n this.updateConfig();\r\n\r\n // Store currently focused element\r\n this.previousActiveElement = document.activeElement as HTMLElement;\r\n\r\n // Prevent body scroll when modal is open\r\n if (this.isOpen) {\r\n this.toggleBodyScroll(true);\r\n }\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.updateConfig();\r\n if (this.isOpen !== undefined) {\r\n this.toggleBodyScroll(this.isOpen);\r\n }\r\n }\r\n\r\n private updateConfig(): void {\r\n // Merge user config with defaults\r\n this.mergedConfig = {\r\n ...this.defaultConfig,\r\n ...this.config,\r\n cancelButton: {\r\n ...this.defaultConfig.cancelButton,\r\n ...this.config.cancelButton\r\n },\r\n confirmButton: {\r\n ...this.config.confirmButton\r\n }\r\n };\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Restore body scroll\r\n this.toggleBodyScroll(false);\r\n\r\n // Restore focus to previous element\r\n if (this.previousActiveElement) {\r\n this.previousActiveElement.focus();\r\n }\r\n }\r\n\r\n private toggleBodyScroll(disable: boolean): void {\r\n if (disable) {\r\n document.body.style.overflow = 'hidden';\r\n } else {\r\n document.body.style.overflow = '';\r\n }\r\n }\r\n\r\n @HostListener('document:keydown.escape', ['$event'])\r\n handleEscape(event: KeyboardEvent): void {\r\n if (this.isOpen && this.mergedConfig.closeOnEsc) {\r\n event.preventDefault();\r\n this.onClose();\r\n }\r\n }\r\n\r\n onBackdropClick(event: MouseEvent): void {\r\n // Only close if clicking directly on backdrop, not modal content\r\n if (\r\n this.mergedConfig.closeOnBackdrop &&\r\n event.target === event.currentTarget\r\n ) {\r\n this.onClose();\r\n }\r\n }\r\n\r\n onConfirm(): void {\r\n if (!this.mergedConfig.confirmButton.disabled &&\r\n !this.mergedConfig.confirmButton.loading) {\r\n this.confirm.emit();\r\n }\r\n }\r\n\r\n onCancel(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n onClose(): void {\r\n this.close.emit();\r\n }\r\n\r\n onShowCodeSnippet(): void {\r\n this.showCodeSnippet.emit();\r\n }\r\n\r\n getModalWidth(): string {\r\n if (this.mergedConfig.size) {\r\n const sizeMap: Record<string, string> = {\r\n sm: '400px',\r\n md: '560px',\r\n lg: '720px'\r\n };\r\n return sizeMap[this.mergedConfig.size];\r\n }\r\n return this.mergedConfig.width || '560px';\r\n }\r\n\r\n getConfirmButtonClass(): string {\r\n const typeMap: Record<string, string> = {\r\n primary: 'cc-btn-primary',\r\n danger: 'cc-btn-danger',\r\n warning: 'cc-btn-warning'\r\n };\r\n return `cc-btn ${typeMap[this.mergedConfig.confirmButton.type]}`;\r\n }\r\n\r\n getHeaderClass(): string {\r\n return `modal-header modal-header--${this.mergedConfig.headerTheme}`;\r\n }\r\n\r\n resolveIconType(icon: any): 'material' | 'custom' | 'img' {\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n if (icon && typeof icon === 'object') {\r\n if (icon.type === 'custom' || (icon.value && (icon.value.includes('/') || icon.value.includes('.') || icon.value.startsWith('http')))) {\r\n return 'custom';\r\n }\r\n return icon.type || 'material';\r\n }\r\n return 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n return typeof icon === 'string' ? icon : icon?.value;\r\n }\r\n\r\n getIconColor(icon: any): string | undefined {\r\n return typeof icon === 'object' ? icon.color : undefined;\r\n }\r\n}\r\n","<div *ngIf=\"isOpen\" class=\"cc-modal-backdrop\" (click)=\"onBackdropClick($event)\" role=\"dialog\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"'modal-title-' + mergedConfig.title\" [attr.aria-label]=\"mergedConfig.ariaLabel\"\r\n [attr.aria-describedby]=\"mergedConfig.ariaDescribedBy\">\r\n\r\n <div class=\"cc-modal-container {{ mergedConfig.customClass }}\" [style.width]=\"getModalWidth()\"\r\n [style.background-color]=\"mergedConfig.backgroundColor\" [style.border-radius]=\"mergedConfig.borderRadius\"\r\n [style.border-top-left-radius]=\"mergedConfig.borderTopLeftRadius\"\r\n [style.border-top-right-radius]=\"mergedConfig.borderTopRightRadius\"\r\n [style.border-bottom-left-radius]=\"mergedConfig.borderBottomLeftRadius\"\r\n [style.border-bottom-right-radius]=\"mergedConfig.borderBottomRightRadius\" (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- Header -->\r\n <div [ngClass]=\"getHeaderClass()\" [style.background-color]=\"mergedConfig.headerBackgroundColor\"\r\n [style.border-bottom]=\"mergedConfig.headerBorderBottom\">\r\n <div class=\"modal-header__content\">\r\n <!-- Icon (Optional) -->\r\n <span *ngIf=\"mergedConfig.icon\" class=\"modal-header__icon\">\r\n <ng-container [ngSwitch]=\"resolveIconType(mergedConfig.icon)\">\r\n <mat-icon *ngSwitchCase=\"'material'\" [style.color]=\"getIconColor(mergedConfig.icon)\">\r\n {{ getIconValue(mergedConfig.icon) }}\r\n </mat-icon>\r\n <img *ngSwitchCase=\"'custom'\" [src]=\"getIconValue(mergedConfig.icon)\"\r\n [attr.alt]=\"mergedConfig.labels?.iconAltText || mergedConfig.title + ' icon'\"\r\n class=\"modal-header__custom-icon\">\r\n <img *ngSwitchCase=\"'img'\" [src]=\"getIconValue(mergedConfig.icon)\"\r\n [attr.alt]=\"mergedConfig.labels?.iconAltText || mergedConfig.title + ' icon'\"\r\n class=\"modal-header__custom-icon\">\r\n </ng-container>\r\n </span>\r\n\r\n <!-- Title -->\r\n <h2 class=\"modal-header__title\" [id]=\"'modal-title-' + mergedConfig.title\"\r\n [style.color]=\"mergedConfig.headerTextColor\">\r\n {{ mergedConfig.title }}\r\n </h2>\r\n </div>\r\n\r\n <!-- Code Snippet Button -->\r\n <button *ngIf=\"mergedConfig.showCodeSnippetButton\" type=\"button\" class=\"modal-header__code-btn\"\r\n (click)=\"onShowCodeSnippet()\" [attr.aria-label]=\"mergedConfig.labels?.codeSnippetAriaLabel\"\r\n [attr.title]=\"mergedConfig.labels?.codeSnippetTitle\">\r\n <mat-icon>code</mat-icon>\r\n </button>\r\n\r\n <!-- Close Button -->\r\n <button *ngIf=\"mergedConfig.showCloseButton\" type=\"button\" class=\"modal-header__close\" (click)=\"onClose()\"\r\n [attr.aria-label]=\"mergedConfig.labels?.closeAriaLabel\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Body (Content Projection) -->\r\n <div class=\"cc-modal-body\" [style.padding]=\"mergedConfig.padding\" [style.color]=\"mergedConfig.bodyTextColor\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"cc-modal-footer\" [style.background-color]=\"mergedConfig.footerBackgroundColor\"\r\n [style.border-top]=\"mergedConfig.footerBorderTop\">\r\n\r\n <ng-container *ngIf=\"!mergedConfig.customFooter\">\r\n <button *ngIf=\"mergedConfig.cancelButton?.show\" type=\"button\" class=\"cc-btn cc-btn-secondary\"\r\n (click)=\"onCancel()\">\r\n {{ mergedConfig.cancelButton?.label }}\r\n </button>\r\n\r\n <button type=\"button\" [ngClass]=\"getConfirmButtonClass()\"\r\n [disabled]=\"mergedConfig.confirmButton.disabled || mergedConfig.confirmButton.loading\"\r\n (click)=\"onConfirm()\">\r\n <span *ngIf=\"mergedConfig.confirmButton.loading\" class=\"cc-btn-spinner\"></span>\r\n {{ mergedConfig.confirmButton.label }}\r\n </button>\r\n </ng-container>\r\n\r\n <ng-content select=\"[cc-modal-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ConfirmationModalComponent } from './components/confirmation-modal/confirmation-modal.component';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n@NgModule({\r\n declarations: [\r\n ConfirmationModalComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatIconModule, // For material icons support\r\n FormsModule // For ngModel in user examples (although mostly projected content, user might need it)\r\n ],\r\n exports: [\r\n ConfirmationModalComponent\r\n ]\r\n})\r\nexport class ConfirmationModalModule { }\r\n","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { InputConfig, InputType, InputLabels } from './input.models';\r\n\r\n@Component({\r\n selector: 'lib-input',\r\n templateUrl: './input.component.html',\r\n styleUrls: ['./input.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => InputComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class InputComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: InputConfig;\r\n @Input() labels?: InputLabels;\r\n @Input() type: InputType = 'text';\r\n @Input() label: string = '';\r\n @Input() placeholder: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() readonly: boolean = false;\r\n @Input() clearable: boolean = true;\r\n @Input() maxLength?: number;\r\n @Input() minLength?: number;\r\n @Input() min?: number | string;\r\n @Input() max?: number | string;\r\n @Input() pattern?: string;\r\n @Input() errorMessage: string = '';\r\n @Input() helperText: string = '';\r\n @Input() rows: number = 3;\r\n @Input() prefixIcon?: any;\r\n @Input() suffixIcon?: any;\r\n @Input() value: any = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() valueChange = new EventEmitter<any>();\r\n @Output() inputBlur = new EventEmitter<void>();\r\n @Output() inputFocus = new EventEmitter<void>();\r\n\r\n showPassword = false;\r\n focused = false;\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.type = this.config.type ?? this.type;\r\n this.label = this.config.label ?? this.label;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.readonly = this.config.readonly ?? this.readonly;\r\n this.maxLength = this.config.maxLength ?? this.maxLength;\r\n this.minLength = this.config.minLength ?? this.minLength;\r\n this.min = this.config.min ?? this.min;\r\n this.max = this.config.max ?? this.max;\r\n this.pattern = this.config.pattern ?? this.pattern;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.helperText = this.config.helperText ?? this.helperText;\r\n this.rows = this.config.rows ?? this.rows;\r\n this.prefixIcon = this.config.prefixIcon ?? this.prefixIcon;\r\n this.suffixIcon = this.config.suffixIcon ?? this.suffixIcon;\r\n\r\n // Style inputs\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n\r\n if (this.config.value !== undefined) {\r\n this.value = this.config.value;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n this.errorMessage = this.labels.errorMessage || this.errorMessage;\r\n this.helperText = this.labels.helperText || this.helperText;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onInputChange(event: any): void {\r\n const value = event.target.value;\r\n this.value = this.type === 'number' ? (value ? Number(value) : null) : value;\r\n this.onChange(this.value);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n this.inputBlur.emit();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n this.inputFocus.emit();\r\n }\r\n\r\n togglePasswordVisibility(): void {\r\n this.showPassword = !this.showPassword;\r\n }\r\n\r\n getIconType(icon: any): 'material' | 'fontawesome' | 'img' | 'none' {\r\n if (!icon) return 'none';\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n return icon.type || 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n if (typeof icon === 'string') return icon;\r\n return icon?.value || '';\r\n }\r\n\r\n get inputType(): string {\r\n if (this.type === 'password' && this.showPassword) {\r\n return 'text';\r\n }\r\n return this.type === 'textarea' ? 'text' : this.type;\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-input-label-gap': this.getStyleValue(this.gap),\r\n '--cc-input-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-input-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-input-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-input-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-input-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-input-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-input-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-input-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-input-height': this.getStyleValue(this.height),\r\n '--cc-input-padding': this.getStyleValue(this.padding),\r\n '--cc-input-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-input-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-input-color': this.getStyleValue(this.color),\r\n '--cc-input-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-input-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-input-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-input-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-input-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n\r\n","<div class=\"cc-input-container\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-input-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <div class=\"cc-input-wrapper\" [class.focused]=\"focused\" [class.disabled]=\"disabled\" [class.error]=\"errorMessage\"\r\n [ngStyle]=\"fieldStyles\">\r\n\r\n <!-- Prefix Icon -->\r\n <span class=\"cc-input-prefix\" *ngIf=\"prefixIcon\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(prefixIcon) === 'material'\">{{ getIconValue(prefixIcon)\r\n }}</span>\r\n <i *ngIf=\"getIconType(prefixIcon) === 'fontawesome'\" [class]=\"getIconValue(prefixIcon)\"></i>\r\n <img *ngIf=\"getIconType(prefixIcon) === 'img'\" [src]=\"getIconValue(prefixIcon)\" class=\"cc-icon-img\"\r\n [attr.alt]=\"labels?.prefixAltText || 'prefix'\" />\r\n </span>\r\n\r\n <!-- Input -->\r\n <input *ngIf=\"type !== 'textarea'\" class=\"cc-input-element\" [type]=\"inputType\" [value]=\"value\"\r\n [placeholder]=\"placeholder\" [disabled]=\"disabled\" [required]=\"required\" [readonly]=\"readonly\"\r\n [maxLength]=\"maxLength || 524288\" [minLength]=\"minLength || 0\" [min]=\"min\" [max]=\"max\" [pattern]=\"pattern\"\r\n (input)=\"onInputChange($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [attr.aria-invalid]=\"!!errorMessage\"\r\n [attr.aria-describedby]=\"helperText ? 'helper-text' : null\" />\r\n\r\n <!-- Textarea -->\r\n <textarea *ngIf=\"type === 'textarea'\" class=\"cc-input-element cc-textarea\" [value]=\"value\"\r\n [placeholder]=\"placeholder\" [disabled]=\"disabled\" [required]=\"required\" [readonly]=\"readonly\"\r\n [maxLength]=\"maxLength || 524288\" [minLength]=\"minLength || 0\" [rows]=\"rows\" (input)=\"onInputChange($event)\"\r\n (blur)=\"onBlur()\" (focus)=\"onFocus()\" [attr.aria-invalid]=\"!!errorMessage\"></textarea>\r\n\r\n <!-- Suffix Icon / Password Toggle -->\r\n <span class=\"cc-input-suffix\">\r\n <button *ngIf=\"type === 'password'\" type=\"button\" class=\"cc-icon-btn\" (click)=\"togglePasswordVisibility()\"\r\n [attr.aria-label]=\"labels?.passwordToggleAriaLabel\">\r\n <span class=\"material-icons\">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>\r\n </button>\r\n\r\n <ng-container *ngIf=\"suffixIcon && type !== 'password'\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(suffixIcon) === 'material'\">{{ getIconValue(suffixIcon)\r\n }}</span>\r\n <i *ngIf=\"getIconType(suffixIcon) === 'fontawesome'\" [class]=\"getIconValue(suffixIcon)\"></i>\r\n <img *ngIf=\"getIconType(suffixIcon) === 'img'\" [src]=\"getIconValue(suffixIcon)\" class=\"cc-icon-img\"\r\n [attr.alt]=\"labels?.suffixAltText || 'suffix'\" />\r\n </ng-container>\r\n </span>\r\n </div>\r\n\r\n <div class=\"cc-helper-text\" *ngIf=\"helperText\" id=\"helper-text\">{{ helperText }}</div>\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Directive, ElementRef, Output, EventEmitter, HostListener } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[libClickOutside]',\r\n standalone: false\r\n})\r\nexport class ClickOutsideDirective {\r\n @Output() libClickOutside = new EventEmitter<void>();\r\n\r\n constructor(private elementRef: ElementRef) { }\r\n\r\n @HostListener('document:click', ['$event.target'])\r\n public onClick(target: any): void {\r\n const clickedInside = this.elementRef.nativeElement.contains(target);\r\n if (!clickedInside) {\r\n this.libClickOutside.emit();\r\n }\r\n }\r\n}\r\n","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges, HostListener, ViewChild, ElementRef } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\r\nimport { DropdownOption, DropdownConfig, DropdownLabels } from './dropdown.models';\r\n\r\n@Component({\r\n selector: 'lib-dropdown',\r\n templateUrl: './dropdown.component.html',\r\n styleUrls: ['./dropdown.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DropdownComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class DropdownComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: DropdownConfig;\r\n @Input() labels?: DropdownLabels;\r\n @Input() options: DropdownOption[] = [];\r\n @Input() placeholder: string = '';\r\n @Input() label: string = '';\r\n @Input() multiple: boolean = false;\r\n @Input() searchable: boolean = false;\r\n @Input() clearable: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() errorMessage: string = '';\r\n\r\n // Configurable styles\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n // Additional style inputs inferred from template/getters\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() selectionChange = new EventEmitter<any>();\r\n\r\n @ViewChild(CdkVirtualScrollViewport) viewport?: CdkVirtualScrollViewport;\r\n @ViewChild('searchInput') searchInput?: ElementRef;\r\n\r\n filteredOptions: DropdownOption[] = [];\r\n searchTerm: string = '';\r\n value: any = null;\r\n isOpen = false;\r\n focusedIndex = -1;\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.filteredOptions = [...this.options];\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n if (changes['config'] || changes['options']) {\r\n this.filteredOptions = [...this.options];\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.options = this.config.options || this.options;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.label = this.config.label ?? this.label;\r\n this.multiple = this.config.multiple ?? this.multiple;\r\n this.searchable = this.config.searchable ?? this.searchable;\r\n this.clearable = this.config.clearable ?? this.clearable;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n this.errorMessage = this.labels.errorMessage || this.errorMessage;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n get searchPlaceholder(): string {\r\n return this.labels?.searchPlaceholder || 'Search...';\r\n }\r\n\r\n get selectedSuffix(): string {\r\n return this.labels?.selectedSuffix || 'selected';\r\n }\r\n\r\n get clearAriaLabel(): string {\r\n return this.labels?.clearAriaLabel || 'Clear selection';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n toggle(): void {\r\n if (this.disabled) return;\r\n this.isOpen = !this.isOpen;\r\n if (this.isOpen) {\r\n this.focusedIndex = -1;\r\n setTimeout(() => {\r\n if (this.searchable && this.searchInput) {\r\n this.searchInput.nativeElement.focus();\r\n } else if (this.viewport) {\r\n this.viewport.elementRef.nativeElement.focus();\r\n }\r\n });\r\n } else {\r\n this.onTouched();\r\n }\r\n }\r\n\r\n close(): void {\r\n if (this.isOpen) {\r\n this.isOpen = false;\r\n this.onTouched();\r\n }\r\n }\r\n\r\n selectOption(option: DropdownOption): void {\r\n if (option.disabled) return;\r\n\r\n if (this.multiple) {\r\n const currentValues = Array.isArray(this.value) ? [...this.value] : [];\r\n const index = currentValues.indexOf(option.value);\r\n if (index > -1) {\r\n currentValues.splice(index, 1);\r\n } else {\r\n currentValues.push(option.value);\r\n }\r\n this.value = currentValues;\r\n } else {\r\n this.value = option.value;\r\n this.close();\r\n }\r\n\r\n this.onChange(this.value);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n isSelected(option: DropdownOption): boolean {\r\n if (this.multiple) {\r\n return Array.isArray(this.value) && this.value.includes(option.value);\r\n }\r\n return this.value === option.value;\r\n }\r\n\r\n onSearch(term: string): void {\r\n this.searchTerm = term;\r\n if (!term) {\r\n this.filteredOptions = [...this.options];\r\n } else {\r\n this.filteredOptions = this.options.filter(option =>\r\n option.label.toLowerCase().includes(term.toLowerCase())\r\n );\r\n }\r\n this.focusedIndex = -1;\r\n }\r\n\r\n clearSelection(event?: Event): void {\r\n if (event) {\r\n event.stopPropagation();\r\n }\r\n this.value = this.multiple ? [] : null;\r\n this.onChange(this.value);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n getIconType(icon: any): 'material' | 'fontawesome' | 'img' | 'none' {\r\n if (!icon) return 'none';\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n return icon.type || 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n if (typeof icon === 'string') return icon;\r\n return icon?.value || '';\r\n }\r\n\r\n getSelectedLabel(): string {\r\n if (this.multiple) {\r\n const count = Array.isArray(this.value) ? this.value.length : 0;\r\n return count > 0 ? `${count} ${this.selectedSuffix}` : '';\r\n }\r\n\r\n if (!this.value) return '';\r\n const selected = this.options.find(opt => opt.value === this.value);\r\n return selected?.label || '';\r\n }\r\n\r\n hasValue(): boolean {\r\n if (this.multiple) {\r\n return Array.isArray(this.value) && this.value.length > 0;\r\n }\r\n return this.value !== null && this.value !== undefined && this.value !== '';\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n handleKeyboardEvent(event: KeyboardEvent): void {\r\n if (this.disabled) return;\r\n\r\n if (event.key === 'Escape') {\r\n this.close();\r\n return;\r\n }\r\n\r\n if (!this.isOpen && (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown')) {\r\n this.toggle();\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n if (!this.isOpen) return;\r\n\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n this.focusedIndex = Math.min(this.focusedIndex + 1, this.filteredOptions.length - 1);\r\n this.scrollToIndex(this.focusedIndex);\r\n event.preventDefault();\r\n break;\r\n case 'ArrowUp':\r\n this.focusedIndex = Math.max(this.focusedIndex - 1, 0);\r\n this.scrollToIndex(this.focusedIndex);\r\n event.preventDefault();\r\n break;\r\n case 'Enter':\r\n if (this.focusedIndex > -1) {\r\n this.selectOption(this.filteredOptions[this.focusedIndex]);\r\n }\r\n event.preventDefault();\r\n break;\r\n }\r\n }\r\n\r\n scrollToIndex(index: number): void {\r\n if (this.viewport) {\r\n this.viewport.scrollToIndex(index);\r\n }\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-dropdown-label-gap': this.getStyleValue(this.gap),\r\n '--cc-dropdown-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-dropdown-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-dropdown-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-dropdown-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-dropdown-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-dropdown-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-dropdown-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-dropdown-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-dropdown-height': this.getStyleValue(this.height),\r\n '--cc-dropdown-padding': this.getStyleValue(this.padding),\r\n '--cc-dropdown-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-dropdown-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-dropdown-color': this.getStyleValue(this.color),\r\n '--cc-dropdown-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-dropdown-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-dropdown-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-dropdown-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-dropdown-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-dropdown-wrapper\" [ngStyle]=\"wrapperStyles\" libClickOutside (libClickOutside)=\"close()\">\r\n <!-- Label -->\r\n <label *ngIf=\"label\" class=\"cc-dropdown-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <!-- Trigger -->\r\n <div class=\"cc-dropdown-trigger\" [class.disabled]=\"disabled\" [class.open]=\"isOpen\" [class.error]=\"errorMessage\"\r\n (click)=\"toggle()\" tabindex=\"0\" (keydown)=\"handleKeyboardEvent($event)\" [ngStyle]=\"fieldStyles\">\r\n\r\n <div class=\"cc-selected-value\" *ngIf=\"hasValue()\">\r\n {{ multiple ? value.length + ' ' + selectedSuffix : getSelectedLabel() }}\r\n </div>\r\n <div class=\"cc-placeholder\" *ngIf=\"!hasValue()\">{{ placeholder }}</div>\r\n\r\n <div class=\"cc-actions\">\r\n <span *ngIf=\"clearable && hasValue() && !disabled\" class=\"cc-clear-btn\" (click)=\"clearSelection($event)\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </span>\r\n <span class=\"cc-arrow material-icons\">expand_more</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Dropdown Menu -->\r\n <div class=\"cc-dropdown-menu\" *ngIf=\"isOpen\">\r\n <!-- Search -->\r\n <div class=\"cc-search-container\" *ngIf=\"searchable\">\r\n <input type=\"text\" #searchInput [placeholder]=\"searchPlaceholder\"\r\n (input)=\"onSearch($any($event.target).value)\" (click)=\"$event.stopPropagation()\"\r\n class=\"cc-dropdown-search-input\" />\r\n </div>\r\n\r\n <!-- Options Virtual Scroll -->\r\n <cdk-virtual-scroll-viewport itemSize=\"40\" class=\"cc-virtual-scroll\"\r\n [style.height.px]=\"filteredOptions.length * 40 > 240 ? 240 : (filteredOptions.length * 40 || 40)\">\r\n\r\n <div *cdkVirtualFor=\"let option of filteredOptions; let i = index\" class=\"cc-option\"\r\n [class.selected]=\"isSelected(option)\" [class.focused]=\"i === focusedIndex\"\r\n [class.disabled]=\"option.disabled\" (click)=\"selectOption(option)\">\r\n\r\n <!-- Multi-select checkbox visual -->\r\n <span class=\"cc-multi-check\" *ngIf=\"multiple\">\r\n <span class=\"material-icons\" *ngIf=\"isSelected(option)\">check_box</span>\r\n <span class=\"material-icons\" *ngIf=\"!isSelected(option)\">check_box_outline_blank</span>\r\n </span>\r\n\r\n <!-- Icon -->\r\n <span class=\"cc-option-icon-wrapper\" *ngIf=\"option.icon\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(option.icon) === 'material'\">{{\r\n getIconValue(option.icon) }}</span>\r\n <i *ngIf=\"getIconType(option.icon) === 'fontawesome'\" [class]=\"getIconValue(option.icon)\"></i>\r\n <img *ngIf=\"getIconType(option.icon) === 'img'\" [src]=\"getIconValue(option.icon)\"\r\n class=\"cc-option-img\" alt=\"icon\" />\r\n </span>\r\n\r\n <span class=\"cc-option-label\">{{ option.label }}</span>\r\n\r\n <!-- Single-select check visual -->\r\n <span class=\"cc-single-check\" *ngIf=\"!multiple && isSelected(option)\">\r\n <span class=\"material-icons\">check</span>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"cc-no-results\">{{ labels?.noResultsFound || 'No results\r\n found' }}</div>\r\n </cdk-virtual-scroll-viewport>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CheckboxConfig, CheckboxOption, CheckboxLabels } from './checkbox.models';\r\n\r\n@Component({\r\n selector: 'lib-checkbox',\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CheckboxComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class CheckboxComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config: CheckboxConfig = {};\r\n @Input() labels?: CheckboxLabels;\r\n @Input() label: string = '';\r\n @Input() checked: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() indeterminate: boolean = false;\r\n @Input() options: CheckboxOption[] = [];\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: string = '#007bff';\r\n @Input() borderRadius: string = '4px';\r\n @Input() value: any = null;\r\n @Input() errorMessage: string = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Input() size?: string;\r\n @Input() checkedColor?: string;\r\n @Input() uncheckedColor?: string;\r\n @Input() groupLabelColor?: string;\r\n @Input() groupLabelFontSize?: string;\r\n @Input() groupLabelFontWeight?: string;\r\n\r\n @Output() checkedChange = new EventEmitter<any>();\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n\r\n if (this.isGroup) {\r\n this.value = this.options\r\n .filter(opt => opt.checked)\r\n .map(opt => opt.value);\r\n } else {\r\n this.value = this.checked;\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.checked = this.config.checked ?? this.checked;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.indeterminate = this.config.indeterminate ?? this.indeterminate;\r\n this.options = this.config.options || this.options;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.size = this.config.size ?? this.size;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.groupLabelColor = this.config.groupLabelColor ?? this.groupLabelColor;\r\n this.groupLabelFontSize = this.config.groupLabelFontSize ?? this.groupLabelFontSize;\r\n this.groupLabelFontWeight = this.config.groupLabelFontWeight ?? this.groupLabelFontWeight;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n get isGroup(): boolean {\r\n return this.options && this.options.length > 0;\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (this.isGroup) {\r\n this.value = Array.isArray(value) ? value : [];\r\n this.options.forEach(opt => {\r\n opt.checked = (this.value as any[]).includes(opt.value);\r\n });\r\n } else {\r\n this.value = !!value;\r\n this.checked = this.value as boolean;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onCheckboxChange(event: any): void {\r\n const checked = event.target.checked;\r\n this.value = checked;\r\n this.checked = checked;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.checkedChange.emit(this.value);\r\n }\r\n\r\n onGroupCheckboxChange(option: CheckboxOption, event: any): void {\r\n const checked = event.target.checked;\r\n option.checked = checked;\r\n\r\n const valueArray = this.value as any[];\r\n if (checked) {\r\n if (!valueArray.includes(option.value)) {\r\n this.value = [...valueArray, option.value];\r\n }\r\n } else {\r\n this.value = valueArray.filter(v => v !== option.value);\r\n }\r\n\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.checkedChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-checkbox-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-checkbox-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-checkbox-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-checkbox-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-checkbox-size': this.getStyleValue(this.size),\r\n '--cc-checkbox-checked-color': this.getStyleValue(this.checkedColor),\r\n '--cc-checkbox-unchecked-color': this.getStyleValue(this.uncheckedColor),\r\n '--cc-checkbox-disabled-color': this.getStyleValue(this.disabledColor),\r\n '--cc-checkbox-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-checkbox-group-gap': this.getStyleValue(this.gap),\r\n '--cc-checkbox-group-label-color': this.getStyleValue(this.groupLabelColor),\r\n '--cc-checkbox-group-label-font-size': this.getStyleValue(this.groupLabelFontSize),\r\n '--cc-checkbox-group-label-font-weight': this.getStyleValue(this.groupLabelFontWeight),\r\n '--cc-checkbox-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-checkbox-label-font-weight': this.getStyleValue(this.labelFontWeight),\r\n '--cc-checkbox-border-radius': this.getStyleValue(this.borderRadius)\r\n };\r\n }\r\n}\r\n\r\n","<div class=\"cc-checkbox-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n\r\n <!-- Single Checkbox -->\r\n <label *ngIf=\"!isGroup\" class=\"cc-checkbox-label\" [class.label-before]=\"labelPosition === 'before'\"\r\n [class.disabled]=\"disabled\" [class.checked]=\"checked\">\r\n <input type=\"checkbox\" class=\"cc-native-checkbox\" [checked]=\"checked\" [disabled]=\"disabled\"\r\n [required]=\"required\" [indeterminate]=\"indeterminate\" (change)=\"onCheckboxChange($event)\" />\r\n <span class=\"cc-checkmark\"></span>\r\n <span class=\"cc-text\" *ngIf=\"label\">{{ label }}</span>\r\n </label>\r\n\r\n <!-- Checkbox Group -->\r\n <div *ngIf=\"isGroup\" class=\"cc-checkbox-group\">\r\n <label *ngIf=\"label\" class=\"cc-checkbox-group-label\" [class.label-before]=\"labelPosition === 'before'\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <label *ngFor=\"let option of options\" class=\"cc-checkbox-label\" [class.disabled]=\"disabled || option.disabled\"\r\n [class.checked]=\"option.checked\">\r\n <input type=\"checkbox\" class=\"cc-native-checkbox\" [checked]=\"option.checked\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onGroupCheckboxChange(option, $event)\" />\r\n <span class=\"cc-checkmark\"></span>\r\n <span class=\"cc-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { RadioConfig, RadioOption, RadioLabels } from './radio.models';\r\n\r\n@Component({\r\n selector: 'lib-radio',\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RadioComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RadioComponent implements ControlValueAccessor, OnInit {\r\n @Input() config?: RadioConfig;\r\n @Input() label: string = '';\r\n @Input() options: RadioOption[] = [];\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: 'primary' | 'accent' | 'warn' = 'primary';\r\n @Input() layout: 'vertical' | 'horizontal' = 'vertical';\r\n\r\n // i18n Labels\r\n @Input() labels: RadioLabels = {};\r\n\r\n // Customization — Layout\r\n @Input() gap?: string;\r\n\r\n // Customization — Colors\r\n @Input() labelColor?: string;\r\n @Input() checkedColor?: string;\r\n @Input() uncheckedColor?: string;\r\n\r\n // Customization — Typography\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() fontFamily?: string;\r\n\r\n // Customization — Group label\r\n @Input() groupLabelColor?: string;\r\n @Input() groupLabelFontSize?: string;\r\n @Input() groupLabelFontWeight?: string;\r\n\r\n // Customization — States\r\n @Input() disabledColor?: string;\r\n @Input() errorColor?: string;\r\n\r\n // Customization — Size\r\n @Input() size?: string;\r\n @Input() borderRadius?: string;\r\n\r\n // Customization — Synonyms for Playground\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Output() selectionChange = new EventEmitter<any>();\r\n\r\n value: any;\r\n uuid = `radio-group-${Math.random().toString(36).substr(2, 9)}`;\r\n\r\n private onChange: (value: any) => void = () => { };\r\n private onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n // i18n labels override\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n ngOnChanges(changes: any): void {\r\n if (changes.config) {\r\n this.updateFromConfig();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.options = this.config.options || this.options;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.layout = this.config.layout ?? this.layout;\r\n this.value = this.config.value;\r\n\r\n // Style mappings\r\n this.gap = this.config.gap ?? this.gap;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.groupLabelColor = this.config.groupLabelColor ?? this.groupLabelColor;\r\n this.groupLabelFontSize = this.config.groupLabelFontSize ?? this.groupLabelFontSize;\r\n this.groupLabelFontWeight = this.config.groupLabelFontWeight ?? this.groupLabelFontWeight;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.size = this.config.size ?? this.size;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n }\r\n }\r\n\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onRadioChange(event: any): void {\r\n this.value = event.target.value;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-radio-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-radio-font-size': this.getStyleValue(this.fontSize || this.labelFontSize),\r\n '--cc-radio-font-weight': this.getStyleValue(this.fontWeight || this.labelFontWeight),\r\n '--cc-radio-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-radio-size': this.getStyleValue(this.size),\r\n '--cc-radio-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-radio-checked-color': this.getStyleValue(this.checkedColor),\r\n '--cc-radio-unchecked-color': this.getStyleValue(this.uncheckedColor),\r\n '--cc-radio-disabled-color': this.getStyleValue(this.disabledColor),\r\n '--cc-radio-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-radio-group-gap': this.getStyleValue(this.gap),\r\n '--cc-radio-group-label-color': this.getStyleValue(this.groupLabelColor),\r\n '--cc-radio-group-label-font-size': this.getStyleValue(this.groupLabelFontSize),\r\n '--cc-radio-group-label-font-weight': this.getStyleValue(this.groupLabelFontWeight)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-radio-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-radio-group-label\" [class.disabled]=\"disabled\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <div class=\"cc-radio-group\" [class.horizontal]=\"layout === 'horizontal'\" [class.vertical]=\"layout === 'vertical'\"\r\n role=\"radiogroup\">\r\n\r\n <label class=\"cc-radio-label\" *ngFor=\"let option of options; let i = index\"\r\n [class.disabled]=\"disabled || option.disabled\" [class.checked]=\"value === option.value\"\r\n [class.label-before]=\"labelPosition === 'before'\">\r\n\r\n <input type=\"radio\" [name]=\"uuid\" [value]=\"option.value\" [checked]=\"value === option.value\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onRadioChange($event)\" class=\"cc-native-radio\"\r\n [id]=\"uuid + '-' + i\">\r\n\r\n <span class=\"cc-radio-circle\"></span>\r\n <span class=\"cc-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { ToggleConfig, ToggleLabels } from './toggle.models';\r\n\r\n@Component({\r\n selector: 'lib-toggle',\r\n templateUrl: './toggle.component.html',\r\n styleUrls: ['./toggle.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => ToggleComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class ToggleComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: ToggleConfig;\r\n @Input() labels?: ToggleLabels;\r\n @Input() label: string = '';\r\n @Input() checked: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: string = '#1A73E8';\r\n\r\n // Customization — Colors\r\n @Input() labelColor?: string;\r\n @Input() uncheckedColor?: string;\r\n @Input() checkedColor?: string;\r\n @Input() thumbColor?: string;\r\n @Input() checkedThumbColor?: string;\r\n\r\n // Customization — Typography\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() fontFamily?: string;\r\n\r\n // Customization — Size\r\n @Input() toggleWidth?: string;\r\n @Input() toggleHeight?: string;\r\n @Input() gap?: string;\r\n\r\n // Customization — Slider\r\n @Input() sliderColor?: string;\r\n\r\n // Customization — Label\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n // Customization — States\r\n @Input() disabledColor?: string;\r\n\r\n @Output() toggleChange = new EventEmitter<boolean>();\r\n\r\n value: boolean = false;\r\n\r\n private onChange: (value: any) => void = () => { };\r\n private onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.value = this.checked;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n if (changes['checked']) {\r\n this.value = this.checked;\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.checked = this.config.checked ?? this.checked;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.thumbColor = this.config.thumbColor ?? this.thumbColor;\r\n this.checkedThumbColor = this.config.checkedThumbColor ?? this.checkedThumbColor;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.toggleWidth = this.config.toggleWidth ?? this.toggleWidth;\r\n this.toggleHeight = this.config.toggleHeight ?? this.toggleHeight;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = !!value;\r\n this.checked = this.value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onToggleChange(event: any): void {\r\n this.value = event.target.checked;\r\n this.checked = this.value;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.toggleChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-toggle-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-toggle-font-size': this.getStyleValue(this.fontSize || this.labelFontSize),\r\n '--cc-toggle-font-weight': this.getStyleValue(this.fontWeight || this.labelFontWeight),\r\n '--cc-toggle-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-toggle-width': this.getStyleValue(this.toggleWidth),\r\n '--cc-toggle-height': this.getStyleValue(this.toggleHeight),\r\n '--cc-toggle-gap': this.getStyleValue(this.gap),\r\n '--cc-toggle-unchecked-bg': this.getStyleValue(this.uncheckedColor),\r\n '--cc-toggle-checked-bg': this.getStyleValue(this.checkedColor || this.color),\r\n '--cc-toggle-thumb-color': this.getStyleValue(this.thumbColor || this.sliderColor),\r\n '--cc-toggle-checked-thumb-color': this.getStyleValue(this.checkedThumbColor),\r\n '--cc-toggle-disabled-color': this.getStyleValue(this.disabledColor)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-toggle-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label class=\"cc-toggle-label\" [class.label-before]=\"labelPosition === 'before'\" [class.disabled]=\"disabled\">\r\n\r\n <span class=\"cc-label-text\" *ngIf=\"label && labelPosition === 'before'\">{{ label }}</span>\r\n\r\n <span class=\"cc-toggle-switch\">\r\n <input type=\"checkbox\" class=\"cc-native-toggle\" [checked]=\"checked\" [disabled]=\"disabled\"\r\n (change)=\"onToggleChange($event)\" />\r\n <span class=\"cc-toggle-track\"></span>\r\n <span class=\"cc-toggle-thumb\"></span>\r\n </span>\r\n\r\n <span class=\"cc-label-text\" *ngIf=\"label && labelPosition === 'after'\">{{ label }}</span>\r\n </label>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DatePickerConfig, DatepickerLabels } from './datepicker.models';\r\n\r\n@Component({\r\n selector: 'lib-datepicker',\r\n templateUrl: './datepicker.component.html',\r\n styleUrls: ['./datepicker.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DatepickerComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class DatepickerComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: DatePickerConfig;\r\n @Input() labels?: DatepickerLabels;\r\n @Input() label: string = '';\r\n @Input() placeholder: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() minDate?: string | Date; // Support string for native input\r\n @Input() maxDate?: string | Date; // Support string for native input\r\n @Input() isRange: boolean = false;\r\n @Input() startView: 'month' | 'year' | 'multi-year' = 'month';\r\n @Input() value: any = null;\r\n @Input() startDate?: string | Date;\r\n @Input() endDate?: string | Date;\r\n @Input() errorMessage: string = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() dateChange = new EventEmitter<any>();\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n focused = false;\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.minDate = this.config.minDate ?? this.minDate;\r\n this.maxDate = this.config.maxDate ?? this.maxDate;\r\n this.isRange = this.config.isRange ?? this.isRange;\r\n this.width = this.config.width ?? this.width;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n this.height = this.config.height ?? this.height;\r\n\r\n if (this.config.value !== undefined) {\r\n this.value = this.config.value;\r\n }\r\n if (this.config.startDate) {\r\n this.startDate = this.config.startDate;\r\n }\r\n if (this.config.endDate) {\r\n this.endDate = this.config.endDate;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n get startDateLabel(): string {\r\n return this.labels?.startDateLabel || 'Start Date';\r\n }\r\n\r\n get endDateLabel(): string {\r\n return this.labels?.endDateLabel || 'End Date';\r\n }\r\n\r\n // Helper to format Date or string to YYYY-MM-DD for native input\r\n private formatDate(date: Date | string | undefined | null): string {\r\n if (!date) return '';\r\n if (typeof date === 'string') return date; // Assume already formatted or ISO\r\n try {\r\n return date.toISOString().split('T')[0];\r\n } catch (e) {\r\n return '';\r\n }\r\n }\r\n\r\n get formattedValue(): string {\r\n return this.formatDate(this.value);\r\n }\r\n\r\n get formattedStartDate(): string {\r\n return this.formatDate(this.startDate);\r\n }\r\n\r\n get formattedEndDate(): string {\r\n return this.formatDate(this.endDate);\r\n }\r\n\r\n get formattedMin(): string {\r\n return this.formatDate(this.minDate);\r\n }\r\n\r\n get formattedMax(): string {\r\n return this.formatDate(this.maxDate);\r\n }\r\n\r\n\r\n writeValue(value: any): void {\r\n if (this.isRange && value && typeof value === 'object' && 'start' in value) {\r\n this.startDate = value.start;\r\n this.endDate = value.end;\r\n } else {\r\n this.value = value;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onDateInput(event: any): void {\r\n const value = event.target.value;\r\n this.value = value; // Keep as string or convert if needed\r\n this.onChange(this.value);\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n }\r\n\r\n onRangeStartInput(event: any): void {\r\n this.startDate = event.target.value;\r\n this.updateRangeValue();\r\n }\r\n\r\n onRangeEndInput(event: any): void {\r\n this.endDate = event.target.value;\r\n this.updateRangeValue();\r\n }\r\n\r\n private updateRangeValue(): void {\r\n const rangeValue = { start: this.startDate, end: this.endDate };\r\n this.onChange(rangeValue);\r\n this.dateChange.emit(rangeValue);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-datepicker-label-gap': this.getStyleValue(this.gap),\r\n '--cc-datepicker-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-datepicker-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-datepicker-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-datepicker-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-datepicker-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-datepicker-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-datepicker-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-datepicker-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-datepicker-height': this.getStyleValue(this.height),\r\n '--cc-datepicker-padding': this.getStyleValue(this.padding),\r\n '--cc-datepicker-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-datepicker-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-datepicker-color': this.getStyleValue(this.color),\r\n '--cc-datepicker-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-datepicker-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-datepicker-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-datepicker-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-datepicker-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-datepicker-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-datepicker-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <!-- Single Date Picker -->\r\n <div *ngIf=\"!isRange\" class=\"cc-datepicker-field\" [class.focused]=\"focused\" [class.disabled]=\"disabled\"\r\n [class.error]=\"errorMessage\" [ngStyle]=\"fieldStyles\">\r\n\r\n <input type=\"date\" class=\"cc-datepicker-input\" #dateInput [value]=\"formattedValue\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedMin\" [max]=\"formattedMax\" [placeholder]=\"placeholder\"\r\n (input)=\"onDateInput($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" (click)=\"dateInput.showPicker()\" />\r\n\r\n <span class=\"cc-datepicker-icon material-icons\" (click)=\"dateInput.showPicker()\">calendar_today</span>\r\n </div>\r\n\r\n <!-- Range Date Picker -->\r\n <div *ngIf=\"isRange\" class=\"cc-datepicker-range\">\r\n <!-- Start Date -->\r\n <div class=\"cc-datepicker-subfield\">\r\n <label class=\"cc-datepicker-sublabel\">{{ startDateLabel }}</label>\r\n <div class=\"cc-datepicker-field\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <input type=\"date\" class=\"cc-datepicker-input\" [value]=\"formattedStartDate\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedMin\" [max]=\"formattedEndDate || formattedMax\"\r\n (input)=\"onRangeStartInput($event)\" />\r\n </div>\r\n </div>\r\n\r\n <!-- End Date -->\r\n <div class=\"cc-datepicker-subfield\">\r\n <label class=\"cc-datepicker-sublabel\">{{ endDateLabel }}</label>\r\n <div class=\"cc-datepicker-field\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <input type=\"date\" class=\"cc-datepicker-input\" [value]=\"formattedEndDate\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedStartDate || formattedMin\" [max]=\"formattedMax\"\r\n (input)=\"onRangeEndInput($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { FilterSearchConfig, SearchLabels } from './search.models';\r\n\r\n@Component({\r\n selector: 'lib-search',\r\n templateUrl: './search.component.html',\r\n styleUrls: ['./search.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => SearchComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class SearchComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {\r\n @Input() config?: FilterSearchConfig;\r\n @Input() labels?: SearchLabels;\r\n @Input() placeholder: string = '';\r\n @Input() label: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() debounceMs: number = 300;\r\n @Input() clearable: boolean = true;\r\n @Input() value: any = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() border?: string; // Shorthand\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() textColor?: string; // Alias for color or specific text color\r\n @Input() iconColor?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() search = new EventEmitter<string>();\r\n @Output() clear = new EventEmitter<void>();\r\n\r\n private searchSubject = new Subject<string>();\r\n focused = false;\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.searchSubject.pipe(\r\n debounceTime(this.debounceMs),\r\n distinctUntilChanged()\r\n ).subscribe(value => {\r\n this.search.emit(value);\r\n });\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.label = this.config.label ?? this.label;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.debounceMs = this.config.debounceTime ?? this.debounceMs;\r\n this.clearable = this.config.clearable ?? this.clearable;\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.border = this.config.border ?? this.border;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.textColor = this.config.textColor ?? this.textColor;\r\n this.iconColor = this.config.iconColor ?? this.iconColor;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n if (this.config.value) {\r\n this.value = this.config.value;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.searchSubject.complete();\r\n }\r\n\r\n get clearAriaLabel(): string {\r\n return this.labels?.clearAriaLabel || 'Clear search';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value || '';\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onInputChange(event: any): void {\r\n this.value = event.target.value;\r\n this.onChange(this.value);\r\n this.searchSubject.next(this.value);\r\n }\r\n\r\n onClear(): void {\r\n this.value = '';\r\n this.onChange(this.value);\r\n this.searchSubject.next(this.value);\r\n this.clear.emit();\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-search-label-gap': this.getStyleValue(this.gap),\r\n '--cc-search-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-search-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-search-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-search-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-search-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-search-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-search-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-search-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-search-border': this.getStyleValue(this.border),\r\n '--cc-search-height': this.getStyleValue(this.height),\r\n '--cc-search-padding': this.getStyleValue(this.padding),\r\n '--cc-search-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-search-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-search-color': this.getStyleValue(this.color || this.textColor),\r\n '--cc-search-icon-color': this.getStyleValue(this.iconColor),\r\n '--cc-search-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-search-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-search-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-search-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-search-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-search-label\" [ngStyle]=\"labelStyles\">{{ label }}</label>\r\n\r\n <div class=\"cc-search-field\" [class.focused]=\"focused\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <span class=\"cc-search-icon material-icons\">search</span>\r\n\r\n <input type=\"text\" class=\"cc-search-input\" [value]=\"value\" [placeholder]=\"placeholder\" [disabled]=\"disabled\"\r\n (input)=\"onInputChange($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" />\r\n\r\n <button *ngIf=\"clearable && value && !disabled\" type=\"button\" class=\"cc-clear-btn\" (click)=\"onClear()\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n </div>\r\n</div>","import { Component, EventEmitter, Input, OnInit, Output, forwardRef } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterItem } from '../../filter-sidebar.models';\r\n\r\n@Component({\r\n selector: 'lib-filter-sidebar',\r\n templateUrl: './filter-sidebar.component.html',\r\n styleUrls: ['./filter-sidebar.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => FilterSidebarComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class FilterSidebarComponent implements OnInit, ControlValueAccessor {\r\n @Input() config!: FilterSidebarConfig;\r\n @Input() initialFilters: FilterSidebarOutput = {};\r\n\r\n @Output() filterChange = new EventEmitter<FilterSidebarChangeEvent>();\r\n @Output() filterApply = new EventEmitter<FilterSidebarOutput>();\r\n @Output() filterClear = new EventEmitter<void>();\r\n @Output() showCodeSnippet = new EventEmitter<void>();\r\n @Output() close = new EventEmitter<void>();\r\n\r\n filters: FilterSidebarOutput = {};\r\n\r\n // ControlValueAccessor callbacks\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n\r\n isCollapsed = false;\r\n\r\n toggleCollapse(): void {\r\n this.isCollapsed = !this.isCollapsed;\r\n }\r\n\r\n constructor(\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.initialFilters) {\r\n this.filters = { ...this.initialFilters };\r\n }\r\n\r\n // Initialize from URL query params if persistent\r\n if (this.config.settings?.persistent !== false) {\r\n this.route.queryParams.subscribe(params => {\r\n if (Object.keys(params).length > 0) {\r\n // Start with existing filters to preserve defaults not in URL\r\n const newFilters = { ...this.filters };\r\n\r\n Object.keys(params).forEach(key => {\r\n // Try to parse arrays or numbers if possible, otherwise string\r\n // This is a naive implementation, ideally config should dictate type\r\n const val = params[key];\r\n // If comma separated and looked like array? For now keep simple\r\n newFilters[key] = val;\r\n });\r\n\r\n this.filters = newFilters;\r\n }\r\n });\r\n }\r\n }\r\n\r\n // ControlValueAccessor Implementation\r\n writeValue(value: any): void {\r\n if (value) {\r\n this.filters = { ...value };\r\n } else {\r\n this.filters = {};\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n // Component Logic\r\n onValueChange(key: string | undefined, value: any): void {\r\n if (!key) return;\r\n\r\n this.filters[key] = value;\r\n this.notifyChanges(key, value);\r\n }\r\n\r\n private notifyChanges(key: string, value: any): void {\r\n this.onChange(this.filters);\r\n\r\n // Update URL if persistent\r\n if (this.config.settings?.persistent !== false) {\r\n this.updateUrl();\r\n }\r\n\r\n this.filterChange.emit({\r\n key,\r\n value,\r\n allFilters: this.filters\r\n });\r\n }\r\n\r\n private updateUrl(): void {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: this.filters,\r\n queryParamsHandling: 'merge',\r\n replaceUrl: true\r\n });\r\n }\r\n\r\n applyFilters(): void {\r\n this.filterApply.emit(this.filters);\r\n }\r\n\r\n clearFilters(): void {\r\n this.filters = {};\r\n this.onChange(this.filters);\r\n\r\n if (this.config.settings?.persistent !== false) {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: {},\r\n });\r\n }\r\n\r\n this.filterClear.emit();\r\n }\r\n\r\n onClose(): void {\r\n this.close.emit();\r\n }\r\n\r\n onShowCodeSnippet(): void {\r\n this.showCodeSnippet.emit();\r\n }\r\n\r\n get sidebarStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config?.styles) {\r\n if (this.config.styles.width) styles['--cc-filter-sidebar-width'] = this.config.styles.width;\r\n if (this.config.styles.padding) styles['--cc-filter-sidebar-padding'] = this.config.styles.padding;\r\n if (this.config.styles.gap) styles['--cc-filter-sidebar-gap'] = this.config.styles.gap;\r\n if (this.config.styles.backgroundColor) styles['--cc-filter-sidebar-bg'] = this.config.styles.backgroundColor;\r\n if (this.config.styles.headerHeight) styles['--cc-filter-header-height'] = this.config.styles.headerHeight;\r\n if (this.config.styles.borderRadius) styles['--cc-filter-sidebar-border-radius'] = this.config.styles.borderRadius;\r\n }\r\n return styles;\r\n }\r\n\r\n trackByFn(index: number, item: FilterItem): any {\r\n return item.key || index;\r\n }\r\n}\r\n","<div class=\"cc-filter-sidebar\" [ngStyle]=\"sidebarStyles\" [class.collapsed]=\"isCollapsed\">\r\n\r\n <!-- Header -->\r\n <div class=\"cc-filter-header\" *ngIf=\"config.header?.visible !== false\">\r\n <div class=\"cc-header-content\">\r\n <span class=\"cc-header-title\" *ngIf=\"config.header?.title\">\r\n <span *ngIf=\"config.header?.icon\" [class]=\"config.header?.icon\" class=\"cc-header-icon material-icons\">\r\n <!-- {{config.header?.icon }} -->\r\n </span>\r\n {{ config.header?.title }}\r\n </span>\r\n <ng-content select=\"[header-actions]\"></ng-content>\r\n </div>\r\n <button type=\"button\" *ngIf=\"config.settings?.collapsible\" (click)=\"toggleCollapse()\" class=\"cc-icon-btn\"\r\n [attr.aria-label]=\"isCollapsed ? config.labels?.expandAriaLabel : config.labels?.collapseAriaLabel\">\r\n <span class=\"material-icons\">{{ isCollapsed ? 'menu_open' : 'menu' }}</span>\r\n </button>\r\n <button type=\"button\" *ngIf=\"config.header?.showClose && !isCollapsed\" (click)=\"onClose()\"\r\n class=\"cc-icon-btn cc-close-btn\" [attr.aria-label]=\"config.labels?.closeAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n <!-- Code snippet debug (optional) -->\r\n <button type=\"button\" *ngIf=\"config.settings?.showCodeSnippet\" (click)=\"onShowCodeSnippet()\" class=\"cc-icon-btn\"\r\n [attr.aria-label]=\"config.labels?.codeSnippetAriaLabel\">\r\n <span class=\"material-icons\">code</span>\r\n </button>\r\n </div>\r\n\r\n <!-- Content (Scrollable) -->\r\n <div class=\"cc-filter-content\" [class.hidden]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of config.items; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"cc-filter-footer\" *ngIf=\"config.footer?.visible !== false && !isCollapsed\">\r\n <lib-button variant=\"outline\" color=\"warn\" class=\"cc-btn-clear\"\r\n *ngIf=\"config.footer?.clearButton?.visible !== false\" (click)=\"clearFilters()\">\r\n {{ config.footer?.clearButton?.label }}\r\n </lib-button>\r\n <lib-button variant=\"primary\" color=\"warn\" class=\"cc-btn-apply\"\r\n *ngIf=\"config.footer?.applyButton?.visible !== false\" [disabled]=\"config.footer?.applyButton?.disabled\"\r\n (click)=\"applyFilters()\">\r\n {{ config.footer?.applyButton?.label }}\r\n </lib-button>\r\n </div>\r\n</div>\r\n\r\n<!-- Recursive Template for Items -->\r\n<ng-template #itemTemplate let-item=\"item\">\r\n <div class=\"cc-filter-item\" [ngClass]=\"['type-' + item.type]\"\r\n [style.display]=\"item.visible === false ? 'none' : 'block'\" [ngStyle]=\"item.styles\">\r\n\r\n <ng-container [ngSwitch]=\"item.type\">\r\n\r\n <!-- Input -->\r\n <lib-input *ngSwitchCase=\"'input'\" [config]=\"item.inputConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (valueChange)=\"onValueChange(item.key, $event)\">\r\n </lib-input>\r\n\r\n <!-- Dropdown -->\r\n <lib-dropdown *ngSwitchCase=\"'dropdown'\" [config]=\"item.dropdownConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (selectionChange)=\"onValueChange(item.key, $event)\">\r\n </lib-dropdown>\r\n\r\n <!-- Checkbox -->\r\n <lib-checkbox *ngSwitchCase=\"'checkbox'\" [config]=\"item.checkboxConfig\" [label]=\"item.label\"\r\n [checked]=\"!!filters[item.key]\" (checkedChange)=\"onValueChange(item.key, $event)\">\r\n </lib-checkbox>\r\n\r\n <!-- Radio -->\r\n <lib-radio *ngSwitchCase=\"'radio'\" [config]=\"item.radioConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (selectionChange)=\"onValueChange(item.key, $event)\">\r\n </lib-radio>\r\n\r\n <!-- Toggle -->\r\n <lib-toggle *ngSwitchCase=\"'toggle'\" [config]=\"item.toggleConfig\" [label]=\"item.label\"\r\n [checked]=\"filters[item.key]\" (toggleChange)=\"onValueChange(item.key, $event)\">\r\n </lib-toggle>\r\n\r\n <!-- Datepicker -->\r\n <lib-datepicker *ngSwitchCase=\"'datepicker'\" [config]=\"item.datepickerConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (dateChange)=\"onValueChange(item.key, $event)\">\r\n </lib-datepicker>\r\n\r\n <!-- Search -->\r\n <lib-search *ngSwitchCase=\"'active-search'\" [config]=\"item.searchConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (search)=\"onValueChange(item.key, $event)\">\r\n </lib-search>\r\n\r\n <!-- Group / Accordion -->\r\n <div *ngSwitchCase=\"'group'\" class=\"cc-accordion-item\" [class.expanded]=\"item.expanded\">\r\n <button type=\"button\" class=\"cc-accordion-header\" (click)=\"item.expanded = !item.expanded\">\r\n <span class=\"cc-accordion-title\">{{ item.label }}</span>\r\n <span class=\"material-icons cc-accordion-icon\">{{ item.expanded ? 'expand_less' : 'expand_more'\r\n }}</span>\r\n </button>\r\n\r\n <div class=\"cc-accordion-body\" *ngIf=\"item.expanded\">\r\n <ng-container *ngFor=\"let child of item.children; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: child }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Custom Divider -->\r\n <div *ngSwitchCase=\"'divider'\" class=\"cc-filter-divider\"></div>\r\n\r\n </ng-container>\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { ScrollingModule } from '@angular/cdk/scrolling';\r\nimport { InputComponent } from './components/input/input.component';\r\nimport { DropdownComponent } from './components/dropdown/dropdown.component';\r\nimport { CheckboxComponent } from './components/checkbox/checkbox.component';\r\nimport { RadioComponent } from './components/radio/radio.component';\r\nimport { ToggleComponent } from './components/toggle/toggle.component';\r\nimport { DatepickerComponent } from './components/datepicker/datepicker.component';\r\nimport { SearchComponent } from './components/search/search.component';\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n InputComponent,\r\n DropdownComponent,\r\n CheckboxComponent,\r\n RadioComponent,\r\n ToggleComponent,\r\n DatepickerComponent,\r\n SearchComponent,\r\n ClickOutsideDirective\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n ScrollingModule\r\n ],\r\n exports: [\r\n InputComponent,\r\n DropdownComponent,\r\n CheckboxComponent,\r\n RadioComponent,\r\n ToggleComponent,\r\n DatepickerComponent,\r\n SearchComponent\r\n ]\r\n})\r\nexport class FormComponentsModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { FilterSidebarComponent } from './components/filter-sidebar/filter-sidebar.component';\r\nimport { FormComponentsModule } from '../form-components/form-components.module';\r\nimport { ButtonModule } from '../button/button.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n FilterSidebarComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FormComponentsModule,\r\n ButtonModule\r\n ],\r\n exports: [\r\n FilterSidebarComponent\r\n ]\r\n})\r\nexport class FilterSidebarModule { }\r\n","import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';\r\n\r\nexport interface SummaryCardConfig {\r\n header: string;\r\n value: string;\r\n description?: string;\r\n\r\n // Icon or Image (mutually exclusive)\r\n icon?: string; // Material icon name\r\n iconImage?: string; // URL for image icon\r\n\r\n // Layout configurations\r\n descriptionPosition?: 'bottom' | 'inline'; // 'bottom' (default) or 'inline' (right side of value)\r\n\r\n // Extended Content\r\n valueSubtext?: string; // Text displayed next to the value (e.g. \"/ 15 Target\")\r\n metaData?: SummaryCardMeta[]; // Right-aligned meta information\r\n\r\n // Color configurations\r\n valueColor?: string; // Color for the value text\r\n headerColor?: string; // Color for the header text\r\n descriptionColor?: string; // Color for the description text\r\n iconColor?: string; // Color for the icon\r\n iconBackgroundColor?: string; // Background color for the icon container\r\n\r\n // Additional styling\r\n iconClass?: string; // Additional CSS classes for icon\r\n valueClass?: string; // Additional CSS classes for value\r\n headerClass?: string; // Additional CSS classes for header\r\n descriptionClass?: string; // Additional CSS classes for description\r\n\r\n // Interaction\r\n isDisabled?: boolean; // Disable click interaction\r\n isClickable?: boolean; // Whether card is clickable (default: true)\r\n}\r\n\r\nexport interface SummaryCardMeta {\r\n text: string;\r\n type?: 'text' | 'pill'; // 'text' (default) or 'pill' (badge style)\r\n color?: string; // Text color\r\n backgroundColor?: string; // Background color for pill\r\n cssClass?: string; // Custom CSS class\r\n}\r\n\r\nexport interface SummaryCardLabels {\r\n iconAlt: string;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-summary-card',\r\n templateUrl: './summary-card.component.html',\r\n styleUrls: ['./summary-card.component.scss'],\r\n standalone: false\r\n})\r\nexport class SummaryCardComponent {\r\n @Input() config!: SummaryCardConfig;\r\n @Input() theme?: 'theme-1' | 'theme-2';\r\n @Input() labels: any;\r\n @Output() cardClick = new EventEmitter<void>();\r\n\r\n constructor() { }\r\n\r\n onCardClick(): void {\r\n if (this.config?.isDisabled || this.config?.isClickable === false) {\r\n return;\r\n }\r\n this.cardClick.emit();\r\n }\r\n\r\n get cardClasses(): { [key: string]: boolean } {\r\n return {\r\n 'disabled': !!this.config?.isDisabled,\r\n 'clickable': this.config?.isClickable !== false && !this.config?.isDisabled\r\n };\r\n }\r\n\r\n get iconStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.iconBackgroundColor) {\r\n styles['backgroundColor'] = this.config.iconBackgroundColor;\r\n }\r\n if (this.config.iconColor) {\r\n styles['color'] = this.config.iconColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get headerStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.headerColor) {\r\n styles['color'] = this.config.headerColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get valueStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.valueColor) {\r\n styles['color'] = this.config.valueColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get descriptionStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.descriptionColor) {\r\n styles['color'] = this.config.descriptionColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get isDescriptionInline(): boolean {\r\n return this.config.descriptionPosition === 'inline';\r\n }\r\n\r\n getMetaStyles(meta: SummaryCardMeta): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (meta.color) {\r\n styles['color'] = meta.color;\r\n }\r\n if (meta.backgroundColor && meta.type === 'pill') {\r\n styles['backgroundColor'] = meta.backgroundColor;\r\n }\r\n return styles;\r\n }\r\n}\r\n","<div class=\"cc-summary-card\" (click)=\"onCardClick()\">\r\n <!-- Icon Section (Left Side) -->\r\n <div class=\"icon-section\" *ngIf=\"config.icon || config.iconImage\" [ngClass]=\"config.iconClass\"\r\n [ngStyle]=\"iconStyles\">\r\n <mat-icon *ngIf=\"config.icon\">{{ config.icon }}</mat-icon>\r\n <img *ngIf=\"!config.icon && config.iconImage\" [src]=\"config.iconImage\" [alt]=\"labels.iconAlt\">\r\n </div>\r\n\r\n <!-- Right Section (Header + Value/Meta) -->\r\n <div class=\"right-section\">\r\n <!-- Header (Full Width on Right) -->\r\n <div class=\"header\" [ngClass]=\"config.headerClass\" [ngStyle]=\"headerStyles\">\r\n {{ config.header }}\r\n </div>\r\n\r\n <!-- Value and Meta Row -->\r\n <div class=\"value-meta-row\">\r\n <!-- Content Section -->\r\n <div class=\"content-section\">\r\n <!-- Value Row (with optional inline description) -->\r\n <div class=\"value-row\" [class.inline-layout]=\"isDescriptionInline\">\r\n <div class=\"value-container\">\r\n <div class=\"value\" [ngClass]=\"config.valueClass\" [ngStyle]=\"valueStyles\">\r\n {{ config.value }}\r\n <span *ngIf=\"config.valueSubtext\" class=\"value-subtext\">{{ config.valueSubtext }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Description (inline or bottom based on config) -->\r\n <div class=\"description\" *ngIf=\"config.description\" [ngClass]=\"config.descriptionClass\"\r\n [ngStyle]=\"descriptionStyles\">\r\n {{ config.description }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Meta/Status Section (Aligned with Value) -->\r\n <div class=\"meta-section\" *ngIf=\"config.metaData && config.metaData.length > 0\">\r\n <div *ngFor=\"let meta of config.metaData\" class=\"meta-item\"\r\n [ngClass]=\"[meta.type === 'pill' ? 'meta-pill' : 'meta-text', meta.cssClass || '']\"\r\n [ngStyle]=\"getMetaStyles(meta)\">\r\n {{ meta.text }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SummaryCardComponent } from './components/summary-card/summary-card.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n SummaryCardComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatIconModule\r\n ],\r\n exports: [\r\n SummaryCardComponent\r\n ]\r\n})\r\nexport class SummaryCardModule { }\r\n","\r\n/**\r\n * Recursively translates the Configuration object using the provided labels map.\r\n * This function processes:\r\n * - Section Titles\r\n * - Field Labels\r\n * - Placeholders\r\n * - Help Texts\r\n * - Option Labels (for static options)\r\n * - Repeater Labels (addLabel, repeaterItemLabel)\r\n * \r\n * @param config The FormConfig object to translate\r\n * @param labelsMap A map of key-value pairs for translation (Flattened JSON)\r\n * @returns A new FormConfig object with translated strings\r\n */\r\nexport function translateConfig(config: any, labelsMap: any): any {\r\n if (!config || !labelsMap) {\r\n return config;\r\n }\r\n\r\n // Deep clone to avoid mutating original config, if not already cloned\r\n // Note: Assuming config passed here is already a clone to be modified or we clone it.\r\n // To be safe, let's clone it if it's the root call, but this function is helper.\r\n // In component we do: processedConfig = JSON.parse(JSON.stringify(config)); -> translateConfig(processedConfig, map)\r\n // So distinct reference is passed.\r\n\r\n // Helper to translate a single key\r\n const t = (key: string) => {\r\n return labelsMap[key] || key;\r\n };\r\n\r\n if (config.sections) {\r\n config.sections.forEach((section: any) => {\r\n if (section.sectionTitle) {\r\n section.sectionTitle = t(section.sectionTitle);\r\n }\r\n if (section.repeaterItemLabel) {\r\n section.repeaterItemLabel = t(section.repeaterItemLabel);\r\n }\r\n if (section.addLabel) {\r\n section.addLabel = t(section.addLabel);\r\n }\r\n\r\n if (section.fields) {\r\n section.fields.forEach((field: any) => {\r\n translateField(field, t);\r\n });\r\n }\r\n });\r\n }\r\n\r\n return config;\r\n}\r\n\r\nfunction translateField(field: any, t: (key: string) => string) {\r\n if (field.label) {\r\n field.label = t(field.label);\r\n }\r\n if (field.placeholder) {\r\n field.placeholder = t(field.placeholder);\r\n }\r\n if (field.helpText) {\r\n field.helpText = t(field.helpText);\r\n }\r\n if (field.suffixText) {\r\n field.suffixText = t(field.suffixText);\r\n }\r\n if (field.prefixText) { // Assuming prefixText might exist or be added\r\n field.prefixText = t(field.prefixText);\r\n }\r\n\r\n // Translate options if they exist\r\n if (field.options) {\r\n field.options.forEach((opt: any) => {\r\n if (opt.label) {\r\n opt.label = t(opt.label);\r\n }\r\n });\r\n }\r\n\r\n // Handle subFields for composite type\r\n if (field.subFields) {\r\n field.subFields.forEach((sub: any) => {\r\n translateField(sub, t);\r\n });\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { FormBuilder, FormGroup, FormControl, FormArray, Validators, AbstractControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {\r\n FormConfig,\r\n FormField,\r\n FormSection,\r\n FormOption,\r\n JsonFormConfig,\r\n JsonFieldConfig,\r\n FieldType,\r\n UISubType\r\n} from '../configurable-form.model';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from '../../material/material.module';\r\nimport { translateConfig } from '../../../utils/translation.utils';\r\n\r\n@Component({\r\n selector: 'lib-configurable-form',\r\n templateUrl: './configurable-form.component.html',\r\n styleUrls: ['./configurable-form.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, ReactiveFormsModule, MaterialModule],\r\n})\r\nexport class ConfigurableFormComponent implements OnInit, OnChanges {\r\n @Input() config!: FormConfig;\r\n @Input() jsonConfig!: JsonFormConfig;\r\n @Input() data: any = {};\r\n @Input() baseApiUrl: string = '';\r\n @Input() labels: any;\r\n @Output() optionsLoad = new EventEmitter<any>();\r\n\r\n form!: FormGroup;\r\n processedConfig!: FormConfig;\r\n fieldVisibilityMap: Map<string, boolean> = new Map();\r\n passwordFieldState: Map<string, boolean> = new Map();\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private snackBar: MatSnackBar,\r\n private http: HttpClient\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.initializeForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config'] || changes['jsonConfig']) {\r\n this.initializeForm();\r\n }\r\n if (changes['data'] && this.form) {\r\n this.form.patchValue(this.data);\r\n }\r\n }\r\n\r\n initializeForm() {\r\n // Transform JSON config if provided, otherwise use config directly\r\n if (this.jsonConfig) {\r\n this.processedConfig = this.transformJsonConfig(this.jsonConfig);\r\n } else if (this.config) {\r\n this.processedConfig = JSON.parse(JSON.stringify(this.config));\r\n } else {\r\n return;\r\n }\r\n\r\n // Apply translations if labels and labelsObject are provided\r\n if (this.labels && this.labels.labelsObject) {\r\n translateConfig(this.processedConfig, this.labels.labelsObject);\r\n }\r\n\r\n\r\n this.normalizeFields();\r\n this.initializeFieldVisibility();\r\n this.buildForm();\r\n this.setupDependencies();\r\n\r\n // Patch initial data if provided\r\n if (this.data && Object.keys(this.data).length > 0) {\r\n this.form.patchValue(this.data);\r\n }\r\n }\r\n\r\n // Transform JSON config format to internal FormConfig format\r\n transformJsonConfig(jsonConfig: JsonFormConfig): FormConfig {\r\n const fields = jsonConfig.jsonConfig\r\n .sort((a, b) => a.sequence - b.sequence)\r\n .map(field => this.transformJsonField(field));\r\n\r\n return {\r\n sections: [{\r\n sectionTitle: jsonConfig.label,\r\n fields: fields\r\n }],\r\n entityType: jsonConfig.entityType\r\n };\r\n }\r\n\r\n // Transform individual JSON field to FormField\r\n transformJsonField(jsonField: JsonFieldConfig): FormField {\r\n const fieldType = this.mapUISubTypeToFieldType(jsonField.uiConfig.subType);\r\n\r\n return {\r\n name: jsonField.jsonKey,\r\n jsonKey: jsonField.jsonKey,\r\n label: jsonField.label,\r\n type: fieldType,\r\n sequence: jsonField.sequence,\r\n keyType: jsonField.keyType,\r\n uiConfig: jsonField.uiConfig,\r\n validationRules: jsonField.validationRules,\r\n required: jsonField.validationRules?.isMandatory || jsonField.validationRules?.isRequired,\r\n mandatory: jsonField.validationRules?.isMandatory,\r\n dependsOn: undefined, // Will be set based on dependent array\r\n dependent: jsonField.uiConfig.dependent,\r\n optionConfigs: jsonField.uiConfig.optionConfigs,\r\n class: 'col-12'\r\n };\r\n }\r\n\r\n // Map UI subtype to field type\r\n mapUISubTypeToFieldType(subType?: string): FieldType {\r\n switch (subType) {\r\n case 'UI_SUBTYPE.SHORT_TEXT':\r\n return 'text';\r\n case 'UI_SUBTYPE.LONG_TEXT':\r\n return 'textarea';\r\n case 'UI_SUBTYPE.NUMBER':\r\n return 'number';\r\n case 'UI_SUBTYPE.EMAIL':\r\n return 'email';\r\n case 'UI_SUBTYPE.PHONE':\r\n return 'tel';\r\n case 'UI_SUBTYPE.URL':\r\n return 'url';\r\n default:\r\n return 'text';\r\n }\r\n }\r\n\r\n // Normalize fields to ensure all required properties exist\r\n normalizeFields() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n // Set default type if not specified\r\n if (!field.type) {\r\n field.type = 'text';\r\n }\r\n\r\n // Merge uiConfig with field-level properties\r\n if (field.uiConfig) {\r\n if (field.uiConfig.type === 'UI_TYPE.DROP_DOWN') {\r\n field.type = 'dropdown';\r\n }\r\n if (field.uiConfig.optionConfigs) {\r\n field.optionConfigs = field.uiConfig.optionConfigs;\r\n }\r\n if (field.uiConfig.dependent) {\r\n field.dependent = field.uiConfig.dependent;\r\n }\r\n }\r\n\r\n // Initialize visibility\r\n if (field.visible === undefined) {\r\n field.visible = true;\r\n }\r\n\r\n // Load options for dropdowns\r\n if ((field.type === 'dropdown' || field.type === 'select') && field.optionConfigs) {\r\n this.loadFieldOptions(field);\r\n }\r\n });\r\n });\r\n }\r\n\r\n // Initialize field visibility map\r\n initializeFieldVisibility() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n this.fieldVisibilityMap.set(field.name, field.visible !== false);\r\n });\r\n });\r\n }\r\n\r\n buildForm() {\r\n const formGroupConfig: any = {};\r\n\r\n this.processedConfig.sections.forEach(section => {\r\n if (section.isRepeater) {\r\n // Create FormArray for repeater sections\r\n const arrayName = section.formArrayName || 'items';\r\n const minItems = section.minItems || 1;\r\n const initialItems = [];\r\n\r\n for (let i = 0; i < minItems; i++) {\r\n initialItems.push(this.createGroup(section.fields));\r\n }\r\n\r\n formGroupConfig[arrayName] = this.fb.array(initialItems);\r\n } else {\r\n // Add regular fields to form group\r\n section.fields.forEach(field => {\r\n if (field.subFields) {\r\n // Composite field - add all sub-fields\r\n field.subFields.forEach(subField => {\r\n if (field.required || field.mandatory) {\r\n subField.required = true;\r\n }\r\n formGroupConfig[subField.name] = this.createControl(subField);\r\n });\r\n } else {\r\n formGroupConfig[field.name] = this.createControl(field);\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.form = this.fb.group(formGroupConfig);\r\n\r\n // Apply composite validators to the root form group\r\n this.processedConfig.sections.forEach(section => {\r\n if (!section.isRepeater) {\r\n section.fields.forEach(field => {\r\n if (field.type === 'composite' && field.compositeValidationRule && field.subFields) {\r\n this.form.addValidators(this.createCompositeValidator(field));\r\n }\r\n });\r\n }\r\n });\r\n this.form.updateValueAndValidity();\r\n }\r\n\r\n createCompositeValidator(field: FormField) {\r\n return (control: AbstractControl) => {\r\n const group = control as FormGroup;\r\n if (!field.subFields || field.subFields.length < 2) return null;\r\n\r\n if (field.compositeValidationRule === 'minMax') {\r\n const minControl = group.get(field.subFields[0].name);\r\n const maxControl = group.get(field.subFields[1].name);\r\n\r\n if (minControl && maxControl && minControl.value !== null && maxControl.value !== null) {\r\n if (Number(minControl.value) > Number(maxControl.value)) {\r\n return { [`invalid_minMax_${field.name}`]: true };\r\n }\r\n }\r\n }\r\n\r\n if (field.compositeValidationRule === 'percentageTotal') {\r\n let total = 0;\r\n let allPresent = true;\r\n\r\n field.subFields.forEach(sub => {\r\n const ctrl = group.get(sub.name);\r\n if (ctrl && ctrl.value !== null && ctrl.value !== '') {\r\n total += Number(ctrl.value);\r\n } else {\r\n allPresent = false;\r\n }\r\n });\r\n\r\n if (allPresent && total !== 100) {\r\n return { [`invalid_percentageTotal_${field.name}`]: true };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n }\r\n\r\n createControl(field: FormField): FormControl {\r\n const validators = [];\r\n\r\n // Add validators based on field configuration\r\n if (field.required || field.mandatory || field.validationRules?.isMandatory || field.validationRules?.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (field.validationRules?.minLength) {\r\n validators.push(Validators.minLength(field.validationRules.minLength));\r\n }\r\n\r\n if (field.validationRules?.maxLength) {\r\n validators.push(Validators.maxLength(field.validationRules.maxLength));\r\n }\r\n\r\n if (field.validationRules?.pattern) {\r\n validators.push(Validators.pattern(field.validationRules.pattern));\r\n }\r\n\r\n if (field.validationRules?.min !== undefined) {\r\n validators.push(Validators.min(field.validationRules.min));\r\n }\r\n\r\n if (field.validationRules?.max !== undefined) {\r\n validators.push(Validators.max(field.validationRules.max));\r\n }\r\n\r\n if (field.type === 'email') {\r\n validators.push(Validators.email);\r\n }\r\n\r\n const initialValue = field.value !== undefined ? field.value : '';\r\n return this.fb.control({ value: initialValue, disabled: field.disabled || false }, validators);\r\n }\r\n\r\n createGroup(fields: FormField[]): FormGroup {\r\n const groupConfig: any = {};\r\n\r\n fields.forEach(field => {\r\n if (field.subFields) {\r\n field.subFields.forEach(subField => {\r\n groupConfig[subField.name] = this.createControl(subField);\r\n });\r\n } else {\r\n groupConfig[field.name] = this.createControl(field);\r\n }\r\n });\r\n\r\n return this.fb.group(groupConfig);\r\n }\r\n\r\n getFormArray(name: string): FormArray {\r\n return this.form.get(name) as FormArray;\r\n }\r\n\r\n addRepeaterItem(section: FormSection) {\r\n const arrayName = section.formArrayName || 'items';\r\n const formArray = this.getFormArray(arrayName);\r\n\r\n // Check max items\r\n if (section.maxItems && formArray.length >= section.maxItems) {\r\n this.snackBar.open(this.labels.errorMaxItemsAllowed.replace('{0}', String(section.maxItems)), this.labels.closeSnackBar, { duration: 3000 });\r\n return;\r\n }\r\n\r\n formArray.push(this.createGroup(section.fields));\r\n }\r\n\r\n removeRepeaterItem(sectionName: string, index: number) {\r\n const formArray = this.getFormArray(sectionName);\r\n formArray.removeAt(index);\r\n }\r\n\r\n validate(): boolean {\r\n if (this.form.invalid) {\r\n this.form.markAllAsTouched();\r\n this.scrollToFirstInvalidControl();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n scrollToFirstInvalidControl() {\r\n const firstInvalidControl = document.querySelector('.is-invalid');\r\n if (firstInvalidControl) {\r\n firstInvalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });\r\n }\r\n }\r\n\r\n setupDependencies() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n\r\n\r\n // Also setup for fields with dependent array\r\n if (field.dependent && field.dependent.length > 0) {\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n control.valueChanges.subscribe(value => {\r\n this.onFieldValueChange(field, value);\r\n });\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n onFieldValueChange(field: FormField, value: any) {\r\n // Handle dependent fields\r\n if (field.dependent && field.dependent.length > 0) {\r\n field.dependent.forEach(dependentFieldName => {\r\n const dependentField = this.findFieldByName(dependentFieldName);\r\n if (dependentField) {\r\n // Clear the dependent field value\r\n const control = this.form.get(dependentFieldName);\r\n if (control) {\r\n control.setValue('');\r\n control.markAsUntouched();\r\n }\r\n\r\n // Load new options for the dependent field\r\n if (value) {\r\n this.loadFieldOptions(dependentField, { [field.name]: value });\r\n } else {\r\n // Clear options if parent value is cleared\r\n dependentField.loadedOptions = [];\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Load options for a dropdown field\r\n loadFieldOptions(field: FormField, parentValues?: any) {\r\n // Emit event for parent to notify about options load request\r\n // Allow parent to mark as handled to skip internal API call\r\n const event = { field, parentValue: parentValues, handled: false };\r\n this.optionsLoad.emit(event);\r\n\r\n if (event.handled) {\r\n return;\r\n }\r\n\r\n if (!field.optionConfigs) {\r\n return;\r\n }\r\n\r\n const config = field.optionConfigs;\r\n\r\n // Handle static options\r\n if (config.optionDTO === 'OPTION_DTO.STATIC' && config.staticOptions) {\r\n field.loadedOptions = config.staticOptions;\r\n return;\r\n }\r\n\r\n // Handle API-based options\r\n if (config.optionDTO === 'OPTION_DTO.REF_DATA' && config.url) {\r\n let url = config.url;\r\n\r\n // Replace placeholders in URL with parent values\r\n if (parentValues) {\r\n Object.keys(parentValues).forEach(key => {\r\n url = url.replace(`{${key}}`, parentValues[key]);\r\n });\r\n }\r\n\r\n // Prepend base API URL if provided\r\n if (this.baseApiUrl && !url.startsWith('http')) {\r\n url = `${this.baseApiUrl}/${url}`;\r\n }\r\n\r\n this.http.get<any>(url).subscribe({\r\n next: (response) => {\r\n // Extract data from response\r\n const data = response.data || response.content || response;\r\n field.loadedOptions = this.extractOptions(data, config);\r\n },\r\n error: (error) => {\r\n console.error('Error loading options:', error);\r\n field.loadedOptions = [];\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Extract options from API response\r\n extractOptions(data: any[], config: any): FormOption[] {\r\n if (!Array.isArray(data)) {\r\n return [];\r\n }\r\n\r\n return data.map(item => ({\r\n label: item[config.labelKey || 'name'],\r\n value: item[config.requestKey || 'code'] || item[config.valueKey || 'id'],\r\n code: item.code,\r\n name: item.name\r\n }));\r\n }\r\n\r\n // Get options for a field (either static or loaded)\r\n getFieldOptions(field: FormField): FormOption[] {\r\n return field.loadedOptions || field.options || [];\r\n }\r\n\r\n // Check if field is visible\r\n isFieldVisible(field: FormField): boolean {\r\n return this.fieldVisibilityMap.get(field.name) !== false;\r\n }\r\n\r\n // Toggle field visibility\r\n toggleFieldVisibility(field: FormField, visible: boolean) {\r\n this.fieldVisibilityMap.set(field.name, visible);\r\n\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n if (visible) {\r\n // Re-enable and restore validators\r\n control.enable();\r\n this.updateControlValidators(control, field);\r\n } else {\r\n // Disable and clear validators\r\n control.disable();\r\n control.clearValidators();\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n }\r\n\r\n // Update control validators based on field config\r\n updateControlValidators(control: AbstractControl, field: FormField) {\r\n const validators = [];\r\n\r\n if (field.required || field.mandatory || field.validationRules?.isMandatory) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (field.validationRules?.minLength) {\r\n validators.push(Validators.minLength(field.validationRules.minLength));\r\n }\r\n\r\n if (field.validationRules?.maxLength) {\r\n validators.push(Validators.maxLength(field.validationRules.maxLength));\r\n }\r\n\r\n if (field.validationRules?.pattern) {\r\n validators.push(Validators.pattern(field.validationRules.pattern));\r\n }\r\n\r\n control.setValidators(validators);\r\n control.updateValueAndValidity();\r\n }\r\n\r\n onFileChange(event: any, field: FormField) {\r\n const files: FileList = event.target.files;\r\n\r\n if (!files || files.length === 0) {\r\n return;\r\n }\r\n\r\n // Initialize uploadedFiles if not present\r\n // Initialize uploadedFiles if not present\r\n if (!field.uploadedFiles) {\r\n field.uploadedFiles = [];\r\n }\r\n\r\n const uploadedFiles: any[] = [];\r\n // Handle files\r\n for (let i = 0; i < files.length; i++) {\r\n const file = files[i];\r\n\r\n // Check file size (5MB limit)\r\n if (file.size > 5 * 1024 * 1024) {\r\n this.snackBar.open(this.labels.errorFileLimitExceeded.replace('{0}', file.name), this.labels.closeSnackBar, { duration: 3000 });\r\n continue;\r\n }\r\n\r\n uploadedFiles.push({\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n file: file\r\n });\r\n }\r\n\r\n if (field.multiple) {\r\n field.uploadedFiles.push(...uploadedFiles);\r\n } else {\r\n field.uploadedFiles = uploadedFiles;\r\n }\r\n\r\n // Update form control value for validation\r\n this.updateFileControlValue(field);\r\n\r\n // Clear the input\r\n event.target.value = '';\r\n }\r\n\r\n // Remove uploaded file\r\n removeFile(field: FormField, index: number) {\r\n if (field.uploadedFiles) {\r\n field.uploadedFiles.splice(index, 1);\r\n this.updateFileControlValue(field);\r\n }\r\n }\r\n\r\n // Update file control value for validation\r\n updateFileControlValue(field: FormField) {\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n const hasFiles = field.uploadedFiles && field.uploadedFiles.length > 0;\r\n control.setValue(hasFiles ? field.uploadedFiles : null);\r\n control.markAsTouched();\r\n }\r\n }\r\n\r\n // Get character count for text field\r\n getCharacterCount(fieldName: string): number {\r\n const control = this.form.get(fieldName);\r\n if (control && control.value) {\r\n return control.value.toString().length;\r\n }\r\n return 0;\r\n }\r\n\r\n // Toggle section collapse\r\n toggleSection(section: FormSection) {\r\n section.collapsed = !section.collapsed;\r\n }\r\n\r\n\r\n\r\n // Helper method to find field by name\r\n private findFieldByName(name: string): FormField | undefined {\r\n for (const section of this.processedConfig.sections) {\r\n const field = section.fields.find(f => f.name === name);\r\n if (field) {\r\n return field;\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n // Get the processed config for template use\r\n get sections(): FormSection[] {\r\n return this.processedConfig?.sections || [];\r\n }\r\n\r\n togglePassword(fieldName: string) {\r\n this.passwordFieldState.set(fieldName, !this.passwordFieldState.get(fieldName));\r\n }\r\n\r\n isPasswordVisible(fieldName: string): boolean {\r\n return this.passwordFieldState.get(fieldName) || false;\r\n }\r\n}\r\n\r\n","<form [formGroup]=\"form\" class=\"configurable-form-container\" *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let section of sections\">\r\n\r\n <!-- Repeater Section -->\r\n <div *ngIf=\"section.isRepeater; else normalSection\"\r\n [ngClass]=\"section.noCardLayout ? 'section-no-card' : 'section-card'\">\r\n <div class=\"section-header\" *ngIf=\"section.sectionTitle\">\r\n <h3 class=\"section-title\">{{ section.sectionTitle }}</h3>\r\n <button *ngIf=\"section.collapsible\" mat-icon-button type=\"button\" (click)=\"toggleSection(section)\">\r\n <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div [formArrayName]=\"section.formArrayName || 'items'\" *ngIf=\"!section.collapsed\">\r\n <div *ngFor=\"let item of getFormArray(section.formArrayName!).controls; let i = index\"\r\n [formGroupName]=\"i\" class=\"repeater-item\">\r\n <div class=\"repeater-item-header\" *ngIf=\"getFormArray(section.formArrayName!).length > 1\">\r\n <span class=\"text-small\">{{ section.repeaterItemLabel || labels.repeaterItemDefaultLabel }} {{i\r\n + 1}}</span>\r\n <button mat-icon-button color=\"warn\" type=\"button\"\r\n (click)=\"removeRepeaterItem(section.formArrayName!, i)\"\r\n [disabled]=\"section.minItems && getFormArray(section.formArrayName!).length <= section.minItems\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Fields Grid -->\r\n <div class=\"form-grid\">\r\n <div *ngFor=\"let field of section.fields\" [ngClass]=\"['form-col', field.class || 'col-12']\"\r\n [hidden]=\"!isFieldVisible(field)\">\r\n <ng-container\r\n *ngTemplateOutlet=\"fieldTemplate; context: {field: field, group: item}\"></ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"repeater-separator\" *ngIf=\"i < getFormArray(section.formArrayName!).length - 1\"></div>\r\n </div>\r\n </div>\r\n\r\n <button mat-button color=\"primary\" type=\"button\" (click)=\"addRepeaterItem(section)\" class=\"add-btn\"\r\n *ngIf=\"!section.collapsed\"\r\n [disabled]=\"section.maxItems && getFormArray(section.formArrayName!).length >= section.maxItems\">\r\n <mat-icon>add_circle_outline</mat-icon> {{ section.addLabel || labels.addMoreDefaultLabel }}\r\n </button>\r\n </div>\r\n\r\n <!-- Normal Section -->\r\n <ng-template #normalSection>\r\n <div [ngClass]=\"section.noCardLayout ? 'section-no-card' : 'section-card'\">\r\n <div class=\"section-header\" *ngIf=\"section.sectionTitle\">\r\n <h3 class=\"section-title\">{{ section.sectionTitle }}</h3>\r\n <button *ngIf=\"section.collapsible\" mat-icon-button type=\"button\" (click)=\"toggleSection(section)\">\r\n <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"form-grid\" *ngIf=\"!section.collapsed\">\r\n <div *ngFor=\"let field of section.fields\" [ngClass]=\"['form-col', field.class || 'col-12']\"\r\n [hidden]=\"!isFieldVisible(field)\">\r\n <!-- Pass the root form group to the template -->\r\n <ng-container\r\n *ngTemplateOutlet=\"fieldTemplate; context: {field: field, group: form}\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n</form>\r\n\r\n<!-- Reusable Field Template -->\r\n<ng-template #fieldTemplate let-field=\"field\" let-group=\"group\">\r\n <div [formGroup]=\"group\">\r\n\r\n <!-- Text / Email / Number / Tel / URL (Password removed) -->\r\n <div *ngIf=\"['text', 'email', 'number', 'tel', 'url'].includes(field.type || '')\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"field.type\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly\" class=\"form-input\" [name]=\"field.name\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\">\r\n <div class=\"input-suffix\">\r\n <span class=\"suffix-text\" *ngIf=\"field.suffixText\">{{ field.suffixText }}</span>\r\n <mat-icon *ngIf=\"field.suffixIcon\">{{ field.suffixIcon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.icon\">{{ field.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n </div>\r\n </div>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Password Field (Separated) -->\r\n <div *ngIf=\"field.type === 'password'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"isPasswordVisible(field.name) ? 'text' : 'password'\" [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder || ''\" [readonly]=\"field.readonly\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\">\r\n <div class=\"input-suffix\">\r\n <span class=\"suffix-text\" *ngIf=\"field.suffixText\">{{ field.suffixText }}</span>\r\n <mat-icon *ngIf=\"field.suffixIcon\">{{ field.suffixIcon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.icon\">{{ field.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n <mat-icon class=\"password-toggle-icon\" (click)=\"togglePassword(field.name)\">\r\n {{ isPasswordVisible(field.name) ? 'visibility' : 'visibility_off' }}\r\n </mat-icon>\r\n </div>\r\n </div>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Textarea -->\r\n <div *ngIf=\"field.type === 'textarea'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <textarea [formControlName]=\"field.name\" [placeholder]=\"field.placeholder || ''\" [readonly]=\"field.readonly\"\r\n class=\"form-input form-textarea\" rows=\"4\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\"></textarea>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Select / Dropdown -->\r\n <div *ngIf=\"field.type === 'select' || field.type === 'dropdown'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <select [formControlName]=\"field.name\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <option value=\"\" disabled selected *ngIf=\"field.placeholder\">{{ field.placeholder }}</option>\r\n <option value=\"\" disabled selected *ngIf=\"!field.placeholder\">{{ labels.selectDefaultPlaceholder }}\r\n </option>\r\n <option *ngFor=\"let opt of getFieldOptions(field)\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Date -->\r\n <div *ngIf=\"field.type === 'date'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"relative\">\r\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder || ''\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\" class=\"date-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n </div>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Radio -->\r\n <div *ngIf=\"field.type === 'radio'\" class=\"radio-group-container\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <label class=\"field-label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </label>\r\n <mat-radio-group [formControlName]=\"field.name\" class=\"radio-group\">\r\n <mat-radio-button *ngFor=\"let opt of getFieldOptions(field)\" [value]=\"opt.value\" class=\"radio-button\">\r\n {{ opt.label }}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Composite Field (Sub-groups) -->\r\n <div *ngIf=\"field.type === 'composite'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"composite-container\">\r\n <ng-container *ngFor=\"let sub of field.subFields; let last = last\">\r\n <div class=\"composite-sub-field\" style=\"flex: 1;\">\r\n <div class=\"field-label\" *ngIf=\"sub.label\"\r\n style=\"font-size: 0.75rem; font-weight: normal; margin-bottom: 0.25rem;\">\r\n {{ sub.label }}\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"sub.type\" [formControlName]=\"sub.name\" [placeholder]=\"sub.placeholder || ''\"\r\n [readonly]=\"sub.readonly\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(sub.name)?.touched && group.get(sub.name)?.invalid\">\r\n <div class=\"input-suffix\" [class.color-suffix]=\"sub.suffixText === '%'\">\r\n <span class=\"suffix-text\" *ngIf=\"sub.suffixText\">{{ sub.suffixText }}</span>\r\n <mat-icon *ngIf=\"sub.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Adjust separator alignment if labels are present -->\r\n <span class=\"separator\" *ngIf=\"!last && field.separator\"\r\n [style.padding-top]=\"sub.label ? '1.25rem' : '0'\">{{ field.separator }}</span>\r\n </ng-container>\r\n </div>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"error-text text-danger text-small mt-1\" *ngIf=\"group.errors?.['invalid_minMax_' + field.name]\">\r\n {{ labels.errorMinValue }}\r\n </div>\r\n <div class=\"error-text text-danger text-small mt-1\"\r\n *ngIf=\"group.errors?.['invalid_percentageTotal_' + field.name]\">\r\n {{ labels.errorPercentageTotal }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- File Upload -->\r\n <div *ngIf=\"field.type === 'file'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n\r\n <!-- Upload Box -->\r\n <div class=\"upload-box\" (click)=\"fileInput.click()\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n *ngIf=\"!field.uploadedFiles || field.uploadedFiles.length === 0 || field.multiple\">\r\n <mat-icon class=\"upload-icon\">cloud_upload</mat-icon>\r\n <div class=\"upload-text\">{{ labels.uploadDragDropText }}</div>\r\n <div class=\"upload-hint\">{{ labels.uploadHint }}</div>\r\n <input #fileInput type=\"file\" [attr.multiple]=\"field.multiple ? true : null\" [attr.accept]=\"field.accept\"\r\n (change)=\"onFileChange($event, field)\" style=\"display: none;\">\r\n </div>\r\n\r\n <!-- Uploaded Files List -->\r\n <div class=\"uploaded-files-list\" *ngIf=\"field.uploadedFiles && field.uploadedFiles.length > 0\">\r\n <div class=\"uploaded-file-item\" *ngFor=\"let file of field.uploadedFiles; let i = index\">\r\n <div class=\"file-icon\">\r\n <mat-icon class=\"pdf-icon\" *ngIf=\"file.type === 'application/pdf'\">picture_as_pdf</mat-icon>\r\n <mat-icon class=\"doc-icon\"\r\n *ngIf=\"file.type.includes('word') || file.type.includes('document')\">description</mat-icon>\r\n <mat-icon class=\"img-icon\" *ngIf=\"file.type.includes('image')\">image</mat-icon>\r\n <mat-icon class=\"file-icon-default\"\r\n *ngIf=\"!file.type.includes('pdf') && !file.type.includes('word') && !file.type.includes('document') && !file.type.includes('image')\">insert_drive_file</mat-icon>\r\n </div>\r\n <div class=\"file-info\">\r\n <div class=\"file-name\">{{ file.name }}</div>\r\n <div class=\"file-size\">{{ (file.size / 1024).toFixed(2) }} KB</div>\r\n </div>\r\n <button mat-icon-button color=\"warn\" type=\"button\" (click)=\"removeFile(field, i)\"\r\n class=\"remove-file-btn\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { ConfigurableFormComponent } from './component/configurable-form.component';\r\nimport { MaterialModule } from '../material/material.module';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n ConfigurableFormComponent\r\n ],\r\n exports: [\r\n ConfigurableFormComponent\r\n ]\r\n})\r\nexport class ConfigurableFormModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { FormLabels } from '../models/form-schema.model';\r\n\r\n@Injectable()\r\nexport class SmartFormController {\r\n private formData: { [key: string]: any } = {};\r\n\r\n /** Auth token sourced from the FormSchema configJSON (e.g. \"Bearer eyJ…\") */\r\n token?: string;\r\n /** HTTP header name for the token (default: \"Authorization\") */\r\n tokenHeader?: string;\r\n /** Flat map of translated i18n labels passed from SmartFormComponent */\r\n labels: any = {};\r\n /** Custom label keys for form actions (Next, Submit, Add, etc.) */\r\n actionLabels?: FormLabels;\r\n private fieldSubjects: Map<string, BehaviorSubject<any>> = new Map();\r\n\r\n initialize(initialData: { [key: string]: any }): void {\r\n this.formData = { ...initialData };\r\n this.fieldSubjects.forEach((subject, key) => {\r\n subject.next(this.formData[key]);\r\n });\r\n }\r\n\r\n updateField(name: string, value: any): void {\r\n this.formData[name] = value;\r\n\r\n if (!this.fieldSubjects.has(name)) {\r\n this.fieldSubjects.set(name, new BehaviorSubject<any>(value));\r\n } else {\r\n this.fieldSubjects.get(name)!.next(value);\r\n }\r\n }\r\n\r\n getFieldValue(name: string): any {\r\n return this.formData[name];\r\n }\r\n\r\n getFieldObservable(name: string): Observable<any> {\r\n if (!this.fieldSubjects.has(name)) {\r\n this.fieldSubjects.set(name, new BehaviorSubject<any>(this.formData[name]));\r\n }\r\n return this.fieldSubjects.get(name)!.asObservable();\r\n }\r\n\r\n getAllData(): { [key: string]: any } {\r\n return { ...this.formData };\r\n }\r\n\r\n reset(): void {\r\n this.formData = {};\r\n this.fieldSubjects.forEach(subject => subject.next(undefined));\r\n }\r\n\r\n destroy(): void {\r\n this.fieldSubjects.forEach(subject => subject.complete());\r\n this.fieldSubjects.clear();\r\n }\r\n}\r\n","import { FieldConfig, FormSchema } from '../models/form-schema.model';\r\n\r\n/**\r\n * Utility class for translating Smart Form schemas.\r\n */\r\nexport class SmartFormTranslationUtils {\r\n\r\n /**\r\n * Recursively walks the schema and replaces i18n keys with values from labels map.\r\n * @param schema The FormSchema to translate.\r\n * @param labels The labels map (can be flat or contain labelsObject property).\r\n */\r\n static translateSchema(schema: FormSchema, labels: any): void {\r\n if (!schema || !labels) return;\r\n\r\n // Support both flat labels map and the pattern used in ConfigurableForm which passes { labelsObject: ... }\r\n const labelsMap = labels.labelsObject || labels;\r\n const translate = (key: string) => labelsMap[key] || key;\r\n\r\n // Root properties\r\n if (schema.label) schema.label = translate(schema.label);\r\n if (schema.description) schema.description = translate(schema.description);\r\n\r\n // Submit config\r\n if (schema.submitConfig) {\r\n if (schema.submitConfig.successMessage) schema.submitConfig.successMessage = translate(schema.submitConfig.successMessage);\r\n if (schema.submitConfig.errorMessage) schema.submitConfig.errorMessage = translate(schema.submitConfig.errorMessage);\r\n }\r\n\r\n // Section config\r\n if (schema.sectionConfig) {\r\n this.translateSection(schema.sectionConfig, translate);\r\n }\r\n\r\n // Stepper config\r\n if (schema.stepperConfig?.children) {\r\n schema.stepperConfig.children.forEach(field => this.translateField(field, translate));\r\n }\r\n }\r\n\r\n private static translateSection(section: any, translate: (key: string) => string): void {\r\n if (section.label) section.label = translate(section.label);\r\n if (section.children) {\r\n section.children.forEach((field: FieldConfig) => this.translateField(field, translate));\r\n }\r\n }\r\n\r\n private static translateField(field: FieldConfig, translate: (key: string) => string): void {\r\n if (field.label) field.label = translate(field.label);\r\n if (field.placeholder) field.placeholder = translate(field.placeholder);\r\n if (field.hint) field.hint = translate(field.hint);\r\n\r\n if (field.richTextConfig?.placeholder) {\r\n field.richTextConfig.placeholder = translate(field.richTextConfig.placeholder);\r\n }\r\n\r\n if (field.textConfig?.patternMessage) {\r\n field.textConfig.patternMessage = translate(field.textConfig.patternMessage);\r\n }\r\n\r\n if (field.attachmentConfig?.acceptLabel) {\r\n field.attachmentConfig.acceptLabel = translate(field.attachmentConfig.acceptLabel);\r\n }\r\n\r\n if (field.optionConfig?.optionList) {\r\n field.optionConfig.optionList.forEach(opt => {\r\n if (opt.label) opt.label = translate(opt.label);\r\n });\r\n }\r\n\r\n // Recurse into children (ROW or GROUP)\r\n if (field.children) {\r\n field.children.forEach(child => this.translateField(child, translate));\r\n }\r\n\r\n // Recurse into nested section config\r\n if (field.sectionConfig) {\r\n this.translateSection(field.sectionConfig, translate);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ExpressionService {\r\n private loadedFunctions: Map<string, Function> = new Map();\r\n\r\n evaluate(expression: string, context: { [key: string]: any }, variables?: string[]): any {\r\n try {\r\n const vars = variables || this.extractVariables(expression);\r\n const args = vars.map(v => context[v]);\r\n\r\n const func = new Function(...vars, `return ${expression};`);\r\n return func(...args);\r\n } catch (e) {\r\n console.error('Expression evaluation error:', e, { expression, vars: variables || this.extractVariables(expression), context });\r\n return null;\r\n }\r\n }\r\n\r\n evaluateCondition(expression: string, context: { [key: string]: any }): boolean {\r\n const vars = this.extractVariables(expression);\r\n try {\r\n const args = vars.map(v => context[v]);\r\n const func = new Function(...vars, `return ${expression};`);\r\n const result = func(...args);\r\n return !!result;\r\n } catch (e) {\r\n console.error('Condition evaluation error:', e, { expression, variables: vars, context });\r\n return false;\r\n }\r\n }\r\n\r\n evaluateFormula(formula: string, functionName: string, context: { [key: string]: any }, variables?: string[]): any {\r\n try {\r\n if (!this.loadedFunctions.has(functionName)) {\r\n const func = new Function('context', `\r\n ${formula}\r\n return ${functionName};\r\n `)(context);\r\n this.loadedFunctions.set(functionName, func);\r\n }\r\n\r\n const fn = this.loadedFunctions.get(functionName);\r\n if (!fn) return null;\r\n\r\n const args = variables ? variables.map(v => context[v]) : [];\r\n return fn(...args);\r\n } catch (e) {\r\n console.error('Formula evaluation error:', e);\r\n return null;\r\n }\r\n }\r\n\r\n extractVariables(expression: string): string[] {\r\n if (!expression) return [];\r\n\r\n // Remove strings from expression to avoid picking up variables inside quotes\r\n const cleanExpr = expression\r\n .replace(/'[^']*'/g, '')\r\n .replace(/\"[^\"]*\"/g, '')\r\n .replace(/`[^`]*`/g, '')\r\n // Remove properties (e.g., .max) to only pick up top-level identifiers\r\n .replace(/\\.\\w+/g, '');\r\n\r\n const regex = /\\b[a-zA-Z_]\\w*\\b/g;\r\n const matches = cleanExpr.match(regex) || [];\r\n const keywords = [\r\n 'true', 'false', 'null', 'undefined', 'return', 'if', 'else', 'for', 'while', 'function', 'var', 'let', 'const', 'this',\r\n 'Math', 'JSON', 'console', 'window', 'document', 'Date', 'Object', 'Array', 'Number', 'String', 'Boolean', 'Symbol'\r\n ];\r\n return [...new Set(matches.filter(m => !keywords.includes(m)))];\r\n }\r\n}\r\n","import { Component, inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA, MatSnackBarRef } from '@angular/material/snack-bar';\nimport { SnackbarConfig } from '../models/snackbar.models';\n\n@Component({\n selector: 'lib-snackbar',\n templateUrl: './snackbar.component.html',\n styleUrls: ['./snackbar.component.scss'],\n standalone: false\n})\nexport class SnackbarComponent {\n public data: SnackbarConfig = inject(MAT_SNACK_BAR_DATA);\n public snackBarRef: MatSnackBarRef<SnackbarComponent> = inject(MatSnackBarRef);\n\n get variantClass(): string {\n return `snackbar-${this.data.variant || 'info'}`;\n }\n}\n","<div class=\"cc-snackbar-container\" [ngClass]=\"variantClass\">\n <div class=\"cc-snackbar-icon\">\n <!-- Success Icon -->\n <svg *ngIf=\"data.variant === 'success'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path>\n <polyline points=\"22 4 12 14.01 9 11.01\"></polyline>\n </svg>\n \n <!-- Error Icon -->\n <svg *ngIf=\"data.variant === 'error'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line>\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line>\n </svg>\n \n <!-- Warning Icon -->\n <svg *ngIf=\"data.variant === 'warning'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path>\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line>\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"></line>\n </svg>\n \n <!-- Info Icon -->\n <svg *ngIf=\"data.variant === 'info' || !data.variant\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"></line>\n <line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"></line>\n </svg>\n </div>\n \n <div class=\"cc-snackbar-message\">\n {{ data.message }}\n </div>\n\n <button *ngIf=\"data.showCloseButton\" class=\"cc-snackbar-close\" (click)=\"snackBarRef.dismiss()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n</div>\n","import { Injectable } from '@angular/core';\nimport { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';\nimport { SnackbarConfig } from '../models/snackbar.models';\nimport { SnackbarComponent } from '../components/snackbar.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnackbarService {\n\n constructor(private snackBar: MatSnackBar) {}\n\n show(config: SnackbarConfig): void {\n const matConfig: MatSnackBarConfig = {\n duration: config.duration ?? 5000,\n horizontalPosition: config.horizontalPosition ?? 'right',\n verticalPosition: config.verticalPosition ?? 'top',\n panelClass: ['cc-snackbar-panel', `cc-snackbar-${config.variant || 'info'}`],\n data: config // Pass the entire config down to the component\n };\n \n this.snackBar.openFromComponent(SnackbarComponent, matConfig);\n }\n\n success(message: string, duration?: number): void {\n this.show({ message, variant: 'success', duration });\n }\n\n error(message: string, duration?: number): void {\n this.show({ message, variant: 'error', duration });\n }\n\n warning(message: string, duration?: number): void {\n this.show({ message, variant: 'warning', duration });\n }\n\n info(message: string, duration?: number): void {\n this.show({ message, variant: 'info', duration });\n }\n}\n","/**\r\n * Utility functions for string manipulation\r\n */\r\nexport class StringUtils {\r\n\r\n /**\r\n * Converts a string to camelCase.\r\n * Example: \"First Name\" -> \"firstName\", \"Profile Picture\" -> \"profilePicture\"\r\n */\r\n static toCamelCase(str?: string): string {\r\n if (!str) return '';\r\n return str\r\n .replace(/[^a-zA-Z0-9 ]/g, '')\r\n .split(' ')\r\n .filter(Boolean)\r\n .map((word, i) =>\r\n i === 0\r\n ? word.charAt(0).toLowerCase() + word.slice(1)\r\n : word.charAt(0).toUpperCase() + word.slice(1)\r\n )\r\n .join('');\r\n }\r\n}\r\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\n\r\n/**\r\n * Bypasses Angular's DomSanitizer for resource URLs (e.g. YouTube embed iframes).\r\n * Used only for trusted URLs such as YouTube embed links derived from user-provided video IDs.\r\n */\r\n@Pipe({\r\n name: 'trustedUrl',\r\n standalone: false\r\n})\r\nexport class TrustedUrlPipe implements PipeTransform {\r\n constructor(private sanitizer: DomSanitizer) { }\r\n\r\n transform(url: string): SafeResourceUrl | null {\r\n if (!url) {\r\n return null;\r\n }\r\n const cleaned = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n if (!cleaned) {\r\n return null;\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(cleaned);\r\n }\r\n}\r\n","import { Component, Input, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport {\r\n FormArray,\r\n FormBuilder,\r\n FormControl,\r\n FormGroup,\r\n ValidatorFn,\r\n Validators\r\n} from '@angular/forms';\r\nimport { SectionConfig, FieldConfig, UploadedFile, MediaItem, LocationItem, LocationFieldValue } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\nimport { ExpressionService } from '../../services/expression.service';\r\nimport { ValidationUtils } from '../../utils/validation.utils';\r\nimport { StringUtils } from '../../../../utils/string.utils';\r\nimport { Subject, combineLatest, forkJoin, BehaviorSubject } from 'rxjs';\r\nimport { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'lib-form-field',\r\n templateUrl: './form-field.component.html',\r\n styleUrls: ['./form-field.component.scss'],\r\n standalone: false\r\n})\r\nexport class FormFieldComponent implements OnInit, OnDestroy {\r\n @Input() config!: FieldConfig;\r\n @Input() controller!: SmartFormController;\r\n /**\r\n * The FormGroup that THIS field's control should be registered in.\r\n * For repeater instances this is the instance's own isolated FormGroup.\r\n * For flat (non-repeater) fields this is the root formGroup.\r\n */\r\n @Input() formGroup!: FormGroup;\r\n\r\n /**\r\n * Set to TRUE when this field is part of a repeatable group (config.sectionConfig.allowMulti = true).\r\n * When true, the field does NOT sync with the global controller to prevent data collision\r\n * between different instances of the same repeater row.\r\n */\r\n @Input() allowMulti: boolean = false;\r\n\r\n value: any;\r\n isVisible: boolean = true;\r\n showPassword: boolean = false; // password show/hide toggle\r\n isDragOver: boolean = false; // file upload drag-over state\r\n fileUploadError: string = ''; // per-field file validation error\r\n multiSaveError: string = ''; // error for multisave validation\r\n private destroy$ = new Subject<void>();\r\n\r\n // ── MEDIA_UPLOAD support ────────────────────────────────────────────────\r\n @ViewChild('mediaDeviceInput') mediaDeviceInput!: ElementRef<HTMLInputElement>;\r\n showMediaMenu: boolean = false; // hover/click dropdown menu\r\n showYoutubeInput: boolean = false; // inline YouTube URL input panel\r\n youtubeUrlInput: string = ''; // model for the YT URL field\r\n youtubeUrlError: string = ''; // validation message for YT url\r\n mediaCarouselIndex: number = 0; // active slide index for carousel\r\n showLibraryModal: boolean = false; // library picker modal\r\n libraryImages: any[] = []; // raw list fetched from library API\r\n librarySelectedIds: Set<any> = new Set(); // selected library items\r\n libraryLoading: boolean = false;\r\n libraryError: string = '';\r\n mediaUploadError: string = ''; // transient error message for max limits\r\n\r\n // ── LOCATION field support ────────────────────────────────────────────────\r\n /** Active tab: VENUE | ONLINE | TBA */\r\n locationActiveTab: 'VENUE' | 'ONLINE' | 'TBA' = 'VENUE';\r\n /** Current text in the venue search box */\r\n locationSearchText: string = '';\r\n /** Google Places autocomplete suggestions */\r\n locationSuggestions: any[] = [];\r\n /** Show the suggestions dropdown */\r\n locationShowSuggestions: boolean = false;\r\n /** Cached Google AutocompleteService instance */\r\n private _googleAcService: any = null;\r\n /** Whether Google Maps is loaded */\r\n locationMapLoaded: boolean = false;\r\n /** Map instance */\r\n private _googleMap: any = null;\r\n /** Map markers */\r\n private _mapMarkers: any[] = [];\r\n\r\n // ── AUTOCOMPLETE support ────────────────────────────────────────────────\r\n /** FormControl used ONLY for the autocomplete text-input display value */\r\n autocompleteInputCtrl = new FormControl('');\r\n /** Filtered option list shown in the mat-autocomplete panel */\r\n filteredOptions: { label: string; code: any }[] = [];\r\n\r\n // ── GROUP / allowMulti support ──────────────────────────────────────────\r\n\r\n /** For GROUP fields with allowMulti = true */\r\n groupFormArray!: FormArray;\r\n\r\n /** For GROUP fields with allowMulti = false — single nested FormGroup */\r\n groupFormGroup!: FormGroup;\r\n\r\n /**\r\n * Tracked list of repeater instances.\r\n * Using a separate array (not FormArray.controls) + trackBy(id) ensures\r\n * Angular creates FRESH child components for every new row, preventing\r\n * cached values from bleeding into new instances.\r\n * \r\n * Enhanced with isEditing and isSaved flags for the 'multiSave' card UI.\r\n */\r\n instanceList: { id: number; fg: FormGroup; initialValue?: any; isEditing?: boolean; isSaved?: boolean; isExpanded?: boolean }[] = [];\r\n private _nextInstanceId = 0;\r\n\r\n /**\r\n * Key used to register the GROUP control on the parent formGroup.\r\n * Priority: sectionConfig.name > field.name > camelCase(label) > '__group__'\r\n */\r\n get groupKey(): string {\r\n return (\r\n this.config.sectionConfig?.name ||\r\n this.config.name ||\r\n StringUtils.toCamelCase(this.config.sectionConfig?.label) ||\r\n '__group__'\r\n );\r\n }\r\n\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private expressionService: ExpressionService,\r\n private http: HttpClient\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.isGroup) {\r\n this.initGroupField();\r\n return;\r\n }\r\n\r\n this.registerControl();\r\n this.setupVisibility();\r\n this.setupGeneratedField();\r\n this.setupFormulaValidation(); // Generic formula-based validation\r\n this.setupDependencies();\r\n this.setupMatchValidation(); // cross-field match (e.g. confirmPassword)\r\n\r\n if (!this.config.optionConfig?.dependencies) {\r\n this.loadDropdownOptions();\r\n }\r\n\r\n if (this.isAutocomplete) {\r\n this.initAutocomplete();\r\n }\r\n\r\n if (this.isLocation) {\r\n this.initLocationField();\r\n }\r\n }\r\n\r\n // ── GROUP initialisation ──────────────────────────────────────────────────\r\n get addMultiLabel(): string {\r\n const rawLabel = this.config.sectionConfig?.multiSaveConfig?.addLabel;\r\n if (rawLabel) {\r\n return this.controller.labels?.[rawLabel] || rawLabel;\r\n }\r\n const sectionLabel = this.config.sectionConfig?.label;\r\n const translatedSectionLabel = sectionLabel ? (this.controller.labels?.[sectionLabel] || sectionLabel) : '';\r\n return '+ Add a ' + translatedSectionLabel;\r\n }\r\n\r\n private initGroupField(): void {\r\n if (this.config.sectionConfig?.allowMulti) {\r\n this.groupFormArray = this.fb.array([]);\r\n this.formGroup.addControl(this.groupKey, this.groupFormArray);\r\n\r\n const initialData = this.controller.getFieldValue(this.groupKey);\r\n if (Array.isArray(initialData) && initialData.length > 0) {\r\n initialData.forEach((item: any) => {\r\n this.addGroupInstance(item);\r\n });\r\n } else {\r\n // We always start with at least one instance.\r\n // If multi-save is active, it starts in editing mode and is NOT \r\n // added to the main form value until the user actually saves it.\r\n this.addGroupInstance();\r\n }\r\n } else {\r\n this.groupFormGroup = this.fb.group({});\r\n this.formGroup.addControl(this.groupKey, this.groupFormGroup);\r\n }\r\n }\r\n\r\n /**\r\n * Sets up cross-field validation based on the `onValidate` formula.\r\n * Watches all variables mentioned in the formula and updates the field's\r\n * validity whenever any of them change.\r\n */\r\n private setupFormulaValidation(): void {\r\n if (!this.config.onValidate) return;\r\n\r\n const expression = this.config.onValidate;\r\n const variables = this.expressionService.extractVariables(expression);\r\n\r\n // Subscribe to all fields mentioned in the formula\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n const isValid = this.expressionService.evaluateCondition(expression, context);\r\n\r\n const control = this.formGroup.get(this.config.name!);\r\n if (control) {\r\n if (!isValid) {\r\n control.setErrors({ ...control.errors, formulaError: true });\r\n } else {\r\n // Clear only the formulaError\r\n if (control.hasError('formulaError')) {\r\n const errors = { ...control.errors };\r\n delete errors['formulaError'];\r\n control.setErrors(Object.keys(errors).length ? errors : null);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n addGroupInstance(initialData?: any): void {\r\n const fg = this.fb.group({});\r\n const isMultiSave = !!this.config.sectionConfig?.multiSaveConfig?.active;\r\n\r\n // If initialData exists, treat the instance as already submitted/saved to form\r\n const isEditing = initialData ? false : isMultiSave;\r\n const isSaved = initialData ? true : !isMultiSave;\r\n\r\n const instance = {\r\n id: this._nextInstanceId++,\r\n fg,\r\n isEditing,\r\n isSaved,\r\n isExpanded: false,\r\n initialValue: initialData ? { ...initialData } : undefined\r\n };\r\n\r\n if (isSaved) {\r\n this.groupFormArray.push(fg);\r\n }\r\n this.instanceList = [...this.instanceList, instance];\r\n\r\n if (initialData) {\r\n setTimeout(() => {\r\n // Ensure that controls exist for all keys in initialData so we don't drop fields like ID!\r\n Object.keys(initialData).forEach(key => {\r\n if (!fg.contains(key)) {\r\n fg.addControl(key, new FormControl(initialData[key]));\r\n }\r\n });\r\n fg.patchValue(initialData);\r\n });\r\n }\r\n }\r\n\r\n saveGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n const multiCfg = this.config.sectionConfig?.multiSaveConfig;\r\n\r\n if (multiCfg?.active) {\r\n // Validate that at least one key field is filled\r\n const summaryVal = instance.fg.get(multiCfg.summaryField || '')?.value;\r\n const descVal = multiCfg.descriptionField ? instance.fg.get(multiCfg.descriptionField)?.value : null;\r\n\r\n const hasSummary = summaryVal !== null && summaryVal !== undefined && String(summaryVal).trim() !== '';\r\n const hasDesc = multiCfg.descriptionField\r\n ? (descVal !== null && descVal !== undefined && String(descVal).trim() !== '')\r\n : true; // if no desc field defined, we only care about summary or others\r\n\r\n // User rule: If both fields are empty, need to throw error (come from JSON)\r\n const bothRequired = !!multiCfg.summaryField && !!multiCfg.descriptionField;\r\n if (bothRequired && !hasSummary && !hasDesc) {\r\n this.multiSaveError = this.controller.labels['ERR_MSG_EMPTY_MULTI'] || 'Please fill the required fields before saving.';\r\n return;\r\n }\r\n\r\n this.multiSaveError = '';\r\n instance.isSaved = true;\r\n instance.isEditing = false;\r\n instance.initialValue = { ...instance.fg.value };\r\n\r\n // Push to the parent formArray so its submitted as part of the FormGroup value\r\n if (!this.groupFormArray.controls.includes(instance.fg)) {\r\n this.groupFormArray.push(instance.fg);\r\n }\r\n }\r\n }\r\n\r\n cancelGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n if (!instance.isSaved) {\r\n // It was a new, unsaved addition - remove it entirely\r\n this.removeGroupInstance(index, true);\r\n } else {\r\n // Revert to original values\r\n if (instance.initialValue) {\r\n instance.fg.patchValue(instance.initialValue, { emitEvent: false });\r\n }\r\n instance.isEditing = false;\r\n }\r\n }\r\n\r\n editGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n instance.isEditing = true;\r\n instance.initialValue = { ...instance.fg.value };\r\n }\r\n\r\n toggleExpandGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n instance.isExpanded = !instance.isExpanded;\r\n }\r\n\r\n removeGroupInstance(index: number, force: boolean = false): void {\r\n // If not multiSave, we keep the one-row minimum rule.\r\n // In multiSave, we can remove it even if it's the last one.\r\n const isMultiSave = !!this.config.sectionConfig?.multiSaveConfig?.active;\r\n\r\n if (force || isMultiSave || this.instanceList.length > 1) {\r\n const instance = this.instanceList[index];\r\n const arrayIndex = this.groupFormArray.controls.indexOf(instance.fg);\r\n if (arrayIndex >= 0) {\r\n this.groupFormArray.removeAt(arrayIndex);\r\n }\r\n this.instanceList = this.instanceList.filter((_, i) => i !== index);\r\n }\r\n }\r\n\r\n trackByInstanceId(_: number, item: { id: number; fg: FormGroup }): number {\r\n return item.id;\r\n }\r\n\r\n // ── Leaf control ─────────────────────────────────────────────────────────\r\n\r\n ngOnDestroy(): void {\r\n // Always complete so any subscriptions (e.g. subfields valueChanges) are cleaned up\r\n this.destroy$.next();\r\n this.destroy$.complete();\r\n\r\n if (this.isGroup) {\r\n if (this.formGroup?.contains(this.groupKey)) {\r\n this.formGroup.removeControl(this.groupKey);\r\n }\r\n return;\r\n }\r\n\r\n const fieldName = this.config.name;\r\n if (fieldName && this.formGroup?.contains(fieldName)) {\r\n this.formGroup.removeControl(fieldName);\r\n }\r\n }\r\n\r\n registerControl(): void {\r\n if (!this.config.name || !this.formGroup) return;\r\n\r\n const fieldName = this.config.name;\r\n const validators = this.getValidators();\r\n\r\n // When inside a repeater instance, ALWAYS start with defaultValue (never\r\n // read from the shared controller — prevents cross-instance value copying).\r\n const initialValue = this.allowMulti\r\n ? (this.config.defaultValue ?? null)\r\n : (this.controller.getFieldValue(fieldName) ?? this.config.defaultValue ?? null);\r\n\r\n let control = this.formGroup.get(fieldName) as FormControl;\r\n if (!control) {\r\n control = new FormControl(\r\n { value: initialValue, disabled: !!this.config.disabled },\r\n validators\r\n );\r\n this.formGroup.addControl(fieldName, control);\r\n }\r\n\r\n this.value = control.value;\r\n\r\n if (!this.allowMulti) {\r\n // ── Flat field: keep in sync with shared controller ──────────────────\r\n control.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n this.value = val;\r\n this.controller.updateField(fieldName, val);\r\n });\r\n\r\n this.controller.getFieldObservable(fieldName).pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n if (val !== control.value) {\r\n control.setValue(val, { emitEvent: false });\r\n this.value = val;\r\n }\r\n });\r\n } else {\r\n // ── Repeater field: local value tracking only ─────────────────────────\r\n control.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n this.value = val;\r\n });\r\n }\r\n }\r\n\r\n getValidators(): ValidatorFn[] {\r\n const validators: ValidatorFn[] = [];\r\n if (this.config.required) validators.push(Validators.required);\r\n if (this.config.subType === 'EMAIL') validators.push(Validators.email);\r\n if (this.config.subType === 'PASSWORD') {\r\n // Minimum 8 chars by default; honour explicit textConfig.length overrides\r\n const minLen = this.config.textConfig?.length?.min ?? 8;\r\n validators.push(Validators.minLength(minLen));\r\n }\r\n if (this.config.textConfig?.length) {\r\n const { min, max } = this.config.textConfig.length;\r\n if (min && this.config.subType !== 'PASSWORD') validators.push(Validators.minLength(min));\r\n if (max) validators.push(Validators.maxLength(max));\r\n }\r\n if (this.config.textConfig?.pattern) validators.push(Validators.pattern(this.config.textConfig.pattern));\r\n if (this.config.numberConfig) {\r\n const { min, max } = this.config.numberConfig;\r\n if (min !== undefined) validators.push(Validators.min(min));\r\n if (max !== undefined) validators.push(Validators.max(max));\r\n }\r\n if (this.config.type === 'RICH_TEXT' && this.config.richTextConfig?.maxLength) {\r\n const max = this.config.richTextConfig.maxLength;\r\n validators.push((control: import('@angular/forms').AbstractControl) => {\r\n if (!control.value) return null;\r\n const plainText = String(control.value).replace(/<[^>]*>/g, '');\r\n return plainText.length > max\r\n ? { 'maxlength': { requiredLength: max, actualLength: plainText.length } }\r\n : null;\r\n });\r\n }\r\n return validators;\r\n }\r\n\r\n // ── Cross-field match validation (password === confirmPassword) ───────────\r\n\r\n /**\r\n * When `textConfig.matchField` is configured, subscribes to value changes on\r\n * BOTH this control and the referenced control so the mismatch error updates\r\n * instantly whichever field the user edits last.\r\n *\r\n * - Values differ → sets `{ passwordMismatch: true }` on THIS control.\r\n * - Values match → clears `passwordMismatch` from THIS control.\r\n */\r\n setupMatchValidation(): void {\r\n const matchFieldName = this.config.textConfig?.matchField;\r\n if (!matchFieldName || !this.config.name || !this.formGroup) return;\r\n\r\n const thisControl = this.formGroup.get(this.config.name);\r\n const otherControl = this.formGroup.get(matchFieldName);\r\n if (!thisControl || !otherControl) return;\r\n\r\n const runCheck = () => {\r\n const thisVal = thisControl.value;\r\n const otherVal = otherControl.value;\r\n\r\n if (thisVal && otherVal && thisVal !== otherVal) {\r\n // Both have a value but they differ — flag the mismatch\r\n thisControl.setErrors(\r\n { ...thisControl.errors, passwordMismatch: true },\r\n { emitEvent: false }\r\n );\r\n } else {\r\n // Either one is empty OR they now match — clear the mismatch error\r\n if (thisControl.hasError('passwordMismatch')) {\r\n const errors = { ...thisControl.errors };\r\n delete errors['passwordMismatch'];\r\n thisControl.setErrors(\r\n Object.keys(errors).length ? errors : null,\r\n { emitEvent: false }\r\n );\r\n }\r\n }\r\n };\r\n\r\n // Fire when THIS (confirmPassword) field changes\r\n thisControl.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => runCheck());\r\n\r\n // Also fire when the OTHER (password) field changes so the error clears\r\n // as soon as the user corrects the source value\r\n otherControl.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => runCheck());\r\n }\r\n\r\n setupVisibility(): void {\r\n if (!this.config.visibilityExpression) return;\r\n const variables = this.expressionService.extractVariables(this.config.visibilityExpression);\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n this.isVisible = this.expressionService.evaluateCondition(this.config.visibilityExpression!, context);\r\n const control = this.formGroup?.get(this.config.name!);\r\n if (control) {\r\n this.isVisible ? control.enable({ emitEvent: false }) : control.disable({ emitEvent: false });\r\n }\r\n });\r\n }\r\n\r\n setupGeneratedField(): void {\r\n if (this.config.type !== 'GENERATED' || !this.config.generatedConfig) return;\r\n const variables = this.config.generatedConfig.variables || [];\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n const result = this.evaluateFormula(context);\r\n if (result !== null && this.config.name) {\r\n this.controller.updateField(this.config.name, result);\r\n }\r\n });\r\n }\r\n\r\n evaluateFormula(context: { [key: string]: any }): any {\r\n if (!this.config.generatedConfig) return null;\r\n const formula = this.config.generatedConfig.formula;\r\n const functionName = this.extractFunctionName(formula);\r\n if (functionName) {\r\n return this.expressionService.evaluateFormula(\r\n formula, functionName, context, this.config.generatedConfig.variables\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n extractFunctionName(formula: string): string | null {\r\n const match = formula.match(/(?:function|fun)\\s+(\\w+)\\s*\\(/);\r\n return match ? match[1] : null;\r\n }\r\n\r\n setupDependencies(): void {\r\n if (!this.config.optionConfig?.dependencies) return;\r\n const dependencies = this.config.optionConfig.dependencies;\r\n const observables = Object.values(dependencies).map(fieldName =>\r\n this.controller.getFieldObservable(fieldName)\r\n );\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(values => {\r\n const dependencyValues: { [key: string]: any } = {};\r\n Object.keys(dependencies).forEach((paramKey, index) => {\r\n dependencyValues[paramKey] = values[index];\r\n });\r\n const allPresent = Object.values(dependencyValues).every(\r\n v => v !== null && v !== undefined && v !== ''\r\n );\r\n if (allPresent) {\r\n this.loadDropdownOptions(dependencyValues);\r\n } else if (this.config.optionConfig) {\r\n this.config.optionConfig.optionList = [];\r\n }\r\n });\r\n }\r\n\r\n loadDropdownOptions(queryParams: { [key: string]: any } = {}): void {\r\n const optionConfig = this.config.optionConfig;\r\n const urls = optionConfig?.apiUrls ||\r\n (optionConfig?.apiUrl ? [optionConfig.apiUrl] :\r\n optionConfig?.optionUrl ? [optionConfig.optionUrl] : []);\r\n\r\n if (!urls || urls.length === 0) return;\r\n\r\n const observables = urls.map(url => {\r\n let fullUrl = url;\r\n const params = new URLSearchParams();\r\n Object.entries(queryParams).forEach(([key, value]) => {\r\n if (value !== null && value !== undefined) params.append(key, String(value));\r\n });\r\n const queryString = params.toString();\r\n if (queryString) fullUrl += (fullUrl.includes('?') ? '&' : '?') + queryString;\r\n return this.http.get<any>(fullUrl, { headers: this.getHeaders() });\r\n });\r\n\r\n forkJoin(observables).pipe(takeUntil(this.destroy$)).subscribe({\r\n next: responses => {\r\n let mergedData: any[] = [];\r\n responses.forEach(response => {\r\n let data = optionConfig?.dataPath\r\n ? this.getValueByPath(response, optionConfig.dataPath)\r\n : (Array.isArray(response) ? response : response.data || response.items || response || []);\r\n\r\n // Handle Dictionary Objects by converting them to Arrays\r\n if (data !== null && typeof data === 'object' && !Array.isArray(data)) {\r\n data = Object.values(data);\r\n }\r\n\r\n if (Array.isArray(data)) mergedData = [...mergedData, ...data];\r\n });\r\n\r\n if (optionConfig?.sortBy) {\r\n const sortKey = optionConfig.sortBy;\r\n const direction = optionConfig.sortDirection === 'DESC' ? -1 : 1;\r\n mergedData.sort((a, b) => {\r\n const valA = this.getValueByPath(a, sortKey);\r\n const valB = this.getValueByPath(b, sortKey);\r\n if (typeof valA === 'string' && typeof valB === 'string') return direction * valA.localeCompare(valB);\r\n if (typeof valA === 'number' && typeof valB === 'number') return direction * (valA - valB);\r\n return 0;\r\n });\r\n }\r\n\r\n this.config.optionConfig!.optionList = mergedData.map((item: any) => {\r\n const label = optionConfig?.labelPath\r\n ? this.getValueByPath(item, optionConfig.labelPath)\r\n : (item.label || item.name);\r\n const code = optionConfig?.valuePath\r\n ? this.getValueByPath(item, optionConfig.valuePath)\r\n : (item.code || item.id || item.value);\r\n return { label: String(label), code, value: item };\r\n });\r\n\r\n // Refresh autocomplete filter list after options arrive from API\r\n if (this.isAutocomplete) {\r\n this.filteredOptions = [...(this.config.optionConfig!.optionList || [])];\r\n this._syncAutocompleteDisplayValue();\r\n }\r\n },\r\n error: err => console.error('Failed to load dropdown options:', err)\r\n });\r\n }\r\n\r\n private getValueByPath(obj: any, path: string): any {\r\n if (!path || path === '') return obj;\r\n return path.split('.').reduce((acc, part) => {\r\n const match = part.match(/(\\w+)\\[(\\d+)\\]/);\r\n if (match) return acc?.[match[1]]?.[parseInt(match[2])];\r\n return acc?.[part];\r\n }, obj);\r\n }\r\n\r\n /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON). */\r\n private getHeaders(): HttpHeaders {\r\n let headers = new HttpHeaders();\r\n if (this.controller.token) {\r\n const headerName = this.controller.tokenHeader || 'Authorization';\r\n headers = headers.set(headerName, this.controller.token);\r\n }\r\n return headers;\r\n }\r\n\r\n updateValue(newValue: any): void {\r\n if (!this.config.name) return;\r\n const control = this.formGroup.get(this.config.name);\r\n if (control) {\r\n control.setValue(newValue);\r\n control.markAsDirty();\r\n control.markAsTouched();\r\n }\r\n }\r\n\r\n onCheckboxListChange(code: string, checked: boolean): void {\r\n if (!this.config.name) return;\r\n const currentValue = (this.allowMulti\r\n ? (this.formGroup.get(this.config.name)?.value)\r\n : this.controller.getFieldValue(this.config.name)) || [];\r\n const newValue = checked\r\n ? [...currentValue, code]\r\n : currentValue.filter((c: string) => c !== code);\r\n this.updateValue(newValue);\r\n }\r\n\r\n isChecked(code: string): boolean {\r\n const value = this.value || [];\r\n return Array.isArray(value) && value.includes(code);\r\n }\r\n\r\n get errorMessage(): string {\r\n if (!this.config.name || !this.formGroup) return '';\r\n const control = this.formGroup.get(this.config.name);\r\n if (control && control.invalid && (control.touched || control.dirty)) {\r\n if (control.hasError('required')) return 'This field is required';\r\n if (control.hasError('email')) return 'Invalid email format';\r\n if (control.hasError('passwordMismatch')) return 'Passwords do not match';\r\n if (control.hasError('formulaError')) return this.config.errorMessage || 'Invalid value';\r\n if (control.hasError('minlength')) return `Minimum length is ${control.errors?.['minlength'].requiredLength} characters`;\r\n if (control.hasError('maxlength')) return `Maximum length is ${control.errors?.['maxlength'].requiredLength} characters`;\r\n if (control.hasError('min')) return `Minimum value is ${control.errors?.['min'].min}`;\r\n if (control.hasError('max')) return `Maximum value is ${control.errors?.['max'].max}`;\r\n if (control.hasError('pattern')) return this.config.textConfig?.patternMessage || 'Invalid format';\r\n }\r\n return '';\r\n }\r\n\r\n get showCharCount(): boolean {\r\n if (this.isTextField && this.config.subType !== 'PHONE') {\r\n return !!(this.config.textConfig?.showCharCount && this.config.textConfig?.length?.max);\r\n }\r\n if (this.isRichText) {\r\n return !!(this.config.richTextConfig?.showCharCount && this.config.richTextConfig?.maxLength);\r\n }\r\n return false;\r\n }\r\n\r\n get remainingCharacters(): number | null {\r\n if (!this.showCharCount || !this.formGroup || !this.config.name) return null;\r\n const currentVal = this.formGroup.get(this.config.name)?.value || '';\r\n\r\n if (this.isTextField && this.config.textConfig?.length?.max) {\r\n return Math.max(0, this.config.textConfig.length.max - currentVal.length);\r\n }\r\n if (this.isRichText && this.config.richTextConfig?.maxLength) {\r\n const plainText = String(currentVal).replace(/<[^>]*>/g, '');\r\n return Math.max(0, this.config.richTextConfig.maxLength - plainText.length);\r\n }\r\n return null;\r\n }\r\n\r\n // ── Type guards ──────────────────────────────────────────────────────────\r\n\r\n get isTextField(): boolean { return this.config.type === 'TEXT_INPUT'; }\r\n get isNumberField(): boolean { return this.config.type === 'NUMBER_INPUT'; }\r\n get isDateField(): boolean { return this.config.type === 'DATE'; }\r\n get isTimeField(): boolean { return this.config.type === 'TIME'; }\r\n get isDropdown(): boolean { return this.config.type === 'DROPDOWN'; }\r\n get isAutocomplete(): boolean { return this.config.type === 'AUTOCOMPLETE'; }\r\n get isFileUpload(): boolean { return this.config.type === 'FILE_UPLOAD'; }\r\n get isMediaUpload(): boolean { return this.config.type === 'MEDIA_UPLOAD'; }\r\n get isRadio(): boolean { return this.config.type === 'RADIO'; }\r\n get isCheckbox(): boolean { return this.config.type === 'CHECKBOX'; }\r\n get isChip(): boolean { return this.config.type === 'CHIP'; }\r\n get isSwitch(): boolean { return this.config.type === 'SWITCH'; }\r\n get isRating(): boolean { return this.config.type === 'RATING'; }\r\n get isRichText(): boolean { return this.config.type === 'RICH_TEXT'; }\r\n get isGenerated(): boolean { return this.config.type === 'GENERATED'; }\r\n get isRow(): boolean { return this.config.type === 'ROW'; }\r\n get isGroup(): boolean { return this.config.type === 'GROUP'; }\r\n get isLocation(): boolean { return this.config.type === 'LOCATION'; }\r\n\r\n // ── AUTOCOMPLETE helpers ────────────────────────────────────────────────\r\n\r\n /**\r\n * Initialise the separate display-control that drives the mat-autocomplete\r\n * text input. The real form control always stores the *code* value.\r\n */\r\n private initAutocomplete(): void {\r\n // Sync display input whenever the real control value changes externally\r\n this._syncAutocompleteDisplayValue();\r\n\r\n // Filter the option list as the user types\r\n this.autocompleteInputCtrl.valueChanges\r\n .pipe(debounceTime(150), distinctUntilChanged(), takeUntil(this.destroy$))\r\n .subscribe(search => {\r\n this.filteredOptions = this._filterOptions(typeof search === 'string' ? search : '');\r\n });\r\n\r\n // Initialise filtered list with all available options\r\n this.filteredOptions = [...(this.config.optionConfig?.optionList || [])];\r\n }\r\n\r\n /** Filter options by the user's search text (matches label or code). */\r\n private _filterOptions(search: string): { label: string; code: any }[] {\r\n const q = search.toLowerCase().trim();\r\n if (!q) return [...(this.config.optionConfig?.optionList || [])];\r\n return (this.config.optionConfig?.optionList || []).filter(opt =>\r\n opt.label?.toLowerCase().includes(q) ||\r\n String(opt.code).toLowerCase().includes(q)\r\n );\r\n }\r\n\r\n /** Put the human-readable label into the display control based on the stored code. */\r\n private _syncAutocompleteDisplayValue(): void {\r\n if (!this.config.name) return;\r\n const code = this.formGroup?.get(this.config.name)?.value;\r\n if (code === null || code === undefined || code === '') return;\r\n const matched = (this.config.optionConfig?.optionList || []).find(o => o.code === code);\r\n if (matched) {\r\n this.autocompleteInputCtrl.setValue(matched.label, { emitEvent: false });\r\n }\r\n }\r\n\r\n /** Called when user picks an option from the mat-autocomplete panel. */\r\n onAutocompleteSelected(option: { label: string; code: any }): void {\r\n this.autocompleteInputCtrl.setValue(option.label, { emitEvent: false });\r\n this.updateValue(option.code);\r\n }\r\n\r\n /** Called when the input loses focus — clear display & value if text was manually deleted. */\r\n onAutocompleteClear(): void {\r\n const display = (this.autocompleteInputCtrl.value || '').trim();\r\n if (!display) {\r\n this.updateValue(null);\r\n } else {\r\n // Restore label from stored code (prevents partial text staying)\r\n this._syncAutocompleteDisplayValue();\r\n }\r\n }\r\n\r\n /**\r\n * Returns the effective grid column span for a child inside a ROW.\r\n * If the child declares an explicit colSpan, use it.\r\n * Otherwise divide 12 equally among all children (floor, min 1).\r\n */\r\n getChildColSpan(child: FieldConfig): number {\r\n if (child.colSpan) return child.colSpan;\r\n const count = this.config.children?.length || 1;\r\n return Math.max(1, Math.floor(12 / count));\r\n }\r\n\r\n // ── Rating helpers ───────────────────────────────────────────────────────\r\n\r\n onRatingChange(star: number, event?: MouseEvent): void {\r\n if (!this.config.name || this.config.disabled) return;\r\n let newValue = star;\r\n if (this.config.ratingConfig?.allowHalf && event) {\r\n const target = event.target as HTMLElement;\r\n const rect = target.getBoundingClientRect();\r\n if (event.clientX - rect.left < rect.width / 2) newValue = star - 0.5;\r\n }\r\n if (this.value === newValue) newValue = 0;\r\n this.updateValue(newValue);\r\n }\r\n\r\n getStarArray(): number[] {\r\n const max = this.config.ratingConfig?.maxRating || 5;\r\n return Array.from({ length: max }, (_, i) => i + 1);\r\n }\r\n\r\n isStarHalf(star: number): boolean { return (this.value || 0) === star - 0.5; }\r\n isStarFilled(star: number): boolean { return (this.value || 0) >= star; }\r\n\r\n // ── File Upload helpers ──────────────────────────────────────────────────\r\n\r\n onDragOver(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = true;\r\n }\r\n\r\n onDragLeave(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n }\r\n\r\n onFileDrop(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n this.processFiles(files);\r\n }\r\n }\r\n\r\n onFileSelected(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this.processFiles(input.files);\r\n }\r\n // Reset input so the same file can be re-selected if removed\r\n input.value = '';\r\n }\r\n\r\n private processFiles(files: FileList): void {\r\n // ── MEDIA_UPLOAD branch — uses attachmentConfig, stores MediaItem[] ─────\r\n if (this.isMediaUpload) {\r\n const mediaCfg = this.config.attachmentConfig;\r\n if (!mediaCfg) return;\r\n const maxItems = mediaCfg.maxFiles ?? 10;\r\n\r\n let errorShown = false;\r\n\r\n Array.from(files).forEach(file => {\r\n if (this.mediaItems.length >= maxItems) {\r\n if (!errorShown) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n errorShown = true;\r\n }\r\n return;\r\n }\r\n\r\n const placeholder: MediaItem = { mediaType: 'image', url: '', isUploading: true };\r\n this._appendMediaItem(placeholder);\r\n\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n if (mediaCfg.entityType) formData.append('entity_type', mediaCfg.entityType);\r\n\r\n if (!mediaCfg.uploadUrl) return;\r\n this.http.post<any>(mediaCfg.uploadUrl, formData, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (response: any) => {\r\n // API returns { completeURL, id, mimeType, fileName, ... }\r\n const resolvedUrl: string = (response?.completeURL ?? response)?.toString().trim();\r\n const current: MediaItem[] = [...this.mediaItems];\r\n const idx = current.indexOf(placeholder);\r\n if (idx !== -1) {\r\n current[idx] = {\r\n mediaType: 'image',\r\n url: resolvedUrl,\r\n id: response?.id,\r\n mimeType: response?.mimeType,\r\n fileName: response?.fileName ?? response?.name,\r\n isUploading: false\r\n };\r\n this.updateValue(current);\r\n this.mediaCarouselIndex = current.length - 1;\r\n }\r\n },\r\n error: () => {\r\n const cleaned = this.mediaItems.filter(m => m !== placeholder);\r\n this.updateValue(cleaned.length ? cleaned : null);\r\n }\r\n });\r\n });\r\n return;\r\n }\r\n\r\n // ── FILE_UPLOAD branch — uses attachmentConfig, stores UploadedFile[] ────\r\n this.fileUploadError = '';\r\n const cfg = this.config.attachmentConfig;\r\n const maxSizeBytes = (cfg?.maxSizeMB ?? 10) * 1024 * 1024;\r\n const currentFiles: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const maxFiles = cfg?.maxFiles ?? (cfg?.multiple ? 10 : 1);\r\n const isMultiple = cfg?.multiple ?? false;\r\n\r\n const incoming = Array.from(files);\r\n\r\n for (const file of incoming) {\r\n // Size validation\r\n if (file.size > maxSizeBytes) {\r\n this.fileUploadError = `\"${file.name}\" exceeds the maximum allowed size of ${cfg?.maxSizeMB ?? 10} MB.`;\r\n continue;\r\n }\r\n // Max-files validation\r\n if (isMultiple && currentFiles.length >= maxFiles) {\r\n this.fileUploadError = `Maximum ${maxFiles} file${maxFiles !== 1 ? 's' : ''} allowed.`;\r\n break;\r\n }\r\n\r\n if (cfg?.uploadUrl) {\r\n // ── API upload path ───────────────────────────────────────────────\r\n const entry: UploadedFile = {\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n file,\r\n isUploading: true\r\n };\r\n\r\n // Add the placeholder entry immediately so the UI shows the progress row\r\n const withPlaceholder = isMultiple\r\n ? [...(this.value as UploadedFile[] || []), entry]\r\n : [entry];\r\n this.updateValue(withPlaceholder);\r\n\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n if (cfg.entityType) {\r\n formData.append('entity_type', cfg.entityType);\r\n }\r\n\r\n this.http.post<any>(cfg.uploadUrl, formData, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (response: any) => {\r\n // The API returns a JSON object; use completeURL if present,\r\n // otherwise fall back to treating the raw response as a URL string.\r\n const resolvedUrl: string = (response?.completeURL ?? response)?.toString().trim();\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const idx = current.indexOf(entry);\r\n if (idx !== -1) {\r\n const updatedEntry: UploadedFile = { ...entry, dataUrl: resolvedUrl, id: response?.id, isUploading: false };\r\n const updatedList = [...current];\r\n updatedList[idx] = updatedEntry;\r\n this.updateValue(updatedList);\r\n }\r\n },\r\n error: () => {\r\n // Remove the failed placeholder from the list\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const cleaned = current.filter(f => f !== entry);\r\n this.updateValue(cleaned.length ? cleaned : null);\r\n this.fileUploadError = `Failed to upload \"${file.name}\". Please try again.`;\r\n }\r\n });\r\n } else {\r\n // ── FileReader (base64) fallback path ────────────────────────────\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const entry: UploadedFile = {\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n dataUrl: e.target?.result as string,\r\n file\r\n };\r\n const updated = isMultiple\r\n ? [...(this.value as UploadedFile[] || []), entry]\r\n : [entry];\r\n this.updateValue(updated);\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n }\r\n }\r\n\r\n removeUploadedFile(index: number): void {\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const fileToRemove = current[index];\r\n if (!fileToRemove) return;\r\n\r\n const removeLocally = () => {\r\n const updated = current.filter((_, i) => i !== index);\r\n this.updateValue(updated);\r\n };\r\n\r\n const deleteUrl = this.config.attachmentConfig?.deleteUrl;\r\n\r\n if (fileToRemove.id && fileToRemove.id !== 0 && deleteUrl) {\r\n fileToRemove.isUploading = true; // Use this flag to disable the remove button\r\n this.updateValue([...current]); // trigger UI update\r\n\r\n let params = new HttpParams();\r\n if (!deleteUrl.includes('attachmentId=')) {\r\n params = params.set('attachmentId', fileToRemove.id.toString());\r\n }\r\n if (!deleteUrl.includes('reason=')) {\r\n // As requested in the API link, the reason is passed\r\n params = params.set('reason', 'DELECTED BY CREATOR');\r\n }\r\n\r\n this.http.delete<any>(deleteUrl, { headers: this.getHeaders(), params })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: () => {\r\n removeLocally();\r\n },\r\n error: (err) => {\r\n console.error('Failed to delete attachment', err);\r\n fileToRemove.isUploading = false;\r\n this.fileUploadError = `Failed to delete \"${fileToRemove.name}\". Please try again.`;\r\n this.updateValue([...current]);\r\n }\r\n });\r\n } else {\r\n removeLocally();\r\n }\r\n }\r\n\r\n getFileIcon(mimeType: string): string {\r\n if (!mimeType) return 'attach_file'; // guard: undefined/null from non-FILE_UPLOAD values\r\n if (mimeType.includes('pdf')) return 'picture_as_pdf';\r\n if (mimeType.includes('image')) return 'image';\r\n if (mimeType.includes('word') || mimeType.includes('document')) return 'description';\r\n if (mimeType.includes('sheet') || mimeType.includes('excel') || mimeType.includes('csv')) return 'table_chart';\r\n if (mimeType.includes('zip') || mimeType.includes('compressed')) return 'folder_zip';\r\n return 'attach_file';\r\n }\r\n\r\n formatFileSize(bytes: number): string {\r\n if (bytes < 1024) return `${bytes} B`;\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\r\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\r\n }\r\n\r\n // ── Action Labels ──────────────────────────────────────────────────────────\r\n\r\n get addLabel(): string {\r\n const key = this.controller.actionLabels?.addLabel || 'Add';\r\n return this.controller.labels[key] || key;\r\n }\r\n\r\n get removeLabel(): string {\r\n const key = this.controller.actionLabels?.removeLabel || 'Remove';\r\n return this.controller.labels[key] || key;\r\n }\r\n\r\n // ── MEDIA_UPLOAD helpers ─────────────────────────────────────────────────\r\n\r\n get mediaItems(): MediaItem[] {\r\n return (this.value as MediaItem[]) || [];\r\n }\r\n\r\n /** Number of active items (used to clamp carousel index) */\r\n get mediaCount(): number { return this.mediaItems.length; }\r\n\r\n /** The currently visible carousel item */\r\n get activeMediaItem(): MediaItem | null {\r\n if (!this.mediaItems.length) return null;\r\n return this.mediaItems[Math.min(this.mediaCarouselIndex, this.mediaItems.length - 1)];\r\n }\r\n\r\n /** Thumbnail strip items */\r\n get mediaThumbnails(): MediaItem[] { return this.mediaItems; }\r\n\r\n mediaCarouselPrev(): void {\r\n if (this.mediaCarouselIndex > 0) this.mediaCarouselIndex--;\r\n }\r\n\r\n mediaCarouselNext(): void {\r\n if (this.mediaCarouselIndex < this.mediaItems.length - 1) this.mediaCarouselIndex++;\r\n }\r\n\r\n mediaGoTo(index: number): void {\r\n this.mediaCarouselIndex = index;\r\n }\r\n\r\n // ── YouTube ──────────────────────────────────────────────────────────────\r\n\r\n onMediaMenuVideo(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = !this.showYoutubeInput;\r\n this.youtubeUrlInput = '';\r\n this.youtubeUrlError = '';\r\n }\r\n\r\n addYoutubeMedia(): void {\r\n const cfg = this.config.attachmentConfig;\r\n const maxItems = cfg?.maxFiles ?? 10;\r\n if (this.mediaItems.length >= maxItems) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n return;\r\n }\r\n\r\n const url = this.youtubeUrlInput.trim();\r\n const videoId = this._extractYoutubeId(url);\r\n if (!videoId) {\r\n this.youtubeUrlError = this.controller.labels['ERR_INVALID_YOUTUBE_URL'] || 'Please enter a valid YouTube URL.';\r\n return;\r\n }\r\n const item: MediaItem = {\r\n mediaType: 'youtube',\r\n url: `https://www.youtube.com/embed/${videoId}`,\r\n thumbnailUrl: `https://img.youtube.com/vi/${videoId}/mqdefault.jpg`\r\n };\r\n this._appendMediaItem(item);\r\n this.showYoutubeInput = false;\r\n this.youtubeUrlInput = '';\r\n this.youtubeUrlError = '';\r\n }\r\n\r\n private _extractYoutubeId(url: string): string | null {\r\n const patterns = [\r\n /(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/|youtube\\.com\\/embed\\/)([\\w-]{11})/,\r\n /youtube\\.com\\/shorts\\/([\\w-]{11})/\r\n ];\r\n for (const p of patterns) {\r\n const m = url.match(p);\r\n if (m) return m[1];\r\n }\r\n return null;\r\n }\r\n\r\n // ── Device upload ────────────────────────────────────────────────────────\r\n\r\n onMediaMenuDevice(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = false;\r\n // Use setTimeout so Angular finishes closing the dropdown before the\r\n // browser opens the native file picker (the input lives outside *ngIf).\r\n setTimeout(() => this.mediaDeviceInput?.nativeElement?.click());\r\n }\r\n\r\n onMediaFileSelected(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this.processFiles(input.files);\r\n }\r\n input.value = '';\r\n }\r\n\r\n // ── Library picker ───────────────────────────────────────────────────────\r\n\r\n onMediaMenuLibrary(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = false;\r\n this.libraryImages = [];\r\n this.librarySelectedIds = new Set();\r\n this.libraryError = '';\r\n this.showLibraryModal = true;\r\n this._loadLibraryImages();\r\n }\r\n\r\n private _loadLibraryImages(): void {\r\n const cfg = this.config.attachmentConfig;\r\n if (!cfg?.libraryApiUrl) { this.libraryError = 'Library not configured.'; return; }\r\n this.libraryLoading = true;\r\n this.http.get<any>(cfg.libraryApiUrl, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (res: any) => {\r\n let data: any;\r\n\r\n if (cfg.libraryDataPath) {\r\n // Try explicit dot-notation path configured by the dev (e.g. 'data.items')\r\n data = this.getValueByPath(res, cfg.libraryDataPath);\r\n }\r\n\r\n // If no array was found at the configured path, try auto-detecting\r\n // the array from common structures\r\n if (!Array.isArray(data)) {\r\n if (Array.isArray(res)) {\r\n // API returned a plain array\r\n data = res;\r\n } else if (res && typeof res === 'object') {\r\n // API returned an object keyed by entity-id e.g. { \"1\": [...], \"2\": [...] }\r\n // Flatten all value-arrays into one list\r\n data = (Object.values(res) as any[][])\r\n .filter(v => Array.isArray(v))\r\n .reduce((acc, arr) => acc.concat(arr), []);\r\n }\r\n }\r\n\r\n this.libraryImages = Array.isArray(data) ? data : [];\r\n this.libraryLoading = false;\r\n },\r\n error: () => {\r\n this.libraryError = this.controller.labels['ERR_LIBRARY_LOAD_FAILED'] || 'Failed to load library images.';\r\n this.libraryLoading = false;\r\n }\r\n });\r\n }\r\n\r\n getLibraryItemUrl(item: any): string {\r\n const cfg = this.config.attachmentConfig;\r\n return cfg?.libraryUrlPath ? this.getValueByPath(item, cfg.libraryUrlPath) : (item?.url || item?.completeURL || '');\r\n }\r\n\r\n getLibraryItemId(item: any): any {\r\n const cfg = this.config.attachmentConfig;\r\n return cfg?.libraryIdPath ? this.getValueByPath(item, cfg.libraryIdPath) : (item?.id ?? item);\r\n }\r\n\r\n isLibraryItemSelected(item: any): boolean {\r\n return this.librarySelectedIds.has(this.getLibraryItemId(item));\r\n }\r\n\r\n toggleLibraryItem(item: any): void {\r\n const id = this.getLibraryItemId(item);\r\n if (this.librarySelectedIds.has(id)) {\r\n this.librarySelectedIds.delete(id);\r\n } else {\r\n this.librarySelectedIds.add(id);\r\n }\r\n }\r\n\r\n closeLibraryModal(): void {\r\n this.showLibraryModal = false;\r\n }\r\n\r\n confirmLibrarySelection(): void {\r\n // We already have completeURL on each library item — no upload API call needed.\r\n // Directly build MediaItem[] from the selected library images and append to form value.\r\n const selectedItems = this.libraryImages.filter(item => this.isLibraryItemSelected(item));\r\n if (!selectedItems.length) {\r\n this.showLibraryModal = false;\r\n return;\r\n }\r\n\r\n const cfg = this.config.attachmentConfig;\r\n const maxItems = cfg?.maxFiles ?? 10;\r\n const currentItems: MediaItem[] = [...this.mediaItems];\r\n let errorShown = false;\r\n\r\n selectedItems.forEach(item => {\r\n if (currentItems.length >= maxItems) {\r\n if (!errorShown) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n errorShown = true;\r\n }\r\n return;\r\n }\r\n const url = this.getLibraryItemUrl(item); // item.completeURL\r\n if (!url) return;\r\n\r\n // Do NOT store the library item's id — library images were not POSTed to\r\n // the upload API, so there is no server-side attachment record to DELETE.\r\n // Without an id, removeMediaItem() always takes the local-remove path. ✓\r\n currentItems.push({\r\n mediaType: 'image',\r\n url,\r\n mimeType: item.mimeType,\r\n fileName: item.fileName ?? item.name,\r\n isUploading: false\r\n });\r\n });\r\n\r\n\r\n this.updateValue(currentItems);\r\n this.mediaCarouselIndex = currentItems.length - 1;\r\n this.showLibraryModal = false;\r\n }\r\n\r\n // ── Remove item ──────────────────────────────────────────────────────────\r\n\r\n removeMediaItem(index: number): void {\r\n const items: MediaItem[] = [...this.mediaItems];\r\n const item = items[index];\r\n if (!item) return;\r\n\r\n const removeLocally = () => {\r\n const updated = items.filter((_, i) => i !== index);\r\n this.updateValue(updated.length ? updated : null);\r\n // Clamp carousel index so it never points past the end\r\n this.mediaCarouselIndex = Math.max(0, this.mediaCarouselIndex - (index <= this.mediaCarouselIndex ? 1 : 0));\r\n };\r\n\r\n const deleteUrl = this.config.attachmentConfig?.deleteUrl;\r\n\r\n if (item.id && item.id !== 0 && deleteUrl) {\r\n // ── API delete path (same logic as removeUploadedFile) ───────────────\r\n item.isUploading = true; // disable the remove button while in-flight\r\n this.updateValue([...items]); // trigger change detection\r\n\r\n let params = new HttpParams();\r\n if (!deleteUrl.includes('attachmentId=')) {\r\n params = params.set('attachmentId', item.id.toString());\r\n }\r\n if (!deleteUrl.includes('reason=')) {\r\n params = params.set('reason', 'DELETED BY CREATOR');\r\n }\r\n\r\n this.http.delete<any>(deleteUrl, { headers: this.getHeaders(), params })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: () => removeLocally(),\r\n error: (err) => {\r\n console.error('Failed to delete media attachment', err);\r\n item.isUploading = false;\r\n this.updateValue([...items]); // restore UI state\r\n }\r\n });\r\n } else {\r\n // ── No id or no deleteUrl: remove locally, no API call ───────────────\r\n removeLocally();\r\n }\r\n }\r\n\r\n\r\n private _appendMediaItem(item: MediaItem): void {\r\n const current: MediaItem[] = [...this.mediaItems];\r\n current.push(item);\r\n this.updateValue(current);\r\n this.mediaCarouselIndex = current.length - 1;\r\n }\r\n\r\n private showMediaError(msg: string): void {\r\n this.mediaUploadError = msg;\r\n setTimeout(() => {\r\n if (this.mediaUploadError === msg) this.mediaUploadError = '';\r\n }, 4000);\r\n }\r\n\r\n // ── LOCATION field methods ─────────────────────────────────────────────────\r\n\r\n private initLocationField(): void {\r\n const cfg = this.config.locationConfig;\r\n this.locationActiveTab = cfg?.defaultTab ?? 'VENUE';\r\n\r\n // Restore from existing form value using the robust getter\r\n if (this.locationValue.tab) {\r\n this.locationActiveTab = this.locationValue.tab;\r\n }\r\n\r\n // Subscribe to external patchValue events (prefills)\r\n this.formGroup.get(this.config.name!)?.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => {\r\n if (this.locationValue.tab) {\r\n this.locationActiveTab = this.locationValue.tab;\r\n }\r\n setTimeout(() => this._renderMap());\r\n });\r\n\r\n // Load Google Maps script if not already loaded\r\n this._ensureGoogleMapsScript();\r\n }\r\n\r\n private _ensureGoogleMapsScript(): void {\r\n const apiKey = this.config.locationConfig?.googleMapsApiKey;\r\n if (!apiKey) return;\r\n\r\n if ((window as any).google?.maps?.places) {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n return;\r\n }\r\n\r\n // Only inject once\r\n if (document.querySelector('script[data-sf-gmaps]')) {\r\n // Wait for the script to load\r\n const wait = () => {\r\n if ((window as any).google?.maps?.places) {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n } else {\r\n setTimeout(wait, 300);\r\n }\r\n };\r\n wait();\r\n return;\r\n }\r\n\r\n const script = document.createElement('script');\r\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`;\r\n script.async = true;\r\n script.defer = true;\r\n script.setAttribute('data-sf-gmaps', 'true');\r\n script.onload = () => {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n };\r\n document.head.appendChild(script);\r\n }\r\n\r\n onLocationTabChange(tab: 'VENUE' | 'ONLINE' | 'TBA'): void {\r\n if (this.locationActiveTab === 'VENUE' && tab !== 'VENUE') {\r\n this._googleMap = null;\r\n this._mapMarkers = [];\r\n }\r\n this.locationActiveTab = tab;\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n this.locationSearchText = '';\r\n const existing: LocationFieldValue = this.formGroup.get(this.config.name!)?.value || { tab, venues: [], onlineUrl: '' };\r\n existing.tab = tab;\r\n this.updateValue(existing);\r\n if (tab === 'VENUE') {\r\n setTimeout(() => this._renderMap());\r\n }\r\n }\r\n\r\n get locationValue(): LocationFieldValue {\r\n let v = this.formGroup.get(this.config.name!)?.value;\r\n if (typeof v === 'string') {\r\n try { v = JSON.parse(v); } catch { /* ignore */ }\r\n }\r\n // Automatically unwrap if prefill payload was mistakenly double-nested like `{ location: { tab... } }`\r\n if (v && !v.tab && v[this.config.name!]) {\r\n v = v[this.config.name!];\r\n }\r\n if (v && v.tab) return v;\r\n return { tab: this.locationActiveTab, venues: [], onlineUrl: '' };\r\n }\r\n\r\n get locationVenues(): LocationItem[] {\r\n return this.locationValue.venues || [];\r\n }\r\n\r\n get locationOnlineUrl(): string {\r\n return this.locationValue.onlineUrl || '';\r\n }\r\n\r\n get locationMaxReached(): boolean {\r\n const isMulti = this.config.locationConfig?.allowMulti;\r\n const max = isMulti ? (this.config.locationConfig?.maxLocations ?? 5) : 1;\r\n return this.locationVenues.length >= max;\r\n }\r\n\r\n handleLocationSearchInput(event: Event): void {\r\n const input = (event.target as HTMLInputElement).value;\r\n this.locationSearchText = input;\r\n if (!input || input.length < 2) {\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n return;\r\n }\r\n if (!this._googleAcService) {\r\n return;\r\n }\r\n this._googleAcService.getPlacePredictions({ input }, (predictions: any[], status: string) => {\r\n if (status === 'OK' && predictions) {\r\n this.locationSuggestions = predictions;\r\n this.locationShowSuggestions = true;\r\n } else {\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n }\r\n });\r\n }\r\n\r\n onLocationSuggestionSelect(prediction: any): void {\r\n if (!prediction) return;\r\n const isMulti = this.config.locationConfig?.allowMulti;\r\n const max = isMulti ? (this.config.locationConfig?.maxLocations ?? 5) : 1;\r\n const current = this.locationVenues;\r\n if (current.length >= max) return;\r\n\r\n const newItem: LocationItem = {\r\n description: prediction.description,\r\n placeId: prediction.place_id,\r\n address: prediction.description,\r\n type: 'GOOGLE',\r\n isActive: true\r\n };\r\n\r\n // Geocode to get lat/lng and components\r\n if ((window as any).google?.maps?.Geocoder) {\r\n const geocoder = new (window as any).google.maps.Geocoder();\r\n geocoder.geocode({ placeId: prediction.place_id }, (results: any[], status: string) => {\r\n if (status === 'OK' && results[0]) {\r\n const res = results[0];\r\n newItem.latitude = res.geometry?.location?.lat();\r\n newItem.longitude = res.geometry?.location?.lng();\r\n newItem.address = res.formatted_address || prediction.description;\r\n\r\n let name = prediction.description;\r\n if (prediction.structured_formatting && prediction.structured_formatting.main_text) {\r\n name = prediction.structured_formatting.main_text;\r\n }\r\n newItem.name = name;\r\n\r\n res.address_components?.forEach((c: any) => {\r\n if (c.types.includes('locality')) newItem.cityLabel = c.long_name;\r\n if (c.types.includes('administrative_area_level_1')) newItem.stateLabel = c.long_name;\r\n if (c.types.includes('country')) newItem.countryLabel = c.long_name;\r\n });\r\n }\r\n this._addVenueAndUpdate(newItem);\r\n });\r\n } else {\r\n this._addVenueAndUpdate(newItem);\r\n }\r\n\r\n this.locationSearchText = '';\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n }\r\n\r\n private _addVenueAndUpdate(item: LocationItem): void {\r\n const val = { ...this.locationValue };\r\n val.venues = [...(val.venues || []), item];\r\n this.updateValue(val);\r\n setTimeout(() => this._renderMap());\r\n }\r\n\r\n removeLocationVenue(index: number): void {\r\n const val = { ...this.locationValue };\r\n val.venues = (val.venues || []).filter((_, i) => i !== index);\r\n this.updateValue(val);\r\n setTimeout(() => this._renderMap());\r\n }\r\n\r\n onLocationUrlChange(url: string): void {\r\n const val = { ...this.locationValue, onlineUrl: url };\r\n this.updateValue(val);\r\n }\r\n\r\n hideLocationSuggestions(): void {\r\n setTimeout(() => { this.locationShowSuggestions = false; }, 200);\r\n }\r\n\r\n getLocationMapEmbedUrl(): string {\r\n const venues = this.locationVenues.filter(v => v.placeId || (typeof v.latitude === 'number' && typeof v.longitude === 'number'));\r\n const apiKey = this.config.locationConfig?.googleMapsApiKey || '';\r\n\r\n // No locations currently selected: Show the default map view (India)\r\n if (!venues.length) {\r\n if (apiKey) {\r\n // Embed API center fallback if they have an API Key but no marker yet\r\n const lat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const lng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n const zoom = this.config.locationConfig?.defaultZoom ?? 4;\r\n return `https://www.google.com/maps/embed/v1/view?key=${apiKey}&center=${lat},${lng}&zoom=${zoom}`;\r\n } else {\r\n // Static iframe fallback text query\r\n return `https://maps.google.com/maps?q=India&output=embed`;\r\n }\r\n }\r\n\r\n if (venues.length === 1) {\r\n const v = venues[0];\r\n const q = v.placeId ? `place_id:${v.placeId}` : encodeURIComponent(v.address || v.description || '');\r\n return `https://www.google.com/maps/embed/v1/place?key=${apiKey}&q=${q}`;\r\n }\r\n // Multiple locations — use directions/search embed\r\n const q = encodeURIComponent(venues.map(v => v.address || v.description).join('|'));\r\n return `https://www.google.com/maps/embed/v1/search?key=${apiKey}&q=${q}`;\r\n }\r\n\r\n private _renderMap(): void {\r\n if (!(window as any).google?.maps) return;\r\n if (!this.config.locationConfig?.showMap && this.config.locationConfig?.showMap !== undefined) return;\r\n\r\n const venues = this.locationVenues.filter(v => typeof v.latitude === 'number' && typeof v.longitude === 'number');\r\n\r\n const mapEl = document.getElementById(`loc-map-${this.config.name}`);\r\n if (!mapEl) return;\r\n\r\n if (!this._googleMap) {\r\n // Default to India if no venues exist\r\n const defaultLat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const defaultLng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n const defaultZoom = this.config.locationConfig?.defaultZoom ?? 4;\r\n\r\n this._googleMap = new (window as any).google.maps.Map(mapEl, {\r\n zoom: venues.length === 1 ? 12 : defaultZoom,\r\n center: venues.length > 0\r\n ? { lat: venues[0].latitude, lng: venues[0].longitude }\r\n : { lat: defaultLat, lng: defaultLng }\r\n });\r\n } else {\r\n if (venues.length === 0) {\r\n // Re-center on default\r\n const lat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const lng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n this._googleMap.setCenter({ lat, lng });\r\n this._googleMap.setZoom(this.config.locationConfig?.defaultZoom ?? 4);\r\n } else if (venues.length === 1) {\r\n this._googleMap.setCenter({ lat: venues[0].latitude, lng: venues[0].longitude });\r\n this._googleMap.setZoom(12);\r\n }\r\n }\r\n\r\n // Clear old markers\r\n this._mapMarkers.forEach(m => m.setMap(null));\r\n this._mapMarkers = [];\r\n\r\n venues.forEach(v => {\r\n const marker = new (window as any).google.maps.Marker({\r\n position: { lat: v.latitude, lng: v.longitude },\r\n map: this._googleMap,\r\n title: v.name || v.address || v.description\r\n });\r\n this._mapMarkers.push(marker);\r\n });\r\n\r\n if (venues.length > 1) {\r\n const bounds = new (window as any).google.maps.LatLngBounds();\r\n venues.forEach(v => bounds.extend({ lat: v.latitude!, lng: v.longitude! }));\r\n this._googleMap.fitBounds(bounds);\r\n }\r\n }\r\n}\r\n\r\n","<div class=\"form-field\" *ngIf=\"isVisible\" [class.has-error]=\"errorMessage\">\r\n\r\n <!-- ══ ROW Layout ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRow\" class=\"form-row grid-row\">\r\n <ng-container *ngFor=\"let child of config.children\">\r\n <div class=\"row-field\" [style.gridColumn]=\"'span ' + getChildColSpan(child)\">\r\n <lib-form-field [config]=\"child\" [controller]=\"controller\" [formGroup]=\"formGroup\" [allowMulti]=\"allowMulti\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- ══ GROUP — allowMulti (repeater) ════════════════════════════════════ -->\r\n <div *ngIf=\"isGroup && config.sectionConfig?.allowMulti\" class=\"group-section-wrapper\"\r\n [class.multi-save-active]=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n\r\n <!-- Multi-Save Header with Add button (top-right style) -->\r\n <div class=\"multi-save-header\" *ngIf=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig?.label\">{{ config.sectionConfig!.label }}</h3>\r\n <lib-button [variant]=\"'outline'\" [icon]=\"{type: 'material', value: 'add'}\" (click)=\"addGroupInstance()\"\r\n class=\"btn-add-multi\">\r\n {{ addMultiLabel }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- Standard Header for non-multiSave -->\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig?.label && !config.sectionConfig?.multiSaveConfig?.active\">{{\r\n config.sectionConfig!.label }}</h3>\r\n\r\n <div *ngFor=\"let instance of instanceList; trackBy: trackByInstanceId; let i = index\" class=\"group-instance\"\r\n [class.is-editing]=\"instance.isEditing\"\r\n [class.is-card]=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n\r\n <!-- 1. EDIT MODE / UNSAVED / STANDARD STATE -->\r\n <div [hidden]=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n <!-- Instance header — show remove only when more than 1 instance -->\r\n <div class=\"group-header\" *ngIf=\"!config.sectionConfig?.multiSaveConfig?.active && instanceList.length > 1\">\r\n <span class=\"group-number\">{{ config.sectionConfig!.label }} #{{ i + 1 }}</span>\r\n <lib-button [variant]=\"'danger-outline'\" [icon]=\"{type: 'material', value: 'delete_outline'}\"\r\n (click)=\"removeGroupInstance(i)\">\r\n {{ removeLabel }}\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"group-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.sectionConfig!.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"instance.fg\" [allowMulti]=\"true\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- SAVE / CANCEL BUTTONS for MultiSave in Editing phase -->\r\n <div class=\"group-footer\" *ngIf=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n <span class=\"field-error\" *ngIf=\"multiSaveError\">{{ multiSaveError }}</span>\r\n <div class=\"footer-actions\">\r\n <lib-button [variant]=\"'outline'\" (click)=\"cancelGroupInstance(i)\">Cancel</lib-button>\r\n <lib-button [variant]=\"'primary'\" (click)=\"saveGroupInstance(i)\">Save</lib-button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- 2. CARD VIEW (Saved State) -->\r\n <ng-container *ngIf=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n <div class=\"card-view\" [class.is-expanded]=\"instance.isExpanded\">\r\n <div class=\"card-content\">\r\n <span class=\"card-title\">{{ instance.fg.get(config.sectionConfig.multiSaveConfig.summaryField || '')?.value\r\n || '—' }}</span>\r\n <!-- <span class=\"card-desc\" *ngIf=\"config.sectionConfig.multiSaveConfig.descriptionField\"\r\n [innerHTML]=\"instance.fg.get(config.sectionConfig.multiSaveConfig.descriptionField)?.value\">\r\n </span> -->\r\n </div>\r\n <div class=\"card-actions\">\r\n <mat-icon class=\"icon-delete\" (click)=\"removeGroupInstance(i, true)\">delete_outline</mat-icon>\r\n <mat-icon class=\"icon-edit\" (click)=\"editGroupInstance(i)\">edit_outline</mat-icon>\r\n <mat-icon class=\"icon-expand\" (click)=\"toggleExpandGroupInstance(i)\">\r\n {{ instance.isExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Standard Add Button for non-multiSave -->\r\n <lib-button *ngIf=\"!config.sectionConfig?.multiSaveConfig?.active\" [variant]=\"'outline'\"\r\n [icon]=\"{type: 'material', value: 'add'}\" (click)=\"addGroupInstance()\" class=\"btn-add-group-wrapper\">\r\n {{ addLabel }} {{ config.sectionConfig!.label }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- ══ GROUP — single (non-repeater) ════════════════════════════════════ -->\r\n <div *ngIf=\"isGroup && config.sectionConfig && !config.sectionConfig.allowMulti\" class=\"group-section-wrapper\">\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig.label\">{{ config.sectionConfig.label }}</h3>\r\n <div class=\"group-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.sectionConfig.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"groupFormGroup\" [allowMulti]=\"false\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- ══ Text Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isTextField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <textarea *ngIf=\"config.subType === 'LONG'\" class=\"field-input textarea\" [placeholder]=\"config.placeholder || ''\"\r\n [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\" rows=\"4\">\r\n </textarea>\r\n\r\n <!-- Password input with show/hide toggle -->\r\n <div *ngIf=\"config.subType === 'PASSWORD'\" class=\"password-wrapper\">\r\n <input [type]=\"showPassword ? 'text' : 'password'\" class=\"field-input password-input\"\r\n [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <button type=\"button\" class=\"password-toggle\" (click)=\"showPassword = !showPassword\" tabindex=\"-1\"\r\n [attr.aria-label]=\"showPassword ? 'Hide password' : 'Show password'\">\r\n <mat-icon class=\"eye-icon\">{{ showPassword ? 'visibility' : 'visibility_off' }}</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <span class=\"input-prefix\" *ngIf=\"config.prefix\">{{ config.prefix }}</span>\r\n\r\n <input *ngIf=\"config.subType !== 'LONG' && config.subType !== 'PASSWORD'\"\r\n [type]=\"config.subType === 'EMAIL' ? 'email' : config.subType === 'PHONE' ? 'tel' : 'text'\" class=\"field-input\"\r\n [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\"\r\n [readonly]=\"config.readonly\">\r\n\r\n <span class=\"input-suffix\" *ngIf=\"config.suffix\">{{ config.suffix }}</span>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <div class=\"char-count-hint\" *ngIf=\"showCharCount\">\r\n {{ remainingCharacters }} characters remaining\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Number Input ══════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isNumberField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <span class=\"input-prefix\" *ngIf=\"config.prefix\">{{ config.prefix }}</span>\r\n\r\n <input type=\"number\" class=\"field-input\" [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\"\r\n [min]=\"config.numberConfig?.min\" [max]=\"config.numberConfig?.max\" [step]=\"config.numberConfig?.step || 1\"\r\n [class.is-invalid]=\"errorMessage\" [readonly]=\"config.readonly\">\r\n\r\n <span class=\"input-suffix\" *ngIf=\"config.suffix\">{{ config.suffix }}</span>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Date Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isDateField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <input matInput [matDatepicker]=\"datePicker\" class=\"field-input date-input has-icon-right\"\r\n [formControlName]=\"config.name!\" [min]=\"config.dateConfig?.minDate\" [max]=\"config.dateConfig?.maxDate\"\r\n [class.is-invalid]=\"errorMessage\" [placeholder]=\"config.placeholder || ''\" [readonly]=\"config.readonly\"\r\n (click)=\"!config.readonly && datePicker.open()\">\r\n <div class=\"date-icon-wrapper\" *ngIf=\"!config.readonly\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n </div>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Time Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isTimeField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <input type=\"time\" class=\"field-input time-input\" [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\" [readonly]=\"!!config.readonly\">\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Autocomplete ═════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isAutocomplete\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <!-- Hidden real control (stores the code value) -->\r\n <input type=\"hidden\" [formControlName]=\"config.name!\">\r\n\r\n <div class=\"autocomplete-wrapper\" [class.is-invalid]=\"errorMessage\" [class.readonly]=\"config.readonly\">\r\n <!-- Search icon -->\r\n <mat-icon class=\"ac-search-icon\">search</mat-icon>\r\n\r\n <input class=\"field-input ac-input\" [formControl]=\"autocompleteInputCtrl\" [matAutocomplete]=\"auto\"\r\n [placeholder]=\"config.placeholder || 'Search…'\" [readonly]=\"!!config.readonly\" [class.is-invalid]=\"errorMessage\"\r\n (blur)=\"onAutocompleteClear()\" autocomplete=\"off\">\r\n\r\n <!-- Clear button -->\r\n <button type=\"button\" class=\"ac-clear-btn\" *ngIf=\"autocompleteInputCtrl.value && !config.readonly\"\r\n (click)=\"autocompleteInputCtrl.setValue(''); updateValue(null)\" tabindex=\"-1\" aria-label=\"Clear\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n\r\n <mat-autocomplete #auto=\"matAutocomplete\" [panelWidth]=\"'auto'\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option.label\"\r\n (onSelectionChange)=\"onAutocompleteSelected(option)\">\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"filteredOptions.length === 0\" disabled class=\"ac-no-results\">\r\n No results found\r\n </mat-option>\r\n </mat-autocomplete>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Dropdown ══════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isDropdown\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <select *ngIf=\"config.subType === 'SINGLE'\" class=\"field-input\" [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\">\r\n <option [ngValue]=\"null\" disabled selected>{{ config.placeholder || 'Select' }}</option>\r\n <option *ngFor=\"let option of config.optionConfig?.optionList\" [value]=\"option.code\">\r\n {{ option.label }}\r\n </option>\r\n </select>\r\n\r\n <select *ngIf=\"config.subType === 'MULTIPLE'\" class=\"field-input\" multiple [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\">\r\n <option *ngFor=\"let option of config.optionConfig?.optionList\" [value]=\"option.code\">\r\n {{ option.label }}\r\n </option>\r\n </select>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Radio ═════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRadio\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"radio-group\" [class.is-invalid]=\"errorMessage\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"radio-label\">\r\n <input type=\"radio\" [formControlName]=\"config.name!\" [value]=\"option.code\">\r\n <span>{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Checkbox ══════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isCheckbox\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label && config.subType === 'LIST'\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"config.subType === 'BOOL'\" class=\"checkbox-single\">\r\n <label class=\"checkbox-label\">\r\n <input type=\"checkbox\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <span>{{ config.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <div *ngIf=\"config.subType === 'LIST'\" class=\"checkbox-group\" [class.is-invalid]=\"errorMessage\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"checkbox-label\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(option.code)\" [disabled]=\"!!config.disabled\"\r\n (change)=\"onCheckboxListChange(option.code, $any($event.target).checked)\">\r\n <span>{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Chip ══════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isChip\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"chip-group\" [class.is-invalid]=\"errorMessage\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"chip-label\"\r\n [class.selected]=\"isChecked(option.code)\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(option.code)\" [disabled]=\"!!config.disabled\"\r\n (change)=\"onCheckboxListChange(option.code, $any($event.target).checked)\" hidden>\r\n <span>{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Switch ════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isSwitch\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label class=\"switch-container\">\r\n <span class=\"field-label\">{{ config.label }}</span>\r\n <div class=\"switch\">\r\n <input type=\"checkbox\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <span class=\"slider\"></span>\r\n </div>\r\n </label>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Rich Text ═════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRichText\" class=\"field-wrapper component-rich-text\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"rich-text-container\" [class.is-invalid]=\"errorMessage\">\r\n <quill-editor [formControlName]=\"config.name!\" class=\"rich-text-editor\"\r\n [placeholder]=\"config.richTextConfig?.placeholder || config.placeholder || ''\"\r\n [styles]=\"{height: config.richTextConfig?.height || '200px'}\">\r\n </quill-editor>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <div class=\"char-count-hint\" *ngIf=\"showCharCount\">\r\n {{ remainingCharacters }} characters remaining\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Rating ════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRating\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"rating-group\" [class.is-invalid]=\"errorMessage\">\r\n <span *ngFor=\"let star of getStarArray()\" class=\"star\" [class.filled]=\"isStarFilled(star)\"\r\n [class.half]=\"isStarHalf(star)\" (click)=\"onRatingChange(star, $event)\">\r\n <mat-icon>{{ isStarFilled(star) || isStarHalf(star) ? 'star' : 'star_border' }}</mat-icon>\r\n </span>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Generated Field (read-only) ══════════════════════════════════════ -->\r\n <div *ngIf=\"isGenerated\" class=\"field-wrapper\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">{{ config.label }}</label>\r\n <div class=\"generated-value\">{{ value || '-' }}</div>\r\n <span class=\"field-hint\" *ngIf=\"config.hint\">{{ config.hint }}</span>\r\n </div>\r\n\r\n <!-- ══ File Upload ═══════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isFileUpload\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <!-- Drop Zone -->\r\n <div class=\"upload-drop-zone\" [class.drag-over]=\"isDragOver\" [class.has-files]=\"value?.length\"\r\n [class.is-invalid]=\"errorMessage\" (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onFileDrop($event)\" (click)=\"fileInput.click()\">\r\n\r\n <div class=\"upload-icon-wrap\">\r\n <mat-icon class=\"upload-cloud-icon\">cloud_upload</mat-icon>\r\n </div>\r\n\r\n <p class=\"upload-main-text\">Drag and drop files here or <span class=\"upload-link\">click to upload</span></p>\r\n <p class=\"upload-hint-text\" *ngIf=\"config.attachmentConfig?.acceptLabel\">\r\n Supported formats:\r\n <span class=\"upload-formats\">{{ config.attachmentConfig!.acceptLabel }}</span>\r\n </p>\r\n <p class=\"upload-hint-text\" *ngIf=\"!config.attachmentConfig?.acceptLabel && config.hint\">\r\n {{ config.hint }}\r\n </p>\r\n\r\n <!-- Hidden native file input -->\r\n <input #fileInput type=\"file\" hidden [attr.multiple]=\"config.attachmentConfig?.multiple ? true : null\"\r\n [attr.accept]=\"config.attachmentConfig?.accept || null\" (change)=\"onFileSelected($event)\">\r\n </div>\r\n\r\n <!-- Uploaded file list -->\r\n <div class=\"uploaded-list\" *ngIf=\"value?.length\">\r\n <div *ngFor=\"let f of value; let i = index\" class=\"uploaded-item\" [class.uploading]=\"f.isUploading\">\r\n\r\n <!-- Uploading spinner (shown while API call is in progress) -->\r\n <ng-container *ngIf=\"f.isUploading; else fileReady\">\r\n <div class=\"upload-spinner\"></div>\r\n <div class=\"file-info\">\r\n <span class=\"file-name\" [title]=\"f.name\">{{ f.name }}</span>\r\n <span class=\"file-size uploading-label\">Uploading...</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Normal state once upload is done -->\r\n <ng-template #fileReady>\r\n <!-- File type icon -->\r\n <mat-icon class=\"file-type-icon\">{{ getFileIcon(f.type) }}</mat-icon>\r\n\r\n <!-- Image thumbnail (only for images) -->\r\n <img *ngIf=\"f.type?.startsWith('image') && f.dataUrl\" [src]=\"f.dataUrl\" class=\"file-thumb\" alt=\"preview\">\r\n\r\n <!-- Name & size -->\r\n <div class=\"file-info\">\r\n <span class=\"file-name\" [title]=\"f.name\">{{ f.name }}</span>\r\n <span class=\"file-size\">{{ formatFileSize(f.size) }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Remove button — disabled while uploading -->\r\n <lib-button [variant]=\"'danger-outline'\" [disabled]=\"f.isUploading\"\r\n (click)=\"!f.isUploading && removeUploadedFile(i)\">\r\n <mat-icon>close</mat-icon>\r\n </lib-button>\r\n </div>\r\n </div>\r\n\r\n <!-- Validation / file errors -->\r\n <span class=\"field-error\" *ngIf=\"fileUploadError\">{{ fileUploadError }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage && !fileUploadError\">{{ errorMessage }}</span>\r\n <span class=\"field-hint\"\r\n *ngIf=\"config.hint && !errorMessage && !fileUploadError && !config.attachmentConfig?.acceptLabel\">\r\n {{ config.hint }}\r\n </span>\r\n </div>\r\n\r\n <!-- ══ Media Upload (Type 2) ════════════════════════════════════════════ -->\r\n <div *ngIf=\"isMediaUpload\" class=\"field-wrapper media-upload-wrapper\" [formGroup]=\"formGroup\">\r\n\r\n <!-- Hidden file input lives outside *ngIf — triggered via ViewChild -->\r\n <input #mediaDeviceInput type=\"file\" hidden multiple accept=\"image/*\" (change)=\"onMediaFileSelected($event)\">\r\n\r\n <!-- Two-column layout -->\r\n <div class=\"mu-layout\">\r\n\r\n <!-- ── LEFT PANEL ──────────────────────────────────────────────── -->\r\n <div class=\"mu-left\">\r\n\r\n <!-- Header: title + max-items badge -->\r\n <div class=\"mu-header\">\r\n <h3 class=\"mu-title\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </h3>\r\n <span class=\"mu-badge\" *ngIf=\"config.attachmentConfig?.maxFiles\">\r\n {{ controller.labels['LBL_MEDIA_MAX_PREFIX'] || 'Maximum' }}\r\n {{ config.attachmentConfig?.maxFiles }}\r\n {{ controller.labels['LBL_MEDIA_MAX_SUFFIX'] || 'Image & Videos' }}\r\n </span>\r\n </div>\r\n\r\n <!-- Description -->\r\n <p class=\"mu-description\" *ngIf=\"config.attachmentConfig?.description\">\r\n {{ config.attachmentConfig?.description }}\r\n </p>\r\n <p class=\"mu-description\" *ngIf=\"!config.attachmentConfig?.description && controller.labels['LBL_MEDIA_DESC']\">\r\n {{ controller.labels['LBL_MEDIA_DESC'] }}\r\n </p>\r\n\r\n <!-- Feature bullet list -->\r\n <ul class=\"mu-features\"\r\n *ngIf=\"config.attachmentConfig?.features?.length || controller.labels['LBL_MEDIA_FEATURE_1']\">\r\n <ng-container *ngIf=\"config.attachmentConfig?.features?.length\">\r\n <li *ngFor=\"let f of config.attachmentConfig?.features\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ f }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!config.attachmentConfig?.features?.length\">\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_1']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_1'] }}\r\n </li>\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_2']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_2'] }}\r\n </li>\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_3']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_3'] }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <!-- Backdrop to close dropdown on outside click -->\r\n <div class=\"media-menu-backdrop\" *ngIf=\"showMediaMenu\"\r\n (click)=\"$event.stopPropagation(); showMediaMenu = false\"></div>\r\n\r\n <!-- Add Media button + dropdown -->\r\n <div class=\"media-add-container\" (click)=\"showMediaMenu = !showMediaMenu\">\r\n <lib-button id=\"btn-add-media-{{ config.name }}\" [variant]=\"'warning'\"\r\n [icon]=\"{type: 'material', value: 'add_photo_alternate'}\">\r\n {{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}\r\n <mat-icon class=\"menu-chevron\">add</mat-icon>\r\n </lib-button>\r\n\r\n <div class=\"media-dropdown\" *ngIf=\"showMediaMenu\" role=\"menu\" (click)=\"$event.stopPropagation()\">\r\n <!-- Video -->\r\n <button id=\"btn-media-video-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuVideo(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--video\"><mat-icon>videocam</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_VIDEO'] || 'Video' }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_VIDEO_DESC'] || 'Add YouTube URL'\r\n }}</span>\r\n </span>\r\n </button>\r\n <!-- Device -->\r\n <button id=\"btn-media-device-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuDevice(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--device\"><mat-icon>upload</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_DEVICE'] || 'Upload from device'\r\n }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_DEVICE_DESC'] || 'Select images from your\r\n computer' }}</span>\r\n </span>\r\n </button>\r\n <!-- Library -->\r\n <button id=\"btn-media-library-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuLibrary(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--library\"><mat-icon>photo_library</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_LIBRARY'] || 'Upload from library'\r\n }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_LIBRARY_DESC'] || 'Choose from default\r\n images' }}</span>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- YouTube URL Input (inline below button) -->\r\n <div class=\"youtube-input-panel\" *ngIf=\"showYoutubeInput\">\r\n <label class=\"youtube-panel-label\">\r\n {{ controller.labels['LBL_YOUTUBE_URL'] || 'Video URL' }}\r\n </label>\r\n <div class=\"youtube-input-row\">\r\n <input id=\"input-youtube-url-{{ config.name }}\" type=\"url\" class=\"field-input youtube-url-input\"\r\n [(ngModel)]=\"youtubeUrlInput\" [ngModelOptions]=\"{standalone: true}\"\r\n [placeholder]=\"controller.labels['PH_YOUTUBE_URL'] || 'Video URL'\" (keyup.enter)=\"addYoutubeMedia()\">\r\n <lib-button id=\"btn-add-youtube-{{ config.name }}\" [variant]=\"'secondary'\" (click)=\"addYoutubeMedia()\">\r\n {{ controller.labels['LBL_ADD'] || 'Add' }}\r\n </lib-button>\r\n </div>\r\n <span class=\"field-error\" *ngIf=\"youtubeUrlError\">{{ youtubeUrlError }}</span>\r\n </div>\r\n\r\n <div class=\"media-upload-status\" *ngIf=\"mediaUploadError\">\r\n <mat-icon class=\"status-icon\">error_outline</mat-icon>\r\n <span>{{ mediaUploadError }}</span>\r\n </div>\r\n\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n </div>\r\n <!-- end left panel -->\r\n\r\n <!-- ── RIGHT PANEL (carousel) ──────────────────────────────────── -->\r\n <div class=\"mu-right\">\r\n\r\n <!-- Carousel (when items exist) -->\r\n <div class=\"media-carousel-section\" *ngIf=\"mediaItems.length\">\r\n <div class=\"media-carousel-main\">\r\n <button id=\"btn-carousel-prev-{{ config.name }}\" type=\"button\" class=\"carousel-nav carousel-nav--prev\"\r\n (click)=\"mediaCarouselPrev()\" [disabled]=\"mediaCarouselIndex === 0\" aria-label=\"Previous\">\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"carousel-viewer\" *ngFor=\"let item of mediaItems; let i = index\"\r\n [hidden]=\"i !== mediaCarouselIndex\">\r\n <div *ngIf=\"item.isUploading\" class=\"carousel-uploading\">\r\n <div class=\"carousel-spinner\"></div>\r\n <span>{{ controller.labels['LBL_UPLOADING'] || 'Uploading…' }}</span>\r\n </div>\r\n <ng-container *ngIf=\"!item.isUploading && item.mediaType === 'youtube'\">\r\n <iframe class=\"carousel-iframe\" [src]=\"item.url | trustedUrl\" frameborder=\"0\" allowfullscreen\r\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\">\r\n </iframe>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.isUploading && item.mediaType === 'image'\">\r\n <img class=\"carousel-image\" [src]=\"item.url\" alt=\"Media\">\r\n </ng-container>\r\n <button id=\"btn-remove-media-{{ config.name }}-{{ i }}\" type=\"button\" class=\"carousel-remove-btn\"\r\n [disabled]=\"item.isUploading\" (click)=\"removeMediaItem(i)\" aria-label=\"Remove\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button id=\"btn-carousel-next-{{ config.name }}\" type=\"button\" class=\"carousel-nav carousel-nav--next\"\r\n (click)=\"mediaCarouselNext()\" [disabled]=\"mediaCarouselIndex === mediaItems.length - 1\" aria-label=\"Next\">\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n\r\n <div class=\"carousel-dots\">\r\n <span *ngFor=\"let item of mediaItems; let i = index\" class=\"carousel-dot\"\r\n [class.active]=\"i === mediaCarouselIndex\" (click)=\"mediaGoTo(i)\"></span>\r\n </div>\r\n </div>\r\n\r\n <!-- Thumbnail strip -->\r\n <div class=\"media-thumbnail-strip\">\r\n <div *ngFor=\"let item of mediaThumbnails; let i = index\" class=\"media-thumb\"\r\n [class.active]=\"i === mediaCarouselIndex\" (click)=\"mediaGoTo(i)\">\r\n <div *ngIf=\"item.isUploading\" class=\"thumb-uploading\">\r\n <div class=\"thumb-spinner\"></div>\r\n </div>\r\n <img *ngIf=\"!item.isUploading && item.mediaType === 'youtube' && item.thumbnailUrl\"\r\n [src]=\"item.thumbnailUrl\" class=\"thumb-img\" alt=\"Video thumbnail\">\r\n <div *ngIf=\"!item.isUploading && item.mediaType === 'youtube' && !item.thumbnailUrl\"\r\n class=\"thumb-yt-placeholder\">\r\n <mat-icon>play_circle</mat-icon>\r\n </div>\r\n <img *ngIf=\"!item.isUploading && item.mediaType === 'image' && item.url\" [src]=\"item.url\"\r\n class=\"thumb-img\" alt=\"Image thumbnail\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty right-side placeholder -->\r\n <div class=\"mu-right-empty\" *ngIf=\"!mediaItems.length\" (click)=\"onMediaMenuDevice()\">\r\n <mat-icon class=\"mu-right-empty-icon\">perm_media</mat-icon>\r\n <p>{{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}</p>\r\n </div>\r\n\r\n </div>\r\n <!-- end right panel -->\r\n\r\n </div><!-- end mu-layout -->\r\n </div>\r\n\r\n\r\n <!-- ══ Library Image Picker Modal ════════════════════════════════════════ -->\r\n <div class=\"media-library-overlay\" *ngIf=\"showLibraryModal\" (click)=\"closeLibraryModal()\"></div>\r\n <div class=\"media-library-modal\" *ngIf=\"showLibraryModal\" role=\"dialog\" aria-modal=\"true\">\r\n <div class=\"library-modal-header\">\r\n <h3 class=\"library-modal-title\">\r\n <mat-icon>photo_library</mat-icon>\r\n {{ controller.labels['LBL_LIBRARY_TITLE'] || 'Media Library' }}\r\n </h3>\r\n <button id=\"btn-close-library-{{ config.name }}\" type=\"button\" class=\"library-close-btn\"\r\n (click)=\"closeLibraryModal()\" aria-label=\"Close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Loading -->\r\n <div class=\"library-loading\" *ngIf=\"libraryLoading\">\r\n <div class=\"lib-spinner\"></div>\r\n <span>{{ controller.labels['LBL_LOADING'] || 'Loading…' }}</span>\r\n </div>\r\n\r\n <!-- Error -->\r\n <div class=\"library-error\" *ngIf=\"libraryError && !libraryLoading\">\r\n <mat-icon>error_outline</mat-icon>\r\n {{ libraryError }}\r\n </div>\r\n\r\n <!-- Image grid -->\r\n <div class=\"library-grid\" *ngIf=\"!libraryLoading && libraryImages.length\">\r\n <div *ngFor=\"let img of libraryImages; let li = index\" id=\"lib-img-{{ config.name }}-{{ li }}\"\r\n class=\"library-grid-item\" [class.selected]=\"isLibraryItemSelected(img)\" (click)=\"toggleLibraryItem(img)\">\r\n <img [src]=\"getLibraryItemUrl(img)\" class=\"library-grid-img\" alt=\"Library image\">\r\n <div class=\"library-check\" *ngIf=\"isLibraryItemSelected(img)\">\r\n <mat-icon>check_circle</mat-icon>\r\n </div>\r\n <div class=\"library-overlay-hover\"></div>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty library -->\r\n <div class=\"library-empty\" *ngIf=\"!libraryLoading && !libraryError && libraryImages.length === 0\">\r\n <mat-icon>image_not_supported</mat-icon>\r\n <span>{{ controller.labels['LBL_LIBRARY_EMPTY'] || 'No images found in library.' }}</span>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"library-modal-footer\">\r\n <span class=\"library-selected-count\">\r\n {{ librarySelectedIds.size }} {{ controller.labels['LBL_LIBRARY_SELECTED'] || 'selected' }}\r\n </span>\r\n <div class=\"library-footer-actions\">\r\n <lib-button id=\"btn-library-cancel-{{ config.name }}\" [variant]=\"'outline'\" (click)=\"closeLibraryModal()\">\r\n {{ controller.labels['LBL_CANCEL'] || 'Cancel' }}\r\n </lib-button>\r\n <lib-button id=\"btn-library-confirm-{{ config.name }}\" [variant]=\"'primary'\"\r\n [disabled]=\"librarySelectedIds.size === 0\" (click)=\"confirmLibrarySelection()\">\r\n {{ controller.labels['LBL_LIBRARY_ADD_SELECTED'] || 'Add Selected' }}\r\n </lib-button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Location Field ═══════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isLocation\" class=\"field-wrapper location-field-wrapper\" [formGroup]=\"formGroup\">\r\n\r\n <!-- Field label -->\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n <p class=\"location-subtitle\" *ngIf=\"config.hint\">{{ config.hint }}</p>\r\n\r\n <!-- Three-tab bar -->\r\n <div class=\"location-tabs\">\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'VENUE' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('VENUE')\">\r\n {{ controller.labels['LBL_LOC_VENUE'] || 'Venue' }}\r\n </lib-button>\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'ONLINE' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('ONLINE')\">\r\n {{ controller.labels['LBL_LOC_ONLINE'] || 'Online Event' }}\r\n </lib-button>\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'TBA' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('TBA')\">\r\n {{ controller.labels['LBL_LOC_TBA'] || 'To be Announced' }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- VENUE TAB -->\r\n <div *ngIf=\"locationActiveTab === 'VENUE'\" class=\"loc-panel loc-venue-panel\">\r\n\r\n <p class=\"loc-section-label\">\r\n {{ controller.labels['LBL_LOC_ADDRESS'] || 'Location address' }}\r\n </p>\r\n\r\n <!-- Added venue rows -->\r\n <div class=\"loc-venue-list\" *ngIf=\"locationVenues.length > 0\">\r\n <div *ngFor=\"let venue of locationVenues; let i = index\" class=\"loc-venue-item\">\r\n <mat-icon class=\"loc-venue-search-icon\">search</mat-icon>\r\n <span class=\"loc-venue-text\">{{ venue.address || venue.name || venue.description }}</span>\r\n <button type=\"button\" class=\"loc-action-btn loc-delete-btn\" (click)=\"removeLocationVenue(i)\">\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Location count badge -->\r\n <p class=\"loc-count-text\" *ngIf=\"locationVenues.length > 0 && config.locationConfig?.allowMulti\">\r\n {{ locationVenues.length }}&nbsp;{{ controller.labels['LBL_LOC_COUNT_SUFFIX'] || 'Locations Added!' }}\r\n </p>\r\n\r\n <!-- Search input (hide when max reached) -->\r\n <div class=\"loc-search-container\" *ngIf=\"!locationMaxReached\">\r\n <div class=\"loc-search-wrapper\">\r\n <mat-icon class=\"loc-search-icon\">search</mat-icon>\r\n <input class=\"field-input loc-search-input\"\r\n [placeholder]=\"config.locationConfig?.venuePlaceholder || (controller.labels['PH_LOC_VENUE'] || 'Type to search venue...')\"\r\n [value]=\"locationSearchText\" (input)=\"handleLocationSearchInput($event)\" (blur)=\"hideLocationSuggestions()\"\r\n autocomplete=\"off\" [class.is-invalid]=\"errorMessage\">\r\n </div>\r\n <!-- Suggestions dropdown -->\r\n <div class=\"loc-suggestions-panel\" *ngIf=\"locationShowSuggestions && locationSuggestions.length\">\r\n <div *ngFor=\"let sug of locationSuggestions\" class=\"loc-suggestion-item\"\r\n (mousedown)=\"onLocationSuggestionSelect(sug)\">\r\n <mat-icon class=\"loc-suggestion-icon\">place</mat-icon>\r\n <span class=\"loc-suggestion-text\">{{ sug.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Add another button -->\r\n <button type=\"button\" class=\"loc-add-btn\"\r\n *ngIf=\"locationVenues.length > 0 && !locationMaxReached && config.locationConfig?.allowMulti\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n <span>{{ controller.labels['LBL_LOC_ADD_ANOTHER'] || 'Add another Location' }}</span>\r\n </button>\r\n\r\n <!-- Map -->\r\n <div class=\"loc-map-container\" *ngIf=\"config.locationConfig?.showMap !== false\">\r\n <ng-container *ngIf=\"config.locationConfig?.googleMapsApiKey; else simpleEmbed\">\r\n <div [id]=\"'loc-map-' + config.name\" class=\"loc-map-frame\"\r\n [style.height]=\"config.locationConfig?.mapHeight || '300px'\"></div>\r\n </ng-container>\r\n <ng-template #simpleEmbed>\r\n <iframe class=\"loc-map-frame\" [style.height]=\"config.locationConfig?.mapHeight || '300px'\"\r\n [src]=\"getLocationMapEmbedUrl() | trustedUrl\" frameborder=\"0\" allowfullscreen loading=\"lazy\">\r\n </iframe>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Map hint -->\r\n <p class=\"loc-map-hint\">\r\n {{ controller.labels['LBL_LOC_MAP_HINT'] || 'Type the venue address. A map will appear to assist you.' }}\r\n </p>\r\n </div>\r\n\r\n <!-- ONLINE TAB -->\r\n <div *ngIf=\"locationActiveTab === 'ONLINE'\" class=\"loc-panel loc-online-panel\">\r\n <p class=\"loc-section-label\">\r\n {{ controller.labels['LBL_LOC_ONLINE_URL'] || 'Event URL' }}\r\n </p>\r\n <div class=\"loc-search-wrapper\">\r\n <mat-icon class=\"loc-search-icon\">link</mat-icon>\r\n <input class=\"field-input loc-search-input\" type=\"url\"\r\n [placeholder]=\"config.locationConfig?.onlinePlaceholder || (controller.labels['PH_LOC_ONLINE'] || 'https://zoom.us/j/...')\"\r\n [value]=\"locationOnlineUrl\" (input)=\"onLocationUrlChange($any($event.target).value)\"\r\n [class.is-invalid]=\"errorMessage\">\r\n </div>\r\n </div>\r\n\r\n <!-- TBA TAB -->\r\n <div *ngIf=\"locationActiveTab === 'TBA'\" class=\"loc-panel loc-tba-panel\">\r\n <div class=\"loc-tba-content\">\r\n <mat-icon class=\"loc-tba-icon\">schedule</mat-icon>\r\n <p class=\"loc-tba-text\">\r\n {{ controller.labels['LBL_LOC_TBA_DESC'] || \"This event's location is yet to be announced. Check back later\r\n for updates.\" }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden real form control -->\r\n <input type=\"hidden\" [formControlName]=\"config.name!\">\r\n\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n</div>","import { Component, Input, OnInit, OnDestroy } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { SectionConfig, FieldConfig } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\n\r\n@Component({\r\n selector: 'lib-form-section',\r\n templateUrl: './form-section.component.html',\r\n styleUrls: ['./form-section.component.scss'],\r\n standalone: false\r\n})\r\nexport class FormSectionComponent implements OnInit, OnDestroy {\r\n @Input() config!: SectionConfig;\r\n @Input() controller!: SmartFormController;\r\n @Input() formGroup!: FormGroup;\r\n\r\n /**\r\n * For allowMulti sections: the FormArray registered on the root formGroup.\r\n * Each element is a FormGroup representing one repeater instance.\r\n */\r\n repeaterFormArray!: FormArray;\r\n\r\n /**\r\n * The key under which the FormArray is registered in the root formGroup.\r\n * Falls back to config.name or a generated key.\r\n */\r\n get arrayKey(): string {\r\n return this.config.name || '__repeater__';\r\n }\r\n\r\n constructor(private fb: FormBuilder) { }\r\n\r\n ngOnInit(): void {\r\n if (this.config.allowMulti) {\r\n this.repeaterFormArray = this.fb.array([]);\r\n this.formGroup.addControl(this.arrayKey, this.repeaterFormArray);\r\n // Start with one empty instance\r\n this.addInstance();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.config.allowMulti && this.formGroup.contains(this.arrayKey)) {\r\n this.formGroup.removeControl(this.arrayKey);\r\n }\r\n }\r\n\r\n // ── Repeater helpers ──────────────────────────────────────────────────────\r\n\r\n /** Creates a fresh FormGroup for one repeater instance */\r\n private createInstanceGroup(): FormGroup {\r\n return this.fb.group({});\r\n }\r\n\r\n addInstance(): void {\r\n this.repeaterFormArray.push(this.createInstanceGroup());\r\n }\r\n\r\n removeInstance(index: number): void {\r\n if (this.repeaterFormArray.length > 1) {\r\n this.repeaterFormArray.removeAt(index);\r\n }\r\n }\r\n\r\n getInstanceGroup(index: number): FormGroup {\r\n return this.repeaterFormArray.at(index) as FormGroup;\r\n }\r\n\r\n get instanceGroups(): FormGroup[] {\r\n return this.repeaterFormArray.controls as FormGroup[];\r\n }\r\n\r\n // ── Non-repeater: flat single FormGroup (root formGroup passed through) ──\r\n\r\n /** For non-allowMulti sections we simply pass the root formGroup down */\r\n get flatFormGroup(): FormGroup {\r\n return this.formGroup;\r\n }\r\n\r\n // ── Collect nested fields for a given child ───────────────────────────────\r\n /** Flatten a field tree to get all leaf fields (for ROW children etc.) */\r\n getFlatFields(fields: FieldConfig[]): FieldConfig[] {\r\n const result: FieldConfig[] = [];\r\n fields.forEach(f => {\r\n if (f.type === 'ROW' && f.children) {\r\n result.push(...this.getFlatFields(f.children));\r\n } else {\r\n result.push(f);\r\n }\r\n });\r\n return result;\r\n }\r\n}\r\n","<div class=\"form-section-container\">\r\n <h3 class=\"section-label\" *ngIf=\"config.label && !config.allowMulti\">{{ config.label }}</h3>\r\n\r\n <!-- ══ Repeater (allowMulti) ══════════════════════════════════════════════ -->\r\n <ng-container *ngIf=\"config.allowMulti\">\r\n <h3 class=\"section-label\">{{ config.label }}</h3>\r\n\r\n <div *ngFor=\"let instanceGroup of instanceGroups; let i = index\" class=\"section-instance\">\r\n <!-- Instance header (remove button) -->\r\n <div class=\"section-header\" *ngIf=\"instanceGroups.length > 1\">\r\n <span class=\"section-number\">{{ config.label }} #{{ i + 1 }}</span>\r\n <lib-button [variant]=\"'danger-outline'\" (click)=\"removeInstance(i)\">\r\n <mat-icon>delete_outline</mat-icon> Remove\r\n </lib-button>\r\n </div>\r\n\r\n <!-- Fields – each child rendered with the *instance* FormGroup -->\r\n <div class=\"section-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"instanceGroup\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <lib-button [variant]=\"'primary'\" (click)=\"addInstance()\">\r\n <mat-icon>add</mat-icon> Add {{ config.label }}\r\n </lib-button>\r\n </ng-container>\r\n\r\n <!-- ══ Non-repeater (single instance) ════════════════════════════════════ -->\r\n <ng-container *ngIf=\"!config.allowMulti\">\r\n <div class=\"section-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"flatFormGroup\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n</div>","import { Component, EventEmitter, Input, OnDestroy, OnInit, OnChanges, SimpleChanges, Output } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Router } from '@angular/router';\r\nimport { ActionBarConfig, ActionButtonConfig, ActionConfig, FieldConfig, FormSchema } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\nimport { ExpressionService } from '../../services/expression.service';\r\nimport { SmartFormTranslationUtils } from '../../utils/translation.utils';\r\nimport { SnackbarService } from '../../../snackbar/services/snackbar.service';\r\n\r\n@Component({\r\n selector: 'lib-smart-form',\r\n templateUrl: './smart-form.component.html',\r\n styleUrls: ['./smart-form.component.scss'],\r\n providers: [SmartFormController],\r\n standalone: false\r\n})\r\nexport class SmartFormComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() formJson!: string;\r\n @Input() initialValues?: { [key: string]: any };\r\n @Input() enableDraftAutoSave: boolean = false;\r\n /** Flat i18n labels map passed by the consuming app.\r\n * After JSON parse the schema is walked and every string value that\r\n * matches a key in this map is replaced with the translated value.\r\n * Mirrors the pattern used by ConfigurableFormComponent + translateConfig.\r\n */\r\n @Input() labels: any = {};\r\n @Input() mode: 'CREATE' | 'EDIT' = 'CREATE';\r\n\r\n @Output() submit = new EventEmitter<{ [key: string]: any }>();\r\n @Output() draftSave = new EventEmitter<string>();\r\n /**\r\n * Emitted when a button with a custom `type` (not 'cancel', 'draft', or\r\n * 'submit') is clicked. Payload contains the button `id` and the current\r\n * form data snapshot.\r\n */\r\n @Output() actionClick = new EventEmitter<{ id: string; formData: { [key: string]: any } }>();\r\n\r\n formSchema!: FormSchema;\r\n formGroup!: FormGroup;\r\n fieldList: FieldConfig[] = [];\r\n isStepper: boolean = false;\r\n currentStep: number = 0;\r\n isLoading: boolean = false;\r\n isDraftLoading: boolean = false;\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n public controller: SmartFormController,\r\n private expressionService: ExpressionService,\r\n private http: HttpClient,\r\n private snackbarService: SnackbarService,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.parseFormJson();\r\n // Load databe in EDIT mode, or use fallback initialValues\r\n if (this.mode === 'EDIT' && this.formSchema?.editConfig?.loadApiUrl) {\r\n this.loadEditData();\r\n } else if (this.initialValues) {\r\n this.controller.initialize(this.initialValues);\r\n }\r\n }\r\n\r\n loadEditData(): void {\r\n const config = this.formSchema.editConfig!;\r\n this.isLoading = true;\r\n const headers = this.getHeaders();\r\n this.http.get(config.loadApiUrl, { headers }).subscribe({\r\n next: (response: any) => {\r\n // Assume API returns flat or easily mappable object matching form controls\r\n this.initialValues = response;\r\n this.controller.initialize(this.initialValues || {});\r\n this.isLoading = false;\r\n },\r\n error: (err) => {\r\n this.showAlert('error', config.errorMessage || 'Failed to load form data', config.snackbarConfig);\r\n console.error('Load data error:', err);\r\n this.isLoading = false;\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['formJson'] && !changes['formJson'].isFirstChange()) {\r\n this.parseFormJson();\r\n }\r\n // Re-translate if labels arrive after the JSON was already parsed\r\n if (changes['labels'] && !changes['labels'].isFirstChange() && this.formSchema) {\r\n this.parseFormJson();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.controller.destroy();\r\n }\r\n\r\n parseFormJson(): void {\r\n if (!this.formJson) { return; } // guard: labels may arrive before formJson\r\n try {\r\n const jsonData = JSON.parse(this.formJson);\r\n this.formSchema = jsonData as FormSchema;\r\n // Push token from configJSON into the shared controller so all child\r\n // components (form-field, etc.) can read it without @Input prop-drilling.\r\n this.controller.token = this.formSchema.token;\r\n this.controller.tokenHeader = this.formSchema.tokenHeader;\r\n // Translate i18n keys before rendering\r\n if (this.labels && Object.keys(this.labels).length) {\r\n SmartFormTranslationUtils.translateSchema(this.formSchema, this.labels);\r\n }\r\n // Share translated labels with child components via controller\r\n this.controller.labels = this.labels;\r\n this.controller.actionLabels = this.formSchema.labels;\r\n this.isStepper = this.formSchema.formType === 'STEPPER';\r\n this.fieldList = this.isStepper\r\n ? this.formSchema.stepperConfig?.children || []\r\n : this.formSchema.sectionConfig?.children || [];\r\n this.initializeForm();\r\n } catch (e) {\r\n console.error('Error parsing form JSON:', e);\r\n }\r\n }\r\n\r\n\r\n initializeForm(): void {\r\n this.formGroup = this.fb.group({});\r\n this.collectFields(this.fieldList);\r\n }\r\n\r\n collectFields(fields: FieldConfig[]): void {\r\n fields.forEach(field => {\r\n // Flat leaf fields: seed controller with default values\r\n if (field.name && field.type !== 'GROUP' && field.type !== 'ROW') {\r\n // Check if initialValues already has a value for this field\r\n const existingValue = this.initialValues?.[field.name];\r\n const value = existingValue !== undefined\r\n ? existingValue\r\n : (field.defaultValue !== undefined ? field.defaultValue : null);\r\n this.controller.updateField(field.name, value);\r\n }\r\n // Recurse into ROW children\r\n if (field.type === 'ROW' && field.children?.length) {\r\n this.collectFields(field.children);\r\n }\r\n // GROUP children will be handled dynamically by FormFieldComponent\r\n });\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Submit\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n handleSubmit(): void {\r\n if (this.isStepper && this.currentStep < this.fieldList.length - 1) {\r\n if (this.validate()) this.nextStep();\r\n return;\r\n }\r\n if (!this.validate()) return;\r\n\r\n this.submitToApi(this.collectFormData(), 'submit');\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Cancel\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n /**\r\n * Universal action handler for any button click.\r\n * One handler decides how to process based on action.kind.\r\n */\r\n handleButtonClick(btn: ActionButtonConfig): void {\r\n const action = btn.action;\r\n if (!action) return;\r\n\r\n switch (action.kind) {\r\n case 'submit':\r\n this.handleSubmit();\r\n break;\r\n case 'draft':\r\n this.submitToApi(this.collectFormData(), 'draft', btn);\r\n break;\r\n case 'navigate':\r\n this.navigateTo(action.redirectUrl);\r\n break;\r\n case 'api':\r\n this.fireActionApiCall(action);\r\n break;\r\n case 'emit':\r\n this.actionClick.emit({ id: btn.id, formData: this.collectFormData() });\r\n break;\r\n case 'next':\r\n if (this.validate()) this.nextStep();\r\n break;\r\n case 'prev':\r\n this.previousStep();\r\n break;\r\n }\r\n }\r\n\r\n // ── Action-Redirects & API ──────────────────────────────────────────────────\r\n\r\n private fireActionApiCall(action: ActionConfig): void {\r\n if (!action.apiUrl) return;\r\n const headers = this.getHeaders();\r\n const method = action.method || 'POST';\r\n const body = action.extraPayload || {};\r\n\r\n this.isLoading = true;\r\n this.http.request(method, action.apiUrl, { body, headers }).subscribe({\r\n next: (response) => {\r\n this.isLoading = false;\r\n const msg = action.successMessage || 'Action successful';\r\n this.showAlert('success', msg, action.snackbarConfig);\r\n if (action.redirectUrl) this.navigateTo(action.redirectUrl);\r\n },\r\n error: (err) => {\r\n this.isLoading = false;\r\n const msg = action.errorMessage || 'Action failed';\r\n this.showAlert('error', msg, action.snackbarConfig);\r\n console.error('API Action error:', err);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Constructs nested payload by checking field properties on form controls.\r\n */\r\n collectFormData(): { [key: string]: any } {\r\n const rawValue = this.extractGroupValue(this.formGroup);\r\n let payload = this.buildNestedPayload(rawValue, this.fieldList);\r\n\r\n // Merge extra fields based on the mode\r\n const config = this.mode === 'EDIT' ? this.formSchema.editConfig : this.formSchema.submitConfig;\r\n if (config?.extraPayload) {\r\n payload = this.deepMerge(payload, config.extraPayload);\r\n }\r\n\r\n return payload;\r\n }\r\n\r\n /**\r\n * Deep merges the source object (e.g. extraPayload) into the target object (e.g. form payload).\r\n */\r\n private deepMerge(target: any, source: any): any {\r\n if (typeof target !== 'object' || target === null) {\r\n return source;\r\n }\r\n if (typeof source !== 'object' || source === null) {\r\n return source;\r\n }\r\n\r\n if (Array.isArray(target) && Array.isArray(source)) {\r\n // For arrays, we merge objects at the same index\r\n const maxLength = Math.max(target.length, source.length);\r\n const mergedArray = [];\r\n for (let i = 0; i < maxLength; i++) {\r\n if (i < target.length && i < source.length) {\r\n mergedArray.push(this.deepMerge(target[i], source[i]));\r\n } else if (i < source.length) {\r\n mergedArray.push(source[i]);\r\n } else {\r\n mergedArray.push(target[i]);\r\n }\r\n }\r\n return mergedArray;\r\n }\r\n\r\n const merged = { ...target };\r\n Object.keys(source).forEach(key => {\r\n if (source[key] instanceof Object && key in target) {\r\n merged[key] = this.deepMerge(target[key], source[key]);\r\n } else {\r\n merged[key] = source[key];\r\n }\r\n });\r\n return merged;\r\n }\r\n\r\n private buildNestedPayload(rawValue: any, fields: FieldConfig[]): { [key: string]: any } {\r\n if (rawValue === null || typeof rawValue !== 'object') return rawValue;\r\n\r\n const payload: { [key: string]: any } = {};\r\n const processedKeys = new Set<string>();\r\n\r\n const processFields = (fieldList: FieldConfig[]) => {\r\n fieldList.forEach(field => {\r\n if (field.type === 'ROW' && field.children) {\r\n processFields(field.children);\r\n } else if (field.type === 'GROUP' && field.sectionConfig?.children) {\r\n // FormFieldComponent generates unnamed groups using their label inside the root FormGroup.\r\n const generatedKey = field.sectionConfig.label\r\n ? field.sectionConfig.label.replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (w, i) => i === 0 ? w.toLowerCase() : w.toUpperCase()).replace(/\\s+/g, '')\r\n : '';\r\n const groupKey = field.sectionConfig.name || field.name || generatedKey || '__group__';\r\n \r\n processedKeys.add(groupKey);\r\n\r\n const groupRawValue = rawValue[groupKey];\r\n if (groupRawValue !== undefined) {\r\n // Identify if it's purely a visual section vs an explicit structural data block\r\n const isStructural = field.sectionConfig.name || field.name || field.sectionConfig.allowMulti;\r\n\r\n if (!isStructural) {\r\n // Visual section: Flatten its contents directly onto the target payload layer\r\n Object.assign(payload, this.buildNestedPayload(groupRawValue, field.sectionConfig.children));\r\n } else {\r\n // Structural block: process nested mappings / array instances\r\n const nestedData = (field.sectionConfig.allowMulti && Array.isArray(groupRawValue))\r\n ? groupRawValue.map(item => this.buildNestedPayload(item, field.sectionConfig!.children!))\r\n : this.buildNestedPayload(groupRawValue, field.sectionConfig.children);\r\n\r\n if (field.payloadPath) {\r\n this.setNestedValue(payload, field.payloadPath, nestedData);\r\n } else {\r\n payload[groupKey] = nestedData;\r\n }\r\n }\r\n }\r\n } else if (field.name) {\r\n processedKeys.add(field.name);\r\n if (rawValue[field.name] !== undefined) {\r\n const val = rawValue[field.name];\r\n if (field.payloadPath) {\r\n this.setNestedValue(payload, field.payloadPath, val);\r\n } else {\r\n payload[field.name] = val;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n processFields(fields);\r\n\r\n // Preserve any hidden tracking keys (e.g. id, uuid, isEdit) that were present in the initial data\r\n Object.keys(rawValue).forEach(key => {\r\n if (!processedKeys.has(key)) {\r\n payload[key] = rawValue[key];\r\n }\r\n });\r\n\r\n return payload;\r\n }\r\n\r\n private setNestedValue(obj: any, path: string, value: any): void {\r\n // Regex matches the property name and optionally an array index e.g. \"name[0]\" -> regex yields [\"name[0]\", \"name\", \"0\"]\r\n const arrayRegex = /^([a-zA-Z0-9_]+)\\[(\\d+)\\]$/;\r\n\r\n const parts = path.split('.');\r\n let current = obj;\r\n\r\n for (let i = 0; i < parts.length - 1; i++) {\r\n const part = parts[i];\r\n const match = part.match(arrayRegex);\r\n\r\n if (match) {\r\n const prop = match[1];\r\n const index = parseInt(match[2], 10);\r\n if (!current[prop]) current[prop] = [];\r\n if (!current[prop][index]) current[prop][index] = {};\r\n current = current[prop][index];\r\n } else {\r\n if (!current[part]) current[part] = {};\r\n current = current[part];\r\n }\r\n }\r\n\r\n const lastPart = parts[parts.length - 1];\r\n const matchLast = lastPart.match(arrayRegex);\r\n if (matchLast) {\r\n const prop = matchLast[1];\r\n const index = parseInt(matchLast[2], 10);\r\n if (!current[prop]) current[prop] = [];\r\n current[prop][index] = value;\r\n } else {\r\n current[lastPart] = value;\r\n }\r\n }\r\n\r\n private extractGroupValue(group: FormGroup): { [key: string]: any } {\r\n const result: { [key: string]: any } = {};\r\n Object.keys(group.controls).forEach(key => {\r\n const ctrl = group.get(key);\r\n if (ctrl instanceof FormArray) {\r\n // Repeater → array of objects\r\n result[key] = (ctrl.controls as FormGroup[]).map(fg => this.extractGroupValue(fg));\r\n } else if (ctrl instanceof FormGroup) {\r\n // Nested single group → nested object\r\n result[key] = this.extractGroupValue(ctrl);\r\n } else {\r\n result[key] = ctrl?.value ?? null;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n validate(): boolean {\r\n if (this.formGroup.invalid) {\r\n this.formGroup.markAllAsTouched();\r\n this.scrollToFirstInvalidControl();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n scrollToFirstInvalidControl(): void {\r\n setTimeout(() => {\r\n const firstInvalidControl = document.querySelector('.is-invalid, .ng-invalid.ng-touched');\r\n if (firstInvalidControl) {\r\n firstInvalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });\r\n }\r\n }, 100);\r\n }\r\n\r\n submitToApi(formData: any, actionType: 'submit' | 'draft' = 'submit', btn?: ActionButtonConfig): void {\r\n const isEdit = this.mode === 'EDIT';\r\n const configLine: any = isEdit ? this.formSchema.editConfig : this.formSchema.submitConfig;\r\n const action = btn?.action;\r\n\r\n // Build the final payload, merging draft extraPayload if applicable\r\n let finalPayload = formData;\r\n if (actionType === 'draft' && action?.extraPayload) {\r\n finalPayload = this.deepMerge(finalPayload, action.extraPayload);\r\n }\r\n\r\n // Fallback for emitted outputs if no API URL is defined centrally\r\n if (!configLine || (!configLine.apiUrl && !configLine.submitApiUrl)) {\r\n if (actionType === 'draft') {\r\n this.draftSave.emit(JSON.stringify(finalPayload));\r\n if (action?.redirectUrl) this.navigateTo(action.redirectUrl);\r\n } else {\r\n this.submit.emit(finalPayload);\r\n }\r\n return;\r\n }\r\n\r\n const apiUrl = isEdit ? configLine.submitApiUrl : configLine.apiUrl;\r\n const method = isEdit ? (configLine.submitMethod || 'PATCH') : (configLine.method || 'POST');\r\n const headers = this.getHeaders();\r\n\r\n // Messages and redirect URLs (Prefer button action overrides if present)\r\n const successMsg = actionType === 'draft'\r\n ? (action?.successMessage || 'Draft saved successfully')\r\n : (action?.successMessage || configLine.successMessage || 'Form submitted successfully');\r\n\r\n const errorMsg = actionType === 'draft'\r\n ? (action?.errorMessage || 'Failed to save draft')\r\n : (action?.errorMessage || configLine.errorMessage || 'Failed to submit form');\r\n\r\n const redirectUrl = actionType === 'draft'\r\n ? (action?.redirectUrl || configLine.redirectUrl)\r\n : (action?.redirectUrl || configLine.redirectUrl);\r\n\r\n if (actionType === 'draft') {\r\n this.isDraftLoading = true;\r\n } else {\r\n this.isLoading = true;\r\n }\r\n\r\n this.http.request(method, apiUrl, { body: finalPayload, headers }).subscribe({\r\n next: (response) => {\r\n this.showAlert('success', successMsg, action?.snackbarConfig || configLine.snackbarConfig);\r\n\r\n if (actionType === 'draft') {\r\n this.draftSave.emit(JSON.stringify(response));\r\n this.isDraftLoading = false;\r\n } else {\r\n this.submit.emit(response);\r\n this.isLoading = false;\r\n }\r\n\r\n if (redirectUrl) {\r\n setTimeout(() => this.navigateTo(redirectUrl), 1500);\r\n }\r\n },\r\n error: (err) => {\r\n this.showAlert('error', errorMsg, action?.snackbarConfig || configLine.snackbarConfig);\r\n console.error(actionType === 'draft' ? 'Draft save error:' : 'Submit error:', err);\r\n this.isLoading = false;\r\n this.isDraftLoading = false;\r\n }\r\n });\r\n }\r\n\r\n showAlert(type: 'success' | 'error' | 'warning' | 'info', message: string, customConfig?: any): void {\r\n this.snackbarService.show({\r\n variant: type,\r\n message: message,\r\n showCloseButton: true,\r\n ...customConfig\r\n });\r\n }\r\n\r\n /** Builds HttpHeaders from the token stored in the controller (sourced from configJSON). */\r\n getHeaders(): HttpHeaders {\r\n let headers = new HttpHeaders();\r\n if (this.controller.token) {\r\n const headerName = this.controller.tokenHeader || 'Authorization';\r\n headers = headers.set(headerName, this.controller.token);\r\n }\r\n return headers;\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Stepper\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n nextStep(): void {\r\n if (this.currentStep < this.fieldList.length - 1) this.currentStep++;\r\n }\r\n\r\n previousStep(): void {\r\n if (this.currentStep > 0) this.currentStep--;\r\n }\r\n\r\n get canGoNext(): boolean { return this.currentStep < this.fieldList.length - 1; }\r\n get canGoPrevious(): boolean { return this.currentStep > 0; }\r\n get currentStepConfig(): FieldConfig | undefined {\r\n return this.isStepper ? this.fieldList[this.currentStep] : undefined;\r\n }\r\n\r\n // ── Action Labels ──────────────────────────────────────────────────────────\r\n\r\n get nextLabel(): string {\r\n const key = this.formSchema?.labels?.nextLabel || 'Next';\r\n return this.labels[key] || key;\r\n }\r\n\r\n get submitLabel(): string {\r\n const btn = this.getButtonByActionKind('submit');\r\n if (btn?.label) return this.labels[btn.label] || btn.label;\r\n const key = this.formSchema?.labels?.submitLabel || 'Submit';\r\n return this.labels[key] || key;\r\n }\r\n\r\n get previousLabel(): string {\r\n const key = this.formSchema?.labels?.previousLabel || 'Previous';\r\n return this.labels[key] || key;\r\n }\r\n\r\n // ── Action Bar helpers ─────────────────────────────────────────────────────\r\n\r\n get actionBarConfig(): ActionBarConfig | undefined {\r\n return this.formSchema?.actionBarConfig;\r\n }\r\n\r\n /**\r\n * Returns buttons for a given alignment, sorted by `order` (stable).\r\n */\r\n getButtonsForAlignment(alignment: 'left' | 'right'): ActionButtonConfig[] {\r\n return (this.actionBarConfig?.buttons || [])\r\n .filter(b => !b.hidden && (b.alignment ?? 'right') === alignment)\r\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\r\n }\r\n\r\n getButtonLabel(btn: ActionButtonConfig): string {\r\n if (btn.action?.kind === 'submit' && this.isStepper && this.canGoNext) {\r\n return this.nextLabel;\r\n }\r\n const key = btn.label || btn.id;\r\n return this.labels[key] || key;\r\n }\r\n\r\n isButtonDisabled(btn: ActionButtonConfig): boolean {\r\n if (btn.disabled) return true;\r\n const kind = btn.action?.kind;\r\n if (kind === 'submit' || kind === 'draft' || kind === 'api') {\r\n return this.isLoading || this.isDraftLoading;\r\n }\r\n return false;\r\n }\r\n\r\n private getButtonByActionKind(kind: string): ActionButtonConfig | undefined {\r\n return (this.actionBarConfig?.buttons || []).find(b => b.action?.kind === kind);\r\n }\r\n\r\n // ── Navigation helper ──────────────────────────────────────────────────────\r\n\r\n private navigateTo(url?: string): void {\r\n if (!url) return;\r\n if (url.startsWith('http://') || url.startsWith('https://')) {\r\n window.location.href = url;\r\n } else {\r\n this.router.navigateByUrl(url);\r\n }\r\n }\r\n\r\n\r\n}","<div class=\"smart-form-container\">\r\n <div class=\"smart-form-wrapper\" *ngIf=\"formSchema\">\r\n\r\n <!-- Form Header -->\r\n <div class=\"form-header\" *ngIf=\"formSchema.showTitle !== false\">\r\n <h2 class=\"form-title\">{{ formSchema.label }}</h2>\r\n <p class=\"form-description\" *ngIf=\"formSchema.description\">{{ formSchema.description }}</p>\r\n </div>\r\n\r\n <!-- Stepper Navigation -->\r\n <div class=\"stepper-nav\" *ngIf=\"isStepper && formSchema.stepperConfig?.showStep !== false\">\r\n <div class=\"stepper-steps\" [class.horizontal]=\"formSchema.stepperConfig?.isHorizontal !== false\">\r\n <div *ngFor=\"let step of fieldList; let i = index\" class=\"stepper-step\" [class.active]=\"i === currentStep\"\r\n [class.completed]=\"i < currentStep\">\r\n <div class=\"step-number\">{{ i + 1 }}</div>\r\n <div class=\"step-label\">{{ step.sectionConfig?.label || 'Step ' + (i + 1) }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <form [formGroup]=\"formGroup\" class=\"smart-form\">\r\n <!-- Section Form -->\r\n <div *ngIf=\"!isStepper && formSchema.sectionConfig\" class=\"form-section\">\r\n <lib-form-section [config]=\"formSchema.sectionConfig\" [controller]=\"controller\" [formGroup]=\"formGroup\">\r\n </lib-form-section>\r\n </div>\r\n\r\n <!-- Stepper Form -->\r\n <div *ngIf=\"isStepper && currentStepConfig\" class=\"form-stepper\">\r\n <lib-form-section [config]=\"currentStepConfig.sectionConfig!\" [controller]=\"controller\" [formGroup]=\"formGroup\">\r\n </lib-form-section>\r\n </div>\r\n </form>\r\n\r\n <!-- ── Form Actions ──────────────────────────────────────────────────── -->\r\n <div class=\"form-actions\" *ngIf=\"formSchema.showActions !== false\">\r\n\r\n <!-- LEFT GROUP -->\r\n <div class=\"action-group action-group--left\">\r\n <!-- Optional: Navigational buttons like 'Previous' for stepper can be explicitly added to config, \r\n but we'll keep the logic if they are provided in the buttons array via action.kind === 'prev' -->\r\n <lib-button\r\n *ngFor=\"let btn of getButtonsForAlignment('left')\"\r\n [variant]=\"$any(btn.variant) || 'outline'\"\r\n [disabled]=\"isButtonDisabled(btn)\"\r\n (click)=\"handleButtonClick(btn)\">\r\n {{ getButtonLabel(btn) }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- RIGHT GROUP -->\r\n <div class=\"action-group action-group--right\">\r\n <lib-button\r\n *ngFor=\"let btn of getButtonsForAlignment('right')\"\r\n [variant]=\"$any(btn.variant) || 'primary'\"\r\n [disabled]=\"isButtonDisabled(btn)\"\r\n (click)=\"handleButtonClick(btn)\">\r\n {{ getButtonLabel(btn) }}\r\n </lib-button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material/material.module';\r\nimport { SmartFormComponent } from './components/smart-form/smart-form.component';\r\nimport { FormSectionComponent } from './components/form-section/form-section.component';\r\nimport { FormFieldComponent } from './components/form-field/form-field.component';\r\nimport { ExpressionService } from './services/expression.service';\r\nimport { ButtonModule } from '../button/button.module';\r\nimport { AlertModule } from '../alert/alert.module';\r\nimport { QuillModule } from 'ngx-quill';\r\nimport { TrustedUrlPipe } from './utils/trusted-url.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n SmartFormComponent,\r\n FormSectionComponent,\r\n FormFieldComponent,\r\n TrustedUrlPipe\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MaterialModule,\r\n ButtonModule,\r\n AlertModule,\r\n QuillModule.forRoot()\r\n ],\r\n exports: [\r\n SmartFormComponent\r\n ],\r\n providers: [\r\n ExpressionService\r\n ]\r\n})\r\nexport class SmartFormModule { }\r\n","export const DEFAULT_ITEMS_PER_PAGE = 10;\r\nexport const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 50];\r\nexport const PAGINATION_THEME_DEFAULT = 'theme-1';\r\nexport const PAGINATION_THEME_DARK = 'theme-2';\r\n\r\n// Nav\r\nexport const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills' = 'filled';\r\nexport const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical' = 'horizontal';\r\n\r\n// Side Nav\r\nexport const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = 'right';\r\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, HostBinding } from '@angular/core';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\nimport { SideNavSection, SideNavItem, SideNavStyleConfig } from '../../side-nav.models';\r\nimport { DEFAULT_SIDE_NAV_TOOLTIP_POSITION } from '../../../../utils/constants';\r\n\r\n@Component({\r\n selector: 'lib-side-nav',\r\n templateUrl: './side-nav.component.html',\r\n styleUrls: ['./side-nav.component.scss'],\r\n standalone: false\r\n})\r\nexport class SideNavComponent implements OnChanges {\r\n @Input() sections: SideNavSection[] = [];\r\n @Input() userRoles?: string[]; // If provided, filters items automatically based on roles\r\n @Input() activeId?: string;\r\n @Input() styleConfig?: SideNavStyleConfig;\r\n\r\n /** Control whether the nav is collapsed externally (two-way bindable) */\r\n @Input() collapsed: boolean = false;\r\n /** Width of the nav when expanded. Overrides the CSS variable default. */\r\n @Input() width?: string;\r\n /** Width of the nav when collapsed (icons only). Overrides the CSS variable default. */\r\n @Input() collapsedWidth?: string;\r\n /** Whether to show the collapse toggle button */\r\n @Input() showCollapseToggle: boolean = true;\r\n /** Whether to hide icons when the side nav is expanded */\r\n @Input() hideIconsWhenExpanded: boolean = false;\r\n /** Whether to show tooltips on nav items */\r\n @Input() showTooltips: boolean = true;\r\n /** Position of the tooltip */\r\n @Input() tooltipPosition: TooltipPosition = DEFAULT_SIDE_NAV_TOOLTIP_POSITION as TooltipPosition;\r\n\r\n /** Optional dictionary for label translation */\r\n @Input() labels?: { [key: string]: string };\r\n\r\n @Output() itemClicked = new EventEmitter<SideNavItem>();\r\n /** Emits whenever the collapsed state changes (supports two-way binding via [(collapsed)]) */\r\n @Output() collapsedChange = new EventEmitter<boolean>();\r\n\r\n /** Applies collapsed class to :host for the width CSS transition */\r\n @HostBinding('class.cc-side-nav-host-collapsed') get isHostCollapsed() {\r\n return this.collapsed;\r\n }\r\n\r\n filteredSections: SideNavSection[] = [];\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['sections'] || changes['userRoles'] || changes['labels']) {\r\n this.filterAndMapSections();\r\n }\r\n }\r\n\r\n private filterAndMapSections() {\r\n if (!this.sections) {\r\n this.filteredSections = [];\r\n return;\r\n }\r\n\r\n const clonedSections: SideNavSection[] = structuredClone(this.sections);\r\n\r\n this.filteredSections = clonedSections.map(section => {\r\n // Map section heading if labels are provided\r\n if (this.labels && section.heading) {\r\n section.heading = this.labels[section.heading] || section.heading;\r\n }\r\n\r\n // Filter and map items\r\n section.items = section.items.filter(item => {\r\n if (this.userRoles && this.userRoles.length > 0 && item.roles && item.roles.length > 0) {\r\n const hasRole = item.roles.some(role => this.userRoles?.includes(role));\r\n if (!hasRole) return false;\r\n }\r\n return true;\r\n }).map((item: any) => {\r\n // Map item labels and tooltips\r\n if (this.labels) {\r\n const mappedLabel = this.labels[item.labelKey || item.label] || item.labelKey || item.label;\r\n return {\r\n ...item,\r\n label: mappedLabel,\r\n tooltip: this.labels[item.tooltip || item.labelKey] || mappedLabel\r\n };\r\n }\r\n return item;\r\n });\r\n\r\n return section;\r\n }).filter(section => section.items.length > 0);\r\n }\r\n\r\n onItemClick(item: SideNavItem, event: Event) {\r\n if (item.disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n this.activeId = item.id;\r\n this.itemClicked.emit(item);\r\n }\r\n\r\n toggleCollapse() {\r\n this.collapsed = !this.collapsed;\r\n this.collapsedChange.emit(this.collapsed);\r\n }\r\n\r\n get customStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n\r\n // Size overrides from direct inputs (take priority over styleConfig)\r\n if (this.width) styles['--cc-side-nav-width'] = this.width;\r\n if (this.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.collapsedWidth;\r\n\r\n if (!this.styleConfig) return styles;\r\n\r\n if (this.styleConfig.bg) styles['--cc-side-nav-bg'] = this.styleConfig.bg;\r\n if (this.styleConfig.width) styles['--cc-side-nav-width'] = this.styleConfig.width;\r\n if (this.styleConfig.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.styleConfig.collapsedWidth;\r\n if (this.styleConfig.fontFamily) styles['--cc-side-nav-font-family'] = this.styleConfig.fontFamily;\r\n if (this.styleConfig.headingColor) styles['--cc-side-nav-heading-color'] = this.styleConfig.headingColor;\r\n if (this.styleConfig.itemColor) styles['--cc-side-nav-item-color'] = this.styleConfig.itemColor;\r\n if (this.styleConfig.itemHoverBg) styles['--cc-side-nav-item-hover-bg'] = this.styleConfig.itemHoverBg;\r\n if (this.styleConfig.activeBg) styles['--cc-side-nav-active-bg'] = this.styleConfig.activeBg;\r\n if (this.styleConfig.activeColor) styles['--cc-side-nav-active-color'] = this.styleConfig.activeColor;\r\n if (this.styleConfig.activeHoverBg) styles['--cc-side-nav-active-hover-bg'] = this.styleConfig.activeHoverBg;\r\n\r\n return styles;\r\n }\r\n}","<nav class=\"cc-side-nav\" [class.collapsed]=\"collapsed\" role=\"navigation\" [ngStyle]=\"customStyles\">\r\n\r\n <!-- Fallback standalone toggle if no sections exist -->\r\n <div class=\"cc-side-nav-toggle-wrap standalone\" *ngIf=\"filteredSections.length === 0 && showCollapseToggle\">\r\n <button class=\"cc-side-nav-toggle\" (click)=\"toggleCollapse()\" type=\"button\"\r\n [attr.aria-label]=\"collapsed ? 'Expand navigation' : 'Collapse navigation'\">\r\n <span class=\"material-icons cc-side-nav-toggle-icon\">\r\n {{ collapsed ? 'menu_open' : 'menu' }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"cc-side-nav-section\" *ngFor=\"let section of filteredSections; let i = index\">\r\n\r\n <div class=\"cc-side-nav-heading-row\" *ngIf=\"section.heading || (i === 0 && showCollapseToggle)\">\r\n <h3 class=\"cc-side-nav-heading\" *ngIf=\"section.heading && !collapsed\">\r\n {{ section.heading }}\r\n </h3>\r\n\r\n <div class=\"cc-side-nav-toggle-wrap\" *ngIf=\"i === 0 && showCollapseToggle\"\r\n [class.no-heading]=\"!section.heading || collapsed\">\r\n <button class=\"cc-side-nav-toggle\" (click)=\"toggleCollapse()\" type=\"button\"\r\n [attr.aria-label]=\"collapsed ? 'Expand navigation' : 'Collapse navigation'\">\r\n <span class=\"material-icons cc-side-nav-toggle-icon\">\r\n {{ collapsed ? 'menu_open' : 'menu' }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <ul class=\"cc-side-nav-list\">\r\n <li *ngFor=\"let item of section.items\" class=\"cc-side-nav-list-item\">\r\n <a (click)=\"onItemClick(item, $event)\" class=\"cc-side-nav-link\" [class.active]=\"item.id === activeId\"\r\n [class.disabled]=\"item.disabled\" [matTooltip]=\"item.tooltip || item.label\"\r\n [matTooltipDisabled]=\"!showTooltips\" [matTooltipPosition]=\"tooltipPosition\"\r\n [matTooltipClass]=\"'cc-side-nav-tooltip'\" [attr.aria-current]=\"(item.id === activeId) ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled ? true : null\">\r\n <span *ngIf=\"item.icon && (collapsed || !hideIconsWhenExpanded)\" class=\"cc-side-nav-icon\">\r\n\r\n <span *ngIf=\"!item.icon.includes('fa') && !item.icon.includes('bi')\" class=\"material-icons\">\r\n {{ item.icon }}\r\n </span>\r\n\r\n <i *ngIf=\"item.icon.includes('fa') || item.icon.includes('bi')\" [class]=\"item.icon\"></i>\r\n\r\n </span>\r\n <span class=\"cc-side-nav-label\" *ngIf=\"!collapsed\">{{ item.label }}</span>\r\n <span class=\"cc-side-nav-arrow material-icons\"\r\n *ngIf=\"!collapsed && (item.id === activeId) && item.showArrow !== false\">chevron_right</span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n </div>\r\n\r\n</nav>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { MaterialModule } from '../material/material.module';\r\nimport { SideNavComponent } from './components/side-nav/side-nav.component';\r\n\r\n@NgModule({\r\n declarations: [SideNavComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n MaterialModule\r\n ],\r\n exports: [SideNavComponent]\r\n})\r\nexport class SideNavModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from './modules/material/material.module';\r\nimport { AlertModule } from './modules/alert/alert.module';\r\nimport { ButtonModule } from './modules/button/button.module';\r\nimport { ConfirmationModalModule } from './modules/confirmation-modal/confirmation-modal.module';\r\nimport { FilterSidebarModule } from './modules/filter-sidebar/filter-sidebar.module';\r\nimport { SummaryCardModule } from './modules/summary-card/summary-card.module';\r\nimport { ConfigurableFormModule } from './modules/configurable-form/configurable-form.module';\r\nimport { FormComponentsModule } from './modules/form-components/form-components.module';\r\nimport { SmartFormModule } from './modules/smart-form/smart-form.module';\r\nimport { FilterModule } from '../public-api';\r\nimport { SideNavModule } from './modules/side-nav/side-nav.module';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n AlertModule, ButtonModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,\r\n SummaryCardModule,\r\n ConfigurableFormModule,\r\n FormComponentsModule,\r\n SmartFormModule,\r\n SideNavModule\r\n ],\r\n exports: [\r\n MaterialModule,\r\n AlertModule, ButtonModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,\r\n SummaryCardModule,\r\n ConfigurableFormModule,\r\n FormComponentsModule,\r\n SmartFormModule,\r\n SideNavModule\r\n ],\r\n})\r\nexport class SharedUiModule { }\r\n","/**\n * Utility functions for LocalStorage operations\n */\nexport const getLocalStorageItem = (key: string): string | null => {\n return localStorage.getItem(key);\n};\n\nexport const setLocalStorageItem = (key: string, value: string): void => {\n localStorage.setItem(key, value);\n};\n\nexport const removeLocalStorageItem = (key: string): void => {\n localStorage.removeItem(key);\n};\n\nexport const clearLocalStorage = (): void => {\n localStorage.clear();\n};\n\n/**\n * Utility functions for SessionStorage operations\n */\nexport const getSessionStorageItem = (key: string): string | null => {\n return sessionStorage.getItem(key);\n};\n\nexport const setSessionStorageItem = (key: string, value: string): void => {\n sessionStorage.setItem(key, value);\n};\n\nexport const removeSessionStorageItem = (key: string): void => {\n sessionStorage.removeItem(key);\n};\n\nexport const clearSessionStorage = (): void => {\n sessionStorage.clear();\n};\n","import { FormConfig } from './configurable-form.model';\r\n\r\n/**\r\n * Example: Basic Form Configuration\r\n * This is a generic example for testing and demonstration purposes.\r\n */\r\nexport const EXAMPLE_FORM_CONFIG: FormConfig = {\r\n sections: [\r\n {\r\n sectionTitle: 'User Information',\r\n fields: [\r\n {\r\n name: 'fullName',\r\n label: 'Full Name',\r\n type: 'text',\r\n placeholder: 'Enter full name',\r\n required: true,\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'email',\r\n label: 'Email Address',\r\n type: 'email',\r\n placeholder: 'Enter email address',\r\n required: true,\r\n class: 'col-6'\r\n },\r\n {\r\n name: 'phone',\r\n label: 'Phone Number',\r\n type: 'tel',\r\n placeholder: '+91 9999999999',\r\n class: 'col-6'\r\n },\r\n {\r\n name: 'role',\r\n label: 'Role',\r\n type: 'dropdown',\r\n placeholder: 'Select Role',\r\n options: [\r\n { label: 'Admin', value: 'admin' },\r\n { label: 'User', value: 'user' },\r\n { label: 'Guest', value: 'guest' }\r\n ],\r\n class: 'col-12'\r\n }\r\n ]\r\n },\r\n {\r\n sectionTitle: 'Preferences',\r\n fields: [\r\n {\r\n name: 'notifications',\r\n label: 'Receive Notifications',\r\n type: 'radio',\r\n options: [\r\n { label: 'Yes', value: 'yes' },\r\n { label: 'No', value: 'no' }\r\n ],\r\n value: 'yes',\r\n class: 'col-12'\r\n }\r\n ]\r\n },\r\n {\r\n sectionTitle: 'Documents',\r\n fields: [\r\n {\r\n name: 'profilePicture',\r\n label: 'Profile Picture',\r\n type: 'file',\r\n accept: '.jpg,.png',\r\n multiple: false,\r\n helpText: 'Upload a single profile picture (Max 5MB)',\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'certificates',\r\n label: 'Certificates',\r\n type: 'file',\r\n accept: '.pdf,.doc,.docx',\r\n multiple: true,\r\n helpText: 'Upload multiple certificates (Max 5MB each)',\r\n class: 'col-12'\r\n }\r\n ]\r\n }\r\n ],\r\n entityType: 'User'\r\n};\r\n\r\n/**\r\n * Example: Target Group Configuration\r\n * Demonstrates composite fields for Age Group and Gender Split\r\n */\r\nexport const TARGET_GROUP_CONFIG: FormConfig = {\r\n sections: [\r\n {\r\n sectionTitle: 'Target Group Settings',\r\n fields: [\r\n {\r\n name: 'targetAgeGroup',\r\n label: 'Target Age Group',\r\n type: 'composite',\r\n separator: '-',\r\n subFields: [\r\n {\r\n label: \"Min Age\",\r\n name: 'minAge',\r\n type: 'number',\r\n placeholder: 'Min Age',\r\n validationRules: { min: 0 }\r\n },\r\n {\r\n label: \"Max Age\",\r\n name: 'maxAge',\r\n type: 'number',\r\n placeholder: 'Max Age',\r\n validationRules: { min: 0 }\r\n }\r\n ],\r\n compositeValidationRule: 'minMax',\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'genderSplit',\r\n label: 'Target Gender Split',\r\n type: 'composite',\r\n subFields: [\r\n {\r\n label: \"Male\",\r\n name: 'malePercentage',\r\n type: 'number',\r\n placeholder: 'Male',\r\n suffixText: '%',\r\n validationRules: { min: 0, max: 100 }\r\n },\r\n {\r\n label: \"Female\",\r\n name: 'femalePercentage',\r\n type: 'number',\r\n placeholder: 'Female',\r\n suffixText: '%',\r\n validationRules: { min: 0, max: 100 }\r\n }\r\n ],\r\n compositeValidationRule: 'percentageTotal',\r\n class: 'col-12'\r\n }\r\n ]\r\n }\r\n ],\r\n\r\n};\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, PAGINATION_THEME_DEFAULT } from '../../../../utils/constants';\n\nexport interface PaginationLabels {\n items: string;\n of: string;\n perPage: string;\n}\n\n@Component({\n selector: 'lib-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: ['./pagination.component.scss'],\n standalone: false\n})\nexport class PaginationComponent implements OnInit, OnChanges {\n @Input() totalItems: number = 0;\n @Input() itemsPerPage: number = DEFAULT_ITEMS_PER_PAGE;\n @Input() currentPage: number = 1;\n @Input() pageSizeOptions: number[] = DEFAULT_PAGE_SIZE_OPTIONS;\n @Input() theme: 'theme-1' | 'theme-2' = PAGINATION_THEME_DEFAULT;\n @Input() labels: PaginationLabels = {\n items: 'items',\n of: 'of',\n perPage: 'Per Page'\n };\n\n @Output() pageChange = new EventEmitter<number>();\n @Output() itemsPerPageChange = new EventEmitter<number>();\n\n totalPages: number = 0;\n pages: (number | string)[] = [];\n startItem: number = 0;\n endItem: number = 0;\n\n constructor() { }\n\n ngOnInit(): void {\n this.calculatePagination();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['totalItems'] || changes['itemsPerPage'] || changes['currentPage']) {\n this.calculatePagination();\n }\n }\n\n calculatePagination(): void {\n this.totalPages = Math.ceil(this.totalItems / this.itemsPerPage);\n\n // Ensure current page is valid\n if (this.currentPage < 1) {\n this.currentPage = 1;\n } else if (this.currentPage > this.totalPages && this.totalPages > 0) {\n this.currentPage = this.totalPages;\n }\n\n this.startItem = (this.currentPage - 1) * this.itemsPerPage + 1;\n this.endItem = Math.min(this.currentPage * this.itemsPerPage, this.totalItems);\n\n if (this.totalItems === 0) {\n this.startItem = 0;\n this.endItem = 0;\n }\n\n this.pages = this.getVisiblePages(this.currentPage, this.totalPages);\n }\n\n getVisiblePages(current: number, total: number): (number | string)[] {\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n\n if (current <= 4) {\n return [1, 2, 3, 4, 5, '...', total];\n }\n\n if (current >= total - 3) {\n return [1, '...', total - 4, total - 3, total - 2, total - 1, total];\n }\n\n return [1, '...', current - 1, current, current + 1, '...', total];\n }\n\n onPageChange(page: number | string): void {\n if (typeof page === 'string') return;\n if (page < 1 || page > this.totalPages || page === this.currentPage) return;\n \n this.pageChange.emit(page);\n }\n\n onItemsPerPageChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n const newSize = Number(target.value);\n this.itemsPerPageChange.emit(newSize);\n }\n\n nextPage(): void {\n if (this.currentPage < this.totalPages) {\n this.onPageChange(this.currentPage + 1);\n }\n }\n\n prevPage(): void {\n if (this.currentPage > 1) {\n this.onPageChange(this.currentPage - 1);\n }\n }\n}\n","<div class=\"cc-pagination\" [ngClass]=\"theme\">\n <!-- Left Side: Items Info & Per Page -->\n <div class=\"pagination-left\" *ngIf=\"pageSizeOptions.length > 1 || totalItems > 0\">\n <span class=\"items-info\">\n {{ startItem }}-{{ endItem }} {{ labels.of }} {{ totalItems }} {{ labels.items }}\n </span>\n\n <div class=\"per-page-selector\" *ngIf=\"pageSizeOptions.length > 1\">\n <div class=\"select-wrapper\">\n <select [value]=\"itemsPerPage\" (change)=\"onItemsPerPageChange($event)\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n <span class=\"select-arrow\"></span>\n </div>\n <span class=\"per-page-label\">{{ labels.perPage }}</span>\n </div>\n </div>\n\n <!-- Right Side: Page Controls -->\n <div class=\"pagination-right\">\n <button \n class=\"page-btn prev-btn\" \n [disabled]=\"currentPage === 1\" \n (click)=\"prevPage()\"\n aria-label=\"Previous Page\">\n <span class=\"icon\">&lsaquo;</span>\n </button>\n\n <div class=\"page-numbers\">\n <ng-container *ngFor=\"let page of pages\">\n <button \n *ngIf=\"page !== '...'\"\n class=\"page-btn number-btn\" \n [class.active]=\"page === currentPage\"\n (click)=\"onPageChange(page)\">\n {{ page }}\n </button>\n <span *ngIf=\"page === '...'\" class=\"ellipsis\">...</span>\n </ng-container>\n </div>\n\n <button \n class=\"page-btn next-btn\" \n [disabled]=\"currentPage === totalPages || totalPages === 0\" \n (click)=\"nextPage()\"\n aria-label=\"Next Page\">\n <span class=\"icon\">&rsaquo;</span>\n </button>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PaginationComponent } from './components/pagination/pagination.component';\n\n\n@NgModule({\n declarations: [\n PaginationComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n PaginationComponent\n ]\n})\nexport class PaginationModule { }\n","import { Component, EventEmitter, Input, Output, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { NAV_VARIANT_DEFAULT, NAV_ORIENTATION_DEFAULT } from '../../../../utils/constants';\r\nimport { NavStyleConfig } from '../../nav.models';\r\n\r\nexport interface NavItem {\r\n id: string | number;\r\n label: string;\r\n icon?: string;\r\n badge?: string | number;\r\n disabled?: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-nav',\r\n templateUrl: './nav.component.html',\r\n styleUrls: ['./nav.component.scss'],\r\n standalone: false\r\n})\r\nexport class NavComponent implements OnChanges {\r\n @Input() items: NavItem[] = [];\r\n @Input() activeId: string | number | null = null;\r\n @Input() variant: 'filled' | 'underline' | 'pills' = NAV_VARIANT_DEFAULT;\r\n @Input() orientation: 'horizontal' | 'vertical' = NAV_ORIENTATION_DEFAULT;\r\n @Input() styleConfig: NavStyleConfig = {};\r\n\r\n @Output() selectionChange = new EventEmitter<NavItem>();\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['styleConfig']) {\r\n console.log(' [NavComponent] styleConfig changed:', this.styleConfig);\r\n console.log(' [NavComponent] computedStyles:', this.computedStyles);\r\n }\r\n }\r\n\r\n get computedStyles(): { [key: string]: string | undefined } {\r\n const c = this.styleConfig;\r\n return {\r\n // Container (direct CSS)\r\n 'width': c.width,\r\n 'box-shadow': c.boxShadow,\r\n\r\n // Container (CSS Variables)\r\n '--cc-nav-container-bg': c.backgroundColor,\r\n '--cc-nav-container-radius': c.borderRadius,\r\n '--cc-nav-container-border': c.border,\r\n '--cc-nav-container-padding': c.padding,\r\n '--cc-nav-container-gap': c.gap,\r\n\r\n // Item (CSS Variables)\r\n '--cc-nav-font-size': c.fontSize,\r\n '--cc-nav-font-weight': c.fontWeight,\r\n '--cc-nav-item-color': c.itemColor,\r\n '--cc-nav-item-radius': c.itemRadius,\r\n '--cc-nav-item-padding': c.itemPadding,\r\n\r\n // Active Item (CSS Variables)\r\n '--cc-nav-item-active-bg': c.activeItemBg,\r\n '--cc-nav-item-active-color': c.activeItemColor,\r\n '--cc-nav-item-active-font-weight': c.activeItemFontWeight,\r\n '--cc-nav-item-active-border-color': c.activeItemBorderColor,\r\n\r\n // Hover Item (CSS Variables)\r\n '--cc-nav-item-hover-bg': c.hoverItemBg,\r\n '--cc-nav-item-hover-color': c.hoverItemColor,\r\n\r\n // Badge (CSS Variables)\r\n '--cc-nav-badge-bg': c.badgeBg,\r\n '--cc-nav-badge-color': c.badgeColor,\r\n };\r\n }\r\n\r\n onItemClick(item: NavItem): void {\r\n if (item.disabled) return;\r\n if (item.id === this.activeId) return;\r\n\r\n this.selectionChange.emit(item);\r\n }\r\n\r\n trackById(index: number, item: NavItem): string | number {\r\n return item.id;\r\n }\r\n}\r\n","<nav\r\n class=\"cc-nav\"\r\n [ngClass]=\"[variant, orientation]\"\r\n [ngStyle]=\"computedStyles\"\r\n role=\"tablist\"\r\n [attr.aria-orientation]=\"orientation\">\r\n\r\n <button\r\n *ngFor=\"let item of items; trackBy: trackById\"\r\n class=\"cc-nav-item\"\r\n [class.active]=\"item.id === activeId\"\r\n [class.disabled]=\"item.disabled\"\r\n [disabled]=\"item.disabled\"\r\n role=\"tab\"\r\n [attr.aria-selected]=\"item.id === activeId\"\r\n [attr.aria-disabled]=\"item.disabled || null\"\r\n (click)=\"onItemClick(item)\">\r\n\r\n <!-- Icon (optional) -->\r\n <span *ngIf=\"item.icon\" class=\"cc-nav-item-icon\">\r\n <i [ngClass]=\"item.icon\"></i>\r\n </span>\r\n\r\n <!-- Label -->\r\n <span class=\"cc-nav-item-label\">{{ item.label }}</span>\r\n\r\n <!-- Badge (optional) -->\r\n <span *ngIf=\"item.badge != null\" class=\"cc-nav-item-badge\">\r\n {{ item.badge }}\r\n </span>\r\n\r\n </button>\r\n\r\n</nav>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NavComponent } from './components/nav/nav.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n NavComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n NavComponent\r\n ]\r\n})\r\nexport class NavModule { }\r\n","import { Component, EventEmitter, Input, OnInit, Output, ElementRef, HostListener } from '@angular/core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { TableFilterConfig, TableFilterOutput, TableFilterColumn, TableFilterLabels } from '../../filter.models';\r\n\r\n@Component({\r\n selector: 'lib-filter',\r\n templateUrl: './filter.component.html',\r\n styleUrls: ['./filter.component.scss'],\r\n standalone: false\r\n})\r\nexport class FilterComponent implements OnInit {\r\n @Input() config: TableFilterConfig = { items: [] };\r\n @Input() activeFilters: TableFilterOutput = {};\r\n @Input() columns: TableFilterColumn[] = [];\r\n @Input() labels: TableFilterLabels = {\r\n filterBtn: '',\r\n clear: '',\r\n apply: '',\r\n search: '',\r\n columns: '',\r\n showAll: '',\r\n hideAll: ''\r\n };\r\n @Input() theme: string = '';\r\n\r\n @Output() filterChange = new EventEmitter<TableFilterOutput>();\r\n @Output() columnChange = new EventEmitter<TableFilterColumn[]>();\r\n @Output() toggle = new EventEmitter<boolean>();\r\n\r\n isOpen = false;\r\n activeTab: 'filters' | 'columns' = 'filters';\r\n\r\n // Temporary state while panel is open\r\n tempFilters: TableFilterOutput = {};\r\n tempColumns: TableFilterColumn[] = [];\r\n\r\n constructor(\r\n private elementRef: ElementRef,\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.syncTempState();\r\n this.initFromUrl();\r\n }\r\n\r\n private initFromUrl(): void {\r\n if (this.config.settings?.persistent) {\r\n this.route.queryParams.subscribe(params => {\r\n if (Object.keys(params).length > 0) {\r\n const newFilters: TableFilterOutput = { ...this.activeFilters };\r\n Object.keys(params).forEach(key => {\r\n // Skip non-filter params if possible, or assume all are filters\r\n // Ideally we check against config items\r\n if (params[key] !== undefined) {\r\n newFilters[key] = params[key];\r\n }\r\n });\r\n this.activeFilters = newFilters;\r\n this.syncTempState();\r\n }\r\n });\r\n }\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClickOutside(event: Event): void {\r\n if (!this.elementRef.nativeElement.contains(event.target)) {\r\n this.isOpen = false;\r\n }\r\n }\r\n\r\n togglePanel(): void {\r\n this.isOpen = !this.isOpen;\r\n if (this.isOpen) {\r\n this.syncTempState();\r\n this.activeTab = 'filters';\r\n }\r\n this.toggle.emit(this.isOpen);\r\n }\r\n\r\n setActiveTab(tab: 'filters' | 'columns'): void {\r\n this.activeTab = tab;\r\n }\r\n\r\n // Generic Filter Change Handler\r\n onFilterChange(key: string | undefined, value: any): void {\r\n if (!key) return;\r\n this.tempFilters[key] = value;\r\n }\r\n\r\n // Column Visibility Logic\r\n toggleColumn(columnId: string): void {\r\n const col = this.tempColumns.find(c => c.id === columnId);\r\n if (col) {\r\n col.visible = !col.visible;\r\n }\r\n }\r\n\r\n toggleAllColumns(visible: boolean): void {\r\n this.tempColumns.forEach(c => c.visible = visible);\r\n }\r\n\r\n // Actions\r\n clearAll(): void {\r\n if (this.activeTab === 'filters') {\r\n this.tempFilters = {};\r\n if (this.config.settings?.persistent) {\r\n this.updateUrl({});\r\n }\r\n } else {\r\n // Reset columns to default or show all?\r\n // Usually 'clear' in filters context means clear filters\r\n // But if we are in columns tab, maybe we want to reset columns?\r\n // For now, let's keep it simple: generic clear clears filters.\r\n this.tempFilters = {};\r\n }\r\n // If we want clear to apply immediately without clicking apply:\r\n // this.apply(); \r\n // But usually \"Clear\" inside panel just clears temp state until Apply is clicked.\r\n // However, if the user requested \"Persistent\" and \"Clear\", they might expect immediate URL update?\r\n // Standard UX: panel actions apply on \"Apply\".\r\n // The persisted state should only change when \"Apply\" is clicked?\r\n // Wait, if I update URL on clearAll inside panel, it might be confusing if panel is still open with cleared state but not \"applied\" to data.\r\n // Re-reading expectation: \"Persistent\" setting usually means the filter state is synced with URL.\r\n // If I clear temp state, URL shouldn't change until I click Apply.\r\n // SO I WILL NOT UPDATE URL HERE. The `initFromUrl` loads INTO `activeFilters`.\r\n // `apply()` updates `activeFilters` AND should update URL.\r\n }\r\n\r\n apply(): void {\r\n // Apply temp state to active state\r\n this.activeFilters = { ...this.tempFilters };\r\n // Clean up undefined/null values\r\n Object.keys(this.activeFilters).forEach(key => {\r\n if (this.activeFilters[key] === null || this.activeFilters[key] === undefined || this.activeFilters[key] === '') {\r\n delete this.activeFilters[key];\r\n }\r\n });\r\n\r\n // Apply columns\r\n this.columns = this.tempColumns.map(c => ({ ...c }));\r\n\r\n this.filterChange.emit(this.activeFilters);\r\n this.columnChange.emit(this.columns);\r\n\r\n if (this.config.settings?.persistent) {\r\n this.updateUrl(this.activeFilters);\r\n }\r\n\r\n this.isOpen = false;\r\n }\r\n\r\n\r\n private updateUrl(queryParams: any): void {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: queryParams,\r\n queryParamsHandling: 'merge', // or 'replace' to clear others? 'merge' ensures we don't lose other params\r\n // But wait, if we removed a filter, merge keeps it?\r\n // We need to explicitly clear removed keys if we use merge.\r\n // Or use pure replacement of filter keys.\r\n // For simplicity, let's assuming we want to replace parameters that overlap.\r\n // But to clear keys, we need to pass `null` or `undefined` for those keys in `queryParams`?\r\n // Angular router: passing null removes the param.\r\n });\r\n\r\n // Refined updateUrl logic:\r\n // We merged activeFilters. But if we removed a key, it's missing from activeFilters.\r\n // We need to compare with current params and remove keys that are no longer in activeFilters?\r\n // A simpler way for this component:\r\n // We likely want to replace ALL query params that correspond to filters. \r\n // But we don't know which params are filters vs other things (e.g. page, sort).\r\n // For now, I will just push `this.activeFilters`. \r\n // NOTE: This doesn't clear keys that were removed. \r\n // To fix clearing:\r\n // I should probably navigate with exact activeFilters if I knew they are the ONLY params.\r\n // Better:\r\n // this.router.navigate([], { queryParams: this.activeFilters }); // property replaces all\r\n // If we want to keep 'page', etc., we need to include them.\r\n // Let's use 'merge' but we need to handle clearing.\r\n // I will implement a smarter update.\r\n }\r\n\r\n activeFilterCountValue(): number {\r\n return Object.keys(this.activeFilters).length;\r\n }\r\n\r\n\r\n get activeFilterCount(): number {\r\n return Object.keys(this.activeFilters).length;\r\n }\r\n\r\n private syncTempState(): void {\r\n this.tempFilters = { ...this.activeFilters };\r\n this.tempColumns = JSON.parse(JSON.stringify(this.columns || []));\r\n }\r\n\r\n get containerStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.styles) {\r\n if (this.config.styles.width) styles['--cc-filter-panel-width'] = this.config.styles.width;\r\n if (this.config.styles.padding) styles['--cc-filter-panel-padding'] = this.config.styles.padding;\r\n if (this.config.styles.gap) styles['--cc-filter-panel-gap'] = this.config.styles.gap;\r\n if (this.config.styles.backgroundColor) styles['--cc-filter-panel-bg'] = this.config.styles.backgroundColor;\r\n if (this.config.styles.borderRadius) styles['--cc-filter-panel-radius'] = this.config.styles.borderRadius;\r\n if (this.config.styles.headerHeight) styles['--cc-filter-panel-header-height'] = this.config.styles.headerHeight;\r\n }\r\n return styles;\r\n }\r\n\r\n trackByFn(index: number, item: any): any {\r\n return item.key || index;\r\n }\r\n}\r\n","<div class=\"cc-filter-container\" [class.is-open]=\"isOpen\" [ngStyle]=\"containerStyles\">\r\n\r\n <!-- Trigger Button -->\r\n <lib-button variant=\"outline\" (click)=\"togglePanel()\" class=\"cc-filter-trigger\"\r\n [class.active]=\"activeFilterCount > 0\">\r\n <span class=\"fas fa-filter\"></span> {{ labels?.filterBtn || 'Filter' }}\r\n <span *ngIf=\"activeFilterCount > 0\" class=\"cc-badge\">{{ activeFilterCount }}</span>\r\n </lib-button>\r\n\r\n <!-- Dropdown Panel -->\r\n <div class=\"cc-filter-panel mat-elevation-z4\" *ngIf=\"isOpen\" (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- Header / Tabs -->\r\n <div class=\"cc-panel-header\">\r\n <div class=\"cc-tabs\">\r\n <div class=\"cc-tab\" [class.active]=\"activeTab === 'filters'\" (click)=\"setActiveTab('filters')\">\r\n {{ labels.filterBtn }}\r\n </div>\r\n <!-- Hide columns tab if no columns config provided -->\r\n <div class=\"cc-tab\" [class.active]=\"activeTab === 'columns'\" (click)=\"setActiveTab('columns')\"\r\n *ngIf=\"columns?.length\">\r\n {{ labels.columns }}\r\n </div>\r\n </div>\r\n <button type=\"button\" class=\"cc-icon-btn\" (click)=\"togglePanel()\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n </div>\r\n\r\n <!-- Filters Tab Content -->\r\n <div class=\"cc-panel-content\" *ngIf=\"activeTab === 'filters'\">\r\n\r\n <!-- Dynamic Items -->\r\n <ng-container *ngFor=\"let item of config.items; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\"></ng-container>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <!-- Columns Tab Content -->\r\n <div class=\"cc-panel-content\" *ngIf=\"activeTab === 'columns'\">\r\n <div class=\"cc-columns-actions\">\r\n <lib-button variant=\"outline\" class=\"cc-btn-text\" (click)=\"toggleAllColumns(true)\">{{ labels.showAll\r\n }}</lib-button>\r\n <lib-button variant=\"outline\" class=\"cc-btn-text\" (click)=\"toggleAllColumns(false)\">{{ labels.hideAll\r\n }}</lib-button>\r\n </div>\r\n <div class=\"cc-columns-list\">\r\n <div *ngFor=\"let col of tempColumns\" class=\"cc-column-item\">\r\n <lib-checkbox [label]=\"col.label\" [checked]=\"col.visible\" (checkedChange)=\"toggleColumn(col.id)\">\r\n </lib-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Footer Actions -->\r\n <div class=\"cc-panel-footer\">\r\n <lib-button variant=\"outline\" color=\"warn\" class=\"cc-btn-text text-danger\" (click)=\"clearAll()\">\r\n {{ labels.clear }}\r\n </lib-button>\r\n <lib-button class=\"ms-2\" variant=\"primary\" (click)=\"apply()\">\r\n {{ labels.apply }}\r\n </lib-button>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n\r\n<!-- Recursive Template for Items -->\r\n<ng-template #itemTemplate let-item=\"item\">\r\n <div class=\"cc-filter-item\" [ngClass]=\"['type-' + item.type]\"\r\n [style.display]=\"item.visible === false ? 'none' : 'block'\" [ngStyle]=\"item.styles\">\r\n\r\n <ng-container [ngSwitch]=\"item.type\">\r\n\r\n <!-- Input -->\r\n <lib-input *ngSwitchCase=\"'input'\" [config]=\"item.inputConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (valueChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-input>\r\n\r\n <!-- Dropdown -->\r\n <lib-dropdown *ngSwitchCase=\"'dropdown'\" [config]=\"item.dropdownConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (selectionChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-dropdown>\r\n\r\n <!-- Checkbox -->\r\n <lib-checkbox *ngSwitchCase=\"'checkbox'\" [config]=\"item.checkboxConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (checkedChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-checkbox>\r\n\r\n <!-- Radio -->\r\n <lib-radio *ngSwitchCase=\"'radio'\" [config]=\"item.radioConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (selectionChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-radio>\r\n\r\n <!-- Toggle -->\r\n <lib-toggle *ngSwitchCase=\"'toggle'\" [config]=\"item.toggleConfig\" [label]=\"item.label\"\r\n [checked]=\"tempFilters[item.key]\" (toggleChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-toggle>\r\n\r\n <!-- Datepicker -->\r\n <lib-datepicker *ngSwitchCase=\"'datepicker'\" [config]=\"item.datepickerConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (dateChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-datepicker>\r\n\r\n <!-- Search -->\r\n <lib-search *ngSwitchCase=\"'active-search'\" [config]=\"item.searchConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (search)=\"onFilterChange(item.key, $event)\">\r\n </lib-search>\r\n\r\n <!-- Group / Accordion -->\r\n <div *ngSwitchCase=\"'group'\" class=\"cc-accordion-item\" [class.expanded]=\"item.expanded\">\r\n <button type=\"button\" class=\"cc-accordion-header\" (click)=\"item.expanded = !item.expanded\">\r\n <span class=\"cc-accordion-title\">{{ item.label }}</span>\r\n <span class=\"material-icons cc-accordion-icon\">{{ item.expanded ? 'expand_less' : 'expand_more'\r\n }}</span>\r\n </button>\r\n\r\n <div class=\"cc-accordion-body\" *ngIf=\"item.expanded\">\r\n <ng-container *ngFor=\"let child of item.children; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: child }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Custom Divider -->\r\n <div *ngSwitchCase=\"'divider'\" class=\"cc-filter-divider\"></div>\r\n\r\n </ng-container>\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { ButtonModule } from '../button/button.module';\r\nimport { FormComponentsModule } from '../form-components/form-components.module';\r\nimport { FilterComponent } from './components/filter/filter.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FilterComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n ButtonModule,\r\n FormComponentsModule\r\n ],\r\n exports: [\r\n FilterComponent\r\n ]\r\n})\r\nexport class FilterModule { }\r\n","import { Component, EventEmitter, Input, OnInit, Output, OnChanges, SimpleChanges, AfterViewInit, OnDestroy, ViewChildren, QueryList, ElementRef, ChangeDetectorRef, NgZone, inject, LOCALE_ID, HostListener } from '@angular/core';\nimport { TableConfig, TableColumn, TableAction, TableFilter } from '../../models/table-config.model';\nimport { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';\nimport { formatDate } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { catchError, finalize, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { of, forkJoin, Subject } from 'rxjs';\n\n@Component({\n selector: 'lib-smart-table',\n templateUrl: './smart-table.component.html',\n styleUrls: ['./smart-table.component.scss'],\n standalone: false\n})\nexport class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n @Input() config!: TableConfig;\n \n @Output() action = new EventEmitter<{ action: TableAction, row: any }>();\n @Output() topAction = new EventEmitter<TableAction>(); // For top bar buttons\n @Output() filterChange = new EventEmitter<{ key: string, value: any }>();\n @Output() rowSelect = new EventEmitter<any[]>();\n @Output() columnClick = new EventEmitter<{ row: any, column: string }>();\n\n data: any[] = [];\n totalItems: number = 0;\n currentPage: number = 1;\n loading: boolean = false;\n \n // State\n activeSort: { key: string, direction: 'ASC' | 'DESC' } = { key: '', direction: 'ASC' };\n activeFilters: { [key: string]: any } = {};\n searchTerm: string = '';\n selectedRows: any[] = [];\n stickyColumnStyles: { [key: string]: any } = {};\n hasStickyColumns: boolean = false;\n openDropdownId: string | null = null;\n\n searchSubject = new Subject<string>();\n\n @ViewChildren('stickyHeader') stickyHeaders!: QueryList<ElementRef>;\n private resizeObserver: ResizeObserver | null = null;\n private locale = inject(LOCALE_ID);\n\n constructor(\n private http: HttpClient, \n private router: Router,\n private cdr: ChangeDetectorRef,\n private ngZone: NgZone\n ) { \n // Debounce search input\n this.searchSubject.pipe(\n debounceTime(this.config?.searchConfig?.debounceTime || 300),\n distinctUntilChanged()\n ).subscribe(term => {\n this.searchTerm = term;\n this.currentPage = 1;\n this.loadData();\n });\n }\n\n ngOnInit(): void {\n if (this.config) {\n if (this.config.sortBy) {\n this.activeSort.key = this.config.sortBy;\n }\n if (this.config.orderBy) {\n this.activeSort.direction = this.config.orderBy;\n }\n this.loadFilterOptions();\n this.loadData();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['config'] && !changes['config'].firstChange) {\n this.loadFilterOptions();\n this.loadData();\n setTimeout(() => this.calculateStickyPositions());\n }\n }\n\n ngAfterViewInit(): void {\n this.setupResizeObserver();\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n private setupResizeObserver(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n \n this.resizeObserver = new ResizeObserver(() => {\n this.ngZone.run(() => {\n this.calculateStickyPositions();\n });\n });\n\n if (this.stickyHeaders) {\n this.stickyHeaders.changes.subscribe(() => {\n this.observeHeaders();\n // Also recalculate immediately\n setTimeout(() => this.calculateStickyPositions());\n });\n this.observeHeaders();\n }\n }\n\n private observeHeaders(): void {\n if (!this.resizeObserver || !this.stickyHeaders) return;\n this.stickyHeaders.forEach(header => {\n this.resizeObserver!.observe(header.nativeElement);\n });\n }\n \n loadData(): void {\n if (!this.config?.apiUrl) return;\n \n this.loading = true;\n let params: HttpParams;\n\n // --- Query Params Construction ---\n if (this.config.queryParamsConfig) {\n const qpConfig = this.config.queryParamsConfig;\n const pageKey = qpConfig.pageKey || 'page';\n const sizeKey = qpConfig.sizeKey || 'pageSize';\n const pageIndex = this.currentPage + (qpConfig.pageIndexOffset || 0);\n\n let paramsObj: any = {\n [pageKey]: pageIndex.toString(),\n [sizeKey]: (this.config.pagination?.pageSize || 10).toString()\n };\n\n if (this.activeSort.key) paramsObj['sortBy'] = this.activeSort.key;\n // Note: Some APIs might use different keys for sort/order, can be extended later if needed\n if (this.activeSort.direction) paramsObj['orderBy'] = this.activeSort.direction;\n \n // Search Handling\n if (this.searchTerm) {\n const searchConfig = this.config.searchConfig;\n const searchKey = searchConfig?.searchKey || 'search';\n \n if (searchConfig?.handling === 'nested_string' && qpConfig.nestedStringConfig) {\n // Will be handled in nested string construction below\n } else {\n paramsObj[searchKey] = this.searchTerm;\n }\n }\n\n // Filter Handling (and Search if nested)\n if (qpConfig.filterHandling === 'nested_string' && qpConfig.nestedStringConfig) {\n const { paramName, baseValue, separator, assignment } = qpConfig.nestedStringConfig;\n let nestedString = baseValue || '';\n const assign = assignment || '=';\n\n // Add Filters\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) {\n const prefix = nestedString ? separator : '';\n nestedString += `${prefix}${key}${assign}${this.activeFilters[key]}`;\n }\n });\n \n // Add Search if nested\n if (this.searchTerm && this.config.searchConfig?.handling === 'nested_string') {\n const searchKey = this.config.searchConfig.searchKey || 'SEARCH_TERM';\n const prefix = nestedString ? separator : '';\n nestedString += `${prefix}${searchKey}${assign}${this.searchTerm}`;\n }\n\n paramsObj[paramName] = nestedString;\n } else {\n // Standard handling\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) paramsObj[key] = this.activeFilters[key];\n });\n }\n params = new HttpParams({ fromObject: paramsObj });\n\n } else {\n // --- Default Behavior (Backward Compatibility) ---\n let paramsObj: any = {};\n \n if (this.config.pagination?.enabled) {\n paramsObj['page'] = this.currentPage;\n paramsObj['pageSize'] = this.config.pagination.pageSize;\n }\n\n if (this.activeSort.key) {\n paramsObj['sortBy'] = this.activeSort.key;\n paramsObj['orderBy'] = this.activeSort.direction;\n }\n\n if (this.searchTerm) {\n const searchKey = this.config.searchConfig?.searchKey || 'search';\n paramsObj[searchKey] = this.searchTerm;\n }\n\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) {\n paramsObj[key] = this.activeFilters[key];\n }\n });\n\n // Custom Request Params Mapper (if provided)\n if (this.config.requestParams) {\n const customParams = this.config.requestParams(\n this.currentPage, \n this.config.pagination?.pageSize || 10, \n this.activeSort.key, \n this.activeSort.direction, \n this.searchTerm, \n this.activeFilters\n );\n if (customParams instanceof HttpParams) {\n // If function returns HttpParams, use it directly (caveat: might lose previous params if not careful in mapper)\n params = customParams;\n } else {\n paramsObj = { ...paramsObj, ...customParams };\n params = new HttpParams({ fromObject: paramsObj });\n }\n } else {\n params = new HttpParams({ fromObject: paramsObj });\n }\n }\n\n // --- Data Fetching ---\n \n // Check for separate count API\n const totalCountConfig = this.config.pagination?.totalCountConfig;\n let request$: any; // Observable\n\n if (totalCountConfig?.source === 'separate' && totalCountConfig.apiUrl) {\n const headers = this.getHeaders();\n const method = this.config.apiMethod || 'GET';\n const body = this.config.apiPayload || {};\n\n const dataRequest$ = method === 'POST' ? this.http.post<any>(this.config.apiUrl, body, { params, headers }) : this.http.get<any>(this.config.apiUrl, { params, headers });\n const countRequest$ = method === 'POST' ? this.http.post<any>(totalCountConfig.apiUrl, body, { params, headers }) : this.http.get<any>(totalCountConfig.apiUrl, { params, headers });\n\n request$ = forkJoin({\n data: dataRequest$,\n count: countRequest$\n }).pipe(\n map(({ data, count }) => {\n const dataPath = this.config.dataResponsePath !== undefined ? this.config.dataResponsePath : '';\n return {\n data: this.getValueByPath(data, dataPath),\n total: this.getValueByPath(count, totalCountConfig.responsePath || '')\n };\n })\n );\n } else {\n \n const headers = this.getHeaders();\n const method = this.config.apiMethod || 'GET';\n const body = this.config.apiPayload || {};\n \n const baseRequest$ = method === 'POST' ? this.http.post<any>(this.config.apiUrl, body, { params, headers }) : this.http.get<any>(this.config.apiUrl, { params, headers });\n\n request$ = baseRequest$.pipe(\n map(response => {\n const dataPath = this.config.dataResponsePath !== undefined ? this.config.dataResponsePath : '';\n const totalPath = totalCountConfig?.responsePath || '';\n return {\n data: this.getValueByPath(response, dataPath),\n // If source is 'same', try to get total from response, else default 0\n total: totalCountConfig ? this.getValueByPath(response, totalPath) : 0\n };\n })\n );\n }\n\n request$.pipe(\n finalize(() => this.loading = false),\n catchError(err => {\n console.error('Table Data Fetch Error', err);\n return of({ data: [], total: 0 }); \n })\n )\n .subscribe((result: any) => {\n this.data = result.data || [];\n if (this.config.pagination) {\n this.totalItems = result.total || 0;\n }\n\n // Dynamic Column Generation\n if (!this.config.columns || this.config.columns.length === 0) {\n if (this.data.length > 0) {\n this.config.columns = Object.keys(this.data[0]).map(key => ({\n key: key,\n label: this.toTitleCase(key),\n type: 'text',\n sortable: false,\n editable: false\n }));\n }\n }\n });\n }\n\n // --- Actions ---\n\n onPageChange(page: number): void {\n this.currentPage = page;\n this.loadData();\n }\n\n onPageSizeChange(size: number): void {\n if (this.config.pagination) {\n this.config.pagination.pageSize = size;\n this.currentPage = 1; // Reset to first page\n this.loadData();\n }\n }\n\n onSort(col: TableColumn): void {\n if (!col.sortable) return;\n\n if (this.activeSort.key === col.key) {\n this.activeSort.direction = this.activeSort.direction === 'ASC' ? 'DESC' : 'ASC';\n } else {\n this.activeSort.key = col.key;\n this.activeSort.direction = 'ASC';\n }\n this.loadData();\n }\n\n onSearch(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.searchSubject.next(value);\n }\n\n onFilterChange(key: string, event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n this.activeFilters[key] = value;\n this.currentPage = 1;\n this.filterChange.emit({ key, value });\n this.loadData();\n }\n \n onAction(action: TableAction, row: any): void {\n if (action.type === 'callback' && action.callback) {\n action.callback(row);\n }\n \n if (action.type === 'route' && action.route) {\n const url = this.replaceParams(action.route, row);\n this.router.navigateByUrl(url);\n return;\n }\n\n if (action.type === 'api') {\n if (action.confirmationNeeded) {\n const message = action.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (action.apiUrl) {\n this.executeApiAction(action, row);\n } else {\n this.action.emit({ action, row });\n }\n } else {\n this.action.emit({ action, row });\n }\n }\n\n onActionItemClick(item: any, row: any, event: Event): void {\n event.stopPropagation();\n \n if (item.type === 'callback' && item.callback) {\n item.callback(row);\n }\n \n if (item.type === 'route' && item.route) {\n const url = this.replaceParams(item.route, row);\n this.router.navigateByUrl(url);\n return;\n }\n\n if (item.type === 'api') {\n if (item.confirmationNeeded) {\n const message = item.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (item.apiUrl) {\n this.executeApiAction(item as TableAction, row);\n } else {\n this.action.emit({ action: item as TableAction, row });\n }\n } else {\n this.action.emit({ action: item as TableAction, row });\n }\n }\n\n onTopAction(action: TableAction): void {\n if (action.type === 'callback' && action.callback) {\n action.callback(null); // No row for top action\n }\n \n if (action.type === 'route' && action.route) {\n // Since it's a top action, replaceParams with an empty object or handle statically \n const url = this.replaceParams(action.route, {});\n this.router.navigateByUrl(url);\n return;\n }\n\n if (action.type === 'api') {\n if (action.confirmationNeeded) {\n const message = action.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (action.apiUrl) {\n this.executeApiAction(action, null);\n } else {\n this.topAction.emit(action);\n }\n } else {\n this.topAction.emit(action);\n }\n }\n\n private executeApiAction(action: TableAction, row: any): void {\n if (!action.apiUrl) return;\n \n const url = row ? this.replaceParams(action.apiUrl, row) : action.apiUrl;\n const method = action.apiMethod || 'POST';\n const headers = this.getHeaders();\n const body = row ? row : {};\n \n this.loading = true;\n this.http.request(method, url, { body, headers }).pipe(\n finalize(() => this.loading = false)\n ).subscribe({\n next: () => {\n this.loadData(); // reload on success\n if (row) {\n this.action.emit({ action, row });\n } else {\n this.topAction.emit(action);\n }\n },\n error: (err) => {\n console.error('API Action Error', err);\n }\n });\n }\n\n // --- Selection ---\n\n onSelectAll(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this.data.forEach(row => row.selected = checked);\n this.updateSelectedRows();\n }\n \n onRowSelect(row: any): void {\n this.updateSelectedRows();\n }\n \n updateSelectedRows(): void {\n this.selectedRows = this.data.filter(row => row.selected);\n this.rowSelect.emit(this.selectedRows);\n }\n\n // --- Helpers ---\n\n getCellValue(row: any, col: TableColumn): any {\n // Support nested properties via labelPath or key\n const path = col.labelPath || col.key;\n let val = this.getValueByPath(row, path);\n \n // Formatting (Date, etc.)\n if (col.type === 'date' && val) {\n if (col.dateFormat) {\n try {\n return formatDate(val, col.dateFormat, this.locale);\n } catch (e) {\n console.warn('Invalid date format or value', val, col.dateFormat);\n return val;\n }\n }\n return new Date(val).toLocaleDateString();\n }\n return val;\n }\n\n getBadgeClass(row: any, col: TableColumn): string {\n const val = this.getCellValue(row, col);\n const strVal = String(val);\n \n // Config approach\n if (col.badgeConfig && col.badgeConfig[strVal]) {\n return `badge-${col.badgeConfig[strVal]}`;\n }\n\n // Default Logic\n const status = strVal.toLowerCase();\n \n if (['active', 'completed', 'success', 'approved'].includes(status)) return 'badge-success';\n if (['pending', 'in progress', 'waiting'].includes(status)) return 'badge-warning';\n if (['rejected', 'failed', 'error', 'deleted'].includes(status)) return 'badge-danger';\n if (['draft', 'inactive'].includes(status)) return 'badge-neutral';\n \n return 'badge-info'; // default\n }\n \n getSortIcon(key: string): string {\n if (this.activeSort.key !== key) return 'fa-sort';\n return this.activeSort.direction === 'ASC' ? 'fa-sort-up' : 'fa-sort-down';\n }\n\n private replaceParams(template: string, row: any): string {\n return template.replace(/:([a-zA-Z0-9_]+)/g, (_, key) => row[key] || '');\n }\n \n private loadFilterOptions(): void {\n if (!this.config.filters) return;\n\n this.config.filters.forEach(filter => {\n if (filter.apiUrl && !filter.options) {\n const headers = this.getHeaders();\n let params = new HttpParams();\n\n if (filter.handling === 'nested_string' && filter.nestedStringConfig) {\n const { paramName, baseValue } = filter.nestedStringConfig;\n if (baseValue) {\n params = params.set(paramName, baseValue);\n }\n }\n\n const method = filter.apiMethod || 'GET';\n const body = filter.apiPayload || {};\n \n const request$ = method === 'POST' \n ? this.http.post<any>(filter.apiUrl, body, { headers, params }) \n : this.http.get<any>(filter.apiUrl, { headers, params });\n\n request$.subscribe({\n next: (response) => {\n const data = filter.dataPath ? this.getValueByPath(response, filter.dataPath) : response;\n if (!Array.isArray(data)) {\n console.error(`Filter data for ${filter.key} is not an array`, data);\n return;\n }\n filter.options = data.map((item: any) => {\n const label = filter.labelPath ? this.getValueByPath(item, filter.labelPath) :\n (filter.labelKey ? item[filter.labelKey] : item.label || item.name);\n const value = filter.valuePath ? this.getValueByPath(item, filter.valuePath) :\n (filter.valueKey ? item[filter.valueKey] : item.value || item.code);\n return { label, value };\n });\n\n // Auto-populate matching column options\n if (this.config.columns) {\n const matchingColumn = this.config.columns.find(col => col.key === filter.key);\n if (matchingColumn && matchingColumn.dataType === 'select' && !matchingColumn.options) {\n matchingColumn.options = filter.options;\n }\n }\n },\n error: (err) => console.error(`Failed to load filter options for ${filter.key}:`, err)\n });\n }\n });\n }\n\n private getValueByPath(obj: any, path: string): any {\n if (!path || path === '') return obj;\n return path.split('.').reduce((acc, part) => {\n const match = part.match(/(\\w+)\\[(\\d+)\\]/);\n if (match) {\n return acc?.[match[1]]?.[parseInt(match[2])];\n }\n return acc?.[part];\n }, obj);\n }\n\n private calculateStickyPositions(): void {\n // We calculate positions based on rendered widths\n if (!this.stickyHeaders || this.stickyHeaders.length === 0) return;\n\n this.stickyColumnStyles = {};\n let leftOffset = 0;\n this.hasStickyColumns = false;\n\n // Default sticky columns count is 3 if not specified\n const stickyCount = this.config.stickyColumnCount !== undefined ? this.config.stickyColumnCount : 3;\n\n // Checkbox width handling\n if (this.config.selectable) {\n const firstSticky = this.config.columns.find((c, i) => i < stickyCount || c.sticky);\n if (firstSticky) {\n // We can try to measure checkbox col if needed, but usually fixed 40px\n // Or better, if we have a checkbox col ref, assume 40px for now as it is fixed in CSS\n leftOffset = 40; \n }\n }\n\n const headerElements = this.stickyHeaders.toArray();\n\n this.config.columns.forEach((col, index) => {\n if (col.sticky || index < stickyCount) {\n col.sticky = true;\n this.hasStickyColumns = false; // Reset to true only after we set styles? No, wait. \n // Actually property is used in template to add class 'sticky-col'\n // but we need to update Styles based on previous cols widths\n \n // Find corresponding header element\n // Note: headerElements corresponds to columns indices\n const headerEl = headerElements[index]?.nativeElement;\n \n if (headerEl) {\n // Set style for current column\n this.stickyColumnStyles[col.key] = { \n left: `${leftOffset}px`\n // We DO NOT set width here, allowing it to be dynamic/auto\n };\n \n // Add THIS column's width to offset for the NEXT column\n // use getBoundingClientRect or offsetWidth\n leftOffset += headerEl.offsetWidth;\n }\n this.hasStickyColumns = true;\n }\n });\n \n this.cdr.detectChanges();\n }\n\n private toTitleCase(str: string): string {\n return str\n .replace(/([A-Z])/g, ' $1') // insert space before capital letters\n .replace(/^./, (str) => str.toUpperCase()) // capitalize the first letter\n .trim(); // remove any leading/trailing whitespace\n }\n \n get columnCount(): number {\n return this.config.columns.length;\n }\n\n onColumnClick(row: any, col: TableColumn): void {\n if (col.clickAction === 'callback') {\n this.columnClick.emit({ row, column: col.key });\n } else if (col.clickAction === 'route' && col.clickRoute) {\n const url = this.replaceParams(col.clickRoute, row);\n this.router.navigateByUrl(url);\n }\n }\n\n private getHeaders(): HttpHeaders {\n let headers = new HttpHeaders();\n if (this.config.token) {\n const headerName = this.config.tokenHeader || 'Authorization';\n headers = headers.set(headerName, this.config.token);\n }\n return headers;\n }\n\n toggleDropdown(id: string, event: Event): void {\n event.stopPropagation();\n this.openDropdownId = this.openDropdownId === id ? null : id;\n }\n\n @HostListener('document:click')\n closeDropdown(): void {\n this.openDropdownId = null;\n }\n}\n","<div class=\"smart-table-wrapper\">\n <!-- Top Toolbar -->\n <div class=\"st-toolbar\" *ngIf=\"config.searchConfig?.enabled || (config.filters && config.filters.length > 0) || (config.topBarButtons && config.topBarButtons.length > 0)\">\n \n <!-- Search -->\n <div class=\"st-search\" *ngIf=\"config.searchConfig?.enabled\">\n <i class=\"fa fa-search\"></i>\n <input type=\"text\" [placeholder]=\"config.labels?.searchPlaceholder || 'Search'\" (input)=\"onSearch($event)\">\n </div>\n\n <!-- Filters -->\n <div class=\"st-filters\" *ngIf=\"config.filters\">\n <div class=\"st-filter-item\" *ngFor=\"let filter of config.filters\">\n <select (change)=\"onFilterChange(filter.key, $event)\">\n <option value=\"\">{{ filter.label }}</option>\n <option *ngFor=\"let opt of filter.options\" [value]=\"opt.value\">{{ opt.label }}</option>\n </select>\n </div>\n </div>\n\n <!-- Top Bar Buttons -->\n <div class=\"st-actions\" *ngIf=\"config.topBarButtons\">\n <lib-button *ngFor=\"let btn of config.topBarButtons\" \n [variant]=\"btn.btnVariant || 'primary'\"\n [icon]=\"btn.icon || ''\"\n (click)=\"onTopAction(btn)\">\n {{ btn.label }}\n </lib-button>\n </div>\n </div>\n\n <!-- Table Container -->\n <div class=\"st-table-container\">\n <div class=\"st-check-loader\" *ngIf=\"loading\">\n <div class=\"spinner\"></div>\n </div>\n <table class=\"st-table\" [class.loading-data]=\"loading\">\n <thead>\n <tr>\n <th *ngIf=\"config.selectable\" class=\"st-checkbox-col\">\n <input type=\"checkbox\" (change)=\"onSelectAll($event)\">\n </th>\n <th *ngFor=\"let col of config.columns\" \n #stickyHeader\n [class.sortable]=\"col.sortable\"\n [class.sticky-col]=\"col.sticky\"\n [ngStyle]=\"stickyColumnStyles[col.key]\"\n (click)=\"onSort(col)\">\n {{ col.label }}\n <span *ngIf=\"col.sortable\" class=\"sort-icon\">\n <i class=\"fa\" [ngClass]=\"getSortIcon(col.key)\"></i>\n </span>\n </th>\n <th *ngIf=\"config.actions && config.actions.length > 0\">{{ config.labels?.actionColumnHeader || 'Actions' }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of data; let rowIndex = index\">\n <td *ngIf=\"config.selectable\" class=\"st-checkbox-col\">\n <input type=\"checkbox\" [(ngModel)]=\"row.selected\" (change)=\"onRowSelect(row)\">\n </td>\n <td *ngFor=\"let col of config.columns\" \n [class.sticky-col]=\"col.sticky\" \n [ngStyle]=\"stickyColumnStyles[col.key]\"\n [class.clickable-cell]=\"col.clickAction\"\n (click)=\"onColumnClick(row, col)\">\n <!-- Text/Number/Date -->\n <span *ngIf=\"col.type !== 'custom' && col.type !== 'html' && col.type !== 'badge'\">\n {{ getCellValue(row, col) }}\n </span>\n <!-- HTML -->\n <div *ngIf=\"col.type === 'html'\" [innerHTML]=\"getCellValue(row, col)\"></div>\n <!-- Badge -->\n <span *ngIf=\"col.type === 'badge'\" class=\"st-badge\" [ngClass]=\"getBadgeClass(row, col)\">\n {{ getCellValue(row, col) }}\n </span>\n </td>\n \n <!-- Row Actions -->\n <td *ngIf=\"config.actions && config.actions.length > 0\" class=\"st-row-actions\">\n <div class=\"action-buttons\">\n <ng-container *ngFor=\"let action of config.actions; let i = index\">\n <ng-container *ngIf=\"action.type === 'dropdown'\">\n <div class=\"st-dropdown-container\" (click)=\"$event.stopPropagation()\">\n <button class=\"st-dropdown-btn\" (click)=\"toggleDropdown(rowIndex + '-' + i, $event)\">\n <i [class]=\"action.icon || 'fa fa-ellipsis-h'\"></i>\n </button>\n <div class=\"st-dropdown-menu\" *ngIf=\"openDropdownId === (rowIndex + '-' + i)\">\n <button class=\"st-dropdown-item\" *ngFor=\"let item of action.items\" (click)=\"onActionItemClick(item, row, $event); closeDropdown()\">\n <i *ngIf=\"item.icon\" [class]=\"item.icon + ' st-action-icon'\"></i>\n <span>{{ item.label }}</span>\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"action.type !== 'dropdown'\">\n <lib-button \n [variant]=\"action.btnVariant || 'secondary'\"\n [icon]=\"action.icon || ''\"\n (click)=\"onAction(action, row)\">\n {{ action.label }}\n </lib-button>\n </ng-container>\n </ng-container>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"data.length === 0 && !loading\">\n <td [attr.colspan]=\"columnCount + (config.selectable ? 1 : 0) + (config.actions ? 1 : 0)\" class=\"no-data\">\n {{ config.labels?.noDataMessage || 'No data available' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <!-- Pagination -->\n <div class=\"st-pagination\" *ngIf=\"config.pagination && config.pagination.enabled\">\n <lib-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"config.pagination.pageSize\"\n [currentPage]=\"currentPage\"\n [pageSizeOptions]=\"config.pagination.pageSizeOptions\"\n (pageChange)=\"onPageChange($event)\"\n (itemsPerPageChange)=\"onPageSizeChange($event)\">\n </lib-pagination>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { SmartTableComponent } from './components/smart-table/smart-table.component';\nimport { PaginationModule } from '../pagination/pagination.module';\nimport { ButtonModule } from '../button/button.module';\nimport { MaterialModule } from '../material/material.module';\n\n\n@NgModule({\n declarations: [\n SmartTableComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n PaginationModule,\n ButtonModule,\n MaterialModule\n ],\n exports: [\n SmartTableComponent\n ]\n})\nexport class SmartTableModule { }\n","export function appendBaseUrlRecursively(obj: any, baseURL: string): void {\n if (obj && typeof obj === 'object') {\n if (obj.apiUrl && typeof obj.apiUrl === 'string' && !obj.apiUrl.startsWith('http://') && !obj.apiUrl.startsWith('https://')) {\n let finalApiUrl = obj.apiUrl;\n if (baseURL.endsWith('/') && finalApiUrl.startsWith('/')) {\n finalApiUrl = finalApiUrl.substring(1);\n } else if (!baseURL.endsWith('/') && !finalApiUrl.startsWith('/')) {\n finalApiUrl = '/' + finalApiUrl;\n }\n obj.apiUrl = baseURL + finalApiUrl;\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n appendBaseUrlRecursively(obj[key], baseURL);\n }\n }\n }\n}\n","import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';\r\n\r\nexport class ValidationUtils {\r\n\r\n\r\n\r\n static email(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\r\n return emailRegex.test(control.value) ? null : { email: true };\r\n };\r\n }\r\n\r\n static phone(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const phoneRegex = /^\\+?[\\d\\s\\-\\(\\)]{10,}$/;\r\n return phoneRegex.test(control.value) ? null : { phone: true };\r\n };\r\n }\r\n\r\n static url(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const urlRegex = /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$/;\r\n return urlRegex.test(control.value) ? null : { url: true };\r\n };\r\n }\r\n\r\n static minLength(min: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n return control.value.length >= min ? null : { minLength: { min, actual: control.value.length } };\r\n };\r\n }\r\n\r\n static maxLength(max: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n return control.value.length <= max ? null : { maxLength: { max, actual: control.value.length } };\r\n };\r\n }\r\n\r\n static pattern(pattern: string, message?: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const regex = new RegExp(pattern);\r\n return regex.test(control.value) ? null : { pattern: { message: message || 'Invalid format' } };\r\n };\r\n }\r\n\r\n static numberRange(min?: number, max?: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value && control.value !== 0) return null;\r\n const value = Number(control.value);\r\n if (min !== undefined && value < min) {\r\n return { min: { min, actual: value } };\r\n }\r\n if (max !== undefined && value > max) {\r\n return { max: { max, actual: value } };\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n static dateRange(minDate?: string, maxDate?: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const date = new Date(control.value);\r\n if (minDate && date < new Date(minDate)) {\r\n return { minDate: { minDate } };\r\n }\r\n if (maxDate && date > new Date(maxDate)) {\r\n return { maxDate: { maxDate } };\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n static getErrorMessage(errors: ValidationErrors | null): string {\r\n if (!errors) return '';\r\n\r\n if (errors['required']) return 'This field is required';\r\n if (errors['email']) return 'Please enter a valid email address';\r\n if (errors['phone']) return 'Please enter a valid phone number';\r\n if (errors['url']) return 'Please enter a valid URL';\r\n if (errors['minLength']) return `Minimum length is ${errors['minLength'].min} characters`;\r\n if (errors['maxLength']) return `Maximum length is ${errors['maxLength'].max} characters`;\r\n if (errors['min']) return `Minimum value is ${errors['min'].min}`;\r\n if (errors['max']) return `Maximum value is ${errors['max'].max}`;\r\n if (errors['minDate']) return `Date must be after ${errors['minDate'].minDate}`;\r\n if (errors['maxDate']) return `Date must be before ${errors['maxDate'].maxDate}`;\r\n if (errors['pattern']) return errors['pattern'].message || 'Invalid format';\r\n\r\n return 'Invalid value';\r\n }\r\n}\r\n","export const SAMPLE_FORMS = {\r\n // Simple Contact Form\r\n contactForm: `{\r\n \"entityType\": \"CONTACT\",\r\n \"label\": \"Contact Us\",\r\n \"description\": \"Send us a message\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"name\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"hint\": \"Enter your full name\"\r\n },\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email Address\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true,\r\n \"hint\": \"your.email@example.com\"\r\n },\r\n {\r\n \"name\": \"meetingTime\",\r\n \"label\": \"Meeting Time\",\r\n \"type\": \"TIME\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select a time\"\r\n },\r\n {\r\n \"name\": \"message\",\r\n \"label\": \"Message\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"required\": true,\r\n \"textConfig\": {\r\n \"length\": {\r\n \"min\": 10,\r\n \"max\": 500\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // User Registration with Stepper\r\n registrationForm: `{\r\n \"entityType\": \"USER\",\r\n \"label\": \"User Registration\",\r\n \"description\": \"Create your account\",\r\n \"formType\": \"STEPPER\",\r\n \"stepperConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Personal Information\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"fullName\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"GENERATED\",\r\n \"subType\": \"FORMULA\",\r\n \"generatedConfig\": {\r\n \"formula\": \"function fullName(first, last) { return (first || '') + ' ' + (last || ''); }\",\r\n \"variables\": [\"firstName\", \"lastName\"]\r\n }\r\n },\r\n {\r\n \"name\": \"dateOfBirth\",\r\n \"label\": \"Date of Birth\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"dateConfig\": {\r\n \"allowFuture\": false\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Contact Information\",\r\n \"children\": [\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Preferences\",\r\n \"children\": [\r\n {\r\n \"name\": \"notifications\",\r\n \"label\": \"Enable Email Notifications\",\r\n \"type\": \"SWITCH\",\r\n \"subType\": \"BOOL\",\r\n \"defaultValue\": true\r\n },\r\n {\r\n \"name\": \"interests\",\r\n \"label\": \"Interests\",\r\n \"type\": \"CHIP\",\r\n \"subType\": \"MULTIPLE\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Technology\", \"code\": \"TECH\" },\r\n { \"label\": \"Sports\", \"code\": \"SPORTS\" },\r\n { \"label\": \"Music\", \"code\": \"MUSIC\" },\r\n { \"label\": \"Travel\", \"code\": \"TRAVEL\" }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"showStep\": true,\r\n \"isHorizontal\": true\r\n }\r\n }`,\r\n\r\n // Survey Form with Conditional Fields\r\n surveyForm: `{\r\n \"entityType\": \"SURVEY\",\r\n \"label\": \"Customer Satisfaction Survey\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"overallRating\",\r\n \"label\": \"Overall Experience\",\r\n \"type\": \"RATING\",\r\n \"subType\": \"STAR\",\r\n \"required\": true,\r\n \"ratingConfig\": {\r\n \"maxRating\": 5,\r\n \"allowHalf\": false\r\n }\r\n },\r\n {\r\n \"name\": \"wouldRecommend\",\r\n \"label\": \"Would you recommend us?\",\r\n \"type\": \"RADIO\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Yes\", \"code\": \"YES\" },\r\n { \"label\": \"No\", \"code\": \"NO\" },\r\n { \"label\": \"Maybe\", \"code\": \"MAYBE\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"reasonForNo\",\r\n \"label\": \"Why not?\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"visibilityExpression\": \"wouldRecommend === 'NO'\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"improvements\",\r\n \"label\": \"What can we improve?\",\r\n \"type\": \"CHECKBOX\",\r\n \"subType\": \"LIST\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Customer Service\", \"code\": \"SERVICE\" },\r\n { \"label\": \"Product Quality\", \"code\": \"QUALITY\" },\r\n { \"label\": \"Pricing\", \"code\": \"PRICE\" },\r\n { \"label\": \"Delivery Speed\", \"code\": \"DELIVERY\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"additionalComments\",\r\n \"label\": \"Additional Comments\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"textConfig\": {\r\n \"length\": {\r\n \"max\": 1000\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // Job Application Form\r\n jobApplicationForm: `{\r\n \"entityType\": \"JOB_APPLICATION\",\r\n \"label\": \"Job Application\",\r\n \"description\": \"Apply for a position at our company\",\r\n \"formType\": \"STEPPER\",\r\n \"stepperConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Personal Details\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Experience\",\r\n \"allowMulti\": true,\r\n \"name\": \"experienceList\",\r\n \"children\": [\r\n {\r\n \"name\": \"company\",\r\n \"label\": \"Company Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"position\",\r\n \"label\": \"Position\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"startDate\",\r\n \"label\": \"Start Date\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"endDate\",\r\n \"label\": \"End Date\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"responsibilities\",\r\n \"label\": \"Key Responsibilities\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Skills & Qualifications\",\r\n \"children\": [\r\n {\r\n \"name\": \"skills\",\r\n \"label\": \"Technical Skills\",\r\n \"type\": \"CHIP\",\r\n \"subType\": \"MULTIPLE\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"JavaScript\", \"code\": \"JS\" },\r\n { \"label\": \"TypeScript\", \"code\": \"TS\" },\r\n { \"label\": \"Angular\", \"code\": \"ANGULAR\" },\r\n { \"label\": \"React\", \"code\": \"REACT\" },\r\n { \"label\": \"Node.js\", \"code\": \"NODE\" },\r\n { \"label\": \"Python\", \"code\": \"PYTHON\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"yearsOfExperience\",\r\n \"label\": \"Years of Experience\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 50\r\n }\r\n },\r\n {\r\n \"name\": \"availableToStart\",\r\n \"label\": \"Available to Start\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"dateConfig\": {\r\n \"allowFuture\": true\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"showStep\": true,\r\n \"isHorizontal\": true\r\n }\r\n }`,\r\n\r\n // Donor Form based on UI\r\n donorForm: `{\r\n \"entityType\": \"DONOR\",\r\n \"label\": \"Donor Form\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Donor Details\",\r\n \"name\": \"donorDetails\",\r\n \"children\": [\r\n {\r\n \"name\": \"legalName\",\r\n \"label\": \"Donor Legal Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter the name\"\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"shortCode\",\r\n \"label\": \"Donor Short Code\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 3,\r\n \"disabled\": true,\r\n \"defaultValue\": \"DLP-24-L1\",\r\n \"hint\": \"System-generated, unique internal code\"\r\n },\r\n {\r\n \"name\": \"donorType\",\r\n \"label\": \"Donor Type\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Individual\", \"code\": \"INDIVIDUAL\" },\r\n { \"label\": \"Corporate\", \"code\": \"CORPORATE\" },\r\n { \"label\": \"Trust\", \"code\": \"TRUST\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"regNumber\",\r\n \"label\": \"Registration / Legal Entity Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 3,\r\n \"placeholder\": \"Type\",\r\n \"hint\": \"CIN / Trust Reg. No / Govt ID (if applicable)\"\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"label\": \"Country of Incorporation\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"India\", \"code\": \"IN\" },\r\n { \"label\": \"USA\", \"code\": \"US\" },\r\n { \"label\": \"UK\", \"code\": \"UK\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"profilePicture\",\r\n \"label\": \"Profile Picture\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"attachmentConfig\": {\r\n \"multiple\": false,\r\n \"maxSizeMB\": 2,\r\n \"accept\": \"image/*\",\r\n \"acceptLabel\": \"JPG, PNG, SVG (max 2 MB)\"\r\n }\r\n },\r\n {\r\n \"name\": \"website\",\r\n \"label\": \"Organization Website (Optional)\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 9,\r\n \"placeholder\": \"Add your website link or LinkedIn profile\",\r\n \"hint\": \"Add your website link to automatically fetch your logo, powered by Clearbit.\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Primary Contact\",\r\n \"allowMulti\": true,\r\n \"name\": \"contacts\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"contactName\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 6,\r\n \"required\": true,\r\n \"placeholder\": \"Enter the name\"\r\n },\r\n {\r\n \"name\": \"designation\",\r\n \"label\": \"Designation/Title\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 6,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"CEO\", \"code\": \"CEO\" },\r\n { \"label\": \"Manager\", \"code\": \"MANAGER\" },\r\n { \"label\": \"Other\", \"code\": \"OTHER\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email Address\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"placeholder\": \"Enter your email address\"\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"placeholder\": \"+91 7007713990\"\r\n },\r\n {\r\n \"name\": \"communicationPreference\",\r\n \"label\": \"Communication Preference\",\r\n \"type\": \"RADIO\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Email\", \"code\": \"EMAIL\" },\r\n { \"label\": \"Phone Number\", \"code\": \"PHONE\" }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n\r\n // ──────────────────────────────────────────────────────────────────────────\r\n // User Registration Form — Basic Details / Primary Address / User Role\r\n // ──────────────────────────────────────────────────────────────────────────\r\n userBasicDetailsForm: `{\r\n \"entityType\": \"USER_REGISTRATION\",\r\n \"label\": \"User Registration\",\r\n \"description\": \"Fill in your details to create a new account\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Basic Details\",\r\n \"name\": \"basicDetails\",\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter first name\"\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter last name\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"contactNo\",\r\n \"label\": \"Contact No\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true,\r\n \"placeholder\": \"+91 9999999999\",\r\n \"hint\": \"Enter a valid 10-digit mobile number\"\r\n },\r\n {\r\n \"name\": \"emailId\",\r\n \"label\": \"Email ID\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true,\r\n \"placeholder\": \"example@domain.com\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"loginId\",\r\n \"label\": \"Login / User ID\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Choose a unique login ID\",\r\n \"hint\": \"Alphanumeric, no spaces\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 4, \"max\": 30 },\r\n \"pattern\": \"^[a-zA-Z0-9_]+$\",\r\n \"patternMessage\": \"Only letters, numbers and underscores are allowed\"\r\n }\r\n },\r\n {\r\n \"name\": \"password\",\r\n \"label\": \"Password\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PASSWORD\",\r\n \"required\": true,\r\n \"placeholder\": \"Min. 8 characters\",\r\n \"hint\": \"Use at least 8 characters with letters and numbers\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 8, \"max\": 64 }\r\n }\r\n },\r\n {\r\n \"name\": \"confirmPassword\",\r\n \"label\": \"Confirm Password\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PASSWORD\",\r\n \"required\": true,\r\n \"placeholder\": \"Re-enter your password\",\r\n \"textConfig\": {\r\n \"matchField\": \"password\"\r\n }\r\n }\r\n ]\r\n }\r\n\r\n ]\r\n }\r\n },\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Primary Address\",\r\n \"name\": \"primaryAddress\",\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"addressLine1\",\r\n \"label\": \"Address Line 1\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"House / Flat No., Building, Street\"\r\n },\r\n {\r\n \"name\": \"addressLine2\",\r\n \"label\": \"Address Line 2\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"placeholder\": \"Area / Locality / Colony (optional)\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"country\",\r\n \"label\": \"Country\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Country\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"India\", \"code\": \"REGION_COUNTRY.INDIA\" },\r\n { \"label\": \"USA\", \"code\": \"REGION_COUNTRY.USA\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"state\",\r\n \"label\": \"State\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select State\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_STATE&parentRefClass=GREF.REGION_COUNTRY\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"country\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"label\": \"City\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select City\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_DISTRICT&parentRefClass=GREF.REGION_STATE\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"state\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"block\",\r\n \"label\": \"Block / Taluka\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"placeholder\": \"Select Block\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_BLOCK&parentRefClass=GREF.REGION_DISTRICT\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"city\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pinCode\",\r\n \"label\": \"PIN Code\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"6-digit PIN code\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 6, \"max\": 6 },\r\n \"pattern\": \"^[0-9]{6}$\",\r\n \"patternMessage\": \"Enter a valid 6-digit PIN code\"\r\n }\r\n }\r\n ]\r\n }\r\n\r\n ]\r\n }\r\n },\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"User Role\",\r\n \"name\": \"userRole\",\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"role\",\r\n \"label\": \"User Role\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select a role\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/gateway/commons-report-service/api/v1/datasets/name/VMS_GET_TENANT_ROLES/execute?params=TENANT_ID=1823\",\r\n \"labelPath\": \"roleName\",\r\n \"valuePath\": \"code\"\r\n }\r\n },\r\n {\r\n \"name\": \"reportingRole\",\r\n \"label\": \"Reporting Role\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Reporting Role\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/rolehierarchy/v1?criteria=roleCode.code='{{userRole}}' and isActive=1&includeAttributes=id,parentRoleCode\",\r\n \"dataPath\": \"payload\",\r\n \"labelPath\": \"parentRoleCode\",\r\n \"valuePath\": \"parentRoleCode\",\r\n \"dependencies\": {\r\n \"userRole\": \"role\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"reportingManager\",\r\n \"label\": \"Reporting Manager\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Reporting Manager\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/tenant/user/role/criteria/v1?criteria=role.code='{{reportingRole}}' and isActive=1 and user.isActive=1\",\r\n \"dataPath\": \"payload\",\r\n \"labelPath\": \"user.userName\",\r\n \"valuePath\": \"user.id\",\r\n \"dependencies\": {\r\n \"reportingRole\": \"reportingRole\"\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n\r\n ]\r\n }\r\n }`,\r\n\r\n // ──────────────────────────────────────────────────────────────────────────\r\n // Document Upload Form — demonstrates the FILE_UPLOAD field type\r\n // ──────────────────────────────────────────────────────────────────────────\r\n documentUploadForm: `{\r\n \"entityType\": \"DOCUMENT_UPLOAD\",\r\n \"label\": \"Documents\",\r\n \"description\": \"Upload the required documents\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Documents\",\r\n \"name\": \"documents\",\r\n \"children\": [\r\n {\r\n \"name\": \"profilePicture\",\r\n \"label\": \"Profile Picture\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"attachmentConfig\": {\r\n \"multiple\": false,\r\n \"maxSizeMB\": 5,\r\n \"accept\": \".jpg,.jpeg,.png,.webp,image/*\",\r\n \"acceptLabel\": \"JPG, PNG, WEBP\"\r\n }\r\n },\r\n {\r\n \"name\": \"certificates\",\r\n \"label\": \"Certificates\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"MULTIPLE\",\r\n \"attachmentConfig\": {\r\n \"multiple\": true,\r\n \"maxFiles\": 5,\r\n \"maxSizeMB\": 10,\r\n \"accept\": \".pdf,.doc,.docx,.jpg,.jpeg,.png\",\r\n \"acceptLabel\": \"PDF, DOCX, JPG, PNG\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // Demand Definition Form (matching user request image)\r\n demandDefinitionForm: `{\r\n \"entityType\": \"DEMAND\",\r\n \"label\": \"Demand Definition\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"beneficiaries\",\r\n \"label\": \"Required Beneficiaries\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"Students\",\r\n \"placeholder\": \"0\",\r\n \"numberConfig\": { \"min\": 0 }\r\n },\r\n {\r\n \"name\": \"deliveryModel\",\r\n \"label\": \"Preferred Delivery Model\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Onsite Delivery\", \"code\": \"ONSITE\" },\r\n { \"label\": \"Hybrid Model\", \"code\": \"HYBRID\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"minAge\",\r\n \"label\": \"Min Target Age\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"0\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"!maxAge || minAge <= maxAge\",\r\n \"errorMessage\": \"Min Age cannot be greater than Max Age\"\r\n },\r\n {\r\n \"name\": \"maxAge\",\r\n \"label\": \"Max Target Age\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"100\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"!minAge || maxAge >= minAge\",\r\n \"errorMessage\": \"Max Age cannot be less than Min Age\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"male\",\r\n \"label\": \"Male Split (%)\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"50\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"(male || 0) + (female || 0) === 100\",\r\n \"errorMessage\": \"Male + Female % must equal 100%\"\r\n },\r\n {\r\n \"name\": \"female\",\r\n \"label\": \"Female Split (%)\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"50\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"(male || 0) + (female || 0) === 100\",\r\n \"errorMessage\": \"Male + Female % must equal 100%\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n\r\n\r\n // Project Info Form (matching user request image)\r\n // Project Form (Combined Info + Demand)\r\n projectInfoForm: `{\r\n \"entityType\": \"PROJECT\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.TITLE\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.INFO\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"projectName\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.LABEL\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.PH\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"colSpan\": 6\r\n },\r\n {\r\n \"name\": \"programId\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.PROG_ID.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"DLP-24-L1\",\r\n \"readonly\": true,\r\n \"colSpan\": 6\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"linkedProgram\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_PROG.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"National Skills Initiative\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n },\r\n {\r\n \"name\": \"linkedContract\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_CONTRACT.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"NSI-Gov-Oct23\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n },\r\n {\r\n \"name\": \"assignedDistrict\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.DISTRICT.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"Bangalore Rural\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.DEMAND\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"requiredBeneficiaries\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.LABEL\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.PH\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"colSpan\": 6,\r\n \"numberConfig\": {\r\n \"min\": 1\r\n }\r\n },\r\n {\r\n \"name\": \"deliveryModel\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.DELIVERY_MODEL.LABEL\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"colSpan\": 6,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.IN_PERSON\",\r\n \"code\": \"IN_PERSON\"\r\n },\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.HYBRID\",\r\n \"code\": \"HYBRID\"\r\n },\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.ONLINE\",\r\n \"code\": \"ONLINE\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"minAge\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"!maxAge || minAge <= maxAge\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.ERR\"\r\n },\r\n {\r\n \"name\": \"maxAge\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"!minAge || maxAge >= minAge\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.ERR\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"maleSplit\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"(maleSplit || 0) + (femaleSplit || 0) === 100\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR\"\r\n },\r\n {\r\n \"name\": \"femaleSplit\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"(maleSplit || 0) + (femaleSplit || 0) === 100\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}\r\n }`,\r\n\r\n faqForm: `{\r\n \"entityType\": \"FAQ\",\r\n \"label\": \"Frequently Asked Questions\",\r\n \"description\": \"Answer attendee questions.\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Frequently Asked Questions\",\r\n \"allowMulti\": true,\r\n \"name\": \"faqs\",\r\n \"multiSaveConfig\": {\r\n \"active\": true,\r\n \"summaryField\": \"question\",\r\n \"descriptionField\": \"answer\",\r\n \"addLabel\": \"Add a Question\"\r\n },\r\n \"children\": [\r\n {\r\n \"name\": \"question\",\r\n \"label\": \"Question\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"What is Lorem Ipsum?\"\r\n },\r\n {\r\n \"name\": \"answer\",\r\n \"label\": \"Answer\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"required\": true,\r\n \"placeholder\": \"Contrary to popular belief...\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // ── Location field example ──────────────────────────────────────────────\r\n locationForm: `{\r\n \"entityType\": \"EVENT\",\r\n \"label\": \"Event Location\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"eventLocation\",\r\n \"label\": \"Location\",\r\n \"type\": \"LOCATION\",\r\n \"required\": true,\r\n \"hint\": \"Set where your event takes place\",\r\n \"locationConfig\": {\r\n \"defaultTab\": \"VENUE\",\r\n \"maxLocations\": 5,\r\n \"venuePlaceholder\": \"Search for a venue address...\",\r\n \"onlinePlaceholder\": \"https://zoom.us/j/meeting-id\",\r\n \"showMap\": true,\r\n \"mapHeight\": \"300px\",\r\n \"googleMapsApiKey\": \"YOUR_GOOGLE_MAPS_API_KEY\"\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n};\r\n\r\n/**\r\n * i18n label keys used by the LOCATION field type.\r\n * Add these to your labels JSON file(s) for all supported languages.\r\n *\r\n * LBL_LOC_VENUE – Tab: \"Venue\"\r\n * LBL_LOC_ONLINE – Tab: \"Online Event\"\r\n * LBL_LOC_TBA – Tab: \"To be Announced\"\r\n * LBL_LOC_ADDRESS – Section heading inside Venue tab: \"Location address\"\r\n * LBL_LOC_COUNT_SUFFIX – e.g. \"Locations Added!\"\r\n * LBL_LOC_ADD_ANOTHER – \"Add another Location\" button label\r\n * LBL_LOC_MAP_HINT – hint below the embedded map\r\n * LBL_LOC_ONLINE_URL – Label above online URL input: \"Event URL\"\r\n * LBL_LOC_TBA_DESC – Message shown inside TBA tab\r\n * PH_LOC_VENUE – Placeholder for venue search input\r\n * PH_LOC_ONLINE – Placeholder for online URL input\r\n */\r\n\r\n\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { SnackbarComponent } from './components/snackbar.component';\n\n@NgModule({\n declarations: [SnackbarComponent],\n imports: [CommonModule, MatSnackBarModule],\n exports: [SnackbarComponent]\n})\nexport class SnackbarModule {}\n","/*\r\n * Public API Surface of commons-shared-web-ui\r\n */\r\n\r\nexport * from './lib/shared-ui.module';\r\nexport * from './lib/modules/material/material.module';\r\nexport * from './lib/utils/storage.utils';\r\nexport * from './lib/utils/string.utils';\r\nexport * from './lib/utils/translation.utils';\r\nexport * from './lib/modules/summary-card/summary-card.module';\r\nexport * from './lib/modules/summary-card/components/summary-card/summary-card.component';\r\nexport * from './lib/modules/configurable-form/configurable-form.module';\r\nexport * from './lib/modules/configurable-form/component/configurable-form.component';\r\n// Export Configurable Form resources namespaced to avoid collisions\r\nexport * from './lib/modules/configurable-form/configurable-form.model';\r\nexport * as ConfigurableFormExamples from './lib/modules/configurable-form/configurable-form.examples';\r\n\r\nexport * from './lib/modules/pagination/pagination.module';\r\nexport * from './lib/modules/pagination/components/pagination/pagination.component';\r\nexport * from './lib/modules/nav/nav.module';\r\nexport * from './lib/modules/nav/components/nav/nav.component';\r\nexport * from './lib/modules/nav/nav.models';\r\nexport * from './lib/modules/side-nav/side-nav.module';\r\nexport * from './lib/modules/side-nav/components/side-nav/side-nav.component';\r\nexport * from './lib/modules/side-nav/side-nav.models';\r\nexport * from './lib/utils/constants';\r\nexport * from './lib/modules/alert/alert.module';\r\nexport * from './lib/modules/alert/alert.models';\r\nexport * from './lib/modules/alert/components/alert/alert.component';\r\nexport * from './lib/modules/button/button.module';\r\nexport * from './lib/modules/button/button.models';\r\nexport * from './lib/modules/button/components/button/button.component';\r\nexport * from './lib/modules/confirmation-modal/confirmation-modal.module';\r\nexport * from './lib/modules/confirmation-modal/confirmation-modal.models';\r\nexport * from './lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component';\r\nexport * from './lib/modules/filter-sidebar/filter-sidebar.module';\r\nexport * from './lib/modules/filter-sidebar/filter-sidebar.models';\r\nexport * from './lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component';\r\nexport * from './lib/modules/filter/filter.module';\r\nexport * from './lib/modules/filter/filter.models';\r\nexport * from './lib/modules/filter/components/filter/filter.component';\r\nexport * from './lib/modules/form-components/form-components.module';\r\nexport * from './lib/modules/form-components/components/input/input.component';\r\nexport * from './lib/modules/form-components/components/input/input.models';\r\nexport * from './lib/modules/form-components/components/dropdown/dropdown.component';\r\nexport * from './lib/modules/form-components/components/dropdown/dropdown.models';\r\nexport * from './lib/modules/form-components/components/checkbox/checkbox.component';\r\nexport * from './lib/modules/form-components/components/checkbox/checkbox.models';\r\nexport * from './lib/modules/form-components/components/radio/radio.component';\r\nexport * from './lib/modules/form-components/components/radio/radio.models';\r\nexport * from './lib/modules/form-components/components/toggle/toggle.component';\r\nexport * from './lib/modules/form-components/components/toggle/toggle.models';\r\nexport * from './lib/modules/form-components/components/datepicker/datepicker.component';\r\nexport * from './lib/modules/form-components/components/datepicker/datepicker.models';\r\nexport * from './lib/modules/form-components/components/search/search.component';\r\nexport * from './lib/modules/form-components/components/search/search.models';\r\nexport * from './lib/modules/smart-table/smart-table.module';\r\nexport * from './lib/modules/smart-table/components/smart-table/smart-table.component';\r\nexport * from './lib/modules/smart-table/models/table-config.model';\r\nexport * from './lib/modules/smart-table/utils/smart-table.utils';\r\nexport * from './lib/modules/smart-form/smart-form.module';\r\nexport * from './lib/modules/smart-form/components/smart-form/smart-form.component';\r\nexport {\r\n FormSchema,\r\n SubmitConfig,\r\n FieldConfig,\r\n SectionConfig,\r\n StepperConfig,\r\n TextConfig,\r\n NumberConfig,\r\n DateConfig,\r\n EmailConfig,\r\n PhoneConfig,\r\n GeneratedConfig,\r\n RangeConfig,\r\n AttachmentConfig,\r\n LocationConfig,\r\n RatingConfig,\r\n ValidationResult,\r\n LengthConstraint,\r\n OptionItem\r\n} from './lib/modules/smart-form/models/form-schema.model';\r\nexport * from './lib/modules/smart-form/services/expression.service';\r\nexport * from './lib/modules/smart-form/services/smart-form-controller.service';\r\nexport * from './lib/modules/smart-form/utils/validation.utils';\r\nexport * as SmartFormExamples from './lib/modules/smart-form/smart-form.examples';\r\n\r\nexport * from './lib/modules/snackbar/snackbar.module';\r\nexport * from './lib/modules/snackbar/components/snackbar.component';\r\nexport * from './lib/modules/snackbar/models/snackbar.models';\r\nexport * from './lib/modules/snackbar/services/snackbar.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3.ClickOutsideDirective","i1","i3","i4.InputComponent","i5.DropdownComponent","i6.CheckboxComponent","i7.RadioComponent","i8.ToggleComponent","i9.DatepickerComponent","i10.SearchComponent","i11.ButtonComponent","i4","i9","i2.ExpressionService","i6","i7","i8","i10.ButtonComponent","i12.TrustedUrlPipe","i4.ButtonComponent","i5.FormFieldComponent","i2.SmartFormController","i3.ExpressionService","i5.SnackbarService","i8.ButtonComponent","i9.FormSectionComponent","i5.InputComponent","i6.DropdownComponent","i7.CheckboxComponent","i8.RadioComponent","i9.ToggleComponent","i10.DatepickerComponent","i11.SearchComponent","i5.PaginationComponent","i6.ButtonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6Fa,cAAc,CAAA;wGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YA5DvB,aAAa;YACb,iBAAiB;YACjB,iBAAiB;YACjB,gBAAgB;YAChB,eAAe;YACf,cAAc;YACd,eAAe;YACf,kBAAkB;YAClB,mBAAmB;YACnB,mBAAmB;YACnB,cAAc;YACd,aAAa;YACb,wBAAwB;YACxB,aAAa;YACb,eAAe;YACf,aAAa;YACb,aAAa;YACb,oBAAoB;YACpB,gBAAgB;YAChB,eAAe;YACf,aAAa;YACb,cAAc;YACd,aAAa;YACb,qBAAqB;YACrB,oBAAoB;AACpB,YAAA,qBAAqB,aAGrB,aAAa;YACb,iBAAiB;YACjB,iBAAiB;YACjB,gBAAgB;YAChB,eAAe;YACf,cAAc;YACd,eAAe;YACf,kBAAkB;YAClB,mBAAmB;YACnB,mBAAmB;YACnB,cAAc;YACd,aAAa;YACb,wBAAwB;YACxB,aAAa;YACb,eAAe;YACf,aAAa;YACb,aAAa;YACb,oBAAoB;YACpB,gBAAgB;YAChB,eAAe;YACf,aAAa;YACb,cAAc;YACd,kBAAkB;YAClB,cAAc;YACd,kBAAkB;YAClB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{"version":3,"file":"commons-shared-web-ui.mjs","sources":["../../../src/lib/modules/material/material.module.ts","../../../src/lib/modules/alert/components/alert/alert.component.ts","../../../src/lib/modules/alert/components/alert/alert.component.html","../../../src/lib/modules/alert/alert.module.ts","../../../src/lib/modules/button/components/button/button.component.ts","../../../src/lib/modules/button/components/button/button.component.html","../../../src/lib/modules/button/button.module.ts","../../../src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts","../../../src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html","../../../src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts","../../../src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html","../../../src/lib/modules/confirmation-modal/confirmation-modal.module.ts","../../../src/lib/modules/button-dropdown/button-dropdown.module.ts","../../../src/lib/modules/form-components/components/input/input.component.ts","../../../src/lib/modules/form-components/components/input/input.component.html","../../../src/lib/modules/form-components/directives/click-outside.directive.ts","../../../src/lib/modules/form-components/components/dropdown/dropdown.component.ts","../../../src/lib/modules/form-components/components/dropdown/dropdown.component.html","../../../src/lib/modules/form-components/components/checkbox/checkbox.component.ts","../../../src/lib/modules/form-components/components/checkbox/checkbox.component.html","../../../src/lib/modules/form-components/components/radio/radio.component.ts","../../../src/lib/modules/form-components/components/radio/radio.component.html","../../../src/lib/modules/form-components/components/toggle/toggle.component.ts","../../../src/lib/modules/form-components/components/toggle/toggle.component.html","../../../src/lib/modules/form-components/components/datepicker/datepicker.component.ts","../../../src/lib/modules/form-components/components/datepicker/datepicker.component.html","../../../src/lib/modules/form-components/components/search/search.component.ts","../../../src/lib/modules/form-components/components/search/search.component.html","../../../src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts","../../../src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html","../../../src/lib/modules/form-components/form-components.module.ts","../../../src/lib/modules/filter-sidebar/filter-sidebar.module.ts","../../../src/lib/modules/summary-card/components/summary-card/summary-card.component.ts","../../../src/lib/modules/summary-card/components/summary-card/summary-card.component.html","../../../src/lib/modules/summary-card/summary-card.module.ts","../../../src/lib/utils/translation.utils.ts","../../../src/lib/modules/configurable-form/component/configurable-form.component.ts","../../../src/lib/modules/configurable-form/component/configurable-form.component.html","../../../src/lib/modules/configurable-form/configurable-form.module.ts","../../../src/lib/modules/smart-form/services/smart-form-controller.service.ts","../../../src/lib/modules/smart-form/utils/translation.utils.ts","../../../src/lib/modules/smart-form/services/expression.service.ts","../../../src/lib/modules/snackbar/components/snackbar.component.ts","../../../src/lib/modules/snackbar/components/snackbar.component.html","../../../src/lib/modules/snackbar/services/snackbar.service.ts","../../../src/lib/utils/string.utils.ts","../../../src/lib/modules/smart-form/utils/trusted-url.pipe.ts","../../../src/lib/modules/smart-form/components/form-field/form-field.component.ts","../../../src/lib/modules/smart-form/components/form-field/form-field.component.html","../../../src/lib/modules/smart-form/components/form-section/form-section.component.ts","../../../src/lib/modules/smart-form/components/form-section/form-section.component.html","../../../src/lib/modules/smart-form/components/smart-form/smart-form.component.ts","../../../src/lib/modules/smart-form/components/smart-form/smart-form.component.html","../../../src/lib/modules/smart-form/smart-form.module.ts","../../../src/lib/utils/constants.ts","../../../src/lib/modules/side-nav/components/side-nav/side-nav.component.ts","../../../src/lib/modules/side-nav/components/side-nav/side-nav.component.html","../../../src/lib/modules/side-nav/side-nav.module.ts","../../../src/lib/shared-ui.module.ts","../../../src/lib/utils/storage.utils.ts","../../../src/lib/modules/configurable-form/configurable-form.examples.ts","../../../src/lib/modules/pagination/components/pagination/pagination.component.ts","../../../src/lib/modules/pagination/components/pagination/pagination.component.html","../../../src/lib/modules/pagination/pagination.module.ts","../../../src/lib/modules/nav/components/nav/nav.component.ts","../../../src/lib/modules/nav/components/nav/nav.component.html","../../../src/lib/modules/nav/nav.module.ts","../../../src/lib/modules/filter/components/filter/filter.component.ts","../../../src/lib/modules/filter/components/filter/filter.component.html","../../../src/lib/modules/filter/filter.module.ts","../../../src/lib/modules/smart-table/components/smart-table/smart-table.component.ts","../../../src/lib/modules/smart-table/components/smart-table/smart-table.component.html","../../../src/lib/modules/smart-table/smart-table.module.ts","../../../src/lib/modules/smart-table/utils/smart-table.utils.ts","../../../src/lib/modules/smart-form/utils/validation.utils.ts","../../../src/lib/modules/smart-form/smart-form.examples.ts","../../../src/lib/modules/snackbar/snackbar.module.ts","../../../src/public-api.ts","../../../src/commons-shared-web-ui.ts"],"sourcesContent":["import { NgModule } from \"@angular/core\";\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\nimport { MatCheckboxModule } from '@angular/material/checkbox'\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatNativeDateModule } from \"@angular/material/core\";\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {MatSliderModule} from '@angular/material/slider';\nimport {MatListModule} from '@angular/material/list';\nimport {MatChipsModule} from '@angular/material/chips';\nimport {MatPaginatorModule} from '@angular/material/paginator';\nimport {MatTableModule} from '@angular/material/table';\nimport {MatExpansionModule} from '@angular/material/expansion';\nimport {CdkAccordionModule} from '@angular/cdk/accordion';\nimport { MatSortModule } from \"@angular/material/sort\";\nimport {MatAutocompleteModule} from '@angular/material/autocomplete';\nimport {MatSlideToggleModule} from '@angular/material/slide-toggle';\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\n\n@NgModule({\n imports: [\n MatCardModule,\n MatSnackBarModule,\n MatCheckboxModule,\n MatDividerModule,\n MatSelectModule,\n MatRadioModule,\n MatDialogModule,\n MatFormFieldModule,\n MatDatepickerModule,\n MatNativeDateModule,\n MatInputModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatTabsModule,\n MatButtonModule,\n MatMenuModule,\n MatTabsModule,\n MatProgressBarModule,\n MatTooltipModule,\n MatSliderModule,\n MatListModule,\n MatChipsModule,\n MatSortModule,\n MatAutocompleteModule,\n MatSlideToggleModule,\n MatButtonToggleModule\n ],\n exports: [\n MatCardModule,\n MatSnackBarModule,\n MatCheckboxModule,\n MatDividerModule,\n MatSelectModule,\n MatRadioModule,\n MatDialogModule,\n MatFormFieldModule,\n MatDatepickerModule,\n MatNativeDateModule,\n MatInputModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatTabsModule,\n MatButtonModule,\n MatMenuModule,\n MatTabsModule,\n MatProgressBarModule,\n MatTooltipModule,\n MatSliderModule,\n MatListModule,\n MatChipsModule,\n MatPaginatorModule,\n MatTableModule,\n MatExpansionModule,\n CdkAccordionModule,\n MatSortModule,\n MatAutocompleteModule,\n MatSlideToggleModule,\n MatButtonToggleModule\n ]\n})\nexport class MaterialModule { }\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AlertLabels, AlertVariant, IconInput } from '../../alert.models';\r\n\r\n@Component({\r\n selector: 'lib-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n standalone: false\r\n})\r\nexport class AlertComponent implements OnInit {\r\n @Input() variant: AlertVariant = 'info';\r\n @Input() title: string = '';\r\n @Input() message: string = '';\r\n @Input() icon: IconInput = true;\r\n @Input() customIcon: string = ''; // New input for custom class\r\n @Input() labels?: AlertLabels;\r\n\r\n // Customization Inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() padding?: string;\r\n @Input() gap?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() color?: string; // New input for custom text color\r\n @Input() borderColor?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() boxShadow?: string;\r\n\r\n // Granular Border Radius Customization\r\n @Input() borderTopLeftRadius?: string;\r\n @Input() borderTopRightRadius?: string;\r\n @Input() borderBottomLeftRadius?: string;\r\n @Input() borderBottomRightRadius?: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n get isDefaultIcon(): boolean {\r\n return this.icon === true;\r\n }\r\n\r\n get isStringIcon(): boolean {\r\n return typeof this.icon === 'string';\r\n }\r\n\r\n get isObjectIcon(): boolean {\r\n return typeof this.icon === 'object' && this.icon !== null;\r\n }\r\n\r\n get iconString(): string {\r\n return typeof this.icon === 'string' ? this.icon : '';\r\n }\r\n\r\n get isImgIcon(): boolean {\r\n const icon = this.icon;\r\n if (typeof icon === 'string') {\r\n return icon.includes('/') || icon.includes('.') || icon.startsWith('http');\r\n }\r\n return typeof icon === 'object' && icon !== null && icon.type === 'img';\r\n }\r\n\r\n get iconObject(): { type: string; value: string } {\r\n return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };\r\n }\r\n\r\n get defaultIconClass(): string {\r\n switch (this.variant) {\r\n case 'success': return 'fa-solid fa-circle-check';\r\n case 'warning':\r\n case 'warning-shadow': return 'fa-solid fa-triangle-exclamation';\r\n case 'error': return 'fa-solid fa-triangle-exclamation';\r\n case 'info':\r\n default: return 'fa-solid fa-circle-info';\r\n }\r\n }\r\n}\r\n","<div class=\"cc-alert\" [ngClass]=\"'cc-alert-' + variant\" [style.width]=\"width\" [style.height]=\"height\"\r\n [style.border-radius]=\"borderRadius\" [style.border-top-left-radius]=\"borderTopLeftRadius\"\r\n [style.border-top-right-radius]=\"borderTopRightRadius\" [style.border-bottom-left-radius]=\"borderBottomLeftRadius\"\r\n [style.border-bottom-right-radius]=\"borderBottomRightRadius\" [style.padding]=\"padding\" [style.gap]=\"gap\"\r\n [style.background-color]=\"backgroundColor\" [style.color]=\"color\" [style.border-color]=\"borderColor\"\r\n [style.font-size]=\"fontSize\" [style.font-weight]=\"fontWeight\" [style.box-shadow]=\"boxShadow\">\r\n\r\n <div class=\"cc-alert-icon\" *ngIf=\"icon\">\r\n <i *ngIf=\"customIcon\" [ngClass]=\"customIcon\"></i>\r\n <i *ngIf=\"!customIcon && isDefaultIcon\" [ngClass]=\"defaultIconClass\"></i>\r\n <i *ngIf=\"!customIcon && isStringIcon && !isImgIcon\" [ngClass]=\"iconString\"></i>\r\n <img *ngIf=\"!customIcon && isStringIcon && isImgIcon\" [src]=\"iconString\"\r\n [attr.alt]=\"labels?.iconAltText || 'alert icon'\" />\r\n <ng-container *ngIf=\"isObjectIcon\">\r\n <i *ngIf=\"iconObject.type === 'fontawesome'\" [ngClass]=\"iconObject.value\"></i>\r\n <span *ngIf=\"iconObject.type === 'material'\" class=\"material-icons\">{{ iconObject.value }}</span>\r\n <img *ngIf=\"iconObject.type === 'img'\" [src]=\"iconObject.value\"\r\n [attr.alt]=\"labels?.iconAltText || 'alert icon'\" />\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"cc-alert-content\">\r\n <div class=\"cc-alert-title\" *ngIf=\"title\">{{ title }}</div>\r\n <div class=\"cc-alert-message\" *ngIf=\"message\">{{ message }}</div>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AlertComponent } from './components/alert/alert.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n AlertComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n AlertComponent\r\n ]\r\n})\r\nexport class AlertModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\nimport { ButtonLabels, ButtonVariant } from '../../button.models';\r\n\r\n@Component({\r\n selector: 'lib-button',\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss'],\r\n standalone: false\r\n})\r\nexport class ButtonComponent implements OnInit {\r\n\r\n @Input() variant: ButtonVariant = 'primary';\r\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\r\n @Input() disabled: boolean = false;\r\n\r\n // Customization Inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() color?: string;\r\n @Input() border?: string;\r\n @Input() icon: boolean | string | { type: 'material' | 'fontawesome' | 'img'; value: string } = '';\r\n @Input() labels?: ButtonLabels;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n get isDefaultIcon(): boolean {\r\n return this.icon === true;\r\n }\r\n\r\n get isStringIcon(): boolean {\r\n return typeof this.icon === 'string' && this.icon !== '';\r\n }\r\n\r\n get isImgIcon(): boolean {\r\n const icon = this.icon;\r\n if (typeof icon === 'string') {\r\n return icon.includes('/') || icon.includes('.') || icon.startsWith('http');\r\n }\r\n return typeof icon === 'object' && icon !== null && !!icon.value && (icon.type === 'img' || icon.value.includes('/') || icon.value.includes('.') || icon.value.startsWith('http'));\r\n }\r\n\r\n get isObjectIcon(): boolean {\r\n return typeof this.icon === 'object' && this.icon !== null;\r\n }\r\n\r\n get iconString(): string {\r\n return typeof this.icon === 'string' ? this.icon : '';\r\n }\r\n\r\n get iconObject(): { type: string; value: string } {\r\n return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };\r\n }\r\n\r\n}\r\n","<button [type]=\"type\" [disabled]=\"disabled\" class=\"cc-btn\" [ngClass]=\"'cc-btn-' + variant\" [style.width]=\"width\"\r\n [style.height]=\"height\" [style.border-radius]=\"borderRadius\" [style.font-size]=\"fontSize\"\r\n [style.font-weight]=\"fontWeight\" [style.background-color]=\"backgroundColor\" [style.color]=\"color\"\r\n [style.border]=\"border\">\r\n <div class=\"cc-btn-icon-wrapper\" *ngIf=\"icon\">\r\n <!-- String Icons -->\r\n <ng-container *ngIf=\"isStringIcon\">\r\n <i *ngIf=\"!isImgIcon\" [ngClass]=\"iconString\" class=\"cc-btn-icon\"></i>\r\n <img *ngIf=\"isImgIcon\" [src]=\"iconString\" [attr.alt]=\"labels?.iconAltText || 'button icon'\"\r\n class=\"cc-btn-icon cc-btn-img-icon\" />\r\n </ng-container>\r\n\r\n <!-- Object Icons -->\r\n <ng-container *ngIf=\"isObjectIcon\">\r\n <i *ngIf=\"iconObject.type === 'fontawesome'\" [ngClass]=\"iconObject.value\" class=\"cc-btn-icon\"></i>\r\n <span *ngIf=\"iconObject.type === 'material'\" class=\"material-icons cc-btn-icon\">{{ iconObject.value }}</span>\r\n <img *ngIf=\"iconObject.type === 'img'\" [src]=\"iconObject.value\" [attr.alt]=\"labels?.iconAltText || 'button icon'\"\r\n class=\"cc-btn-icon cc-btn-img-icon\" />\r\n </ng-container>\r\n </div>\r\n <ng-content></ng-content>\r\n</button>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ButtonComponent } from './components/button/button.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n ButtonComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n ButtonComponent\r\n ]\r\n})\r\nexport class ButtonModule { }\r\n","import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnInit,\r\n OnDestroy,\r\n HostListener\r\n} from '@angular/core';\r\nimport { ConfirmationModalConfig } from '../../confirmation-modal.models';\r\n\r\n@Component({\r\n selector: 'cc-confirmation-modal',\r\n templateUrl: './confirmation-modal.component.html',\r\n styleUrls: ['./confirmation-modal.component.scss'],\r\n standalone: false\r\n})\r\nexport class ConfirmationModalComponent implements OnInit, OnDestroy {\r\n @Input() config!: ConfirmationModalConfig;\r\n @Input() isOpen = false;\r\n\r\n @Output() confirm = new EventEmitter<void>();\r\n @Output() cancel = new EventEmitter<void>();\r\n @Output() close = new EventEmitter<void>();\r\n @Output() showCodeSnippet = new EventEmitter<void>();\r\n\r\n // Default configuration\r\n private defaultConfig: Partial<ConfirmationModalConfig> = {\r\n headerTheme: 'dark', // Changed to dark as per new default requirement\r\n width: '560px',\r\n size: 'md',\r\n closeOnBackdrop: true,\r\n closeOnEsc: true,\r\n showCloseButton: true,\r\n cancelButton: {\r\n label: '',\r\n show: true\r\n }\r\n };\r\n\r\n mergedConfig!: ConfirmationModalConfig;\r\n private previousActiveElement: HTMLElement | null = null;\r\n\r\n ngOnInit(): void {\r\n this.updateConfig();\r\n\r\n // Store currently focused element\r\n this.previousActiveElement = document.activeElement as HTMLElement;\r\n\r\n // Prevent body scroll when modal is open\r\n if (this.isOpen) {\r\n this.toggleBodyScroll(true);\r\n }\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.updateConfig();\r\n if (this.isOpen !== undefined) {\r\n this.toggleBodyScroll(this.isOpen);\r\n }\r\n }\r\n\r\n private updateConfig(): void {\r\n // Merge user config with defaults\r\n this.mergedConfig = {\r\n ...this.defaultConfig,\r\n ...this.config,\r\n cancelButton: {\r\n ...this.defaultConfig.cancelButton,\r\n ...this.config.cancelButton\r\n },\r\n confirmButton: {\r\n ...this.config.confirmButton\r\n }\r\n };\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Restore body scroll\r\n this.toggleBodyScroll(false);\r\n\r\n // Restore focus to previous element\r\n if (this.previousActiveElement) {\r\n this.previousActiveElement.focus();\r\n }\r\n }\r\n\r\n private toggleBodyScroll(disable: boolean): void {\r\n if (disable) {\r\n document.body.style.overflow = 'hidden';\r\n } else {\r\n document.body.style.overflow = '';\r\n }\r\n }\r\n\r\n @HostListener('document:keydown.escape', ['$event'])\r\n handleEscape(event: KeyboardEvent): void {\r\n if (this.isOpen && this.mergedConfig.closeOnEsc) {\r\n event.preventDefault();\r\n this.onClose();\r\n }\r\n }\r\n\r\n onBackdropClick(event: MouseEvent): void {\r\n // Only close if clicking directly on backdrop, not modal content\r\n if (\r\n this.mergedConfig.closeOnBackdrop &&\r\n event.target === event.currentTarget\r\n ) {\r\n this.onClose();\r\n }\r\n }\r\n\r\n onConfirm(): void {\r\n if (!this.mergedConfig.confirmButton.disabled &&\r\n !this.mergedConfig.confirmButton.loading) {\r\n this.confirm.emit();\r\n }\r\n }\r\n\r\n onCancel(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n onClose(): void {\r\n this.close.emit();\r\n }\r\n\r\n onShowCodeSnippet(): void {\r\n this.showCodeSnippet.emit();\r\n }\r\n\r\n getModalWidth(): string {\r\n if (this.mergedConfig.size) {\r\n const sizeMap: Record<string, string> = {\r\n sm: '400px',\r\n md: '560px',\r\n lg: '720px'\r\n };\r\n return sizeMap[this.mergedConfig.size];\r\n }\r\n return this.mergedConfig.width || '560px';\r\n }\r\n\r\n getConfirmButtonClass(): string {\r\n const typeMap: Record<string, string> = {\r\n primary: 'cc-btn-primary',\r\n danger: 'cc-btn-danger',\r\n warning: 'cc-btn-warning'\r\n };\r\n return `cc-btn ${typeMap[this.mergedConfig.confirmButton.type]}`;\r\n }\r\n\r\n getHeaderClass(): string {\r\n return `modal-header modal-header--${this.mergedConfig.headerTheme}`;\r\n }\r\n\r\n resolveIconType(icon: any): 'material' | 'custom' | 'img' {\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n if (icon && typeof icon === 'object') {\r\n if (icon.type === 'custom' || (icon.value && (icon.value.includes('/') || icon.value.includes('.') || icon.value.startsWith('http')))) {\r\n return 'custom';\r\n }\r\n return icon.type || 'material';\r\n }\r\n return 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n return typeof icon === 'string' ? icon : icon?.value;\r\n }\r\n\r\n getIconColor(icon: any): string | undefined {\r\n return typeof icon === 'object' ? icon.color : undefined;\r\n }\r\n}\r\n","<div *ngIf=\"isOpen\" class=\"cc-modal-backdrop\" (click)=\"onBackdropClick($event)\" role=\"dialog\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"'modal-title-' + mergedConfig.title\" [attr.aria-label]=\"mergedConfig.ariaLabel\"\r\n [attr.aria-describedby]=\"mergedConfig.ariaDescribedBy\">\r\n\r\n <div class=\"cc-modal-container {{ mergedConfig.customClass }}\" [style.width]=\"getModalWidth()\"\r\n [style.background-color]=\"mergedConfig.backgroundColor\" [style.border-radius]=\"mergedConfig.borderRadius\"\r\n [style.border-top-left-radius]=\"mergedConfig.borderTopLeftRadius\"\r\n [style.border-top-right-radius]=\"mergedConfig.borderTopRightRadius\"\r\n [style.border-bottom-left-radius]=\"mergedConfig.borderBottomLeftRadius\"\r\n [style.border-bottom-right-radius]=\"mergedConfig.borderBottomRightRadius\" (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- Header -->\r\n <div [ngClass]=\"getHeaderClass()\" [style.background-color]=\"mergedConfig.headerBackgroundColor\"\r\n [style.border-bottom]=\"mergedConfig.headerBorderBottom\">\r\n <div class=\"modal-header__content\">\r\n <!-- Icon (Optional) -->\r\n <span *ngIf=\"mergedConfig.icon\" class=\"modal-header__icon\">\r\n <ng-container [ngSwitch]=\"resolveIconType(mergedConfig.icon)\">\r\n <mat-icon *ngSwitchCase=\"'material'\" [style.color]=\"getIconColor(mergedConfig.icon)\">\r\n {{ getIconValue(mergedConfig.icon) }}\r\n </mat-icon>\r\n <img *ngSwitchCase=\"'custom'\" [src]=\"getIconValue(mergedConfig.icon)\"\r\n [attr.alt]=\"mergedConfig.labels?.iconAltText || mergedConfig.title + ' icon'\"\r\n class=\"modal-header__custom-icon\">\r\n <img *ngSwitchCase=\"'img'\" [src]=\"getIconValue(mergedConfig.icon)\"\r\n [attr.alt]=\"mergedConfig.labels?.iconAltText || mergedConfig.title + ' icon'\"\r\n class=\"modal-header__custom-icon\">\r\n </ng-container>\r\n </span>\r\n\r\n <!-- Title -->\r\n <h2 class=\"modal-header__title\" [id]=\"'modal-title-' + mergedConfig.title\"\r\n [style.color]=\"mergedConfig.headerTextColor\">\r\n {{ mergedConfig.title }}\r\n </h2>\r\n </div>\r\n\r\n <!-- Code Snippet Button -->\r\n <button *ngIf=\"mergedConfig.showCodeSnippetButton\" type=\"button\" class=\"modal-header__code-btn\"\r\n (click)=\"onShowCodeSnippet()\" [attr.aria-label]=\"mergedConfig.labels?.codeSnippetAriaLabel\"\r\n [attr.title]=\"mergedConfig.labels?.codeSnippetTitle\">\r\n <mat-icon>code</mat-icon>\r\n </button>\r\n\r\n <!-- Close Button -->\r\n <button *ngIf=\"mergedConfig.showCloseButton\" type=\"button\" class=\"modal-header__close\" (click)=\"onClose()\"\r\n [attr.aria-label]=\"mergedConfig.labels?.closeAriaLabel\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Body (Content Projection) -->\r\n <div class=\"cc-modal-body\" [style.padding]=\"mergedConfig.padding\" [style.color]=\"mergedConfig.bodyTextColor\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"cc-modal-footer\" [style.background-color]=\"mergedConfig.footerBackgroundColor\"\r\n [style.border-top]=\"mergedConfig.footerBorderTop\">\r\n\r\n <ng-container *ngIf=\"!mergedConfig.customFooter\">\r\n <button *ngIf=\"mergedConfig.cancelButton?.show\" type=\"button\" class=\"cc-btn cc-btn-secondary\"\r\n (click)=\"onCancel()\">\r\n {{ mergedConfig.cancelButton?.label }}\r\n </button>\r\n\r\n <button type=\"button\" [ngClass]=\"getConfirmButtonClass()\"\r\n [disabled]=\"mergedConfig.confirmButton.disabled || mergedConfig.confirmButton.loading\"\r\n (click)=\"onConfirm()\">\r\n <span *ngIf=\"mergedConfig.confirmButton.loading\" class=\"cc-btn-spinner\"></span>\r\n {{ mergedConfig.confirmButton.label }}\r\n </button>\r\n </ng-container>\r\n\r\n <ng-content select=\"[cc-modal-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n HostListener,\r\n ElementRef\r\n} from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { DropdownAction } from '../../button-dropdown.models';\r\nimport { ButtonVariant } from '../../../button/button.models';\r\nimport { ConfirmationModalConfig } from '../../../confirmation-modal/confirmation-modal.models';\r\n\r\n@Component({\r\n selector: 'lib-button-dropdown',\r\n templateUrl: './button-dropdown.component.html',\r\n styleUrls: ['./button-dropdown.component.scss'],\r\n standalone: false\r\n})\r\nexport class ButtonDropdownComponent {\r\n @Input() label: string = 'Actions';\r\n @Input() variant: ButtonVariant = 'primary';\r\n @Input() menuTheme: 'light' | 'dark' = 'light';\r\n @Input() icon: string = 'fa fa-chevron-down';\r\n @Input() actions: DropdownAction[] = [];\r\n @Input() data: any = null;\r\n @Input() disabled: boolean = false;\r\n\r\n @Output() apiActionStart = new EventEmitter<DropdownAction>();\r\n @Output() apiActionSuccess = new EventEmitter<{ action: DropdownAction, response: any }>();\r\n @Output() apiActionError = new EventEmitter<{ action: DropdownAction, error: any }>();\r\n @Output() actionClick = new EventEmitter<{ action: DropdownAction, data: any }>();\r\n\r\n isOpen = false;\r\n isConfirmModalOpen = false;\r\n pendingAction: DropdownAction | null = null;\r\n confirmConfig: ConfirmationModalConfig | null = null;\r\n confirmMessage: string = '';\r\n\r\n constructor(\r\n private elementRef: ElementRef,\r\n private router: Router,\r\n private http: HttpClient\r\n ) {}\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClickOutside(event: Event) {\r\n if (!this.elementRef.nativeElement.contains(event.target)) {\r\n this.isOpen = false;\r\n }\r\n }\r\n\r\n toggleDropdown(event: Event) {\r\n if (this.disabled) return;\r\n event.stopPropagation();\r\n this.isOpen = !this.isOpen;\r\n }\r\n\r\n onActionItemClick(action: DropdownAction, event: Event) {\r\n event.stopPropagation();\r\n this.isOpen = false;\r\n\r\n if (action.disabled) return;\r\n\r\n if (action.confirmationNeeded) {\r\n this.pendingAction = action;\r\n \r\n // Smart inference for \"delete\" actions\r\n const isDelete = action.apiMethod === 'DELETE' || \r\n action.variant === 'danger' || \r\n action.color === 'red' || \r\n action.label.toLowerCase().includes('delete');\r\n \r\n // Apply intelligent fallbacks based on action intent\r\n this.confirmMessage = action.confirmationMessage || (isDelete \r\n ? 'Are you sure you want to delete this item? This action cannot be undone.' \r\n : 'Are you sure you want to proceed?');\r\n \r\n this.confirmConfig = {\r\n title: action.confirmationTitle || (isDelete ? 'Confirm Deletion' : 'Please Confirm'),\r\n icon: { type: 'material', value: 'warning', color: isDelete ? '#E63E30' : '#F9C80E' },\r\n confirmButton: {\r\n label: isDelete ? 'Delete' : 'Confirm',\r\n type: isDelete ? 'danger' : 'primary'\r\n },\r\n cancelButton: {\r\n show: true,\r\n label: 'Cancel'\r\n }\r\n };\r\n this.isConfirmModalOpen = true;\r\n } else {\r\n this.executeAction(action);\r\n }\r\n }\r\n\r\n private executeAction(action: DropdownAction) {\r\n this.actionClick.emit({ action, data: this.data });\r\n\r\n if (action.type === 'callback' && action.callback) {\r\n action.callback(this.data);\r\n } else if (action.type === 'route' && action.route) {\r\n this.navigateToRoute(action.route, this.data);\r\n } else if (action.type === 'api' && action.apiUrl) {\r\n this.executeApiCall(action);\r\n }\r\n }\r\n\r\n private navigateToRoute(routePattern: string, rowData: any) {\r\n let finalRoute = routePattern;\r\n // Simple parameter replacement like smart-table: /users/:id -> /users/123\r\n if (rowData) {\r\n Object.keys(rowData).forEach(key => {\r\n finalRoute = finalRoute.replace(`:${key}`, rowData[key]);\r\n });\r\n }\r\n this.router.navigate([finalRoute]);\r\n }\r\n\r\n private executeApiCall(action: DropdownAction) {\r\n this.apiActionStart.emit(action);\r\n \r\n let url = action.apiUrl!;\r\n if (this.data) {\r\n Object.keys(this.data).forEach(key => {\r\n url = url.replace(`:${key}`, this.data[key]);\r\n });\r\n }\r\n\r\n const method = (action.apiMethod || 'GET').toUpperCase();\r\n let request$;\r\n\r\n if (method === 'GET') request$ = this.http.get(url);\r\n else if (method === 'POST') request$ = this.http.post(url, action.apiPayload || this.data);\r\n else if (method === 'PUT') request$ = this.http.put(url, action.apiPayload || this.data);\r\n else if (method === 'DELETE') request$ = this.http.delete(url);\r\n else if (method === 'PATCH') request$ = this.http.patch(url, action.apiPayload || this.data);\r\n else request$ = this.http.get(url); // fallback\r\n\r\n request$.subscribe({\r\n next: (res) => this.apiActionSuccess.emit({ action, response: res }),\r\n error: (err) => this.apiActionError.emit({ action, error: err })\r\n });\r\n }\r\n\r\n invokePendingAction() {\r\n if (this.pendingAction) {\r\n this.executeAction(this.pendingAction);\r\n }\r\n this.closeConfirmModal();\r\n }\r\n\r\n closeConfirmModal() {\r\n this.isConfirmModalOpen = false;\r\n this.pendingAction = null;\r\n this.confirmConfig = null;\r\n this.confirmMessage = '';\r\n }\r\n}\r\n","<div class=\"cc-btn-dropdown-container\">\r\n <!-- Main Toggle Button -->\r\n <lib-button \r\n [variant]=\"variant\" \r\n [disabled]=\"disabled\"\r\n (click)=\"toggleDropdown($event)\">\r\n <span class=\"cc-btn-dropdown-content\">\r\n {{ label }}\r\n <i *ngIf=\"icon\" [class]=\"icon\" class=\"cc-btn-dropdown-icon\"></i>\r\n </span>\r\n </lib-button>\r\n\r\n <!-- Dropdown Menu -->\r\n <div class=\"cc-dropdown-menu\" [ngClass]=\"'cc-dropdown-menu--' + menuTheme\" *ngIf=\"isOpen\">\r\n <button \r\n type=\"button\" \r\n class=\"cc-dropdown-item\" \r\n *ngFor=\"let action of actions\"\r\n [disabled]=\"action.disabled\"\r\n [ngClass]=\"action.variant ? 'cc-dropdown-item--' + action.variant : (action.color === 'red' || action.color === 'danger') ? 'cc-dropdown-item--danger' : ''\"\r\n [style.color]=\"action.color && !action.variant && action.color !== 'red' && action.color !== 'danger' ? action.color : null\"\r\n (click)=\"onActionItemClick(action, $event)\">\r\n <i *ngIf=\"action.icon\" [class]=\"action.icon\" class=\"cc-dropdown-item-icon\"></i>\r\n <span>{{ action.label }}</span>\r\n </button>\r\n <div class=\"cc-dropdown-empty\" *ngIf=\"!actions || actions.length === 0\">\r\n No actions available\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Confirmation Modal for Critical Actions -->\r\n<cc-confirmation-modal \r\n *ngIf=\"isConfirmModalOpen\"\r\n [isOpen]=\"isConfirmModalOpen\" \r\n [config]=\"confirmConfig!\"\r\n (confirm)=\"invokePendingAction()\"\r\n (close)=\"closeConfirmModal()\"\r\n (cancel)=\"closeConfirmModal()\">\r\n <p>{{ confirmMessage }}</p>\r\n</cc-confirmation-modal>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ConfirmationModalComponent } from './components/confirmation-modal/confirmation-modal.component';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n@NgModule({\r\n declarations: [\r\n ConfirmationModalComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatIconModule, // For material icons support\r\n FormsModule // For ngModel in user examples (although mostly projected content, user might need it)\r\n ],\r\n exports: [\r\n ConfirmationModalComponent\r\n ]\r\n})\r\nexport class ConfirmationModalModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { ButtonDropdownComponent } from './components/button-dropdown/button-dropdown.component';\r\nimport { ButtonModule } from '../button/button.module';\r\nimport { ConfirmationModalModule } from '../confirmation-modal/confirmation-modal.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n ButtonDropdownComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n ButtonModule,\r\n ConfirmationModalModule\r\n ],\r\n exports: [\r\n ButtonDropdownComponent\r\n ]\r\n})\r\nexport class ButtonDropdownModule { }\r\n","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { InputConfig, InputType, InputLabels } from './input.models';\r\n\r\n@Component({\r\n selector: 'lib-input',\r\n templateUrl: './input.component.html',\r\n styleUrls: ['./input.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => InputComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class InputComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: InputConfig;\r\n @Input() labels?: InputLabels;\r\n @Input() type: InputType = 'text';\r\n @Input() label: string = '';\r\n @Input() placeholder: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() readonly: boolean = false;\r\n @Input() clearable: boolean = true;\r\n @Input() maxLength?: number;\r\n @Input() minLength?: number;\r\n @Input() min?: number | string;\r\n @Input() max?: number | string;\r\n @Input() pattern?: string;\r\n @Input() errorMessage: string = '';\r\n @Input() helperText: string = '';\r\n @Input() rows: number = 3;\r\n @Input() prefixIcon?: any;\r\n @Input() suffixIcon?: any;\r\n @Input() value: any = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() valueChange = new EventEmitter<any>();\r\n @Output() inputBlur = new EventEmitter<void>();\r\n @Output() inputFocus = new EventEmitter<void>();\r\n\r\n showPassword = false;\r\n focused = false;\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.type = this.config.type ?? this.type;\r\n this.label = this.config.label ?? this.label;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.readonly = this.config.readonly ?? this.readonly;\r\n this.maxLength = this.config.maxLength ?? this.maxLength;\r\n this.minLength = this.config.minLength ?? this.minLength;\r\n this.min = this.config.min ?? this.min;\r\n this.max = this.config.max ?? this.max;\r\n this.pattern = this.config.pattern ?? this.pattern;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.helperText = this.config.helperText ?? this.helperText;\r\n this.rows = this.config.rows ?? this.rows;\r\n this.prefixIcon = this.config.prefixIcon ?? this.prefixIcon;\r\n this.suffixIcon = this.config.suffixIcon ?? this.suffixIcon;\r\n\r\n // Style inputs\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n\r\n if (this.config.value !== undefined) {\r\n this.value = this.config.value;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n this.errorMessage = this.labels.errorMessage || this.errorMessage;\r\n this.helperText = this.labels.helperText || this.helperText;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onInputChange(event: any): void {\r\n const value = event.target.value;\r\n this.value = this.type === 'number' ? (value ? Number(value) : null) : value;\r\n this.onChange(this.value);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n this.inputBlur.emit();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n this.inputFocus.emit();\r\n }\r\n\r\n togglePasswordVisibility(): void {\r\n this.showPassword = !this.showPassword;\r\n }\r\n\r\n getIconType(icon: any): 'material' | 'fontawesome' | 'img' | 'none' {\r\n if (!icon) return 'none';\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n return icon.type || 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n if (typeof icon === 'string') return icon;\r\n return icon?.value || '';\r\n }\r\n\r\n get inputType(): string {\r\n if (this.type === 'password' && this.showPassword) {\r\n return 'text';\r\n }\r\n return this.type === 'textarea' ? 'text' : this.type;\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-input-label-gap': this.getStyleValue(this.gap),\r\n '--cc-input-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-input-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-input-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-input-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-input-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-input-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-input-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-input-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-input-height': this.getStyleValue(this.height),\r\n '--cc-input-padding': this.getStyleValue(this.padding),\r\n '--cc-input-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-input-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-input-color': this.getStyleValue(this.color),\r\n '--cc-input-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-input-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-input-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-input-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-input-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n\r\n","<div class=\"cc-input-container\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-input-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <div class=\"cc-input-wrapper\" [class.focused]=\"focused\" [class.disabled]=\"disabled\" [class.error]=\"errorMessage\"\r\n [ngStyle]=\"fieldStyles\">\r\n\r\n <!-- Prefix Icon -->\r\n <span class=\"cc-input-prefix\" *ngIf=\"prefixIcon\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(prefixIcon) === 'material'\">{{ getIconValue(prefixIcon)\r\n }}</span>\r\n <i *ngIf=\"getIconType(prefixIcon) === 'fontawesome'\" [class]=\"getIconValue(prefixIcon)\"></i>\r\n <img *ngIf=\"getIconType(prefixIcon) === 'img'\" [src]=\"getIconValue(prefixIcon)\" class=\"cc-icon-img\"\r\n [attr.alt]=\"labels?.prefixAltText || 'prefix'\" />\r\n </span>\r\n\r\n <!-- Input -->\r\n <input *ngIf=\"type !== 'textarea'\" class=\"cc-input-element\" [type]=\"inputType\" [value]=\"value\"\r\n [placeholder]=\"placeholder\" [disabled]=\"disabled\" [required]=\"required\" [readonly]=\"readonly\"\r\n [maxLength]=\"maxLength || 524288\" [minLength]=\"minLength || 0\" [min]=\"min\" [max]=\"max\" [pattern]=\"pattern\"\r\n (input)=\"onInputChange($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [attr.aria-invalid]=\"!!errorMessage\"\r\n [attr.aria-describedby]=\"helperText ? 'helper-text' : null\" />\r\n\r\n <!-- Textarea -->\r\n <textarea *ngIf=\"type === 'textarea'\" class=\"cc-input-element cc-textarea\" [value]=\"value\"\r\n [placeholder]=\"placeholder\" [disabled]=\"disabled\" [required]=\"required\" [readonly]=\"readonly\"\r\n [maxLength]=\"maxLength || 524288\" [minLength]=\"minLength || 0\" [rows]=\"rows\" (input)=\"onInputChange($event)\"\r\n (blur)=\"onBlur()\" (focus)=\"onFocus()\" [attr.aria-invalid]=\"!!errorMessage\"></textarea>\r\n\r\n <!-- Suffix Icon / Password Toggle -->\r\n <span class=\"cc-input-suffix\">\r\n <button *ngIf=\"type === 'password'\" type=\"button\" class=\"cc-icon-btn\" (click)=\"togglePasswordVisibility()\"\r\n [attr.aria-label]=\"labels?.passwordToggleAriaLabel\">\r\n <span class=\"material-icons\">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>\r\n </button>\r\n\r\n <ng-container *ngIf=\"suffixIcon && type !== 'password'\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(suffixIcon) === 'material'\">{{ getIconValue(suffixIcon)\r\n }}</span>\r\n <i *ngIf=\"getIconType(suffixIcon) === 'fontawesome'\" [class]=\"getIconValue(suffixIcon)\"></i>\r\n <img *ngIf=\"getIconType(suffixIcon) === 'img'\" [src]=\"getIconValue(suffixIcon)\" class=\"cc-icon-img\"\r\n [attr.alt]=\"labels?.suffixAltText || 'suffix'\" />\r\n </ng-container>\r\n </span>\r\n </div>\r\n\r\n <div class=\"cc-helper-text\" *ngIf=\"helperText\" id=\"helper-text\">{{ helperText }}</div>\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Directive, ElementRef, Output, EventEmitter, HostListener } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[libClickOutside]',\r\n standalone: false\r\n})\r\nexport class ClickOutsideDirective {\r\n @Output() libClickOutside = new EventEmitter<void>();\r\n\r\n constructor(private elementRef: ElementRef) { }\r\n\r\n @HostListener('document:click', ['$event.target'])\r\n public onClick(target: any): void {\r\n const clickedInside = this.elementRef.nativeElement.contains(target);\r\n if (!clickedInside) {\r\n this.libClickOutside.emit();\r\n }\r\n }\r\n}\r\n","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges, HostListener, ViewChild, ElementRef } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\r\nimport { DropdownOption, DropdownConfig, DropdownLabels } from './dropdown.models';\r\n\r\n@Component({\r\n selector: 'lib-dropdown',\r\n templateUrl: './dropdown.component.html',\r\n styleUrls: ['./dropdown.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DropdownComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class DropdownComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: DropdownConfig;\r\n @Input() labels?: DropdownLabels;\r\n @Input() options: DropdownOption[] = [];\r\n @Input() placeholder: string = '';\r\n @Input() label: string = '';\r\n @Input() multiple: boolean = false;\r\n @Input() searchable: boolean = false;\r\n @Input() clearable: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() errorMessage: string = '';\r\n\r\n // Configurable styles\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n // Additional style inputs inferred from template/getters\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() selectionChange = new EventEmitter<any>();\r\n\r\n @ViewChild(CdkVirtualScrollViewport) viewport?: CdkVirtualScrollViewport;\r\n @ViewChild('searchInput') searchInput?: ElementRef;\r\n\r\n filteredOptions: DropdownOption[] = [];\r\n searchTerm: string = '';\r\n value: any = null;\r\n isOpen = false;\r\n focusedIndex = -1;\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.filteredOptions = [...this.options];\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n if (changes['config'] || changes['options']) {\r\n this.filteredOptions = [...this.options];\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.options = this.config.options || this.options;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.label = this.config.label ?? this.label;\r\n this.multiple = this.config.multiple ?? this.multiple;\r\n this.searchable = this.config.searchable ?? this.searchable;\r\n this.clearable = this.config.clearable ?? this.clearable;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n this.errorMessage = this.labels.errorMessage || this.errorMessage;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n get searchPlaceholder(): string {\r\n return this.labels?.searchPlaceholder || 'Search...';\r\n }\r\n\r\n get selectedSuffix(): string {\r\n return this.labels?.selectedSuffix || 'selected';\r\n }\r\n\r\n get clearAriaLabel(): string {\r\n return this.labels?.clearAriaLabel || 'Clear selection';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n toggle(): void {\r\n if (this.disabled) return;\r\n this.isOpen = !this.isOpen;\r\n if (this.isOpen) {\r\n this.focusedIndex = -1;\r\n setTimeout(() => {\r\n if (this.searchable && this.searchInput) {\r\n this.searchInput.nativeElement.focus();\r\n } else if (this.viewport) {\r\n this.viewport.elementRef.nativeElement.focus();\r\n }\r\n });\r\n } else {\r\n this.onTouched();\r\n }\r\n }\r\n\r\n close(): void {\r\n if (this.isOpen) {\r\n this.isOpen = false;\r\n this.onTouched();\r\n }\r\n }\r\n\r\n selectOption(option: DropdownOption): void {\r\n if (option.disabled) return;\r\n\r\n if (this.multiple) {\r\n const currentValues = Array.isArray(this.value) ? [...this.value] : [];\r\n const index = currentValues.indexOf(option.value);\r\n if (index > -1) {\r\n currentValues.splice(index, 1);\r\n } else {\r\n currentValues.push(option.value);\r\n }\r\n this.value = currentValues;\r\n } else {\r\n this.value = option.value;\r\n this.close();\r\n }\r\n\r\n this.onChange(this.value);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n isSelected(option: DropdownOption): boolean {\r\n if (this.multiple) {\r\n return Array.isArray(this.value) && this.value.includes(option.value);\r\n }\r\n return this.value === option.value;\r\n }\r\n\r\n onSearch(term: string): void {\r\n this.searchTerm = term;\r\n if (!term) {\r\n this.filteredOptions = [...this.options];\r\n } else {\r\n this.filteredOptions = this.options.filter(option =>\r\n option.label.toLowerCase().includes(term.toLowerCase())\r\n );\r\n }\r\n this.focusedIndex = -1;\r\n }\r\n\r\n clearSelection(event?: Event): void {\r\n if (event) {\r\n event.stopPropagation();\r\n }\r\n this.value = this.multiple ? [] : null;\r\n this.onChange(this.value);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n getIconType(icon: any): 'material' | 'fontawesome' | 'img' | 'none' {\r\n if (!icon) return 'none';\r\n if (typeof icon === 'string') {\r\n if (icon.includes('/') || icon.includes('.') || icon.startsWith('http')) {\r\n return 'img';\r\n }\r\n return 'material';\r\n }\r\n return icon.type || 'material';\r\n }\r\n\r\n getIconValue(icon: any): string {\r\n if (typeof icon === 'string') return icon;\r\n return icon?.value || '';\r\n }\r\n\r\n getSelectedLabel(): string {\r\n if (this.multiple) {\r\n const count = Array.isArray(this.value) ? this.value.length : 0;\r\n return count > 0 ? `${count} ${this.selectedSuffix}` : '';\r\n }\r\n\r\n if (!this.value) return '';\r\n const selected = this.options.find(opt => opt.value === this.value);\r\n return selected?.label || '';\r\n }\r\n\r\n hasValue(): boolean {\r\n if (this.multiple) {\r\n return Array.isArray(this.value) && this.value.length > 0;\r\n }\r\n return this.value !== null && this.value !== undefined && this.value !== '';\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n handleKeyboardEvent(event: KeyboardEvent): void {\r\n if (this.disabled) return;\r\n\r\n if (event.key === 'Escape') {\r\n this.close();\r\n return;\r\n }\r\n\r\n if (!this.isOpen && (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown')) {\r\n this.toggle();\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n if (!this.isOpen) return;\r\n\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n this.focusedIndex = Math.min(this.focusedIndex + 1, this.filteredOptions.length - 1);\r\n this.scrollToIndex(this.focusedIndex);\r\n event.preventDefault();\r\n break;\r\n case 'ArrowUp':\r\n this.focusedIndex = Math.max(this.focusedIndex - 1, 0);\r\n this.scrollToIndex(this.focusedIndex);\r\n event.preventDefault();\r\n break;\r\n case 'Enter':\r\n if (this.focusedIndex > -1) {\r\n this.selectOption(this.filteredOptions[this.focusedIndex]);\r\n }\r\n event.preventDefault();\r\n break;\r\n }\r\n }\r\n\r\n scrollToIndex(index: number): void {\r\n if (this.viewport) {\r\n this.viewport.scrollToIndex(index);\r\n }\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-dropdown-label-gap': this.getStyleValue(this.gap),\r\n '--cc-dropdown-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-dropdown-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-dropdown-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-dropdown-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-dropdown-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-dropdown-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-dropdown-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-dropdown-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-dropdown-height': this.getStyleValue(this.height),\r\n '--cc-dropdown-padding': this.getStyleValue(this.padding),\r\n '--cc-dropdown-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-dropdown-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-dropdown-color': this.getStyleValue(this.color),\r\n '--cc-dropdown-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-dropdown-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-dropdown-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-dropdown-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-dropdown-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-dropdown-wrapper\" [ngStyle]=\"wrapperStyles\" libClickOutside (libClickOutside)=\"close()\">\r\n <!-- Label -->\r\n <label *ngIf=\"label\" class=\"cc-dropdown-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <!-- Trigger -->\r\n <div class=\"cc-dropdown-trigger\" [class.disabled]=\"disabled\" [class.open]=\"isOpen\" [class.error]=\"errorMessage\"\r\n (click)=\"toggle()\" tabindex=\"0\" (keydown)=\"handleKeyboardEvent($event)\" [ngStyle]=\"fieldStyles\">\r\n\r\n <div class=\"cc-selected-value\" *ngIf=\"hasValue()\">\r\n {{ multiple ? value.length + ' ' + selectedSuffix : getSelectedLabel() }}\r\n </div>\r\n <div class=\"cc-placeholder\" *ngIf=\"!hasValue()\">{{ placeholder }}</div>\r\n\r\n <div class=\"cc-actions\">\r\n <span *ngIf=\"clearable && hasValue() && !disabled\" class=\"cc-clear-btn\" (click)=\"clearSelection($event)\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </span>\r\n <span class=\"cc-arrow material-icons\">expand_more</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Dropdown Menu -->\r\n <div class=\"cc-dropdown-menu\" *ngIf=\"isOpen\">\r\n <!-- Search -->\r\n <div class=\"cc-search-container\" *ngIf=\"searchable\">\r\n <input type=\"text\" #searchInput [placeholder]=\"searchPlaceholder\"\r\n (input)=\"onSearch($any($event.target).value)\" (click)=\"$event.stopPropagation()\"\r\n class=\"cc-dropdown-search-input\" />\r\n </div>\r\n\r\n <!-- Options Virtual Scroll -->\r\n <cdk-virtual-scroll-viewport itemSize=\"40\" class=\"cc-virtual-scroll\"\r\n [style.height.px]=\"filteredOptions.length * 40 > 240 ? 240 : (filteredOptions.length * 40 || 40)\">\r\n\r\n <div *cdkVirtualFor=\"let option of filteredOptions; let i = index\" class=\"cc-option\"\r\n [class.selected]=\"isSelected(option)\" [class.focused]=\"i === focusedIndex\"\r\n [class.disabled]=\"option.disabled\" (click)=\"selectOption(option)\">\r\n\r\n <!-- Multi-select checkbox visual -->\r\n <span class=\"cc-multi-check\" *ngIf=\"multiple\">\r\n <span class=\"material-icons\" *ngIf=\"isSelected(option)\">check_box</span>\r\n <span class=\"material-icons\" *ngIf=\"!isSelected(option)\">check_box_outline_blank</span>\r\n </span>\r\n\r\n <!-- Icon -->\r\n <span class=\"cc-option-icon-wrapper\" *ngIf=\"option.icon\">\r\n <span class=\"material-icons\" *ngIf=\"getIconType(option.icon) === 'material'\">{{\r\n getIconValue(option.icon) }}</span>\r\n <i *ngIf=\"getIconType(option.icon) === 'fontawesome'\" [class]=\"getIconValue(option.icon)\"></i>\r\n <img *ngIf=\"getIconType(option.icon) === 'img'\" [src]=\"getIconValue(option.icon)\"\r\n class=\"cc-option-img\" alt=\"icon\" />\r\n </span>\r\n\r\n <span class=\"cc-option-label\">{{ option.label }}</span>\r\n\r\n <!-- Single-select check visual -->\r\n <span class=\"cc-single-check\" *ngIf=\"!multiple && isSelected(option)\">\r\n <span class=\"material-icons\">check</span>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"cc-no-results\">{{ labels?.noResultsFound || 'No results\r\n found' }}</div>\r\n </cdk-virtual-scroll-viewport>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CheckboxConfig, CheckboxOption, CheckboxLabels } from './checkbox.models';\r\n\r\n@Component({\r\n selector: 'lib-checkbox',\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CheckboxComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class CheckboxComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config: CheckboxConfig = {};\r\n @Input() labels?: CheckboxLabels;\r\n @Input() label: string = '';\r\n @Input() checked: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() indeterminate: boolean = false;\r\n @Input() options: CheckboxOption[] = [];\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: string = '#007bff';\r\n @Input() borderRadius: string = '4px';\r\n @Input() value: any = null;\r\n @Input() errorMessage: string = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Input() size?: string;\r\n @Input() checkedColor?: string;\r\n @Input() uncheckedColor?: string;\r\n @Input() groupLabelColor?: string;\r\n @Input() groupLabelFontSize?: string;\r\n @Input() groupLabelFontWeight?: string;\r\n\r\n @Output() checkedChange = new EventEmitter<any>();\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n\r\n if (this.isGroup) {\r\n this.value = this.options\r\n .filter(opt => opt.checked)\r\n .map(opt => opt.value);\r\n } else {\r\n this.value = this.checked;\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.checked = this.config.checked ?? this.checked;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.indeterminate = this.config.indeterminate ?? this.indeterminate;\r\n this.options = this.config.options || this.options;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.size = this.config.size ?? this.size;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.groupLabelColor = this.config.groupLabelColor ?? this.groupLabelColor;\r\n this.groupLabelFontSize = this.config.groupLabelFontSize ?? this.groupLabelFontSize;\r\n this.groupLabelFontWeight = this.config.groupLabelFontWeight ?? this.groupLabelFontWeight;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n get isGroup(): boolean {\r\n return this.options && this.options.length > 0;\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (this.isGroup) {\r\n this.value = Array.isArray(value) ? value : [];\r\n this.options.forEach(opt => {\r\n opt.checked = (this.value as any[]).includes(opt.value);\r\n });\r\n } else {\r\n this.value = !!value;\r\n this.checked = this.value as boolean;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onCheckboxChange(event: any): void {\r\n const checked = event.target.checked;\r\n this.value = checked;\r\n this.checked = checked;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.checkedChange.emit(this.value);\r\n }\r\n\r\n onGroupCheckboxChange(option: CheckboxOption, event: any): void {\r\n const checked = event.target.checked;\r\n option.checked = checked;\r\n\r\n const valueArray = this.value as any[];\r\n if (checked) {\r\n if (!valueArray.includes(option.value)) {\r\n this.value = [...valueArray, option.value];\r\n }\r\n } else {\r\n this.value = valueArray.filter(v => v !== option.value);\r\n }\r\n\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.checkedChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-checkbox-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-checkbox-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-checkbox-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-checkbox-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-checkbox-size': this.getStyleValue(this.size),\r\n '--cc-checkbox-checked-color': this.getStyleValue(this.checkedColor),\r\n '--cc-checkbox-unchecked-color': this.getStyleValue(this.uncheckedColor),\r\n '--cc-checkbox-disabled-color': this.getStyleValue(this.disabledColor),\r\n '--cc-checkbox-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-checkbox-group-gap': this.getStyleValue(this.gap),\r\n '--cc-checkbox-group-label-color': this.getStyleValue(this.groupLabelColor),\r\n '--cc-checkbox-group-label-font-size': this.getStyleValue(this.groupLabelFontSize),\r\n '--cc-checkbox-group-label-font-weight': this.getStyleValue(this.groupLabelFontWeight),\r\n '--cc-checkbox-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-checkbox-label-font-weight': this.getStyleValue(this.labelFontWeight),\r\n '--cc-checkbox-border-radius': this.getStyleValue(this.borderRadius)\r\n };\r\n }\r\n}\r\n\r\n","<div class=\"cc-checkbox-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n\r\n <!-- Single Checkbox -->\r\n <label *ngIf=\"!isGroup\" class=\"cc-checkbox-label\" [class.label-before]=\"labelPosition === 'before'\"\r\n [class.disabled]=\"disabled\" [class.checked]=\"checked\">\r\n <input type=\"checkbox\" class=\"cc-native-checkbox\" [checked]=\"checked\" [disabled]=\"disabled\"\r\n [required]=\"required\" [indeterminate]=\"indeterminate\" (change)=\"onCheckboxChange($event)\" />\r\n <span class=\"cc-checkmark\"></span>\r\n <span class=\"cc-text\" *ngIf=\"label\">{{ label }}</span>\r\n </label>\r\n\r\n <!-- Checkbox Group -->\r\n <div *ngIf=\"isGroup\" class=\"cc-checkbox-group\">\r\n <label *ngIf=\"label\" class=\"cc-checkbox-group-label\" [class.label-before]=\"labelPosition === 'before'\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <label *ngFor=\"let option of options\" class=\"cc-checkbox-label\" [class.disabled]=\"disabled || option.disabled\"\r\n [class.checked]=\"option.checked\">\r\n <input type=\"checkbox\" class=\"cc-native-checkbox\" [checked]=\"option.checked\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onGroupCheckboxChange(option, $event)\" />\r\n <span class=\"cc-checkmark\"></span>\r\n <span class=\"cc-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { RadioConfig, RadioOption, RadioLabels } from './radio.models';\r\n\r\n@Component({\r\n selector: 'lib-radio',\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => RadioComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class RadioComponent implements ControlValueAccessor, OnInit {\r\n @Input() config?: RadioConfig;\r\n @Input() label: string = '';\r\n @Input() options: RadioOption[] = [];\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: 'primary' | 'accent' | 'warn' = 'primary';\r\n @Input() layout: 'vertical' | 'horizontal' = 'vertical';\r\n\r\n // i18n Labels\r\n @Input() labels: RadioLabels = {};\r\n\r\n // Customization — Layout\r\n @Input() gap?: string;\r\n\r\n // Customization — Colors\r\n @Input() labelColor?: string;\r\n @Input() checkedColor?: string;\r\n @Input() uncheckedColor?: string;\r\n\r\n // Customization — Typography\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() fontFamily?: string;\r\n\r\n // Customization — Group label\r\n @Input() groupLabelColor?: string;\r\n @Input() groupLabelFontSize?: string;\r\n @Input() groupLabelFontWeight?: string;\r\n\r\n // Customization — States\r\n @Input() disabledColor?: string;\r\n @Input() errorColor?: string;\r\n\r\n // Customization — Size\r\n @Input() size?: string;\r\n @Input() borderRadius?: string;\r\n\r\n // Customization — Synonyms for Playground\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Output() selectionChange = new EventEmitter<any>();\r\n\r\n value: any;\r\n uuid = `radio-group-${Math.random().toString(36).substr(2, 9)}`;\r\n\r\n private onChange: (value: any) => void = () => { };\r\n private onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n // i18n labels override\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n ngOnChanges(changes: any): void {\r\n if (changes.config) {\r\n this.updateFromConfig();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.options = this.config.options || this.options;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.layout = this.config.layout ?? this.layout;\r\n this.value = this.config.value;\r\n\r\n // Style mappings\r\n this.gap = this.config.gap ?? this.gap;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.groupLabelColor = this.config.groupLabelColor ?? this.groupLabelColor;\r\n this.groupLabelFontSize = this.config.groupLabelFontSize ?? this.groupLabelFontSize;\r\n this.groupLabelFontWeight = this.config.groupLabelFontWeight ?? this.groupLabelFontWeight;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.size = this.config.size ?? this.size;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n }\r\n }\r\n\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onRadioChange(event: any): void {\r\n this.value = event.target.value;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-radio-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-radio-font-size': this.getStyleValue(this.fontSize || this.labelFontSize),\r\n '--cc-radio-font-weight': this.getStyleValue(this.fontWeight || this.labelFontWeight),\r\n '--cc-radio-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-radio-size': this.getStyleValue(this.size),\r\n '--cc-radio-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-radio-checked-color': this.getStyleValue(this.checkedColor),\r\n '--cc-radio-unchecked-color': this.getStyleValue(this.uncheckedColor),\r\n '--cc-radio-disabled-color': this.getStyleValue(this.disabledColor),\r\n '--cc-radio-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-radio-group-gap': this.getStyleValue(this.gap),\r\n '--cc-radio-group-label-color': this.getStyleValue(this.groupLabelColor),\r\n '--cc-radio-group-label-font-size': this.getStyleValue(this.groupLabelFontSize),\r\n '--cc-radio-group-label-font-weight': this.getStyleValue(this.groupLabelFontWeight)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-radio-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-radio-group-label\" [class.disabled]=\"disabled\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <div class=\"cc-radio-group\" [class.horizontal]=\"layout === 'horizontal'\" [class.vertical]=\"layout === 'vertical'\"\r\n role=\"radiogroup\">\r\n\r\n <label class=\"cc-radio-label\" *ngFor=\"let option of options; let i = index\"\r\n [class.disabled]=\"disabled || option.disabled\" [class.checked]=\"value === option.value\"\r\n [class.label-before]=\"labelPosition === 'before'\">\r\n\r\n <input type=\"radio\" [name]=\"uuid\" [value]=\"option.value\" [checked]=\"value === option.value\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onRadioChange($event)\" class=\"cc-native-radio\"\r\n [id]=\"uuid + '-' + i\">\r\n\r\n <span class=\"cc-radio-circle\"></span>\r\n <span class=\"cc-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { ToggleConfig, ToggleLabels } from './toggle.models';\r\n\r\n@Component({\r\n selector: 'lib-toggle',\r\n templateUrl: './toggle.component.html',\r\n styleUrls: ['./toggle.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => ToggleComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class ToggleComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: ToggleConfig;\r\n @Input() labels?: ToggleLabels;\r\n @Input() label: string = '';\r\n @Input() checked: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() labelPosition: 'before' | 'after' = 'after';\r\n @Input() color: string = '#1A73E8';\r\n\r\n // Customization — Colors\r\n @Input() labelColor?: string;\r\n @Input() uncheckedColor?: string;\r\n @Input() checkedColor?: string;\r\n @Input() thumbColor?: string;\r\n @Input() checkedThumbColor?: string;\r\n\r\n // Customization — Typography\r\n @Input() fontSize?: string;\r\n @Input() fontWeight?: string;\r\n @Input() fontFamily?: string;\r\n\r\n // Customization — Size\r\n @Input() toggleWidth?: string;\r\n @Input() toggleHeight?: string;\r\n @Input() gap?: string;\r\n\r\n // Customization — Slider\r\n @Input() sliderColor?: string;\r\n\r\n // Customization — Label\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n // Customization — States\r\n @Input() disabledColor?: string;\r\n\r\n @Output() toggleChange = new EventEmitter<boolean>();\r\n\r\n value: boolean = false;\r\n\r\n private onChange: (value: any) => void = () => { };\r\n private onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.value = this.checked;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n if (changes['checked']) {\r\n this.value = this.checked;\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.checked = this.config.checked ?? this.checked;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.labelPosition = this.config.labelPosition ?? this.labelPosition;\r\n this.color = this.config.color ?? this.color;\r\n this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;\r\n this.checkedColor = this.config.checkedColor ?? this.checkedColor;\r\n this.thumbColor = this.config.thumbColor ?? this.thumbColor;\r\n this.checkedThumbColor = this.config.checkedThumbColor ?? this.checkedThumbColor;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.toggleWidth = this.config.toggleWidth ?? this.toggleWidth;\r\n this.toggleHeight = this.config.toggleHeight ?? this.toggleHeight;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n }\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = !!value;\r\n this.checked = this.value;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onToggleChange(event: any): void {\r\n this.value = event.target.checked;\r\n this.checked = this.value;\r\n this.onChange(this.value);\r\n this.onTouched();\r\n this.toggleChange.emit(this.value);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-toggle-font-family': this.getStyleValue(this.fontFamily),\r\n '--cc-toggle-font-size': this.getStyleValue(this.fontSize || this.labelFontSize),\r\n '--cc-toggle-font-weight': this.getStyleValue(this.fontWeight || this.labelFontWeight),\r\n '--cc-toggle-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-toggle-width': this.getStyleValue(this.toggleWidth),\r\n '--cc-toggle-height': this.getStyleValue(this.toggleHeight),\r\n '--cc-toggle-gap': this.getStyleValue(this.gap),\r\n '--cc-toggle-unchecked-bg': this.getStyleValue(this.uncheckedColor),\r\n '--cc-toggle-checked-bg': this.getStyleValue(this.checkedColor || this.color),\r\n '--cc-toggle-thumb-color': this.getStyleValue(this.thumbColor || this.sliderColor),\r\n '--cc-toggle-checked-thumb-color': this.getStyleValue(this.checkedThumbColor),\r\n '--cc-toggle-disabled-color': this.getStyleValue(this.disabledColor)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-toggle-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label class=\"cc-toggle-label\" [class.label-before]=\"labelPosition === 'before'\" [class.disabled]=\"disabled\">\r\n\r\n <span class=\"cc-label-text\" *ngIf=\"label && labelPosition === 'before'\">{{ label }}</span>\r\n\r\n <span class=\"cc-toggle-switch\">\r\n <input type=\"checkbox\" class=\"cc-native-toggle\" [checked]=\"checked\" [disabled]=\"disabled\"\r\n (change)=\"onToggleChange($event)\" />\r\n <span class=\"cc-toggle-track\"></span>\r\n <span class=\"cc-toggle-thumb\"></span>\r\n </span>\r\n\r\n <span class=\"cc-label-text\" *ngIf=\"label && labelPosition === 'after'\">{{ label }}</span>\r\n </label>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DatePickerConfig, DatepickerLabels } from './datepicker.models';\r\n\r\n@Component({\r\n selector: 'lib-datepicker',\r\n templateUrl: './datepicker.component.html',\r\n styleUrls: ['./datepicker.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DatepickerComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class DatepickerComponent implements ControlValueAccessor, OnInit, OnChanges {\r\n @Input() config?: DatePickerConfig;\r\n @Input() labels?: DatepickerLabels;\r\n @Input() label: string = '';\r\n @Input() placeholder: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() required: boolean = false;\r\n @Input() minDate?: string | Date; // Support string for native input\r\n @Input() maxDate?: string | Date; // Support string for native input\r\n @Input() isRange: boolean = false;\r\n @Input() startView: 'month' | 'year' | 'multi-year' = 'month';\r\n @Input() value: any = null;\r\n @Input() startDate?: string | Date;\r\n @Input() endDate?: string | Date;\r\n @Input() errorMessage: string = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() errorColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() dateChange = new EventEmitter<any>();\r\n\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n focused = false;\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.label = this.config.label ?? this.label;\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.required = this.config.required ?? this.required;\r\n this.minDate = this.config.minDate ?? this.minDate;\r\n this.maxDate = this.config.maxDate ?? this.maxDate;\r\n this.isRange = this.config.isRange ?? this.isRange;\r\n this.width = this.config.width ?? this.width;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.errorMessage = this.config.errorMessage ?? this.errorMessage;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.errorColor = this.config.errorColor ?? this.errorColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n this.height = this.config.height ?? this.height;\r\n\r\n if (this.config.value !== undefined) {\r\n this.value = this.config.value;\r\n }\r\n if (this.config.startDate) {\r\n this.startDate = this.config.startDate;\r\n }\r\n if (this.config.endDate) {\r\n this.endDate = this.config.endDate;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n }\r\n }\r\n\r\n get requiredMarker(): string {\r\n return this.labels?.requiredMarker || '*';\r\n }\r\n\r\n get startDateLabel(): string {\r\n return this.labels?.startDateLabel || 'Start Date';\r\n }\r\n\r\n get endDateLabel(): string {\r\n return this.labels?.endDateLabel || 'End Date';\r\n }\r\n\r\n // Helper to format Date or string to YYYY-MM-DD for native input\r\n private formatDate(date: Date | string | undefined | null): string {\r\n if (!date) return '';\r\n if (typeof date === 'string') return date; // Assume already formatted or ISO\r\n try {\r\n return date.toISOString().split('T')[0];\r\n } catch (e) {\r\n return '';\r\n }\r\n }\r\n\r\n get formattedValue(): string {\r\n return this.formatDate(this.value);\r\n }\r\n\r\n get formattedStartDate(): string {\r\n return this.formatDate(this.startDate);\r\n }\r\n\r\n get formattedEndDate(): string {\r\n return this.formatDate(this.endDate);\r\n }\r\n\r\n get formattedMin(): string {\r\n return this.formatDate(this.minDate);\r\n }\r\n\r\n get formattedMax(): string {\r\n return this.formatDate(this.maxDate);\r\n }\r\n\r\n\r\n writeValue(value: any): void {\r\n if (this.isRange && value && typeof value === 'object' && 'start' in value) {\r\n this.startDate = value.start;\r\n this.endDate = value.end;\r\n } else {\r\n this.value = value;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onDateInput(event: any): void {\r\n const value = event.target.value;\r\n this.value = value; // Keep as string or convert if needed\r\n this.onChange(this.value);\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n }\r\n\r\n onRangeStartInput(event: any): void {\r\n this.startDate = event.target.value;\r\n this.updateRangeValue();\r\n }\r\n\r\n onRangeEndInput(event: any): void {\r\n this.endDate = event.target.value;\r\n this.updateRangeValue();\r\n }\r\n\r\n private updateRangeValue(): void {\r\n const rangeValue = { start: this.startDate, end: this.endDate };\r\n this.onChange(rangeValue);\r\n this.dateChange.emit(rangeValue);\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-datepicker-label-gap': this.getStyleValue(this.gap),\r\n '--cc-datepicker-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-datepicker-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-datepicker-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-datepicker-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-datepicker-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-datepicker-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-datepicker-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-datepicker-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-datepicker-height': this.getStyleValue(this.height),\r\n '--cc-datepicker-padding': this.getStyleValue(this.padding),\r\n '--cc-datepicker-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-datepicker-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-datepicker-color': this.getStyleValue(this.color),\r\n '--cc-datepicker-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-datepicker-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-datepicker-error-color': this.getStyleValue(this.errorColor),\r\n '--cc-datepicker-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-datepicker-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-datepicker-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-datepicker-label\" [ngStyle]=\"labelStyles\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"cc-required\">{{ requiredMarker }}</span>\r\n </label>\r\n\r\n <!-- Single Date Picker -->\r\n <div *ngIf=\"!isRange\" class=\"cc-datepicker-field\" [class.focused]=\"focused\" [class.disabled]=\"disabled\"\r\n [class.error]=\"errorMessage\" [ngStyle]=\"fieldStyles\">\r\n\r\n <input type=\"date\" class=\"cc-datepicker-input\" #dateInput [value]=\"formattedValue\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedMin\" [max]=\"formattedMax\" [placeholder]=\"placeholder\"\r\n (input)=\"onDateInput($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" (click)=\"dateInput.showPicker()\" />\r\n\r\n <span class=\"cc-datepicker-icon material-icons\" (click)=\"dateInput.showPicker()\">calendar_today</span>\r\n </div>\r\n\r\n <!-- Range Date Picker -->\r\n <div *ngIf=\"isRange\" class=\"cc-datepicker-range\">\r\n <!-- Start Date -->\r\n <div class=\"cc-datepicker-subfield\">\r\n <label class=\"cc-datepicker-sublabel\">{{ startDateLabel }}</label>\r\n <div class=\"cc-datepicker-field\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <input type=\"date\" class=\"cc-datepicker-input\" [value]=\"formattedStartDate\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedMin\" [max]=\"formattedEndDate || formattedMax\"\r\n (input)=\"onRangeStartInput($event)\" />\r\n </div>\r\n </div>\r\n\r\n <!-- End Date -->\r\n <div class=\"cc-datepicker-subfield\">\r\n <label class=\"cc-datepicker-sublabel\">{{ endDateLabel }}</label>\r\n <div class=\"cc-datepicker-field\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <input type=\"date\" class=\"cc-datepicker-input\" [value]=\"formattedEndDate\" [disabled]=\"disabled\"\r\n [required]=\"required\" [min]=\"formattedStartDate || formattedMin\" [max]=\"formattedMax\"\r\n (input)=\"onRangeEndInput($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"cc-error-message\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\r\n</div>","import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { FilterSearchConfig, SearchLabels } from './search.models';\r\n\r\n@Component({\r\n selector: 'lib-search',\r\n templateUrl: './search.component.html',\r\n styleUrls: ['./search.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => SearchComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class SearchComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {\r\n @Input() config?: FilterSearchConfig;\r\n @Input() labels?: SearchLabels;\r\n @Input() placeholder: string = '';\r\n @Input() label: string = '';\r\n @Input() disabled: boolean = false;\r\n @Input() debounceMs: number = 300;\r\n @Input() clearable: boolean = true;\r\n @Input() value: any = '';\r\n\r\n // Style inputs\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n @Input() borderRadius?: string;\r\n @Input() fontSize?: string;\r\n\r\n @Input() gap?: string;\r\n @Input() fontFamily?: string;\r\n @Input() labelColor?: string;\r\n @Input() labelFontSize?: string;\r\n @Input() labelFontWeight?: string;\r\n\r\n @Input() backgroundColor?: string;\r\n @Input() borderColor?: string;\r\n @Input() borderWidth?: string;\r\n @Input() border?: string; // Shorthand\r\n @Input() padding?: string;\r\n @Input() fontWeight?: string;\r\n @Input() color?: string;\r\n @Input() textColor?: string; // Alias for color or specific text color\r\n @Input() iconColor?: string;\r\n @Input() placeholderColor?: string;\r\n @Input() focusBorderColor?: string;\r\n @Input() disabledBackgroundColor?: string;\r\n @Input() disabledColor?: string;\r\n @Input() boxShadow?: string;\r\n\r\n @Output() search = new EventEmitter<string>();\r\n @Output() clear = new EventEmitter<void>();\r\n\r\n private searchSubject = new Subject<string>();\r\n focused = false;\r\n onChange: (value: any) => void = () => { };\r\n onTouched: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this.updateFromConfig();\r\n this.updateFromLabels();\r\n this.searchSubject.pipe(\r\n debounceTime(this.debounceMs),\r\n distinctUntilChanged()\r\n ).subscribe(value => {\r\n this.search.emit(value);\r\n });\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config']) {\r\n this.updateFromConfig();\r\n }\r\n if (changes['labels']) {\r\n this.updateFromLabels();\r\n }\r\n }\r\n\r\n private updateFromConfig(): void {\r\n if (this.config) {\r\n this.placeholder = this.config.placeholder ?? this.placeholder;\r\n this.label = this.config.label ?? this.label;\r\n this.disabled = this.config.disabled ?? this.disabled;\r\n this.debounceMs = this.config.debounceTime ?? this.debounceMs;\r\n this.clearable = this.config.clearable ?? this.clearable;\r\n this.width = this.config.width ?? this.width;\r\n this.height = this.config.height ?? this.height;\r\n this.borderRadius = this.config.borderRadius ?? this.borderRadius;\r\n this.fontSize = this.config.fontSize ?? this.fontSize;\r\n this.gap = this.config.gap ?? this.gap;\r\n this.fontFamily = this.config.fontFamily ?? this.fontFamily;\r\n this.labelColor = this.config.labelColor ?? this.labelColor;\r\n this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;\r\n this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;\r\n this.backgroundColor = this.config.backgroundColor ?? this.backgroundColor;\r\n this.borderColor = this.config.borderColor ?? this.borderColor;\r\n this.borderWidth = this.config.borderWidth ?? this.borderWidth;\r\n this.border = this.config.border ?? this.border;\r\n this.padding = this.config.padding ?? this.padding;\r\n this.fontWeight = this.config.fontWeight ?? this.fontWeight;\r\n this.color = this.config.color ?? this.color;\r\n this.textColor = this.config.textColor ?? this.textColor;\r\n this.iconColor = this.config.iconColor ?? this.iconColor;\r\n this.placeholderColor = this.config.placeholderColor ?? this.placeholderColor;\r\n this.focusBorderColor = this.config.focusBorderColor ?? this.focusBorderColor;\r\n this.disabledBackgroundColor = this.config.disabledBackgroundColor ?? this.disabledBackgroundColor;\r\n this.disabledColor = this.config.disabledColor ?? this.disabledColor;\r\n this.boxShadow = this.config.boxShadow ?? this.boxShadow;\r\n if (this.config.value) {\r\n this.value = this.config.value;\r\n }\r\n }\r\n }\r\n\r\n private updateFromLabels(): void {\r\n if (this.labels) {\r\n this.label = this.labels.label || this.label;\r\n this.placeholder = this.labels.placeholder || this.placeholder;\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.searchSubject.complete();\r\n }\r\n\r\n get clearAriaLabel(): string {\r\n return this.labels?.clearAriaLabel || 'Clear search';\r\n }\r\n\r\n writeValue(value: any): void {\r\n this.value = value || '';\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n onInputChange(event: any): void {\r\n this.value = event.target.value;\r\n this.onChange(this.value);\r\n this.searchSubject.next(this.value);\r\n }\r\n\r\n onClear(): void {\r\n this.value = '';\r\n this.onChange(this.value);\r\n this.searchSubject.next(this.value);\r\n this.clear.emit();\r\n }\r\n\r\n onBlur(): void {\r\n this.focused = false;\r\n this.onTouched();\r\n }\r\n\r\n onFocus(): void {\r\n this.focused = true;\r\n }\r\n\r\n private getStyleValue(value: string | undefined): string | undefined {\r\n return value ? `${value}` : undefined;\r\n }\r\n\r\n get wrapperStyles(): { [key: string]: string | undefined } {\r\n return {\r\n 'width': this.getStyleValue(this.width),\r\n '--cc-search-label-gap': this.getStyleValue(this.gap),\r\n '--cc-search-font-family': this.getStyleValue(this.fontFamily)\r\n };\r\n }\r\n\r\n get labelStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-search-label-color': this.getStyleValue(this.labelColor),\r\n '--cc-search-label-font-size': this.getStyleValue(this.labelFontSize),\r\n '--cc-search-label-font-weight': this.getStyleValue(this.labelFontWeight)\r\n };\r\n }\r\n\r\n get fieldStyles(): { [key: string]: string | undefined } {\r\n return {\r\n '--cc-search-bg': this.getStyleValue(this.backgroundColor),\r\n '--cc-search-border-radius': this.getStyleValue(this.borderRadius),\r\n '--cc-search-border-color': this.getStyleValue(this.borderColor),\r\n '--cc-search-border-width': this.getStyleValue(this.borderWidth),\r\n '--cc-search-border': this.getStyleValue(this.border),\r\n '--cc-search-height': this.getStyleValue(this.height),\r\n '--cc-search-padding': this.getStyleValue(this.padding),\r\n '--cc-search-font-size': this.getStyleValue(this.fontSize),\r\n '--cc-search-font-weight': this.getStyleValue(this.fontWeight),\r\n '--cc-search-color': this.getStyleValue(this.color || this.textColor),\r\n '--cc-search-icon-color': this.getStyleValue(this.iconColor),\r\n '--cc-search-placeholder-color': this.getStyleValue(this.placeholderColor),\r\n '--cc-search-focus-border-color': this.getStyleValue(this.focusBorderColor),\r\n '--cc-search-disabled-bg': this.getStyleValue(this.disabledBackgroundColor),\r\n '--cc-search-disabled-color': this.getStyleValue(this.disabledColor),\r\n 'box-shadow': this.getStyleValue(this.boxShadow)\r\n };\r\n }\r\n}\r\n","<div class=\"cc-search-wrapper\" [ngStyle]=\"wrapperStyles\">\r\n <label *ngIf=\"label\" class=\"cc-search-label\" [ngStyle]=\"labelStyles\">{{ label }}</label>\r\n\r\n <div class=\"cc-search-field\" [class.focused]=\"focused\" [class.disabled]=\"disabled\" [ngStyle]=\"fieldStyles\">\r\n <span class=\"cc-search-icon material-icons\">search</span>\r\n\r\n <input type=\"text\" class=\"cc-search-input\" [value]=\"value\" [placeholder]=\"placeholder\" [disabled]=\"disabled\"\r\n (input)=\"onInputChange($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" />\r\n\r\n <button *ngIf=\"clearable && value && !disabled\" type=\"button\" class=\"cc-clear-btn\" (click)=\"onClear()\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n </div>\r\n</div>","import { Component, EventEmitter, Input, OnInit, Output, forwardRef } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterItem } from '../../filter-sidebar.models';\r\n\r\n@Component({\r\n selector: 'lib-filter-sidebar',\r\n templateUrl: './filter-sidebar.component.html',\r\n styleUrls: ['./filter-sidebar.component.scss'],\r\n standalone: false,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => FilterSidebarComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class FilterSidebarComponent implements OnInit, ControlValueAccessor {\r\n @Input() config!: FilterSidebarConfig;\r\n @Input() initialFilters: FilterSidebarOutput = {};\r\n\r\n @Output() filterChange = new EventEmitter<FilterSidebarChangeEvent>();\r\n @Output() filterApply = new EventEmitter<FilterSidebarOutput>();\r\n @Output() filterClear = new EventEmitter<void>();\r\n @Output() showCodeSnippet = new EventEmitter<void>();\r\n @Output() close = new EventEmitter<void>();\r\n\r\n filters: FilterSidebarOutput = {};\r\n\r\n // ControlValueAccessor callbacks\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n\r\n isCollapsed = false;\r\n\r\n toggleCollapse(): void {\r\n this.isCollapsed = !this.isCollapsed;\r\n }\r\n\r\n constructor(\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.initialFilters) {\r\n this.filters = { ...this.initialFilters };\r\n }\r\n\r\n // Initialize from URL query params if persistent\r\n if (this.config.settings?.persistent !== false) {\r\n this.route.queryParams.subscribe(params => {\r\n if (Object.keys(params).length > 0) {\r\n // Start with existing filters to preserve defaults not in URL\r\n const newFilters = { ...this.filters };\r\n\r\n Object.keys(params).forEach(key => {\r\n // Try to parse arrays or numbers if possible, otherwise string\r\n // This is a naive implementation, ideally config should dictate type\r\n const val = params[key];\r\n // If comma separated and looked like array? For now keep simple\r\n newFilters[key] = val;\r\n });\r\n\r\n this.filters = newFilters;\r\n }\r\n });\r\n }\r\n }\r\n\r\n // ControlValueAccessor Implementation\r\n writeValue(value: any): void {\r\n if (value) {\r\n this.filters = { ...value };\r\n } else {\r\n this.filters = {};\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n // Component Logic\r\n onValueChange(key: string | undefined, value: any): void {\r\n if (!key) return;\r\n\r\n this.filters[key] = value;\r\n this.notifyChanges(key, value);\r\n }\r\n\r\n private notifyChanges(key: string, value: any): void {\r\n this.onChange(this.filters);\r\n\r\n // Update URL if persistent\r\n if (this.config.settings?.persistent !== false) {\r\n this.updateUrl();\r\n }\r\n\r\n this.filterChange.emit({\r\n key,\r\n value,\r\n allFilters: this.filters\r\n });\r\n }\r\n\r\n private updateUrl(): void {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: this.filters,\r\n queryParamsHandling: 'merge',\r\n replaceUrl: true\r\n });\r\n }\r\n\r\n applyFilters(): void {\r\n this.filterApply.emit(this.filters);\r\n }\r\n\r\n clearFilters(): void {\r\n this.filters = {};\r\n this.onChange(this.filters);\r\n\r\n if (this.config.settings?.persistent !== false) {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: {},\r\n });\r\n }\r\n\r\n this.filterClear.emit();\r\n }\r\n\r\n onClose(): void {\r\n this.close.emit();\r\n }\r\n\r\n onShowCodeSnippet(): void {\r\n this.showCodeSnippet.emit();\r\n }\r\n\r\n get sidebarStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config?.styles) {\r\n if (this.config.styles.width) styles['--cc-filter-sidebar-width'] = this.config.styles.width;\r\n if (this.config.styles.padding) styles['--cc-filter-sidebar-padding'] = this.config.styles.padding;\r\n if (this.config.styles.gap) styles['--cc-filter-sidebar-gap'] = this.config.styles.gap;\r\n if (this.config.styles.backgroundColor) styles['--cc-filter-sidebar-bg'] = this.config.styles.backgroundColor;\r\n if (this.config.styles.headerHeight) styles['--cc-filter-header-height'] = this.config.styles.headerHeight;\r\n if (this.config.styles.borderRadius) styles['--cc-filter-sidebar-border-radius'] = this.config.styles.borderRadius;\r\n }\r\n return styles;\r\n }\r\n\r\n trackByFn(index: number, item: FilterItem): any {\r\n return item.key || index;\r\n }\r\n}\r\n","<div class=\"cc-filter-sidebar\" [ngStyle]=\"sidebarStyles\" [class.collapsed]=\"isCollapsed\">\r\n\r\n <!-- Header -->\r\n <div class=\"cc-filter-header\" *ngIf=\"config.header?.visible !== false\">\r\n <div class=\"cc-header-content\">\r\n <span class=\"cc-header-title\" *ngIf=\"config.header?.title\">\r\n <span *ngIf=\"config.header?.icon\" [class]=\"config.header?.icon\" class=\"cc-header-icon material-icons\">\r\n <!-- {{config.header?.icon }} -->\r\n </span>\r\n {{ config.header?.title }}\r\n </span>\r\n <ng-content select=\"[header-actions]\"></ng-content>\r\n </div>\r\n <button type=\"button\" *ngIf=\"config.settings?.collapsible\" (click)=\"toggleCollapse()\" class=\"cc-icon-btn\"\r\n [attr.aria-label]=\"isCollapsed ? config.labels?.expandAriaLabel : config.labels?.collapseAriaLabel\">\r\n <span class=\"material-icons\">{{ isCollapsed ? 'menu_open' : 'menu' }}</span>\r\n </button>\r\n <button type=\"button\" *ngIf=\"config.header?.showClose && !isCollapsed\" (click)=\"onClose()\"\r\n class=\"cc-icon-btn cc-close-btn\" [attr.aria-label]=\"config.labels?.closeAriaLabel\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n <!-- Code snippet debug (optional) -->\r\n <button type=\"button\" *ngIf=\"config.settings?.showCodeSnippet\" (click)=\"onShowCodeSnippet()\" class=\"cc-icon-btn\"\r\n [attr.aria-label]=\"config.labels?.codeSnippetAriaLabel\">\r\n <span class=\"material-icons\">code</span>\r\n </button>\r\n </div>\r\n\r\n <!-- Content (Scrollable) -->\r\n <div class=\"cc-filter-content\" [class.hidden]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of config.items; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"cc-filter-footer\" *ngIf=\"config.footer?.visible !== false && !isCollapsed\">\r\n <lib-button variant=\"outline\" color=\"warn\" class=\"cc-btn-clear\"\r\n *ngIf=\"config.footer?.clearButton?.visible !== false\" (click)=\"clearFilters()\">\r\n {{ config.footer?.clearButton?.label }}\r\n </lib-button>\r\n <lib-button variant=\"primary\" color=\"warn\" class=\"cc-btn-apply\"\r\n *ngIf=\"config.footer?.applyButton?.visible !== false\" [disabled]=\"config.footer?.applyButton?.disabled\"\r\n (click)=\"applyFilters()\">\r\n {{ config.footer?.applyButton?.label }}\r\n </lib-button>\r\n </div>\r\n</div>\r\n\r\n<!-- Recursive Template for Items -->\r\n<ng-template #itemTemplate let-item=\"item\">\r\n <div class=\"cc-filter-item\" [ngClass]=\"['type-' + item.type]\"\r\n [style.display]=\"item.visible === false ? 'none' : 'block'\" [ngStyle]=\"item.styles\">\r\n\r\n <ng-container [ngSwitch]=\"item.type\">\r\n\r\n <!-- Input -->\r\n <lib-input *ngSwitchCase=\"'input'\" [config]=\"item.inputConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (valueChange)=\"onValueChange(item.key, $event)\">\r\n </lib-input>\r\n\r\n <!-- Dropdown -->\r\n <lib-dropdown *ngSwitchCase=\"'dropdown'\" [config]=\"item.dropdownConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (selectionChange)=\"onValueChange(item.key, $event)\">\r\n </lib-dropdown>\r\n\r\n <!-- Checkbox -->\r\n <lib-checkbox *ngSwitchCase=\"'checkbox'\" [config]=\"item.checkboxConfig\" [label]=\"item.label\"\r\n [checked]=\"!!filters[item.key]\" (checkedChange)=\"onValueChange(item.key, $event)\">\r\n </lib-checkbox>\r\n\r\n <!-- Radio -->\r\n <lib-radio *ngSwitchCase=\"'radio'\" [config]=\"item.radioConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (selectionChange)=\"onValueChange(item.key, $event)\">\r\n </lib-radio>\r\n\r\n <!-- Toggle -->\r\n <lib-toggle *ngSwitchCase=\"'toggle'\" [config]=\"item.toggleConfig\" [label]=\"item.label\"\r\n [checked]=\"filters[item.key]\" (toggleChange)=\"onValueChange(item.key, $event)\">\r\n </lib-toggle>\r\n\r\n <!-- Datepicker -->\r\n <lib-datepicker *ngSwitchCase=\"'datepicker'\" [config]=\"item.datepickerConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (dateChange)=\"onValueChange(item.key, $event)\">\r\n </lib-datepicker>\r\n\r\n <!-- Search -->\r\n <lib-search *ngSwitchCase=\"'active-search'\" [config]=\"item.searchConfig\" [label]=\"item.label\"\r\n [ngModel]=\"filters[item.key]\" (search)=\"onValueChange(item.key, $event)\">\r\n </lib-search>\r\n\r\n <!-- Group / Accordion -->\r\n <div *ngSwitchCase=\"'group'\" class=\"cc-accordion-item\" [class.expanded]=\"item.expanded\">\r\n <button type=\"button\" class=\"cc-accordion-header\" (click)=\"item.expanded = !item.expanded\">\r\n <span class=\"cc-accordion-title\">{{ item.label }}</span>\r\n <span class=\"material-icons cc-accordion-icon\">{{ item.expanded ? 'expand_less' : 'expand_more'\r\n }}</span>\r\n </button>\r\n\r\n <div class=\"cc-accordion-body\" *ngIf=\"item.expanded\">\r\n <ng-container *ngFor=\"let child of item.children; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: child }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Custom Divider -->\r\n <div *ngSwitchCase=\"'divider'\" class=\"cc-filter-divider\"></div>\r\n\r\n </ng-container>\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { ScrollingModule } from '@angular/cdk/scrolling';\r\nimport { InputComponent } from './components/input/input.component';\r\nimport { DropdownComponent } from './components/dropdown/dropdown.component';\r\nimport { CheckboxComponent } from './components/checkbox/checkbox.component';\r\nimport { RadioComponent } from './components/radio/radio.component';\r\nimport { ToggleComponent } from './components/toggle/toggle.component';\r\nimport { DatepickerComponent } from './components/datepicker/datepicker.component';\r\nimport { SearchComponent } from './components/search/search.component';\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n InputComponent,\r\n DropdownComponent,\r\n CheckboxComponent,\r\n RadioComponent,\r\n ToggleComponent,\r\n DatepickerComponent,\r\n SearchComponent,\r\n ClickOutsideDirective\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n ScrollingModule\r\n ],\r\n exports: [\r\n InputComponent,\r\n DropdownComponent,\r\n CheckboxComponent,\r\n RadioComponent,\r\n ToggleComponent,\r\n DatepickerComponent,\r\n SearchComponent\r\n ]\r\n})\r\nexport class FormComponentsModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { FilterSidebarComponent } from './components/filter-sidebar/filter-sidebar.component';\r\nimport { FormComponentsModule } from '../form-components/form-components.module';\r\nimport { ButtonModule } from '../button/button.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n FilterSidebarComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FormComponentsModule,\r\n ButtonModule\r\n ],\r\n exports: [\r\n FilterSidebarComponent\r\n ]\r\n})\r\nexport class FilterSidebarModule { }\r\n","import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';\r\n\r\nexport interface SummaryCardConfig {\r\n header: string;\r\n value: string;\r\n description?: string;\r\n\r\n // Icon or Image (mutually exclusive)\r\n icon?: string; // Material icon name\r\n iconImage?: string; // URL for image icon\r\n\r\n // Layout configurations\r\n descriptionPosition?: 'bottom' | 'inline'; // 'bottom' (default) or 'inline' (right side of value)\r\n\r\n // Extended Content\r\n valueSubtext?: string; // Text displayed next to the value (e.g. \"/ 15 Target\")\r\n metaData?: SummaryCardMeta[]; // Right-aligned meta information\r\n\r\n // Color configurations\r\n valueColor?: string; // Color for the value text\r\n headerColor?: string; // Color for the header text\r\n descriptionColor?: string; // Color for the description text\r\n iconColor?: string; // Color for the icon\r\n iconBackgroundColor?: string; // Background color for the icon container\r\n\r\n // Additional styling\r\n iconClass?: string; // Additional CSS classes for icon\r\n valueClass?: string; // Additional CSS classes for value\r\n headerClass?: string; // Additional CSS classes for header\r\n descriptionClass?: string; // Additional CSS classes for description\r\n\r\n // Interaction\r\n isDisabled?: boolean; // Disable click interaction\r\n isClickable?: boolean; // Whether card is clickable (default: true)\r\n}\r\n\r\nexport interface SummaryCardMeta {\r\n text: string;\r\n type?: 'text' | 'pill'; // 'text' (default) or 'pill' (badge style)\r\n color?: string; // Text color\r\n backgroundColor?: string; // Background color for pill\r\n cssClass?: string; // Custom CSS class\r\n}\r\n\r\nexport interface SummaryCardLabels {\r\n iconAlt: string;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-summary-card',\r\n templateUrl: './summary-card.component.html',\r\n styleUrls: ['./summary-card.component.scss'],\r\n standalone: false\r\n})\r\nexport class SummaryCardComponent {\r\n @Input() config!: SummaryCardConfig;\r\n @Input() theme?: 'theme-1' | 'theme-2';\r\n @Input() labels: any;\r\n @Output() cardClick = new EventEmitter<void>();\r\n\r\n constructor() { }\r\n\r\n onCardClick(): void {\r\n if (this.config?.isDisabled || this.config?.isClickable === false) {\r\n return;\r\n }\r\n this.cardClick.emit();\r\n }\r\n\r\n get cardClasses(): { [key: string]: boolean } {\r\n return {\r\n 'disabled': !!this.config?.isDisabled,\r\n 'clickable': this.config?.isClickable !== false && !this.config?.isDisabled\r\n };\r\n }\r\n\r\n get iconStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.iconBackgroundColor) {\r\n styles['backgroundColor'] = this.config.iconBackgroundColor;\r\n }\r\n if (this.config.iconColor) {\r\n styles['color'] = this.config.iconColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get headerStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.headerColor) {\r\n styles['color'] = this.config.headerColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get valueStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.valueColor) {\r\n styles['color'] = this.config.valueColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get descriptionStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.descriptionColor) {\r\n styles['color'] = this.config.descriptionColor;\r\n }\r\n return styles;\r\n }\r\n\r\n get isDescriptionInline(): boolean {\r\n return this.config.descriptionPosition === 'inline';\r\n }\r\n\r\n getMetaStyles(meta: SummaryCardMeta): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (meta.color) {\r\n styles['color'] = meta.color;\r\n }\r\n if (meta.backgroundColor && meta.type === 'pill') {\r\n styles['backgroundColor'] = meta.backgroundColor;\r\n }\r\n return styles;\r\n }\r\n}\r\n","<div class=\"cc-summary-card\" (click)=\"onCardClick()\">\r\n <!-- Icon Section (Left Side) -->\r\n <div class=\"icon-section\" *ngIf=\"config.icon || config.iconImage\" [ngClass]=\"config.iconClass\"\r\n [ngStyle]=\"iconStyles\">\r\n <mat-icon *ngIf=\"config.icon\">{{ config.icon }}</mat-icon>\r\n <img *ngIf=\"!config.icon && config.iconImage\" [src]=\"config.iconImage\" [alt]=\"labels.iconAlt\">\r\n </div>\r\n\r\n <!-- Right Section (Header + Value/Meta) -->\r\n <div class=\"right-section\">\r\n <!-- Header (Full Width on Right) -->\r\n <div class=\"header\" [ngClass]=\"config.headerClass\" [ngStyle]=\"headerStyles\">\r\n {{ config.header }}\r\n </div>\r\n\r\n <!-- Value and Meta Row -->\r\n <div class=\"value-meta-row\">\r\n <!-- Content Section -->\r\n <div class=\"content-section\">\r\n <!-- Value Row (with optional inline description) -->\r\n <div class=\"value-row\" [class.inline-layout]=\"isDescriptionInline\">\r\n <div class=\"value-container\">\r\n <div class=\"value\" [ngClass]=\"config.valueClass\" [ngStyle]=\"valueStyles\">\r\n {{ config.value }}\r\n <span *ngIf=\"config.valueSubtext\" class=\"value-subtext\">{{ config.valueSubtext }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Description (inline or bottom based on config) -->\r\n <div class=\"description\" *ngIf=\"config.description\" [ngClass]=\"config.descriptionClass\"\r\n [ngStyle]=\"descriptionStyles\">\r\n {{ config.description }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Meta/Status Section (Aligned with Value) -->\r\n <div class=\"meta-section\" *ngIf=\"config.metaData && config.metaData.length > 0\">\r\n <div *ngFor=\"let meta of config.metaData\" class=\"meta-item\"\r\n [ngClass]=\"[meta.type === 'pill' ? 'meta-pill' : 'meta-text', meta.cssClass || '']\"\r\n [ngStyle]=\"getMetaStyles(meta)\">\r\n {{ meta.text }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SummaryCardComponent } from './components/summary-card/summary-card.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n SummaryCardComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatIconModule\r\n ],\r\n exports: [\r\n SummaryCardComponent\r\n ]\r\n})\r\nexport class SummaryCardModule { }\r\n","\r\n/**\r\n * Recursively translates the Configuration object using the provided labels map.\r\n * This function processes:\r\n * - Section Titles\r\n * - Field Labels\r\n * - Placeholders\r\n * - Help Texts\r\n * - Option Labels (for static options)\r\n * - Repeater Labels (addLabel, repeaterItemLabel)\r\n * \r\n * @param config The FormConfig object to translate\r\n * @param labelsMap A map of key-value pairs for translation (Flattened JSON)\r\n * @returns A new FormConfig object with translated strings\r\n */\r\nexport function translateConfig(config: any, labelsMap: any): any {\r\n if (!config || !labelsMap) {\r\n return config;\r\n }\r\n\r\n // Deep clone to avoid mutating original config, if not already cloned\r\n // Note: Assuming config passed here is already a clone to be modified or we clone it.\r\n // To be safe, let's clone it if it's the root call, but this function is helper.\r\n // In component we do: processedConfig = JSON.parse(JSON.stringify(config)); -> translateConfig(processedConfig, map)\r\n // So distinct reference is passed.\r\n\r\n // Helper to translate a single key\r\n const t = (key: string) => {\r\n return labelsMap[key] || key;\r\n };\r\n\r\n if (config.sections) {\r\n config.sections.forEach((section: any) => {\r\n if (section.sectionTitle) {\r\n section.sectionTitle = t(section.sectionTitle);\r\n }\r\n if (section.repeaterItemLabel) {\r\n section.repeaterItemLabel = t(section.repeaterItemLabel);\r\n }\r\n if (section.addLabel) {\r\n section.addLabel = t(section.addLabel);\r\n }\r\n\r\n if (section.fields) {\r\n section.fields.forEach((field: any) => {\r\n translateField(field, t);\r\n });\r\n }\r\n });\r\n }\r\n\r\n return config;\r\n}\r\n\r\nfunction translateField(field: any, t: (key: string) => string) {\r\n if (field.label) {\r\n field.label = t(field.label);\r\n }\r\n if (field.placeholder) {\r\n field.placeholder = t(field.placeholder);\r\n }\r\n if (field.helpText) {\r\n field.helpText = t(field.helpText);\r\n }\r\n if (field.suffixText) {\r\n field.suffixText = t(field.suffixText);\r\n }\r\n if (field.prefixText) { // Assuming prefixText might exist or be added\r\n field.prefixText = t(field.prefixText);\r\n }\r\n\r\n // Translate options if they exist\r\n if (field.options) {\r\n field.options.forEach((opt: any) => {\r\n if (opt.label) {\r\n opt.label = t(opt.label);\r\n }\r\n });\r\n }\r\n\r\n // Handle subFields for composite type\r\n if (field.subFields) {\r\n field.subFields.forEach((sub: any) => {\r\n translateField(sub, t);\r\n });\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { FormBuilder, FormGroup, FormControl, FormArray, Validators, AbstractControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {\r\n FormConfig,\r\n FormField,\r\n FormSection,\r\n FormOption,\r\n JsonFormConfig,\r\n JsonFieldConfig,\r\n FieldType,\r\n UISubType\r\n} from '../configurable-form.model';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from '../../material/material.module';\r\nimport { translateConfig } from '../../../utils/translation.utils';\r\n\r\n@Component({\r\n selector: 'lib-configurable-form',\r\n templateUrl: './configurable-form.component.html',\r\n styleUrls: ['./configurable-form.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, ReactiveFormsModule, MaterialModule],\r\n})\r\nexport class ConfigurableFormComponent implements OnInit, OnChanges {\r\n @Input() config!: FormConfig;\r\n @Input() jsonConfig!: JsonFormConfig;\r\n @Input() data: any = {};\r\n @Input() baseApiUrl: string = '';\r\n @Input() labels: any;\r\n @Output() optionsLoad = new EventEmitter<any>();\r\n\r\n form!: FormGroup;\r\n processedConfig!: FormConfig;\r\n fieldVisibilityMap: Map<string, boolean> = new Map();\r\n passwordFieldState: Map<string, boolean> = new Map();\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private snackBar: MatSnackBar,\r\n private http: HttpClient\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.initializeForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['config'] || changes['jsonConfig']) {\r\n this.initializeForm();\r\n }\r\n if (changes['data'] && this.form) {\r\n this.form.patchValue(this.data);\r\n }\r\n }\r\n\r\n initializeForm() {\r\n // Transform JSON config if provided, otherwise use config directly\r\n if (this.jsonConfig) {\r\n this.processedConfig = this.transformJsonConfig(this.jsonConfig);\r\n } else if (this.config) {\r\n this.processedConfig = JSON.parse(JSON.stringify(this.config));\r\n } else {\r\n return;\r\n }\r\n\r\n // Apply translations if labels and labelsObject are provided\r\n if (this.labels && this.labels.labelsObject) {\r\n translateConfig(this.processedConfig, this.labels.labelsObject);\r\n }\r\n\r\n\r\n this.normalizeFields();\r\n this.initializeFieldVisibility();\r\n this.buildForm();\r\n this.setupDependencies();\r\n\r\n // Patch initial data if provided\r\n if (this.data && Object.keys(this.data).length > 0) {\r\n this.form.patchValue(this.data);\r\n }\r\n }\r\n\r\n // Transform JSON config format to internal FormConfig format\r\n transformJsonConfig(jsonConfig: JsonFormConfig): FormConfig {\r\n const fields = jsonConfig.jsonConfig\r\n .sort((a, b) => a.sequence - b.sequence)\r\n .map(field => this.transformJsonField(field));\r\n\r\n return {\r\n sections: [{\r\n sectionTitle: jsonConfig.label,\r\n fields: fields\r\n }],\r\n entityType: jsonConfig.entityType\r\n };\r\n }\r\n\r\n // Transform individual JSON field to FormField\r\n transformJsonField(jsonField: JsonFieldConfig): FormField {\r\n const fieldType = this.mapUISubTypeToFieldType(jsonField.uiConfig.subType);\r\n\r\n return {\r\n name: jsonField.jsonKey,\r\n jsonKey: jsonField.jsonKey,\r\n label: jsonField.label,\r\n type: fieldType,\r\n sequence: jsonField.sequence,\r\n keyType: jsonField.keyType,\r\n uiConfig: jsonField.uiConfig,\r\n validationRules: jsonField.validationRules,\r\n required: jsonField.validationRules?.isMandatory || jsonField.validationRules?.isRequired,\r\n mandatory: jsonField.validationRules?.isMandatory,\r\n dependsOn: undefined, // Will be set based on dependent array\r\n dependent: jsonField.uiConfig.dependent,\r\n optionConfigs: jsonField.uiConfig.optionConfigs,\r\n class: 'col-12'\r\n };\r\n }\r\n\r\n // Map UI subtype to field type\r\n mapUISubTypeToFieldType(subType?: string): FieldType {\r\n switch (subType) {\r\n case 'UI_SUBTYPE.SHORT_TEXT':\r\n return 'text';\r\n case 'UI_SUBTYPE.LONG_TEXT':\r\n return 'textarea';\r\n case 'UI_SUBTYPE.NUMBER':\r\n return 'number';\r\n case 'UI_SUBTYPE.EMAIL':\r\n return 'email';\r\n case 'UI_SUBTYPE.PHONE':\r\n return 'tel';\r\n case 'UI_SUBTYPE.URL':\r\n return 'url';\r\n default:\r\n return 'text';\r\n }\r\n }\r\n\r\n // Normalize fields to ensure all required properties exist\r\n normalizeFields() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n // Set default type if not specified\r\n if (!field.type) {\r\n field.type = 'text';\r\n }\r\n\r\n // Merge uiConfig with field-level properties\r\n if (field.uiConfig) {\r\n if (field.uiConfig.type === 'UI_TYPE.DROP_DOWN') {\r\n field.type = 'dropdown';\r\n }\r\n if (field.uiConfig.optionConfigs) {\r\n field.optionConfigs = field.uiConfig.optionConfigs;\r\n }\r\n if (field.uiConfig.dependent) {\r\n field.dependent = field.uiConfig.dependent;\r\n }\r\n }\r\n\r\n // Initialize visibility\r\n if (field.visible === undefined) {\r\n field.visible = true;\r\n }\r\n\r\n // Load options for dropdowns\r\n if ((field.type === 'dropdown' || field.type === 'select') && field.optionConfigs) {\r\n this.loadFieldOptions(field);\r\n }\r\n });\r\n });\r\n }\r\n\r\n // Initialize field visibility map\r\n initializeFieldVisibility() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n this.fieldVisibilityMap.set(field.name, field.visible !== false);\r\n });\r\n });\r\n }\r\n\r\n buildForm() {\r\n const formGroupConfig: any = {};\r\n\r\n this.processedConfig.sections.forEach(section => {\r\n if (section.isRepeater) {\r\n // Create FormArray for repeater sections\r\n const arrayName = section.formArrayName || 'items';\r\n const minItems = section.minItems || 1;\r\n const initialItems = [];\r\n\r\n for (let i = 0; i < minItems; i++) {\r\n initialItems.push(this.createGroup(section.fields));\r\n }\r\n\r\n formGroupConfig[arrayName] = this.fb.array(initialItems);\r\n } else {\r\n // Add regular fields to form group\r\n section.fields.forEach(field => {\r\n if (field.subFields) {\r\n // Composite field - add all sub-fields\r\n field.subFields.forEach(subField => {\r\n if (field.required || field.mandatory) {\r\n subField.required = true;\r\n }\r\n formGroupConfig[subField.name] = this.createControl(subField);\r\n });\r\n } else {\r\n formGroupConfig[field.name] = this.createControl(field);\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.form = this.fb.group(formGroupConfig);\r\n\r\n // Apply composite validators to the root form group\r\n this.processedConfig.sections.forEach(section => {\r\n if (!section.isRepeater) {\r\n section.fields.forEach(field => {\r\n if (field.type === 'composite' && field.compositeValidationRule && field.subFields) {\r\n this.form.addValidators(this.createCompositeValidator(field));\r\n }\r\n });\r\n }\r\n });\r\n this.form.updateValueAndValidity();\r\n }\r\n\r\n createCompositeValidator(field: FormField) {\r\n return (control: AbstractControl) => {\r\n const group = control as FormGroup;\r\n if (!field.subFields || field.subFields.length < 2) return null;\r\n\r\n if (field.compositeValidationRule === 'minMax') {\r\n const minControl = group.get(field.subFields[0].name);\r\n const maxControl = group.get(field.subFields[1].name);\r\n\r\n if (minControl && maxControl && minControl.value !== null && maxControl.value !== null) {\r\n if (Number(minControl.value) > Number(maxControl.value)) {\r\n return { [`invalid_minMax_${field.name}`]: true };\r\n }\r\n }\r\n }\r\n\r\n if (field.compositeValidationRule === 'percentageTotal') {\r\n let total = 0;\r\n let allPresent = true;\r\n\r\n field.subFields.forEach(sub => {\r\n const ctrl = group.get(sub.name);\r\n if (ctrl && ctrl.value !== null && ctrl.value !== '') {\r\n total += Number(ctrl.value);\r\n } else {\r\n allPresent = false;\r\n }\r\n });\r\n\r\n if (allPresent && total !== 100) {\r\n return { [`invalid_percentageTotal_${field.name}`]: true };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n }\r\n\r\n createControl(field: FormField): FormControl {\r\n const validators = [];\r\n\r\n // Add validators based on field configuration\r\n if (field.required || field.mandatory || field.validationRules?.isMandatory || field.validationRules?.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (field.validationRules?.minLength) {\r\n validators.push(Validators.minLength(field.validationRules.minLength));\r\n }\r\n\r\n if (field.validationRules?.maxLength) {\r\n validators.push(Validators.maxLength(field.validationRules.maxLength));\r\n }\r\n\r\n if (field.validationRules?.pattern) {\r\n validators.push(Validators.pattern(field.validationRules.pattern));\r\n }\r\n\r\n if (field.validationRules?.min !== undefined) {\r\n validators.push(Validators.min(field.validationRules.min));\r\n }\r\n\r\n if (field.validationRules?.max !== undefined) {\r\n validators.push(Validators.max(field.validationRules.max));\r\n }\r\n\r\n if (field.type === 'email') {\r\n validators.push(Validators.email);\r\n }\r\n\r\n const initialValue = field.value !== undefined ? field.value : '';\r\n return this.fb.control({ value: initialValue, disabled: field.disabled || false }, validators);\r\n }\r\n\r\n createGroup(fields: FormField[]): FormGroup {\r\n const groupConfig: any = {};\r\n\r\n fields.forEach(field => {\r\n if (field.subFields) {\r\n field.subFields.forEach(subField => {\r\n groupConfig[subField.name] = this.createControl(subField);\r\n });\r\n } else {\r\n groupConfig[field.name] = this.createControl(field);\r\n }\r\n });\r\n\r\n return this.fb.group(groupConfig);\r\n }\r\n\r\n getFormArray(name: string): FormArray {\r\n return this.form.get(name) as FormArray;\r\n }\r\n\r\n addRepeaterItem(section: FormSection) {\r\n const arrayName = section.formArrayName || 'items';\r\n const formArray = this.getFormArray(arrayName);\r\n\r\n // Check max items\r\n if (section.maxItems && formArray.length >= section.maxItems) {\r\n this.snackBar.open(this.labels.errorMaxItemsAllowed.replace('{0}', String(section.maxItems)), this.labels.closeSnackBar, { duration: 3000 });\r\n return;\r\n }\r\n\r\n formArray.push(this.createGroup(section.fields));\r\n }\r\n\r\n removeRepeaterItem(sectionName: string, index: number) {\r\n const formArray = this.getFormArray(sectionName);\r\n formArray.removeAt(index);\r\n }\r\n\r\n validate(): boolean {\r\n if (this.form.invalid) {\r\n this.form.markAllAsTouched();\r\n this.scrollToFirstInvalidControl();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n scrollToFirstInvalidControl() {\r\n const firstInvalidControl = document.querySelector('.is-invalid');\r\n if (firstInvalidControl) {\r\n firstInvalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });\r\n }\r\n }\r\n\r\n setupDependencies() {\r\n this.processedConfig.sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n\r\n\r\n // Also setup for fields with dependent array\r\n if (field.dependent && field.dependent.length > 0) {\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n control.valueChanges.subscribe(value => {\r\n this.onFieldValueChange(field, value);\r\n });\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n onFieldValueChange(field: FormField, value: any) {\r\n // Handle dependent fields\r\n if (field.dependent && field.dependent.length > 0) {\r\n field.dependent.forEach(dependentFieldName => {\r\n const dependentField = this.findFieldByName(dependentFieldName);\r\n if (dependentField) {\r\n // Clear the dependent field value\r\n const control = this.form.get(dependentFieldName);\r\n if (control) {\r\n control.setValue('');\r\n control.markAsUntouched();\r\n }\r\n\r\n // Load new options for the dependent field\r\n if (value) {\r\n this.loadFieldOptions(dependentField, { [field.name]: value });\r\n } else {\r\n // Clear options if parent value is cleared\r\n dependentField.loadedOptions = [];\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Load options for a dropdown field\r\n loadFieldOptions(field: FormField, parentValues?: any) {\r\n // Emit event for parent to notify about options load request\r\n // Allow parent to mark as handled to skip internal API call\r\n const event = { field, parentValue: parentValues, handled: false };\r\n this.optionsLoad.emit(event);\r\n\r\n if (event.handled) {\r\n return;\r\n }\r\n\r\n if (!field.optionConfigs) {\r\n return;\r\n }\r\n\r\n const config = field.optionConfigs;\r\n\r\n // Handle static options\r\n if (config.optionDTO === 'OPTION_DTO.STATIC' && config.staticOptions) {\r\n field.loadedOptions = config.staticOptions;\r\n return;\r\n }\r\n\r\n // Handle API-based options\r\n if (config.optionDTO === 'OPTION_DTO.REF_DATA' && config.url) {\r\n let url = config.url;\r\n\r\n // Replace placeholders in URL with parent values\r\n if (parentValues) {\r\n Object.keys(parentValues).forEach(key => {\r\n url = url.replace(`{${key}}`, parentValues[key]);\r\n });\r\n }\r\n\r\n // Prepend base API URL if provided\r\n if (this.baseApiUrl && !url.startsWith('http')) {\r\n url = `${this.baseApiUrl}/${url}`;\r\n }\r\n\r\n this.http.get<any>(url).subscribe({\r\n next: (response) => {\r\n // Extract data from response\r\n const data = response.data || response.content || response;\r\n field.loadedOptions = this.extractOptions(data, config);\r\n },\r\n error: (error) => {\r\n console.error('Error loading options:', error);\r\n field.loadedOptions = [];\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Extract options from API response\r\n extractOptions(data: any[], config: any): FormOption[] {\r\n if (!Array.isArray(data)) {\r\n return [];\r\n }\r\n\r\n return data.map(item => ({\r\n label: item[config.labelKey || 'name'],\r\n value: item[config.requestKey || 'code'] || item[config.valueKey || 'id'],\r\n code: item.code,\r\n name: item.name\r\n }));\r\n }\r\n\r\n // Get options for a field (either static or loaded)\r\n getFieldOptions(field: FormField): FormOption[] {\r\n return field.loadedOptions || field.options || [];\r\n }\r\n\r\n // Check if field is visible\r\n isFieldVisible(field: FormField): boolean {\r\n return this.fieldVisibilityMap.get(field.name) !== false;\r\n }\r\n\r\n // Toggle field visibility\r\n toggleFieldVisibility(field: FormField, visible: boolean) {\r\n this.fieldVisibilityMap.set(field.name, visible);\r\n\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n if (visible) {\r\n // Re-enable and restore validators\r\n control.enable();\r\n this.updateControlValidators(control, field);\r\n } else {\r\n // Disable and clear validators\r\n control.disable();\r\n control.clearValidators();\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n }\r\n\r\n // Update control validators based on field config\r\n updateControlValidators(control: AbstractControl, field: FormField) {\r\n const validators = [];\r\n\r\n if (field.required || field.mandatory || field.validationRules?.isMandatory) {\r\n validators.push(Validators.required);\r\n }\r\n\r\n if (field.validationRules?.minLength) {\r\n validators.push(Validators.minLength(field.validationRules.minLength));\r\n }\r\n\r\n if (field.validationRules?.maxLength) {\r\n validators.push(Validators.maxLength(field.validationRules.maxLength));\r\n }\r\n\r\n if (field.validationRules?.pattern) {\r\n validators.push(Validators.pattern(field.validationRules.pattern));\r\n }\r\n\r\n control.setValidators(validators);\r\n control.updateValueAndValidity();\r\n }\r\n\r\n onFileChange(event: any, field: FormField) {\r\n const files: FileList = event.target.files;\r\n\r\n if (!files || files.length === 0) {\r\n return;\r\n }\r\n\r\n // Initialize uploadedFiles if not present\r\n // Initialize uploadedFiles if not present\r\n if (!field.uploadedFiles) {\r\n field.uploadedFiles = [];\r\n }\r\n\r\n const uploadedFiles: any[] = [];\r\n // Handle files\r\n for (let i = 0; i < files.length; i++) {\r\n const file = files[i];\r\n\r\n // Check file size (5MB limit)\r\n if (file.size > 5 * 1024 * 1024) {\r\n this.snackBar.open(this.labels.errorFileLimitExceeded.replace('{0}', file.name), this.labels.closeSnackBar, { duration: 3000 });\r\n continue;\r\n }\r\n\r\n uploadedFiles.push({\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n file: file\r\n });\r\n }\r\n\r\n if (field.multiple) {\r\n field.uploadedFiles.push(...uploadedFiles);\r\n } else {\r\n field.uploadedFiles = uploadedFiles;\r\n }\r\n\r\n // Update form control value for validation\r\n this.updateFileControlValue(field);\r\n\r\n // Clear the input\r\n event.target.value = '';\r\n }\r\n\r\n // Remove uploaded file\r\n removeFile(field: FormField, index: number) {\r\n if (field.uploadedFiles) {\r\n field.uploadedFiles.splice(index, 1);\r\n this.updateFileControlValue(field);\r\n }\r\n }\r\n\r\n // Update file control value for validation\r\n updateFileControlValue(field: FormField) {\r\n const control = this.form.get(field.name);\r\n if (control) {\r\n const hasFiles = field.uploadedFiles && field.uploadedFiles.length > 0;\r\n control.setValue(hasFiles ? field.uploadedFiles : null);\r\n control.markAsTouched();\r\n }\r\n }\r\n\r\n // Get character count for text field\r\n getCharacterCount(fieldName: string): number {\r\n const control = this.form.get(fieldName);\r\n if (control && control.value) {\r\n return control.value.toString().length;\r\n }\r\n return 0;\r\n }\r\n\r\n // Toggle section collapse\r\n toggleSection(section: FormSection) {\r\n section.collapsed = !section.collapsed;\r\n }\r\n\r\n\r\n\r\n // Helper method to find field by name\r\n private findFieldByName(name: string): FormField | undefined {\r\n for (const section of this.processedConfig.sections) {\r\n const field = section.fields.find(f => f.name === name);\r\n if (field) {\r\n return field;\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n // Get the processed config for template use\r\n get sections(): FormSection[] {\r\n return this.processedConfig?.sections || [];\r\n }\r\n\r\n togglePassword(fieldName: string) {\r\n this.passwordFieldState.set(fieldName, !this.passwordFieldState.get(fieldName));\r\n }\r\n\r\n isPasswordVisible(fieldName: string): boolean {\r\n return this.passwordFieldState.get(fieldName) || false;\r\n }\r\n}\r\n\r\n","<form [formGroup]=\"form\" class=\"configurable-form-container\" *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let section of sections\">\r\n\r\n <!-- Repeater Section -->\r\n <div *ngIf=\"section.isRepeater; else normalSection\"\r\n [ngClass]=\"section.noCardLayout ? 'section-no-card' : 'section-card'\">\r\n <div class=\"section-header\" *ngIf=\"section.sectionTitle\">\r\n <h3 class=\"section-title\">{{ section.sectionTitle }}</h3>\r\n <button *ngIf=\"section.collapsible\" mat-icon-button type=\"button\" (click)=\"toggleSection(section)\">\r\n <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div [formArrayName]=\"section.formArrayName || 'items'\" *ngIf=\"!section.collapsed\">\r\n <div *ngFor=\"let item of getFormArray(section.formArrayName!).controls; let i = index\"\r\n [formGroupName]=\"i\" class=\"repeater-item\">\r\n <div class=\"repeater-item-header\" *ngIf=\"getFormArray(section.formArrayName!).length > 1\">\r\n <span class=\"text-small\">{{ section.repeaterItemLabel || labels.repeaterItemDefaultLabel }} {{i\r\n + 1}}</span>\r\n <button mat-icon-button color=\"warn\" type=\"button\"\r\n (click)=\"removeRepeaterItem(section.formArrayName!, i)\"\r\n [disabled]=\"section.minItems && getFormArray(section.formArrayName!).length <= section.minItems\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Fields Grid -->\r\n <div class=\"form-grid\">\r\n <div *ngFor=\"let field of section.fields\" [ngClass]=\"['form-col', field.class || 'col-12']\"\r\n [hidden]=\"!isFieldVisible(field)\">\r\n <ng-container\r\n *ngTemplateOutlet=\"fieldTemplate; context: {field: field, group: item}\"></ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"repeater-separator\" *ngIf=\"i < getFormArray(section.formArrayName!).length - 1\"></div>\r\n </div>\r\n </div>\r\n\r\n <button mat-button color=\"primary\" type=\"button\" (click)=\"addRepeaterItem(section)\" class=\"add-btn\"\r\n *ngIf=\"!section.collapsed\"\r\n [disabled]=\"section.maxItems && getFormArray(section.formArrayName!).length >= section.maxItems\">\r\n <mat-icon>add_circle_outline</mat-icon> {{ section.addLabel || labels.addMoreDefaultLabel }}\r\n </button>\r\n </div>\r\n\r\n <!-- Normal Section -->\r\n <ng-template #normalSection>\r\n <div [ngClass]=\"section.noCardLayout ? 'section-no-card' : 'section-card'\">\r\n <div class=\"section-header\" *ngIf=\"section.sectionTitle\">\r\n <h3 class=\"section-title\">{{ section.sectionTitle }}</h3>\r\n <button *ngIf=\"section.collapsible\" mat-icon-button type=\"button\" (click)=\"toggleSection(section)\">\r\n <mat-icon>{{ section.collapsed ? 'expand_more' : 'expand_less' }}</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"form-grid\" *ngIf=\"!section.collapsed\">\r\n <div *ngFor=\"let field of section.fields\" [ngClass]=\"['form-col', field.class || 'col-12']\"\r\n [hidden]=\"!isFieldVisible(field)\">\r\n <!-- Pass the root form group to the template -->\r\n <ng-container\r\n *ngTemplateOutlet=\"fieldTemplate; context: {field: field, group: form}\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n</form>\r\n\r\n<!-- Reusable Field Template -->\r\n<ng-template #fieldTemplate let-field=\"field\" let-group=\"group\">\r\n <div [formGroup]=\"group\">\r\n\r\n <!-- Text / Email / Number / Tel / URL (Password removed) -->\r\n <div *ngIf=\"['text', 'email', 'number', 'tel', 'url'].includes(field.type || '')\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"field.type\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder || ''\"\r\n [readonly]=\"field.readonly\" class=\"form-input\" [name]=\"field.name\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\">\r\n <div class=\"input-suffix\">\r\n <span class=\"suffix-text\" *ngIf=\"field.suffixText\">{{ field.suffixText }}</span>\r\n <mat-icon *ngIf=\"field.suffixIcon\">{{ field.suffixIcon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.icon\">{{ field.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n </div>\r\n </div>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Password Field (Separated) -->\r\n <div *ngIf=\"field.type === 'password'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"isPasswordVisible(field.name) ? 'text' : 'password'\" [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder || ''\" [readonly]=\"field.readonly\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\">\r\n <div class=\"input-suffix\">\r\n <span class=\"suffix-text\" *ngIf=\"field.suffixText\">{{ field.suffixText }}</span>\r\n <mat-icon *ngIf=\"field.suffixIcon\">{{ field.suffixIcon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.icon\">{{ field.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"field.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n <mat-icon class=\"password-toggle-icon\" (click)=\"togglePassword(field.name)\">\r\n {{ isPasswordVisible(field.name) ? 'visibility' : 'visibility_off' }}\r\n </mat-icon>\r\n </div>\r\n </div>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Textarea -->\r\n <div *ngIf=\"field.type === 'textarea'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <textarea [formControlName]=\"field.name\" [placeholder]=\"field.placeholder || ''\" [readonly]=\"field.readonly\"\r\n class=\"form-input form-textarea\" rows=\"4\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n [maxlength]=\"field.validationRules?.maxLength || field.uiConfig?.maxCharacters\"></textarea>\r\n <!-- Character count -->\r\n <div class=\"char-count-row\" *ngIf=\"field.uiConfig?.maxCharacters || field.validationRules?.maxLength\">\r\n <div class=\"hint-text\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"char-count\">\r\n {{ getCharacterCount(field.name) }} / {{ field.uiConfig?.maxCharacters ||\r\n field.validationRules?.maxLength }} {{ labels.charactersLabel }}\r\n </div>\r\n </div>\r\n <div class=\"hint-text mt-2\"\r\n *ngIf=\"(field.hint || field.helpText) && !field.uiConfig?.maxCharacters && !field.validationRules?.maxLength\">\r\n {{ field.hint || field.helpText }}\r\n </div>\r\n </div>\r\n\r\n <!-- Select / Dropdown -->\r\n <div *ngIf=\"field.type === 'select' || field.type === 'dropdown'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <select [formControlName]=\"field.name\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <option value=\"\" disabled selected *ngIf=\"field.placeholder\">{{ field.placeholder }}</option>\r\n <option value=\"\" disabled selected *ngIf=\"!field.placeholder\">{{ labels.selectDefaultPlaceholder }}\r\n </option>\r\n <option *ngFor=\"let opt of getFieldOptions(field)\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Date -->\r\n <div *ngIf=\"field.type === 'date'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"relative\">\r\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder || ''\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\" class=\"date-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n </div>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Radio -->\r\n <div *ngIf=\"field.type === 'radio'\" class=\"radio-group-container\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\">\r\n <label class=\"field-label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </label>\r\n <mat-radio-group [formControlName]=\"field.name\" class=\"radio-group\">\r\n <mat-radio-button *ngFor=\"let opt of getFieldOptions(field)\" [value]=\"opt.value\" class=\"radio-button\">\r\n {{ opt.label }}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n </div>\r\n\r\n <!-- Composite Field (Sub-groups) -->\r\n <div *ngIf=\"field.type === 'composite'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n <div class=\"composite-container\">\r\n <ng-container *ngFor=\"let sub of field.subFields; let last = last\">\r\n <div class=\"composite-sub-field\" style=\"flex: 1;\">\r\n <div class=\"field-label\" *ngIf=\"sub.label\"\r\n style=\"font-size: 0.75rem; font-weight: normal; margin-bottom: 0.25rem;\">\r\n {{ sub.label }}\r\n </div>\r\n <div class=\"input-wrapper\">\r\n <input [type]=\"sub.type\" [formControlName]=\"sub.name\" [placeholder]=\"sub.placeholder || ''\"\r\n [readonly]=\"sub.readonly\" class=\"form-input\"\r\n [class.is-invalid]=\"group.get(sub.name)?.touched && group.get(sub.name)?.invalid\">\r\n <div class=\"input-suffix\" [class.color-suffix]=\"sub.suffixText === '%'\">\r\n <span class=\"suffix-text\" *ngIf=\"sub.suffixText\">{{ sub.suffixText }}</span>\r\n <mat-icon *ngIf=\"sub.readonly\" class=\"lock-icon\">lock_outline</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Adjust separator alignment if labels are present -->\r\n <span class=\"separator\" *ngIf=\"!last && field.separator\"\r\n [style.padding-top]=\"sub.label ? '1.25rem' : '0'\">{{ field.separator }}</span>\r\n </ng-container>\r\n </div>\r\n <div class=\"hint-text mt-2\" *ngIf=\"field.hint || field.helpText\">{{ field.hint || field.helpText }}</div>\r\n <div class=\"error-text text-danger text-small mt-1\" *ngIf=\"group.errors?.['invalid_minMax_' + field.name]\">\r\n {{ labels.errorMinValue }}\r\n </div>\r\n <div class=\"error-text text-danger text-small mt-1\"\r\n *ngIf=\"group.errors?.['invalid_percentageTotal_' + field.name]\">\r\n {{ labels.errorPercentageTotal }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- File Upload -->\r\n <div *ngIf=\"field.type === 'file'\" class=\"field-container\">\r\n <div class=\"field-label\" *ngIf=\"field.label\">\r\n {{ field.label }}\r\n <span class=\"text-danger\" *ngIf=\"field.required || field.mandatory\">*</span>\r\n </div>\r\n\r\n <!-- Upload Box -->\r\n <div class=\"upload-box\" (click)=\"fileInput.click()\"\r\n [class.is-invalid]=\"group.get(field.name)?.touched && group.get(field.name)?.invalid\"\r\n *ngIf=\"!field.uploadedFiles || field.uploadedFiles.length === 0 || field.multiple\">\r\n <mat-icon class=\"upload-icon\">cloud_upload</mat-icon>\r\n <div class=\"upload-text\">{{ labels.uploadDragDropText }}</div>\r\n <div class=\"upload-hint\">{{ labels.uploadHint }}</div>\r\n <input #fileInput type=\"file\" [attr.multiple]=\"field.multiple ? true : null\" [attr.accept]=\"field.accept\"\r\n (change)=\"onFileChange($event, field)\" style=\"display: none;\">\r\n </div>\r\n\r\n <!-- Uploaded Files List -->\r\n <div class=\"uploaded-files-list\" *ngIf=\"field.uploadedFiles && field.uploadedFiles.length > 0\">\r\n <div class=\"uploaded-file-item\" *ngFor=\"let file of field.uploadedFiles; let i = index\">\r\n <div class=\"file-icon\">\r\n <mat-icon class=\"pdf-icon\" *ngIf=\"file.type === 'application/pdf'\">picture_as_pdf</mat-icon>\r\n <mat-icon class=\"doc-icon\"\r\n *ngIf=\"file.type.includes('word') || file.type.includes('document')\">description</mat-icon>\r\n <mat-icon class=\"img-icon\" *ngIf=\"file.type.includes('image')\">image</mat-icon>\r\n <mat-icon class=\"file-icon-default\"\r\n *ngIf=\"!file.type.includes('pdf') && !file.type.includes('word') && !file.type.includes('document') && !file.type.includes('image')\">insert_drive_file</mat-icon>\r\n </div>\r\n <div class=\"file-info\">\r\n <div class=\"file-name\">{{ file.name }}</div>\r\n <div class=\"file-size\">{{ (file.size / 1024).toFixed(2) }} KB</div>\r\n </div>\r\n <button mat-icon-button color=\"warn\" type=\"button\" (click)=\"removeFile(field, i)\"\r\n class=\"remove-file-btn\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { ConfigurableFormComponent } from './component/configurable-form.component';\r\nimport { MaterialModule } from '../material/material.module';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n ConfigurableFormComponent\r\n ],\r\n exports: [\r\n ConfigurableFormComponent\r\n ]\r\n})\r\nexport class ConfigurableFormModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { FormLabels } from '../models/form-schema.model';\r\n\r\n@Injectable()\r\nexport class SmartFormController {\r\n private formData: { [key: string]: any } = {};\r\n\r\n /** Auth token sourced from the FormSchema configJSON (e.g. \"Bearer eyJ…\") */\r\n token?: string;\r\n /** HTTP header name for the token (default: \"Authorization\") */\r\n tokenHeader?: string;\r\n /** Flat map of translated i18n labels passed from SmartFormComponent */\r\n labels: any = {};\r\n /** Custom label keys for form actions (Next, Submit, Add, etc.) */\r\n actionLabels?: FormLabels;\r\n private fieldSubjects: Map<string, BehaviorSubject<any>> = new Map();\r\n\r\n initialize(initialData: { [key: string]: any }): void {\r\n this.formData = { ...initialData };\r\n this.fieldSubjects.forEach((subject, key) => {\r\n subject.next(this.formData[key]);\r\n });\r\n }\r\n\r\n updateField(name: string, value: any): void {\r\n this.formData[name] = value;\r\n\r\n if (!this.fieldSubjects.has(name)) {\r\n this.fieldSubjects.set(name, new BehaviorSubject<any>(value));\r\n } else {\r\n this.fieldSubjects.get(name)!.next(value);\r\n }\r\n }\r\n\r\n getFieldValue(name: string): any {\r\n return this.formData[name];\r\n }\r\n\r\n getFieldObservable(name: string): Observable<any> {\r\n if (!this.fieldSubjects.has(name)) {\r\n this.fieldSubjects.set(name, new BehaviorSubject<any>(this.formData[name]));\r\n }\r\n return this.fieldSubjects.get(name)!.asObservable();\r\n }\r\n\r\n getAllData(): { [key: string]: any } {\r\n return { ...this.formData };\r\n }\r\n\r\n reset(): void {\r\n this.formData = {};\r\n this.fieldSubjects.forEach(subject => subject.next(undefined));\r\n }\r\n\r\n destroy(): void {\r\n this.fieldSubjects.forEach(subject => subject.complete());\r\n this.fieldSubjects.clear();\r\n }\r\n}\r\n","import { FieldConfig, FormSchema } from '../models/form-schema.model';\r\n\r\n/**\r\n * Utility class for translating Smart Form schemas.\r\n */\r\nexport class SmartFormTranslationUtils {\r\n\r\n /**\r\n * Recursively walks the schema and replaces i18n keys with values from labels map.\r\n * @param schema The FormSchema to translate.\r\n * @param labels The labels map (can be flat or contain labelsObject property).\r\n */\r\n static translateSchema(schema: FormSchema, labels: any): void {\r\n if (!schema || !labels) return;\r\n\r\n // Support both flat labels map and the pattern used in ConfigurableForm which passes { labelsObject: ... }\r\n const labelsMap = labels.labelsObject || labels;\r\n const translate = (key: string) => labelsMap[key] || key;\r\n\r\n // Root properties\r\n if (schema.label) schema.label = translate(schema.label);\r\n if (schema.description) schema.description = translate(schema.description);\r\n\r\n // Submit config\r\n if (schema.submitConfig) {\r\n if (schema.submitConfig.successMessage) schema.submitConfig.successMessage = translate(schema.submitConfig.successMessage);\r\n if (schema.submitConfig.errorMessage) schema.submitConfig.errorMessage = translate(schema.submitConfig.errorMessage);\r\n }\r\n\r\n // Section config\r\n if (schema.sectionConfig) {\r\n this.translateSection(schema.sectionConfig, translate);\r\n }\r\n\r\n // Stepper config\r\n if (schema.stepperConfig?.children) {\r\n schema.stepperConfig.children.forEach(field => this.translateField(field, translate));\r\n }\r\n }\r\n\r\n private static translateSection(section: any, translate: (key: string) => string): void {\r\n if (section.label) section.label = translate(section.label);\r\n if (section.children) {\r\n section.children.forEach((field: FieldConfig) => this.translateField(field, translate));\r\n }\r\n }\r\n\r\n private static translateField(field: FieldConfig, translate: (key: string) => string): void {\r\n if (field.label) field.label = translate(field.label);\r\n if (field.placeholder) field.placeholder = translate(field.placeholder);\r\n if (field.hint) field.hint = translate(field.hint);\r\n\r\n if (field.richTextConfig?.placeholder) {\r\n field.richTextConfig.placeholder = translate(field.richTextConfig.placeholder);\r\n }\r\n\r\n if (field.textConfig?.patternMessage) {\r\n field.textConfig.patternMessage = translate(field.textConfig.patternMessage);\r\n }\r\n\r\n if (field.attachmentConfig?.acceptLabel) {\r\n field.attachmentConfig.acceptLabel = translate(field.attachmentConfig.acceptLabel);\r\n }\r\n\r\n if (field.optionConfig?.optionList) {\r\n field.optionConfig.optionList.forEach(opt => {\r\n if (opt.label) opt.label = translate(opt.label);\r\n if (opt.hint) opt.hint = translate(opt.hint);\r\n });\r\n }\r\n\r\n // Recurse into children (ROW or GROUP)\r\n if (field.children) {\r\n field.children.forEach(child => this.translateField(child, translate));\r\n }\r\n\r\n // Recurse into nested section config\r\n if (field.sectionConfig) {\r\n this.translateSection(field.sectionConfig, translate);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ExpressionService {\r\n private loadedFunctions: Map<string, Function> = new Map();\r\n\r\n evaluate(expression: string, context: { [key: string]: any }, variables?: string[]): any {\r\n try {\r\n const vars = variables || this.extractVariables(expression);\r\n const args = vars.map(v => context[v]);\r\n\r\n const func = new Function(...vars, `return ${expression};`);\r\n return func(...args);\r\n } catch (e) {\r\n console.error('Expression evaluation error:', e, { expression, vars: variables || this.extractVariables(expression), context });\r\n return null;\r\n }\r\n }\r\n\r\n evaluateCondition(expression: string, context: { [key: string]: any }): boolean {\r\n const vars = this.extractVariables(expression);\r\n try {\r\n const args = vars.map(v => context[v]);\r\n const func = new Function(...vars, `return ${expression};`);\r\n const result = func(...args);\r\n return !!result;\r\n } catch (e) {\r\n console.error('Condition evaluation error:', e, { expression, variables: vars, context });\r\n return false;\r\n }\r\n }\r\n\r\n evaluateFormula(formula: string, functionName: string, context: { [key: string]: any }, variables?: string[]): any {\r\n try {\r\n if (!this.loadedFunctions.has(functionName)) {\r\n const func = new Function('context', `\r\n ${formula}\r\n return ${functionName};\r\n `)(context);\r\n this.loadedFunctions.set(functionName, func);\r\n }\r\n\r\n const fn = this.loadedFunctions.get(functionName);\r\n if (!fn) return null;\r\n\r\n const args = variables ? variables.map(v => context[v]) : [];\r\n return fn(...args);\r\n } catch (e) {\r\n console.error('Formula evaluation error:', e);\r\n return null;\r\n }\r\n }\r\n\r\n extractVariables(expression: string): string[] {\r\n if (!expression) return [];\r\n\r\n // Remove strings from expression to avoid picking up variables inside quotes\r\n const cleanExpr = expression\r\n .replace(/'[^']*'/g, '')\r\n .replace(/\"[^\"]*\"/g, '')\r\n .replace(/`[^`]*`/g, '')\r\n // Remove properties (e.g., .max) to only pick up top-level identifiers\r\n .replace(/\\.\\w+/g, '');\r\n\r\n const regex = /\\b[a-zA-Z_]\\w*\\b/g;\r\n const matches = cleanExpr.match(regex) || [];\r\n const keywords = [\r\n 'true', 'false', 'null', 'undefined', 'return', 'if', 'else', 'for', 'while', 'function', 'var', 'let', 'const', 'this',\r\n 'Math', 'JSON', 'console', 'window', 'document', 'Date', 'Object', 'Array', 'Number', 'String', 'Boolean', 'Symbol'\r\n ];\r\n return [...new Set(matches.filter(m => !keywords.includes(m)))];\r\n }\r\n}\r\n","import { Component, inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA, MatSnackBarRef } from '@angular/material/snack-bar';\nimport { SnackbarConfig } from '../models/snackbar.models';\n\n@Component({\n selector: 'lib-snackbar',\n templateUrl: './snackbar.component.html',\n styleUrls: ['./snackbar.component.scss'],\n standalone: false\n})\nexport class SnackbarComponent {\n public data: SnackbarConfig = inject(MAT_SNACK_BAR_DATA);\n public snackBarRef: MatSnackBarRef<SnackbarComponent> = inject(MatSnackBarRef);\n\n get variantClass(): string {\n return `snackbar-${this.data.variant || 'info'}`;\n }\n}\n","<div class=\"cc-snackbar-container\" [ngClass]=\"variantClass\">\n <div class=\"cc-snackbar-icon\">\n <!-- Success Icon -->\n <svg *ngIf=\"data.variant === 'success'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path>\n <polyline points=\"22 4 12 14.01 9 11.01\"></polyline>\n </svg>\n \n <!-- Error Icon -->\n <svg *ngIf=\"data.variant === 'error'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line>\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line>\n </svg>\n \n <!-- Warning Icon -->\n <svg *ngIf=\"data.variant === 'warning'\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path>\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line>\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"></line>\n </svg>\n \n <!-- Info Icon -->\n <svg *ngIf=\"data.variant === 'info' || !data.variant\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"></line>\n <line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"></line>\n </svg>\n </div>\n \n <div class=\"cc-snackbar-message\">\n {{ data.message }}\n </div>\n\n <button *ngIf=\"data.showCloseButton\" class=\"cc-snackbar-close\" (click)=\"snackBarRef.dismiss()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n</div>\n","import { Injectable } from '@angular/core';\nimport { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';\nimport { SnackbarConfig } from '../models/snackbar.models';\nimport { SnackbarComponent } from '../components/snackbar.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnackbarService {\n\n constructor(private snackBar: MatSnackBar) {}\n\n show(config: SnackbarConfig): void {\n const matConfig: MatSnackBarConfig = {\n duration: config.duration ?? 5000,\n horizontalPosition: config.horizontalPosition ?? 'right',\n verticalPosition: config.verticalPosition ?? 'top',\n panelClass: ['cc-snackbar-panel', `cc-snackbar-${config.variant || 'info'}`],\n data: config // Pass the entire config down to the component\n };\n \n this.snackBar.openFromComponent(SnackbarComponent, matConfig);\n }\n\n success(message: string, duration?: number): void {\n this.show({ message, variant: 'success', duration });\n }\n\n error(message: string, duration?: number): void {\n this.show({ message, variant: 'error', duration });\n }\n\n warning(message: string, duration?: number): void {\n this.show({ message, variant: 'warning', duration });\n }\n\n info(message: string, duration?: number): void {\n this.show({ message, variant: 'info', duration });\n }\n}\n","/**\r\n * Utility functions for string manipulation\r\n */\r\nexport class StringUtils {\r\n\r\n /**\r\n * Converts a string to camelCase.\r\n * Example: \"First Name\" -> \"firstName\", \"Profile Picture\" -> \"profilePicture\"\r\n */\r\n static toCamelCase(str?: string): string {\r\n if (!str) return '';\r\n return str\r\n .replace(/[^a-zA-Z0-9 ]/g, '')\r\n .split(' ')\r\n .filter(Boolean)\r\n .map((word, i) =>\r\n i === 0\r\n ? word.charAt(0).toLowerCase() + word.slice(1)\r\n : word.charAt(0).toUpperCase() + word.slice(1)\r\n )\r\n .join('');\r\n }\r\n}\r\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\n\r\n/**\r\n * Bypasses Angular's DomSanitizer for resource URLs (e.g. YouTube embed iframes).\r\n * Used only for trusted URLs such as YouTube embed links derived from user-provided video IDs.\r\n */\r\n@Pipe({\r\n name: 'trustedUrl',\r\n standalone: false\r\n})\r\nexport class TrustedUrlPipe implements PipeTransform {\r\n constructor(private sanitizer: DomSanitizer) { }\r\n\r\n transform(url: string): SafeResourceUrl | null {\r\n if (!url) {\r\n return null;\r\n }\r\n const cleaned = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n if (!cleaned) {\r\n return null;\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(cleaned);\r\n }\r\n}\r\n","import { Component, Input, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport {\r\n FormArray,\r\n FormBuilder,\r\n FormControl,\r\n FormGroup,\r\n ValidatorFn,\r\n Validators\r\n} from '@angular/forms';\r\nimport { SectionConfig, FieldConfig, UploadedFile, MediaItem, LocationItem, LocationFieldValue } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\nimport { ExpressionService } from '../../services/expression.service';\r\nimport { ValidationUtils } from '../../utils/validation.utils';\r\nimport { StringUtils } from '../../../../utils/string.utils';\r\nimport { Subject, combineLatest, forkJoin, BehaviorSubject } from 'rxjs';\r\nimport { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'lib-form-field',\r\n templateUrl: './form-field.component.html',\r\n styleUrls: ['./form-field.component.scss'],\r\n standalone: false\r\n})\r\nexport class FormFieldComponent implements OnInit, OnDestroy {\r\n @Input() config!: FieldConfig;\r\n @Input() controller!: SmartFormController;\r\n /**\r\n * The FormGroup that THIS field's control should be registered in.\r\n * For repeater instances this is the instance's own isolated FormGroup.\r\n * For flat (non-repeater) fields this is the root formGroup.\r\n */\r\n @Input() formGroup!: FormGroup;\r\n\r\n /**\r\n * Set to TRUE when this field is part of a repeatable group (config.sectionConfig.allowMulti = true).\r\n * When true, the field does NOT sync with the global controller to prevent data collision\r\n * between different instances of the same repeater row.\r\n */\r\n @Input() allowMulti: boolean = false;\r\n\r\n value: any;\r\n isVisible: boolean = true;\r\n showPassword: boolean = false; // password show/hide toggle\r\n isDragOver: boolean = false; // file upload drag-over state\r\n fileUploadError: string = ''; // per-field file validation error\r\n multiSaveError: string = ''; // error for multisave validation\r\n private destroy$ = new Subject<void>();\r\n\r\n // ── MEDIA_UPLOAD support ────────────────────────────────────────────────\r\n @ViewChild('mediaDeviceInput') mediaDeviceInput!: ElementRef<HTMLInputElement>;\r\n showMediaMenu: boolean = false; // hover/click dropdown menu\r\n showYoutubeInput: boolean = false; // inline YouTube URL input panel\r\n youtubeUrlInput: string = ''; // model for the YT URL field\r\n youtubeUrlError: string = ''; // validation message for YT url\r\n mediaCarouselIndex: number = 0; // active slide index for carousel\r\n showLibraryModal: boolean = false; // library picker modal\r\n libraryImages: any[] = []; // raw list fetched from library API\r\n librarySelectedIds: Set<any> = new Set(); // selected library items\r\n libraryLoading: boolean = false;\r\n libraryError: string = '';\r\n mediaUploadError: string = ''; // transient error message for max limits\r\n\r\n // ── LOCATION field support ────────────────────────────────────────────────\r\n /** Active tab: VENUE | ONLINE | TBA */\r\n locationActiveTab: 'VENUE' | 'ONLINE' | 'TBA' = 'VENUE';\r\n /** Current text in the venue search box */\r\n locationSearchText: string = '';\r\n /** Google Places autocomplete suggestions */\r\n locationSuggestions: any[] = [];\r\n /** Show the suggestions dropdown */\r\n locationShowSuggestions: boolean = false;\r\n /** Cached Google AutocompleteService instance */\r\n private _googleAcService: any = null;\r\n /** Whether Google Maps is loaded */\r\n locationMapLoaded: boolean = false;\r\n /** Map instance */\r\n private _googleMap: any = null;\r\n /** Map markers */\r\n private _mapMarkers: any[] = [];\r\n\r\n // ── AUTOCOMPLETE support ────────────────────────────────────────────────\r\n /** FormControl used ONLY for the autocomplete text-input display value */\r\n autocompleteInputCtrl = new FormControl('');\r\n /** Filtered option list shown in the mat-autocomplete panel */\r\n filteredOptions: { label: string; code: any }[] = [];\r\n\r\n // ── GROUP / allowMulti support ──────────────────────────────────────────\r\n\r\n /** For GROUP fields with allowMulti = true */\r\n groupFormArray!: FormArray;\r\n\r\n /** For GROUP fields with allowMulti = false — single nested FormGroup */\r\n groupFormGroup!: FormGroup;\r\n\r\n /**\r\n * Tracked list of repeater instances.\r\n * Using a separate array (not FormArray.controls) + trackBy(id) ensures\r\n * Angular creates FRESH child components for every new row, preventing\r\n * cached values from bleeding into new instances.\r\n * \r\n * Enhanced with isEditing and isSaved flags for the 'multiSave' card UI.\r\n */\r\n instanceList: { id: number; fg: FormGroup; initialValue?: any; isEditing?: boolean; isSaved?: boolean; isExpanded?: boolean }[] = [];\r\n private _nextInstanceId = 0;\r\n\r\n /**\r\n * Key used to register the GROUP control on the parent formGroup.\r\n * Priority: sectionConfig.name > field.name > camelCase(label) > '__group__'\r\n */\r\n get groupKey(): string {\r\n return (\r\n this.config.sectionConfig?.name ||\r\n this.config.name ||\r\n StringUtils.toCamelCase(this.config.sectionConfig?.label) ||\r\n '__group__'\r\n );\r\n }\r\n\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private expressionService: ExpressionService,\r\n private http: HttpClient\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.isGroup) {\r\n this.initGroupField();\r\n return;\r\n }\r\n\r\n this.registerControl();\r\n this.setupVisibility();\r\n this.setupGeneratedField();\r\n this.setupFormulaValidation(); // Generic formula-based validation\r\n this.setupDependencies();\r\n this.setupMatchValidation(); // cross-field match (e.g. confirmPassword)\r\n\r\n if (!this.config.optionConfig?.dependencies) {\r\n this.loadDropdownOptions();\r\n }\r\n\r\n if (this.isAutocomplete) {\r\n this.initAutocomplete();\r\n }\r\n\r\n if (this.isLocation) {\r\n this.initLocationField();\r\n }\r\n }\r\n\r\n // ── GROUP initialisation ──────────────────────────────────────────────────\r\n get addMultiLabel(): string {\r\n const rawLabel = this.config.sectionConfig?.multiSaveConfig?.addLabel;\r\n if (rawLabel) {\r\n return this.controller.labels?.[rawLabel] || rawLabel;\r\n }\r\n const sectionLabel = this.config.sectionConfig?.label;\r\n const translatedSectionLabel = sectionLabel ? (this.controller.labels?.[sectionLabel] || sectionLabel) : '';\r\n return '+ Add a ' + translatedSectionLabel;\r\n }\r\n\r\n private initGroupField(): void {\r\n if (this.config.sectionConfig?.allowMulti) {\r\n this.groupFormArray = this.fb.array([]);\r\n this.formGroup.addControl(this.groupKey, this.groupFormArray);\r\n\r\n const initialData = this.controller.getFieldValue(this.groupKey);\r\n if (Array.isArray(initialData) && initialData.length > 0) {\r\n initialData.forEach((item: any) => {\r\n this.addGroupInstance(item);\r\n });\r\n } else {\r\n // We always start with at least one instance.\r\n // If multi-save is active, it starts in editing mode and is NOT \r\n // added to the main form value until the user actually saves it.\r\n this.addGroupInstance();\r\n }\r\n } else {\r\n this.groupFormGroup = this.fb.group({});\r\n this.formGroup.addControl(this.groupKey, this.groupFormGroup);\r\n }\r\n }\r\n\r\n /**\r\n * Sets up cross-field validation based on the `onValidate` formula.\r\n * Watches all variables mentioned in the formula and updates the field's\r\n * validity whenever any of them change.\r\n */\r\n private setupFormulaValidation(): void {\r\n if (!this.config.onValidate) return;\r\n\r\n const expression = this.config.onValidate;\r\n const variables = this.expressionService.extractVariables(expression);\r\n\r\n // Subscribe to all fields mentioned in the formula\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n const isValid = this.expressionService.evaluateCondition(expression, context);\r\n\r\n const control = this.formGroup.get(this.config.name!);\r\n if (control) {\r\n if (!isValid) {\r\n control.setErrors({ ...control.errors, formulaError: true });\r\n } else {\r\n // Clear only the formulaError\r\n if (control.hasError('formulaError')) {\r\n const errors = { ...control.errors };\r\n delete errors['formulaError'];\r\n control.setErrors(Object.keys(errors).length ? errors : null);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n addGroupInstance(initialData?: any): void {\r\n const fg = this.fb.group({});\r\n const isMultiSave = !!this.config.sectionConfig?.multiSaveConfig?.active;\r\n\r\n // If initialData exists, treat the instance as already submitted/saved to form\r\n const isEditing = initialData ? false : isMultiSave;\r\n const isSaved = initialData ? true : !isMultiSave;\r\n\r\n const instance = {\r\n id: this._nextInstanceId++,\r\n fg,\r\n isEditing,\r\n isSaved,\r\n isExpanded: false,\r\n initialValue: initialData ? { ...initialData } : undefined\r\n };\r\n\r\n if (isSaved) {\r\n this.groupFormArray.push(fg);\r\n }\r\n this.instanceList = [...this.instanceList, instance];\r\n\r\n if (initialData) {\r\n setTimeout(() => {\r\n // Ensure that controls exist for all keys in initialData so we don't drop fields like ID!\r\n Object.keys(initialData).forEach(key => {\r\n if (!fg.contains(key)) {\r\n fg.addControl(key, new FormControl(initialData[key]));\r\n }\r\n });\r\n fg.patchValue(initialData);\r\n });\r\n }\r\n }\r\n\r\n saveGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n const multiCfg = this.config.sectionConfig?.multiSaveConfig;\r\n\r\n if (multiCfg?.active) {\r\n // Validate that at least one key field is filled\r\n const summaryVal = instance.fg.get(multiCfg.summaryField || '')?.value;\r\n const descVal = multiCfg.descriptionField ? instance.fg.get(multiCfg.descriptionField)?.value : null;\r\n\r\n const hasSummary = summaryVal !== null && summaryVal !== undefined && String(summaryVal).trim() !== '';\r\n const hasDesc = multiCfg.descriptionField\r\n ? (descVal !== null && descVal !== undefined && String(descVal).trim() !== '')\r\n : true; // if no desc field defined, we only care about summary or others\r\n\r\n // User rule: If both fields are empty, need to throw error (come from JSON)\r\n const bothRequired = !!multiCfg.summaryField && !!multiCfg.descriptionField;\r\n if (bothRequired && !hasSummary && !hasDesc) {\r\n this.multiSaveError = this.controller.labels['ERR_MSG_EMPTY_MULTI'] || 'Please fill the required fields before saving.';\r\n return;\r\n }\r\n\r\n this.multiSaveError = '';\r\n instance.isSaved = true;\r\n instance.isEditing = false;\r\n instance.initialValue = { ...instance.fg.value };\r\n\r\n // Push to the parent formArray so its submitted as part of the FormGroup value\r\n if (!this.groupFormArray.controls.includes(instance.fg)) {\r\n this.groupFormArray.push(instance.fg);\r\n }\r\n }\r\n }\r\n\r\n cancelGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n if (!instance.isSaved) {\r\n // It was a new, unsaved addition - remove it entirely\r\n this.removeGroupInstance(index, true);\r\n } else {\r\n // Revert to original values\r\n if (instance.initialValue) {\r\n instance.fg.patchValue(instance.initialValue, { emitEvent: false });\r\n }\r\n instance.isEditing = false;\r\n }\r\n }\r\n\r\n editGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n instance.isEditing = true;\r\n instance.initialValue = { ...instance.fg.value };\r\n }\r\n\r\n toggleExpandGroupInstance(index: number): void {\r\n const instance = this.instanceList[index];\r\n instance.isExpanded = !instance.isExpanded;\r\n }\r\n\r\n removeGroupInstance(index: number, force: boolean = false): void {\r\n // If not multiSave, we keep the one-row minimum rule.\r\n // In multiSave, we can remove it even if it's the last one.\r\n const isMultiSave = !!this.config.sectionConfig?.multiSaveConfig?.active;\r\n\r\n if (force || isMultiSave || this.instanceList.length > 1) {\r\n const instance = this.instanceList[index];\r\n const arrayIndex = this.groupFormArray.controls.indexOf(instance.fg);\r\n if (arrayIndex >= 0) {\r\n this.groupFormArray.removeAt(arrayIndex);\r\n }\r\n this.instanceList = this.instanceList.filter((_, i) => i !== index);\r\n }\r\n }\r\n\r\n trackByInstanceId(_: number, item: { id: number; fg: FormGroup }): number {\r\n return item.id;\r\n }\r\n\r\n // ── Leaf control ─────────────────────────────────────────────────────────\r\n\r\n ngOnDestroy(): void {\r\n // Always complete so any subscriptions (e.g. subfields valueChanges) are cleaned up\r\n this.destroy$.next();\r\n this.destroy$.complete();\r\n\r\n if (this.isGroup) {\r\n if (this.formGroup?.contains(this.groupKey)) {\r\n this.formGroup.removeControl(this.groupKey);\r\n }\r\n return;\r\n }\r\n\r\n const fieldName = this.config.name;\r\n if (fieldName && this.formGroup?.contains(fieldName)) {\r\n this.formGroup.removeControl(fieldName);\r\n }\r\n }\r\n\r\n registerControl(): void {\r\n if (!this.config.name || !this.formGroup) return;\r\n\r\n const fieldName = this.config.name;\r\n const validators = this.getValidators();\r\n\r\n // When inside a repeater instance, ALWAYS start with defaultValue (never\r\n // read from the shared controller — prevents cross-instance value copying).\r\n const initialValue = this.allowMulti\r\n ? (this.config.defaultValue ?? null)\r\n : (this.controller.getFieldValue(fieldName) ?? this.config.defaultValue ?? null);\r\n\r\n let control = this.formGroup.get(fieldName) as FormControl;\r\n if (!control) {\r\n control = new FormControl(\r\n { value: initialValue, disabled: !!this.config.disabled },\r\n validators\r\n );\r\n this.formGroup.addControl(fieldName, control);\r\n }\r\n\r\n this.value = control.value;\r\n\r\n if (!this.allowMulti) {\r\n // ── Flat field: keep in sync with shared controller ──────────────────\r\n control.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n this.value = val;\r\n this.controller.updateField(fieldName, val);\r\n });\r\n\r\n this.controller.getFieldObservable(fieldName).pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n if (val !== control.value) {\r\n control.setValue(val, { emitEvent: false });\r\n this.value = val;\r\n }\r\n });\r\n } else {\r\n // ── Repeater field: local value tracking only ─────────────────────────\r\n control.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(val => {\r\n this.value = val;\r\n });\r\n }\r\n }\r\n\r\n getValidators(): ValidatorFn[] {\r\n const validators: ValidatorFn[] = [];\r\n if (this.config.required) validators.push(Validators.required);\r\n if (this.config.subType === 'EMAIL') validators.push(Validators.email);\r\n if (this.config.subType === 'PASSWORD') {\r\n // Minimum 8 chars by default; honour explicit textConfig.length overrides\r\n const minLen = this.config.textConfig?.length?.min ?? 8;\r\n validators.push(Validators.minLength(minLen));\r\n }\r\n if (this.config.textConfig?.length) {\r\n const { min, max } = this.config.textConfig.length;\r\n if (min && this.config.subType !== 'PASSWORD') validators.push(Validators.minLength(min));\r\n if (max) validators.push(Validators.maxLength(max));\r\n }\r\n if (this.config.textConfig?.pattern) validators.push(Validators.pattern(this.config.textConfig.pattern));\r\n if (this.config.numberConfig) {\r\n const { min, max } = this.config.numberConfig;\r\n if (min !== undefined) validators.push(Validators.min(min));\r\n if (max !== undefined) validators.push(Validators.max(max));\r\n }\r\n if (this.config.type === 'RICH_TEXT' && this.config.richTextConfig?.maxLength) {\r\n const max = this.config.richTextConfig.maxLength;\r\n validators.push((control: import('@angular/forms').AbstractControl) => {\r\n if (!control.value) return null;\r\n const plainText = String(control.value).replace(/<[^>]*>/g, '');\r\n return plainText.length > max\r\n ? { 'maxlength': { requiredLength: max, actualLength: plainText.length } }\r\n : null;\r\n });\r\n }\r\n return validators;\r\n }\r\n\r\n // ── Cross-field match validation (password === confirmPassword) ───────────\r\n\r\n /**\r\n * When `textConfig.matchField` is configured, subscribes to value changes on\r\n * BOTH this control and the referenced control so the mismatch error updates\r\n * instantly whichever field the user edits last.\r\n *\r\n * - Values differ → sets `{ passwordMismatch: true }` on THIS control.\r\n * - Values match → clears `passwordMismatch` from THIS control.\r\n */\r\n setupMatchValidation(): void {\r\n const matchFieldName = this.config.textConfig?.matchField;\r\n if (!matchFieldName || !this.config.name || !this.formGroup) return;\r\n\r\n const thisControl = this.formGroup.get(this.config.name);\r\n const otherControl = this.formGroup.get(matchFieldName);\r\n if (!thisControl || !otherControl) return;\r\n\r\n const runCheck = () => {\r\n const thisVal = thisControl.value;\r\n const otherVal = otherControl.value;\r\n\r\n if (thisVal && otherVal && thisVal !== otherVal) {\r\n // Both have a value but they differ — flag the mismatch\r\n thisControl.setErrors(\r\n { ...thisControl.errors, passwordMismatch: true },\r\n { emitEvent: false }\r\n );\r\n } else {\r\n // Either one is empty OR they now match — clear the mismatch error\r\n if (thisControl.hasError('passwordMismatch')) {\r\n const errors = { ...thisControl.errors };\r\n delete errors['passwordMismatch'];\r\n thisControl.setErrors(\r\n Object.keys(errors).length ? errors : null,\r\n { emitEvent: false }\r\n );\r\n }\r\n }\r\n };\r\n\r\n // Fire when THIS (confirmPassword) field changes\r\n thisControl.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => runCheck());\r\n\r\n // Also fire when the OTHER (password) field changes so the error clears\r\n // as soon as the user corrects the source value\r\n otherControl.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => runCheck());\r\n }\r\n\r\n setupVisibility(): void {\r\n if (!this.config.visibilityExpression) return;\r\n const variables = this.expressionService.extractVariables(this.config.visibilityExpression);\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n this.isVisible = this.expressionService.evaluateCondition(this.config.visibilityExpression!, context);\r\n const control = this.formGroup?.get(this.config.name!);\r\n if (control) {\r\n this.isVisible ? control.enable({ emitEvent: false }) : control.disable({ emitEvent: false });\r\n }\r\n });\r\n }\r\n\r\n setupGeneratedField(): void {\r\n if (this.config.type !== 'GENERATED' || !this.config.generatedConfig) return;\r\n const variables = this.config.generatedConfig.variables || [];\r\n const observables = variables.map(v => this.controller.getFieldObservable(v));\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(() => {\r\n const context = this.controller.getAllData();\r\n const result = this.evaluateFormula(context);\r\n if (result !== null && this.config.name) {\r\n this.controller.updateField(this.config.name, result);\r\n }\r\n });\r\n }\r\n\r\n evaluateFormula(context: { [key: string]: any }): any {\r\n if (!this.config.generatedConfig) return null;\r\n const formula = this.config.generatedConfig.formula;\r\n const functionName = this.extractFunctionName(formula);\r\n if (functionName) {\r\n return this.expressionService.evaluateFormula(\r\n formula, functionName, context, this.config.generatedConfig.variables\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n extractFunctionName(formula: string): string | null {\r\n const match = formula.match(/(?:function|fun)\\s+(\\w+)\\s*\\(/);\r\n return match ? match[1] : null;\r\n }\r\n\r\n setupDependencies(): void {\r\n if (!this.config.optionConfig?.dependencies) return;\r\n const dependencies = this.config.optionConfig.dependencies;\r\n const observables = Object.values(dependencies).map(fieldName =>\r\n this.controller.getFieldObservable(fieldName)\r\n );\r\n combineLatest(observables).pipe(takeUntil(this.destroy$)).subscribe(values => {\r\n const dependencyValues: { [key: string]: any } = {};\r\n Object.keys(dependencies).forEach((paramKey, index) => {\r\n dependencyValues[paramKey] = values[index];\r\n });\r\n const allPresent = Object.values(dependencyValues).every(\r\n v => v !== null && v !== undefined && v !== ''\r\n );\r\n if (allPresent) {\r\n this.loadDropdownOptions(dependencyValues);\r\n } else if (this.config.optionConfig) {\r\n this.config.optionConfig.optionList = [];\r\n }\r\n });\r\n }\r\n\r\n loadDropdownOptions(queryParams: { [key: string]: any } = {}): void {\r\n const optionConfig = this.config.optionConfig;\r\n const urls = optionConfig?.apiUrls ||\r\n (optionConfig?.apiUrl ? [optionConfig.apiUrl] :\r\n optionConfig?.optionUrl ? [optionConfig.optionUrl] : []);\r\n\r\n if (!urls || urls.length === 0) return;\r\n\r\n const observables = urls.map(url => {\r\n let fullUrl = url;\r\n const params = new URLSearchParams();\r\n Object.entries(queryParams).forEach(([key, value]) => {\r\n if (value !== null && value !== undefined) params.append(key, String(value));\r\n });\r\n const queryString = params.toString();\r\n if (queryString) fullUrl += (fullUrl.includes('?') ? '&' : '?') + queryString;\r\n return this.http.get<any>(fullUrl, { headers: this.getHeaders() });\r\n });\r\n\r\n forkJoin(observables).pipe(takeUntil(this.destroy$)).subscribe({\r\n next: responses => {\r\n let mergedData: any[] = [];\r\n responses.forEach(response => {\r\n let data = optionConfig?.dataPath\r\n ? this.getValueByPath(response, optionConfig.dataPath)\r\n : (Array.isArray(response) ? response : response.data || response.items || response || []);\r\n\r\n // Handle Dictionary Objects by converting them to Arrays\r\n if (data !== null && typeof data === 'object' && !Array.isArray(data)) {\r\n data = Object.values(data);\r\n }\r\n\r\n if (Array.isArray(data)) mergedData = [...mergedData, ...data];\r\n });\r\n\r\n if (optionConfig?.sortBy) {\r\n const sortKey = optionConfig.sortBy;\r\n const direction = optionConfig.sortDirection === 'DESC' ? -1 : 1;\r\n mergedData.sort((a, b) => {\r\n const valA = this.getValueByPath(a, sortKey);\r\n const valB = this.getValueByPath(b, sortKey);\r\n if (typeof valA === 'string' && typeof valB === 'string') return direction * valA.localeCompare(valB);\r\n if (typeof valA === 'number' && typeof valB === 'number') return direction * (valA - valB);\r\n return 0;\r\n });\r\n }\r\n\r\n this.config.optionConfig!.optionList = mergedData.map((item: any) => {\r\n const label = optionConfig?.labelPath\r\n ? this.getValueByPath(item, optionConfig.labelPath)\r\n : (item.label || item.name);\r\n const code = optionConfig?.valuePath\r\n ? this.getValueByPath(item, optionConfig.valuePath)\r\n : (item.code || item.id || item.value);\r\n return { label: String(label), code, value: item };\r\n });\r\n\r\n // Refresh autocomplete filter list after options arrive from API\r\n if (this.isAutocomplete) {\r\n this.filteredOptions = [...(this.config.optionConfig!.optionList || [])];\r\n this._syncAutocompleteDisplayValue();\r\n }\r\n },\r\n error: err => console.error('Failed to load dropdown options:', err)\r\n });\r\n }\r\n\r\n private getValueByPath(obj: any, path: string): any {\r\n if (!path || path === '') return obj;\r\n return path.split('.').reduce((acc, part) => {\r\n const match = part.match(/(\\w+)\\[(\\d+)\\]/);\r\n if (match) return acc?.[match[1]]?.[parseInt(match[2])];\r\n return acc?.[part];\r\n }, obj);\r\n }\r\n\r\n /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON). */\r\n private getHeaders(): HttpHeaders {\r\n let headers = new HttpHeaders();\r\n if (this.controller.token) {\r\n const headerName = this.controller.tokenHeader || 'Authorization';\r\n headers = headers.set(headerName, this.controller.token);\r\n }\r\n return headers;\r\n }\r\n\r\n updateValue(newValue: any): void {\r\n if (!this.config.name) return;\r\n const control = this.formGroup.get(this.config.name);\r\n if (control) {\r\n control.setValue(newValue);\r\n control.markAsDirty();\r\n control.markAsTouched();\r\n }\r\n }\r\n\r\n onCheckboxListChange(code: string, checked: boolean): void {\r\n if (!this.config.name) return;\r\n const currentValue = (this.allowMulti\r\n ? (this.formGroup.get(this.config.name)?.value)\r\n : this.controller.getFieldValue(this.config.name)) || [];\r\n const newValue = checked\r\n ? [...currentValue, code]\r\n : currentValue.filter((c: string) => c !== code);\r\n this.updateValue(newValue);\r\n }\r\n\r\n isChecked(code: string): boolean {\r\n const value = this.value || [];\r\n return Array.isArray(value) && value.includes(code);\r\n }\r\n\r\n get errorMessage(): string {\r\n if (!this.config.name || !this.formGroup) return '';\r\n const control = this.formGroup.get(this.config.name);\r\n if (control && control.invalid && (control.touched || control.dirty)) {\r\n if (control.hasError('required')) return 'This field is required';\r\n if (control.hasError('email')) return 'Invalid email format';\r\n if (control.hasError('passwordMismatch')) return 'Passwords do not match';\r\n if (control.hasError('formulaError')) return this.config.errorMessage || 'Invalid value';\r\n if (control.hasError('minlength')) return `Minimum length is ${control.errors?.['minlength'].requiredLength} characters`;\r\n if (control.hasError('maxlength')) return `Maximum length is ${control.errors?.['maxlength'].requiredLength} characters`;\r\n if (control.hasError('min')) return `Minimum value is ${control.errors?.['min'].min}`;\r\n if (control.hasError('max')) return `Maximum value is ${control.errors?.['max'].max}`;\r\n if (control.hasError('pattern')) return this.config.textConfig?.patternMessage || 'Invalid format';\r\n }\r\n return '';\r\n }\r\n\r\n get showCharCount(): boolean {\r\n if (this.isTextField && this.config.subType !== 'PHONE') {\r\n return !!(this.config.textConfig?.showCharCount && this.config.textConfig?.length?.max);\r\n }\r\n if (this.isRichText) {\r\n return !!(this.config.richTextConfig?.showCharCount && this.config.richTextConfig?.maxLength);\r\n }\r\n return false;\r\n }\r\n\r\n get remainingCharacters(): number | null {\r\n if (!this.showCharCount || !this.formGroup || !this.config.name) return null;\r\n const currentVal = this.formGroup.get(this.config.name)?.value || '';\r\n\r\n if (this.isTextField && this.config.textConfig?.length?.max) {\r\n return Math.max(0, this.config.textConfig.length.max - currentVal.length);\r\n }\r\n if (this.isRichText && this.config.richTextConfig?.maxLength) {\r\n const plainText = String(currentVal).replace(/<[^>]*>/g, '');\r\n return Math.max(0, this.config.richTextConfig.maxLength - plainText.length);\r\n }\r\n return null;\r\n }\r\n\r\n // ── Type guards ──────────────────────────────────────────────────────────\r\n\r\n get isTextField(): boolean { return this.config.type === 'TEXT_INPUT'; }\r\n get isNumberField(): boolean { return this.config.type === 'NUMBER_INPUT'; }\r\n get isDateField(): boolean { return this.config.type === 'DATE'; }\r\n get isTimeField(): boolean { return this.config.type === 'TIME'; }\r\n get isDropdown(): boolean { return this.config.type === 'DROPDOWN'; }\r\n get isAutocomplete(): boolean { return this.config.type === 'AUTOCOMPLETE'; }\r\n get isFileUpload(): boolean { return this.config.type === 'FILE_UPLOAD'; }\r\n get isMediaUpload(): boolean { return this.config.type === 'MEDIA_UPLOAD'; }\r\n get isRadio(): boolean { return this.config.type === 'RADIO'; }\r\n get isCheckbox(): boolean { return this.config.type === 'CHECKBOX'; }\r\n get isChip(): boolean { return this.config.type === 'CHIP'; }\r\n get isSwitch(): boolean { return this.config.type === 'SWITCH'; }\r\n get isRating(): boolean { return this.config.type === 'RATING'; }\r\n get isRichText(): boolean { return this.config.type === 'RICH_TEXT'; }\r\n get isGenerated(): boolean { return this.config.type === 'GENERATED'; }\r\n get isRow(): boolean { return this.config.type === 'ROW'; }\r\n get isGroup(): boolean { return this.config.type === 'GROUP'; }\r\n get isLocation(): boolean { return this.config.type === 'LOCATION'; }\r\n\r\n // ── AUTOCOMPLETE helpers ────────────────────────────────────────────────\r\n\r\n /**\r\n * Initialise the separate display-control that drives the mat-autocomplete\r\n * text input. The real form control always stores the *code* value.\r\n */\r\n private initAutocomplete(): void {\r\n // Sync display input whenever the real control value changes externally\r\n this._syncAutocompleteDisplayValue();\r\n\r\n // Filter the option list as the user types\r\n this.autocompleteInputCtrl.valueChanges\r\n .pipe(debounceTime(150), distinctUntilChanged(), takeUntil(this.destroy$))\r\n .subscribe(search => {\r\n this.filteredOptions = this._filterOptions(typeof search === 'string' ? search : '');\r\n });\r\n\r\n // Initialise filtered list with all available options\r\n this.filteredOptions = [...(this.config.optionConfig?.optionList || [])];\r\n }\r\n\r\n /** Filter options by the user's search text (matches label or code). */\r\n private _filterOptions(search: string): { label: string; code: any }[] {\r\n const q = search.toLowerCase().trim();\r\n if (!q) return [...(this.config.optionConfig?.optionList || [])];\r\n return (this.config.optionConfig?.optionList || []).filter(opt =>\r\n opt.label?.toLowerCase().includes(q) ||\r\n String(opt.code).toLowerCase().includes(q)\r\n );\r\n }\r\n\r\n /** Put the human-readable label into the display control based on the stored code. */\r\n private _syncAutocompleteDisplayValue(): void {\r\n if (!this.config.name) return;\r\n const code = this.formGroup?.get(this.config.name)?.value;\r\n if (code === null || code === undefined || code === '') return;\r\n const matched = (this.config.optionConfig?.optionList || []).find(o => o.code === code);\r\n if (matched) {\r\n this.autocompleteInputCtrl.setValue(matched.label, { emitEvent: false });\r\n }\r\n }\r\n\r\n /** Called when user picks an option from the mat-autocomplete panel. */\r\n onAutocompleteSelected(option: { label: string; code: any }): void {\r\n this.autocompleteInputCtrl.setValue(option.label, { emitEvent: false });\r\n this.updateValue(option.code);\r\n }\r\n\r\n /** Called when the input loses focus — clear display & value if text was manually deleted. */\r\n onAutocompleteClear(): void {\r\n const display = (this.autocompleteInputCtrl.value || '').trim();\r\n if (!display) {\r\n this.updateValue(null);\r\n } else {\r\n // Restore label from stored code (prevents partial text staying)\r\n this._syncAutocompleteDisplayValue();\r\n }\r\n }\r\n\r\n /**\r\n * Returns the effective grid column span for a child inside a ROW.\r\n * If the child declares an explicit colSpan, use it.\r\n * Otherwise divide 12 equally among all children (floor, min 1).\r\n */\r\n getChildColSpan(child: FieldConfig): number {\r\n if (child.colSpan) return child.colSpan;\r\n const count = this.config.children?.length || 1;\r\n return Math.max(1, Math.floor(12 / count));\r\n }\r\n\r\n getOptionColSpan(option: any): number {\r\n const span = option.colSpan || option.colspan;\r\n if (span) return span;\r\n const count = this.config.optionConfig?.optionList?.length || 1;\r\n return Math.max(1, Math.floor(12 / count));\r\n }\r\n\r\n // ── Rating helpers ───────────────────────────────────────────────────────\r\n\r\n onRatingChange(star: number, event?: MouseEvent): void {\r\n if (!this.config.name || this.config.disabled) return;\r\n let newValue = star;\r\n if (this.config.ratingConfig?.allowHalf && event) {\r\n const target = event.target as HTMLElement;\r\n const rect = target.getBoundingClientRect();\r\n if (event.clientX - rect.left < rect.width / 2) newValue = star - 0.5;\r\n }\r\n if (this.value === newValue) newValue = 0;\r\n this.updateValue(newValue);\r\n }\r\n\r\n getStarArray(): number[] {\r\n const max = this.config.ratingConfig?.maxRating || 5;\r\n return Array.from({ length: max }, (_, i) => i + 1);\r\n }\r\n\r\n isStarHalf(star: number): boolean { return (this.value || 0) === star - 0.5; }\r\n isStarFilled(star: number): boolean { return (this.value || 0) >= star; }\r\n\r\n // ── File Upload helpers ──────────────────────────────────────────────────\r\n\r\n onDragOver(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = true;\r\n }\r\n\r\n onDragLeave(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n }\r\n\r\n onFileDrop(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.isDragOver = false;\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n this.processFiles(files);\r\n }\r\n }\r\n\r\n onFileSelected(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this.processFiles(input.files);\r\n }\r\n // Reset input so the same file can be re-selected if removed\r\n input.value = '';\r\n }\r\n\r\n private processFiles(files: FileList): void {\r\n // ── MEDIA_UPLOAD branch — uses attachmentConfig, stores MediaItem[] ─────\r\n if (this.isMediaUpload) {\r\n const mediaCfg = this.config.attachmentConfig;\r\n if (!mediaCfg) return;\r\n const maxItems = mediaCfg.maxFiles ?? 10;\r\n\r\n let errorShown = false;\r\n\r\n Array.from(files).forEach(file => {\r\n if (this.mediaItems.length >= maxItems) {\r\n if (!errorShown) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n errorShown = true;\r\n }\r\n return;\r\n }\r\n\r\n const placeholder: MediaItem = { mediaType: 'image', url: '', isUploading: true };\r\n this._appendMediaItem(placeholder);\r\n\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n if (mediaCfg.entityType) formData.append('entity_type', mediaCfg.entityType);\r\n\r\n if (!mediaCfg.uploadUrl) return;\r\n this.http.post<any>(mediaCfg.uploadUrl, formData, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (response: any) => {\r\n // API returns { completeURL, id, mimeType, fileName, ... }\r\n const resolvedUrl: string = (response?.completeURL ?? response)?.toString().trim();\r\n const current: MediaItem[] = [...this.mediaItems];\r\n const idx = current.indexOf(placeholder);\r\n if (idx !== -1) {\r\n current[idx] = {\r\n mediaType: 'image',\r\n url: resolvedUrl,\r\n id: response?.id,\r\n mimeType: response?.mimeType,\r\n fileName: response?.fileName ?? response?.name,\r\n isUploading: false\r\n };\r\n this.updateValue(current);\r\n this.mediaCarouselIndex = current.length - 1;\r\n }\r\n },\r\n error: () => {\r\n const cleaned = this.mediaItems.filter(m => m !== placeholder);\r\n this.updateValue(cleaned.length ? cleaned : null);\r\n }\r\n });\r\n });\r\n return;\r\n }\r\n\r\n // ── FILE_UPLOAD branch — uses attachmentConfig, stores UploadedFile[] ────\r\n this.fileUploadError = '';\r\n const cfg = this.config.attachmentConfig;\r\n const maxSizeBytes = (cfg?.maxSizeMB ?? 10) * 1024 * 1024;\r\n const currentFiles: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const maxFiles = cfg?.maxFiles ?? (cfg?.multiple ? 10 : 1);\r\n const isMultiple = cfg?.multiple ?? false;\r\n\r\n const incoming = Array.from(files);\r\n\r\n for (const file of incoming) {\r\n // Size validation\r\n if (file.size > maxSizeBytes) {\r\n this.fileUploadError = `\"${file.name}\" exceeds the maximum allowed size of ${cfg?.maxSizeMB ?? 10} MB.`;\r\n continue;\r\n }\r\n // Max-files validation\r\n if (isMultiple && currentFiles.length >= maxFiles) {\r\n this.fileUploadError = `Maximum ${maxFiles} file${maxFiles !== 1 ? 's' : ''} allowed.`;\r\n break;\r\n }\r\n\r\n if (cfg?.uploadUrl) {\r\n // ── API upload path ───────────────────────────────────────────────\r\n const entry: UploadedFile = {\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n file,\r\n isUploading: true\r\n };\r\n\r\n // Add the placeholder entry immediately so the UI shows the progress row\r\n const withPlaceholder = isMultiple\r\n ? [...(this.value as UploadedFile[] || []), entry]\r\n : [entry];\r\n this.updateValue(withPlaceholder);\r\n\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n if (cfg.entityType) {\r\n formData.append('entity_type', cfg.entityType);\r\n }\r\n\r\n this.http.post<any>(cfg.uploadUrl, formData, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (response: any) => {\r\n // The API returns a JSON object; use completeURL if present,\r\n // otherwise fall back to treating the raw response as a URL string.\r\n const resolvedUrl: string = (response?.completeURL ?? response)?.toString().trim();\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const idx = current.indexOf(entry);\r\n if (idx !== -1) {\r\n const updatedEntry: UploadedFile = { ...entry, dataUrl: resolvedUrl, id: response?.id, isUploading: false };\r\n const updatedList = [...current];\r\n updatedList[idx] = updatedEntry;\r\n this.updateValue(updatedList);\r\n }\r\n },\r\n error: () => {\r\n // Remove the failed placeholder from the list\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const cleaned = current.filter(f => f !== entry);\r\n this.updateValue(cleaned.length ? cleaned : null);\r\n this.fileUploadError = `Failed to upload \"${file.name}\". Please try again.`;\r\n }\r\n });\r\n } else {\r\n // ── FileReader (base64) fallback path ────────────────────────────\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const entry: UploadedFile = {\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n dataUrl: e.target?.result as string,\r\n file\r\n };\r\n const updated = isMultiple\r\n ? [...(this.value as UploadedFile[] || []), entry]\r\n : [entry];\r\n this.updateValue(updated);\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n }\r\n }\r\n\r\n removeUploadedFile(index: number): void {\r\n const current: UploadedFile[] = (this.value as UploadedFile[]) || [];\r\n const fileToRemove = current[index];\r\n if (!fileToRemove) return;\r\n\r\n const removeLocally = () => {\r\n const updated = current.filter((_, i) => i !== index);\r\n this.updateValue(updated);\r\n };\r\n\r\n const deleteUrl = this.config.attachmentConfig?.deleteUrl;\r\n\r\n if (fileToRemove.id && fileToRemove.id !== 0 && deleteUrl) {\r\n fileToRemove.isUploading = true; // Use this flag to disable the remove button\r\n this.updateValue([...current]); // trigger UI update\r\n\r\n let params = new HttpParams();\r\n if (!deleteUrl.includes('attachmentId=')) {\r\n params = params.set('attachmentId', fileToRemove.id.toString());\r\n }\r\n if (!deleteUrl.includes('reason=')) {\r\n // As requested in the API link, the reason is passed\r\n params = params.set('reason', 'DELECTED BY CREATOR');\r\n }\r\n\r\n this.http.delete<any>(deleteUrl, { headers: this.getHeaders(), params })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: () => {\r\n removeLocally();\r\n },\r\n error: (err) => {\r\n console.error('Failed to delete attachment', err);\r\n fileToRemove.isUploading = false;\r\n this.fileUploadError = `Failed to delete \"${fileToRemove.name}\". Please try again.`;\r\n this.updateValue([...current]);\r\n }\r\n });\r\n } else {\r\n removeLocally();\r\n }\r\n }\r\n\r\n getFileIcon(mimeType: string): string {\r\n if (!mimeType) return 'attach_file'; // guard: undefined/null from non-FILE_UPLOAD values\r\n if (mimeType.includes('pdf')) return 'picture_as_pdf';\r\n if (mimeType.includes('image')) return 'image';\r\n if (mimeType.includes('word') || mimeType.includes('document')) return 'description';\r\n if (mimeType.includes('sheet') || mimeType.includes('excel') || mimeType.includes('csv')) return 'table_chart';\r\n if (mimeType.includes('zip') || mimeType.includes('compressed')) return 'folder_zip';\r\n return 'attach_file';\r\n }\r\n\r\n formatFileSize(bytes: number): string {\r\n if (bytes < 1024) return `${bytes} B`;\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\r\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\r\n }\r\n\r\n // ── Action Labels ──────────────────────────────────────────────────────────\r\n\r\n get addLabel(): string {\r\n const key = this.controller.actionLabels?.addLabel || 'Add';\r\n return this.controller.labels[key] || key;\r\n }\r\n\r\n get removeLabel(): string {\r\n const key = this.controller.actionLabels?.removeLabel || 'Remove';\r\n return this.controller.labels[key] || key;\r\n }\r\n\r\n // ── MEDIA_UPLOAD helpers ─────────────────────────────────────────────────\r\n\r\n get mediaItems(): MediaItem[] {\r\n return (this.value as MediaItem[]) || [];\r\n }\r\n\r\n /** Number of active items (used to clamp carousel index) */\r\n get mediaCount(): number { return this.mediaItems.length; }\r\n\r\n /** The currently visible carousel item */\r\n get activeMediaItem(): MediaItem | null {\r\n if (!this.mediaItems.length) return null;\r\n return this.mediaItems[Math.min(this.mediaCarouselIndex, this.mediaItems.length - 1)];\r\n }\r\n\r\n /** Thumbnail strip items */\r\n get mediaThumbnails(): MediaItem[] { return this.mediaItems; }\r\n\r\n mediaCarouselPrev(): void {\r\n if (this.mediaCarouselIndex > 0) this.mediaCarouselIndex--;\r\n }\r\n\r\n mediaCarouselNext(): void {\r\n if (this.mediaCarouselIndex < this.mediaItems.length - 1) this.mediaCarouselIndex++;\r\n }\r\n\r\n mediaGoTo(index: number): void {\r\n this.mediaCarouselIndex = index;\r\n }\r\n\r\n // ── YouTube ──────────────────────────────────────────────────────────────\r\n\r\n onMediaMenuVideo(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = !this.showYoutubeInput;\r\n this.youtubeUrlInput = '';\r\n this.youtubeUrlError = '';\r\n }\r\n\r\n addYoutubeMedia(): void {\r\n const cfg = this.config.attachmentConfig;\r\n const maxItems = cfg?.maxFiles ?? 10;\r\n if (this.mediaItems.length >= maxItems) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n return;\r\n }\r\n\r\n const url = this.youtubeUrlInput.trim();\r\n const videoId = this._extractYoutubeId(url);\r\n if (!videoId) {\r\n this.youtubeUrlError = this.controller.labels['ERR_INVALID_YOUTUBE_URL'] || 'Please enter a valid YouTube URL.';\r\n return;\r\n }\r\n const item: MediaItem = {\r\n mediaType: 'youtube',\r\n url: `https://www.youtube.com/embed/${videoId}`,\r\n thumbnailUrl: `https://img.youtube.com/vi/${videoId}/mqdefault.jpg`\r\n };\r\n this._appendMediaItem(item);\r\n this.showYoutubeInput = false;\r\n this.youtubeUrlInput = '';\r\n this.youtubeUrlError = '';\r\n }\r\n\r\n private _extractYoutubeId(url: string): string | null {\r\n const patterns = [\r\n /(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/|youtube\\.com\\/embed\\/)([\\w-]{11})/,\r\n /youtube\\.com\\/shorts\\/([\\w-]{11})/\r\n ];\r\n for (const p of patterns) {\r\n const m = url.match(p);\r\n if (m) return m[1];\r\n }\r\n return null;\r\n }\r\n\r\n // ── Device upload ────────────────────────────────────────────────────────\r\n\r\n onMediaMenuDevice(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = false;\r\n // Use setTimeout so Angular finishes closing the dropdown before the\r\n // browser opens the native file picker (the input lives outside *ngIf).\r\n setTimeout(() => this.mediaDeviceInput?.nativeElement?.click());\r\n }\r\n\r\n onMediaFileSelected(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this.processFiles(input.files);\r\n }\r\n input.value = '';\r\n }\r\n\r\n // ── Library picker ───────────────────────────────────────────────────────\r\n\r\n onMediaMenuLibrary(): void {\r\n this.showMediaMenu = false;\r\n this.showYoutubeInput = false;\r\n this.libraryImages = [];\r\n this.librarySelectedIds = new Set();\r\n this.libraryError = '';\r\n this.showLibraryModal = true;\r\n this._loadLibraryImages();\r\n }\r\n\r\n private _loadLibraryImages(): void {\r\n const cfg = this.config.attachmentConfig;\r\n if (!cfg?.libraryApiUrl) { this.libraryError = 'Library not configured.'; return; }\r\n this.libraryLoading = true;\r\n this.http.get<any>(cfg.libraryApiUrl, { headers: this.getHeaders() })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: (res: any) => {\r\n let data: any;\r\n\r\n if (cfg.libraryDataPath) {\r\n // Try explicit dot-notation path configured by the dev (e.g. 'data.items')\r\n data = this.getValueByPath(res, cfg.libraryDataPath);\r\n }\r\n\r\n // If no array was found at the configured path, try auto-detecting\r\n // the array from common structures\r\n if (!Array.isArray(data)) {\r\n if (Array.isArray(res)) {\r\n // API returned a plain array\r\n data = res;\r\n } else if (res && typeof res === 'object') {\r\n // API returned an object keyed by entity-id e.g. { \"1\": [...], \"2\": [...] }\r\n // Flatten all value-arrays into one list\r\n data = (Object.values(res) as any[][])\r\n .filter(v => Array.isArray(v))\r\n .reduce((acc, arr) => acc.concat(arr), []);\r\n }\r\n }\r\n\r\n this.libraryImages = Array.isArray(data) ? data : [];\r\n this.libraryLoading = false;\r\n },\r\n error: () => {\r\n this.libraryError = this.controller.labels['ERR_LIBRARY_LOAD_FAILED'] || 'Failed to load library images.';\r\n this.libraryLoading = false;\r\n }\r\n });\r\n }\r\n\r\n getLibraryItemUrl(item: any): string {\r\n const cfg = this.config.attachmentConfig;\r\n return cfg?.libraryUrlPath ? this.getValueByPath(item, cfg.libraryUrlPath) : (item?.url || item?.completeURL || '');\r\n }\r\n\r\n getLibraryItemId(item: any): any {\r\n const cfg = this.config.attachmentConfig;\r\n return cfg?.libraryIdPath ? this.getValueByPath(item, cfg.libraryIdPath) : (item?.id ?? item);\r\n }\r\n\r\n isLibraryItemSelected(item: any): boolean {\r\n return this.librarySelectedIds.has(this.getLibraryItemId(item));\r\n }\r\n\r\n toggleLibraryItem(item: any): void {\r\n const id = this.getLibraryItemId(item);\r\n if (this.librarySelectedIds.has(id)) {\r\n this.librarySelectedIds.delete(id);\r\n } else {\r\n this.librarySelectedIds.add(id);\r\n }\r\n }\r\n\r\n closeLibraryModal(): void {\r\n this.showLibraryModal = false;\r\n }\r\n\r\n confirmLibrarySelection(): void {\r\n // We already have completeURL on each library item — no upload API call needed.\r\n // Directly build MediaItem[] from the selected library images and append to form value.\r\n const selectedItems = this.libraryImages.filter(item => this.isLibraryItemSelected(item));\r\n if (!selectedItems.length) {\r\n this.showLibraryModal = false;\r\n return;\r\n }\r\n\r\n const cfg = this.config.attachmentConfig;\r\n const maxItems = cfg?.maxFiles ?? 10;\r\n const currentItems: MediaItem[] = [...this.mediaItems];\r\n let errorShown = false;\r\n\r\n selectedItems.forEach(item => {\r\n if (currentItems.length >= maxItems) {\r\n if (!errorShown) {\r\n this.showMediaError(this.controller.labels['ERR_MEDIA_MAX'] || `Maximum ${maxItems} media items allowed.`);\r\n errorShown = true;\r\n }\r\n return;\r\n }\r\n const url = this.getLibraryItemUrl(item); // item.completeURL\r\n if (!url) return;\r\n\r\n // Do NOT store the library item's id — library images were not POSTed to\r\n // the upload API, so there is no server-side attachment record to DELETE.\r\n // Without an id, removeMediaItem() always takes the local-remove path. ✓\r\n currentItems.push({\r\n mediaType: 'image',\r\n url,\r\n mimeType: item.mimeType,\r\n fileName: item.fileName ?? item.name,\r\n isUploading: false\r\n });\r\n });\r\n\r\n\r\n this.updateValue(currentItems);\r\n this.mediaCarouselIndex = currentItems.length - 1;\r\n this.showLibraryModal = false;\r\n }\r\n\r\n // ── Remove item ──────────────────────────────────────────────────────────\r\n\r\n removeMediaItem(index: number): void {\r\n const items: MediaItem[] = [...this.mediaItems];\r\n const item = items[index];\r\n if (!item) return;\r\n\r\n const removeLocally = () => {\r\n const updated = items.filter((_, i) => i !== index);\r\n this.updateValue(updated.length ? updated : null);\r\n // Clamp carousel index so it never points past the end\r\n this.mediaCarouselIndex = Math.max(0, this.mediaCarouselIndex - (index <= this.mediaCarouselIndex ? 1 : 0));\r\n };\r\n\r\n const deleteUrl = this.config.attachmentConfig?.deleteUrl;\r\n\r\n if (item.id && item.id !== 0 && deleteUrl) {\r\n // ── API delete path (same logic as removeUploadedFile) ───────────────\r\n item.isUploading = true; // disable the remove button while in-flight\r\n this.updateValue([...items]); // trigger change detection\r\n\r\n let params = new HttpParams();\r\n if (!deleteUrl.includes('attachmentId=')) {\r\n params = params.set('attachmentId', item.id.toString());\r\n }\r\n if (!deleteUrl.includes('reason=')) {\r\n params = params.set('reason', 'DELETED BY CREATOR');\r\n }\r\n\r\n this.http.delete<any>(deleteUrl, { headers: this.getHeaders(), params })\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe({\r\n next: () => removeLocally(),\r\n error: (err) => {\r\n console.error('Failed to delete media attachment', err);\r\n item.isUploading = false;\r\n this.updateValue([...items]); // restore UI state\r\n }\r\n });\r\n } else {\r\n // ── No id or no deleteUrl: remove locally, no API call ───────────────\r\n removeLocally();\r\n }\r\n }\r\n\r\n\r\n private _appendMediaItem(item: MediaItem): void {\r\n const current: MediaItem[] = [...this.mediaItems];\r\n current.push(item);\r\n this.updateValue(current);\r\n this.mediaCarouselIndex = current.length - 1;\r\n }\r\n\r\n private showMediaError(msg: string): void {\r\n this.mediaUploadError = msg;\r\n setTimeout(() => {\r\n if (this.mediaUploadError === msg) this.mediaUploadError = '';\r\n }, 4000);\r\n }\r\n\r\n // ── LOCATION field methods ─────────────────────────────────────────────────\r\n\r\n private initLocationField(): void {\r\n const cfg = this.config.locationConfig;\r\n this.locationActiveTab = cfg?.defaultTab ?? 'VENUE';\r\n\r\n // Restore from existing form value using the robust getter\r\n if (this.locationValue.tab) {\r\n this.locationActiveTab = this.locationValue.tab;\r\n }\r\n\r\n // Subscribe to external patchValue events (prefills)\r\n this.formGroup.get(this.config.name!)?.valueChanges\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(() => {\r\n if (this.locationValue.tab) {\r\n this.locationActiveTab = this.locationValue.tab;\r\n }\r\n setTimeout(() => this._renderMap());\r\n });\r\n\r\n // Load Google Maps script if not already loaded\r\n this._ensureGoogleMapsScript();\r\n }\r\n\r\n private _ensureGoogleMapsScript(): void {\r\n const apiKey = this.config.locationConfig?.googleMapsApiKey;\r\n if (!apiKey) return;\r\n\r\n if ((window as any).google?.maps?.places) {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n return;\r\n }\r\n\r\n // Only inject once\r\n if (document.querySelector('script[data-sf-gmaps]')) {\r\n // Wait for the script to load\r\n const wait = () => {\r\n if ((window as any).google?.maps?.places) {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n } else {\r\n setTimeout(wait, 300);\r\n }\r\n };\r\n wait();\r\n return;\r\n }\r\n\r\n const script = document.createElement('script');\r\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`;\r\n script.async = true;\r\n script.defer = true;\r\n script.setAttribute('data-sf-gmaps', 'true');\r\n script.onload = () => {\r\n this._googleAcService = new (window as any).google.maps.places.AutocompleteService();\r\n this.locationMapLoaded = true;\r\n setTimeout(() => this._renderMap(), 100);\r\n };\r\n document.head.appendChild(script);\r\n }\r\n\r\n onLocationTabChange(tab: 'VENUE' | 'ONLINE' | 'TBA'): void {\r\n if (this.locationActiveTab === 'VENUE' && tab !== 'VENUE') {\r\n this._googleMap = null;\r\n this._mapMarkers = [];\r\n }\r\n this.locationActiveTab = tab;\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n this.locationSearchText = '';\r\n const existing: LocationFieldValue = this.formGroup.get(this.config.name!)?.value || { tab, venues: [], onlineUrl: '' };\r\n existing.tab = tab;\r\n this.updateValue(existing);\r\n if (tab === 'VENUE') {\r\n setTimeout(() => this._renderMap());\r\n }\r\n }\r\n\r\n get locationValue(): LocationFieldValue {\r\n let v = this.formGroup.get(this.config.name!)?.value;\r\n if (typeof v === 'string') {\r\n try { v = JSON.parse(v); } catch { /* ignore */ }\r\n }\r\n // Automatically unwrap if prefill payload was mistakenly double-nested like `{ location: { tab... } }`\r\n if (v && !v.tab && v[this.config.name!]) {\r\n v = v[this.config.name!];\r\n }\r\n if (v && v.tab) return v;\r\n return { tab: this.locationActiveTab, venues: [], onlineUrl: '' };\r\n }\r\n\r\n get locationVenues(): LocationItem[] {\r\n return this.locationValue.venues || [];\r\n }\r\n\r\n get locationOnlineUrl(): string {\r\n return this.locationValue.onlineUrl || '';\r\n }\r\n\r\n get locationMaxReached(): boolean {\r\n const isMulti = this.config.locationConfig?.allowMulti;\r\n const max = isMulti ? (this.config.locationConfig?.maxLocations ?? 5) : 1;\r\n return this.locationVenues.length >= max;\r\n }\r\n\r\n handleLocationSearchInput(event: Event): void {\r\n const input = (event.target as HTMLInputElement).value;\r\n this.locationSearchText = input;\r\n if (!input || input.length < 2) {\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n return;\r\n }\r\n if (!this._googleAcService) {\r\n return;\r\n }\r\n this._googleAcService.getPlacePredictions({ input }, (predictions: any[], status: string) => {\r\n if (status === 'OK' && predictions) {\r\n this.locationSuggestions = predictions;\r\n this.locationShowSuggestions = true;\r\n } else {\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n }\r\n });\r\n }\r\n\r\n onLocationSuggestionSelect(prediction: any): void {\r\n if (!prediction) return;\r\n const isMulti = this.config.locationConfig?.allowMulti;\r\n const max = isMulti ? (this.config.locationConfig?.maxLocations ?? 5) : 1;\r\n const current = this.locationVenues;\r\n if (current.length >= max) return;\r\n\r\n const newItem: LocationItem = {\r\n description: prediction.description,\r\n placeId: prediction.place_id,\r\n address: prediction.description,\r\n type: 'GOOGLE',\r\n isActive: true\r\n };\r\n\r\n // Geocode to get lat/lng and components\r\n if ((window as any).google?.maps?.Geocoder) {\r\n const geocoder = new (window as any).google.maps.Geocoder();\r\n geocoder.geocode({ placeId: prediction.place_id }, (results: any[], status: string) => {\r\n if (status === 'OK' && results[0]) {\r\n const res = results[0];\r\n newItem.latitude = res.geometry?.location?.lat();\r\n newItem.longitude = res.geometry?.location?.lng();\r\n newItem.address = res.formatted_address || prediction.description;\r\n\r\n let name = prediction.description;\r\n if (prediction.structured_formatting && prediction.structured_formatting.main_text) {\r\n name = prediction.structured_formatting.main_text;\r\n }\r\n newItem.name = name;\r\n\r\n res.address_components?.forEach((c: any) => {\r\n if (c.types.includes('locality')) newItem.cityLabel = c.long_name;\r\n if (c.types.includes('administrative_area_level_1')) newItem.stateLabel = c.long_name;\r\n if (c.types.includes('country')) newItem.countryLabel = c.long_name;\r\n });\r\n }\r\n this._addVenueAndUpdate(newItem);\r\n });\r\n } else {\r\n this._addVenueAndUpdate(newItem);\r\n }\r\n\r\n this.locationSearchText = '';\r\n this.locationSuggestions = [];\r\n this.locationShowSuggestions = false;\r\n }\r\n\r\n private _addVenueAndUpdate(item: LocationItem): void {\r\n const val = { ...this.locationValue };\r\n val.venues = [...(val.venues || []), item];\r\n this.updateValue(val);\r\n setTimeout(() => this._renderMap());\r\n }\r\n\r\n removeLocationVenue(index: number): void {\r\n const val = { ...this.locationValue };\r\n val.venues = (val.venues || []).filter((_, i) => i !== index);\r\n this.updateValue(val);\r\n setTimeout(() => this._renderMap());\r\n }\r\n\r\n onLocationUrlChange(url: string): void {\r\n const val = { ...this.locationValue, onlineUrl: url };\r\n this.updateValue(val);\r\n }\r\n\r\n hideLocationSuggestions(): void {\r\n setTimeout(() => { this.locationShowSuggestions = false; }, 200);\r\n }\r\n\r\n getLocationMapEmbedUrl(): string {\r\n const venues = this.locationVenues.filter(v => v.placeId || (typeof v.latitude === 'number' && typeof v.longitude === 'number'));\r\n const apiKey = this.config.locationConfig?.googleMapsApiKey || '';\r\n\r\n // No locations currently selected: Show the default map view (India)\r\n if (!venues.length) {\r\n if (apiKey) {\r\n // Embed API center fallback if they have an API Key but no marker yet\r\n const lat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const lng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n const zoom = this.config.locationConfig?.defaultZoom ?? 4;\r\n return `https://www.google.com/maps/embed/v1/view?key=${apiKey}&center=${lat},${lng}&zoom=${zoom}`;\r\n } else {\r\n // Static iframe fallback text query\r\n return `https://maps.google.com/maps?q=India&output=embed`;\r\n }\r\n }\r\n\r\n if (venues.length === 1) {\r\n const v = venues[0];\r\n const q = v.placeId ? `place_id:${v.placeId}` : encodeURIComponent(v.address || v.description || '');\r\n return `https://www.google.com/maps/embed/v1/place?key=${apiKey}&q=${q}`;\r\n }\r\n // Multiple locations — use directions/search embed\r\n const q = encodeURIComponent(venues.map(v => v.address || v.description).join('|'));\r\n return `https://www.google.com/maps/embed/v1/search?key=${apiKey}&q=${q}`;\r\n }\r\n\r\n private _renderMap(): void {\r\n if (!(window as any).google?.maps) return;\r\n if (!this.config.locationConfig?.showMap && this.config.locationConfig?.showMap !== undefined) return;\r\n\r\n const venues = this.locationVenues.filter(v => typeof v.latitude === 'number' && typeof v.longitude === 'number');\r\n\r\n const mapEl = document.getElementById(`loc-map-${this.config.name}`);\r\n if (!mapEl) return;\r\n\r\n if (!this._googleMap) {\r\n // Default to India if no venues exist\r\n const defaultLat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const defaultLng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n const defaultZoom = this.config.locationConfig?.defaultZoom ?? 4;\r\n\r\n this._googleMap = new (window as any).google.maps.Map(mapEl, {\r\n zoom: venues.length === 1 ? 12 : defaultZoom,\r\n center: venues.length > 0\r\n ? { lat: venues[0].latitude, lng: venues[0].longitude }\r\n : { lat: defaultLat, lng: defaultLng }\r\n });\r\n } else {\r\n if (venues.length === 0) {\r\n // Re-center on default\r\n const lat = this.config.locationConfig?.defaultLat ?? 20.5937;\r\n const lng = this.config.locationConfig?.defaultLng ?? 78.9629;\r\n this._googleMap.setCenter({ lat, lng });\r\n this._googleMap.setZoom(this.config.locationConfig?.defaultZoom ?? 4);\r\n } else if (venues.length === 1) {\r\n this._googleMap.setCenter({ lat: venues[0].latitude, lng: venues[0].longitude });\r\n this._googleMap.setZoom(12);\r\n }\r\n }\r\n\r\n // Clear old markers\r\n this._mapMarkers.forEach(m => m.setMap(null));\r\n this._mapMarkers = [];\r\n\r\n venues.forEach(v => {\r\n const marker = new (window as any).google.maps.Marker({\r\n position: { lat: v.latitude, lng: v.longitude },\r\n map: this._googleMap,\r\n title: v.name || v.address || v.description\r\n });\r\n this._mapMarkers.push(marker);\r\n });\r\n\r\n if (venues.length > 1) {\r\n const bounds = new (window as any).google.maps.LatLngBounds();\r\n venues.forEach(v => bounds.extend({ lat: v.latitude!, lng: v.longitude! }));\r\n this._googleMap.fitBounds(bounds);\r\n }\r\n }\r\n}\r\n\r\n","<div class=\"form-field\" *ngIf=\"isVisible\" [class.has-error]=\"errorMessage\">\r\n\r\n <!-- ══ ROW Layout ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRow\" class=\"form-row grid-row\">\r\n <ng-container *ngFor=\"let child of config.children\">\r\n <div class=\"row-field\" [style.gridColumn]=\"'span ' + getChildColSpan(child)\" *ngIf=\"child.isEnabled !== false\">\r\n <lib-form-field [config]=\"child\" [controller]=\"controller\" [formGroup]=\"formGroup\" [allowMulti]=\"allowMulti\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- ══ GROUP — allowMulti (repeater) ════════════════════════════════════ -->\r\n <div *ngIf=\"isGroup && config.sectionConfig?.allowMulti\" class=\"group-section-wrapper\"\r\n [class.multi-save-active]=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n\r\n <!-- Multi-Save Header with Add button (top-right style) -->\r\n <div class=\"multi-save-header\" *ngIf=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig?.label\">{{ config.sectionConfig!.label }}</h3>\r\n <lib-button [variant]=\"'outline'\" [icon]=\"{type: 'material', value: 'add'}\" (click)=\"addGroupInstance()\"\r\n class=\"btn-add-multi\">\r\n {{ addMultiLabel }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- Standard Header for non-multiSave -->\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig?.label && !config.sectionConfig?.multiSaveConfig?.active\">{{\r\n config.sectionConfig!.label }}</h3>\r\n\r\n <div *ngFor=\"let instance of instanceList; trackBy: trackByInstanceId; let i = index\" class=\"group-instance\"\r\n [class.is-editing]=\"instance.isEditing\"\r\n [class.is-card]=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n\r\n <!-- 1. EDIT MODE / UNSAVED / STANDARD STATE -->\r\n <div [hidden]=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n <!-- Instance header — show remove only when more than 1 instance -->\r\n <div class=\"group-header\" *ngIf=\"!config.sectionConfig?.multiSaveConfig?.active && instanceList.length > 1\">\r\n <span class=\"group-number\">{{ config.sectionConfig!.label }} #{{ i + 1 }}</span>\r\n <lib-button [variant]=\"'danger-outline'\" [icon]=\"{type: 'material', value: 'delete_outline'}\"\r\n (click)=\"removeGroupInstance(i)\">\r\n {{ removeLabel }}\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"group-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.sectionConfig!.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\" *ngIf=\"field.isEnabled !== false\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"instance.fg\" [allowMulti]=\"true\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- SAVE / CANCEL BUTTONS for MultiSave in Editing phase -->\r\n <div class=\"group-footer\" *ngIf=\"config.sectionConfig?.multiSaveConfig?.active\">\r\n <span class=\"field-error\" *ngIf=\"multiSaveError\">{{ multiSaveError }}</span>\r\n <div class=\"footer-actions\">\r\n <lib-button [variant]=\"'outline'\" (click)=\"cancelGroupInstance(i)\">Cancel</lib-button>\r\n <lib-button [variant]=\"'primary'\" (click)=\"saveGroupInstance(i)\">Save</lib-button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- 2. CARD VIEW (Saved State) -->\r\n <ng-container *ngIf=\"config.sectionConfig?.multiSaveConfig?.active && !instance.isEditing\">\r\n <div class=\"card-view\" [class.is-expanded]=\"instance.isExpanded\">\r\n <div class=\"card-content\">\r\n <span class=\"card-title\">{{ instance.fg.get(config.sectionConfig.multiSaveConfig.summaryField || '')?.value\r\n || '—' }}</span>\r\n <!-- <span class=\"card-desc\" *ngIf=\"config.sectionConfig.multiSaveConfig.descriptionField\"\r\n [innerHTML]=\"instance.fg.get(config.sectionConfig.multiSaveConfig.descriptionField)?.value\">\r\n </span> -->\r\n </div>\r\n <div class=\"card-actions\">\r\n <mat-icon class=\"icon-delete\" (click)=\"removeGroupInstance(i, true)\">delete_outline</mat-icon>\r\n <mat-icon class=\"icon-edit\" (click)=\"editGroupInstance(i)\">edit_outline</mat-icon>\r\n <mat-icon class=\"icon-expand\" (click)=\"toggleExpandGroupInstance(i)\">\r\n {{ instance.isExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Standard Add Button for non-multiSave -->\r\n <lib-button *ngIf=\"!config.sectionConfig?.multiSaveConfig?.active\" [variant]=\"'outline'\"\r\n [icon]=\"{type: 'material', value: 'add'}\" (click)=\"addGroupInstance()\" class=\"btn-add-group-wrapper\">\r\n {{ addLabel }} {{ config.sectionConfig!.label }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- ══ GROUP — single (non-repeater) ════════════════════════════════════ -->\r\n <div *ngIf=\"isGroup && config.sectionConfig && !config.sectionConfig.allowMulti\" class=\"group-section-wrapper\">\r\n <h3 class=\"group-label\" *ngIf=\"config.sectionConfig.label\">{{ config.sectionConfig.label }}</h3>\r\n <div class=\"group-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.sectionConfig.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\" *ngIf=\"field.isEnabled !== false\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"groupFormGroup\" [allowMulti]=\"false\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- ══ Text Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isTextField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <textarea *ngIf=\"config.subType === 'LONG'\" class=\"field-input textarea\" [placeholder]=\"config.placeholder || ''\"\r\n [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\" rows=\"4\">\r\n </textarea>\r\n\r\n <!-- Password input with show/hide toggle -->\r\n <div *ngIf=\"config.subType === 'PASSWORD'\" class=\"password-wrapper\">\r\n <input [type]=\"showPassword ? 'text' : 'password'\" class=\"field-input password-input\"\r\n [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <button type=\"button\" class=\"password-toggle\" (click)=\"showPassword = !showPassword\" tabindex=\"-1\"\r\n [attr.aria-label]=\"showPassword ? 'Hide password' : 'Show password'\">\r\n <mat-icon class=\"eye-icon\">{{ showPassword ? 'visibility' : 'visibility_off' }}</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <span class=\"input-prefix\" *ngIf=\"config.prefix\">{{ config.prefix }}</span>\r\n\r\n <input *ngIf=\"config.subType !== 'LONG' && config.subType !== 'PASSWORD'\"\r\n [type]=\"config.subType === 'EMAIL' ? 'email' : config.subType === 'PHONE' ? 'tel' : 'text'\" class=\"field-input\"\r\n [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\"\r\n [readonly]=\"config.readonly\">\r\n\r\n <span class=\"input-suffix\" *ngIf=\"config.suffix\">{{ config.suffix }}</span>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <div class=\"char-count-hint\" *ngIf=\"showCharCount\">\r\n {{ remainingCharacters }} characters remaining\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Number Input ══════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isNumberField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <span class=\"input-prefix\" *ngIf=\"config.prefix\">{{ config.prefix }}</span>\r\n\r\n <input type=\"number\" class=\"field-input\" [placeholder]=\"config.placeholder || ''\" [formControlName]=\"config.name!\"\r\n [min]=\"config.numberConfig?.min\" [max]=\"config.numberConfig?.max\" [step]=\"config.numberConfig?.step || 1\"\r\n [class.is-invalid]=\"errorMessage\" [readonly]=\"config.readonly\">\r\n\r\n <span class=\"input-suffix\" *ngIf=\"config.suffix\">{{ config.suffix }}</span>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Date Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isDateField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <input matInput [matDatepicker]=\"datePicker\" class=\"field-input date-input has-icon-right\"\r\n [formControlName]=\"config.name!\" [min]=\"config.dateConfig?.minDate\" [max]=\"config.dateConfig?.maxDate\"\r\n [class.is-invalid]=\"errorMessage\" [placeholder]=\"config.placeholder || ''\" [readonly]=\"config.readonly\"\r\n (click)=\"!config.readonly && datePicker.open()\">\r\n <div class=\"date-icon-wrapper\" *ngIf=\"!config.readonly\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n </div>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Time Input ════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isTimeField\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"input-group\" [class.readonly]=\"config.readonly\">\r\n <input type=\"time\" class=\"field-input time-input\" [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\" [readonly]=\"!!config.readonly\">\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Autocomplete ═════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isAutocomplete\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <!-- Hidden real control (stores the code value) -->\r\n <input type=\"hidden\" [formControlName]=\"config.name!\">\r\n\r\n <div class=\"autocomplete-wrapper\" [class.is-invalid]=\"errorMessage\" [class.readonly]=\"config.readonly\">\r\n <!-- Search icon -->\r\n <mat-icon class=\"ac-search-icon\">search</mat-icon>\r\n\r\n <input class=\"field-input ac-input\" [formControl]=\"autocompleteInputCtrl\" [matAutocomplete]=\"auto\"\r\n [placeholder]=\"config.placeholder || 'Search…'\" [readonly]=\"!!config.readonly\" [class.is-invalid]=\"errorMessage\"\r\n (blur)=\"onAutocompleteClear()\" autocomplete=\"off\">\r\n\r\n <!-- Clear button -->\r\n <button type=\"button\" class=\"ac-clear-btn\" *ngIf=\"autocompleteInputCtrl.value && !config.readonly\"\r\n (click)=\"autocompleteInputCtrl.setValue(''); updateValue(null)\" tabindex=\"-1\" aria-label=\"Clear\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n\r\n <mat-autocomplete #auto=\"matAutocomplete\" [panelWidth]=\"'auto'\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option.label\"\r\n (onSelectionChange)=\"onAutocompleteSelected(option)\">\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"filteredOptions.length === 0\" disabled class=\"ac-no-results\">\r\n No results found\r\n </mat-option>\r\n </mat-autocomplete>\r\n\r\n <div class=\"readonly-icons\" *ngIf=\"config.readonly\">\r\n <mat-icon class=\"lock-icon\">lock</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Dropdown ══════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isDropdown\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <select *ngIf=\"config.subType === 'SINGLE'\" class=\"field-input\" [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\">\r\n <option [ngValue]=\"null\" disabled selected>{{ config.placeholder || 'Select' }}</option>\r\n <option *ngFor=\"let option of config.optionConfig?.optionList\" [value]=\"option.code\">\r\n {{ option.label }}\r\n </option>\r\n </select>\r\n\r\n <select *ngIf=\"config.subType === 'MULTIPLE'\" class=\"field-input\" multiple [formControlName]=\"config.name!\"\r\n [class.is-invalid]=\"errorMessage\">\r\n <option *ngFor=\"let option of config.optionConfig?.optionList\" [value]=\"option.code\">\r\n {{ option.label }}\r\n </option>\r\n </select>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Radio ═════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRadio\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"radio-group\" [class.is-invalid]=\"errorMessage\" \r\n [class]=\"config.optionConfig?.layout ? 'layout-' + config.optionConfig!.layout.toLowerCase() : ''\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"radio-label\"\r\n [class.card-item]=\"config.subType === 'CARD'\"\r\n [class.selected]=\"formGroup.get(config.name!)?.value === option.code\"\r\n [style.gridColumn]=\"config.optionConfig?.layout?.toUpperCase() === 'COLUMN' ? 'span ' + getOptionColSpan(option) : null\">\r\n <input type=\"radio\" [formControlName]=\"config.name!\" [value]=\"option.code\">\r\n <div class=\"option-content\">\r\n <span class=\"label-text\">{{ option.label }}</span>\r\n <span class=\"option-hint\" *ngIf=\"option.hint\">{{ option.hint }}</span>\r\n </div>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Checkbox ══════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isCheckbox\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label && config.subType === 'LIST'\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"config.subType === 'BOOL'\" class=\"checkbox-single\">\r\n <label class=\"checkbox-label\">\r\n <input type=\"checkbox\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <span>{{ config.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <div *ngIf=\"config.subType === 'LIST' || config.subType === 'CARD'\" class=\"checkbox-group\" [class.is-invalid]=\"errorMessage\"\r\n [class]=\"config.optionConfig?.layout ? 'layout-' + config.optionConfig!.layout.toLowerCase() : ''\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"checkbox-label\"\r\n [class.card-item]=\"config.subType === 'CARD'\"\r\n [class.selected]=\"isChecked(option.code)\"\r\n [style.gridColumn]=\"config.optionConfig?.layout?.toUpperCase() === 'COLUMN' ? 'span ' + getOptionColSpan(option) : null\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(option.code)\" [disabled]=\"!!config.disabled\"\r\n (change)=\"onCheckboxListChange(option.code, $any($event.target).checked)\">\r\n <div class=\"option-content\">\r\n <span class=\"label-text\">{{ option.label }}</span>\r\n <span class=\"option-hint\" *ngIf=\"option.hint\">{{ option.hint }}</span>\r\n </div>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Chip ══════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isChip\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"chip-group\" [class.is-invalid]=\"errorMessage\">\r\n <label *ngFor=\"let option of config.optionConfig?.optionList\" class=\"chip-label\"\r\n [class.selected]=\"isChecked(option.code)\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(option.code)\" [disabled]=\"!!config.disabled\"\r\n (change)=\"onCheckboxListChange(option.code, $any($event.target).checked)\" hidden>\r\n <span>{{ option.label }}</span>\r\n </label>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Switch ════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isSwitch\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label class=\"switch-container\">\r\n <span class=\"field-label\">{{ config.label }}</span>\r\n <div class=\"switch\">\r\n <input type=\"checkbox\" [formControlName]=\"config.name!\" [class.is-invalid]=\"errorMessage\">\r\n <span class=\"slider\"></span>\r\n </div>\r\n </label>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Rich Text ═════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRichText\" class=\"field-wrapper component-rich-text\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"rich-text-container\" [class.is-invalid]=\"errorMessage\">\r\n <quill-editor [formControlName]=\"config.name!\" class=\"rich-text-editor\"\r\n [placeholder]=\"config.richTextConfig?.placeholder || config.placeholder || ''\"\r\n [styles]=\"{height: config.richTextConfig?.height || '200px'}\">\r\n </quill-editor>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <div class=\"char-count-hint\" *ngIf=\"showCharCount\">\r\n {{ remainingCharacters }} characters remaining\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Rating ════════════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isRating\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <div class=\"rating-group\" [class.is-invalid]=\"errorMessage\">\r\n <span *ngFor=\"let star of getStarArray()\" class=\"star\" [class.filled]=\"isStarFilled(star)\"\r\n [class.half]=\"isStarHalf(star)\" (click)=\"onRatingChange(star, $event)\">\r\n <mat-icon>{{ isStarFilled(star) || isStarHalf(star) ? 'star' : 'star_border' }}</mat-icon>\r\n </span>\r\n </div>\r\n\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n <!-- ══ Generated Field (read-only) ══════════════════════════════════════ -->\r\n <div *ngIf=\"isGenerated\" class=\"field-wrapper\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">{{ config.label }}</label>\r\n <div class=\"generated-value\">{{ value || '-' }}</div>\r\n <span class=\"field-hint\" *ngIf=\"config.hint\">{{ config.hint }}</span>\r\n </div>\r\n\r\n <!-- ══ File Upload ═══════════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isFileUpload\" class=\"field-wrapper\" [formGroup]=\"formGroup\">\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n\r\n <!-- Drop Zone -->\r\n <div class=\"upload-drop-zone\" [class.drag-over]=\"isDragOver\" [class.has-files]=\"value?.length\"\r\n [class.is-invalid]=\"errorMessage\" (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onFileDrop($event)\" (click)=\"fileInput.click()\">\r\n\r\n <div class=\"upload-icon-wrap\">\r\n <mat-icon class=\"upload-cloud-icon\">cloud_upload</mat-icon>\r\n </div>\r\n\r\n <p class=\"upload-main-text\">Drag and drop files here or <span class=\"upload-link\">click to upload</span></p>\r\n <p class=\"upload-hint-text\" *ngIf=\"config.attachmentConfig?.acceptLabel\">\r\n Supported formats:\r\n <span class=\"upload-formats\">{{ config.attachmentConfig!.acceptLabel }}</span>\r\n </p>\r\n <p class=\"upload-hint-text\" *ngIf=\"!config.attachmentConfig?.acceptLabel && config.hint\">\r\n {{ config.hint }}\r\n </p>\r\n\r\n <!-- Hidden native file input -->\r\n <input #fileInput type=\"file\" hidden [attr.multiple]=\"config.attachmentConfig?.multiple ? true : null\"\r\n [attr.accept]=\"config.attachmentConfig?.accept || null\" (change)=\"onFileSelected($event)\">\r\n </div>\r\n\r\n <!-- Uploaded file list -->\r\n <div class=\"uploaded-list\" *ngIf=\"value?.length\">\r\n <div *ngFor=\"let f of value; let i = index\" class=\"uploaded-item\" [class.uploading]=\"f.isUploading\">\r\n\r\n <!-- Uploading spinner (shown while API call is in progress) -->\r\n <ng-container *ngIf=\"f.isUploading; else fileReady\">\r\n <div class=\"upload-spinner\"></div>\r\n <div class=\"file-info\">\r\n <span class=\"file-name\" [title]=\"f.name\">{{ f.name }}</span>\r\n <span class=\"file-size uploading-label\">Uploading...</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Normal state once upload is done -->\r\n <ng-template #fileReady>\r\n <!-- File type icon -->\r\n <mat-icon class=\"file-type-icon\">{{ getFileIcon(f.type) }}</mat-icon>\r\n\r\n <!-- Image thumbnail (only for images) -->\r\n <img *ngIf=\"f.type?.startsWith('image') && f.dataUrl\" [src]=\"f.dataUrl\" class=\"file-thumb\" alt=\"preview\">\r\n\r\n <!-- Name & size -->\r\n <div class=\"file-info\">\r\n <span class=\"file-name\" [title]=\"f.name\">{{ f.name }}</span>\r\n <span class=\"file-size\">{{ formatFileSize(f.size) }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Remove button — disabled while uploading -->\r\n <lib-button [variant]=\"'danger-outline'\" [disabled]=\"f.isUploading\"\r\n (click)=\"!f.isUploading && removeUploadedFile(i)\">\r\n <mat-icon>close</mat-icon>\r\n </lib-button>\r\n </div>\r\n </div>\r\n\r\n <!-- Validation / file errors -->\r\n <span class=\"field-error\" *ngIf=\"fileUploadError\">{{ fileUploadError }}</span>\r\n <span class=\"field-error\" *ngIf=\"errorMessage && !fileUploadError\">{{ errorMessage }}</span>\r\n <span class=\"field-hint\"\r\n *ngIf=\"config.hint && !errorMessage && !fileUploadError && !config.attachmentConfig?.acceptLabel\">\r\n {{ config.hint }}\r\n </span>\r\n </div>\r\n\r\n <!-- ══ Media Upload (Type 2) ════════════════════════════════════════════ -->\r\n <div *ngIf=\"isMediaUpload\" class=\"field-wrapper media-upload-wrapper\" [formGroup]=\"formGroup\">\r\n\r\n <!-- Hidden file input lives outside *ngIf — triggered via ViewChild -->\r\n <input #mediaDeviceInput type=\"file\" hidden multiple accept=\"image/*\" (change)=\"onMediaFileSelected($event)\">\r\n\r\n <!-- Two-column layout -->\r\n <div class=\"mu-layout\">\r\n\r\n <!-- ── LEFT PANEL ──────────────────────────────────────────────── -->\r\n <div class=\"mu-left\">\r\n\r\n <!-- Header: title + max-items badge -->\r\n <div class=\"mu-header\">\r\n <h3 class=\"mu-title\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </h3>\r\n <span class=\"mu-badge\" *ngIf=\"config.attachmentConfig?.maxFiles\">\r\n {{ controller.labels['LBL_MEDIA_MAX_PREFIX'] || 'Maximum' }}\r\n {{ config.attachmentConfig?.maxFiles }}\r\n {{ controller.labels['LBL_MEDIA_MAX_SUFFIX'] || 'Image & Videos' }}\r\n </span>\r\n </div>\r\n\r\n <!-- Description -->\r\n <p class=\"mu-description\" *ngIf=\"config.attachmentConfig?.description\">\r\n {{ config.attachmentConfig?.description }}\r\n </p>\r\n <p class=\"mu-description\" *ngIf=\"!config.attachmentConfig?.description && controller.labels['LBL_MEDIA_DESC']\">\r\n {{ controller.labels['LBL_MEDIA_DESC'] }}\r\n </p>\r\n\r\n <!-- Feature bullet list -->\r\n <ul class=\"mu-features\"\r\n *ngIf=\"config.attachmentConfig?.features?.length || controller.labels['LBL_MEDIA_FEATURE_1']\">\r\n <ng-container *ngIf=\"config.attachmentConfig?.features?.length\">\r\n <li *ngFor=\"let f of config.attachmentConfig?.features\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ f }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!config.attachmentConfig?.features?.length\">\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_1']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_1'] }}\r\n </li>\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_2']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_2'] }}\r\n </li>\r\n <li *ngIf=\"controller.labels['LBL_MEDIA_FEATURE_3']\" class=\"mu-feature-item\">\r\n <mat-icon class=\"mu-check\">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_3'] }}\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <!-- Backdrop to close dropdown on outside click -->\r\n <div class=\"media-menu-backdrop\" *ngIf=\"showMediaMenu\"\r\n (click)=\"$event.stopPropagation(); showMediaMenu = false\"></div>\r\n\r\n <!-- Add Media button + dropdown -->\r\n <div class=\"media-add-container\" (click)=\"showMediaMenu = !showMediaMenu\">\r\n <lib-button id=\"btn-add-media-{{ config.name }}\" [variant]=\"'warning'\"\r\n [icon]=\"{type: 'material', value: 'add_photo_alternate'}\">\r\n {{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}\r\n <mat-icon class=\"menu-chevron\">add</mat-icon>\r\n </lib-button>\r\n\r\n <div class=\"media-dropdown\" *ngIf=\"showMediaMenu\" role=\"menu\" (click)=\"$event.stopPropagation()\">\r\n <!-- Video -->\r\n <button id=\"btn-media-video-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuVideo(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--video\"><mat-icon>videocam</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_VIDEO'] || 'Video' }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_VIDEO_DESC'] || 'Add YouTube URL'\r\n }}</span>\r\n </span>\r\n </button>\r\n <!-- Device -->\r\n <button id=\"btn-media-device-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuDevice(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--device\"><mat-icon>upload</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_DEVICE'] || 'Upload from device'\r\n }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_DEVICE_DESC'] || 'Select images from your\r\n computer' }}</span>\r\n </span>\r\n </button>\r\n <!-- Library -->\r\n <button id=\"btn-media-library-{{ config.name }}\" type=\"button\" class=\"media-dropdown-item\"\r\n (click)=\"onMediaMenuLibrary(); showMediaMenu = false\" role=\"menuitem\">\r\n <span class=\"media-drop-icon media-drop-icon--library\"><mat-icon>photo_library</mat-icon></span>\r\n <span class=\"media-drop-text\">\r\n <span class=\"media-drop-label\">{{ controller.labels['LBL_MEDIA_LIBRARY'] || 'Upload from library'\r\n }}</span>\r\n <span class=\"media-drop-desc\">{{ controller.labels['LBL_MEDIA_LIBRARY_DESC'] || 'Choose from default\r\n images' }}</span>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- YouTube URL Input (inline below button) -->\r\n <div class=\"youtube-input-panel\" *ngIf=\"showYoutubeInput\">\r\n <label class=\"youtube-panel-label\">\r\n {{ controller.labels['LBL_YOUTUBE_URL'] || 'Video URL' }}\r\n </label>\r\n <div class=\"youtube-input-row\">\r\n <input id=\"input-youtube-url-{{ config.name }}\" type=\"url\" class=\"field-input youtube-url-input\"\r\n [(ngModel)]=\"youtubeUrlInput\" [ngModelOptions]=\"{standalone: true}\"\r\n [placeholder]=\"controller.labels['PH_YOUTUBE_URL'] || 'Video URL'\" (keyup.enter)=\"addYoutubeMedia()\">\r\n <lib-button id=\"btn-add-youtube-{{ config.name }}\" [variant]=\"'secondary'\" (click)=\"addYoutubeMedia()\">\r\n {{ controller.labels['LBL_ADD'] || 'Add' }}\r\n </lib-button>\r\n </div>\r\n <span class=\"field-error\" *ngIf=\"youtubeUrlError\">{{ youtubeUrlError }}</span>\r\n </div>\r\n\r\n <div class=\"media-upload-status\" *ngIf=\"mediaUploadError\">\r\n <mat-icon class=\"status-icon\">error_outline</mat-icon>\r\n <span>{{ mediaUploadError }}</span>\r\n </div>\r\n\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n <span class=\"field-hint\" *ngIf=\"config.hint && !errorMessage\">{{ config.hint }}</span>\r\n </div>\r\n <!-- end left panel -->\r\n\r\n <!-- ── RIGHT PANEL (carousel) ──────────────────────────────────── -->\r\n <div class=\"mu-right\">\r\n\r\n <!-- Carousel (when items exist) -->\r\n <div class=\"media-carousel-section\" *ngIf=\"mediaItems.length\">\r\n <div class=\"media-carousel-main\">\r\n <button id=\"btn-carousel-prev-{{ config.name }}\" type=\"button\" class=\"carousel-nav carousel-nav--prev\"\r\n (click)=\"mediaCarouselPrev()\" [disabled]=\"mediaCarouselIndex === 0\" aria-label=\"Previous\">\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"carousel-viewer\" *ngFor=\"let item of mediaItems; let i = index\"\r\n [hidden]=\"i !== mediaCarouselIndex\">\r\n <div *ngIf=\"item.isUploading\" class=\"carousel-uploading\">\r\n <div class=\"carousel-spinner\"></div>\r\n <span>{{ controller.labels['LBL_UPLOADING'] || 'Uploading…' }}</span>\r\n </div>\r\n <ng-container *ngIf=\"!item.isUploading && item.mediaType === 'youtube'\">\r\n <iframe class=\"carousel-iframe\" [src]=\"item.url | trustedUrl\" frameborder=\"0\" allowfullscreen\r\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\">\r\n </iframe>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.isUploading && item.mediaType === 'image'\">\r\n <img class=\"carousel-image\" [src]=\"item.url\" alt=\"Media\">\r\n </ng-container>\r\n <button id=\"btn-remove-media-{{ config.name }}-{{ i }}\" type=\"button\" class=\"carousel-remove-btn\"\r\n [disabled]=\"item.isUploading\" (click)=\"removeMediaItem(i)\" aria-label=\"Remove\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button id=\"btn-carousel-next-{{ config.name }}\" type=\"button\" class=\"carousel-nav carousel-nav--next\"\r\n (click)=\"mediaCarouselNext()\" [disabled]=\"mediaCarouselIndex === mediaItems.length - 1\" aria-label=\"Next\">\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n\r\n <div class=\"carousel-dots\">\r\n <span *ngFor=\"let item of mediaItems; let i = index\" class=\"carousel-dot\"\r\n [class.active]=\"i === mediaCarouselIndex\" (click)=\"mediaGoTo(i)\"></span>\r\n </div>\r\n </div>\r\n\r\n <!-- Thumbnail strip -->\r\n <div class=\"media-thumbnail-strip\">\r\n <div *ngFor=\"let item of mediaThumbnails; let i = index\" class=\"media-thumb\"\r\n [class.active]=\"i === mediaCarouselIndex\" (click)=\"mediaGoTo(i)\">\r\n <div *ngIf=\"item.isUploading\" class=\"thumb-uploading\">\r\n <div class=\"thumb-spinner\"></div>\r\n </div>\r\n <img *ngIf=\"!item.isUploading && item.mediaType === 'youtube' && item.thumbnailUrl\"\r\n [src]=\"item.thumbnailUrl\" class=\"thumb-img\" alt=\"Video thumbnail\">\r\n <div *ngIf=\"!item.isUploading && item.mediaType === 'youtube' && !item.thumbnailUrl\"\r\n class=\"thumb-yt-placeholder\">\r\n <mat-icon>play_circle</mat-icon>\r\n </div>\r\n <img *ngIf=\"!item.isUploading && item.mediaType === 'image' && item.url\" [src]=\"item.url\"\r\n class=\"thumb-img\" alt=\"Image thumbnail\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty right-side placeholder -->\r\n <div class=\"mu-right-empty\" *ngIf=\"!mediaItems.length\" (click)=\"onMediaMenuDevice()\">\r\n <mat-icon class=\"mu-right-empty-icon\">perm_media</mat-icon>\r\n <p>{{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}</p>\r\n </div>\r\n\r\n </div>\r\n <!-- end right panel -->\r\n\r\n </div><!-- end mu-layout -->\r\n </div>\r\n\r\n\r\n <!-- ══ Library Image Picker Modal ════════════════════════════════════════ -->\r\n <div class=\"media-library-overlay\" *ngIf=\"showLibraryModal\" (click)=\"closeLibraryModal()\"></div>\r\n <div class=\"media-library-modal\" *ngIf=\"showLibraryModal\" role=\"dialog\" aria-modal=\"true\">\r\n <div class=\"library-modal-header\">\r\n <div class=\"header-left\">\r\n <h3 class=\"library-modal-title\">\r\n {{ controller.labels['LBL_ADD_IMAGES'] || 'Add Images' }}\r\n </h3>\r\n <p class=\"library-modal-subtitle\">\r\n {{ controller.labels['LBL_LIBRARY_MODAL_DESC'] || 'Upload media to make your opportunity stand out. Plus, take full control of your sequence - drag images to reorder as you desire.' }}\r\n </p>\r\n </div>\r\n <button id=\"btn-close-library-{{ config.name }}\" type=\"button\" class=\"library-close-btn\"\r\n (click)=\"closeLibraryModal()\" aria-label=\"Close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Loading -->\r\n <div class=\"library-loading\" *ngIf=\"libraryLoading\">\r\n <div class=\"lib-spinner\"></div>\r\n <span>{{ controller.labels['LBL_LOADING'] || 'Loading…' }}</span>\r\n </div>\r\n\r\n <!-- Error -->\r\n <div class=\"library-error\" *ngIf=\"libraryError && !libraryLoading\">\r\n <mat-icon>error_outline</mat-icon>\r\n {{ libraryError }}\r\n </div>\r\n\r\n <!-- Image grid -->\r\n <div class=\"library-grid\" *ngIf=\"!libraryLoading && libraryImages.length\">\r\n <div *ngFor=\"let img of libraryImages; let li = index\" id=\"lib-img-{{ config.name }}-{{ li }}\"\r\n class=\"library-grid-item\" [class.selected]=\"isLibraryItemSelected(img)\" (click)=\"toggleLibraryItem(img)\">\r\n <img [src]=\"getLibraryItemUrl(img)\" class=\"library-grid-img\" alt=\"Library image\">\r\n <div class=\"library-check\" *ngIf=\"isLibraryItemSelected(img)\">\r\n <mat-icon>check_circle</mat-icon>\r\n </div>\r\n <div class=\"library-overlay-hover\"></div>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty library -->\r\n <div class=\"library-empty\" *ngIf=\"!libraryLoading && !libraryError && libraryImages.length === 0\">\r\n <mat-icon>image_not_supported</mat-icon>\r\n <span>{{ controller.labels['LBL_LIBRARY_EMPTY'] || 'No images found in library.' }}</span>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div class=\"library-modal-footer\">\r\n <div class=\"library-footer-actions\">\r\n <lib-button id=\"btn-library-cancel-{{ config.name }}\" [variant]=\"'outline'\" (click)=\"closeLibraryModal()\">\r\n {{ controller.labels['LBL_CANCEL'] || 'Cancel' }}\r\n </lib-button>\r\n <lib-button id=\"btn-library-confirm-{{ config.name }}\" [variant]=\"'primary'\"\r\n [disabled]=\"librarySelectedIds.size === 0\" (click)=\"confirmLibrarySelection()\">\r\n {{ controller.labels['LBL_CONTINUE'] || 'Continue' }}\r\n </lib-button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- ══ Location Field ═══════════════════════════════════════════════════ -->\r\n <div *ngIf=\"isLocation\" class=\"field-wrapper location-field-wrapper\" [formGroup]=\"formGroup\">\r\n\r\n <!-- Field label -->\r\n <label *ngIf=\"config.label\" class=\"field-label\">\r\n {{ config.label }}\r\n <span class=\"required\" *ngIf=\"config.required\">*</span>\r\n </label>\r\n <p class=\"location-subtitle\" *ngIf=\"config.hint\">{{ config.hint }}</p>\r\n\r\n <!-- Three-tab bar -->\r\n <div class=\"location-tabs\">\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'VENUE' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('VENUE')\">\r\n {{ controller.labels['LBL_LOC_VENUE'] || 'Venue' }}\r\n </lib-button>\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'ONLINE' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('ONLINE')\">\r\n {{ controller.labels['LBL_LOC_ONLINE'] || 'Online Event' }}\r\n </lib-button>\r\n <lib-button class=\"loc-tab-btn\" [variant]=\"locationActiveTab === 'TBA' ? 'warning' : 'outline'\"\r\n (click)=\"onLocationTabChange('TBA')\">\r\n {{ controller.labels['LBL_LOC_TBA'] || 'To be Announced' }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- VENUE TAB -->\r\n <div *ngIf=\"locationActiveTab === 'VENUE'\" class=\"loc-panel loc-venue-panel\">\r\n\r\n <p class=\"loc-section-label\">\r\n {{ controller.labels['LBL_LOC_ADDRESS'] || 'Location address' }}\r\n </p>\r\n\r\n <!-- Added venue rows -->\r\n <div class=\"loc-venue-list\" *ngIf=\"locationVenues.length > 0\">\r\n <div *ngFor=\"let venue of locationVenues; let i = index\" class=\"loc-venue-item\">\r\n <mat-icon class=\"loc-venue-search-icon\">search</mat-icon>\r\n <span class=\"loc-venue-text\">{{ venue.address || venue.name || venue.description }}</span>\r\n <button type=\"button\" class=\"loc-action-btn loc-delete-btn\" (click)=\"removeLocationVenue(i)\">\r\n <mat-icon>delete_outline</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Location count badge -->\r\n <p class=\"loc-count-text\" *ngIf=\"locationVenues.length > 0 && config.locationConfig?.allowMulti\">\r\n {{ locationVenues.length }}&nbsp;{{ controller.labels['LBL_LOC_COUNT_SUFFIX'] || 'Locations Added!' }}\r\n </p>\r\n\r\n <!-- Search input (hide when max reached) -->\r\n <div class=\"loc-search-container\" *ngIf=\"!locationMaxReached\">\r\n <div class=\"loc-search-wrapper\">\r\n <mat-icon class=\"loc-search-icon\">search</mat-icon>\r\n <input class=\"field-input loc-search-input\"\r\n [placeholder]=\"config.locationConfig?.venuePlaceholder || (controller.labels['PH_LOC_VENUE'] || 'Type to search venue...')\"\r\n [value]=\"locationSearchText\" (input)=\"handleLocationSearchInput($event)\" (blur)=\"hideLocationSuggestions()\"\r\n autocomplete=\"off\" [class.is-invalid]=\"errorMessage\">\r\n </div>\r\n <!-- Suggestions dropdown -->\r\n <div class=\"loc-suggestions-panel\" *ngIf=\"locationShowSuggestions && locationSuggestions.length\">\r\n <div *ngFor=\"let sug of locationSuggestions\" class=\"loc-suggestion-item\"\r\n (mousedown)=\"onLocationSuggestionSelect(sug)\">\r\n <mat-icon class=\"loc-suggestion-icon\">place</mat-icon>\r\n <span class=\"loc-suggestion-text\">{{ sug.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Add another button -->\r\n <button type=\"button\" class=\"loc-add-btn\"\r\n *ngIf=\"locationVenues.length > 0 && !locationMaxReached && config.locationConfig?.allowMulti\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n <span>{{ controller.labels['LBL_LOC_ADD_ANOTHER'] || 'Add another Location' }}</span>\r\n </button>\r\n\r\n <!-- Map -->\r\n <div class=\"loc-map-container\" *ngIf=\"config.locationConfig?.showMap !== false\">\r\n <ng-container *ngIf=\"config.locationConfig?.googleMapsApiKey; else simpleEmbed\">\r\n <div [id]=\"'loc-map-' + config.name\" class=\"loc-map-frame\"\r\n [style.height]=\"config.locationConfig?.mapHeight || '300px'\"></div>\r\n </ng-container>\r\n <ng-template #simpleEmbed>\r\n <iframe class=\"loc-map-frame\" [style.height]=\"config.locationConfig?.mapHeight || '300px'\"\r\n [src]=\"getLocationMapEmbedUrl() | trustedUrl\" frameborder=\"0\" allowfullscreen loading=\"lazy\">\r\n </iframe>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- Map hint -->\r\n <p class=\"loc-map-hint\">\r\n {{ controller.labels['LBL_LOC_MAP_HINT'] || 'Type the venue address. A map will appear to assist you.' }}\r\n </p>\r\n </div>\r\n\r\n <!-- ONLINE TAB -->\r\n <div *ngIf=\"locationActiveTab === 'ONLINE'\" class=\"loc-panel loc-online-panel\">\r\n <p class=\"loc-section-label\">\r\n {{ controller.labels['LBL_LOC_ONLINE_URL'] || 'Event URL' }}\r\n </p>\r\n <div class=\"loc-search-wrapper\">\r\n <mat-icon class=\"loc-search-icon\">link</mat-icon>\r\n <input class=\"field-input loc-search-input\" type=\"url\"\r\n [placeholder]=\"config.locationConfig?.onlinePlaceholder || (controller.labels['PH_LOC_ONLINE'] || 'https://zoom.us/j/...')\"\r\n [value]=\"locationOnlineUrl\" (input)=\"onLocationUrlChange($any($event.target).value)\"\r\n [class.is-invalid]=\"errorMessage\">\r\n </div>\r\n </div>\r\n\r\n <!-- TBA TAB -->\r\n <div *ngIf=\"locationActiveTab === 'TBA'\" class=\"loc-panel loc-tba-panel\">\r\n <div class=\"loc-tba-content\">\r\n <mat-icon class=\"loc-tba-icon\">schedule</mat-icon>\r\n <p class=\"loc-tba-text\">\r\n {{ controller.labels['LBL_LOC_TBA_DESC'] || \"This event's location is yet to be announced. Check back later\r\n for updates.\" }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden real form control -->\r\n <input type=\"hidden\" [formControlName]=\"config.name!\">\r\n\r\n <span class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</span>\r\n </div>\r\n\r\n</div>","import { Component, Input, OnInit, OnDestroy } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { SectionConfig, FieldConfig } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\n\r\n@Component({\r\n selector: 'lib-form-section',\r\n templateUrl: './form-section.component.html',\r\n styleUrls: ['./form-section.component.scss'],\r\n standalone: false\r\n})\r\nexport class FormSectionComponent implements OnInit, OnDestroy {\r\n @Input() config!: SectionConfig;\r\n @Input() controller!: SmartFormController;\r\n @Input() formGroup!: FormGroup;\r\n\r\n /**\r\n * For allowMulti sections: the FormArray registered on the root formGroup.\r\n * Each element is a FormGroup representing one repeater instance.\r\n */\r\n repeaterFormArray!: FormArray;\r\n\r\n /**\r\n * The key under which the FormArray is registered in the root formGroup.\r\n * Falls back to config.name or a generated key.\r\n */\r\n get arrayKey(): string {\r\n return this.config.name || '__repeater__';\r\n }\r\n\r\n constructor(private fb: FormBuilder) { }\r\n\r\n ngOnInit(): void {\r\n if (this.config.allowMulti) {\r\n this.repeaterFormArray = this.fb.array([]);\r\n this.formGroup.addControl(this.arrayKey, this.repeaterFormArray);\r\n // Start with one empty instance\r\n this.addInstance();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.config.allowMulti && this.formGroup.contains(this.arrayKey)) {\r\n this.formGroup.removeControl(this.arrayKey);\r\n }\r\n }\r\n\r\n // ── Repeater helpers ──────────────────────────────────────────────────────\r\n\r\n /** Creates a fresh FormGroup for one repeater instance */\r\n private createInstanceGroup(): FormGroup {\r\n return this.fb.group({});\r\n }\r\n\r\n addInstance(): void {\r\n this.repeaterFormArray.push(this.createInstanceGroup());\r\n }\r\n\r\n removeInstance(index: number): void {\r\n if (this.repeaterFormArray.length > 1) {\r\n this.repeaterFormArray.removeAt(index);\r\n }\r\n }\r\n\r\n getInstanceGroup(index: number): FormGroup {\r\n return this.repeaterFormArray.at(index) as FormGroup;\r\n }\r\n\r\n get instanceGroups(): FormGroup[] {\r\n return this.repeaterFormArray.controls as FormGroup[];\r\n }\r\n\r\n // ── Non-repeater: flat single FormGroup (root formGroup passed through) ──\r\n\r\n /** For non-allowMulti sections we simply pass the root formGroup down */\r\n get flatFormGroup(): FormGroup {\r\n return this.formGroup;\r\n }\r\n\r\n // ── Collect nested fields for a given child ───────────────────────────────\r\n /** Flatten a field tree to get all leaf fields (for ROW children etc.) */\r\n getFlatFields(fields: FieldConfig[]): FieldConfig[] {\r\n const result: FieldConfig[] = [];\r\n fields.forEach(f => {\r\n if (f.type === 'ROW' && f.children) {\r\n result.push(...this.getFlatFields(f.children));\r\n } else {\r\n result.push(f);\r\n }\r\n });\r\n return result;\r\n }\r\n}\r\n","<div class=\"form-section-container\">\r\n <h3 class=\"section-label\" *ngIf=\"config.label && !config.allowMulti\">{{ config.label }}</h3>\r\n\r\n <!-- ══ Repeater (allowMulti) ══════════════════════════════════════════════ -->\r\n <ng-container *ngIf=\"config.allowMulti\">\r\n <h3 class=\"section-label\">{{ config.label }}</h3>\r\n\r\n <div *ngFor=\"let instanceGroup of instanceGroups; let i = index\" class=\"section-instance\">\r\n <!-- Instance header (remove button) -->\r\n <div class=\"section-header\" *ngIf=\"instanceGroups.length > 1\">\r\n <span class=\"section-number\">{{ config.label }} #{{ i + 1 }}</span>\r\n <lib-button [variant]=\"'danger-outline'\" (click)=\"removeInstance(i)\">\r\n <mat-icon>delete_outline</mat-icon> Remove\r\n </lib-button>\r\n </div>\r\n\r\n <!-- Fields – each child rendered with the *instance* FormGroup -->\r\n <div class=\"section-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\" *ngIf=\"field.isEnabled !== false\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"instanceGroup\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <lib-button [variant]=\"'primary'\" (click)=\"addInstance()\">\r\n <mat-icon>add</mat-icon> Add {{ config.label }}\r\n </lib-button>\r\n </ng-container>\r\n\r\n <!-- ══ Non-repeater (single instance) ════════════════════════════════════ -->\r\n <ng-container *ngIf=\"!config.allowMulti\">\r\n <div class=\"section-fields sf-grid\">\r\n <ng-container *ngFor=\"let field of config.children\">\r\n <div class=\"sf-col\" [style.gridColumn]=\"'span ' + (field.colSpan || 12)\" *ngIf=\"field.isEnabled !== false\">\r\n <lib-form-field [config]=\"field\" [controller]=\"controller\" [formGroup]=\"flatFormGroup\">\r\n </lib-form-field>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n</div>","import { Component, EventEmitter, Input, OnDestroy, OnInit, OnChanges, SimpleChanges, Output } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormGroup } from '@angular/forms';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Router } from '@angular/router';\r\nimport { ActionBarConfig, ActionButtonConfig, ActionConfig, FieldConfig, FormSchema } from '../../models/form-schema.model';\r\nimport { SmartFormController } from '../../services/smart-form-controller.service';\r\nimport { ExpressionService } from '../../services/expression.service';\r\nimport { SmartFormTranslationUtils } from '../../utils/translation.utils';\r\nimport { SnackbarService } from '../../../snackbar/services/snackbar.service';\r\n\r\n@Component({\r\n selector: 'lib-smart-form',\r\n templateUrl: './smart-form.component.html',\r\n styleUrls: ['./smart-form.component.scss'],\r\n providers: [SmartFormController],\r\n standalone: false\r\n})\r\nexport class SmartFormComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() formJson!: string;\r\n @Input() initialValues?: { [key: string]: any };\r\n @Input() enableDraftAutoSave: boolean = false;\r\n /** Flat i18n labels map passed by the consuming app.\r\n * After JSON parse the schema is walked and every string value that\r\n * matches a key in this map is replaced with the translated value.\r\n * Mirrors the pattern used by ConfigurableFormComponent + translateConfig.\r\n */\r\n @Input() labels: any = {};\r\n @Input() mode: 'CREATE' | 'EDIT' = 'CREATE';\r\n\r\n @Output() submit = new EventEmitter<{ [key: string]: any }>();\r\n @Output() draftSave = new EventEmitter<string>();\r\n /**\r\n * Emitted when a button with a custom `type` (not 'cancel', 'draft', or\r\n * 'submit') is clicked. Payload contains the button `id` and the current\r\n * form data snapshot.\r\n */\r\n @Output() actionClick = new EventEmitter<{ id: string; formData: { [key: string]: any } }>();\r\n\r\n formSchema!: FormSchema;\r\n formGroup!: FormGroup;\r\n fieldList: FieldConfig[] = [];\r\n isStepper: boolean = false;\r\n currentStep: number = 0;\r\n isLoading: boolean = false;\r\n isDraftLoading: boolean = false;\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n public controller: SmartFormController,\r\n private expressionService: ExpressionService,\r\n private http: HttpClient,\r\n private snackbarService: SnackbarService,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.parseFormJson();\r\n // Load databe in EDIT mode, or use fallback initialValues\r\n if (this.mode === 'EDIT' && this.formSchema?.editConfig?.loadApiUrl) {\r\n this.loadEditData();\r\n } else if (this.initialValues) {\r\n this.controller.initialize(this.initialValues);\r\n }\r\n }\r\n\r\n loadEditData(): void {\r\n const config = this.formSchema.editConfig!;\r\n this.isLoading = true;\r\n const headers = this.getHeaders();\r\n this.http.get(config.loadApiUrl, { headers }).subscribe({\r\n next: (response: any) => {\r\n // Assume API returns flat or easily mappable object matching form controls\r\n this.initialValues = response;\r\n this.controller.initialize(this.initialValues || {});\r\n this.isLoading = false;\r\n },\r\n error: (err) => {\r\n this.showAlert('error', config.errorMessage || 'Failed to load form data', config.snackbarConfig);\r\n console.error('Load data error:', err);\r\n this.isLoading = false;\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['formJson'] && !changes['formJson'].isFirstChange()) {\r\n this.parseFormJson();\r\n }\r\n // Re-translate if labels arrive after the JSON was already parsed\r\n if (changes['labels'] && !changes['labels'].isFirstChange() && this.formSchema) {\r\n this.parseFormJson();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.controller.destroy();\r\n }\r\n\r\n parseFormJson(): void {\r\n if (!this.formJson) { return; } // guard: labels may arrive before formJson\r\n try {\r\n const jsonData = JSON.parse(this.formJson);\r\n this.formSchema = jsonData as FormSchema;\r\n // Push token from configJSON into the shared controller so all child\r\n // components (form-field, etc.) can read it without @Input prop-drilling.\r\n this.controller.token = this.formSchema.token;\r\n this.controller.tokenHeader = this.formSchema.tokenHeader;\r\n // Translate i18n keys before rendering\r\n if (this.labels && Object.keys(this.labels).length) {\r\n SmartFormTranslationUtils.translateSchema(this.formSchema, this.labels);\r\n }\r\n // Share translated labels with child components via controller\r\n this.controller.labels = this.labels;\r\n this.controller.actionLabels = this.formSchema.labels;\r\n this.isStepper = this.formSchema.formType === 'STEPPER';\r\n this.fieldList = this.isStepper\r\n ? (this.formSchema.stepperConfig?.children || []).filter(step => step.isEnabled !== false && step.sectionConfig?.isEnabled !== false)\r\n : (this.formSchema.sectionConfig?.children || []).filter(field => field.isEnabled !== false);\r\n this.initializeForm();\r\n } catch (e) {\r\n console.error('Error parsing form JSON:', e);\r\n }\r\n }\r\n\r\n\r\n initializeForm(): void {\r\n this.formGroup = this.fb.group({});\r\n this.collectFields(this.fieldList);\r\n }\r\n\r\n collectFields(fields: FieldConfig[]): void {\r\n fields.forEach(field => {\r\n if (field.isEnabled === false || field.sectionConfig?.isEnabled === false) return;\r\n\r\n // Flat leaf fields: seed controller with default values\r\n if (field.name && field.type !== 'GROUP' && field.type !== 'ROW') {\r\n // Check if initialValues already has a value for this field\r\n const existingValue = this.initialValues?.[field.name];\r\n const value = existingValue !== undefined\r\n ? existingValue\r\n : (field.defaultValue !== undefined ? field.defaultValue : null);\r\n this.controller.updateField(field.name, value);\r\n }\r\n // Recurse into ROW children\r\n if (field.type === 'ROW' && field.children?.length) {\r\n this.collectFields(field.children);\r\n }\r\n // Recurse into GROUP children\r\n if (field.type === 'GROUP' && field.sectionConfig?.children?.length) {\r\n this.collectFields(field.sectionConfig.children);\r\n }\r\n });\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Submit\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n handleSubmit(): void {\r\n if (this.isStepper && this.currentStep < this.fieldList.length - 1) {\r\n if (this.validate()) this.nextStep();\r\n return;\r\n }\r\n if (!this.validate()) return;\r\n\r\n this.submitToApi(this.collectFormData(), 'submit');\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Cancel\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n /**\r\n * Universal action handler for any button click.\r\n * One handler decides how to process based on action.kind.\r\n */\r\n handleButtonClick(btn: ActionButtonConfig): void {\r\n const action = btn.action;\r\n if (!action) return;\r\n\r\n switch (action.kind) {\r\n case 'submit':\r\n this.handleSubmit();\r\n break;\r\n case 'draft':\r\n this.submitToApi(this.collectFormData(), 'draft', btn);\r\n break;\r\n case 'navigate':\r\n this.navigateTo(action.redirectUrl);\r\n break;\r\n case 'api':\r\n this.fireActionApiCall(action);\r\n break;\r\n case 'emit':\r\n this.actionClick.emit({ id: btn.id, formData: this.collectFormData() });\r\n break;\r\n case 'next':\r\n if (this.validate()) this.nextStep();\r\n break;\r\n case 'prev':\r\n this.previousStep();\r\n break;\r\n }\r\n }\r\n\r\n // ── Action-Redirects & API ──────────────────────────────────────────────────\r\n\r\n private fireActionApiCall(action: ActionConfig): void {\r\n if (!action.apiUrl) return;\r\n const headers = this.getHeaders();\r\n const method = action.method || 'POST';\r\n const body = action.extraPayload || {};\r\n\r\n this.isLoading = true;\r\n this.http.request(method, action.apiUrl, { body, headers }).subscribe({\r\n next: (response) => {\r\n this.isLoading = false;\r\n const msg = action.successMessage || 'Action successful';\r\n this.showAlert('success', msg, action.snackbarConfig);\r\n if (action.redirectUrl) this.navigateTo(action.redirectUrl);\r\n },\r\n error: (err) => {\r\n this.isLoading = false;\r\n const msg = action.errorMessage || 'Action failed';\r\n this.showAlert('error', msg, action.snackbarConfig);\r\n console.error('API Action error:', err);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Constructs nested payload by checking field properties on form controls.\r\n */\r\n collectFormData(): { [key: string]: any } {\r\n const rawValue = this.extractGroupValue(this.formGroup);\r\n let payload = this.buildNestedPayload(rawValue, this.fieldList);\r\n\r\n // Merge extra fields based on the mode\r\n const config = this.mode === 'EDIT' ? this.formSchema.editConfig : this.formSchema.submitConfig;\r\n if (config?.extraPayload) {\r\n payload = this.deepMerge(payload, config.extraPayload);\r\n }\r\n\r\n return payload;\r\n }\r\n\r\n /**\r\n * Deep merges the source object (e.g. extraPayload) into the target object (e.g. form payload).\r\n */\r\n private deepMerge(target: any, source: any): any {\r\n if (typeof target !== 'object' || target === null) {\r\n return source;\r\n }\r\n if (typeof source !== 'object' || source === null) {\r\n return source;\r\n }\r\n\r\n if (Array.isArray(target) && Array.isArray(source)) {\r\n // For arrays, we merge objects at the same index\r\n const maxLength = Math.max(target.length, source.length);\r\n const mergedArray = [];\r\n for (let i = 0; i < maxLength; i++) {\r\n if (i < target.length && i < source.length) {\r\n mergedArray.push(this.deepMerge(target[i], source[i]));\r\n } else if (i < source.length) {\r\n mergedArray.push(source[i]);\r\n } else {\r\n mergedArray.push(target[i]);\r\n }\r\n }\r\n return mergedArray;\r\n }\r\n\r\n const merged = { ...target };\r\n Object.keys(source).forEach(key => {\r\n if (source[key] instanceof Object && key in target) {\r\n merged[key] = this.deepMerge(target[key], source[key]);\r\n } else {\r\n merged[key] = source[key];\r\n }\r\n });\r\n return merged;\r\n }\r\n\r\n private buildNestedPayload(rawValue: any, fields: FieldConfig[]): { [key: string]: any } {\r\n if (rawValue === null || typeof rawValue !== 'object') return rawValue;\r\n\r\n const payload: { [key: string]: any } = {};\r\n const processedKeys = new Set<string>();\r\n\r\n const processFields = (fieldList: FieldConfig[]) => {\r\n fieldList.forEach(field => {\r\n if (field.isEnabled === false || field.sectionConfig?.isEnabled === false) return;\r\n\r\n if (field.type === 'ROW' && field.children) {\r\n processFields(field.children);\r\n } else if (field.type === 'GROUP' && field.sectionConfig?.children) {\r\n // FormFieldComponent generates unnamed groups using their label inside the root FormGroup.\r\n const generatedKey = field.sectionConfig.label\r\n ? field.sectionConfig.label.replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (w, i) => i === 0 ? w.toLowerCase() : w.toUpperCase()).replace(/\\s+/g, '')\r\n : '';\r\n const groupKey = field.sectionConfig.name || field.name || generatedKey || '__group__';\r\n \r\n processedKeys.add(groupKey);\r\n\r\n const groupRawValue = rawValue[groupKey];\r\n if (groupRawValue !== undefined) {\r\n // Identify if it's purely a visual section vs an explicit structural data block\r\n const isStructural = field.sectionConfig.name || field.name || field.sectionConfig.allowMulti;\r\n\r\n if (!isStructural) {\r\n // Visual section: Flatten its contents directly onto the target payload layer\r\n Object.assign(payload, this.buildNestedPayload(groupRawValue, field.sectionConfig.children));\r\n } else {\r\n // Structural block: process nested mappings / array instances\r\n const nestedData = (field.sectionConfig.allowMulti && Array.isArray(groupRawValue))\r\n ? groupRawValue.map(item => this.buildNestedPayload(item, field.sectionConfig!.children!))\r\n : this.buildNestedPayload(groupRawValue, field.sectionConfig.children);\r\n\r\n if (field.payloadPath) {\r\n this.setNestedValue(payload, field.payloadPath, nestedData);\r\n } else {\r\n payload[groupKey] = nestedData;\r\n }\r\n }\r\n }\r\n } else if (field.name) {\r\n processedKeys.add(field.name);\r\n if (rawValue[field.name] !== undefined) {\r\n const val = rawValue[field.name];\r\n if (field.payloadPath) {\r\n this.setNestedValue(payload, field.payloadPath, val);\r\n } else {\r\n payload[field.name] = val;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n processFields(fields);\r\n\r\n // Preserve any hidden tracking keys (e.g. id, uuid, isEdit) that were present in the initial data\r\n Object.keys(rawValue).forEach(key => {\r\n if (!processedKeys.has(key)) {\r\n payload[key] = rawValue[key];\r\n }\r\n });\r\n\r\n return payload;\r\n }\r\n\r\n private setNestedValue(obj: any, path: string, value: any): void {\r\n // Regex matches the property name and optionally an array index e.g. \"name[0]\" -> regex yields [\"name[0]\", \"name\", \"0\"]\r\n const arrayRegex = /^([a-zA-Z0-9_]+)\\[(\\d+)\\]$/;\r\n\r\n const parts = path.split('.');\r\n let current = obj;\r\n\r\n for (let i = 0; i < parts.length - 1; i++) {\r\n const part = parts[i];\r\n const match = part.match(arrayRegex);\r\n\r\n if (match) {\r\n const prop = match[1];\r\n const index = parseInt(match[2], 10);\r\n if (!current[prop]) current[prop] = [];\r\n if (!current[prop][index]) current[prop][index] = {};\r\n current = current[prop][index];\r\n } else {\r\n if (!current[part]) current[part] = {};\r\n current = current[part];\r\n }\r\n }\r\n\r\n const lastPart = parts[parts.length - 1];\r\n const matchLast = lastPart.match(arrayRegex);\r\n if (matchLast) {\r\n const prop = matchLast[1];\r\n const index = parseInt(matchLast[2], 10);\r\n if (!current[prop]) current[prop] = [];\r\n current[prop][index] = value;\r\n } else {\r\n current[lastPart] = value;\r\n }\r\n }\r\n\r\n private extractGroupValue(group: FormGroup): { [key: string]: any } {\r\n const result: { [key: string]: any } = {};\r\n Object.keys(group.controls).forEach(key => {\r\n const ctrl = group.get(key);\r\n if (ctrl instanceof FormArray) {\r\n // Repeater → array of objects\r\n result[key] = (ctrl.controls as FormGroup[]).map(fg => this.extractGroupValue(fg));\r\n } else if (ctrl instanceof FormGroup) {\r\n // Nested single group → nested object\r\n result[key] = this.extractGroupValue(ctrl);\r\n } else {\r\n result[key] = ctrl?.value ?? null;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n validate(): boolean {\r\n if (this.formGroup.invalid) {\r\n this.formGroup.markAllAsTouched();\r\n this.scrollToFirstInvalidControl();\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n scrollToFirstInvalidControl(): void {\r\n setTimeout(() => {\r\n const firstInvalidControl = document.querySelector('.is-invalid, .ng-invalid.ng-touched');\r\n if (firstInvalidControl) {\r\n firstInvalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });\r\n }\r\n }, 100);\r\n }\r\n\r\n submitToApi(formData: any, actionType: 'submit' | 'draft' = 'submit', btn?: ActionButtonConfig): void {\r\n const isEdit = this.mode === 'EDIT';\r\n const configLine: any = isEdit ? this.formSchema.editConfig : this.formSchema.submitConfig;\r\n const action = btn?.action;\r\n\r\n // Build the final payload, merging draft extraPayload if applicable\r\n let finalPayload = formData;\r\n if (actionType === 'draft' && action?.extraPayload) {\r\n finalPayload = this.deepMerge(finalPayload, action.extraPayload);\r\n }\r\n\r\n // Fallback for emitted outputs if no API URL is defined centrally\r\n if (!configLine || (!configLine.apiUrl && !configLine.submitApiUrl)) {\r\n if (actionType === 'draft') {\r\n this.draftSave.emit(JSON.stringify(finalPayload));\r\n if (action?.redirectUrl) this.navigateTo(action.redirectUrl);\r\n } else {\r\n this.submit.emit(finalPayload);\r\n }\r\n return;\r\n }\r\n\r\n const apiUrl = isEdit ? configLine.submitApiUrl : configLine.apiUrl;\r\n const method = isEdit ? (configLine.submitMethod || 'PATCH') : (configLine.method || 'POST');\r\n const headers = this.getHeaders();\r\n\r\n // Messages and redirect URLs (Prefer button action overrides if present)\r\n const successMsg = actionType === 'draft'\r\n ? (action?.successMessage || 'Draft saved successfully')\r\n : (action?.successMessage || configLine.successMessage || 'Form submitted successfully');\r\n\r\n const errorMsg = actionType === 'draft'\r\n ? (action?.errorMessage || 'Failed to save draft')\r\n : (action?.errorMessage || configLine.errorMessage || 'Failed to submit form');\r\n\r\n const redirectUrl = actionType === 'draft'\r\n ? (action?.redirectUrl || configLine.redirectUrl)\r\n : (action?.redirectUrl || configLine.redirectUrl);\r\n\r\n if (actionType === 'draft') {\r\n this.isDraftLoading = true;\r\n } else {\r\n this.isLoading = true;\r\n }\r\n\r\n this.http.request(method, apiUrl, { body: finalPayload, headers }).subscribe({\r\n next: (response) => {\r\n this.showAlert('success', successMsg, action?.snackbarConfig || configLine.snackbarConfig);\r\n\r\n if (actionType === 'draft') {\r\n this.draftSave.emit(JSON.stringify(response));\r\n this.isDraftLoading = false;\r\n } else {\r\n this.submit.emit(response);\r\n this.isLoading = false;\r\n }\r\n\r\n if (redirectUrl) {\r\n setTimeout(() => this.navigateTo(redirectUrl), 1500);\r\n }\r\n },\r\n error: (err) => {\r\n this.showAlert('error', errorMsg, action?.snackbarConfig || configLine.snackbarConfig);\r\n console.error(actionType === 'draft' ? 'Draft save error:' : 'Submit error:', err);\r\n this.isLoading = false;\r\n this.isDraftLoading = false;\r\n }\r\n });\r\n }\r\n\r\n showAlert(type: 'success' | 'error' | 'warning' | 'info', message: string, customConfig?: any): void {\r\n this.snackbarService.show({\r\n variant: type,\r\n message: message,\r\n showCloseButton: true,\r\n ...customConfig\r\n });\r\n }\r\n\r\n /** Builds HttpHeaders from the token stored in the controller (sourced from configJSON). */\r\n getHeaders(): HttpHeaders {\r\n let headers = new HttpHeaders();\r\n if (this.controller.token) {\r\n const headerName = this.controller.tokenHeader || 'Authorization';\r\n headers = headers.set(headerName, this.controller.token);\r\n }\r\n return headers;\r\n }\r\n\r\n // ───────────────────────────────────────────────────────────────────────────\r\n // Stepper\r\n // ───────────────────────────────────────────────────────────────────────────\r\n\r\n nextStep(): void {\r\n if (this.currentStep < this.fieldList.length - 1) this.currentStep++;\r\n }\r\n\r\n previousStep(): void {\r\n if (this.currentStep > 0) this.currentStep--;\r\n }\r\n\r\n get canGoNext(): boolean { return this.currentStep < this.fieldList.length - 1; }\r\n get canGoPrevious(): boolean { return this.currentStep > 0; }\r\n get currentStepConfig(): FieldConfig | undefined {\r\n return this.isStepper ? this.fieldList[this.currentStep] : undefined;\r\n }\r\n\r\n // ── Action Labels ──────────────────────────────────────────────────────────\r\n\r\n get nextLabel(): string {\r\n const key = this.formSchema?.labels?.nextLabel || 'Next';\r\n return this.labels[key] || key;\r\n }\r\n\r\n get submitLabel(): string {\r\n const btn = this.getButtonByActionKind('submit');\r\n if (btn?.label) return this.labels[btn.label] || btn.label;\r\n const key = this.formSchema?.labels?.submitLabel || 'Submit';\r\n return this.labels[key] || key;\r\n }\r\n\r\n get previousLabel(): string {\r\n const key = this.formSchema?.labels?.previousLabel || 'Previous';\r\n return this.labels[key] || key;\r\n }\r\n\r\n // ── Action Bar helpers ─────────────────────────────────────────────────────\r\n\r\n get actionBarConfig(): ActionBarConfig | undefined {\r\n return this.formSchema?.actionBarConfig;\r\n }\r\n\r\n /**\r\n * Returns buttons for a given alignment, sorted by `order` (stable).\r\n */\r\n getButtonsForAlignment(alignment: 'left' | 'right'): ActionButtonConfig[] {\r\n return (this.actionBarConfig?.buttons || [])\r\n .filter(b => !b.hidden && (b.alignment ?? 'right') === alignment)\r\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\r\n }\r\n\r\n getButtonLabel(btn: ActionButtonConfig): string {\r\n if (btn.action?.kind === 'submit' && this.isStepper && this.canGoNext) {\r\n return this.nextLabel;\r\n }\r\n const key = btn.label || btn.id;\r\n return this.labels[key] || key;\r\n }\r\n\r\n isButtonDisabled(btn: ActionButtonConfig): boolean {\r\n if (btn.disabled) return true;\r\n const kind = btn.action?.kind;\r\n if (kind === 'submit' || kind === 'draft' || kind === 'api') {\r\n return this.isLoading || this.isDraftLoading;\r\n }\r\n return false;\r\n }\r\n\r\n private getButtonByActionKind(kind: string): ActionButtonConfig | undefined {\r\n return (this.actionBarConfig?.buttons || []).find(b => b.action?.kind === kind);\r\n }\r\n\r\n // ── Navigation helper ──────────────────────────────────────────────────────\r\n\r\n private navigateTo(url?: string): void {\r\n if (!url) return;\r\n if (url.startsWith('http://') || url.startsWith('https://')) {\r\n window.location.href = url;\r\n } else {\r\n this.router.navigateByUrl(url);\r\n }\r\n }\r\n\r\n\r\n}","<div class=\"smart-form-container\">\r\n <div class=\"smart-form-wrapper\" *ngIf=\"formSchema\">\r\n\r\n <!-- Form Header -->\r\n <div class=\"form-header\" *ngIf=\"formSchema.showTitle !== false\">\r\n <h2 class=\"form-title\">{{ formSchema.label }}</h2>\r\n <p class=\"form-description\" *ngIf=\"formSchema.description\">{{ formSchema.description }}</p>\r\n </div>\r\n\r\n <!-- Stepper Navigation -->\r\n <div class=\"stepper-nav\" *ngIf=\"isStepper && formSchema.stepperConfig?.showStep !== false\">\r\n <div class=\"stepper-steps\" [class.horizontal]=\"formSchema.stepperConfig?.isHorizontal !== false\">\r\n <div *ngFor=\"let step of fieldList; let i = index\" class=\"stepper-step\" [class.active]=\"i === currentStep\"\r\n [class.completed]=\"i < currentStep\">\r\n <div class=\"step-number\">{{ i + 1 }}</div>\r\n <div class=\"step-label\">{{ step.sectionConfig?.label || 'Step ' + (i + 1) }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <form [formGroup]=\"formGroup\" class=\"smart-form\">\r\n <!-- Section Form -->\r\n <div *ngIf=\"!isStepper && formSchema.sectionConfig && formSchema.sectionConfig.isEnabled !== false\" class=\"form-section\">\r\n <lib-form-section [config]=\"formSchema.sectionConfig\" [controller]=\"controller\" [formGroup]=\"formGroup\">\r\n </lib-form-section>\r\n </div>\r\n\r\n <!-- Stepper Form -->\r\n <div *ngIf=\"isStepper && currentStepConfig && currentStepConfig.sectionConfig?.isEnabled !== false\" class=\"form-stepper\">\r\n <lib-form-section [config]=\"currentStepConfig.sectionConfig!\" [controller]=\"controller\" [formGroup]=\"formGroup\">\r\n </lib-form-section>\r\n </div>\r\n </form>\r\n\r\n <!-- ── Form Actions ──────────────────────────────────────────────────── -->\r\n <div class=\"form-actions\" *ngIf=\"formSchema.showActions !== false\">\r\n\r\n <!-- LEFT GROUP -->\r\n <div class=\"action-group action-group--left\">\r\n <!-- Optional: Navigational buttons like 'Previous' for stepper can be explicitly added to config, \r\n but we'll keep the logic if they are provided in the buttons array via action.kind === 'prev' -->\r\n <lib-button\r\n *ngFor=\"let btn of getButtonsForAlignment('left')\"\r\n [variant]=\"$any(btn.variant) || 'outline'\"\r\n [disabled]=\"isButtonDisabled(btn)\"\r\n (click)=\"handleButtonClick(btn)\">\r\n {{ getButtonLabel(btn) }}\r\n </lib-button>\r\n </div>\r\n\r\n <!-- RIGHT GROUP -->\r\n <div class=\"action-group action-group--right\">\r\n <lib-button\r\n *ngFor=\"let btn of getButtonsForAlignment('right')\"\r\n [variant]=\"$any(btn.variant) || 'primary'\"\r\n [disabled]=\"isButtonDisabled(btn)\"\r\n (click)=\"handleButtonClick(btn)\">\r\n {{ getButtonLabel(btn) }}\r\n </lib-button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material/material.module';\r\nimport { SmartFormComponent } from './components/smart-form/smart-form.component';\r\nimport { FormSectionComponent } from './components/form-section/form-section.component';\r\nimport { FormFieldComponent } from './components/form-field/form-field.component';\r\nimport { ExpressionService } from './services/expression.service';\r\nimport { ButtonModule } from '../button/button.module';\r\nimport { AlertModule } from '../alert/alert.module';\r\nimport { QuillModule } from 'ngx-quill';\r\nimport { TrustedUrlPipe } from './utils/trusted-url.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n SmartFormComponent,\r\n FormSectionComponent,\r\n FormFieldComponent,\r\n TrustedUrlPipe\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MaterialModule,\r\n ButtonModule,\r\n AlertModule,\r\n QuillModule.forRoot()\r\n ],\r\n exports: [\r\n SmartFormComponent\r\n ],\r\n providers: [\r\n ExpressionService\r\n ]\r\n})\r\nexport class SmartFormModule { }\r\n","export const DEFAULT_ITEMS_PER_PAGE = 10;\r\nexport const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 50];\r\nexport const PAGINATION_THEME_DEFAULT = 'theme-1';\r\nexport const PAGINATION_THEME_DARK = 'theme-2';\r\n\r\n// Nav\r\nexport const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills' = 'filled';\r\nexport const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical' = 'horizontal';\r\n\r\n// Side Nav\r\nexport const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = 'right';\r\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, HostBinding } from '@angular/core';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\nimport { SideNavSection, SideNavItem, SideNavStyleConfig } from '../../side-nav.models';\r\nimport { DEFAULT_SIDE_NAV_TOOLTIP_POSITION } from '../../../../utils/constants';\r\n\r\n@Component({\r\n selector: 'lib-side-nav',\r\n templateUrl: './side-nav.component.html',\r\n styleUrls: ['./side-nav.component.scss'],\r\n standalone: false\r\n})\r\nexport class SideNavComponent implements OnChanges {\r\n @Input() sections: SideNavSection[] = [];\r\n @Input() userRoles?: string[]; // If provided, filters items automatically based on roles\r\n @Input() activeId?: string;\r\n @Input() styleConfig?: SideNavStyleConfig;\r\n\r\n /** Control whether the nav is collapsed externally (two-way bindable) */\r\n @Input() collapsed: boolean = false;\r\n /** Width of the nav when expanded. Overrides the CSS variable default. */\r\n @Input() width?: string;\r\n /** Width of the nav when collapsed (icons only). Overrides the CSS variable default. */\r\n @Input() collapsedWidth?: string;\r\n /** Whether to show the collapse toggle button */\r\n @Input() showCollapseToggle: boolean = true;\r\n /** Whether to hide icons when the side nav is expanded */\r\n @Input() hideIconsWhenExpanded: boolean = false;\r\n /** Whether to show tooltips on nav items */\r\n @Input() showTooltips: boolean = true;\r\n /** Position of the tooltip */\r\n @Input() tooltipPosition: TooltipPosition = DEFAULT_SIDE_NAV_TOOLTIP_POSITION as TooltipPosition;\r\n\r\n /** Optional dictionary for label translation */\r\n @Input() labels?: { [key: string]: string };\r\n\r\n @Output() itemClicked = new EventEmitter<SideNavItem>();\r\n /** Emits whenever the collapsed state changes (supports two-way binding via [(collapsed)]) */\r\n @Output() collapsedChange = new EventEmitter<boolean>();\r\n\r\n /** Applies collapsed class to :host for the width CSS transition */\r\n @HostBinding('class.cc-side-nav-host-collapsed') get isHostCollapsed() {\r\n return this.collapsed;\r\n }\r\n\r\n filteredSections: SideNavSection[] = [];\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['sections'] || changes['userRoles'] || changes['labels']) {\r\n this.filterAndMapSections();\r\n }\r\n }\r\n\r\n private filterAndMapSections() {\r\n if (!this.sections) {\r\n this.filteredSections = [];\r\n return;\r\n }\r\n\r\n const clonedSections: SideNavSection[] = structuredClone(this.sections);\r\n\r\n this.filteredSections = clonedSections.map(section => {\r\n // Map section heading if labels are provided\r\n if (this.labels && section.heading) {\r\n section.heading = this.labels[section.heading] || section.heading;\r\n }\r\n\r\n // Filter and map items\r\n section.items = section.items.filter(item => {\r\n if (this.userRoles && this.userRoles.length > 0 && item.roles && item.roles.length > 0) {\r\n const hasRole = item.roles.some(role => this.userRoles?.includes(role));\r\n if (!hasRole) return false;\r\n }\r\n return true;\r\n }).map((item: any) => {\r\n // Map item labels and tooltips\r\n if (this.labels) {\r\n const mappedLabel = this.labels[item.labelKey || item.label] || item.labelKey || item.label;\r\n return {\r\n ...item,\r\n label: mappedLabel,\r\n tooltip: this.labels[item.tooltip || item.labelKey] || mappedLabel\r\n };\r\n }\r\n return item;\r\n });\r\n\r\n return section;\r\n }).filter(section => section.items.length > 0);\r\n }\r\n\r\n onItemClick(item: SideNavItem, event: Event) {\r\n if (item.disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n this.activeId = item.id;\r\n this.itemClicked.emit(item);\r\n }\r\n\r\n toggleCollapse() {\r\n this.collapsed = !this.collapsed;\r\n this.collapsedChange.emit(this.collapsed);\r\n }\r\n\r\n get customStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n\r\n // Size overrides from direct inputs (take priority over styleConfig)\r\n if (this.width) styles['--cc-side-nav-width'] = this.width;\r\n if (this.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.collapsedWidth;\r\n\r\n if (!this.styleConfig) return styles;\r\n\r\n if (this.styleConfig.bg) styles['--cc-side-nav-bg'] = this.styleConfig.bg;\r\n if (this.styleConfig.width) styles['--cc-side-nav-width'] = this.styleConfig.width;\r\n if (this.styleConfig.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.styleConfig.collapsedWidth;\r\n if (this.styleConfig.fontFamily) styles['--cc-side-nav-font-family'] = this.styleConfig.fontFamily;\r\n if (this.styleConfig.headingColor) styles['--cc-side-nav-heading-color'] = this.styleConfig.headingColor;\r\n if (this.styleConfig.itemColor) styles['--cc-side-nav-item-color'] = this.styleConfig.itemColor;\r\n if (this.styleConfig.itemHoverBg) styles['--cc-side-nav-item-hover-bg'] = this.styleConfig.itemHoverBg;\r\n if (this.styleConfig.activeBg) styles['--cc-side-nav-active-bg'] = this.styleConfig.activeBg;\r\n if (this.styleConfig.activeColor) styles['--cc-side-nav-active-color'] = this.styleConfig.activeColor;\r\n if (this.styleConfig.activeHoverBg) styles['--cc-side-nav-active-hover-bg'] = this.styleConfig.activeHoverBg;\r\n\r\n return styles;\r\n }\r\n}","<nav class=\"cc-side-nav\" [class.collapsed]=\"collapsed\" role=\"navigation\" [ngStyle]=\"customStyles\">\r\n\r\n <!-- Fallback standalone toggle if no sections exist -->\r\n <div class=\"cc-side-nav-toggle-wrap standalone\" *ngIf=\"filteredSections.length === 0 && showCollapseToggle\">\r\n <button class=\"cc-side-nav-toggle\" (click)=\"toggleCollapse()\" type=\"button\"\r\n [attr.aria-label]=\"collapsed ? 'Expand navigation' : 'Collapse navigation'\">\r\n <span class=\"material-icons cc-side-nav-toggle-icon\">\r\n {{ collapsed ? 'menu_open' : 'menu' }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"cc-side-nav-section\" *ngFor=\"let section of filteredSections; let i = index\">\r\n\r\n <div class=\"cc-side-nav-heading-row\" *ngIf=\"section.heading || (i === 0 && showCollapseToggle)\">\r\n <h3 class=\"cc-side-nav-heading\" *ngIf=\"section.heading && !collapsed\">\r\n {{ section.heading }}\r\n </h3>\r\n\r\n <div class=\"cc-side-nav-toggle-wrap\" *ngIf=\"i === 0 && showCollapseToggle\"\r\n [class.no-heading]=\"!section.heading || collapsed\">\r\n <button class=\"cc-side-nav-toggle\" (click)=\"toggleCollapse()\" type=\"button\"\r\n [attr.aria-label]=\"collapsed ? 'Expand navigation' : 'Collapse navigation'\">\r\n <span class=\"material-icons cc-side-nav-toggle-icon\">\r\n {{ collapsed ? 'menu_open' : 'menu' }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <ul class=\"cc-side-nav-list\">\r\n <li *ngFor=\"let item of section.items\" class=\"cc-side-nav-list-item\">\r\n <a (click)=\"onItemClick(item, $event)\" class=\"cc-side-nav-link\" [class.active]=\"item.id === activeId\"\r\n [class.disabled]=\"item.disabled\" [matTooltip]=\"item.tooltip || item.label\"\r\n [matTooltipDisabled]=\"!showTooltips\" [matTooltipPosition]=\"tooltipPosition\"\r\n [matTooltipClass]=\"'cc-side-nav-tooltip'\" [attr.aria-current]=\"(item.id === activeId) ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled ? true : null\">\r\n <span *ngIf=\"item.icon && (collapsed || !hideIconsWhenExpanded)\" class=\"cc-side-nav-icon\">\r\n\r\n <span *ngIf=\"!item.icon.includes('fa') && !item.icon.includes('bi')\" class=\"material-icons\">\r\n {{ item.icon }}\r\n </span>\r\n\r\n <i *ngIf=\"item.icon.includes('fa') || item.icon.includes('bi')\" [class]=\"item.icon\"></i>\r\n\r\n </span>\r\n <span class=\"cc-side-nav-label\" *ngIf=\"!collapsed\">{{ item.label }}</span>\r\n <span class=\"cc-side-nav-arrow material-icons\"\r\n *ngIf=\"!collapsed && (item.id === activeId) && item.showArrow !== false\">chevron_right</span>\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n </div>\r\n\r\n</nav>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { MaterialModule } from '../material/material.module';\r\nimport { SideNavComponent } from './components/side-nav/side-nav.component';\r\n\r\n@NgModule({\r\n declarations: [SideNavComponent],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n MaterialModule\r\n ],\r\n exports: [SideNavComponent]\r\n})\r\nexport class SideNavModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MaterialModule } from './modules/material/material.module';\r\nimport { AlertModule } from './modules/alert/alert.module';\r\nimport { ButtonModule } from './modules/button/button.module';\r\nimport { ButtonDropdownModule } from './modules/button-dropdown/button-dropdown.module';\r\nimport { ConfirmationModalModule } from './modules/confirmation-modal/confirmation-modal.module';\r\nimport { FilterSidebarModule } from './modules/filter-sidebar/filter-sidebar.module';\r\nimport { SummaryCardModule } from './modules/summary-card/summary-card.module';\r\nimport { ConfigurableFormModule } from './modules/configurable-form/configurable-form.module';\r\nimport { FormComponentsModule } from './modules/form-components/form-components.module';\r\nimport { SmartFormModule } from './modules/smart-form/smart-form.module';\r\nimport { FilterModule } from '../public-api';\r\nimport { SideNavModule } from './modules/side-nav/side-nav.module';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,\r\n SummaryCardModule,\r\n ConfigurableFormModule,\r\n FormComponentsModule,\r\n SmartFormModule,\r\n SideNavModule\r\n ],\r\n exports: [\r\n MaterialModule,\r\n AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,\r\n SummaryCardModule,\r\n ConfigurableFormModule,\r\n FormComponentsModule,\r\n SmartFormModule,\r\n SideNavModule\r\n ],\r\n})\r\nexport class SharedUiModule { }\r\n","/**\n * Utility functions for LocalStorage operations\n */\nexport const getLocalStorageItem = (key: string): string | null => {\n return localStorage.getItem(key);\n};\n\nexport const setLocalStorageItem = (key: string, value: string): void => {\n localStorage.setItem(key, value);\n};\n\nexport const removeLocalStorageItem = (key: string): void => {\n localStorage.removeItem(key);\n};\n\nexport const clearLocalStorage = (): void => {\n localStorage.clear();\n};\n\n/**\n * Utility functions for SessionStorage operations\n */\nexport const getSessionStorageItem = (key: string): string | null => {\n return sessionStorage.getItem(key);\n};\n\nexport const setSessionStorageItem = (key: string, value: string): void => {\n sessionStorage.setItem(key, value);\n};\n\nexport const removeSessionStorageItem = (key: string): void => {\n sessionStorage.removeItem(key);\n};\n\nexport const clearSessionStorage = (): void => {\n sessionStorage.clear();\n};\n","import { FormConfig } from './configurable-form.model';\r\n\r\n/**\r\n * Example: Basic Form Configuration\r\n * This is a generic example for testing and demonstration purposes.\r\n */\r\nexport const EXAMPLE_FORM_CONFIG: FormConfig = {\r\n sections: [\r\n {\r\n sectionTitle: 'User Information',\r\n fields: [\r\n {\r\n name: 'fullName',\r\n label: 'Full Name',\r\n type: 'text',\r\n placeholder: 'Enter full name',\r\n required: true,\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'email',\r\n label: 'Email Address',\r\n type: 'email',\r\n placeholder: 'Enter email address',\r\n required: true,\r\n class: 'col-6'\r\n },\r\n {\r\n name: 'phone',\r\n label: 'Phone Number',\r\n type: 'tel',\r\n placeholder: '+91 9999999999',\r\n class: 'col-6'\r\n },\r\n {\r\n name: 'role',\r\n label: 'Role',\r\n type: 'dropdown',\r\n placeholder: 'Select Role',\r\n options: [\r\n { label: 'Admin', value: 'admin' },\r\n { label: 'User', value: 'user' },\r\n { label: 'Guest', value: 'guest' }\r\n ],\r\n class: 'col-12'\r\n }\r\n ]\r\n },\r\n {\r\n sectionTitle: 'Preferences',\r\n fields: [\r\n {\r\n name: 'notifications',\r\n label: 'Receive Notifications',\r\n type: 'radio',\r\n options: [\r\n { label: 'Yes', value: 'yes' },\r\n { label: 'No', value: 'no' }\r\n ],\r\n value: 'yes',\r\n class: 'col-12'\r\n }\r\n ]\r\n },\r\n {\r\n sectionTitle: 'Documents',\r\n fields: [\r\n {\r\n name: 'profilePicture',\r\n label: 'Profile Picture',\r\n type: 'file',\r\n accept: '.jpg,.png',\r\n multiple: false,\r\n helpText: 'Upload a single profile picture (Max 5MB)',\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'certificates',\r\n label: 'Certificates',\r\n type: 'file',\r\n accept: '.pdf,.doc,.docx',\r\n multiple: true,\r\n helpText: 'Upload multiple certificates (Max 5MB each)',\r\n class: 'col-12'\r\n }\r\n ]\r\n }\r\n ],\r\n entityType: 'User'\r\n};\r\n\r\n/**\r\n * Example: Target Group Configuration\r\n * Demonstrates composite fields for Age Group and Gender Split\r\n */\r\nexport const TARGET_GROUP_CONFIG: FormConfig = {\r\n sections: [\r\n {\r\n sectionTitle: 'Target Group Settings',\r\n fields: [\r\n {\r\n name: 'targetAgeGroup',\r\n label: 'Target Age Group',\r\n type: 'composite',\r\n separator: '-',\r\n subFields: [\r\n {\r\n label: \"Min Age\",\r\n name: 'minAge',\r\n type: 'number',\r\n placeholder: 'Min Age',\r\n validationRules: { min: 0 }\r\n },\r\n {\r\n label: \"Max Age\",\r\n name: 'maxAge',\r\n type: 'number',\r\n placeholder: 'Max Age',\r\n validationRules: { min: 0 }\r\n }\r\n ],\r\n compositeValidationRule: 'minMax',\r\n class: 'col-12'\r\n },\r\n {\r\n name: 'genderSplit',\r\n label: 'Target Gender Split',\r\n type: 'composite',\r\n subFields: [\r\n {\r\n label: \"Male\",\r\n name: 'malePercentage',\r\n type: 'number',\r\n placeholder: 'Male',\r\n suffixText: '%',\r\n validationRules: { min: 0, max: 100 }\r\n },\r\n {\r\n label: \"Female\",\r\n name: 'femalePercentage',\r\n type: 'number',\r\n placeholder: 'Female',\r\n suffixText: '%',\r\n validationRules: { min: 0, max: 100 }\r\n }\r\n ],\r\n compositeValidationRule: 'percentageTotal',\r\n class: 'col-12'\r\n }\r\n ]\r\n }\r\n ],\r\n\r\n};\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, PAGINATION_THEME_DEFAULT } from '../../../../utils/constants';\n\nexport interface PaginationLabels {\n items: string;\n of: string;\n perPage: string;\n}\n\n@Component({\n selector: 'lib-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: ['./pagination.component.scss'],\n standalone: false\n})\nexport class PaginationComponent implements OnInit, OnChanges {\n @Input() totalItems: number = 0;\n @Input() itemsPerPage: number = DEFAULT_ITEMS_PER_PAGE;\n @Input() currentPage: number = 1;\n @Input() pageSizeOptions: number[] = DEFAULT_PAGE_SIZE_OPTIONS;\n @Input() theme: 'theme-1' | 'theme-2' = PAGINATION_THEME_DEFAULT;\n @Input() labels: PaginationLabels = {\n items: 'items',\n of: 'of',\n perPage: 'Per Page'\n };\n\n @Output() pageChange = new EventEmitter<number>();\n @Output() itemsPerPageChange = new EventEmitter<number>();\n\n totalPages: number = 0;\n pages: (number | string)[] = [];\n startItem: number = 0;\n endItem: number = 0;\n\n constructor() { }\n\n ngOnInit(): void {\n this.calculatePagination();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['totalItems'] || changes['itemsPerPage'] || changes['currentPage']) {\n this.calculatePagination();\n }\n }\n\n calculatePagination(): void {\n this.totalPages = Math.ceil(this.totalItems / this.itemsPerPage);\n\n // Ensure current page is valid\n if (this.currentPage < 1) {\n this.currentPage = 1;\n } else if (this.currentPage > this.totalPages && this.totalPages > 0) {\n this.currentPage = this.totalPages;\n }\n\n this.startItem = (this.currentPage - 1) * this.itemsPerPage + 1;\n this.endItem = Math.min(this.currentPage * this.itemsPerPage, this.totalItems);\n\n if (this.totalItems === 0) {\n this.startItem = 0;\n this.endItem = 0;\n }\n\n this.pages = this.getVisiblePages(this.currentPage, this.totalPages);\n }\n\n getVisiblePages(current: number, total: number): (number | string)[] {\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n\n if (current <= 4) {\n return [1, 2, 3, 4, 5, '...', total];\n }\n\n if (current >= total - 3) {\n return [1, '...', total - 4, total - 3, total - 2, total - 1, total];\n }\n\n return [1, '...', current - 1, current, current + 1, '...', total];\n }\n\n onPageChange(page: number | string): void {\n if (typeof page === 'string') return;\n if (page < 1 || page > this.totalPages || page === this.currentPage) return;\n \n this.pageChange.emit(page);\n }\n\n onItemsPerPageChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n const newSize = Number(target.value);\n this.itemsPerPageChange.emit(newSize);\n }\n\n nextPage(): void {\n if (this.currentPage < this.totalPages) {\n this.onPageChange(this.currentPage + 1);\n }\n }\n\n prevPage(): void {\n if (this.currentPage > 1) {\n this.onPageChange(this.currentPage - 1);\n }\n }\n}\n","<div class=\"cc-pagination\" [ngClass]=\"theme\">\n <!-- Left Side: Items Info & Per Page -->\n <div class=\"pagination-left\" *ngIf=\"pageSizeOptions.length > 1 || totalItems > 0\">\n <span class=\"items-info\">\n {{ startItem }}-{{ endItem }} {{ labels.of }} {{ totalItems }} {{ labels.items }}\n </span>\n\n <div class=\"per-page-selector\" *ngIf=\"pageSizeOptions.length > 1\">\n <div class=\"select-wrapper\">\n <select [value]=\"itemsPerPage\" (change)=\"onItemsPerPageChange($event)\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n <span class=\"select-arrow\"></span>\n </div>\n <span class=\"per-page-label\">{{ labels.perPage }}</span>\n </div>\n </div>\n\n <!-- Right Side: Page Controls -->\n <div class=\"pagination-right\">\n <button \n class=\"page-btn prev-btn\" \n [disabled]=\"currentPage === 1\" \n (click)=\"prevPage()\"\n aria-label=\"Previous Page\">\n <span class=\"icon\">&lsaquo;</span>\n </button>\n\n <div class=\"page-numbers\">\n <ng-container *ngFor=\"let page of pages\">\n <button \n *ngIf=\"page !== '...'\"\n class=\"page-btn number-btn\" \n [class.active]=\"page === currentPage\"\n (click)=\"onPageChange(page)\">\n {{ page }}\n </button>\n <span *ngIf=\"page === '...'\" class=\"ellipsis\">...</span>\n </ng-container>\n </div>\n\n <button \n class=\"page-btn next-btn\" \n [disabled]=\"currentPage === totalPages || totalPages === 0\" \n (click)=\"nextPage()\"\n aria-label=\"Next Page\">\n <span class=\"icon\">&rsaquo;</span>\n </button>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PaginationComponent } from './components/pagination/pagination.component';\n\n\n@NgModule({\n declarations: [\n PaginationComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n PaginationComponent\n ]\n})\nexport class PaginationModule { }\n","import { Component, EventEmitter, Input, Output, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { NAV_VARIANT_DEFAULT, NAV_ORIENTATION_DEFAULT } from '../../../../utils/constants';\r\nimport { NavStyleConfig } from '../../nav.models';\r\n\r\nexport interface NavItem {\r\n id: string | number;\r\n label: string;\r\n icon?: string;\r\n badge?: string | number;\r\n disabled?: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-nav',\r\n templateUrl: './nav.component.html',\r\n styleUrls: ['./nav.component.scss'],\r\n standalone: false\r\n})\r\nexport class NavComponent implements OnChanges {\r\n @Input() items: NavItem[] = [];\r\n @Input() activeId: string | number | null = null;\r\n @Input() variant: 'filled' | 'underline' | 'pills' = NAV_VARIANT_DEFAULT;\r\n @Input() orientation: 'horizontal' | 'vertical' = NAV_ORIENTATION_DEFAULT;\r\n @Input() styleConfig: NavStyleConfig = {};\r\n\r\n @Output() selectionChange = new EventEmitter<NavItem>();\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['styleConfig']) {\r\n console.log(' [NavComponent] styleConfig changed:', this.styleConfig);\r\n console.log(' [NavComponent] computedStyles:', this.computedStyles);\r\n }\r\n }\r\n\r\n get computedStyles(): { [key: string]: string | undefined } {\r\n const c = this.styleConfig;\r\n return {\r\n // Container (direct CSS)\r\n 'width': c.width,\r\n 'box-shadow': c.boxShadow,\r\n\r\n // Container (CSS Variables)\r\n '--cc-nav-container-bg': c.backgroundColor,\r\n '--cc-nav-container-radius': c.borderRadius,\r\n '--cc-nav-container-border': c.border,\r\n '--cc-nav-container-padding': c.padding,\r\n '--cc-nav-container-gap': c.gap,\r\n\r\n // Item (CSS Variables)\r\n '--cc-nav-font-size': c.fontSize,\r\n '--cc-nav-font-weight': c.fontWeight,\r\n '--cc-nav-item-color': c.itemColor,\r\n '--cc-nav-item-radius': c.itemRadius,\r\n '--cc-nav-item-padding': c.itemPadding,\r\n\r\n // Active Item (CSS Variables)\r\n '--cc-nav-item-active-bg': c.activeItemBg,\r\n '--cc-nav-item-active-color': c.activeItemColor,\r\n '--cc-nav-item-active-font-weight': c.activeItemFontWeight,\r\n '--cc-nav-item-active-border-color': c.activeItemBorderColor,\r\n\r\n // Hover Item (CSS Variables)\r\n '--cc-nav-item-hover-bg': c.hoverItemBg,\r\n '--cc-nav-item-hover-color': c.hoverItemColor,\r\n\r\n // Badge (CSS Variables)\r\n '--cc-nav-badge-bg': c.badgeBg,\r\n '--cc-nav-badge-color': c.badgeColor,\r\n };\r\n }\r\n\r\n onItemClick(item: NavItem): void {\r\n if (item.disabled) return;\r\n if (item.id === this.activeId) return;\r\n\r\n this.selectionChange.emit(item);\r\n }\r\n\r\n trackById(index: number, item: NavItem): string | number {\r\n return item.id;\r\n }\r\n}\r\n","<nav\r\n class=\"cc-nav\"\r\n [ngClass]=\"[variant, orientation]\"\r\n [ngStyle]=\"computedStyles\"\r\n role=\"tablist\"\r\n [attr.aria-orientation]=\"orientation\">\r\n\r\n <button\r\n *ngFor=\"let item of items; trackBy: trackById\"\r\n class=\"cc-nav-item\"\r\n [class.active]=\"item.id === activeId\"\r\n [class.disabled]=\"item.disabled\"\r\n [disabled]=\"item.disabled\"\r\n role=\"tab\"\r\n [attr.aria-selected]=\"item.id === activeId\"\r\n [attr.aria-disabled]=\"item.disabled || null\"\r\n (click)=\"onItemClick(item)\">\r\n\r\n <!-- Icon (optional) -->\r\n <span *ngIf=\"item.icon\" class=\"cc-nav-item-icon\">\r\n <i [ngClass]=\"item.icon\"></i>\r\n </span>\r\n\r\n <!-- Label -->\r\n <span class=\"cc-nav-item-label\">{{ item.label }}</span>\r\n\r\n <!-- Badge (optional) -->\r\n <span *ngIf=\"item.badge != null\" class=\"cc-nav-item-badge\">\r\n {{ item.badge }}\r\n </span>\r\n\r\n </button>\r\n\r\n</nav>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NavComponent } from './components/nav/nav.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n NavComponent\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n NavComponent\r\n ]\r\n})\r\nexport class NavModule { }\r\n","import { Component, EventEmitter, Input, OnInit, Output, ElementRef, HostListener } from '@angular/core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { TableFilterConfig, TableFilterOutput, TableFilterColumn, TableFilterLabels } from '../../filter.models';\r\n\r\n@Component({\r\n selector: 'lib-filter',\r\n templateUrl: './filter.component.html',\r\n styleUrls: ['./filter.component.scss'],\r\n standalone: false\r\n})\r\nexport class FilterComponent implements OnInit {\r\n @Input() config: TableFilterConfig = { items: [] };\r\n @Input() activeFilters: TableFilterOutput = {};\r\n @Input() columns: TableFilterColumn[] = [];\r\n @Input() labels: TableFilterLabels = {\r\n filterBtn: '',\r\n clear: '',\r\n apply: '',\r\n search: '',\r\n columns: '',\r\n showAll: '',\r\n hideAll: ''\r\n };\r\n @Input() theme: string = '';\r\n\r\n @Output() filterChange = new EventEmitter<TableFilterOutput>();\r\n @Output() columnChange = new EventEmitter<TableFilterColumn[]>();\r\n @Output() toggle = new EventEmitter<boolean>();\r\n\r\n isOpen = false;\r\n activeTab: 'filters' | 'columns' = 'filters';\r\n\r\n // Temporary state while panel is open\r\n tempFilters: TableFilterOutput = {};\r\n tempColumns: TableFilterColumn[] = [];\r\n\r\n constructor(\r\n private elementRef: ElementRef,\r\n private router: Router,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.syncTempState();\r\n this.initFromUrl();\r\n }\r\n\r\n private initFromUrl(): void {\r\n if (this.config.settings?.persistent) {\r\n this.route.queryParams.subscribe(params => {\r\n if (Object.keys(params).length > 0) {\r\n const newFilters: TableFilterOutput = { ...this.activeFilters };\r\n Object.keys(params).forEach(key => {\r\n // Skip non-filter params if possible, or assume all are filters\r\n // Ideally we check against config items\r\n if (params[key] !== undefined) {\r\n newFilters[key] = params[key];\r\n }\r\n });\r\n this.activeFilters = newFilters;\r\n this.syncTempState();\r\n }\r\n });\r\n }\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClickOutside(event: Event): void {\r\n if (!this.elementRef.nativeElement.contains(event.target)) {\r\n this.isOpen = false;\r\n }\r\n }\r\n\r\n togglePanel(): void {\r\n this.isOpen = !this.isOpen;\r\n if (this.isOpen) {\r\n this.syncTempState();\r\n this.activeTab = 'filters';\r\n }\r\n this.toggle.emit(this.isOpen);\r\n }\r\n\r\n setActiveTab(tab: 'filters' | 'columns'): void {\r\n this.activeTab = tab;\r\n }\r\n\r\n // Generic Filter Change Handler\r\n onFilterChange(key: string | undefined, value: any): void {\r\n if (!key) return;\r\n this.tempFilters[key] = value;\r\n }\r\n\r\n // Column Visibility Logic\r\n toggleColumn(columnId: string): void {\r\n const col = this.tempColumns.find(c => c.id === columnId);\r\n if (col) {\r\n col.visible = !col.visible;\r\n }\r\n }\r\n\r\n toggleAllColumns(visible: boolean): void {\r\n this.tempColumns.forEach(c => c.visible = visible);\r\n }\r\n\r\n // Actions\r\n clearAll(): void {\r\n if (this.activeTab === 'filters') {\r\n this.tempFilters = {};\r\n if (this.config.settings?.persistent) {\r\n this.updateUrl({});\r\n }\r\n } else {\r\n // Reset columns to default or show all?\r\n // Usually 'clear' in filters context means clear filters\r\n // But if we are in columns tab, maybe we want to reset columns?\r\n // For now, let's keep it simple: generic clear clears filters.\r\n this.tempFilters = {};\r\n }\r\n // If we want clear to apply immediately without clicking apply:\r\n // this.apply(); \r\n // But usually \"Clear\" inside panel just clears temp state until Apply is clicked.\r\n // However, if the user requested \"Persistent\" and \"Clear\", they might expect immediate URL update?\r\n // Standard UX: panel actions apply on \"Apply\".\r\n // The persisted state should only change when \"Apply\" is clicked?\r\n // Wait, if I update URL on clearAll inside panel, it might be confusing if panel is still open with cleared state but not \"applied\" to data.\r\n // Re-reading expectation: \"Persistent\" setting usually means the filter state is synced with URL.\r\n // If I clear temp state, URL shouldn't change until I click Apply.\r\n // SO I WILL NOT UPDATE URL HERE. The `initFromUrl` loads INTO `activeFilters`.\r\n // `apply()` updates `activeFilters` AND should update URL.\r\n }\r\n\r\n apply(): void {\r\n // Apply temp state to active state\r\n this.activeFilters = { ...this.tempFilters };\r\n // Clean up undefined/null values\r\n Object.keys(this.activeFilters).forEach(key => {\r\n if (this.activeFilters[key] === null || this.activeFilters[key] === undefined || this.activeFilters[key] === '') {\r\n delete this.activeFilters[key];\r\n }\r\n });\r\n\r\n // Apply columns\r\n this.columns = this.tempColumns.map(c => ({ ...c }));\r\n\r\n this.filterChange.emit(this.activeFilters);\r\n this.columnChange.emit(this.columns);\r\n\r\n if (this.config.settings?.persistent) {\r\n this.updateUrl(this.activeFilters);\r\n }\r\n\r\n this.isOpen = false;\r\n }\r\n\r\n\r\n private updateUrl(queryParams: any): void {\r\n this.router.navigate([], {\r\n relativeTo: this.route,\r\n queryParams: queryParams,\r\n queryParamsHandling: 'merge', // or 'replace' to clear others? 'merge' ensures we don't lose other params\r\n // But wait, if we removed a filter, merge keeps it?\r\n // We need to explicitly clear removed keys if we use merge.\r\n // Or use pure replacement of filter keys.\r\n // For simplicity, let's assuming we want to replace parameters that overlap.\r\n // But to clear keys, we need to pass `null` or `undefined` for those keys in `queryParams`?\r\n // Angular router: passing null removes the param.\r\n });\r\n\r\n // Refined updateUrl logic:\r\n // We merged activeFilters. But if we removed a key, it's missing from activeFilters.\r\n // We need to compare with current params and remove keys that are no longer in activeFilters?\r\n // A simpler way for this component:\r\n // We likely want to replace ALL query params that correspond to filters. \r\n // But we don't know which params are filters vs other things (e.g. page, sort).\r\n // For now, I will just push `this.activeFilters`. \r\n // NOTE: This doesn't clear keys that were removed. \r\n // To fix clearing:\r\n // I should probably navigate with exact activeFilters if I knew they are the ONLY params.\r\n // Better:\r\n // this.router.navigate([], { queryParams: this.activeFilters }); // property replaces all\r\n // If we want to keep 'page', etc., we need to include them.\r\n // Let's use 'merge' but we need to handle clearing.\r\n // I will implement a smarter update.\r\n }\r\n\r\n activeFilterCountValue(): number {\r\n return Object.keys(this.activeFilters).length;\r\n }\r\n\r\n\r\n get activeFilterCount(): number {\r\n return Object.keys(this.activeFilters).length;\r\n }\r\n\r\n private syncTempState(): void {\r\n this.tempFilters = { ...this.activeFilters };\r\n this.tempColumns = JSON.parse(JSON.stringify(this.columns || []));\r\n }\r\n\r\n get containerStyles(): { [key: string]: string } {\r\n const styles: { [key: string]: string } = {};\r\n if (this.config.styles) {\r\n if (this.config.styles.width) styles['--cc-filter-panel-width'] = this.config.styles.width;\r\n if (this.config.styles.padding) styles['--cc-filter-panel-padding'] = this.config.styles.padding;\r\n if (this.config.styles.gap) styles['--cc-filter-panel-gap'] = this.config.styles.gap;\r\n if (this.config.styles.backgroundColor) styles['--cc-filter-panel-bg'] = this.config.styles.backgroundColor;\r\n if (this.config.styles.borderRadius) styles['--cc-filter-panel-radius'] = this.config.styles.borderRadius;\r\n if (this.config.styles.headerHeight) styles['--cc-filter-panel-header-height'] = this.config.styles.headerHeight;\r\n }\r\n return styles;\r\n }\r\n\r\n trackByFn(index: number, item: any): any {\r\n return item.key || index;\r\n }\r\n}\r\n","<div class=\"cc-filter-container\" [class.is-open]=\"isOpen\" [ngStyle]=\"containerStyles\">\r\n\r\n <!-- Trigger Button -->\r\n <lib-button variant=\"outline\" (click)=\"togglePanel()\" class=\"cc-filter-trigger\"\r\n [class.active]=\"activeFilterCount > 0\">\r\n <span class=\"fas fa-filter\"></span> {{ labels?.filterBtn || 'Filter' }}\r\n <span *ngIf=\"activeFilterCount > 0\" class=\"cc-badge\">{{ activeFilterCount }}</span>\r\n </lib-button>\r\n\r\n <!-- Dropdown Panel -->\r\n <div class=\"cc-filter-panel mat-elevation-z4\" *ngIf=\"isOpen\" (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- Header / Tabs -->\r\n <div class=\"cc-panel-header\">\r\n <div class=\"cc-tabs\">\r\n <div class=\"cc-tab\" [class.active]=\"activeTab === 'filters'\" (click)=\"setActiveTab('filters')\">\r\n {{ labels.filterBtn }}\r\n </div>\r\n <!-- Hide columns tab if no columns config provided -->\r\n <div class=\"cc-tab\" [class.active]=\"activeTab === 'columns'\" (click)=\"setActiveTab('columns')\"\r\n *ngIf=\"columns?.length\">\r\n {{ labels.columns }}\r\n </div>\r\n </div>\r\n <button type=\"button\" class=\"cc-icon-btn\" (click)=\"togglePanel()\">\r\n <span class=\"material-icons\">close</span>\r\n </button>\r\n </div>\r\n\r\n <!-- Filters Tab Content -->\r\n <div class=\"cc-panel-content\" *ngIf=\"activeTab === 'filters'\">\r\n\r\n <!-- Dynamic Items -->\r\n <ng-container *ngFor=\"let item of config.items; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\"></ng-container>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <!-- Columns Tab Content -->\r\n <div class=\"cc-panel-content\" *ngIf=\"activeTab === 'columns'\">\r\n <div class=\"cc-columns-actions\">\r\n <lib-button variant=\"outline\" class=\"cc-btn-text\" (click)=\"toggleAllColumns(true)\">{{ labels.showAll\r\n }}</lib-button>\r\n <lib-button variant=\"outline\" class=\"cc-btn-text\" (click)=\"toggleAllColumns(false)\">{{ labels.hideAll\r\n }}</lib-button>\r\n </div>\r\n <div class=\"cc-columns-list\">\r\n <div *ngFor=\"let col of tempColumns\" class=\"cc-column-item\">\r\n <lib-checkbox [label]=\"col.label\" [checked]=\"col.visible\" (checkedChange)=\"toggleColumn(col.id)\">\r\n </lib-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Footer Actions -->\r\n <div class=\"cc-panel-footer\">\r\n <lib-button variant=\"outline\" color=\"warn\" class=\"cc-btn-text text-danger\" (click)=\"clearAll()\">\r\n {{ labels.clear }}\r\n </lib-button>\r\n <lib-button class=\"ms-2\" variant=\"primary\" (click)=\"apply()\">\r\n {{ labels.apply }}\r\n </lib-button>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n\r\n<!-- Recursive Template for Items -->\r\n<ng-template #itemTemplate let-item=\"item\">\r\n <div class=\"cc-filter-item\" [ngClass]=\"['type-' + item.type]\"\r\n [style.display]=\"item.visible === false ? 'none' : 'block'\" [ngStyle]=\"item.styles\">\r\n\r\n <ng-container [ngSwitch]=\"item.type\">\r\n\r\n <!-- Input -->\r\n <lib-input *ngSwitchCase=\"'input'\" [config]=\"item.inputConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (valueChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-input>\r\n\r\n <!-- Dropdown -->\r\n <lib-dropdown *ngSwitchCase=\"'dropdown'\" [config]=\"item.dropdownConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (selectionChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-dropdown>\r\n\r\n <!-- Checkbox -->\r\n <lib-checkbox *ngSwitchCase=\"'checkbox'\" [config]=\"item.checkboxConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (checkedChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-checkbox>\r\n\r\n <!-- Radio -->\r\n <lib-radio *ngSwitchCase=\"'radio'\" [config]=\"item.radioConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (selectionChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-radio>\r\n\r\n <!-- Toggle -->\r\n <lib-toggle *ngSwitchCase=\"'toggle'\" [config]=\"item.toggleConfig\" [label]=\"item.label\"\r\n [checked]=\"tempFilters[item.key]\" (toggleChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-toggle>\r\n\r\n <!-- Datepicker -->\r\n <lib-datepicker *ngSwitchCase=\"'datepicker'\" [config]=\"item.datepickerConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (dateChange)=\"onFilterChange(item.key, $event)\">\r\n </lib-datepicker>\r\n\r\n <!-- Search -->\r\n <lib-search *ngSwitchCase=\"'active-search'\" [config]=\"item.searchConfig\" [label]=\"item.label\"\r\n [ngModel]=\"tempFilters[item.key]\" (search)=\"onFilterChange(item.key, $event)\">\r\n </lib-search>\r\n\r\n <!-- Group / Accordion -->\r\n <div *ngSwitchCase=\"'group'\" class=\"cc-accordion-item\" [class.expanded]=\"item.expanded\">\r\n <button type=\"button\" class=\"cc-accordion-header\" (click)=\"item.expanded = !item.expanded\">\r\n <span class=\"cc-accordion-title\">{{ item.label }}</span>\r\n <span class=\"material-icons cc-accordion-icon\">{{ item.expanded ? 'expand_less' : 'expand_more'\r\n }}</span>\r\n </button>\r\n\r\n <div class=\"cc-accordion-body\" *ngIf=\"item.expanded\">\r\n <ng-container *ngFor=\"let child of item.children; trackBy: trackByFn\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: child }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <!-- Custom Divider -->\r\n <div *ngSwitchCase=\"'divider'\" class=\"cc-filter-divider\"></div>\r\n\r\n </ng-container>\r\n </div>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { ButtonModule } from '../button/button.module';\r\nimport { FormComponentsModule } from '../form-components/form-components.module';\r\nimport { FilterComponent } from './components/filter/filter.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FilterComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n ButtonModule,\r\n FormComponentsModule\r\n ],\r\n exports: [\r\n FilterComponent\r\n ]\r\n})\r\nexport class FilterModule { }\r\n","import { Component, EventEmitter, Input, OnInit, Output, OnChanges, SimpleChanges, AfterViewInit, OnDestroy, ViewChildren, QueryList, ElementRef, ChangeDetectorRef, NgZone, inject, LOCALE_ID, HostListener } from '@angular/core';\nimport { TableConfig, TableColumn, TableAction, TableFilter } from '../../models/table-config.model';\nimport { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';\nimport { formatDate } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { catchError, finalize, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { of, forkJoin, Subject } from 'rxjs';\n\n@Component({\n selector: 'lib-smart-table',\n templateUrl: './smart-table.component.html',\n styleUrls: ['./smart-table.component.scss'],\n standalone: false\n})\nexport class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n @Input() config!: TableConfig;\n \n @Output() action = new EventEmitter<{ action: TableAction, row: any }>();\n @Output() topAction = new EventEmitter<TableAction>(); // For top bar buttons\n @Output() filterChange = new EventEmitter<{ key: string, value: any }>();\n @Output() rowSelect = new EventEmitter<any[]>();\n @Output() columnClick = new EventEmitter<{ row: any, column: string }>();\n\n data: any[] = [];\n totalItems: number = 0;\n currentPage: number = 1;\n loading: boolean = false;\n \n // State\n activeSort: { key: string, direction: 'ASC' | 'DESC' } = { key: '', direction: 'ASC' };\n activeFilters: { [key: string]: any } = {};\n searchTerm: string = '';\n selectedRows: any[] = [];\n stickyColumnStyles: { [key: string]: any } = {};\n hasStickyColumns: boolean = false;\n openDropdownId: string | null = null;\n\n searchSubject = new Subject<string>();\n\n @ViewChildren('stickyHeader') stickyHeaders!: QueryList<ElementRef>;\n private resizeObserver: ResizeObserver | null = null;\n private locale = inject(LOCALE_ID);\n\n constructor(\n private http: HttpClient, \n private router: Router,\n private cdr: ChangeDetectorRef,\n private ngZone: NgZone\n ) { \n // Debounce search input\n this.searchSubject.pipe(\n debounceTime(this.config?.searchConfig?.debounceTime || 300),\n distinctUntilChanged()\n ).subscribe(term => {\n this.searchTerm = term;\n this.currentPage = 1;\n this.loadData();\n });\n }\n\n ngOnInit(): void {\n if (this.config) {\n if (this.config.sortBy) {\n this.activeSort.key = this.config.sortBy;\n }\n if (this.config.orderBy) {\n this.activeSort.direction = this.config.orderBy;\n }\n this.loadFilterOptions();\n this.loadData();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['config'] && !changes['config'].firstChange) {\n this.loadFilterOptions();\n this.loadData();\n setTimeout(() => this.calculateStickyPositions());\n }\n }\n\n ngAfterViewInit(): void {\n this.setupResizeObserver();\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n private setupResizeObserver(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n \n this.resizeObserver = new ResizeObserver(() => {\n this.ngZone.run(() => {\n this.calculateStickyPositions();\n });\n });\n\n if (this.stickyHeaders) {\n this.stickyHeaders.changes.subscribe(() => {\n this.observeHeaders();\n // Also recalculate immediately\n setTimeout(() => this.calculateStickyPositions());\n });\n this.observeHeaders();\n }\n }\n\n private observeHeaders(): void {\n if (!this.resizeObserver || !this.stickyHeaders) return;\n this.stickyHeaders.forEach(header => {\n this.resizeObserver!.observe(header.nativeElement);\n });\n }\n \n loadData(): void {\n if (!this.config?.apiUrl) return;\n \n this.loading = true;\n let params: HttpParams;\n\n // --- Query Params Construction ---\n if (this.config.queryParamsConfig) {\n const qpConfig = this.config.queryParamsConfig;\n const pageKey = qpConfig.pageKey || 'page';\n const sizeKey = qpConfig.sizeKey || 'pageSize';\n const pageIndex = this.currentPage + (qpConfig.pageIndexOffset || 0);\n\n let paramsObj: any = {\n [pageKey]: pageIndex.toString(),\n [sizeKey]: (this.config.pagination?.pageSize || 10).toString()\n };\n\n if (this.activeSort.key) paramsObj['sortBy'] = this.activeSort.key;\n // Note: Some APIs might use different keys for sort/order, can be extended later if needed\n if (this.activeSort.direction) paramsObj['orderBy'] = this.activeSort.direction;\n \n // Search Handling\n if (this.searchTerm) {\n const searchConfig = this.config.searchConfig;\n const searchKey = searchConfig?.searchKey || 'search';\n \n if (searchConfig?.handling === 'nested_string' && qpConfig.nestedStringConfig) {\n // Will be handled in nested string construction below\n } else {\n paramsObj[searchKey] = this.searchTerm;\n }\n }\n\n // Filter Handling (and Search if nested)\n if (qpConfig.filterHandling === 'nested_string' && qpConfig.nestedStringConfig) {\n const { paramName, baseValue, separator, assignment } = qpConfig.nestedStringConfig;\n let nestedString = baseValue || '';\n const assign = assignment || '=';\n\n // Add Filters\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) {\n const prefix = nestedString ? separator : '';\n nestedString += `${prefix}${key}${assign}${this.activeFilters[key]}`;\n }\n });\n \n // Add Search if nested\n if (this.searchTerm && this.config.searchConfig?.handling === 'nested_string') {\n const searchKey = this.config.searchConfig.searchKey || 'SEARCH_TERM';\n const prefix = nestedString ? separator : '';\n nestedString += `${prefix}${searchKey}${assign}${this.searchTerm}`;\n }\n\n paramsObj[paramName] = nestedString;\n } else {\n // Standard handling\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) paramsObj[key] = this.activeFilters[key];\n });\n }\n params = new HttpParams({ fromObject: paramsObj });\n\n } else {\n // --- Default Behavior (Backward Compatibility) ---\n let paramsObj: any = {};\n \n if (this.config.pagination?.enabled) {\n paramsObj['page'] = this.currentPage;\n paramsObj['pageSize'] = this.config.pagination.pageSize;\n }\n\n if (this.activeSort.key) {\n paramsObj['sortBy'] = this.activeSort.key;\n paramsObj['orderBy'] = this.activeSort.direction;\n }\n\n if (this.searchTerm) {\n const searchKey = this.config.searchConfig?.searchKey || 'search';\n paramsObj[searchKey] = this.searchTerm;\n }\n\n Object.keys(this.activeFilters).forEach(key => {\n if (this.activeFilters[key]) {\n paramsObj[key] = this.activeFilters[key];\n }\n });\n\n // Custom Request Params Mapper (if provided)\n if (this.config.requestParams) {\n const customParams = this.config.requestParams(\n this.currentPage, \n this.config.pagination?.pageSize || 10, \n this.activeSort.key, \n this.activeSort.direction, \n this.searchTerm, \n this.activeFilters\n );\n if (customParams instanceof HttpParams) {\n // If function returns HttpParams, use it directly (caveat: might lose previous params if not careful in mapper)\n params = customParams;\n } else {\n paramsObj = { ...paramsObj, ...customParams };\n params = new HttpParams({ fromObject: paramsObj });\n }\n } else {\n params = new HttpParams({ fromObject: paramsObj });\n }\n }\n\n // --- Data Fetching ---\n \n // Check for separate count API\n const totalCountConfig = this.config.pagination?.totalCountConfig;\n let request$: any; // Observable\n\n if (totalCountConfig?.source === 'separate' && totalCountConfig.apiUrl) {\n const headers = this.getHeaders();\n const method = this.config.apiMethod || 'GET';\n const body = this.config.apiPayload || {};\n\n const dataRequest$ = method === 'POST' ? this.http.post<any>(this.config.apiUrl, body, { params, headers }) : this.http.get<any>(this.config.apiUrl, { params, headers });\n const countRequest$ = method === 'POST' ? this.http.post<any>(totalCountConfig.apiUrl, body, { params, headers }) : this.http.get<any>(totalCountConfig.apiUrl, { params, headers });\n\n request$ = forkJoin({\n data: dataRequest$,\n count: countRequest$\n }).pipe(\n map(({ data, count }) => {\n const dataPath = this.config.dataResponsePath !== undefined ? this.config.dataResponsePath : '';\n return {\n data: this.getValueByPath(data, dataPath),\n total: this.getValueByPath(count, totalCountConfig.responsePath || '')\n };\n })\n );\n } else {\n \n const headers = this.getHeaders();\n const method = this.config.apiMethod || 'GET';\n const body = this.config.apiPayload || {};\n \n const baseRequest$ = method === 'POST' ? this.http.post<any>(this.config.apiUrl, body, { params, headers }) : this.http.get<any>(this.config.apiUrl, { params, headers });\n\n request$ = baseRequest$.pipe(\n map(response => {\n const dataPath = this.config.dataResponsePath !== undefined ? this.config.dataResponsePath : '';\n const totalPath = totalCountConfig?.responsePath || '';\n return {\n data: this.getValueByPath(response, dataPath),\n // If source is 'same', try to get total from response, else default 0\n total: totalCountConfig ? this.getValueByPath(response, totalPath) : 0\n };\n })\n );\n }\n\n request$.pipe(\n finalize(() => this.loading = false),\n catchError(err => {\n console.error('Table Data Fetch Error', err);\n return of({ data: [], total: 0 }); \n })\n )\n .subscribe((result: any) => {\n this.data = result.data || [];\n if (this.config.pagination) {\n this.totalItems = result.total || 0;\n }\n\n // Dynamic Column Generation\n if (!this.config.columns || this.config.columns.length === 0) {\n if (this.data.length > 0) {\n this.config.columns = Object.keys(this.data[0]).map(key => ({\n key: key,\n label: this.toTitleCase(key),\n type: 'text',\n sortable: false,\n editable: false\n }));\n }\n }\n });\n }\n\n // --- Actions ---\n\n onPageChange(page: number): void {\n this.currentPage = page;\n this.loadData();\n }\n\n onPageSizeChange(size: number): void {\n if (this.config.pagination) {\n this.config.pagination.pageSize = size;\n this.currentPage = 1; // Reset to first page\n this.loadData();\n }\n }\n\n onSort(col: TableColumn): void {\n if (!col.sortable) return;\n\n if (this.activeSort.key === col.key) {\n this.activeSort.direction = this.activeSort.direction === 'ASC' ? 'DESC' : 'ASC';\n } else {\n this.activeSort.key = col.key;\n this.activeSort.direction = 'ASC';\n }\n this.loadData();\n }\n\n onSearch(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.searchSubject.next(value);\n }\n\n onFilterChange(key: string, event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n this.activeFilters[key] = value;\n this.currentPage = 1;\n this.filterChange.emit({ key, value });\n this.loadData();\n }\n \n onAction(action: TableAction, row: any): void {\n if (action.type === 'callback' && action.callback) {\n action.callback(row);\n }\n \n if (action.type === 'route' && action.route) {\n const url = this.replaceParams(action.route, row);\n this.router.navigateByUrl(url);\n return;\n }\n\n if (action.type === 'api') {\n if (action.confirmationNeeded) {\n const message = action.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (action.apiUrl) {\n this.executeApiAction(action, row);\n } else {\n this.action.emit({ action, row });\n }\n } else {\n this.action.emit({ action, row });\n }\n }\n\n onActionItemClick(item: any, row: any, event: Event): void {\n event.stopPropagation();\n \n if (item.type === 'callback' && item.callback) {\n item.callback(row);\n }\n \n if (item.type === 'route' && item.route) {\n const url = this.replaceParams(item.route, row);\n this.router.navigateByUrl(url);\n return;\n }\n\n if (item.type === 'api') {\n if (item.confirmationNeeded) {\n const message = item.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (item.apiUrl) {\n this.executeApiAction(item as TableAction, row);\n } else {\n this.action.emit({ action: item as TableAction, row });\n }\n } else {\n this.action.emit({ action: item as TableAction, row });\n }\n }\n\n onTopAction(action: TableAction): void {\n if (action.type === 'callback' && action.callback) {\n action.callback(null); // No row for top action\n }\n \n if (action.type === 'route' && action.route) {\n // Since it's a top action, replaceParams with an empty object or handle statically \n const url = this.replaceParams(action.route, {});\n this.router.navigateByUrl(url);\n return;\n }\n\n if (action.type === 'api') {\n if (action.confirmationNeeded) {\n const message = action.confirmationMessage || this.config.labels?.defaultConfirmationMessage || 'Are you sure?';\n if (!confirm(message)) return;\n }\n if (action.apiUrl) {\n this.executeApiAction(action, null);\n } else {\n this.topAction.emit(action);\n }\n } else {\n this.topAction.emit(action);\n }\n }\n\n private executeApiAction(action: TableAction, row: any): void {\n if (!action.apiUrl) return;\n \n const url = row ? this.replaceParams(action.apiUrl, row) : action.apiUrl;\n const method = action.apiMethod || 'POST';\n const headers = this.getHeaders();\n const body = row ? row : {};\n \n this.loading = true;\n this.http.request(method, url, { body, headers }).pipe(\n finalize(() => this.loading = false)\n ).subscribe({\n next: () => {\n this.loadData(); // reload on success\n if (row) {\n this.action.emit({ action, row });\n } else {\n this.topAction.emit(action);\n }\n },\n error: (err) => {\n console.error('API Action Error', err);\n }\n });\n }\n\n // --- Selection ---\n\n onSelectAll(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this.data.forEach(row => row.selected = checked);\n this.updateSelectedRows();\n }\n \n onRowSelect(row: any): void {\n this.updateSelectedRows();\n }\n \n updateSelectedRows(): void {\n this.selectedRows = this.data.filter(row => row.selected);\n this.rowSelect.emit(this.selectedRows);\n }\n\n // --- Helpers ---\n\n getCellValue(row: any, col: TableColumn): any {\n // Support nested properties via labelPath or key\n const path = col.labelPath || col.key;\n let val = this.getValueByPath(row, path);\n \n // Formatting (Date, etc.)\n if (col.type === 'date' && val) {\n if (col.dateFormat) {\n try {\n return formatDate(val, col.dateFormat, this.locale);\n } catch (e) {\n console.warn('Invalid date format or value', val, col.dateFormat);\n return val;\n }\n }\n return new Date(val).toLocaleDateString();\n }\n return val;\n }\n\n getBadgeClass(row: any, col: TableColumn): string {\n const val = this.getCellValue(row, col);\n const strVal = String(val);\n \n // Config approach\n if (col.badgeConfig && col.badgeConfig[strVal]) {\n return `badge-${col.badgeConfig[strVal]}`;\n }\n\n // Default Logic\n const status = strVal.toLowerCase();\n \n if (['active', 'completed', 'success', 'approved'].includes(status)) return 'badge-success';\n if (['pending', 'in progress', 'waiting'].includes(status)) return 'badge-warning';\n if (['rejected', 'failed', 'error', 'deleted'].includes(status)) return 'badge-danger';\n if (['draft', 'inactive'].includes(status)) return 'badge-neutral';\n \n return 'badge-info'; // default\n }\n \n getSortIcon(key: string): string {\n if (this.activeSort.key !== key) return 'fa-sort';\n return this.activeSort.direction === 'ASC' ? 'fa-sort-up' : 'fa-sort-down';\n }\n\n private replaceParams(template: string, row: any): string {\n return template.replace(/:([a-zA-Z0-9_]+)/g, (_, key) => row[key] || '');\n }\n \n private loadFilterOptions(): void {\n if (!this.config.filters) return;\n\n this.config.filters.forEach(filter => {\n if (filter.apiUrl && !filter.options) {\n const headers = this.getHeaders();\n let params = new HttpParams();\n\n if (filter.handling === 'nested_string' && filter.nestedStringConfig) {\n const { paramName, baseValue } = filter.nestedStringConfig;\n if (baseValue) {\n params = params.set(paramName, baseValue);\n }\n }\n\n const method = filter.apiMethod || 'GET';\n const body = filter.apiPayload || {};\n \n const request$ = method === 'POST' \n ? this.http.post<any>(filter.apiUrl, body, { headers, params }) \n : this.http.get<any>(filter.apiUrl, { headers, params });\n\n request$.subscribe({\n next: (response) => {\n const data = filter.dataPath ? this.getValueByPath(response, filter.dataPath) : response;\n if (!Array.isArray(data)) {\n console.error(`Filter data for ${filter.key} is not an array`, data);\n return;\n }\n filter.options = data.map((item: any) => {\n const label = filter.labelPath ? this.getValueByPath(item, filter.labelPath) :\n (filter.labelKey ? item[filter.labelKey] : item.label || item.name);\n const value = filter.valuePath ? this.getValueByPath(item, filter.valuePath) :\n (filter.valueKey ? item[filter.valueKey] : item.value || item.code);\n return { label, value };\n });\n\n // Auto-populate matching column options\n if (this.config.columns) {\n const matchingColumn = this.config.columns.find(col => col.key === filter.key);\n if (matchingColumn && matchingColumn.dataType === 'select' && !matchingColumn.options) {\n matchingColumn.options = filter.options;\n }\n }\n },\n error: (err) => console.error(`Failed to load filter options for ${filter.key}:`, err)\n });\n }\n });\n }\n\n private getValueByPath(obj: any, path: string): any {\n if (!path || path === '') return obj;\n return path.split('.').reduce((acc, part) => {\n const match = part.match(/(\\w+)\\[(\\d+)\\]/);\n if (match) {\n return acc?.[match[1]]?.[parseInt(match[2])];\n }\n return acc?.[part];\n }, obj);\n }\n\n private calculateStickyPositions(): void {\n // We calculate positions based on rendered widths\n if (!this.stickyHeaders || this.stickyHeaders.length === 0) return;\n\n this.stickyColumnStyles = {};\n let leftOffset = 0;\n this.hasStickyColumns = false;\n\n // Default sticky columns count is 3 if not specified\n const stickyCount = this.config.stickyColumnCount !== undefined ? this.config.stickyColumnCount : 3;\n\n // Checkbox width handling\n if (this.config.selectable) {\n const firstSticky = this.config.columns.find((c, i) => i < stickyCount || c.sticky);\n if (firstSticky) {\n // We can try to measure checkbox col if needed, but usually fixed 40px\n // Or better, if we have a checkbox col ref, assume 40px for now as it is fixed in CSS\n leftOffset = 40; \n }\n }\n\n const headerElements = this.stickyHeaders.toArray();\n\n this.config.columns.forEach((col, index) => {\n if (col.sticky || index < stickyCount) {\n col.sticky = true;\n this.hasStickyColumns = false; // Reset to true only after we set styles? No, wait. \n // Actually property is used in template to add class 'sticky-col'\n // but we need to update Styles based on previous cols widths\n \n // Find corresponding header element\n // Note: headerElements corresponds to columns indices\n const headerEl = headerElements[index]?.nativeElement;\n \n if (headerEl) {\n // Set style for current column\n this.stickyColumnStyles[col.key] = { \n left: `${leftOffset}px`\n // We DO NOT set width here, allowing it to be dynamic/auto\n };\n \n // Add THIS column's width to offset for the NEXT column\n // use getBoundingClientRect or offsetWidth\n leftOffset += headerEl.offsetWidth;\n }\n this.hasStickyColumns = true;\n }\n });\n \n this.cdr.detectChanges();\n }\n\n private toTitleCase(str: string): string {\n return str\n .replace(/([A-Z])/g, ' $1') // insert space before capital letters\n .replace(/^./, (str) => str.toUpperCase()) // capitalize the first letter\n .trim(); // remove any leading/trailing whitespace\n }\n \n get columnCount(): number {\n return this.config.columns.length;\n }\n\n onColumnClick(row: any, col: TableColumn): void {\n if (col.clickAction === 'callback') {\n this.columnClick.emit({ row, column: col.key });\n } else if (col.clickAction === 'route' && col.clickRoute) {\n const url = this.replaceParams(col.clickRoute, row);\n this.router.navigateByUrl(url);\n }\n }\n\n private getHeaders(): HttpHeaders {\n let headers = new HttpHeaders();\n if (this.config.token) {\n const headerName = this.config.tokenHeader || 'Authorization';\n headers = headers.set(headerName, this.config.token);\n }\n return headers;\n }\n\n toggleDropdown(id: string, event: Event): void {\n event.stopPropagation();\n this.openDropdownId = this.openDropdownId === id ? null : id;\n }\n\n @HostListener('document:click')\n closeDropdown(): void {\n this.openDropdownId = null;\n }\n}\n","<div class=\"smart-table-wrapper\">\n <!-- Top Toolbar -->\n <div class=\"st-toolbar\" *ngIf=\"config.searchConfig?.enabled || (config.filters && config.filters.length > 0) || (config.topBarButtons && config.topBarButtons.length > 0)\">\n \n <!-- Search -->\n <div class=\"st-search\" *ngIf=\"config.searchConfig?.enabled\">\n <i class=\"fa fa-search\"></i>\n <input type=\"text\" [placeholder]=\"config.labels?.searchPlaceholder || 'Search'\" (input)=\"onSearch($event)\">\n </div>\n\n <!-- Filters -->\n <div class=\"st-filters\" *ngIf=\"config.filters\">\n <div class=\"st-filter-item\" *ngFor=\"let filter of config.filters\">\n <select (change)=\"onFilterChange(filter.key, $event)\">\n <option value=\"\">{{ filter.label }}</option>\n <option *ngFor=\"let opt of filter.options\" [value]=\"opt.value\">{{ opt.label }}</option>\n </select>\n </div>\n </div>\n\n <!-- Top Bar Buttons -->\n <div class=\"st-actions\" *ngIf=\"config.topBarButtons\">\n <lib-button *ngFor=\"let btn of config.topBarButtons\" \n [variant]=\"btn.btnVariant || 'primary'\"\n [icon]=\"btn.icon || ''\"\n (click)=\"onTopAction(btn)\">\n {{ btn.label }}\n </lib-button>\n </div>\n </div>\n\n <!-- Table Container -->\n <div class=\"st-table-container\">\n <div class=\"st-check-loader\" *ngIf=\"loading\">\n <div class=\"spinner\"></div>\n </div>\n <table class=\"st-table\" [class.loading-data]=\"loading\">\n <thead>\n <tr>\n <th *ngIf=\"config.selectable\" class=\"st-checkbox-col\">\n <input type=\"checkbox\" (change)=\"onSelectAll($event)\">\n </th>\n <th *ngFor=\"let col of config.columns\" \n #stickyHeader\n [class.sortable]=\"col.sortable\"\n [class.sticky-col]=\"col.sticky\"\n [ngStyle]=\"stickyColumnStyles[col.key]\"\n (click)=\"onSort(col)\">\n {{ col.label }}\n <span *ngIf=\"col.sortable\" class=\"sort-icon\">\n <i class=\"fa\" [ngClass]=\"getSortIcon(col.key)\"></i>\n </span>\n </th>\n <th *ngIf=\"config.actions && config.actions.length > 0\">{{ config.labels?.actionColumnHeader || 'Actions' }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of data; let rowIndex = index\">\n <td *ngIf=\"config.selectable\" class=\"st-checkbox-col\">\n <input type=\"checkbox\" [(ngModel)]=\"row.selected\" (change)=\"onRowSelect(row)\">\n </td>\n <td *ngFor=\"let col of config.columns\" \n [class.sticky-col]=\"col.sticky\" \n [ngStyle]=\"stickyColumnStyles[col.key]\"\n [class.clickable-cell]=\"col.clickAction\"\n (click)=\"onColumnClick(row, col)\">\n <!-- Text/Number/Date -->\n <span *ngIf=\"col.type !== 'custom' && col.type !== 'html' && col.type !== 'badge'\">\n {{ getCellValue(row, col) }}\n </span>\n <!-- HTML -->\n <div *ngIf=\"col.type === 'html'\" [innerHTML]=\"getCellValue(row, col)\"></div>\n <!-- Badge -->\n <span *ngIf=\"col.type === 'badge'\" class=\"st-badge\" [ngClass]=\"getBadgeClass(row, col)\">\n {{ getCellValue(row, col) }}\n </span>\n </td>\n \n <!-- Row Actions -->\n <td *ngIf=\"config.actions && config.actions.length > 0\" class=\"st-row-actions\">\n <div class=\"action-buttons\">\n <ng-container *ngFor=\"let action of config.actions; let i = index\">\n <ng-container *ngIf=\"action.type === 'dropdown'\">\n <div class=\"st-dropdown-container\" (click)=\"$event.stopPropagation()\">\n <button class=\"st-dropdown-btn\" (click)=\"toggleDropdown(rowIndex + '-' + i, $event)\">\n <i [class]=\"action.icon || 'fa fa-ellipsis-h'\"></i>\n </button>\n <div class=\"st-dropdown-menu\" *ngIf=\"openDropdownId === (rowIndex + '-' + i)\">\n <button class=\"st-dropdown-item\" *ngFor=\"let item of action.items\" (click)=\"onActionItemClick(item, row, $event); closeDropdown()\">\n <i *ngIf=\"item.icon\" [class]=\"item.icon + ' st-action-icon'\"></i>\n <span>{{ item.label }}</span>\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"action.type !== 'dropdown'\">\n <lib-button \n [variant]=\"action.btnVariant || 'secondary'\"\n [icon]=\"action.icon || ''\"\n (click)=\"onAction(action, row)\">\n {{ action.label }}\n </lib-button>\n </ng-container>\n </ng-container>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"data.length === 0 && !loading\">\n <td [attr.colspan]=\"columnCount + (config.selectable ? 1 : 0) + (config.actions ? 1 : 0)\" class=\"no-data\">\n {{ config.labels?.noDataMessage || 'No data available' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <!-- Pagination -->\n <div class=\"st-pagination\" *ngIf=\"config.pagination && config.pagination.enabled\">\n <lib-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"config.pagination.pageSize\"\n [currentPage]=\"currentPage\"\n [pageSizeOptions]=\"config.pagination.pageSizeOptions\"\n (pageChange)=\"onPageChange($event)\"\n (itemsPerPageChange)=\"onPageSizeChange($event)\">\n </lib-pagination>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { SmartTableComponent } from './components/smart-table/smart-table.component';\nimport { PaginationModule } from '../pagination/pagination.module';\nimport { ButtonModule } from '../button/button.module';\nimport { MaterialModule } from '../material/material.module';\n\n\n@NgModule({\n declarations: [\n SmartTableComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n PaginationModule,\n ButtonModule,\n MaterialModule\n ],\n exports: [\n SmartTableComponent\n ]\n})\nexport class SmartTableModule { }\n","export function appendBaseUrlRecursively(obj: any, baseURL: string): void {\n if (obj && typeof obj === 'object') {\n if (obj.apiUrl && typeof obj.apiUrl === 'string' && !obj.apiUrl.startsWith('http://') && !obj.apiUrl.startsWith('https://')) {\n let finalApiUrl = obj.apiUrl;\n if (baseURL.endsWith('/') && finalApiUrl.startsWith('/')) {\n finalApiUrl = finalApiUrl.substring(1);\n } else if (!baseURL.endsWith('/') && !finalApiUrl.startsWith('/')) {\n finalApiUrl = '/' + finalApiUrl;\n }\n obj.apiUrl = baseURL + finalApiUrl;\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n appendBaseUrlRecursively(obj[key], baseURL);\n }\n }\n }\n}\n","import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';\r\n\r\nexport class ValidationUtils {\r\n\r\n\r\n\r\n static email(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\r\n return emailRegex.test(control.value) ? null : { email: true };\r\n };\r\n }\r\n\r\n static phone(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const phoneRegex = /^\\+?[\\d\\s\\-\\(\\)]{10,}$/;\r\n return phoneRegex.test(control.value) ? null : { phone: true };\r\n };\r\n }\r\n\r\n static url(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const urlRegex = /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$/;\r\n return urlRegex.test(control.value) ? null : { url: true };\r\n };\r\n }\r\n\r\n static minLength(min: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n return control.value.length >= min ? null : { minLength: { min, actual: control.value.length } };\r\n };\r\n }\r\n\r\n static maxLength(max: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n return control.value.length <= max ? null : { maxLength: { max, actual: control.value.length } };\r\n };\r\n }\r\n\r\n static pattern(pattern: string, message?: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const regex = new RegExp(pattern);\r\n return regex.test(control.value) ? null : { pattern: { message: message || 'Invalid format' } };\r\n };\r\n }\r\n\r\n static numberRange(min?: number, max?: number): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value && control.value !== 0) return null;\r\n const value = Number(control.value);\r\n if (min !== undefined && value < min) {\r\n return { min: { min, actual: value } };\r\n }\r\n if (max !== undefined && value > max) {\r\n return { max: { max, actual: value } };\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n static dateRange(minDate?: string, maxDate?: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n if (!control.value) return null;\r\n const date = new Date(control.value);\r\n if (minDate && date < new Date(minDate)) {\r\n return { minDate: { minDate } };\r\n }\r\n if (maxDate && date > new Date(maxDate)) {\r\n return { maxDate: { maxDate } };\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n static getErrorMessage(errors: ValidationErrors | null): string {\r\n if (!errors) return '';\r\n\r\n if (errors['required']) return 'This field is required';\r\n if (errors['email']) return 'Please enter a valid email address';\r\n if (errors['phone']) return 'Please enter a valid phone number';\r\n if (errors['url']) return 'Please enter a valid URL';\r\n if (errors['minLength']) return `Minimum length is ${errors['minLength'].min} characters`;\r\n if (errors['maxLength']) return `Maximum length is ${errors['maxLength'].max} characters`;\r\n if (errors['min']) return `Minimum value is ${errors['min'].min}`;\r\n if (errors['max']) return `Maximum value is ${errors['max'].max}`;\r\n if (errors['minDate']) return `Date must be after ${errors['minDate'].minDate}`;\r\n if (errors['maxDate']) return `Date must be before ${errors['maxDate'].maxDate}`;\r\n if (errors['pattern']) return errors['pattern'].message || 'Invalid format';\r\n\r\n return 'Invalid value';\r\n }\r\n}\r\n","export const SAMPLE_FORMS = {\r\n // Simple Contact Form\r\n contactForm: `{\r\n \"entityType\": \"CONTACT\",\r\n \"label\": \"Contact Us\",\r\n \"description\": \"Send us a message\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"name\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"hint\": \"Enter your full name\"\r\n },\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email Address\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true,\r\n \"hint\": \"your.email@example.com\"\r\n },\r\n {\r\n \"name\": \"meetingTime\",\r\n \"label\": \"Meeting Time\",\r\n \"type\": \"TIME\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select a time\"\r\n },\r\n {\r\n \"name\": \"message\",\r\n \"label\": \"Message\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"required\": true,\r\n \"textConfig\": {\r\n \"length\": {\r\n \"min\": 10,\r\n \"max\": 500\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // User Registration with Stepper\r\n registrationForm: `{\r\n \"entityType\": \"USER\",\r\n \"label\": \"User Registration\",\r\n \"description\": \"Create your account\",\r\n \"formType\": \"STEPPER\",\r\n \"stepperConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Personal Information\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"fullName\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"GENERATED\",\r\n \"subType\": \"FORMULA\",\r\n \"generatedConfig\": {\r\n \"formula\": \"function fullName(first, last) { return (first || '') + ' ' + (last || ''); }\",\r\n \"variables\": [\"firstName\", \"lastName\"]\r\n }\r\n },\r\n {\r\n \"name\": \"dateOfBirth\",\r\n \"label\": \"Date of Birth\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"dateConfig\": {\r\n \"allowFuture\": false\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Contact Information\",\r\n \"children\": [\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Preferences\",\r\n \"children\": [\r\n {\r\n \"name\": \"notifications\",\r\n \"label\": \"Enable Email Notifications\",\r\n \"type\": \"SWITCH\",\r\n \"subType\": \"BOOL\",\r\n \"defaultValue\": true\r\n },\r\n {\r\n \"name\": \"interests\",\r\n \"label\": \"Interests\",\r\n \"type\": \"CHIP\",\r\n \"subType\": \"MULTIPLE\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Technology\", \"code\": \"TECH\" },\r\n { \"label\": \"Sports\", \"code\": \"SPORTS\" },\r\n { \"label\": \"Music\", \"code\": \"MUSIC\" },\r\n { \"label\": \"Travel\", \"code\": \"TRAVEL\" }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"showStep\": true,\r\n \"isHorizontal\": true\r\n }\r\n }`,\r\n\r\n // Survey Form with Conditional Fields\r\n surveyForm: `{\r\n \"entityType\": \"SURVEY\",\r\n \"label\": \"Customer Satisfaction Survey\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"overallRating\",\r\n \"label\": \"Overall Experience\",\r\n \"type\": \"RATING\",\r\n \"subType\": \"STAR\",\r\n \"required\": true,\r\n \"ratingConfig\": {\r\n \"maxRating\": 5,\r\n \"allowHalf\": false\r\n }\r\n },\r\n {\r\n \"name\": \"wouldRecommend\",\r\n \"label\": \"Would you recommend us?\",\r\n \"type\": \"RADIO\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Yes\", \"code\": \"YES\" },\r\n { \"label\": \"No\", \"code\": \"NO\" },\r\n { \"label\": \"Maybe\", \"code\": \"MAYBE\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"reasonForNo\",\r\n \"label\": \"Why not?\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"visibilityExpression\": \"wouldRecommend === 'NO'\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"improvements\",\r\n \"label\": \"What can we improve?\",\r\n \"type\": \"CHECKBOX\",\r\n \"subType\": \"LIST\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Customer Service\", \"code\": \"SERVICE\" },\r\n { \"label\": \"Product Quality\", \"code\": \"QUALITY\" },\r\n { \"label\": \"Pricing\", \"code\": \"PRICE\" },\r\n { \"label\": \"Delivery Speed\", \"code\": \"DELIVERY\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"additionalComments\",\r\n \"label\": \"Additional Comments\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"textConfig\": {\r\n \"length\": {\r\n \"max\": 1000\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // Job Application Form\r\n jobApplicationForm: `{\r\n \"entityType\": \"JOB_APPLICATION\",\r\n \"label\": \"Job Application\",\r\n \"description\": \"Apply for a position at our company\",\r\n \"formType\": \"STEPPER\",\r\n \"stepperConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Personal Details\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Experience\",\r\n \"allowMulti\": true,\r\n \"name\": \"experienceList\",\r\n \"children\": [\r\n {\r\n \"name\": \"company\",\r\n \"label\": \"Company Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"position\",\r\n \"label\": \"Position\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"startDate\",\r\n \"label\": \"Start Date\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true\r\n },\r\n {\r\n \"name\": \"endDate\",\r\n \"label\": \"End Date\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"responsibilities\",\r\n \"label\": \"Key Responsibilities\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Skills & Qualifications\",\r\n \"children\": [\r\n {\r\n \"name\": \"skills\",\r\n \"label\": \"Technical Skills\",\r\n \"type\": \"CHIP\",\r\n \"subType\": \"MULTIPLE\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"JavaScript\", \"code\": \"JS\" },\r\n { \"label\": \"TypeScript\", \"code\": \"TS\" },\r\n { \"label\": \"Angular\", \"code\": \"ANGULAR\" },\r\n { \"label\": \"React\", \"code\": \"REACT\" },\r\n { \"label\": \"Node.js\", \"code\": \"NODE\" },\r\n { \"label\": \"Python\", \"code\": \"PYTHON\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"yearsOfExperience\",\r\n \"label\": \"Years of Experience\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 50\r\n }\r\n },\r\n {\r\n \"name\": \"availableToStart\",\r\n \"label\": \"Available to Start\",\r\n \"type\": \"DATE\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"dateConfig\": {\r\n \"allowFuture\": true\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"showStep\": true,\r\n \"isHorizontal\": true\r\n }\r\n }`,\r\n\r\n // Donor Form based on UI\r\n donorForm: `{\r\n \"entityType\": \"DONOR\",\r\n \"label\": \"Donor Form\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Donor Details\",\r\n \"name\": \"donorDetails\",\r\n \"children\": [\r\n {\r\n \"name\": \"legalName\",\r\n \"label\": \"Donor Legal Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter the name\"\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"shortCode\",\r\n \"label\": \"Donor Short Code\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 3,\r\n \"disabled\": true,\r\n \"defaultValue\": \"DLP-24-L1\",\r\n \"hint\": \"System-generated, unique internal code\"\r\n },\r\n {\r\n \"name\": \"donorType\",\r\n \"label\": \"Donor Type\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Individual\", \"code\": \"INDIVIDUAL\" },\r\n { \"label\": \"Corporate\", \"code\": \"CORPORATE\" },\r\n { \"label\": \"Trust\", \"code\": \"TRUST\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"regNumber\",\r\n \"label\": \"Registration / Legal Entity Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 3,\r\n \"placeholder\": \"Type\",\r\n \"hint\": \"CIN / Trust Reg. No / Govt ID (if applicable)\"\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"label\": \"Country of Incorporation\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"India\", \"code\": \"IN\" },\r\n { \"label\": \"USA\", \"code\": \"US\" },\r\n { \"label\": \"UK\", \"code\": \"UK\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"profilePicture\",\r\n \"label\": \"Profile Picture\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 3,\r\n \"attachmentConfig\": {\r\n \"multiple\": false,\r\n \"maxSizeMB\": 2,\r\n \"accept\": \"image/*\",\r\n \"acceptLabel\": \"JPG, PNG, SVG (max 2 MB)\"\r\n }\r\n },\r\n {\r\n \"name\": \"website\",\r\n \"label\": \"Organization Website (Optional)\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 9,\r\n \"placeholder\": \"Add your website link or LinkedIn profile\",\r\n \"hint\": \"Add your website link to automatically fetch your logo, powered by Clearbit.\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Primary Contact\",\r\n \"allowMulti\": true,\r\n \"name\": \"contacts\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"contactName\",\r\n \"label\": \"Full Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"colSpan\": 6,\r\n \"required\": true,\r\n \"placeholder\": \"Enter the name\"\r\n },\r\n {\r\n \"name\": \"designation\",\r\n \"label\": \"Designation/Title\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 6,\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"CEO\", \"code\": \"CEO\" },\r\n { \"label\": \"Manager\", \"code\": \"MANAGER\" },\r\n { \"label\": \"Other\", \"code\": \"OTHER\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"email\",\r\n \"label\": \"Email Address\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"placeholder\": \"Enter your email address\"\r\n },\r\n {\r\n \"name\": \"phone\",\r\n \"label\": \"Phone Number\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"placeholder\": \"+91 7007713990\"\r\n },\r\n {\r\n \"name\": \"communicationPreference\",\r\n \"label\": \"Communication Preference\",\r\n \"type\": \"RADIO\",\r\n \"subType\": \"SINGLE\",\r\n \"colSpan\": 4,\r\n \"required\": true,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Email\", \"code\": \"EMAIL\" },\r\n { \"label\": \"Phone Number\", \"code\": \"PHONE\" }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n\r\n // ──────────────────────────────────────────────────────────────────────────\r\n // User Registration Form — Basic Details / Primary Address / User Role\r\n // ──────────────────────────────────────────────────────────────────────────\r\n userBasicDetailsForm: `{\r\n \"entityType\": \"USER_REGISTRATION\",\r\n \"label\": \"User Registration\",\r\n \"description\": \"Fill in your details to create a new account\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Basic Details\",\r\n \"name\": \"basicDetails\",\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"firstName\",\r\n \"label\": \"First Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter first name\"\r\n },\r\n {\r\n \"name\": \"lastName\",\r\n \"label\": \"Last Name\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Enter last name\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"contactNo\",\r\n \"label\": \"Contact No\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PHONE\",\r\n \"required\": true,\r\n \"placeholder\": \"+91 9999999999\",\r\n \"hint\": \"Enter a valid 10-digit mobile number\"\r\n },\r\n {\r\n \"name\": \"emailId\",\r\n \"label\": \"Email ID\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"EMAIL\",\r\n \"required\": true,\r\n \"placeholder\": \"example@domain.com\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"loginId\",\r\n \"label\": \"Login / User ID\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"Choose a unique login ID\",\r\n \"hint\": \"Alphanumeric, no spaces\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 4, \"max\": 30 },\r\n \"pattern\": \"^[a-zA-Z0-9_]+$\",\r\n \"patternMessage\": \"Only letters, numbers and underscores are allowed\"\r\n }\r\n },\r\n {\r\n \"name\": \"password\",\r\n \"label\": \"Password\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PASSWORD\",\r\n \"required\": true,\r\n \"placeholder\": \"Min. 8 characters\",\r\n \"hint\": \"Use at least 8 characters with letters and numbers\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 8, \"max\": 64 }\r\n }\r\n },\r\n {\r\n \"name\": \"confirmPassword\",\r\n \"label\": \"Confirm Password\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"PASSWORD\",\r\n \"required\": true,\r\n \"placeholder\": \"Re-enter your password\",\r\n \"textConfig\": {\r\n \"matchField\": \"password\"\r\n }\r\n }\r\n ]\r\n }\r\n\r\n ]\r\n }\r\n },\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Primary Address\",\r\n \"name\": \"primaryAddress\",\r\n \"children\": [\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"addressLine1\",\r\n \"label\": \"Address Line 1\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"House / Flat No., Building, Street\"\r\n },\r\n {\r\n \"name\": \"addressLine2\",\r\n \"label\": \"Address Line 2\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"placeholder\": \"Area / Locality / Colony (optional)\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"country\",\r\n \"label\": \"Country\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Country\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"India\", \"code\": \"REGION_COUNTRY.INDIA\" },\r\n { \"label\": \"USA\", \"code\": \"REGION_COUNTRY.USA\" }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"state\",\r\n \"label\": \"State\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select State\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_STATE&parentRefClass=GREF.REGION_COUNTRY\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"country\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"label\": \"City\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select City\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_DISTRICT&parentRefClass=GREF.REGION_STATE\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"state\"\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"block\",\r\n \"label\": \"Block / Taluka\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"placeholder\": \"Select Block\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/globalrefdata/v1?refClass=GREF.REGION_BLOCK&parentRefClass=GREF.REGION_DISTRICT\",\r\n \"labelPath\": \"label\",\r\n \"valuePath\": \"dataCode\",\r\n \"dependencies\": {\r\n \"parentRefData\": \"city\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pinCode\",\r\n \"label\": \"PIN Code\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"6-digit PIN code\",\r\n \"textConfig\": {\r\n \"length\": { \"min\": 6, \"max\": 6 },\r\n \"pattern\": \"^[0-9]{6}$\",\r\n \"patternMessage\": \"Enter a valid 6-digit PIN code\"\r\n }\r\n }\r\n ]\r\n }\r\n\r\n ]\r\n }\r\n },\r\n\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"User Role\",\r\n \"name\": \"userRole\",\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"role\",\r\n \"label\": \"User Role\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select a role\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/gateway/commons-report-service/api/v1/datasets/name/VMS_GET_TENANT_ROLES/execute?params=TENANT_ID=1823\",\r\n \"labelPath\": \"roleName\",\r\n \"valuePath\": \"code\"\r\n }\r\n },\r\n {\r\n \"name\": \"reportingRole\",\r\n \"label\": \"Reporting Role\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Reporting Role\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/rolehierarchy/v1?criteria=roleCode.code='{{userRole}}' and isActive=1&includeAttributes=id,parentRoleCode\",\r\n \"dataPath\": \"payload\",\r\n \"labelPath\": \"parentRoleCode\",\r\n \"valuePath\": \"parentRoleCode\",\r\n \"dependencies\": {\r\n \"userRole\": \"role\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"reportingManager\",\r\n \"label\": \"Reporting Manager\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select Reporting Manager\",\r\n \"optionConfig\": {\r\n \"apiUrl\": \"https://dev.platformcommons.org/ctld/api/tenant/user/role/criteria/v1?criteria=role.code='{{reportingRole}}' and isActive=1 and user.isActive=1\",\r\n \"dataPath\": \"payload\",\r\n \"labelPath\": \"user.userName\",\r\n \"valuePath\": \"user.id\",\r\n \"dependencies\": {\r\n \"reportingRole\": \"reportingRole\"\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n\r\n ]\r\n }\r\n }`,\r\n\r\n // ──────────────────────────────────────────────────────────────────────────\r\n // Document Upload Form — demonstrates the FILE_UPLOAD field type\r\n // ──────────────────────────────────────────────────────────────────────────\r\n documentUploadForm: `{\r\n \"entityType\": \"DOCUMENT_UPLOAD\",\r\n \"label\": \"Documents\",\r\n \"description\": \"Upload the required documents\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Documents\",\r\n \"name\": \"documents\",\r\n \"children\": [\r\n {\r\n \"name\": \"profilePicture\",\r\n \"label\": \"Profile Picture\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"attachmentConfig\": {\r\n \"multiple\": false,\r\n \"maxSizeMB\": 5,\r\n \"accept\": \".jpg,.jpeg,.png,.webp,image/*\",\r\n \"acceptLabel\": \"JPG, PNG, WEBP\"\r\n }\r\n },\r\n {\r\n \"name\": \"certificates\",\r\n \"label\": \"Certificates\",\r\n \"type\": \"FILE_UPLOAD\",\r\n \"subType\": \"MULTIPLE\",\r\n \"attachmentConfig\": {\r\n \"multiple\": true,\r\n \"maxFiles\": 5,\r\n \"maxSizeMB\": 10,\r\n \"accept\": \".pdf,.doc,.docx,.jpg,.jpeg,.png\",\r\n \"acceptLabel\": \"PDF, DOCX, JPG, PNG\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // Demand Definition Form (matching user request image)\r\n demandDefinitionForm: `{\r\n \"entityType\": \"DEMAND\",\r\n \"label\": \"Demand Definition\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"beneficiaries\",\r\n \"label\": \"Required Beneficiaries\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"Students\",\r\n \"placeholder\": \"0\",\r\n \"numberConfig\": { \"min\": 0 }\r\n },\r\n {\r\n \"name\": \"deliveryModel\",\r\n \"label\": \"Preferred Delivery Model\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"placeholder\": \"Select\",\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n { \"label\": \"Onsite Delivery\", \"code\": \"ONSITE\" },\r\n { \"label\": \"Hybrid Model\", \"code\": \"HYBRID\" }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"minAge\",\r\n \"label\": \"Min Target Age\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"0\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"!maxAge || minAge <= maxAge\",\r\n \"errorMessage\": \"Min Age cannot be greater than Max Age\"\r\n },\r\n {\r\n \"name\": \"maxAge\",\r\n \"label\": \"Max Target Age\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"100\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"!minAge || maxAge >= minAge\",\r\n \"errorMessage\": \"Max Age cannot be less than Min Age\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"male\",\r\n \"label\": \"Male Split (%)\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"50\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"(male || 0) + (female || 0) === 100\",\r\n \"errorMessage\": \"Male + Female % must equal 100%\"\r\n },\r\n {\r\n \"name\": \"female\",\r\n \"label\": \"Female Split (%)\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"50\",\r\n \"numberConfig\": { \"min\": 0, \"max\": 100 },\r\n \"onValidate\": \"(male || 0) + (female || 0) === 100\",\r\n \"errorMessage\": \"Male + Female % must equal 100%\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n\r\n\r\n // Project Info Form (matching user request image)\r\n // Project Form (Combined Info + Demand)\r\n projectInfoForm: `{\r\n \"entityType\": \"PROJECT\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.TITLE\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.INFO\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"projectName\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.LABEL\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.NAME.PH\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"colSpan\": 6\r\n },\r\n {\r\n \"name\": \"programId\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.PROG_ID.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"DLP-24-L1\",\r\n \"readonly\": true,\r\n \"colSpan\": 6\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"linkedProgram\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_PROG.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"National Skills Initiative\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n },\r\n {\r\n \"name\": \"linkedContract\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.LINKED_CONTRACT.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"NSI-Gov-Oct23\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n },\r\n {\r\n \"name\": \"assignedDistrict\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.DISTRICT.LABEL\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"defaultValue\": \"Bangalore Rural\",\r\n \"readonly\": true,\r\n \"colSpan\": 4\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.SECTION.DEMAND\",\r\n \"children\": [\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"requiredBeneficiaries\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.LABEL\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.BENEFICIARIES.PH\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"colSpan\": 6,\r\n \"numberConfig\": {\r\n \"min\": 1\r\n }\r\n },\r\n {\r\n \"name\": \"deliveryModel\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.DELIVERY_MODEL.LABEL\",\r\n \"type\": \"DROPDOWN\",\r\n \"subType\": \"SINGLE\",\r\n \"required\": true,\r\n \"colSpan\": 6,\r\n \"optionConfig\": {\r\n \"optionList\": [\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.IN_PERSON\",\r\n \"code\": \"IN_PERSON\"\r\n },\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.HYBRID\",\r\n \"code\": \"HYBRID\"\r\n },\r\n {\r\n \"label\": \"UI_PLAYGROUND.OPTION.ONLINE\",\r\n \"code\": \"ONLINE\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"minAge\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"!maxAge || minAge <= maxAge\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MIN.ERR\"\r\n },\r\n {\r\n \"name\": \"maxAge\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"!minAge || maxAge >= minAge\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.AGE_MAX.ERR\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"ROW\",\r\n \"subType\": \"HORIZONTAL\",\r\n \"children\": [\r\n {\r\n \"name\": \"maleSplit\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.MALE.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"(maleSplit || 0) + (femaleSplit || 0) === 100\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR\"\r\n },\r\n {\r\n \"name\": \"femaleSplit\",\r\n \"label\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL\",\r\n \"type\": \"NUMBER_INPUT\",\r\n \"subType\": \"INTEGER\",\r\n \"required\": true,\r\n \"suffix\": \"%\",\r\n \"placeholder\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.FEMALE.LABEL\",\r\n \"numberConfig\": {\r\n \"min\": 0,\r\n \"max\": 100\r\n },\r\n \"onValidate\": \"(maleSplit || 0) + (femaleSplit || 0) === 100\",\r\n \"errorMessage\": \"UI_PLAYGROUND.SMART_FORM.PROJECT.GENDER_SPLIT.ERR\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}\r\n }`,\r\n\r\n faqForm: `{\r\n \"entityType\": \"FAQ\",\r\n \"label\": \"Frequently Asked Questions\",\r\n \"description\": \"Answer attendee questions.\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"type\": \"GROUP\",\r\n \"subType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"label\": \"Frequently Asked Questions\",\r\n \"allowMulti\": true,\r\n \"name\": \"faqs\",\r\n \"multiSaveConfig\": {\r\n \"active\": true,\r\n \"summaryField\": \"question\",\r\n \"descriptionField\": \"answer\",\r\n \"addLabel\": \"Add a Question\"\r\n },\r\n \"children\": [\r\n {\r\n \"name\": \"question\",\r\n \"label\": \"Question\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"SHORT\",\r\n \"required\": true,\r\n \"placeholder\": \"What is Lorem Ipsum?\"\r\n },\r\n {\r\n \"name\": \"answer\",\r\n \"label\": \"Answer\",\r\n \"type\": \"TEXT_INPUT\",\r\n \"subType\": \"LONG\",\r\n \"required\": true,\r\n \"placeholder\": \"Contrary to popular belief...\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n\r\n // ── Location field example ──────────────────────────────────────────────\r\n locationForm: `{\r\n \"entityType\": \"EVENT\",\r\n \"label\": \"Event Location\",\r\n \"formType\": \"SECTION\",\r\n \"sectionConfig\": {\r\n \"children\": [\r\n {\r\n \"name\": \"eventLocation\",\r\n \"label\": \"Location\",\r\n \"type\": \"LOCATION\",\r\n \"required\": true,\r\n \"hint\": \"Set where your event takes place\",\r\n \"locationConfig\": {\r\n \"defaultTab\": \"VENUE\",\r\n \"maxLocations\": 5,\r\n \"venuePlaceholder\": \"Search for a venue address...\",\r\n \"onlinePlaceholder\": \"https://zoom.us/j/meeting-id\",\r\n \"showMap\": true,\r\n \"mapHeight\": \"300px\",\r\n \"googleMapsApiKey\": \"YOUR_GOOGLE_MAPS_API_KEY\"\r\n }\r\n }\r\n ]\r\n }\r\n }`,\r\n};\r\n\r\n/**\r\n * i18n label keys used by the LOCATION field type.\r\n * Add these to your labels JSON file(s) for all supported languages.\r\n *\r\n * LBL_LOC_VENUE – Tab: \"Venue\"\r\n * LBL_LOC_ONLINE – Tab: \"Online Event\"\r\n * LBL_LOC_TBA – Tab: \"To be Announced\"\r\n * LBL_LOC_ADDRESS – Section heading inside Venue tab: \"Location address\"\r\n * LBL_LOC_COUNT_SUFFIX – e.g. \"Locations Added!\"\r\n * LBL_LOC_ADD_ANOTHER – \"Add another Location\" button label\r\n * LBL_LOC_MAP_HINT – hint below the embedded map\r\n * LBL_LOC_ONLINE_URL – Label above online URL input: \"Event URL\"\r\n * LBL_LOC_TBA_DESC – Message shown inside TBA tab\r\n * PH_LOC_VENUE – Placeholder for venue search input\r\n * PH_LOC_ONLINE – Placeholder for online URL input\r\n */\r\n\r\n\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { SnackbarComponent } from './components/snackbar.component';\n\n@NgModule({\n declarations: [SnackbarComponent],\n imports: [CommonModule, MatSnackBarModule],\n exports: [SnackbarComponent]\n})\nexport class SnackbarModule {}\n","/*\r\n * Public API Surface of commons-shared-web-ui\r\n */\r\n\r\nexport * from './lib/shared-ui.module';\r\nexport * from './lib/modules/material/material.module';\r\nexport * from './lib/utils/storage.utils';\r\nexport * from './lib/utils/string.utils';\r\nexport * from './lib/utils/translation.utils';\r\nexport * from './lib/modules/summary-card/summary-card.module';\r\nexport * from './lib/modules/summary-card/components/summary-card/summary-card.component';\r\nexport * from './lib/modules/configurable-form/configurable-form.module';\r\nexport * from './lib/modules/configurable-form/component/configurable-form.component';\r\n// Export Configurable Form resources namespaced to avoid collisions\r\nexport * from './lib/modules/configurable-form/configurable-form.model';\r\nexport * as ConfigurableFormExamples from './lib/modules/configurable-form/configurable-form.examples';\r\n\r\nexport * from './lib/modules/pagination/pagination.module';\r\nexport * from './lib/modules/pagination/components/pagination/pagination.component';\r\nexport * from './lib/modules/nav/nav.module';\r\nexport * from './lib/modules/nav/components/nav/nav.component';\r\nexport * from './lib/modules/nav/nav.models';\r\nexport * from './lib/modules/side-nav/side-nav.module';\r\nexport * from './lib/modules/side-nav/components/side-nav/side-nav.component';\r\nexport * from './lib/modules/side-nav/side-nav.models';\r\nexport * from './lib/utils/constants';\r\nexport * from './lib/modules/alert/alert.module';\r\nexport * from './lib/modules/alert/alert.models';\r\nexport * from './lib/modules/alert/components/alert/alert.component';\r\nexport * from './lib/modules/button/button.module';\r\nexport * from './lib/modules/button/button.models';\r\nexport * from './lib/modules/button/components/button/button.component';\r\nexport * from './lib/modules/button-dropdown/button-dropdown.module';\r\nexport * from './lib/modules/button-dropdown/button-dropdown.models';\r\nexport * from './lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component';\r\nexport * from './lib/modules/confirmation-modal/confirmation-modal.module';\r\nexport * from './lib/modules/confirmation-modal/confirmation-modal.models';\r\nexport * from './lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component';\r\nexport * from './lib/modules/filter-sidebar/filter-sidebar.module';\r\nexport * from './lib/modules/filter-sidebar/filter-sidebar.models';\r\nexport * from './lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component';\r\nexport * from './lib/modules/filter/filter.module';\r\nexport * from './lib/modules/filter/filter.models';\r\nexport * from './lib/modules/filter/components/filter/filter.component';\r\nexport * from './lib/modules/form-components/form-components.module';\r\nexport * from './lib/modules/form-components/components/input/input.component';\r\nexport * from './lib/modules/form-components/components/input/input.models';\r\nexport * from './lib/modules/form-components/components/dropdown/dropdown.component';\r\nexport * from './lib/modules/form-components/components/dropdown/dropdown.models';\r\nexport * from './lib/modules/form-components/components/checkbox/checkbox.component';\r\nexport * from './lib/modules/form-components/components/checkbox/checkbox.models';\r\nexport * from './lib/modules/form-components/components/radio/radio.component';\r\nexport * from './lib/modules/form-components/components/radio/radio.models';\r\nexport * from './lib/modules/form-components/components/toggle/toggle.component';\r\nexport * from './lib/modules/form-components/components/toggle/toggle.models';\r\nexport * from './lib/modules/form-components/components/datepicker/datepicker.component';\r\nexport * from './lib/modules/form-components/components/datepicker/datepicker.models';\r\nexport * from './lib/modules/form-components/components/search/search.component';\r\nexport * from './lib/modules/form-components/components/search/search.models';\r\nexport * from './lib/modules/smart-table/smart-table.module';\r\nexport * from './lib/modules/smart-table/components/smart-table/smart-table.component';\r\nexport * from './lib/modules/smart-table/models/table-config.model';\r\nexport * from './lib/modules/smart-table/utils/smart-table.utils';\r\nexport * from './lib/modules/smart-form/smart-form.module';\r\nexport * from './lib/modules/smart-form/components/smart-form/smart-form.component';\r\nexport {\r\n FormSchema,\r\n SubmitConfig,\r\n FieldConfig,\r\n SectionConfig,\r\n StepperConfig,\r\n TextConfig,\r\n NumberConfig,\r\n DateConfig,\r\n EmailConfig,\r\n PhoneConfig,\r\n GeneratedConfig,\r\n RangeConfig,\r\n AttachmentConfig,\r\n LocationConfig,\r\n RatingConfig,\r\n ValidationResult,\r\n LengthConstraint,\r\n OptionItem\r\n} from './lib/modules/smart-form/models/form-schema.model';\r\nexport * from './lib/modules/smart-form/services/expression.service';\r\nexport * from './lib/modules/smart-form/services/smart-form-controller.service';\r\nexport * from './lib/modules/smart-form/utils/validation.utils';\r\nexport * as SmartFormExamples from './lib/modules/smart-form/smart-form.examples';\r\n\r\nexport * from './lib/modules/snackbar/snackbar.module';\r\nexport * from './lib/modules/snackbar/components/snackbar.component';\r\nexport * from './lib/modules/snackbar/models/snackbar.models';\r\nexport * from './lib/modules/snackbar/services/snackbar.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3","i4.ButtonComponent","i5.ConfirmationModalComponent","i3.ClickOutsideDirective","i4.InputComponent","i5.DropdownComponent","i6.CheckboxComponent","i7.RadioComponent","i8.ToggleComponent","i9.DatepickerComponent","i10.SearchComponent","i11.ButtonComponent","i4","i9","i2.ExpressionService","i6","i7","i8","i10.ButtonComponent","i12.TrustedUrlPipe","i5.FormFieldComponent","i2.SmartFormController","i3.ExpressionService","i5.SnackbarService","i8.ButtonComponent","i9.FormSectionComponent","i5.InputComponent","i6.DropdownComponent","i7.CheckboxComponent","i8.RadioComponent","i9.ToggleComponent","i10.DatepickerComponent","i11.SearchComponent","i5.PaginationComponent","i6.ButtonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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