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

@ibm-wch-sdk/layout-editor

v7.2.608

Published

Exposes framework independent APIs for @ibm-wch-sdk/ng and similar SDKs.

Downloads

2

Readme

ibm-wch-sdk-api

Exposes framework independent APIs for ibm-wch-sdk-ng and similar SDKs.

Details

Refer to the documentation.

Changes

CHANGELOG

Class documentation

Refer to the documentation.

Usage

Install the module via

npm install --save ibm-wch-sdk-theme

API

Changelog

Current

Added

  • New config option "siteId" to configure a site identifier

6.0.69

Changed

  • Support for Angular 6

Added

  • New quick access fields group and groups on the RenderingContext
  • Typing support for group elements
  • Declaration of the event types and payloads for cross iframe events to switch between public and protected mode.

5.0.217

Added

  • Initial version

@ibm-wch-sdk/layout-editor

Index

External modules


@ibm-wch-sdk/layout-editor > "dnd.namespace"

External module: "dnd.namespace"

Index

Interfaces

Type aliases

Variables


Type aliases

Parameters

Ƭ Parameters: Record<string, string>

Defined in dnd.namespace.ts:4


Variables

<Const> KEY_EFFECT_ALLOWED

● KEY_EFFECT_ALLOWED: "com.ibm.portal.dnd.effect.allowed" = "com.ibm.portal.dnd.effect.allowed"

Defined in dnd.namespace.ts:2


<Const> KEY_PAYLOAD

● KEY_PAYLOAD: "com.ibm.portal.dnd.payload" = "com.ibm.portal.dnd.payload"

Defined in dnd.namespace.ts:1


@ibm-wch-sdk/layout-editor > "dnd.source"

External module: "dnd.source"

Index

Type aliases

Variables

Functions


Type aliases

AddressableInput

Ƭ AddressableInput: string | Addressable | HTMLAnchorElement | HTMLDListElement | HTMLDivElement | NodeList | HTMLCollection | Array<string | Addressable | HTMLAnchorElement | HTMLDListElement | HTMLDivElement | HTMLCollection | NodeList>

Defined in dnd.source.ts:12


DndEvent

Ƭ DndEvent: DragEvent & DragEventInit

Defined in dnd.source.ts:30


Variables

<Const> _DATA_PARAM_PREFIX

● _DATA_PARAM_PREFIX: string = _DATA_PREFIX + 'param-'

Defined in dnd.source.ts:62

Prefix for parameter attributes


<Const> _DATA_PREFIX

● _DATA_PREFIX: "data-" = "data-"

Defined in dnd.source.ts:54

Prefix for data attributes


<Const> _JSON

● _JSON: JSON = JSON

Defined in dnd.source.ts:38


<Const> _TRANSFER_TYPE

● _TRANSFER_TYPE: "text" = "text"

Defined in dnd.source.ts:46

Data transfer type


<Const> _document

● _document: Document = document

Defined in dnd.source.ts:799


<Const> _keyEffectAllowed

● _keyEffectAllowed: "com.ibm.portal.dnd.effect.allowed" = KEY_EFFECT_ALLOWED

Defined in dnd.source.ts:792


<Const> _keyPayload

● _keyPayload: "com.ibm.portal.dnd.payload" = KEY_PAYLOAD

Defined in dnd.source.ts:785


<Const> _localStorage

● _localStorage: Storage = localStorage

Defined in dnd.source.ts:806


<Const> _onDrag

● _onDrag: _noop = _noop

Defined in dnd.source.ts:823

The drag callback


Functions

_addAddressable

_addAddressable(aDst: Addressable[], aObject: AddressableInput, aDocument: Document): Addressable[]

Defined in dnd.source.ts:534

Converts the object to an addressable object and adds it to the target array

Parameters:

| Name | Type | | ------ | ------ | | aDst | Addressable[] | | aObject | AddressableInput | | aDocument | Document |

Returns: Addressable[]


_addAddressablesFromDefinitionList

_addAddressablesFromDefinitionList(aDst: Addressable[], aObject: HTMLDListElement): void

Defined in dnd.source.ts:462

Converts a definition list to an addressable object. The URI is stored as the data-uri attribute of the DL item, the parameters are represented as the DT/DD children.

Parameters:

| Name | Type | | ------ | ------ | | aDst | Addressable[] | | aObject | HTMLDListElement |

Returns: void


_addAddressablesFromElement

