
API Documentation
Home > @acoustic-content-sdk/edit-api
edit-api package
Interfaces
Variables
Type Aliases
Home > @acoustic-content-sdk/edit-api > DataTransferContentItem
DataTransferContentItem interface
Data transfer format for content items
Signature:
export interface DataTransferContentItem
Properties
Property | Type | Description |
---|
accessor | AccessorType | The accessor string |
id | string | ID of the content item |
Home > @acoustic-content-sdk/edit-api > Disposable
Disposable interface
Implemented by objects that expose a life cycle. Calling the dispose method signals the end of this life cycle.
Signature:
export interface Disposable
Properties
Property | Type | Description |
---|
dispose | () => void | |
Home > @acoustic-content-sdk/edit-api > InlineEditSelectionProvider
InlineEditSelectionProvider interface
Service that exposes inline edit info
Signature:
export interface InlineEditSelectionProvider
Properties
Property | Type | Description |
---|
selectedCell$ | Observable<string | undefined> | Captures the currently selected cell. The return value is either just an ID or ID#accessor . If a cell is deselected, the service returns i |
Home > @acoustic-content-sdk/edit-api > WchConfig
WchConfig interface
Exposes server side configuration for the current tenant
Signature:
export interface WchConfig
Properties
Home > @acoustic-content-sdk/edit-api > WchEditableEvent
WchEditableEvent interface
Event issued by the edit provider.
Signature:
export interface WchEditableEvent
Properties
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent
WchInlineEditEvent interface
Event issued by the edit library
Signature:
export interface WchInlineEditEvent
Properties
Property | Type | Description |
---|
data | any | |
type | string | |
Home > @acoustic-content-sdk/edit-api > WchInlineEditProvider
WchInlineEditProvider interface
Signature:
export interface WchInlineEditProvider
Properties
Property | Type | Description |
---|
register | WchInlineEditRegistration | |
Home > @acoustic-content-sdk/edit-api > WchInlineEditProviderV2
WchInlineEditProviderV2 interface
Signature:
export interface WchInlineEditProviderV2
Properties
Property | Type | Description |
---|
register | WchInlineEditRegistrationV2 | |
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap
WchInlineEditRequireMap interface
Helper interface that defines the mappings from module name to actual type
Signature:
export interface WchInlineEditRequireMap
Properties
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2
WchInlineEditRequireMapV2 interface
Helper interface that defines the mappings from module name to actual type
Signature:
export interface WchInlineEditRequireMapV2
Properties
Home > @acoustic-content-sdk/edit-api > WchInlineEditService
WchInlineEditService interface
Implementation of the edit service used by the wchEditable directive.
Signature:
export interface WchInlineEditService
Methods
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2
WchInlineEditServiceV2 interface
Implementation of the edit service used by the wchEditable directive.
Signature:
export interface WchInlineEditServiceV2
Methods
Home > @acoustic-content-sdk/edit-api > ATTR_DATA_SELECTABLE
ATTR_DATA_SELECTABLE variable
Signature:
ATTR_DATA_SELECTABLE = "data-wch-selectable"
Home > @acoustic-content-sdk/edit-api > EVENT_EDIT_END
EVENT_EDIT_END variable
Signature:
EVENT_EDIT_END = "EVENT_EDIT_END"
Home > @acoustic-content-sdk/edit-api > EVENT_EDIT_START
EVENT_EDIT_START variable
Signature:
EVENT_EDIT_START = "EVENT_EDIT_START"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_END
EVENT_INLINE_EDIT_END variable
Signature:
EVENT_INLINE_EDIT_END = "EVENT_INLINE_EDIT_END"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_SET_SELECTED_CELL
EVENT_INLINE_EDIT_SET_SELECTED_CELL variable
Signature:
EVENT_INLINE_EDIT_SET_SELECTED_CELL = "EVENT_INLINE_EDIT_SET_SELECTED_CELL"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_START
EVENT_INLINE_EDIT_START variable
Signature:
EVENT_INLINE_EDIT_START = "EVENT_INLINE_EDIT_START"
Home > @acoustic-content-sdk/edit-api > INLINE_EDIT_PROVIDER_ID
INLINE_EDIT_PROVIDER_ID variable
Signature:
INLINE_EDIT_PROVIDER_ID = "@acoustic-content-sdk/inline-edit-provider"
Home > @acoustic-content-sdk/edit-api > TRANSFER_FORMAT
TRANSFER_FORMAT variable
Transfer format for our custom dnd components
Signature:
TRANSFER_FORMAT = "application/x-dnd-fragment"
Home > @acoustic-content-sdk/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/edit-api > WCH_ACTIVE_PAGE_MODULE
WCH_ACTIVE_PAGE_MODULE variable
Token used to require the active page service
PromiseLike
Signature:
WCH_ACTIVE_PAGE_MODULE = "wch-active-page"
Home > @acoustic-content-sdk/edit-api > WCH_CONFIG_MODULE
WCH_CONFIG_MODULE variable
Token used to require the [[WchConfig]] service
PromiseLike
Signature:
WCH_CONFIG_MODULE = "wch-config"
Home > @acoustic-content-sdk/edit-api > WCH_HTTP_MODULE
WCH_HTTP_MODULE variable
Token used to access the http service
PromiseLike
Signature:
WCH_HTTP_MODULE = "wch-http"
Home > @acoustic-content-sdk/edit-api > WCH_INFO_MODULE
WCH_INFO_MODULE variable
Token used to require the [[WchInfo]] service
PromiseLike
Signature:
WCH_INFO_MODULE = "wch-info"
Home > @acoustic-content-sdk/edit-api > WCH_LOGGER_MODULE
WCH_LOGGER_MODULE variable
Token used to require the [[LoggerService]]
PromiseLike
Signature:
WCH_LOGGER_MODULE = "wch-logger"
Home > @acoustic-content-sdk/edit-api > AccessorType
AccessorType type
Signature:
export declare type AccessorType = string | null;
Home > @acoustic-content-sdk/edit-api > EventTargetLike
EventTargetLike type
Signature:
export declare type EventTargetLike = Parameters<typeof fromEvent>[0];
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistration
WchInlineEditRegistration type
Signature:
export declare type WchInlineEditRegistration = (nativeElement: any, accessor: AccessorType, onRenderingContext: Observable<RenderingContext>) => WchInlineEditRegistrationResult;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistrationResult
WchInlineEditRegistrationResult type
Signature:
export declare type WchInlineEditRegistrationResult = EventTargetLike | EventTargetLike & Disposable;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistrationV2
WchInlineEditRegistrationV2 type
Signature:
export declare type WchInlineEditRegistrationV2 = (nativeElement: any, accessor: AccessorType, renderingContext$: Observable<RenderingContextV2>) => WchInlineEditRegistrationResult;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequire
WchInlineEditRequire type
Interface of the require function, strongly typed
Signature:
export declare type WchInlineEditRequire = (<T extends keyof WchInlineEditRequireMap>(aModule: T) => WchInlineEditRequireMap[T]) & ((aModule: string) => PromiseLike<string>);
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireV2
WchInlineEditRequireV2 type
Interface of the require function, strongly typed
Signature:
export declare type WchInlineEditRequireV2 = (<T extends keyof WchInlineEditRequireMapV2>(aModule: T) => WchInlineEditRequireMapV2[T]) & ((aModule: string) => PromiseLike<string>);
Home > @acoustic-content-sdk/edit-api > DataTransferContentItem > accessor
DataTransferContentItem.accessor property
The accessor string
Signature:
[KEY_ACCESSOR]: AccessorType;
Home > @acoustic-content-sdk/edit-api > DataTransferContentItem > id
DataTransferContentItem.id property
ID of the content item
Signature:
[KEY_ID]: string;
Home > @acoustic-content-sdk/edit-api > WchEditableEvent > data
WchEditableEvent.data property
Signature:
data: any;
Home > @acoustic-content-sdk/edit-api > WchEditableEvent > target
WchEditableEvent.target property
Signature:
target: HTMLElement;
Home > @acoustic-content-sdk/edit-api > WchEditableEvent > type
WchEditableEvent.type property
Signature:
type: string;
Home > @acoustic-content-sdk/edit-api > WchConfig > apiUrl
WchConfig.apiUrl property
API URL for the non-preview host
Signature:
readonly apiUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > authoringUIBaseUrl
WchConfig.authoringUIBaseUrl property
URL of the authoring host
Signature:
readonly authoringUIBaseUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > deliveryUrl
WchConfig.deliveryUrl property
delivery URL for the non-preview host
Signature:
readonly deliveryUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > previewApiUrl
WchConfig.previewApiUrl property
API URL for the preview host
Signature:
readonly previewApiUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > previewDeliveryUrl
WchConfig.previewDeliveryUrl property
delivery URL for the preview host
Signature:
readonly previewDeliveryUrl: URL;
Home > @acoustic-content-sdk/edit-api > InlineEditSelectionProvider > selectedCell$
InlineEditSelectionProvider.selectedCell$ property
Captures the currently selected cell. The return value is either just an ID or ID#accessor
. If a cell is deselected, the service returns i
Signature:
selectedCell$: Observable<string | undefined>;
Home > @acoustic-content-sdk/edit-api > Disposable > dispose
Disposable.dispose property
Signature:
dispose: () => void;
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent > data
WchInlineEditEvent.data property
Signature:
data: any;
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent > type
WchInlineEditEvent.type property
Signature:
type: string;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-active-page"
WchInlineEditRequireMapV2."wch-active-page" property
Signature:
[WCH_ACTIVE_PAGE_MODULE]: PromiseLike<ActivePageV2>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-config"
WchInlineEditRequireMapV2."wch-config" property
Signature:
[WCH_CONFIG_MODULE]: PromiseLike<WchConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-info"
WchInlineEditRequireMapV2."wch-info" property
Signature:
[WCH_INFO_MODULE]: PromiseLike<UrlConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-logger"
WchInlineEditRequireMapV2."wch-logger" property
Signature:
[WCH_LOGGER_MODULE]: PromiseLike<LoggerService>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditProviderV2 > register
WchInlineEditProviderV2.register property
Signature:
register: WchInlineEditRegistrationV2;
Home > @acoustic-content-sdk/edit-api > WchInlineEditService > fromEvent
WchInlineEditService.fromEvent() method
Attaches to an event issued by the edit library
Signature:
fromEvent<T>(aName: string): Observable<T>;
Parameters
Parameter | Type | Description |
---|
aName | string | name of the event |
Returns:
Observable<T>
Home > @acoustic-content-sdk/edit-api > WchInlineEditService > registerComponent
WchInlineEditService.registerComponent() method
Registers a particular DOM element as editable
Signature:
registerComponent(nativeElement: any, accessor: AccessorType, onRenderingContext: Observable<RenderingContext>): Observable<EventTargetLike>;
Parameters
Parameter | Type | Description |
---|
nativeElement | any | the DOM element to be edited |
accessor | AccessorType | string identifying the member in the content item record to be edited. The value of 'null' means the the content item itself will be edited. |
onRenderingContext | Observable<RenderingContext> | the rendering context associated with the edit operation. The same DOM element might represent multiple contexts over time |
Returns:
Observable<EventTargetLike>
the observable representing the registration result. The observable exposes an event producer that a client can attach to to receive edit events. The registration will only take place when subscribing to the observable and it will end when unsubscribing.
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-active-page"
WchInlineEditRequireMap."wch-active-page" property
Signature:
[WCH_ACTIVE_PAGE_MODULE]: PromiseLike<ActivePage>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-config"
WchInlineEditRequireMap."wch-config" property
Signature:
[WCH_CONFIG_MODULE]: PromiseLike<WchConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-http"
WchInlineEditRequireMap."wch-http" property
Signature:
[WCH_HTTP_MODULE]: PromiseLike<WchHttp>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-info"
WchInlineEditRequireMap."wch-info" property
Signature:
[WCH_INFO_MODULE]: PromiseLike<UrlConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-logger"
WchInlineEditRequireMap."wch-logger" property
Signature:
[WCH_LOGGER_MODULE]: PromiseLike<LoggerService>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2 > fromEvent
WchInlineEditServiceV2.fromEvent() method
Attaches to an event issued by the edit library
Signature:
fromEvent<T>(aName: string): Observable<T>;
Parameters
Parameter | Type | Description |
---|
aName | string | name of the event |
Returns:
Observable<T>
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2 > registerComponent
WchInlineEditServiceV2.registerComponent() method
Registers a particular DOM element as editable
Signature:
registerComponent(nativeElement: any, accessor: AccessorType, renderingContext$: Observable<RenderingContextV2>): Observable<EventTargetLike>;
Parameters
Parameter | Type | Description |
---|
nativeElement | any | the DOM element to be edited |
accessor | AccessorType | string identifying the member in the content item record to be edited. The value of 'null' means the the content item itself will be edited. |
renderingContext$ | Observable<RenderingContextV2> | the rendering context associated with the edit operation. The same DOM element might represent multiple contexts over time |
Returns:
Observable<EventTargetLike>
the observable representing the registration result. The observable exposes an event producer that a client can attach to to receive edit events. The registration will only take place when subscribing to the observable and it will end when unsubscribing.
Home > @acoustic-content-sdk/edit-api > WchInlineEditProvider > register
WchInlineEditProvider.register property
Signature:
register: WchInlineEditRegistration;