{"version":3,"file":"ngx-json-ui.mjs","sources":["../../../projects/ngx-json-ui/src/lib/components/overlay/modal/modal.component.ts","../../../projects/ngx-json-ui/src/lib/components/overlay/modal/modal.component.html","../../../projects/ngx-json-ui/src/lib/components/overlay/toast/toast.component.ts","../../../projects/ngx-json-ui/src/lib/components/overlay/toast/toast.component.html","../../../projects/ngx-json-ui/src/lib/core/services/ngx-overlay.service.ts","../../../projects/ngx-json-ui/src/lib/form-builder.module.ts","../../../projects/ngx-json-ui/src/lib/shared/components/type-not-found/type-not-found.component.ts","../../../projects/ngx-json-ui/src/lib/tokens/component-mapping-config.token.ts","../../../projects/ngx-json-ui/src/lib/tokens/component-mappings.token.ts","../../../projects/ngx-json-ui/src/lib/core/services/component-mapping.service.ts","../../../projects/ngx-json-ui/src/lib/core/services/component-factory.service.ts","../../../projects/ngx-json-ui/src/public-api.ts","../../../projects/ngx-json-ui/src/ngx-json-ui.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output, Renderer2, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { ComponentModel } from '../../../core/models/component.model';\r\n\r\n@Component({\r\n  selector: 'nju-modal',\r\n  templateUrl: './modal.component.html'\r\n})\r\nexport class ModalComponent implements OnInit {\r\n   /**\r\n   * Modal title that appears in the header.\r\n   */\r\n   @Input() title?: string;\r\n\r\n   /**\r\n    * Optional modal content. If not provided, content can be projected via ng-content.\r\n    */\r\n   @Input() content?: string;\r\n \r\n   /**\r\n    * Event emitted when the modal should be closed.\r\n    */\r\n   @Output() closeOverlay = new EventEmitter<void>();\r\n \r\n   constructor() {}\r\n \r\n   ngOnInit(): void {}\r\n \r\n   /**\r\n    * Called when the close button is clicked.\r\n    */\r\n   onClose(): void {\r\n     this.closeOverlay.emit();\r\n   }\r\n}  ","<!-- modal.component.html -->\r\n<div  role=\"dialog\" class=\"modal fade show\" tabindex=\"-1\" aria-hidden=\"true\" style=\"display: block;\">\r\n    <div class=\"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n              <h5 class=\"modal-title\">Modal title</h5>\r\n              <a type=\"button\" href=\"\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"onClose()\">\r\n                  <i class=\"ph ph-x color-subdued icon icon-sm icon-interactive\"></i>\r\n              </a>\r\n            </div>\r\n            <div class=\"modal-body\">\r\n              <h6>Default Modal: It closes automatically when clicked anywhere outside it or pressed escape key</h6>\r\n            </div>\r\n            <div class=\"modal-footer\">\r\n              <button type=\"button\" class=\"btn btn-plain\" data-bs-dismiss=\"modal\">Cancel</button>\r\n              <button type=\"button\" class=\"btn btn-primary\">Save changes</button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>","import { Component, HostBinding, Input, OnInit } from '@angular/core';\r\nimport { ComponentModel } from '../../../core/models/component.model';\r\n\r\n@Component({\r\n  selector: 'nju-toast',\r\n  templateUrl: './toast.component.html'\r\n})\r\nexport class ToastComponent implements OnInit{\r\n  @Input() config!: ComponentModel; // Accept this field's JSON schema as input\r\n\r\n  // Dynamic css styling control variabled \r\n  @HostBinding('class') hostClasses = ''; // Binding class to overall component\r\n  labelCssClassName: string='toast-container';\r\n  cssClassName: string='toast toast-custom';\r\n  cssStyle: any;\r\n\r\n  // Lifecycle method in angular called when the component is initialized\r\n  ngOnInit() {\r\n    // Set css styling variable from json schema\r\n    this.hostClasses = 'd-flex justify-content-center';\r\n    \r\n    this.labelCssClassName='toast-container';\r\n\r\n    this.cssClassName='toast toast-custom fade show';\r\n    this.cssStyle='';\r\n  }\r\n}\r\n","<div [class]=\"labelCssClassName\">\r\n    <div class=\"{{cssClassName}}\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\r\n        Hello\r\n    </div>\r\n</div>\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { ModalComponent } from '../../components/overlay/modal/modal.component';\r\nimport { OverlayData } from '../models/overlay-data.model';\r\nimport { ToastComponent } from '../../components/overlay/toast/toast.component';\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class NgxOverlayService {\r\n  constructor(private overlay: Overlay, private injector: Injector) {}\r\n\r\n  /**\r\n   * Opens a modal overlay.\r\n   * @param data Data to pass to the ModalComponent.\r\n   */\r\n  openModal(data?: OverlayData): OverlayRef {\r\n    const config = this.getDefaultConfig();\r\n    const overlayRef = this.overlay.create(config);\r\n\r\n    // Automatically close the modal when the backdrop is clicked.\r\n    overlayRef.backdropClick().subscribe(() => overlayRef.dispose());\r\n\r\n    const portal = new ComponentPortal(ModalComponent, null, this.createInjector(data));\r\n    overlayRef.attach(portal);\r\n    return overlayRef;\r\n  }\r\n\r\n  /**\r\n   * Opens a toast overlay.\r\n   * @param data Data to pass to the ToastComponent.\r\n   */\r\n  openToast(data?: OverlayData): OverlayRef {\r\n    const config = this.getDefaultConfig({\r\n      hasBackdrop: false,\r\n      panelClass: 'nju-toast-overlay',\r\n      positionStrategy: this.overlay\r\n        .position()\r\n        .global()\r\n        .bottom('20px')\r\n        .right('20px')\r\n    });\r\n    const overlayRef = this.overlay.create(config);\r\n    const portal = new ComponentPortal(ToastComponent, null, this.createInjector(data));\r\n    overlayRef.attach(portal);\r\n    return overlayRef;\r\n  }\r\n  /**\r\n   * Returns a default OverlayConfig object merged with any additional options.\r\n   */\r\n  private getDefaultConfig(options?: Partial<OverlayConfig>): OverlayConfig {\r\n    const defaultConfig = new OverlayConfig({\r\n      hasBackdrop: true,\r\n      backdropClass: 'cdk-overlay-dark-backdrop',\r\n      panelClass: 'nju-overlay-panel',\r\n      scrollStrategy: this.overlay.scrollStrategies.block(),\r\n      positionStrategy: this.overlay\r\n        .position()\r\n        .global()\r\n        .centerHorizontally()\r\n        .centerVertically()\r\n    });\r\n    return { ...defaultConfig, ...options };\r\n  }\r\n\r\n  /**\r\n   * Creates a simple injector to pass data into the overlay component.\r\n   * For more advanced data passing, you might create a custom InjectionToken and PortalInjector.\r\n   */\r\n  private createInjector(data?: OverlayData): Injector {\r\n    // In this minimal implementation we simply return the root injector.\r\n    // Extend this function if you need to pass custom tokens/data.\r\n    return this.injector;\r\n  }\r\n}","// File: src/lib/form-builder.module.ts\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\n// Import your ModalComponent\r\nimport { ModalComponent } from './components/overlay/modal/modal.component';\r\nimport { ToastComponent } from './components/overlay/toast/toast.component'; // Import your ToastComponent if needed\r\n\r\n// Import overlay service if you plan to provide it from this module\r\nimport { NgxOverlayService } from './core/services/ngx-overlay.service';\r\n\r\n@NgModule({\r\n    imports: [\r\n      CommonModule,\r\n      OverlayModule,\r\n      ModalComponent\r\n    ],\r\n    exports: [\r\n      ModalComponent\r\n    ],\r\n    providers: [\r\n      NgxOverlayService\r\n    ]\r\n  })\r\n  export class FormBuilderModule {}","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n  selector: 'nju-type-not-found',\r\n  template: `<div class=\"nju-error\">Component type not found.</div>`\r\n})\r\nexport class TypeNotFoundComponent {\r\n\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { ComponentMappingConfig } from '../core/models/component-mapping-config';\r\n\r\nexport const COMPONENT_MAPPING_CONFIG = new InjectionToken<ComponentMappingConfig>(\r\n  'COMPONENT_MAPPING_CONFIG',\r\n  {\r\n    providedIn: 'root',\r\n    factory: () => ({ useDefaultMappings: true })  // Defaults to using the built-in mappings.\r\n  }\r\n);","import { InjectionToken } from '@angular/core';\r\nimport { ComponentMappingModel } from '../core/models/component-mapping.model';\r\n\r\nexport const COMPONENT_MAPPINGS = new InjectionToken<ComponentMappingModel[]>(\r\n  'COMPONENT_MAPPINGS'\r\n);","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { ComponentMappingModel } from '../models/component-mapping.model';\r\nimport { TypeNotFoundComponent } from '../../shared/components/type-not-found/type-not-found.component';\r\n// ... import additional components as needed\r\nimport { ModalComponent } from '../../components/overlay/modal/modal.component';\r\nimport { COMPONENT_MAPPING_CONFIG } from '../../tokens/component-mapping-config.token';\r\nimport { COMPONENT_MAPPINGS } from '../../tokens/component-mappings.token';\r\nimport { ComponentMappingConfig } from '../models/component-mapping-config';\r\n\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class ComponentMappingService {\r\n  private mappings: { [key: string]: ComponentMappingModel } = {};\r\n\r\n  constructor(\r\n    @Optional() @Inject(COMPONENT_MAPPING_CONFIG) config: ComponentMappingConfig,\r\n    @Optional() @Inject(COMPONENT_MAPPINGS) customMappings?: ComponentMappingModel[]\r\n  ) {\r\n    // Check configuration flag to decide whether to load default mappings.\r\n    if (config?.useDefaultMappings ?? true) {\r\n      this.mappings = {\r\n        'modal': { schema: 'overlay', alias: 'modal', component: ModalComponent }\r\n      };\r\n    }\r\n    // Merge custom mappings (if any) into the mappings object.\r\n    if (customMappings) {\r\n      customMappings.forEach(mapping => {\r\n        this.mappings[mapping.alias] = mapping;\r\n      });\r\n    }\r\n  }\r\n\r\n  public getMapping(type: string): ComponentMappingModel {\r\n    return this.mappings[type] || {\r\n      schema: 'atom',\r\n      alias: 'unknown',\r\n      component: TypeNotFoundComponent\r\n    };\r\n  }\r\n}","import { Injectable, ComponentRef, ViewContainerRef } from '@angular/core';\r\nimport { FormGroup, FormArray } from '@angular/forms';\r\nimport { ComponentMappingService } from './component-mapping.service';\r\nimport { ComponentModel } from '../models/component.model';\r\nimport { TypeNotFoundComponent } from '../../shared/components/type-not-found/type-not-found.component';\r\nimport { NgxOverlayService } from './ngx-overlay.service';\r\nimport { OverlayData } from '../models/overlay-data.model';\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class ComponentFactoryService {\r\n  constructor(private mappingService: ComponentMappingService,private overlayService: NgxOverlayService) {}\r\n\r\n  /**\r\n   * Loads one or more components based on the provided configuration.\r\n   * @param config A single ComponentModel or an array of ComponentModel objects.\r\n   * @param container The container (ViewContainerRef) where components should be added.\r\n   * @param form (Optional) The parent FormGroup/FormArray for form components.\r\n   * @param validationSchema (Optional) Validation configuration used for form controls.\r\n   */\r\n  loadComponents(\r\n    config: ComponentModel | ComponentModel[],\r\n    container: ViewContainerRef,\r\n    form?: FormGroup | FormArray,\r\n    validationSchema?: any\r\n  ): void {\r\n    if (Array.isArray(config)) {\r\n      config.forEach(c => this.loadSingleComponent(c, container, form, validationSchema));\r\n    } else {\r\n      this.loadSingleComponent(config, container, form, validationSchema);\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Loads a single component based on its configuration.\r\n   * For 'formGroup' types, it recursively loads child components into the corresponding sub-form.\r\n   * @param componentConfig The configuration for the component.\r\n   * @param container The ViewContainerRef to create the component in.\r\n   * @param form (Optional) The parent FormGroup/FormArray.\r\n   * @param validationSchema (Optional) Validation configuration for form controls.\r\n   */\r\n  private loadSingleComponent(\r\n    componentConfig: ComponentModel,\r\n    container: ViewContainerRef,\r\n    form?: FormGroup | FormArray,\r\n    validationSchema?: any\r\n  ): void {\r\n    // Handle overlay types separately.\r\n    // If the component type is 'modal', 'toast', 'alert', or 'offcanvas', use the overlay service.\r\n    if (['modal', 'toast', 'alert', 'offcanvas'].includes(componentConfig.type)) {\r\n      const overlayData: OverlayData = {\r\n        config: componentConfig,\r\n        form: form,\r\n        validationSchema: validationSchema\r\n      };\r\n\r\n      switch (componentConfig.type) {\r\n        case 'modal':\r\n          this.overlayService.openModal(overlayData);\r\n          break;\r\n        case 'toast':\r\n          this.overlayService.openToast(overlayData);\r\n            break;\r\n        default:\r\n          console.error(`Unsupported overlay type: ${componentConfig.type}`);\r\n          break;\r\n      }\r\n      return;\r\n    }\r\n    // If the component type is 'formGroup' and a form is provided, ensure a valid name exists.\r\n    if (componentConfig.type === 'formGroup' && form) {\r\n      if (!componentConfig?.name) {\r\n        console.error(\r\n          `FormGroup configuration error: 'name' property is missing. Received config: ${JSON.stringify(componentConfig)}`\r\n        );\r\n        return;\r\n      }\r\n      const childForm = form.get(componentConfig.name);\r\n      if (!childForm) {\r\n        console.error(`FormGroup not found for component name: ${componentConfig.name}`);\r\n        return;\r\n      }\r\n      if (!(childForm instanceof FormGroup)) {\r\n        console.error(`Expected a FormGroup for '${componentConfig.name}', but received a different control type.`);\r\n        return;\r\n      }\r\n      // If there are child components, load them into the retrieved form group.\r\n      if (Array.isArray(componentConfig?.components) && componentConfig.components.length > 0) {\r\n        this.loadComponents(componentConfig.components, container, childForm, validationSchema);\r\n      }\r\n      return;\r\n    }\r\n  \r\n    // Determine which component to load using safe navigation.\r\n    const mapping = this.mappingService.getMapping(componentConfig?.type ?? '');\r\n    const componentToLoad = mapping?.component || TypeNotFoundComponent;\r\n  \r\n    const componentRef: ComponentRef<any> = container.createComponent(componentToLoad);\r\n    componentRef.instance.config = componentConfig;\r\n  \r\n    if (form) {\r\n      componentRef.instance.form = form;\r\n    }\r\n  \r\n    // Attach validationSchema for specific component types if provided.\r\n    if (\r\n      form &&\r\n      ['formArray', 'formArraySelect', 'formArrayCheckbox', 'collapse'].includes(componentConfig?.type ?? '')\r\n    ) {\r\n      const schemaKey = componentConfig?.name;\r\n      componentRef.instance.validationSchema = componentConfig.type === 'collapse'\r\n        ? validationSchema\r\n        : this.findValidationSchema(validationSchema, schemaKey ?? '');\r\n    }\r\n  \r\n    // Recursively load nested child components, if any.\r\n    if (Array.isArray(componentConfig?.components) && componentConfig.components.length > 0) {\r\n      const nestedContainer: ViewContainerRef = componentRef.instance.viewContainerRef || container;\r\n      this.loadComponents(componentConfig.components, nestedContainer, form, validationSchema);\r\n    }\r\n  }\r\n  \r\n  /**\r\n   * Recursively searches a validation schema for a specific key.\r\n   * @param schema The validation schema object.\r\n   * @param key The key to search for.\r\n   * @returns The matching schema section or null if not found.\r\n   */\r\n  private findValidationSchema(schema: any, key: string): any | null {\r\n    if (!schema) return null;\r\n    for (const k in schema) {\r\n      if (k === 'default') continue;\r\n      if (k === key) return schema[k];\r\n      if (typeof schema[k] === 'object' && schema[k] !== null) {\r\n        const result = this.findValidationSchema(schema[k], key);\r\n        if (result) return result;\r\n      }\r\n    }\r\n    return null;\r\n  }\r\n}","/*\r\n * Public API Surface of ngx-json-ui\r\n */\r\n\r\n// public-api.ts\r\nexport * from './lib/form-builder.module';\r\nexport * from './lib/core/services/ngx-overlay.service';\r\nexport * from './lib/components/overlay/modal/modal.component';\r\nexport * from './lib/core/services/component-factory.service';\r\nexport * from './lib/core/models/component.model';\r\n\r\n/* Exporting the component mapping service and related models\r\n    * This allows users to customize the component mappings used in the library.\r\n    * The ComponentMappingService is responsible for managing these mappings.\r\n    * The ComponentMappingModel defines the structure of a mapping, including the schema, alias, and component.\r\n    * The ComponentMappingConfig interface allows users to configure whether to use default mappings or not.\r\n    * The COMPONENT_MAPPING_CONFIG and COMPONENT_MAPPINGS tokens are used for dependency injection,\r\n        providers: [\r\n            // Disable default mappings.\r\n            {\r\n            provide: COMPONENT_MAPPING_CONFIG,\r\n            useValue: { useDefaultMappings: false }\r\n            },\r\n            // Provide custom mapping for the \"label\" component.\r\n            {\r\n            provide: COMPONENT_MAPPINGS,\r\n            useValue: <ComponentMappingModel>{\r\n                schema: 'atom',\r\n                alias: 'label',\r\n                component: LabelComponent\r\n            },\r\n            multi: true\r\n            },\r\n            // Provide custom mapping for the \"field\" component.\r\n            {\r\n            provide: COMPONENT_MAPPINGS,\r\n            useValue: <ComponentMappingModel>{\r\n                schema: 'atom',\r\n                alias: 'field',\r\n                component: FieldComponent\r\n            },\r\n            multi: true\r\n            }\r\n        ],\r\n\r\n    */\r\n\r\nexport * from './lib/core/services/component-mapping.service';\r\nexport * from './lib/core/models/component-mapping.model';\r\nexport * from './lib/core/models/component-mapping-config';\r\nexport * from './lib/tokens/component-mapping-config.token';\r\nexport * from './lib/tokens/component-mappings.token';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ComponentMappingService","i2.NgxOverlayService"],"mappings":";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