_addAddressablesFromElement(aDst: Addressable[], aObject: Element): void

Defined in dnd.source.ts:406

Converts an HTML element to an addressable object

Parameters:

| Name | Type | | ------ | ------ | | aDst | Addressable[] | | aObject | Element |

Returns: void


_addAddressablesFromString

_addAddressablesFromString(aDst: Addressable[], aUris: string, aParams: Parameters): void

Defined in dnd.source.ts:375

Adds a set of addressabled

Parameters:

| Name | Type | | ------ | ------ | | aDst | Addressable[] | | aUris | string | | aParams | Parameters |

Returns: void


_addEventListener

_addEventListener<K>(aElement: HTMLElement, aName: K, aCallback: function): void

Defined in dnd.source.ts:768

Registers an event callback with the element

Type parameters:

K : keyof HTMLElementEventMap

Parameters:

| Name | Type | | ------ | ------ | | aElement | HTMLElement | | aName | K | | aCallback | function |

Returns: void


_addEventListeners

_addEventListeners(aElementRef: HTMLElement | string): void

Defined in dnd.source.ts:901

Registers the drag source events with the element

Parameters:

| Name | Type | | ------ | ------ | | aElementRef | HTMLElement | string |

Returns: void


_clearLocalStorage

_clearLocalStorage(aLocalStorageKey: string, aLocalStorage: Storage): void

Defined in dnd.source.ts:662

Performs payload cleanup for the HTML local storage

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage |

Returns: void


_createAddressable

_createAddressable(aUri: string, aParams: Parameters): Addressable

Defined in dnd.source.ts:322

Constructs an addressable object

Parameters:

| Name | Type | | ------ | ------ | | aUri | string | | aParams | Parameters |

Returns: Addressable


_encodePayload

_encodePayload(aAddressables: AddressableInput, aDocument: Document): string

Defined in dnd.source.ts:613

Constructs a string based payload based on the argument list

Parameters:

| Name | Type | | ------ | ------ | | aAddressables | AddressableInput | | aDocument | Document |

Returns: string


_getDataFromNode

_getDataFromNode(aName: string, aNode: Element): string

Defined in dnd.source.ts:95

Accesses a data- attribute from a root node

Parameters:

| Name | Type | | ------ | ------ | | aName | string | | aNode | Element |

Returns: string


_getDataTransfer

_getDataTransfer(aEvent: DndEvent): DataTransfer

Defined in dnd.source.ts:631

Returns the data transfer object from the event

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent |

Returns: DataTransfer


_getDragSource

_getDragSource(): object

Defined in dnd.source.ts:917

Returns the event handlers for a drag source

Returns: object


_getElement

_getElement(aElementRef: HTMLElement | string, aDocument: Document): HTMLElement

Defined in dnd.source.ts:278

Locates an element

Parameters:

| Name | Type | | ------ | ------ | | aElementRef | HTMLElement | string | | aDocument | Document |

Returns: HTMLElement


_getElementById

_getElementById(aId: string, aDocument: Document): HTMLElement

Defined in dnd.source.ts:81

Returns an element by ID

Parameters:

| Name | Type | | ------ | ------ | | aId | string | | aDocument | Document |

Returns: HTMLElement


_getTextContent

_getTextContent(aElement: Element): string

Defined in dnd.source.ts:308

Accesses the textual content of an element

Parameters:

| Name | Type | | ------ | ------ | | aElement | Element |

Returns: string


_getType

_getType(aObject: any): string

Defined in dnd.source.ts:147

Returns a type string for the object

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: string


_isAnchor

_isAnchor(aType: string): boolean

Defined in dnd.source.ts:213

Checks if the type is an anchor

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isArray

_isArray(aType: string): boolean

Defined in dnd.source.ts:173

Checks if the type is an array type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isDefinitionList

_isDefinitionList(aType: string): boolean

Defined in dnd.source.ts:239

Checks if the type is a definition list

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isDiv

_isDiv(aType: string): boolean

Defined in dnd.source.ts:226

Checks if the type is a div element

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isNodeList

_isNodeList(aType: string): boolean

Defined in dnd.source.ts:199

Checks if the type is a list of HTML elements

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isObject

_isObject(aType: string): boolean

Defined in dnd.source.ts:186

Checks if the type is an object type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isString

_isString(aType: string): boolean

Defined in dnd.source.ts:160

Checks if the type is a string type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_noop

_noop(): void

Defined in dnd.source.ts:69

Helper that just does nothing

Returns: void


_objectToAddressable

_objectToAddressable(aObject: any): Addressable

Defined in dnd.source.ts:350

Converts an object to an addressable object

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: Addressable


_objectToJson

_objectToJson(aObject: any): string

Defined in dnd.source.ts:108

Converts an object to a JSON string

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: string


_onDragEnd

_onDragEnd(aEvent: DndEvent): void

Defined in dnd.source.ts:888

The dragend callback

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent |

Returns: void


_onDragStart

_onDragStart(aEvent: DragEvent): void

Defined in dnd.source.ts:813

The dragstart callback

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DragEvent |

Returns: void


_onRemoveEffectAllowed

_onRemoveEffectAllowed(aEvent: DndEvent): void

Defined in dnd.source.ts:876

Removes the effect allowed property

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent |

Returns: void


_onRemovePayload

_onRemovePayload(aEvent: DndEvent): void

Defined in dnd.source.ts:864

Removes the payload

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent |

Returns: void


_onSetEffectAllowed

_onSetEffectAllowed(aEvent: DndEvent, aEffect?: string): void

Defined in dnd.source.ts:852

Sets the effect allowed property

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent | | Optional aEffect | string |

Returns: void


_onSetPayload

_onSetPayload(aEvent: DndEvent, ...aAddressables: AddressableInput[]): void

Defined in dnd.source.ts:831

Sets the payload

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DndEvent | | Rest aAddressables | AddressableInput[] |

Returns: void


_preventDefault

_preventDefault(aEvent: Event): void

Defined in dnd.source.ts:295

Prevents the default behaviour on the event

Parameters:

| Name | Type | | ------ | ------ | | aEvent | Event |

Returns: void


_removeEffectAllowed

_removeEffectAllowed(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DndEvent): void

Defined in dnd.source.ts:750

Cleanup of the effect allowed property, the inverse operation to _setEffectAllowed

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DndEvent |

Returns: void


_removePayload

_removePayload(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DndEvent): void

Defined in dnd.source.ts:732

Cleanup of the event payload, the inverse operation to _setPayload

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DndEvent |

Returns: void


_setEffectAllowed

_setEffectAllowed(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DndEvent, aEffect?: string): void

Defined in dnd.source.ts:705

Sets the effectAllowed attribute based on what is provided by the data transfer object

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DndEvent | | Optional aEffect | string |

Returns: void


_setPayload

_setPayload(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DndEvent, aAddressables: AddressableInput, aDocument: Document): void

Defined in dnd.source.ts:677

Initializes the HTML5 payload with the given addressables

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DndEvent | | aAddressables | AddressableInput | | aDocument | Document |

Returns: void


_setToLocalStorage

_setToLocalStorage(aPayload: string, aLocalStorageKey: string, aLocalStorage: Storage): void

Defined in dnd.source.ts:645

Stores the DND payload in HTML local storage

Parameters:

| Name | Type | | ------ | ------ | | aPayload | string | | aLocalStorageKey | string | | aLocalStorage | Storage |

Returns: void


_stringToAddressable

_stringToAddressable(aUri: string): Addressable

Defined in dnd.source.ts:337

Converts a string URI string into an addressable object

Parameters:

| Name | Type | | ------ | ------ | | aUri | string |

Returns: Addressable


_toString

_toString(aObject: any): string

Defined in dnd.source.ts:121

Converts the object to a string

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: string


_toStringArray

_toStringArray(aObject: any): string[]

Defined in dnd.source.ts:252

Converts the object to a string array

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: string[]


_trim

_trim(aString: string): string

Defined in dnd.source.ts:134

Trims whitespaces from the string

Parameters:

| Name | Type | | ------ | ------ | | aString | string |

Returns: string


@ibm-wch-sdk/layout-editor > "dnd.target"

External module: "dnd.target"

Index

Interfaces

Type aliases

Variables

Functions


Type aliases

UrlGenerator

Ƭ UrlGenerator: function

Defined in dnd.target.ts:8

Type declaration

▸(addr: Addressable, evt: DragEvent): string

Parameters:

| Name | Type | | ------ | ------ | | addr | Addressable | | evt | DragEvent |

Returns: string


ValidationCallback

Ƭ ValidationCallback: function

Defined in dnd.target.ts:9

Type declaration

▸(addr: Addressable, effect: string): any

Parameters:

| Name | Type | | ------ | ------ | | addr | Addressable | | effect | string |

Returns: any


Variables

<Const> _DND_ALL

● _DND_ALL: "all" = "all"

Defined in dnd.target.ts:71

DND all operation


<Const> _DND_COPY

● _DND_COPY: "copy" = "copy"

Defined in dnd.target.ts:35

DND copy operation


<Const> _DND_COPY_INDEX

● _DND_COPY_INDEX: 1 = 1

Defined in dnd.target.ts:131

bitmask for the copy effect


<Const> _DND_COPY_LINK

● _DND_COPY_LINK: "copyLink" = "copyLink"

Defined in dnd.target.ts:61

DND copy/link operation


<Const> _DND_COPY_MOVE

● _DND_COPY_MOVE: "copyMove" = "copyMove"

Defined in dnd.target.ts:56

DND copy/move operation


<Const> _DND_LINK

● _DND_LINK: "link" = "link"

Defined in dnd.target.ts:51

DND link operation


<Const> _DND_LINK_INDEX

● _DND_LINK_INDEX: 2 = 2

Defined in dnd.target.ts:141

bitmask for the link effect


<Const> _DND_LINK_MOVE

● _DND_LINK_MOVE: "linkMove" = "linkMove"

Defined in dnd.target.ts:66

DND link/move operation


<Const> _DND_MOVE

● _DND_MOVE: "move" = "move"

Defined in dnd.target.ts:43

DND move operation


<Const> _DND_MOVE_INDEX

● _DND_MOVE_INDEX: 4 = 4

Defined in dnd.target.ts:136

bitmask for the move effect


<Const> _DND_NONE

● _DND_NONE: "none" = "none"

Defined in dnd.target.ts:76

DND none operation


<Const> _DND_UNINITIALIZED

● _DND_UNINITIALIZED: "uninitialized" = "uninitialized"

Defined in dnd.target.ts:27


<Const> _EFFECTS_ALLOWED

● _EFFECTS_ALLOWED: string[] = [ _DND_NONE, _DND_COPY, _DND_LINK, _DND_COPY_LINK, _DND_MOVE, _DND_COPY_MOVE, _DND_LINK_MOVE, _DND_ALL ]

Defined in dnd.target.ts:147

Complete list of allowed effects, ordered by set bits, assuming that COPY=1, LINK=2, MOVE=4, DND_NONE = 000b = 0, DND_COPY = 001b = 1, DND_LINK = 010b = 2, DND_COPY_LINK = 011b = 3, DND_MOVE = 100b = 4, DND_COPY_MOVE = 101b = 5, DND_LINK_MOVE = 110b = 6, DND_ALL = 111b = 7


<Const> _EFFECTS_ALLOWED_MAP

