Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adobe/aem-core-components-angular-base

Package Overview
Dependencies
Maintainers
18
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aem-core-components-angular-base

This module provides a Angular implementation for the [AEM core components](https://www.aemcomponents.dev/). This enables you to use the core components: -In the [AEM SPA editor](https://docs.adobe.com/content/help/en/experience-manager-64/developing/hea

  • 1.0.16
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
280
increased by12%
Maintainers
18
Weekly downloads
 
Created
Source

AEM WCM Components - Angular Core implementation

This module provides a Angular implementation for the AEM core components. This enables you to use the core components: -In the AEM SPA editor with Angular -Or in any other Angular context, provided you have the input needed to instantiate the components.

Current supported / exported components:

Page Authoring

  • Button (V1)
  • Download (V1)
  • Image (V2)
  • List (V2)
  • Separator (V1)
  • Teaser (V1)
  • Text (V2)
  • Title (V2)

Layout

  • BreadCrumb (V2)
  • Language Navigation (V1)
  • Navigation (V1)

Abstraction

  • AbstractCoreComponent
  • CoreComponentModel (interface)

Containers

For the containers (Accordion,Tabs,Carousel,Container) we do not provide any implementation in this project. It does not make sense to provide it for web-components as you can leverage the normal Core Components implementation such as a Tab Container, and drag your web components in there. Instead we provide them for the SPA editor only, introducing a dependency, and therefore we moved it into a separate project.

Usage

You can choose to import the entire library at once OR import components individually. The latter is useful if you want to only enable a few components and you want to save your javascript footprint. Also, if you want to load all core components, but you want to lazyload them with angular suspense, you will need to import them individually.

Importing the whole library:

import * as BaseCoreComponents from "@adobe/aem-core-components-angular-base";
const {ButtonV1, ButtonV1Model, ButtonV1IsEmptyFn} = BaseCoreComponents;

Importing the button component individually:

import ButtonV1, {ButtonV1Model, ButtonV1IsEmptyFn} from "@adobe/aem-core-components-angular-base/authoring/button/v1";

Using the imported code

Now that you have the Button and ButtonV1IsEmptyFn imported, you can use them in your project. The properties of the Button 1 on 1 correspond to the Sling Model Exporter (.model.json) output.

Note: There are some exceptions where some extra properties are added (mainly i18n labels) that are currently not present in the OOTB sling model exports. These can be added by the project itself with delegation. If they are not present, the default (English) values will be used.

Button - Example with the spa editor:
MapTo('my-project/wcm/components/button')(ButtonV1, {isEmpty: ButtonV1IsEmptyFn});

For a complete project with examples, visit the github page.

FAQs

Package last updated on 24 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc