
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@acoustic-content-sdk/edit-api
Advanced tools
The edit API defines interfaces for consumers and providers of inline edit functionality.
The inline edit APIs define how an application can register DOM elements to be inline editable and also an API how an implementor of inline edit functionality can hook into the system. The purpose of the consumer facing interface WchInlineEditServiceV2
is to make it convenient to use the service, the purpose of the provider facing interface WchInlineEditProviderV2
to implement the service. The glue layer between both is a generic implementation by the SDK.
Refer to the framework specific modules to learn how to access the services.
The edit provider is a piece of javascript code that implements inline edit functionality. It is dynamically loaded by the SPA (typically via the SDK). The provider needs to conform to the following pattern:
The edit module implements the WchInlineEditProviderV2
interface, i.e. it exposes a register
function. This function will be invoked for each editable HTML element and allows the edit provider to attach the desired edit hooks to the elements. The method is provided with:
The result of a registration is an event provider. The purpose of this provider is to communicate inline edit operations on the HTML element to the host, i.e. the host registers for events on that event provider and the edit provider is responsible to firing these events (if the event is supported).
The event provider can optionally implement the Disposable
interface. If implemented the host will call its dispose
method after registration, before the HTML element gets removed from the DOM (so it's the inverse operation to the registration call).
The implementor of the WchInlineEditProviderV2
MAY optionally also implement the EventTargetLike
interface, i.e. be an event emitter. This allows the provider to communicate information to the SDK, e.g. about enabled or disabled inline edit mode.
Currently supported notifications are:
wchInlineEditStart
to notify about entering inline edit modewchInlineEditEnd
to notify about leaving inline edit modeThe WchInlineEditServiceV2
interface allows a client to interact with the inline edit implementation. The implementation of this interface makes sure to load the inline edit provider and to fulfill the interface contract with the provider.
A consumer of this interface calls the registerComponent
message for each HTML element that is supposed to be edited. The result of this call is an Observable. The inline edit registration begins as soon as someone subscribes to this observable and ends as soon as this subscription ends. It is in the responsibility of the consumer to make sure that the HTML element exists for the duration of the subscription.
Home > @acoustic-content-sdk/edit-api
The edit API defines interfaces for consumers and providers of inline edit functionality.
Interface | Description |
---|---|
DataTransferContentItem | Data transfer format for content items |
Disposable | Implemented by objects that expose a life cycle. Calling the dispose method signals the end of this life cycle. |
InlineEditSelectionProvider | Service that exposes inline edit info |
WchConfig | Exposes server side configuration for the current tenant |
WchEditableEvent | Event issued by the edit provider. |
WchInlineEditEvent | Event issued by the edit library |
WchInlineEditProvider | |
WchInlineEditProviderV2 | Interface exposed by an inline edit provider implementationImplementors may also implement EventTargetLike to send item independent events |
WchInlineEditRequireMap | Helper interface that defines the mappings from module name to actual type |
WchInlineEditRequireMapV2 | Helper interface that defines the mappings from module name to actual type. This is a simple dependency injection mechanism from the inline edit host to the inline edit provider. |
WchInlineEditService | Implementation of the edit service used by the wchEditable directive. |
WchInlineEditServiceV2 | Implementation of the edit service used by the wchEditable directive. |
Variable | Description |
---|---|
ACOUSTIC_ACTIVE_PAGE_MODULE | Token used to require the active page service PromiseLike |
ACOUSTIC_CONFIG_MODULE | Token used to require the [[WchConfig]] service PromiseLike |
ACOUSTIC_HTTP_MODULE | Token used to access the http service PromiseLike |
ACOUSTIC_INFO_MODULE | Token used to require the [[WchInfo]] service PromiseLike |
ACOUSTIC_LOGGER_MODULE | Token used to require the [[LoggerService]] PromiseLike |
ATTR_DATA_SELECTABLE | |
EVENT_EDIT_END | |
EVENT_EDIT_START | |
EVENT_INLINE_EDIT_END | |
EVENT_INLINE_EDIT_SET_SELECTED_CELL | |
EVENT_INLINE_EDIT_START | |
INLINE_EDIT_PROVIDER_ID | Identifier used to identify an WchInlineEditProviderV2 instance on a context, e.g. the window |
TRANSFER_FORMAT | Transfer format for our custom dnd components |
VERSION | Version and build number of the package |
WCH_ACTIVE_PAGE_MODULE | |
WCH_CONFIG_MODULE | |
WCH_HTTP_MODULE | |
WCH_INFO_MODULE | |
WCH_LOGGER_MODULE |
Type Alias | Description |
---|---|
AccessorType | The accessor string, a property path relative to the root of a content item that points to the element value to be edited. A value of null denotes the root level element. |
EventTargetLike | |
WchInlineEditRegistration | |
WchInlineEditRegistrationResult | Result of an inline edit registration. This is at least an event emitter but may optionally also expose the Disposable interface to allow deregistration |
WchInlineEditRegistrationV2 | Type definition of the register method that allows to register DOM elements with an inline edit provider. |
WchInlineEditRequire | Interface of the require function, strongly typed |
WchInlineEditRequireV2 | Interface of the require function, strongly typed |
Home > @acoustic-content-sdk/edit-api > DataTransferContentItem
Data transfer format for content items
Signature:
export interface DataTransferContentItem
Property | Type | Description |
---|---|---|
accessor | AccessorType | The accessor string |
id | string | ID of the content item |
Home > @acoustic-content-sdk/edit-api > Disposable
Implemented by objects that expose a life cycle. Calling the dispose method signals the end of this life cycle.
Signature:
export interface Disposable
Property | Type | Description |
---|---|---|
dispose | () => void |
Home > @acoustic-content-sdk/edit-api > InlineEditSelectionProvider
Service that exposes inline edit info
Signature:
export interface InlineEditSelectionProvider
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
Exposes server side configuration for the current tenant
Signature:
export interface WchConfig
Property | Type | Description |
---|---|---|
apiUrl | URL | API URL for the non-preview host |
authoringUIBaseUrl | URL | URL of the authoring host |
deliveryUrl | URL | delivery URL for the non-preview host |
previewApiUrl | URL | API URL for the preview host |
previewDeliveryUrl | URL | delivery URL for the preview host |
Home > @acoustic-content-sdk/edit-api > WchEditableEvent
Event issued by the edit provider.
Signature:
export interface WchEditableEvent
Property | Type | Description |
---|---|---|
data | any | |
target | HTMLElement | |
type | string |
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent
Event issued by the edit library
Signature:
export interface WchInlineEditEvent
Property | Type | Description |
---|---|---|
data | any | |
type | string |
Home > @acoustic-content-sdk/edit-api > WchInlineEditProvider
Warning: This API is now obsolete.
use WchInlineEditProviderV2 instead
Signature:
export interface WchInlineEditProvider
Property | Type | Description |
---|---|---|
register | WchInlineEditRegistration |
Home > @acoustic-content-sdk/edit-api > WchInlineEditProviderV2
Interface exposed by an inline edit provider implementation
Implementors may also implement EventTargetLike
to send item independent events
Signature:
export interface WchInlineEditProviderV2
Property | Type | Description |
---|---|---|
register | WchInlineEditRegistrationV2 | The register method that allows to register DOM elements with the provider |
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap
Helper interface that defines the mappings from module name to actual type
Signature:
export interface WchInlineEditRequireMap
Property | Type | Description |
---|---|---|
"wch-active-page" | PromiseLike<ActivePage> | |
"wch-config" | PromiseLike<WchConfig> | |
"wch-http" | PromiseLike<WchHttp> | |
"wch-info" | PromiseLike<UrlConfig> | |
"wch-logger" | PromiseLike<LoggerService> |
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2
Helper interface that defines the mappings from module name to actual type. This is a simple dependency injection mechanism from the inline edit host to the inline edit provider.
Signature:
export interface WchInlineEditRequireMapV2
Property | Type | Description |
---|---|---|
"wch-active-page" | PromiseLike<ActivePageV2> | |
"wch-config" | PromiseLike<WchConfig> | |
"wch-info" | PromiseLike<UrlConfig> | |
"wch-logger" | PromiseLike<LoggerService> |
Home > @acoustic-content-sdk/edit-api > WchInlineEditService
Implementation of the edit service used by the wchEditable directive.
Signature:
export interface WchInlineEditService
Method | Description |
---|---|
fromEvent(aName) | Attaches to an event issued by the edit library |
registerComponent(nativeElement, accessor, onRenderingContext) | Registers a particular DOM element as editable |
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2
Implementation of the edit service used by the wchEditable directive.
Signature:
export interface WchInlineEditServiceV2
Method | Description |
---|---|
fromEvent(aName) | Attaches to an event issued by the edit library |
registerComponent(nativeElement, accessor, renderingContext$) | Registers a particular DOM element as editable |
Home > @acoustic-content-sdk/edit-api > ACOUSTIC_ACTIVE_PAGE_MODULE
Token used to require the active page service
PromiseLike
Signature:
ACOUSTIC_ACTIVE_PAGE_MODULE = "wch-active-page"
Home > @acoustic-content-sdk/edit-api > ACOUSTIC_CONFIG_MODULE
Token used to require the [[WchConfig]] service
PromiseLike
Signature:
ACOUSTIC_CONFIG_MODULE = "wch-config"
Home > @acoustic-content-sdk/edit-api > ACOUSTIC_HTTP_MODULE
Token used to access the http service
PromiseLike
Signature:
ACOUSTIC_HTTP_MODULE = "wch-http"
Home > @acoustic-content-sdk/edit-api > ACOUSTIC_INFO_MODULE
Token used to require the [[WchInfo]] service
PromiseLike
Signature:
ACOUSTIC_INFO_MODULE = "wch-info"
Home > @acoustic-content-sdk/edit-api > ACOUSTIC_LOGGER_MODULE
Token used to require the [[LoggerService]]
PromiseLike
Signature:
ACOUSTIC_LOGGER_MODULE = "wch-logger"
Home > @acoustic-content-sdk/edit-api > ATTR_DATA_SELECTABLE
Signature:
ATTR_DATA_SELECTABLE = "data-wch-selectable"
Home > @acoustic-content-sdk/edit-api > EVENT_EDIT_END
Signature:
EVENT_EDIT_END = "EVENT_EDIT_END"
Home > @acoustic-content-sdk/edit-api > EVENT_EDIT_START
Signature:
EVENT_EDIT_START = "EVENT_EDIT_START"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_END
Signature:
EVENT_INLINE_EDIT_END = "EVENT_INLINE_EDIT_END"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_SET_SELECTED_CELL
Signature:
EVENT_INLINE_EDIT_SET_SELECTED_CELL = "EVENT_INLINE_EDIT_SET_SELECTED_CELL"
Home > @acoustic-content-sdk/edit-api > EVENT_INLINE_EDIT_START
Signature:
EVENT_INLINE_EDIT_START = "EVENT_INLINE_EDIT_START"
Home > @acoustic-content-sdk/edit-api > INLINE_EDIT_PROVIDER_ID
Identifier used to identify an WchInlineEditProviderV2 instance on a context, e.g. the window
Signature:
INLINE_EDIT_PROVIDER_ID = "@acoustic-content-sdk/inline-edit-provider"
Home > @acoustic-content-sdk/edit-api > TRANSFER_FORMAT
Transfer format for our custom dnd components
Signature:
TRANSFER_FORMAT = "application/x-dnd-fragment"
Home > @acoustic-content-sdk/edit-api > VERSION
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
Warning: This API is now obsolete.
use ACOUSTIC_ACTIVE_PAGE_MODULE instead
Signature:
WCH_ACTIVE_PAGE_MODULE = "wch-active-page"
Home > @acoustic-content-sdk/edit-api > WCH_CONFIG_MODULE
Warning: This API is now obsolete.
use ACOUSTIC_CONFIG_MODULE instead
Signature:
WCH_CONFIG_MODULE = "wch-config"
Home > @acoustic-content-sdk/edit-api > WCH_HTTP_MODULE
Warning: This API is now obsolete.
use ACOUSTIC_HTTP_MODULE instead
Signature:
WCH_HTTP_MODULE = "wch-http"
Home > @acoustic-content-sdk/edit-api > WCH_INFO_MODULE
Warning: This API is now obsolete.
use ACOUSTIC_INFO_MODULE instead
Signature:
WCH_INFO_MODULE = "wch-info"
Home > @acoustic-content-sdk/edit-api > WCH_LOGGER_MODULE
Warning: This API is now obsolete.
use ACOUSTIC_LOGGER_MODULE instead
Signature:
WCH_LOGGER_MODULE = "wch-logger"
Home > @acoustic-content-sdk/edit-api > AccessorType
The accessor string, a property path relative to the root of a content item that points to the element value to be edited. A value of null
denotes the root level element.
Signature:
export declare type AccessorType = string | null;
Home > @acoustic-content-sdk/edit-api > EventTargetLike
Signature:
export declare type EventTargetLike = Parameters<typeof fromEvent>[0];
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistration
Warning: This API is now obsolete.
use WchInlineEditRegistrationV2 instead
Signature:
export declare type WchInlineEditRegistration = (nativeElement: any, accessor: AccessorType, onRenderingContext: Observable<RenderingContext>) => WchInlineEditRegistrationResult;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistrationResult
Result of an inline edit registration. This is at least an event emitter but may optionally also expose the Disposable
interface to allow deregistration
Signature:
export declare type WchInlineEditRegistrationResult = EventTargetLike | (EventTargetLike & Disposable);
Home > @acoustic-content-sdk/edit-api > WchInlineEditRegistrationV2
Type definition of the register method that allows to register DOM elements with an inline edit provider.
Signature:
export declare type WchInlineEditRegistrationV2 = (nativeElement: any, accessor: AccessorType, renderingContext$: Observable<RenderingContextV2>) => WchInlineEditRegistrationResult;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequire
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
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
The accessor string
Signature:
[KEY_ACCESSOR]: AccessorType;
Home > @acoustic-content-sdk/edit-api > DataTransferContentItem > id
ID of the content item
Signature:
[KEY_ID]: string;
Home > @acoustic-content-sdk/edit-api > Disposable > dispose
Signature:
dispose: () => void;
Home > @acoustic-content-sdk/edit-api > InlineEditSelectionProvider > selectedCell$
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 > WchEditableEvent > data
Signature:
data: any;
Home > @acoustic-content-sdk/edit-api > WchEditableEvent > target
Signature:
target: HTMLElement;
Home > @acoustic-content-sdk/edit-api > WchEditableEvent > type
Signature:
type: string;
Home > @acoustic-content-sdk/edit-api > WchConfig > apiUrl
API URL for the non-preview host
Signature:
readonly apiUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > authoringUIBaseUrl
URL of the authoring host
Signature:
readonly authoringUIBaseUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > deliveryUrl
delivery URL for the non-preview host
Signature:
readonly deliveryUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > previewApiUrl
API URL for the preview host
Signature:
readonly previewApiUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchConfig > previewDeliveryUrl
delivery URL for the preview host
Signature:
readonly previewDeliveryUrl: URL;
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent > data
Signature:
data: any;
Home > @acoustic-content-sdk/edit-api > WchInlineEditEvent > type
Signature:
type: string;
Home > @acoustic-content-sdk/edit-api > WchInlineEditProvider > register
Signature:
register: WchInlineEditRegistration;
Home > @acoustic-content-sdk/edit-api > WchInlineEditProviderV2 > register
The register method that allows to register DOM elements with the provider
Signature:
register: WchInlineEditRegistrationV2;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-active-page"
Signature:
[ACOUSTIC_ACTIVE_PAGE_MODULE]: PromiseLike<ActivePageV2>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-config"
Signature:
[ACOUSTIC_CONFIG_MODULE]: PromiseLike<WchConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-info"
Signature:
[ACOUSTIC_INFO_MODULE]: PromiseLike<UrlConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMapV2 > "wch-logger"
Signature:
[ACOUSTIC_LOGGER_MODULE]: PromiseLike<LoggerService>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2 > fromEvent
Attaches to an event issued by the edit library
Signature:
fromEvent<T>(aName: string): Observable<T>;
Parameter | Type | Description |
---|---|---|
aName | string | name of the event |
Returns:
Observable<T>
a stream of events
Home > @acoustic-content-sdk/edit-api > WchInlineEditServiceV2 > registerComponent
Registers a particular DOM element as editable
Signature:
registerComponent(nativeElement: any, accessor: AccessorType, renderingContext$: Observable<RenderingContextV2>): Observable<EventTargetLike>;
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 > WchInlineEditRequireMap > "wch-active-page"
Signature:
[ACOUSTIC_ACTIVE_PAGE_MODULE]: PromiseLike<ActivePage>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-config"
Signature:
[ACOUSTIC_CONFIG_MODULE]: PromiseLike<WchConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-http"
Signature:
[ACOUSTIC_HTTP_MODULE]: PromiseLike<WchHttp>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-info"
Signature:
[ACOUSTIC_INFO_MODULE]: PromiseLike<UrlConfig>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditRequireMap > "wch-logger"
Signature:
[ACOUSTIC_LOGGER_MODULE]: PromiseLike<LoggerService>;
Home > @acoustic-content-sdk/edit-api > WchInlineEditService > fromEvent
Attaches to an event issued by the edit library
Signature:
fromEvent<T>(aName: string): Observable<T>;
Parameter | Type | Description |
---|---|---|
aName | string | name of the event |
Returns:
Observable<T>
a stream of events
Home > @acoustic-content-sdk/edit-api > WchInlineEditService > registerComponent
Registers a particular DOM element as editable
Signature:
registerComponent(nativeElement: any, accessor: AccessorType, onRenderingContext: Observable<RenderingContext>): Observable<EventTargetLike>;
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.
FAQs
The edit API defines interfaces for consumers and providers of inline edit functionality.
We found that @acoustic-content-sdk/edit-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.