{"version":3,"file":"adobe-aem-angular-editable-components.mjs","sources":["../../../src/lib/layout/component-mapping.ts","../../../src/lib/layout/constants.ts","../../../src/lib/layout/utils.ts","../../../src/lib/layout/aem-component.directive.ts","../../../src/lib/layout/aem-model-provider/aem-model-provider.component.ts","../../../src/lib/layout/aem-container/aem-container.component.ts","../../../src/lib/layout/aem-container/aem-container.component.html","../../../src/lib/layout/aem-allowed-components-container/aem-allowed-components-container.component.ts","../../../src/lib/layout/aem-allowed-components-container/aem-allowed-components-container.component.html","../../../src/lib/layout/aem-responsivegrid/aem-responsivegrid.component.ts","../../../src/lib/layout/aem-responsivegrid/aem-responsivegrid.component.html","../../../src/lib/layout/aem-page/aem-page.component.ts","../../../src/lib/layout/aem-remote/aem-remote.component.ts","../../../src/lib/layout/aem-remote/aem-remote.component.html","../../../src/lib/aem-angular-editable-components.module.ts","../../../src/lib/routing/AemPageDataResolver.ts","../../../src/lib/routing/AemPageRouteReuseStrategy.ts","../../../src/public_api.ts","../../../src/adobe-aem-angular-editable-components.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ComponentMapping as SPAComponentMapping } from '@adobe/aem-spa-component-mapping';\nimport { Directive, Input, Type } from '@angular/core';\n\n/**\n * Indicated whether force reload is turned on, forcing the model to be refetched on every MapTo instantiation.\n */\nexport interface ReloadForceAble {\n  cqForceReload?: boolean;\n}\n\n/**\n* MappedComponentProperties\n* Properties given to every component runtime by the SPA editor.\n*/\nexport interface MappedComponentProperties extends ReloadForceAble {\n    /**\n     * Path to the model associated with the current instance of the component\n     */\n  cqPath: string;\n\n    /**\n     * Angular item name\n     */\n  itemName: string;\n}\n\n/**\n * EditConfiguration for a MappedComponent\n * @type <P> Type  of the MappedComponent, used in isEmpty\n */\nexport interface EditConfig<P extends MappedComponentProperties = any> {\n  /**\n  * Label to display if the component is considered empty in author mode\n  */\n  emptyLabel?: string;\n\n  /**\n  * Return whether the component should be considered 'empty'.\n  * If empty, the component will not be rendered. In author mode, the empty label will be displayed.\n  * @param props\n    @type <P> Type of the MappedComponent\n  */\n  isEmpty(props: P): boolean;\n}\n\n/**\n * Provides standard implementation for the MappedComponentProperties using @Input\n */\n@Directive()\nexport abstract class AbstractMappedComponentDirective implements MappedComponentProperties {\n  @Input() isInEditor = false;\n  @Input() cqPath = '';\n  @Input() itemName = '';\n}\n\n/**\n * The current class extends the @adobe/cq-spa-component-mapping#Mapto library and features with Angular specifics such as\n *\n * - Storing the editing configurations for each resource type\n */\nexport class ComponentMappingWithConfig {\n  /**\n   * Store of EditConfig structures\n   */\n  private editConfigMap : { [key: string]: EditConfig<MappedComponentProperties>; } = {};\n\n  constructor(private spaMapping: SPAComponentMapping) {}\n\n  /**\n   * Stores a component class for the given resource types and also allows to provide an EditConfig object\n   * @param resourceTypes - List of resource types\n   * @param clazz - Component class to be stored\n   * @param [editConfig] - Edit configuration to be stored for the given resource types\n   * @type Model - The Model interface / class type bound to the editconfig object.\n   */\n  map<Model extends MappedComponentProperties = any>(resourceTypes: string | string[], clazz:Type<Model>, editConfig:EditConfig<Model> = null) : void {\n      const innerClass = clazz;\n\n      const resourceList = (typeof resourceTypes === 'string') ? [ resourceTypes ] : resourceTypes;\n\n      resourceList.forEach((entry) => {\n        if (editConfig) {\n            this.editConfigMap[entry] = editConfig;\n        }\n        this.spaMapping.map(entry, innerClass);\n      });\n\n    }\n\n    /**\n     * Stores a  component class for the given resource types and also allows to provide an EditConfig object in a Lazy Manner\n     * @param resourceTypes - List of resource types\n     * @param lazyClassFunction - A function that returns a promise to give back the designated type / class\n     * @param [editConfig] - Edit configuration to be stored for the given resource types\n     * @type Model - The Model interface / class type bound to the editconfig object.\n     */\n    lazyMap<Model extends MappedComponentProperties = any>(resourceTypes, lazyClassFunction: () => Promise<Type<Model>>, editConfig:EditConfig<Model> = null) {\n        const innerFunction = lazyClassFunction;\n\n        if (editConfig) {\n            this.editConfigMap[resourceTypes] = editConfig;\n        }\n        this.spaMapping.lazyMap(resourceTypes, innerFunction);\n    }\n\n  /**\n   * Returns the component class for the given resourceType\n   * @param resourceType - Resource type for which the component class has been stored\n   * @type Model - The Model interface / class type bound to the editconfig object.\n   */\n  get<Model extends MappedComponentProperties = any>(resourceType:string):Type<Model> {\n    return this.spaMapping.get(resourceType) as Type<Model>;\n  }\n\n  /**\n     * Returns the component class Promise for the given resourceType\n     * @param resourceType - Resource type for which the component class has been stored\n     * @type Model - The Model interface / class type bound to the editconfig object.\n     */\n    lazyGet<Model extends MappedComponentProperties = any>(resourceType: string): Promise<Type<Model>> {\n        return this.spaMapping.getLazy(resourceType) as Promise<Type<Model>>;\n    }\n\n  /**\n   * Returns the EditConfig structure for the given type\n   * @param resourceType - Resource type for which the configuration has been stored\n   * @type Model - The Model interface / class type bound to the editconfig object.\n   */\n  getEditConfig<Model extends MappedComponentProperties = any>(resourceType:string):EditConfig<Model> {\n    return this.editConfigMap[resourceType];\n  }\n}\n\nconst componentMapping = new ComponentMappingWithConfig(SPAComponentMapping);\n\n/**\n * Stores a component class for the given resource types and also allows to provide an EditConfig object\n * @param resourceTypes - List of resource types\n * @type Model - The Model interface / class type that will be Mapped. Bound to the EditConfig configuration.\n */\nfunction MapTo<Model extends MappedComponentProperties = any>(resourceTypes: string | string[]) {\n  /**\n   * @param clazz - Component class to be stored\n   * @param [editConfig] - Edit configuration to be stored for the given resource types\n   */\n   return (clazz:Type<Model>, editConfig:EditConfig<Model> = null): void =>\n     componentMapping.map(resourceTypes, clazz, editConfig);\n}\n\n/**\n * Stores a clazz the lazy way for dynamic imports / code splitting.function that returns a promise\n * @param resourceTypes - List of resource types\n * @type Model - The Model interface / class type that will be Mapped. Bound to the EditConfig configuration.\n */\nfunction LazyMapTo<Model extends MappedComponentProperties = any>(resourceTypes: string | string[]) {\n    /**\n     * @param lazyClassPromise - Function that returns a promise resolving a class\n     * @param [editConfig] - Edit configuration to be stored for the given resource types\n     */\n    return (lazyClassFunction: () => Promise<Type<Model>>, editConfig: EditConfig<Model> = null): void =>\n        componentMapping.lazyMap(resourceTypes, lazyClassFunction, editConfig);\n}\n\nexport { componentMapping as ComponentMapping, MapTo, LazyMapTo };\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Constants as PMConstants } from '@adobe/aem-spa-page-model-manager';\n\nexport const Constants = {\n\n    /**\n     * Class names associated with a new section component\n     *\n     */\n    NEW_SECTION_CLASS_NAMES: 'new section',\n\n    /**\n     *  CSS Class names applied to a component.\n     */\n    APPLIED_CLASS_NAMES: 'appliedCssClassNames',\n\n    TYPE_PROP: PMConstants.TYPE_PROP,\n\n    /**\n     * List of child items of an item\n     *\n     */\n    ITEMS_PROP: PMConstants.ITEMS_PROP,\n\n    /**\n     * Order in which the items should be listed\n     *\n     */\n    ITEMS_ORDER_PROP: PMConstants.ITEMS_ORDER_PROP,\n\n    /**\n     * Path of the item\n     *\n     */\n    PATH_PROP: PMConstants.PATH_PROP,\n\n    /**\n     * Children of an item\n     *\n     */\n    CHILDREN_PROP: PMConstants.CHILDREN_PROP,\n\n    /**\n     * Path of the resource in the model\n     *\n     */\n    DATA_PATH_PROP: ':dataPath',\n\n    /**\n     * Hierarchical type of the item\n     */\n    HIERARCHY_TYPE_PROP: PMConstants.HIERARCHY_TYPE_PROP,\n\n    /**\n     * Event which indicates that content of remote component has been fetched and loaded in the app\n     */\n     ASYNC_CONTENT_LOADED_EVENT: 'cq-async-content-loaded'\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Selector that identifies the node that contains the WCM mode state.\n * @private\n */\nconst WCM_MODE_META_SELECTOR = 'meta[property=\"cq:wcmmode\"]';\n\n/**\n * The editor is in one of the edition modes.\n * @private\n */\nconst EDIT_MODE = 'edit';\n\n/**\n * The editor is in preview mode.\n * @private\n */\nconst PREVIEW_MODE = 'preview';\n\n/**\n * Returns if we are in the browser context or not by checking for the\n * existence of the window object.\n * @private\n */\nfunction isBrowser() {\n    try {\n        return typeof window !== 'undefined';\n    } catch (e) {\n        return false;\n    }\n}\n\n/**\n * Returns the current WCM mode\n *\n * <p>Note that the value isn't, as of the date of this writing, updated by the editor</p>\n * @private\n */\nfunction getWCMMode() {\n    if (isBrowser()) {\n      const wcmModeMeta: HTMLMetaElement = document.head.querySelector(WCM_MODE_META_SELECTOR);\n\n      return wcmModeMeta && wcmModeMeta.content;\n    }\n}\n\n/**\n * Helper functions for interacting with the AEM environment.\n */\nexport const Utils = {\n    /**\n     * Is the app used in the context of the AEM Page editor.\n     */\n    isInEditor(): boolean {\n        const wcmMode = getWCMMode();\n\n        return wcmMode && (EDIT_MODE === wcmMode || PREVIEW_MODE === wcmMode);\n    },\n\n    /**\n     * Determines the cqPath of a component given its props\n     *\n     * @private\n     * @returns cqPath of the component\n     */\n     getCQPath(pagePath: string, itemPath?: string): string {\n        let path = (itemPath ? `${pagePath}/jcr:content/${itemPath}` : pagePath);\n\n        path = path.replace(/\\/+/g, '/');\n\n        return path;\n    }\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Compiler,\n  ComponentFactory,\n  ComponentFactoryResolver,\n  ComponentRef,\n  Directive,\n  Injector,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Renderer2,\n  Type,\n  ViewContainerRef\n} from '@angular/core';\n\nimport { ComponentMapping, MappedComponentProperties } from './component-mapping';\nimport { Constants } from './constants';\nimport { Utils } from './utils';\n\n/**\n * @private\n */\nconst PLACEHOLDER_CLASS_NAME = 'cq-placeholder';\n\n@Directive({\n  selector: '[aemComponent]'\n})\n/**\n * The current directive provides advanced capabilities among which are\n *\n * - The management of the component placeholder in the Page Editor\n * - The dynamic instantiation of components based on a component definition\n * - The conversion from model fields to properties and injection in the component instance\n * - The management of HTMLElement attributes and class names on the native element\n */\nexport class AEMComponentDirective implements AfterViewInit, OnInit, OnDestroy, OnChanges {\n\n  /**\n   * Dynamically created component\n   */\n  private _component: ComponentRef<MappedComponentProperties>;\n  /**\n   * Model item that corresponds to the current component\n   */\n  private _cqItem: any;\n\n  get cqItem(): any {\n    return this._cqItem;\n  }\n\n  @Input()\n  set cqItem(value: any) {\n    this._cqItem = value;\n  }\n\n  get changeDetectorRef(): ChangeDetectorRef {\n    return this._changeDetectorRef;\n  }\n\n  /**\n   * Path to the model structure associated with the current component\n   */\n  @Input() cqPath: string;\n\n  /**\n   * Name of the current instance of the component\n   */\n  @Input() itemName: string;\n\n  /**\n   * HtmlElement attributes for the current instance of the component\n   */\n  @Input() itemAttrs: any;\n\n  @Input() loaded: boolean;\n\n  @Input() aemComponent;\n\n  constructor(\n    private renderer: Renderer2,\n    private viewContainer: ViewContainerRef,\n    private compiler: Compiler,\n    private injector: Injector,\n    private factoryResolver: ComponentFactoryResolver,\n    private _changeDetectorRef: ChangeDetectorRef) {\n  }\n\n  async ngOnInit() {\n\n    if (this.type) {\n     const mappedFn:Type<MappedComponentProperties> = ComponentMapping.get<MappedComponentProperties>(this.type);\n \n     if (mappedFn) {\n      this.renderComponent(mappedFn);\n     } else {\n      await this.initializeAsync();\n     }\n    } else {\n     console.warn('no type on ' + this.cqPath);\n    }\n \n   }\n\n  async initializeAsync() {\n   const lazyMappedPromise: Promise<Type<MappedComponentProperties>> = ComponentMapping.lazyGet<MappedComponentProperties>(this.type);\n\n   try {\n     const LazyResolvedComponent = await lazyMappedPromise;\n\n     this.renderComponent(LazyResolvedComponent);\n     this.loaded = true;\n     this._changeDetectorRef.detectChanges();\n   } catch (err) {\n     console.warn(err);\n   }\n  }\n\n  ngOnChanges(): void {\n    this.updateComponentData();\n  }\n\n  /**\n   * Returns the type of the cqItem if exists.\n   */\n  get type(): string | undefined {\n    return this.cqItem && this.cqItem[Constants.TYPE_PROP];\n  }\n\n  /**\n   * Renders a component dynamically based on the component definition\n   *\n   * @param componentDefinition The component definition to render\n   */\n  private renderComponent(componentDefinition: Type<MappedComponentProperties>) {\n    if (componentDefinition) {\n      const factory = this.factoryResolver.resolveComponentFactory(componentDefinition);\n\n      this.renderWithFactory(factory);\n    } else {\n      throw new Error('No component definition!!');\n    }\n  }\n\n  private renderWithFactory(factory: ComponentFactory<any>) {\n    this.viewContainer.clear();\n    this._component = this.viewContainer.createComponent(factory);\n    this.updateComponentData();\n  }\n\n  /**\n   * Updates the data of the component based the data of the directive\n   */\n  private updateComponentData() {\n    if (!this._component || !this._component.instance || !this.cqItem) {\n      return;\n    }\n\n    const keys = Object.getOwnPropertyNames(this.cqItem);\n\n    keys.forEach((key) => {\n      let propKey = key;\n\n      if (propKey.startsWith(':')) {\n        // Transformation of internal properties namespaced with [:] to [cq]\n        // :myProperty => cqMyProperty\n        const tempKey = propKey.substr(1);\n\n        propKey = 'cq' + tempKey.substr(0, 1).toUpperCase() + tempKey.substr(1);\n      }\n\n      this._component.instance[propKey] = this.cqItem[key];\n    });\n\n    this._component.instance.cqPath = this.cqPath;\n    this._component.instance.itemName = this.itemName || (this.cqItem && this.cqItem.id);\n    this.includeAppliedCSSClasses();\n\n    const editConfig = ComponentMapping.getEditConfig(this.type);\n\n    if (editConfig && Utils.isInEditor) {\n      this.setupPlaceholder(editConfig);\n    }\n\n    this._changeDetectorRef.detectChanges();\n  }\n\n  /**\n   * Adds the applied css class names in to the element\n   */\n  private includeAppliedCSSClasses() {\n    const appliedCssClassNames = this.cqItem[Constants.APPLIED_CLASS_NAMES] || '';\n\n    if (appliedCssClassNames && this._component) {\n      this.renderer.setAttribute(this._component.location.nativeElement, 'class', appliedCssClassNames);\n    }\n  }\n\n  /**\n   * Adds the specified item attributes to the element\n   */\n  private setupItemAttrs() {\n    if (this.itemAttrs) {\n      const keys = Object.getOwnPropertyNames(this.itemAttrs);\n\n      keys.forEach((key) => {\n        if (key === 'class') {\n          const classes = this.itemAttrs[key].split(' ');\n\n          classes.forEach((itemClass) => {\n            this.renderer.addClass(this._component.location.nativeElement, itemClass);\n          });\n        } else {\n          this.renderer.setAttribute(this._component.location.nativeElement, key, this.itemAttrs[key]);\n        }\n      });\n    }\n  }\n\n  /**\n   * Determines if the placeholder should e displayed.\n   *\n   * @param editConfig - the edit config of the directive\n   */\n  private usePlaceholder(editConfig) {\n    return editConfig.isEmpty && typeof editConfig.isEmpty === 'function' && editConfig.isEmpty(this.cqItem);\n  }\n\n  /**\n   * Setups the placeholder of needed for the AEM editor\n   *\n   * @param editConfig - the editConfig, which will dictate the classes to be added on.\n   */\n  private setupPlaceholder(editConfig) {\n    if (this.usePlaceholder(editConfig)) {\n      this.renderer.addClass(this._component.location.nativeElement, PLACEHOLDER_CLASS_NAME);\n      this.renderer.setAttribute(this._component.location.nativeElement, 'data-emptytext', editConfig.emptyLabel);\n    } else {\n      this.renderer.removeClass(this._component.location.nativeElement, PLACEHOLDER_CLASS_NAME);\n      this.renderer.removeAttribute(this._component.location.nativeElement, 'data-emptytext');\n    }\n  }\n\n  ngAfterViewInit(): void {\n    this.setupItemAttrs();\n  }\n\n  ngOnDestroy(): void {\n    if (this._component) {\n      this._component.destroy();\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component, Input, Output, ViewChild, EventEmitter } from '@angular/core';\nimport { ModelManager, PathUtils } from '@adobe/aem-spa-page-model-manager';\nimport { AEMComponentDirective } from '../aem-component.directive';\nimport { Constants } from '../constants';\nimport { Utils } from '../utils';\n\n@Component({\n  selector: 'aem-model-provider,[aemModelProvider]',\n  template: `<ng-container *ngIf=\"cqItemLoaded | async\" aemComponent [cqItem]='cqItem' [cqPath]='cqPath' [itemName]='itemName'></ng-container>`\n})\n/**\n * The current component is responsible for providing access to the ModelManager and the model of a component\n */\nexport class AEMModelProviderComponent {\n  /**\n   * Path to the model associated with the current instance of the component\n   */\n  @Input() cqPath;\n  /**\n   * Model item associated with the current model provider component\n   */\n  @Input() cqItem;\n  /**\n   * Name of the item associated with the current model provider component\n   */\n  @Input() itemName;\n\n  @Input() aemModelProvider;\n\n  @Input() pagePath;\n\n  @Input() itemPath;\n\n  @Output() updateDataPath = new EventEmitter();\n\n  cqItemLoaded: Promise<boolean>;\n\n  @ViewChild(AEMComponentDirective) aemComponent: AEMComponentDirective;\n\n  constructor() { /* void */ }\n\n  /**\n   * Updates the item data\n   */\n  updateItem(): void {\n    ModelManager.getData({ path: this.cqPath }).then(model => {\n      this.cqItemLoaded = Promise.resolve(true);\n      this.cqItem = model;\n      if (this.pagePath && Utils.isInEditor()) {\n        PathUtils.dispatchGlobalCustomEvent(Constants.ASYNC_CONTENT_LOADED_EVENT, {});\n      }\n      if (this.aemComponent) {\n        this.aemComponent.changeDetectorRef.markForCheck();\n      }\n    });\n  }\n\n  async ngOnInit(): Promise<void> {\n    await ModelManager.initialize();\n    if (!this.cqItem && this.pagePath) {\n      this.cqPath = Utils.getCQPath(this.pagePath, this.itemPath);\n      this.updateDataPath.emit({ cqPath: this.cqPath });\n      this.updateItem();\n    } else {\n      this.cqItemLoaded = Promise.resolve(true);\n    }\n    ModelManager.addListener(this.cqPath, this.updateItem.bind(this));\n  }\n\n  ngDestroy(): void {\n    ModelManager.removeListener(this.cqPath, this.updateItem.bind(this));\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component, Input } from '@angular/core';\nimport { Constants } from '../constants';\nimport { Utils } from '../utils';\nimport { AbstractMappedComponentDirective, ComponentMapping, MappedComponentProperties } from '../component-mapping';\nimport { Model } from \"@adobe/aem-spa-page-model-manager\";\n\n/**\n * @private\n */\nconst PLACEHOLDER_CLASS_NAMES = Constants.NEW_SECTION_CLASS_NAMES;\n\n/**\n * @private\n */\nconst PLACEHOLDER_ITEM_NAME = '*';\n\n/**\n * @private\n */\nconst CONTAINER_CLASS_NAMES = 'aem-container';\n\n/**\n * Properties corresponding to the AEMContainerComponent\n */\nexport interface AEMContainerComponentProperties extends MappedComponentProperties {\n  componentMapping?: typeof ComponentMapping;\n  /**\n   * Map of model items included in the current container\n   */\n  cqItems: { [key: string]: Model };\n  /**\n   * Array of model item keys\n   */\n  cqItemsOrder: string[];\n  /**\n   * Class names of the current component\n   */\n  classNames: string;\n}\n\n@Component({\n  selector: 'aem-container',\n  host: {\n      '[class]': 'hostClasses',\n      '[attr.data-cq-data-path]': 'cqPath'\n  },\n  templateUrl: './aem-container.component.html'\n})\n/**\n * The current component provides the base presentational logic common to containers such as a grid or a page.\n * Container have in common the notion of item holders. Items are represented in the model by the fields _:items_ and _:itemsOrder_\n */\nexport class AEMContainerComponent extends AbstractMappedComponentDirective implements AEMContainerComponentProperties{\n\n  @Input() cqItems;\n\n  @Input() cqItemsOrder;\n\n  @Input() classNames;\n  /**\n   * Key of the model structure\n   */\n  @Input() modelName = '';\n\n  /**\n   * Returns weather of not we are in the editor\n   */\n  get isInEditMode(): boolean {\n    return Utils.isInEditor();\n  }\n\n  /**\n   * Returns the aggregated path of this container path and the provided path\n   *\n   * @param path - the provided path to aggregate with the container path\n   */\n  getDataPath(path: string): string {\n    return this.cqPath ? this.cqPath + '/' + path : path;\n  }\n\n  /**\n   * Returns the item data from the cqModel\n   *\n   * @param itemKey - the itemKey to look for in the items.\n   */\n  getItem(itemKey: string): Model {\n    return this.cqItems && this.cqItems[itemKey];\n  }\n\n  /**\n   * Returns the class names of the container based on the data from the cqModel\n   */\n  getHostClassNames(): string {\n    return CONTAINER_CLASS_NAMES;\n  }\n\n  get hostClasses(): string {\n    return this.getHostClassNames();\n  }\n\n  /**\n   * Returns the placeholder classes\n   */\n  getPlaceholderClassNames(): string {\n    return PLACEHOLDER_CLASS_NAMES;\n  }\n\n  /**\n   * Returns the placeholder path\n   */\n  get placeholderPath(): string {\n    return this.cqPath && this.cqPath + '/' + PLACEHOLDER_ITEM_NAME;\n  }\n}\n","<ng-container *ngFor=\"let itemKey of cqItemsOrder\">\n  <aem-model-provider [cqItem]=\"getItem(itemKey)\"\n                      [cqPath]=\"getDataPath(itemKey)\"\n                      [itemName]=\"itemKey\"></aem-model-provider>\n</ng-container>\n<div *ngIf=\"isInEditMode\"\n     [attr.data-cq-data-path]=\"placeholderPath\"\n     [class]=\"getPlaceholderClassNames()\"></div>\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component, Input } from '@angular/core';\nimport { AEMContainerComponent, AEMContainerComponentProperties } from '../aem-container/aem-container.component';\n\n/**\n * @private\n */\nexport const ALLOWED_PLACEHOLDER_CLASS_NAMES = 'aem-AllowedComponent--list';\n\n/**\n * @private\n */\nexport const ALLOWED_COMPONENT_TITLE_CLASS_NAMES = 'aem-AllowedComponent--title';\n\n/**\n * @private\n */\nexport const ALLOWED_COMPONENT_PLACEHOLDER_CLASS_NAMES = 'aem-AllowedComponent--component cq-placeholder placeholder';\n\n/**\n * Component that is allowed to be used on the page by the editor\n */\nexport interface AllowedComponent {\n  /**\n   * Path to the component under apps\n   */\n  path: string;\n\n  /**\n   * Title of the component\n   */\n  title: string;\n}\n\n/**\n * AllowedComponents collection\n */\nexport interface AllowedComponents {\n  applicable: boolean;\n\n  /**\n   * List of allowed components\n   */\n  components: AllowedComponent[];\n}\n\n/**\n * Properties for the allowed components container\n */\nexport interface AEMAllowedComponentsContainerComponentProperties extends AEMContainerComponentProperties {\n  /**\n   * List of allowed components for the container\n   */\n  allowedComponents: AllowedComponents;\n\n  /**\n   *  Label to display when there are no allowed components\n   */\n  _allowedComponentPlaceholderListEmptyLabel?: string;\n\n  /**\n   * Title of the placeholder list\n   */\n  title: string;\n}\n\n@Component({\n  selector: 'aem-allowed-components-container',\n  templateUrl: './aem-allowed-components-container.component.html',\n  styleUrls: [ './aem-allowed-components-container.component.css' ]\n})\nexport class AEMAllowedComponentsContainerComponent extends AEMContainerComponent implements AEMAllowedComponentsContainerComponentProperties{\n\n  @Input() title: string;\n\n  @Input() emptyLabel = 'No allowed components';\n\n  @Input() allowedComponents: {\n    applicable: boolean,\n    components\n  };\n\n  isAllowedComponentsApplicable(): boolean {\n    return this.isInEditMode && this.allowedComponents && this.allowedComponents.applicable;\n  }\n\n  getAllowedComponentListPlaceholderClassNames(): string {\n    return super.getPlaceholderClassNames() + ' ' + ALLOWED_PLACEHOLDER_CLASS_NAMES;\n  }\n\n  getAllowedComponentListLabel(): string {\n    const hasComponents = this.allowedComponents && this.allowedComponents.components && this.allowedComponents.components.length > 0;\n\n    return hasComponents ? this.title : this.emptyLabel;\n  }\n\n  getAllowedComponents(): AllowedComponent[] {\n    return this.allowedComponents && this.allowedComponents.components || [];\n  }\n\n  get allowedComponentListTitleClassNames(): string {\n    return ALLOWED_COMPONENT_TITLE_CLASS_NAMES;\n  }\n\n  get allowedComponentClassNames(): string {\n    return ALLOWED_COMPONENT_PLACEHOLDER_CLASS_NAMES;\n  }\n}\n","<div [class]=\"getAllowedComponentListPlaceholderClassNames()\">\n  <div [attr.data-text]=\"getAllowedComponentListLabel()\" [class]=\"allowedComponentListTitleClassNames\"></div>\n  <ng-container *ngFor=\"let allowedComponent of getAllowedComponents()\">\n    <div [attr.data-cq-data-path]=\"allowedComponent.path\"\n         [attr.data-emptytext]=\"allowedComponent.title\"\n         [class]=\"allowedComponentClassNames\"></div>\n  </ng-container>\n</div>\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component, Input } from '@angular/core';\nimport { Constants } from '../constants';\nimport {\n  AEMAllowedComponentsContainerComponent,\n  AEMAllowedComponentsContainerComponentProperties\n} from '../aem-allowed-components-container/aem-allowed-components-container.component';\n\n/**\n * @private\n */\nconst PLACEHOLDER_CLASS_NAMES = 'aem-Grid-newComponent';\n\n/**\n * @private\n */\nconst RESPONSIVE_GRID_TYPE = 'wcm/foundation/components/responsivegrid';\n\n/**\n * Properties corresponding to the AEMResponsiveGridComponent.\n * The AEMResponsiveGridComponent carries the base presentational logic of the AEM Layout Container.\n */\nexport interface AEMResponsiveGridComponentProperties extends AEMAllowedComponentsContainerComponentProperties {\n  /**\n   * Class names associated with the current responsive grid\n   */\n  gridClassNames: string;\n  /**\n   * Map of class names corresponding to each child of the current responsive grid\n   */\n  columnClassNames: { [key: string]: string };\n\n  /**\n   * Current number of columns of the grid\n   */\n  columnCount: number;\n}\n\n\n@Component({\n  selector: 'aem-responsivegrid',\n  host: {\n      '[class]': 'hostClasses',\n      '[attr.data-cq-data-path]': 'cqPath'\n  },\n  templateUrl: './aem-responsivegrid.component.html'\n})\n/**\n * The current class carries the base presentational logic of the AEM Layout Container (aka. Responsive grid)\n */\nexport class AEMResponsiveGridComponent extends AEMAllowedComponentsContainerComponent implements AEMResponsiveGridComponentProperties {\n\n  @Input() gridClassNames;\n  @Input() columnClassNames;\n  @Input() classNames;\n  @Input() columnCount;\n\n  /**\n   * Returns the column class names for a given column\n   * @param itemKey - The key of the column item\n   */\n  getColumnClassNames(itemKey: string): string {\n    return this.columnClassNames && this.columnClassNames[itemKey];\n  }\n\n  /**\n   * Returns the placeholder classes\n   */\n  getPlaceholderClassNames(): string {\n    return super.getPlaceholderClassNames() + ' ' + PLACEHOLDER_CLASS_NAMES;\n  }\n\n  /**\n   * Returns the class names of the responsive grid based on the data from the cqModel\n   */\n  getHostClassNames(): string {\n    let classNames = super.getHostClassNames();\n\n    if (this.classNames) {\n        classNames += ' ' + (this.classNames || '');\n    }\n\n    return classNames + ' ' + this.gridClassNames;\n  }\n\n  /**\n   * Returns the aggregated path of this container path and the provided path\n   *\n   * @param path - the provided path to aggregate with the container path\n   */\n  getAttrDataPath(path: string): string | null {\n    const item = this.getItem(path);\n\n    if (item && item[Constants.TYPE_PROP] === RESPONSIVE_GRID_TYPE) {\n      // We don't want to add the path for the wrapper for a reponsivegrid\n      // The reponsivegrid adds the path on it's own\n      return null;\n    }\n\n    return this.getDataPath(path);\n  }\n}\n","<ng-container *ngIf=\"isAllowedComponentsApplicable(); else container\">\n  <div [class]=\"getAllowedComponentListPlaceholderClassNames()\">\n    <div [attr.data-text]=\"getAllowedComponentListLabel()\" [class]=\"allowedComponentListTitleClassNames\"></div>\n    <ng-container *ngFor=\"let allowedComponent of getAllowedComponents()\">\n      <div [attr.data-cq-data-path]=\"allowedComponent.path\"\n           [attr.data-emptytext]=\"allowedComponent.title\"\n           [class]=\"allowedComponentClassNames\"></div>\n    </ng-container>\n  </div>\n</ng-container>\n<ng-template #container>\n  <ng-container *ngFor=\"let itemKey of cqItemsOrder\">\n    <div [aemModelProvider]\n         [cqItem]=\"getItem(itemKey)\"\n         [cqPath]=\"getDataPath(itemKey)\"\n         [itemName]=\"itemKey\"\n         [class]=\"getColumnClassNames(itemKey)\"\n         [attr.data-cq-data-path]=\"getAttrDataPath(itemKey)\"></div>\n  </ng-container>\n  <div *ngIf=\"isInEditMode\"\n       [attr.data-cq-data-path]=\"placeholderPath\"\n       [class]=\"getPlaceholderClassNames()\"></div>\n</ng-template>\n\n\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component } from '@angular/core';\nimport { AEMContainerComponent } from '../aem-container/aem-container.component';\n\n/**\n * @private\n */\nconst PAGE_MODEL_SEPARATOR = '/jcr:content/';\n\n@Component({\n  selector: 'aem-page',\n  host: {\n      '[class]': 'hostClasses',\n      '[attr.data-cq-data-path]': 'cqPath'\n  },\n  templateUrl: '../aem-container/aem-container.component.html'\n})\n/**\n * The current component carries the base presentational logic of page component\n */\nexport class AEMPageComponent extends AEMContainerComponent {\n  /**\n   * Returns the aggregated path of this container path and the provided path\n   *\n   * @param path - the provided path to aggregate with the container path\n   */\n  getDataPath(path: string): string {\n    return this.cqPath ? this.cqPath + PAGE_MODEL_SEPARATOR + path : path;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Component, Input } from '@angular/core';\n\n@Component({\n  selector: 'aem-remote-component',\n  templateUrl: './aem-remote.component.html'\n})\n\nexport class AEMRemoteComponent {\n  @Input()\n    pagePath;\n  @Input()\n    itemPath;\n  @Input()\n    cqPath;\n\n  constructor() { /* void */ }\n\n  setDataPath(e): void {\n    this.cqPath = e.cqPath;\n  }\n}\n","<aem-model-provider\n[pagePath]=\"pagePath\"\n[itemPath]=\"itemPath\"\n(updateDataPath)=\"setDataPath($event)\"\n[attr.data-cq-data-path]=\"cqPath\"></aem-model-provider>\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { NgModule } from '@angular/core';\nimport { AEMComponentDirective } from './layout/aem-component.directive';\nimport { AEMModelProviderComponent } from './layout/aem-model-provider/aem-model-provider.component';\nimport { AEMContainerComponent } from './layout/aem-container/aem-container.component';\nimport { AEMPageComponent } from './layout/aem-page/aem-page.component';\nimport { AEMResponsiveGridComponent } from './layout/aem-responsivegrid/aem-responsivegrid.component';\nimport { CommonModule } from '@angular/common';\nimport { AEMAllowedComponentsContainerComponent } from './layout/aem-allowed-components-container/aem-allowed-components-container.component';\nimport { AEMRemoteComponent } from './layout/aem-remote/aem-remote.component';\n\n@NgModule({\n    imports: [\n        CommonModule\n    ],\n    declarations: [\n        AEMContainerComponent,\n        AEMAllowedComponentsContainerComponent,\n        AEMResponsiveGridComponent,\n        AEMComponentDirective,\n        AEMModelProviderComponent,\n        AEMPageComponent,\n        AEMRemoteComponent\n    ],\n    exports: [\n        AEMContainerComponent,\n        AEMAllowedComponentsContainerComponent,\n        AEMResponsiveGridComponent,\n        AEMComponentDirective,\n        AEMModelProviderComponent,\n        AEMPageComponent,\n        AEMRemoteComponent\n    ]\n})\nexport class SpaAngularEditableComponentsModule {}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class AemPageDataResolver implements Resolve < string > {\n  constructor() { /* empty */ }\n\n  /**\n   * Returns the absolute resource path without extension.\n   * @example\n   * // returns: '/content/aa/bb' for route.url [ 'content', 'aa', 'bb.html' ]\n   * resolve(route)\n   * @param route - route\n   * @returns absolute resource path without extension\n   */\n  resolve(route: ActivatedRouteSnapshot): string {\n    return '/' + route.url.join('/').replace(/\\.[^/.]+$/, '');\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ActivatedRouteSnapshot, RouteReuseStrategy, DetachedRouteHandle } from '@angular/router';\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * Implements RouteReuseStrategy to customize route reuse.\n */\nexport class AemPageRouteReuseStrategy implements RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later. */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Not storing deteached route. */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void { /* void */ }\n\n  /** Determines if this route (and its subtree) should be reattached. */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Retrieves the previously stored route. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n    return null;\n  }\n\n  /** Determines if a route should be reused */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/*\n * Public API Surface of aem-angular-editable-components\n */\nexport * from './lib/layout/aem-component.directive';\nexport * from './lib/layout/aem-container/aem-container.component';\nexport * from './lib/layout/aem-responsivegrid/aem-responsivegrid.component';\nexport * from './lib/layout/aem-allowed-components-container/aem-allowed-components-container.component';\nexport * from './lib/layout/aem-model-provider/aem-model-provider.component';\nexport * from './lib/layout/aem-page/aem-page.component';\nexport * from './lib/layout/component-mapping';\nexport * from './lib/layout/constants';\nexport * from './lib/layout/utils';\nexport * from './lib/aem-angular-editable-components.module';\nexport * from './lib/routing/AemPageDataResolver';\nexport * from './lib/routing/AemPageRouteReuseStrategy';\nexport * from './lib/layout/aem-remote/aem-remote.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["SPAComponentMapping","PMConstants","ComponentMapping","i1","i2.AEMComponentDirective","PLACEHOLDER_CLASS_NAMES","i1.AEMModelProviderComponent"],"mappings":";;;;;;;AAAA;;;;;;;;;;AAUG;AA+CH;;AAEG;MAEmB,gCAAgC,CAAA;AADtD,IAAA,WAAA,GAAA;QAEW,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QACnB,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;QACZ,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;AACxB,KAAA;;6HAJqB,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CA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