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-edit-api

v9.0.10076

Published

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

Downloads

84

Readme

npm

Collection of APIs and constants for the Angular SDK in edit mode.

Table of Contents

General Concepts

This module defines Dependency Injection tokens for all relevant services. An application would typically select an appropriate ngModule to provide an implementation of the tokens. The tokens are typically consumed by directives or components of the SDK, but they may also be consumed by custom components or services, directly.

Home > @acoustic-content-sdk/ng-edit-api

ng-edit-api package

Collection of APIs and constants for the Angular SDK in edit mode

Functions

| Function | Description | | --- | --- | | selectDebugPlaceholder(aConfig) | | | selectDefaultPlaceholder(aConfig) | | | selectInlineEditURL(aConfig) | | | selectPlaceholderTag(aConfig) | | | selectThrottleLoading(aConfig) | |

Interfaces

| Interface | Description | | --- | --- | | EditHubInfoService | | | WchEditableDirectiveInput | Input to the editable directive service | | WchEditableDirectiveOutput | Input of the editable directive service | | WchEditablePlaceholderDirectiveInput | Input to the editable directive service | | WchEditablePlaceholderDirectiveOutput | Input of the editable directive service | | WchPlaceholder | | | WchPlaceholderProvider | | | WchSelectableDirectiveInput | Input to the editable directive service | | WchSelectableDirectiveOutput | Output of the editable directive service | | WchSelectableDirectiveService | Service that returns an instance of the selectable directive |

Variables

| Variable | Description | | --- | --- | | ACOUSTIC_TOKEN_ACOUSTIC_CONFIG | Injection token for the wch config | | ACOUSTIC_TOKEN_DEBUG_PLACEHOLDERS | Injection token for placeholder debugging | | ACOUSTIC_TOKEN_DEFAULT_PLACEHOLDER_TEXT | Injection token for default placeholder text | | ACOUSTIC_TOKEN_EDIT_HOST_WINDOW | Injects the window that acts as the edit host for an application. This is typically the parent window or the opener window. | | ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER | Injection token for the inline edit provider | | ACOUSTIC_TOKEN_INLINE_EDIT_SELECTED_CELL_CONSUMER | Consumer for inline edit selections | | ACOUSTIC_TOKEN_INLINE_EDIT_SELECTION_PROVIDER | Provides information about the inline edit selection | | ACOUSTIC_TOKEN_INLINE_EDIT_SERVICE | Token used to inject the WchInlineEditServiceV2 service. | | ACOUSTIC_TOKEN_INLINE_EDIT_URL | Injection token for the inline edit URL | | ACOUSTIC_TOKEN_PLACEHOLDER_PROVIDER | | | DEFAULT_DEBUG_PLACEHOLDERS | per default do not debug | | DEFAULT_INLINE_EDIT_URL | default value for the inline edit URL | | VERSION | Version and build number of the package |

Type Aliases

| Type Alias | Description | | --- | --- | | WchDefaultPlaceholder | type for placeholder | | WchEditableFormat | Potential values for the 'wchFormat' field |

Home > @acoustic-content-sdk/ng-edit-api > selectDebugPlaceholder

selectDebugPlaceholder() function

Signature:

export declare function selectDebugPlaceholder(aConfig?: EditHubInfoService): boolean;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aConfig | EditHubInfoService | |

Returns:

boolean

Home > @acoustic-content-sdk/ng-edit-api > selectDefaultPlaceholder

selectDefaultPlaceholder() function

Signature:

export declare function selectDefaultPlaceholder(aConfig?: EditHubInfoService): WchDefaultPlaceholder;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aConfig | EditHubInfoService | |

Returns:

WchDefaultPlaceholder

Home > @acoustic-content-sdk/ng-edit-api > selectInlineEditURL

selectInlineEditURL() function

Signature:

export declare function selectInlineEditURL(aConfig?: EditHubInfoService): HubInfoUrlProvider;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aConfig | EditHubInfoService | |

Returns:

HubInfoUrlProvider

Home > @acoustic-content-sdk/ng-edit-api > selectPlaceholderTag

selectPlaceholderTag() function

Signature:

export declare function selectPlaceholderTag(aConfig?: EditHubInfoService): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aConfig | EditHubInfoService | |

Returns:

string

Home > @acoustic-content-sdk/ng-edit-api > selectThrottleLoading

selectThrottleLoading() function

Signature:

export declare function selectThrottleLoading(aConfig?: EditHubInfoService): number;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aConfig | EditHubInfoService | |

Returns:

number

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService

EditHubInfoService interface

Signature:

export interface EditHubInfoService 

Properties

| Property | Type | Description | | --- | --- | --- | | debugPlaceholders | boolean | Enable or disable placeholders even if inline edit mode has not been enabled | | defaultPlaceholderText | WchDefaultPlaceholder | Provide a default placeholder text | | inlineEditUrl | HubInfoUrlProvider | | | placeholderTag | string | Tag used to find placeholder content items. If left undefined, placeholders will not be inserted, automatically | | throttleLoading | number | Throttle loading of lib |

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveInput

WchEditableDirectiveInput interface

Input to the editable directive service

Signature:

export interface WchEditableDirectiveInput 

Properties

| Property | Type | Description | | --- | --- | --- | | wchEditable$ | Observable<AccessorType> | Main input value for the directive. It denotes the element that is being edited. |

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput

WchEditableDirectiveOutput interface

Input of the editable directive service

Signature:

export interface WchEditableDirectiveOutput 

Properties

| Property | Type | Description | | --- | --- | --- | | accessor$ | Observable<string> | The accessor expression | | data$ | Observable<any> | Generates the accessed data, decoded from the accessor expression | | placeholder$ | Observable<AuthoringPlaceholder> | Event exposing the current placeholder. If no placeholder exists or placeholders are disabled, this will return undefined. | | placeholderText$ | Observable<LocalizedText> | Event exposing the current placeholder text. If placeholders are disabled, this will return. If no placeholder has been defined this returns the default placeholder as specified by the application | | showPlaceholder$ | Observable<boolean> | Checks if we should show or hide placeholders | | typeId$ | Observable<string> | Generates the type of the current element | | wchEditable$ | Observable<WchEditableEvent> | Event that tells about the inline edit process |

Home > @acoustic-content-sdk/ng-edit-api > WchEditablePlaceholderDirectiveInput

WchEditablePlaceholderDirectiveInput interface

Input to the editable directive service

Signature:

export interface WchEditablePlaceholderDirectiveInput extends WchEditableDirectiveInput 

Properties

| Property | Type | Description | | --- | --- | --- | | wchFormat$ | Observable<WchEditableFormat> | If specified, the directive will update the textual content of the attached node with either the value of the edited property or with the configured placeholder, if there is any. The format flag describes if the value is considered to be plain text ('text'), formatted text ('html') or if the type is to be discovered automatically.If missing, the property has to be updated by the designer of the template, explicitly. |

Home > @acoustic-content-sdk/ng-edit-api > WchEditablePlaceholderDirectiveOutput

WchEditablePlaceholderDirectiveOutput interface

Input of the editable directive service

Signature:

export interface WchEditablePlaceholderDirectiveOutput extends WchEditableDirectiveOutput, WchPlaceholder 

Properties

| Property | Type | Description | | --- | --- | --- | | formattedText$ | Observable<LocalizedText> | Generates the formatted text of an element, potentially replaced by the placeholder | | plainText$ | Observable<LocalizedText> | Generates the text of an element, potentially replaced by the placeholder |

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder

WchPlaceholder interface

Signature:

export interface WchPlaceholder 

Properties

| Property | Type | Description | | --- | --- | --- | | accessor$ | Observable<string> | The accessor expression | | data$ | Observable<any> | Generates the accessed data, decoded from the accessor expression | | formattedText$ | Observable<LocalizedText> | Generates the formatted text of an element, potentially replaced by the placeholder | | placeholder$ | Observable<AuthoringPlaceholder> | Event exposing the current placeholder. If no placeholder exists or placeholders are disabled, this will return 'undefined'. | | placeholderText$ | Observable<LocalizedText> | Event exposing the current placeholder text. If placeholders are disabled, this will return 'undefined'. If no placeholder has been defined this returns the default placeholder as specified by the application, else 'undefined'. | | plainText$ | Observable<LocalizedText> | Generates the text of an element, potentially replaced by the placeholder | | showPlaceholder$ | Observable<boolean> | Checks if we should show or hide placeholders | | typeId$ | Observable<string> | Decodes the type of the currently accessed element |

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholderProvider

WchPlaceholderProvider interface

Signature:

export interface WchPlaceholderProvider 

Properties

| Property | Type | Description | | --- | --- | --- | | getPlaceholder | (aAccessor: AccessorType, aProvider: RenderingContextProviderV2) => WchPlaceholder | |

Home > @acoustic-content-sdk/ng-edit-api > WchSelectableDirectiveInput

WchSelectableDirectiveInput interface

Input to the editable directive service

Signature:

export interface WchSelectableDirectiveInput 

Properties

| Property | Type | Description | | --- | --- | --- | | wchSelectable$ | Observable<AccessorType> | Main input value for the directive. It denotes the element that can be selected. |

Home > @acoustic-content-sdk/ng-edit-api > WchSelectableDirectiveOutput

WchSelectableDirectiveOutput interface

Output of the editable directive service

Signature:

export interface WchSelectableDirectiveOutput 

Home > @acoustic-content-sdk/ng-edit-api > WchSelectableDirectiveService

WchSelectableDirectiveService interface

Service that returns an instance of the selectable directive

Signature:

export interface WchSelectableDirectiveService 

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_ACOUSTIC_CONFIG

ACOUSTIC_TOKEN_ACOUSTIC_CONFIG variable

Injection token for the wch config

Signature:

ACOUSTIC_TOKEN_ACOUSTIC_CONFIG: InjectionToken<Observable<WchConfig>>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_DEBUG_PLACEHOLDERS

ACOUSTIC_TOKEN_DEBUG_PLACEHOLDERS variable

Injection token for placeholder debugging

Signature:

ACOUSTIC_TOKEN_DEBUG_PLACEHOLDERS: InjectionToken<boolean>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_DEFAULT_PLACEHOLDER_TEXT

ACOUSTIC_TOKEN_DEFAULT_PLACEHOLDER_TEXT variable

Injection token for default placeholder text

Signature:

ACOUSTIC_TOKEN_DEFAULT_PLACEHOLDER_TEXT: InjectionToken<import("@acoustic-content-sdk/utils").ObservableOrT<string | import("@acoustic-content-sdk/api").LocalizedText>>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_EDIT_HOST_WINDOW

ACOUSTIC_TOKEN_EDIT_HOST_WINDOW variable

Injects the window that acts as the edit host for an application. This is typically the parent window or the opener window.

Signature:

ACOUSTIC_TOKEN_EDIT_HOST_WINDOW: InjectionToken<WindowType>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER

ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER variable

Injection token for the inline edit provider

Signature:

ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER: InjectionToken<Observable<WchInlineEditProviderV2>>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_INLINE_EDIT_SELECTED_CELL_CONSUMER

ACOUSTIC_TOKEN_INLINE_EDIT_SELECTED_CELL_CONSUMER variable

Consumer for inline edit selections

Signature:

ACOUSTIC_TOKEN_INLINE_EDIT_SELECTED_CELL_CONSUMER: InjectionToken<string>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_INLINE_EDIT_SELECTION_PROVIDER

