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

@netcentric/eddys-form

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netcentric/eddys-form

Form Block enhacement for Edge Delivery Services

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Eddys Form

Form Block enhacement for Edge Delivery Services

Installation

Having a forked project from https://github.com/adobe/aem-boilerplate

You can use by just

npm i @netcentric/eddys-form

it will install the scripts at the root of your Edge delivery project under libs/eddys-form

Usage

in your /blocks folder create a new block with a css and a js file

JS file: There Are 2 ways you can use this plugin

Option 1

Use eddys-form block as it is with no possibility to extend the js

You need to import the defaultDecorate function from libs/eddys-form. And export the async function decorate to get your code executed when the block is in place.

import defaultDecorate from '/libs/eddys-form/eddys-form.js';

export default async function decorate(block) {
    // Custom decoration can be done here
  await defaultDecorate(block);
}
Option 2

Use a custom block developed using a js class extending the js class

You need to import the defaultDecorate method and EddysForm class from the libs/eddys-form folder. And export the async function decorate to get your code executed when the block is in place. If you are extending the class you need to pass the extended class as a param in the defaultDecorate function

import { defaultDecorate, EddysForm } from '/libs/eddys-form/eddys-form.js';

class BlockName extends EddysForm {
  constructor(block) {
    super(block);
  }
    // Code here
}

export default async function decorate(block) {
  // Custom decoration can be done here
  await defaultDecorate(block, BlockName); // Note that you need to pass the extended class to the defaultDeaorate
}

CSS file:

You need to import the CSS file from the libs/eddys-form block you want to use. And then you can add as much extra CSS you want.

@import "/libs/eddys-form/eddys-form.css";

/* you can add custom css here */ 

Release

Commit message Convention

<type>(<scope>): <short summary>
│       │             │
│       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
│       │
│       └─⫸ Commit Scope (optional): project|based|list
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test

FAQs

Package last updated on 29 Feb 2024

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