9.0.10076 • Published 4 years ago

@acoustic-content-sdk/react-hbs-edit v9.0.10076

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

npm

API Documentation

Home > @acoustic-content-sdk/react-hbs-edit

react-hbs-edit package

Implementation of utility functions and react components that render the component based on handlebars templates and integrate with inline edit.

Functions

FunctionDescription
createHandlebarsComponent(aStore, aDeliveryContent, aEditService, aDoc, aLogSvc, aScheduler)Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Interfaces

InterfaceDescription
HandlebarsComponentPropsProperty interface of the handlebars components

Variables

VariableDescription
createMarkupRenderer
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/react-hbs-edit > createHandlebarsComponent

createHandlebarsComponent() function

Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Signature:

export declare function createHandlebarsComponent(aStore: ReduxRootStore, aDeliveryContent: DeliveryContentResolver, aEditService: WchInlineEditServiceV2, aDoc: Document, aLogSvc?: LoggerService, aScheduler?: SchedulerLike): ReactComponent<HandlebarsComponentProps>;

Parameters

ParameterTypeDescription
aStoreReduxRootStorethe redux store that contains all metadata
aDeliveryContentDeliveryContentResolver
aEditServiceWchInlineEditServiceV2the edit service
aDocDocumentthe document, used to instantiate a template node
aLogSvcLoggerServiceoptionally a logger service
aSchedulerSchedulerLikeoptionally a scheduler

Returns:

ReactComponent<HandlebarsComponentProps>

a component that renders a content item based on the handlebars templates from the redux store

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps

HandlebarsComponentProps interface

Property interface of the handlebars components

Signature:

export interface HandlebarsComponentProps 

Properties

PropertyTypeDescription
contentItemIdstringID of the item to render
layoutModestringOptional layout mode

Home > @acoustic-content-sdk/react-hbs-edit > createMarkupRenderer

createMarkupRenderer variable

Signature:

createMarkupRenderer: typeof createRendererV2

Home > @acoustic-content-sdk/react-hbs-edit > 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/react-hbs-edit > HandlebarsComponentProps > contentItemId

HandlebarsComponentProps.contentItemId property

ID of the item to render

Signature:

contentItemId?: string;

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > layoutMode

HandlebarsComponentProps.layoutMode property

Optional layout mode

Signature:

[KEY_LAYOUT_MODE]?: string;