Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@adobe/aem-core-components-react-base
Advanced tools
AEM - React Implementation for the AEM Core Components
This module provides a React implementation for the AEM core components. This enables you to use the core components: -In the AEM SPA editor with React -In React web components -Or in any other React context, provided you have the input needed to instantiate the components.
Current supported / exported components:
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.
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 react suspense, you will need to import them individually.
import * as BaseCoreComponents from "@adobe/aem-core-components-react-base";
const {ButtonV1, ButtonV1Model, ButtonV1IsEmptyFn} = BaseCoreComponents;
import {ButtonV1, ButtonV1Model, ButtonV1IsEmptyFn} from "@adobe/aem-core-components-react-base/dist/authoring/button/v1/ButtonV1";
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.
const modelProps:ButtonV1Model = {
text: 'Example Button',
link: '/content/my/awesome/page.html',
icon: 'iconCssCLass'
};
const html:JSX.Element = (<ButtonV1 {...modelProps}/>);
MapTo('my-project/wcm/components/button')(ButtonV1, {isEmpty: ButtonV1IsEmptyFn});
For a complete project with examples, visit the github page.
FAQs
AEM - React Implementation for the AEM Core Components
The npm package @adobe/aem-core-components-react-base receives a total of 2,473 weekly downloads. As such, @adobe/aem-core-components-react-base popularity was classified as popular.
We found that @adobe/aem-core-components-react-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 open source maintainers collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.