npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@acoustic-content-sdk/ng-web-component

v9.0.10076

Published

Module to attach inline-edit functionality to an WCH based Angular application.

Downloads

16

Readme

npm

Implementation of an Angular Component that can dynamically inject web components for layouts.

This allows you to add application components without having to recompile the application. Components can be registered with Acoustic Content using regular layout definitions and wchtools.

Table of Contents

Adding a WebComponents based Layout Component

In order to include an application component using web components you need to provide the following artifacts:

  • a content type
  • a layout
  • a layout mapping
  • a web component

Content Type, Layout and Layout Mapping

Follow the instructions for adding handlebars based layouts to Acoustic content. The result is a content type, a layout and a layout mapping.

Web Component

Create a JS file with your web component in CommonJS module format. The simplest form would be:

class MyComponent extends HTMLElement {
  constructor() {
    super();
  }

  connectedCallback() {
    this.innerHTML = `<div>Works!</div>`;
  }
}

module.exports = { MyComponent };

Make this file available on a web server, e.g. by pushing it to your tenant. Say the file is then available via https://my-server/my-component.js

Note: for a real-world application I recommend to use webpack to bundle your component.

Reference you Component from the Layout

In the first step you have created a layout descriptor file. Add the tags member and reference your component from a tag using the syntax bundle:{$URL}#{$COMPONENT}:

{
  "tags": ["bundle:https://my-server/my-component.js#MyComponent"]
}

This syntax allows you to package multiple layout components in one file.

Push your changed layout to your tenant.

Note: The URL may be absolute or relative. If absolute it can point to any server location. If relative it is resolved relative to the resource base URL for the tenant. This allows you to simply upload your scripts as unmanaged assets to your tenant.

Home > @acoustic-content-sdk/ng-web-component

ng-web-component package

Implementation of an Angular component that can dynamically inject web components for layouts

Classes

| Class | Description | | --- | --- | | AcNgWebComponentModule | |

Variables

| Variable | Description | | --- | --- | | VERSION | Version and build number of the package |

Home > @acoustic-content-sdk/ng-web-component > AcNgWebComponentModule

AcNgWebComponentModule class

Signature:

export declare class AcNgWebComponentModule 

Properties

| Property | Modifiers | Type | Description | | --- | --- | --- | --- | | VERSION | | WchSdkVersion | Exposes the version information of this module |

Home > @acoustic-content-sdk/ng-web-component > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/ng-web-component > AcNgWebComponentModule > VERSION

AcNgWebComponentModule.VERSION property

Exposes the version information of this module

Signature:

VERSION: WchSdkVersion;