ACOUSTIC_TOKEN_INLINE_EDIT_SELECTION_PROVIDER variable

Provides information about the inline edit selection

Signature:

ACOUSTIC_TOKEN_INLINE_EDIT_SELECTION_PROVIDER: InjectionToken<InlineEditSelectionProvider>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_INLINE_EDIT_SERVICE

ACOUSTIC_TOKEN_INLINE_EDIT_SERVICE variable

Token used to inject the WchInlineEditServiceV2 service.

Signature:

ACOUSTIC_TOKEN_INLINE_EDIT_SERVICE: InjectionToken<WchInlineEditServiceV2>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_INLINE_EDIT_URL

ACOUSTIC_TOKEN_INLINE_EDIT_URL variable

Injection token for the inline edit URL

Signature:

ACOUSTIC_TOKEN_INLINE_EDIT_URL: InjectionToken<StaticHubInfoUrlProvider>

Home > @acoustic-content-sdk/ng-edit-api > ACOUSTIC_TOKEN_PLACEHOLDER_PROVIDER

ACOUSTIC_TOKEN_PLACEHOLDER_PROVIDER variable

Signature:

ACOUSTIC_TOKEN_PLACEHOLDER_PROVIDER: InjectionToken<WchPlaceholderProvider>

Home > @acoustic-content-sdk/ng-edit-api > DEFAULT_DEBUG_PLACEHOLDERS

DEFAULT_DEBUG_PLACEHOLDERS variable

per default do not debug

Signature:

DEFAULT_DEBUG_PLACEHOLDERS = false

Home > @acoustic-content-sdk/ng-edit-api > DEFAULT_INLINE_EDIT_URL

DEFAULT_INLINE_EDIT_URL variable

default value for the inline edit URL

Signature:

DEFAULT_INLINE_EDIT_URL = "${authoringUIBaseUrl.protocol}//${authoringUIBaseUrl.host}/authoring-sites-ui/inline-edit/inline-edit.js"

Home > @acoustic-content-sdk/ng-edit-api > 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-edit-api > WchDefaultPlaceholder

WchDefaultPlaceholder type

type for placeholder

Signature:

export declare type WchDefaultPlaceholder = ObservableOrT<string | LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableFormat

WchEditableFormat type

Potential values for the 'wchFormat' field

Signature:

export declare type WchEditableFormat = 'text' | 'html' | 'auto';

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveInput > wchEditable$

WchEditableDirectiveInput.wchEditable$ property

Main input value for the directive. It denotes the element that is being edited.

Signature:

wchEditable$: Observable<AccessorType>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > accessor$

WchEditableDirectiveOutput.accessor$ property

The accessor expression

Signature:

accessor$: Observable<string>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > data$

WchEditableDirectiveOutput.data$ property

Generates the accessed data, decoded from the accessor expression

Signature:

data$: Observable<any>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > placeholder$

WchEditableDirectiveOutput.placeholder$ property

Event exposing the current placeholder. If no placeholder exists or placeholders are disabled, this will return undefined.

Signature:

placeholder$: Observable<AuthoringPlaceholder>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > placeholderText$

WchEditableDirectiveOutput.placeholderText$ property

Event exposing the current placeholder text. If placeholders are disabled, this will return. If no placeholder has been defined this returns the default placeholder as specified by the application

Signature:

placeholderText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > showPlaceholder$

WchEditableDirectiveOutput.showPlaceholder$ property

Checks if we should show or hide placeholders

Signature:

showPlaceholder$: Observable<boolean>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > typeId$

WchEditableDirectiveOutput.typeId$ property

Generates the type of the current element

Signature:

typeId$: Observable<string>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditableDirectiveOutput > wchEditable$

WchEditableDirectiveOutput.wchEditable$ property

Event that tells about the inline edit process

Signature:

wchEditable$: Observable<WchEditableEvent>;

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService > debugPlaceholders

EditHubInfoService.debugPlaceholders property

Enable or disable placeholders even if inline edit mode has not been enabled

Signature:

readonly debugPlaceholders?: boolean;

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService > defaultPlaceholderText

EditHubInfoService.defaultPlaceholderText property

Provide a default placeholder text

Signature:

readonly defaultPlaceholderText?: WchDefaultPlaceholder;

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService > inlineEditUrl

EditHubInfoService.inlineEditUrl property

Signature:

readonly inlineEditUrl?: HubInfoUrlProvider;

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService > placeholderTag

EditHubInfoService.placeholderTag property

Tag used to find placeholder content items. If left undefined, placeholders will not be inserted, automatically

Signature:

readonly placeholderTag?: string;

Home > @acoustic-content-sdk/ng-edit-api > EditHubInfoService > throttleLoading

EditHubInfoService.throttleLoading property

Throttle loading of lib

Signature:

readonly throttleLoading?: number;

Home > @acoustic-content-sdk/ng-edit-api > WchEditablePlaceholderDirectiveInput > wchFormat$

WchEditablePlaceholderDirectiveInput.wchFormat$ property

If specified, the directive will update the textual content of the attached node with either the value of the edited property or with the configured placeholder, if there is any. The format flag describes if the value is considered to be plain text ('text'), formatted text ('html') or if the type is to be discovered automatically.

If missing, the property has to be updated by the designer of the template, explicitly.

Signature:

wchFormat$: Observable<WchEditableFormat>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > accessor$

WchPlaceholder.accessor$ property

The accessor expression

Signature:

accessor$: Observable<string>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > data$

WchPlaceholder.data$ property

Generates the accessed data, decoded from the accessor expression

Signature:

data$: Observable<any>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > formattedText$

WchPlaceholder.formattedText$ property

Generates the formatted text of an element, potentially replaced by the placeholder

Signature:

formattedText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > placeholder$

WchPlaceholder.placeholder$ property

Event exposing the current placeholder. If no placeholder exists or placeholders are disabled, this will return 'undefined'.

Signature:

placeholder$: Observable<AuthoringPlaceholder>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > placeholderText$

WchPlaceholder.placeholderText$ property

Event exposing the current placeholder text. If placeholders are disabled, this will return 'undefined'. If no placeholder has been defined this returns the default placeholder as specified by the application, else 'undefined'.

Signature:

placeholderText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > plainText$

WchPlaceholder.plainText$ property

Generates the text of an element, potentially replaced by the placeholder

Signature:

plainText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > showPlaceholder$

WchPlaceholder.showPlaceholder$ property

Checks if we should show or hide placeholders

Signature:

showPlaceholder$: Observable<boolean>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholder > typeId$

WchPlaceholder.typeId$ property

Decodes the type of the currently accessed element

Signature:

typeId$: Observable<string>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditablePlaceholderDirectiveOutput > formattedText$

WchEditablePlaceholderDirectiveOutput.formattedText$ property

Generates the formatted text of an element, potentially replaced by the placeholder

Signature:

formattedText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchEditablePlaceholderDirectiveOutput > plainText$

WchEditablePlaceholderDirectiveOutput.plainText$ property

Generates the text of an element, potentially replaced by the placeholder

Signature:

plainText$: Observable<LocalizedText>;

Home > @acoustic-content-sdk/ng-edit-api > WchPlaceholderProvider > getPlaceholder

WchPlaceholderProvider.getPlaceholder property

Signature:

getPlaceholder: (aAccessor: AccessorType, aProvider: RenderingContextProviderV2) => WchPlaceholder;

Home > @acoustic-content-sdk/ng-edit-api > WchSelectableDirectiveInput > wchSelectable$

WchSelectableDirectiveInput.wchSelectable$ property

Main input value for the directive. It denotes the element that can be selected.

Signature:

wchSelectable$: Observable<AccessorType>;