● _EFFECTS_ALLOWED_MAP: Record<string, number> = (function() { // initialize the map var i = _EFFECTS_ALLOWED.length, effect, result = {}; while (i > 0) { // get the effect effect = _EFFECTS_ALLOWED[--i]; // add in different formats result[effect] = i; result[effect.toLowerCase()] = i; result[effect.toUpperCase()] = i; } // ok return result; })()

Defined in dnd.target.ts:161

Mapping from effect string to effect index


<Const> _INPUT_FIELD_DROP_EFFECT

● _INPUT_FIELD_DROP_EFFECT: "action" = "action"

Defined in dnd.target.ts:101

The name of the action input field


<Const> _INPUT_FIELD_EFFECT_ALLOWED

● _INPUT_FIELD_EFFECT_ALLOWED: "allowedAction" = "allowedAction"

Defined in dnd.target.ts:106

The name of the allowed action input field


<Const> _INPUT_FIELD_SOURCE

● _INPUT_FIELD_SOURCE: "source" = "source"

Defined in dnd.target.ts:96

The name of the source input field


<Const> _JSON

● _JSON: JSON = JSON

Defined in dnd.target.ts:121

Access to the JSON APIs


<Const> _JSON_REGEXP

● _JSON_REGEXP: RegExp = /{.*}/

Defined in dnd.target.ts:181

Regular expression to test for a JSON string


<Const> _LAST_MODIFIED

● _LAST_MODIFIED: "last-modified" = "last-modified"

Defined in dnd.target.ts:111

Last modified parameter for files


<Const> _MIME_TYPE_TEXT

● _MIME_TYPE_TEXT: "text/plain" = "text/plain"

Defined in dnd.target.ts:86

Mime type for text


<Const> _Object

● _Object: ObjectConstructor = Object

Defined in dnd.target.ts:126

The global object reference


<Const> _SCHEME_FILE

● _SCHEME_FILE: "file:" = "file:"

Defined in dnd.target.ts:116

URI scheme for files


<Const> _TRANSFER_TYPE_FILES

● _TRANSFER_TYPE_FILES: "Files" = "Files"

Defined in dnd.target.ts:91

Data transfer type for files


<Const> _TRANSFER_TYPE_TEXT

● _TRANSFER_TYPE_TEXT: "text" = "text"

Defined in dnd.target.ts:81

Data transfer type for text


<Const> _document

● _document: Document = document

Defined in dnd.target.ts:1108


<Let> _effectAllowed

● _effectAllowed: string

Defined in dnd.target.ts:186

local effect allowed property as retreived from the local storage


<Const> _encodeURIComponent

● _encodeURIComponent: encodeURIComponent = encodeURIComponent

Defined in dnd.target.ts:216

Function that performs URL escaping on strings


<Const> _keyEffectAllowed

● _keyEffectAllowed: "com.ibm.portal.dnd.effect.allowed" = KEY_EFFECT_ALLOWED

Defined in dnd.target.ts:1098


<Const> _keyPayload

● _keyPayload: "com.ibm.portal.dnd.payload" = KEY_PAYLOAD

Defined in dnd.target.ts:1093


<Const> _localStorage

● _localStorage: Storage = localStorage

Defined in dnd.target.ts:1103


Functions

_addAddressable

_addAddressable(aForm: HTMLFormElement, aAddressable: Addressable): void

Defined in dnd.target.ts:642

Adds a single addressable to the form

Parameters:

| Name | Type | | ------ | ------ | | aForm | HTMLFormElement | | aAddressable | Addressable |

Returns: void


_addAddressables

_addAddressables(aForm: HTMLFormElement, aAddressables: Addressable[]): void

Defined in dnd.target.ts:683

Adds the event payload to the form

Parameters:

| Name | Type | | ------ | ------ | | aForm | HTMLFormElement | | aAddressables | Addressable[] |

Returns: void


_addDropEffect

_addDropEffect(aForm: HTMLFormElement, aDropEffect: string): void

Defined in dnd.target.ts:698

Adds the drop effect to the form

Parameters:

| Name | Type | | ------ | ------ | | aForm | HTMLFormElement | | aDropEffect | string |

Returns: void


_addEffectAllowed

_addEffectAllowed(aForm: HTMLFormElement, aEffectAllowed: string): void

Defined in dnd.target.ts:706

Adds the effect allowed property to the form

Parameters:

| Name | Type | | ------ | ------ | | aForm | HTMLFormElement | | aEffectAllowed | string |

Returns: void


_addEventListener

_addEventListener<K>(aElement: HTMLElement, aName: K, aCallback: function): void

Defined in dnd.target.ts:235

Registers an event callback with the element

Type parameters:

K : keyof HTMLElementEventMap

Parameters:

| Name | Type | | ------ | ------ | | aElement | HTMLElement | | aName | K | | aCallback | function |

Returns: void


_addInputField

_addInputField(aForm: HTMLFormElement, aKey: string, aValue: string): void

Defined in dnd.target.ts:432

Adds a new input field

Parameters:

| Name | Type | | ------ | ------ | | aForm | HTMLFormElement | | aKey | string | | aValue | string |

Returns: void


_andEffectsAllowed

_andEffectsAllowed(aLeft: string, aRight: string): string

Defined in dnd.target.ts:206

Peforms an AND operation on the action sets

Parameters:

| Name | Type | | ------ | ------ | | aLeft | string | | aRight | string |

Returns: string


_andInteger

_andInteger(aLeft: number, aRight: number): number

Defined in dnd.target.ts:199

Peforms an AND operation on integers

Parameters:

| Name | Type | | ------ | ------ | | aLeft | number | | aRight | number |

Returns: number


_clearLocalStorage

_clearLocalStorage(aLocalStorageKey: string, aLocalStorage: Storage): void

Defined in dnd.target.ts:1144

Performs payload cleanup for the HTML local storage

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage |

Returns: void


_contains

_contains<T>(aValue: T, aArray: T[]): boolean

Defined in dnd.target.ts:493

Check if the value is contained in the array

Type parameters:

T

Parameters:

| Name | Type | | ------ | ------ | | aValue | T | | aArray | T[] |

Returns: boolean


_copyPayloadTypes

_copyPayloadTypes(aArray: ReadonlyArray<string>): string[]

Defined in dnd.target.ts:500

Copies the source array

Parameters:

| Name | Type | | ------ | ------ | | aArray | ReadonlyArray<string> |

Returns: string[]


_createAddressable

_createAddressable(aUri: string, aParams: Parameters): Addressable

Defined in dnd.target.ts:347

Constructs an addressable object

Parameters:

| Name | Type | | ------ | ------ | | aUri | string | | aParams | Parameters |

Returns: Addressable


_decodeEffectsAllowed

_decodeEffectsAllowed(aValue?: string): string

Defined in dnd.target.ts:946

Decodes the value to a valid action name

Parameters:

| Name | Type | | ------ | ------ | | Optional aValue | string |

Returns: string


_decodeFiles

_decodeFiles(aFiles: FileList): Addressable[]

Defined in dnd.target.ts:386

Constructs a JSON payload based on the data transfer files

Parameters:

| Name | Type | | ------ | ------ | | aFiles | FileList |

Returns: Addressable[]


_decodePayload

_decodePayload(aPayloadString: string): Addressable[]

Defined in dnd.target.ts:357

Constructs a JSON payload based on the data transfer string

Parameters:

| Name | Type | | ------ | ------ | | aPayloadString | string |

Returns: Addressable[]


_getCombinedDropEffect

_getCombinedDropEffect(aValidationStore: any, aAddressables: Addressable[], aEvent: DragEvent): string

Defined in dnd.target.ts:888

Returns the drop effect for the data transfer object

Parameters:

| Name | Type | | ------ | ------ | | aValidationStore | any | | aAddressables | Addressable[] | | aEvent | DragEvent |

Returns: string


_getCombinedEffectsAllowed

_getCombinedEffectsAllowed(aValidationStore: any, aAddressables: Addressable[], aEvent: DragEvent): string

Defined in dnd.target.ts:839

Returns the allowed drop effects as a combination between the effects allowed by the drag source and the allowed effects by the drop target.

Parameters:

| Name | Type | | ------ | ------ | | aValidationStore | any | | aAddressables | Addressable[] | | aEvent | DragEvent |

Returns: string


_getDataTransfer

_getDataTransfer(aEvent: DragEvent): DataTransfer

Defined in dnd.target.ts:447

Returns the data transfer object from the event

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DragEvent |

Returns: DataTransfer


_getDropEffect

_getDropEffect(aEvent: DragEvent): string

Defined in dnd.target.ts:864

Safely decodes the drop effect from the event.

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DragEvent |

Returns: string


_getDropEffectFromEffectsAllowed

_getDropEffectFromEffectsAllowed(aEffectsAllowed: string, aEvent: DragEvent): string

Defined in dnd.target.ts:756

Compute the desired effect given the allowed effects. The allowed effects are already the intersection between the allowed effects that the drag source has defined and the allowed effects that the validation target has defined.

This code also takes modifier keys into account.

drag + CTRL = copy drag + SHIFT + CTRL = link

Parameters:

| Name | Type | | ------ | ------ | | aEffectsAllowed | string | | aEvent | DragEvent |

Returns: string


_getDropEffectFromEffectsAllowedWithFallback

_getDropEffectFromEffectsAllowedWithFallback(aEffectsAllowedIndex: number, ...other: number[]): number

Defined in dnd.target.ts:724

Tests a fallback sequence to compute the allowed effects

Parameters:

| Name | Type | | ------ | ------ | | aEffectsAllowedIndex | number | | Rest other | number[] |

Returns: number


_getDropTarget

_getDropTarget(aValidator: any): DropTarget

Defined in dnd.target.ts:1183

Constructs a drop target object that performs validation

Parameters:

| Name | Type | | ------ | ------ | | aValidator | any |

Returns: DropTarget


_getEffectAllowed

_getEffectAllowed(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DragEvent): string

Defined in dnd.target.ts:624

Returns the effect allowed property for the DND event as a string

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DragEvent |

Returns: string


_getEffectsAllowed

_getEffectsAllowed(aValidationStore: any, aAddressables: Addressable[]): string

Defined in dnd.target.ts:800

Decodes the allowed effects based on a cached store result and a list of addressable objects

Parameters:

| Name | Type | | ------ | ------ | | aValidationStore | any | | aAddressables | Addressable[] |

Returns: string


_getEffectsAllowedIndex

_getEffectsAllowedIndex(aEffectsAllowed: string): number

Defined in dnd.target.ts:191

Maps the effects allowed string to an index

Parameters:

| Name | Type | | ------ | ------ | | aEffectsAllowed | string |

Returns: number


_getElement

_getElement(aElementRef: HTMLElement | string, aDocument: Document): HTMLElement

Defined in dnd.target.ts:331

Locates an element

Parameters:

| Name | Type | | ------ | ------ | | aElementRef | HTMLElement | string | | aDocument | Document |

Returns: HTMLElement


_getElementById

_getElementById(aId: string, aDocument: Document): HTMLElement

Defined in dnd.target.ts:228

Returns an element by ID

Parameters:

| Name | Type | | ------ | ------ | | aId | string | | aDocument | Document |

Returns: HTMLElement


_getFromLocalStorage

_getFromLocalStorage(aLocalStorageKey: string, aLocalStorage: Storage): string

Defined in dnd.target.ts:454

Receives the DND payload from the local storage

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage |

Returns: string


_getPayload

_getPayload(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DragEvent): Addressable[]

Defined in dnd.target.ts:570

Returns the event payload for the DND event as an object

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DragEvent |

Returns: Addressable[]


_getPayloadTypes

_getPayloadTypes(aLocalStorageKey: string, aLocalStorage: Storage, aEvent: DragEvent): string[]

Defined in dnd.target.ts:540

Decodes the available payload types. If not available on the event, we check for the availability of the data in localstorage.

Parameters:

| Name | Type | | ------ | ------ | | aLocalStorageKey | string | | aLocalStorage | Storage | | aEvent | DragEvent |

Returns: string[]


_getRESTValidator

_getRESTValidator(aGenerator: UrlGenerator | HTMLAnchorElement | string, aDocument: Document): _onValidate

Defined in dnd.target.ts:1058

Returns a RESTful validator

Parameters:

| Name | Type | | ------ | ------ | | aGenerator | UrlGenerator | HTMLAnchorElement | string | | aDocument | Document |

Returns: _onValidate


_getType

_getType(aObject: any): string

Defined in dnd.target.ts:263

Returns a type string for the object

Parameters:

| Name | Type | | ------ | ------ | | aObject | any |

Returns: string


_getUrlGenerator

_getUrlGenerator(aGenerator: UrlGenerator | HTMLAnchorElement | string, aDocument: Document): UrlGenerator

Defined in dnd.target.ts:1023

Produces a URL generator for the input

Parameters:

| Name | Type | | ------ | ------ | | aGenerator | UrlGenerator | HTMLAnchorElement | string | | aDocument | Document |

Returns: UrlGenerator


_getUrlGeneratorFromElement

_getUrlGeneratorFromElement(aAnchor: HTMLAnchorElement): UrlGenerator

Defined in dnd.target.ts:1016

Decodes the URL generator from an anchor element

Parameters:

| Name | Type | | ------ | ------ | | aAnchor | HTMLAnchorElement |

Returns: UrlGenerator


_getUrlGeneratorFromUrl

_getUrlGeneratorFromUrl(aBaseURL: string): UrlGenerator

Defined in dnd.target.ts:1003

Constructs a generator callback from a URL string

Parameters:

| Name | Type | | ------ | ------ | | aBaseURL | string |

Returns: UrlGenerator


_hasTransferTypeFiles

_hasTransferTypeFiles(aTypes: string[]): boolean

Defined in dnd.target.ts:530

Check if we have a data transfer type of files

Parameters:

| Name | Type | | ------ | ------ | | aTypes | string[] |

Returns: boolean


_hasTransferTypeString

_hasTransferTypeString(aTypes: string[]): boolean

Defined in dnd.target.ts:519

Check if we have a data transfer type of plain text

Parameters:

| Name | Type | | ------ | ------ | | aTypes | string[] |

Returns: boolean


_isAnchor

_isAnchor(aType: string): boolean

Defined in dnd.target.ts:300

Checks if the type is an anchor

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isArray

_isArray(aType: string): boolean

Defined in dnd.target.ts:280

Checks if the type is an array type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isFunction

_isFunction(aType: string): boolean

Defined in dnd.target.ts:290

Checks if the type is a function type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isJson

_isJson(aString: string): boolean

Defined in dnd.target.ts:474

Basic test to see if a value is in JSON format

Parameters:

| Name | Type | | ------ | ------ | | aString | string |

Returns: boolean


_isString

_isString(aType: string): boolean

Defined in dnd.target.ts:270

Checks if the type is a string type

Parameters:

| Name | Type | | ------ | ------ | | aType | string |

Returns: boolean


_isURL

_isURL(aString: string): boolean

Defined in dnd.target.ts:467

Basic test to verify if a string is a URL

Parameters:

| Name | Type | | ------ | ------ | | aString | string |

Returns: boolean


_isUninitializedEffectsAllowed

_isUninitializedEffectsAllowed(aEffectsAllowed?: string): boolean

Defined in dnd.target.ts:310

Check if the effects allowed are uninitialized

Parameters:

| Name | Type | | ------ | ------ | | Optional aEffectsAllowed | string |

Returns: boolean


_isValidPayload

_isValidPayload(aPayloadString: string): boolean

Defined in dnd.target.ts:482

Checks if the payload string is valid

Parameters:

| Name | Type | | ------ | ------ | | aPayloadString | string |

Returns: boolean


_jsonToObject

_jsonToObject(aJson: string): any

Defined in dnd.target.ts:320

Converts the JSON string to a JSON object

Parameters:

| Name | Type | | ------ | ------ | | aJson | string |

Returns: any


_noop

_noop(): void

Defined in dnd.target.ts:221

Helper that just does nothing

Returns: void


_onAddPayload

_onAddPayload(aFormRef: HTMLFormElement | string, aEvent: DragEvent): void

Defined in dnd.target.ts:1154

Adds the current DND payload to a form

Parameters:

| Name | Type | | ------ | ------ | | aFormRef | HTMLFormElement | string | | aEvent | DragEvent |

Returns: void


_onGetEffectAllowed

_onGetEffectAllowed(aEvent: DragEvent): string

Defined in dnd.target.ts:1133

Returns the event effect allowed property for the DND event as an object

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DragEvent |

Returns: string


_onGetPayload

_onGetPayload(aEvent: DragEvent): Addressable[]

Defined in dnd.target.ts:1122

Returns the event payload for the DND event as an object

Parameters:

| Name | Type | | ------ | ------ | | aEvent | DragEvent |

Returns: Addressable[]


_onGetRESTValidator

_onGetRESTValidator(aGenerator: UrlGenerator | HTMLAnchorElement | string): _onValidate

Defined in dnd.target.ts:1113

Returns a RESTful validator

Parameters:

| Name | Type | | ------ | ------ | | aGenerator | UrlGenerator | HTMLAnchorElement | string |

Returns: _onValidate


_prepareValidationURL

_prepareValidationURL(aBaseURL: string): string

Defined in dnd.target.ts:992

Prepares the validation URL by stripping a potential hash and adding a terminator token

Parameters:

| Name | Type | | ------ | ------ | | aBaseURL | string |

Returns: string


_preventDefault

_preventDefault(aEvent: Event): void

Defined in dnd.target.ts:938

Prevents the default behaviour on the event

Parameters:

| Name | Type | | ------ | ------ | | aEvent | Event |

Returns: void


_put

_put<T>(aKey: string, aValue: T, aObject: any): T

Defined in dnd.target.ts:248

Adds the key/value pair to the object and returns the added

Type parameters:

T

Parameters:

| Name | Type | | ------ | ------ | | aKey | string | | aValue | T | | aObject | any |

Returns: T


_sendValidationRequest

_sendValidationRequest(aValidationURL: string, aAddressable: Addressable, aCallback: ValidationCallback): void

Defined in dnd.target.ts:961

Sends a validation request and persists the result in the store

Parameters:

| Name | Type | | ------ | ------ | | aValidationURL | string | | aAddressable | Addressable | | aCallback | ValidationCallback |

Returns: void


_setAttribute

_setAttribute(aElement: HTMLElement, aName: string, aValue: string): void

Defined in dnd.target.ts:425

Adds a new attribute to the element

Parameters:

| Name | Type | | ------ | ------ | | aElement | HTMLElement | | aName | string | | aValue | string |

Returns: void


_setDropEffect

_setDropEffect(aValidationStore: any, aAddressables: *[Addressable](#_85ec1450dd3a96c22e328c33f272c63c9b72ac6c9fe28