7.2.608 • Published 5 years ago

@ibm-wch-sdk/layout-editor v7.2.608

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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:

NameType
aDstAddressable[]
aObjectAddressableInput
aDocumentDocument

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:

NameType
aDstAddressable[]
aObjectHTMLDListElement

Returns: void


_addAddressablesFromElement

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

Defined in dnd.source.ts:406

Converts an HTML element to an addressable object

Parameters:

NameType
aDstAddressable[]
aObjectElement

Returns: void


_addAddressablesFromString

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

Defined in dnd.source.ts:375

Adds a set of addressabled

Parameters:

NameType
aDstAddressable[]
aUrisstring
aParamsParameters

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:

NameType
aElementHTMLElement
aNameK
aCallbackfunction

Returns: void


_addEventListeners

_addEventListeners(aElementRef: HTMLElement | string): void

Defined in dnd.source.ts:901

Registers the drag source events with the element

Parameters:

NameType
aElementRefHTMLElement | 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:

NameType
aLocalStorageKeystring
aLocalStorageStorage

Returns: void


_createAddressable

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

Defined in dnd.source.ts:322

Constructs an addressable object

Parameters:

NameType
aUristring
aParamsParameters

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:

NameType
aAddressablesAddressableInput
aDocumentDocument

Returns: string


_getDataFromNode

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

Defined in dnd.source.ts:95

Accesses a data- attribute from a root node

Parameters:

NameType
aNamestring
aNodeElement

Returns: string


_getDataTransfer

_getDataTransfer(aEvent: DndEvent): DataTransfer

Defined in dnd.source.ts:631

Returns the data transfer object from the event

Parameters:

NameType
aEventDndEvent

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:

NameType
aElementRefHTMLElement | string
aDocumentDocument

Returns: HTMLElement


_getElementById

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

Defined in dnd.source.ts:81

Returns an element by ID

Parameters:

NameType
aIdstring
aDocumentDocument

Returns: HTMLElement


_getTextContent

_getTextContent(aElement: Element): string

Defined in dnd.source.ts:308

Accesses the textual content of an element

Parameters:

NameType
aElementElement

Returns: string


_getType

_getType(aObject: any): string

Defined in dnd.source.ts:147

Returns a type string for the object

Parameters:

NameType
aObjectany

Returns: string


_isAnchor

_isAnchor(aType: string): boolean

Defined in dnd.source.ts:213

Checks if the type is an anchor

Parameters:

NameType
aTypestring

Returns: boolean


_isArray

_isArray(aType: string): boolean

Defined in dnd.source.ts:173

Checks if the type is an array type

Parameters:

NameType
aTypestring

Returns: boolean


_isDefinitionList

_isDefinitionList(aType: string): boolean

Defined in dnd.source.ts:239

Checks if the type is a definition list

Parameters:

NameType
aTypestring

Returns: boolean


_isDiv

_isDiv(aType: string): boolean

Defined in dnd.source.ts:226

Checks if the type is a div element

Parameters:

NameType
aTypestring

Returns: boolean


_isNodeList

_isNodeList(aType: string): boolean

Defined in dnd.source.ts:199

Checks if the type is a list of HTML elements

Parameters:

NameType
aTypestring

Returns: boolean


_isObject

_isObject(aType: string): boolean

Defined in dnd.source.ts:186

Checks if the type is an object type

Parameters:

NameType
aTypestring

Returns: boolean


_isString

_isString(aType: string): boolean

Defined in dnd.source.ts:160

Checks if the type is a string type

Parameters:

NameType
aTypestring

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:

NameType
aObjectany

Returns: Addressable


_objectToJson

_objectToJson(aObject: any): string

Defined in dnd.source.ts:108

Converts an object to a JSON string

Parameters:

NameType
aObjectany

Returns: string


_onDragEnd

_onDragEnd(aEvent: DndEvent): void

Defined in dnd.source.ts:888

The dragend callback

Parameters:

NameType
aEventDndEvent

Returns: void


_onDragStart

_onDragStart(aEvent: DragEvent): void

Defined in dnd.source.ts:813

The dragstart callback

Parameters:

NameType
aEventDragEvent

Returns: void


_onRemoveEffectAllowed

_onRemoveEffectAllowed(aEvent: DndEvent): void

Defined in dnd.source.ts:876

Removes the effect allowed property

Parameters:

NameType
aEventDndEvent

Returns: void


_onRemovePayload

_onRemovePayload(aEvent: DndEvent): void

Defined in dnd.source.ts:864

Removes the payload

Parameters:

NameType
aEventDndEvent

Returns: void


_onSetEffectAllowed

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

Defined in dnd.source.ts:852

Sets the effect allowed property

Parameters:

NameType
aEventDndEvent
Optional aEffectstring

Returns: void


_onSetPayload

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

Defined in dnd.source.ts:831

Sets the payload

Parameters:

NameType
aEventDndEvent
Rest aAddressablesAddressableInput[]

Returns: void


_preventDefault

_preventDefault(aEvent: Event): void

Defined in dnd.source.ts:295

Prevents the default behaviour on the event

Parameters:

NameType
aEventEvent

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDndEvent

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDndEvent

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDndEvent
Optional aEffectstring

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDndEvent
aAddressablesAddressableInput
aDocumentDocument

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:

NameType
aPayloadstring
aLocalStorageKeystring
aLocalStorageStorage

Returns: void


_stringToAddressable

_stringToAddressable(aUri: string): Addressable

Defined in dnd.source.ts:337

Converts a string URI string into an addressable object

Parameters:

NameType
aUristring

Returns: Addressable


_toString

_toString(aObject: any): string

Defined in dnd.source.ts:121

Converts the object to a string

Parameters:

NameType
aObjectany

Returns: string


_toStringArray

_toStringArray(aObject: any): string[]

Defined in dnd.source.ts:252

Converts the object to a string array

Parameters:

NameType
aObjectany

Returns: string[]


_trim

_trim(aString: string): string

Defined in dnd.source.ts:134

Trims whitespaces from the string

Parameters:

NameType
aStringstring

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:

NameType
addrAddressable
evtDragEvent

Returns: string


ValidationCallback

Ƭ ValidationCallback: function

Defined in dnd.target.ts:9

Type declaration

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

Parameters:

NameType
addrAddressable
effectstring

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 resulteffect = i; resulteffect.toLowerCase() = i; resulteffect.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:

NameType
aFormHTMLFormElement
aAddressableAddressable

Returns: void


_addAddressables

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

Defined in dnd.target.ts:683

Adds the event payload to the form

Parameters:

NameType
aFormHTMLFormElement
aAddressablesAddressable[]

Returns: void


_addDropEffect

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

Defined in dnd.target.ts:698

Adds the drop effect to the form

Parameters:

NameType
aFormHTMLFormElement
aDropEffectstring

Returns: void


_addEffectAllowed

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

Defined in dnd.target.ts:706

Adds the effect allowed property to the form

Parameters:

NameType
aFormHTMLFormElement
aEffectAllowedstring

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:

NameType
aElementHTMLElement
aNameK
aCallbackfunction

Returns: void


_addInputField

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

Defined in dnd.target.ts:432

Adds a new input field

Parameters:

NameType
aFormHTMLFormElement
aKeystring
aValuestring

Returns: void


_andEffectsAllowed

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

Defined in dnd.target.ts:206

Peforms an AND operation on the action sets

Parameters:

NameType
aLeftstring
aRightstring

Returns: string


_andInteger

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

Defined in dnd.target.ts:199

Peforms an AND operation on integers

Parameters:

NameType
aLeftnumber
aRightnumber

Returns: number


_clearLocalStorage

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

Defined in dnd.target.ts:1144

Performs payload cleanup for the HTML local storage

Parameters:

NameType
aLocalStorageKeystring
aLocalStorageStorage

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:

NameType
aValueT
aArrayT[]

Returns: boolean


_copyPayloadTypes

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

Defined in dnd.target.ts:500

Copies the source array

Parameters:

NameType
aArrayReadonlyArray<string>

Returns: string[]


_createAddressable

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

Defined in dnd.target.ts:347

Constructs an addressable object

Parameters:

NameType
aUristring
aParamsParameters

Returns: Addressable


_decodeEffectsAllowed

_decodeEffectsAllowed(aValue?: string): string

Defined in dnd.target.ts:946

Decodes the value to a valid action name

Parameters:

NameType
Optional aValuestring

Returns: string


_decodeFiles

_decodeFiles(aFiles: FileList): Addressable[]

Defined in dnd.target.ts:386

Constructs a JSON payload based on the data transfer files

Parameters:

NameType
aFilesFileList

Returns: Addressable[]


_decodePayload

_decodePayload(aPayloadString: string): Addressable[]

Defined in dnd.target.ts:357

Constructs a JSON payload based on the data transfer string

Parameters:

NameType
aPayloadStringstring

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:

NameType
aValidationStoreany
aAddressablesAddressable[]
aEventDragEvent

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:

NameType
aValidationStoreany
aAddressablesAddressable[]
aEventDragEvent

Returns: string


_getDataTransfer

_getDataTransfer(aEvent: DragEvent): DataTransfer

Defined in dnd.target.ts:447

Returns the data transfer object from the event

Parameters:

NameType
aEventDragEvent

Returns: DataTransfer


_getDropEffect

_getDropEffect(aEvent: DragEvent): string

Defined in dnd.target.ts:864

Safely decodes the drop effect from the event.

Parameters:

NameType
aEventDragEvent

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:

NameType
aEffectsAllowedstring
aEventDragEvent

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:

NameType
aEffectsAllowedIndexnumber
Rest othernumber[]

Returns: number


_getDropTarget

_getDropTarget(aValidator: any): DropTarget

Defined in dnd.target.ts:1183

Constructs a drop target object that performs validation

Parameters:

NameType
aValidatorany

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDragEvent

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:

NameType
aValidationStoreany
aAddressablesAddressable[]

Returns: string


_getEffectsAllowedIndex

_getEffectsAllowedIndex(aEffectsAllowed: string): number

Defined in dnd.target.ts:191

Maps the effects allowed string to an index

Parameters:

NameType
aEffectsAllowedstring

Returns: number


_getElement

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

Defined in dnd.target.ts:331

Locates an element

Parameters:

NameType
aElementRefHTMLElement | string
aDocumentDocument

Returns: HTMLElement


_getElementById

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

Defined in dnd.target.ts:228

Returns an element by ID

Parameters:

NameType
aIdstring
aDocumentDocument

Returns: HTMLElement


_getFromLocalStorage

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

Defined in dnd.target.ts:454

Receives the DND payload from the local storage

Parameters:

NameType
aLocalStorageKeystring
aLocalStorageStorage

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDragEvent

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:

NameType
aLocalStorageKeystring
aLocalStorageStorage
aEventDragEvent

Returns: string[]


_getRESTValidator

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

Defined in dnd.target.ts:1058

Returns a RESTful validator

Parameters:

NameType
aGeneratorUrlGenerator | HTMLAnchorElement | string
aDocumentDocument

Returns: _onValidate


_getType

_getType(aObject: any): string

Defined in dnd.target.ts:263

Returns a type string for the object

Parameters:

NameType
aObjectany

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:

NameType
aGeneratorUrlGenerator | HTMLAnchorElement | string
aDocumentDocument

Returns: UrlGenerator


_getUrlGeneratorFromElement

_getUrlGeneratorFromElement(aAnchor: HTMLAnchorElement): UrlGenerator

Defined in dnd.target.ts:1016

Decodes the URL generator from an anchor element

Parameters:

NameType
aAnchorHTMLAnchorElement

Returns: UrlGenerator


_getUrlGeneratorFromUrl

_getUrlGeneratorFromUrl(aBaseURL: string): UrlGenerator

Defined in dnd.target.ts:1003

Constructs a generator callback from a URL string

Parameters:

NameType
aBaseURLstring

Returns: UrlGenerator


_hasTransferTypeFiles

_hasTransferTypeFiles(aTypes: string[]): boolean

Defined in dnd.target.ts:530

Check if we have a data transfer type of files

Parameters:

NameType
aTypesstring[]

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:

NameType
aTypesstring[]

Returns: boolean


_isAnchor

_isAnchor(aType: string): boolean

Defined in dnd.target.ts:300

Checks if the type is an anchor

Parameters:

NameType
aTypestring

Returns: boolean


_isArray

_isArray(aType: string): boolean

Defined in dnd.target.ts:280

Checks if the type is an array type

Parameters:

NameType
aTypestring

Returns: boolean


_isFunction

_isFunction(aType: string): boolean

Defined in dnd.target.ts:290

Checks if the type is a function type

Parameters:

NameType
aTypestring

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:

NameType
aStringstring

Returns: boolean


_isString

_isString(aType: string): boolean

Defined in dnd.target.ts:270

Checks if the type is a string type

Parameters:

NameType
aTypestring

Returns: boolean


_isURL

_isURL(aString: string): boolean

Defined in dnd.target.ts:467

Basic test to verify if a string is a URL

Parameters:

NameType
aStringstring

Returns: boolean


_isUninitializedEffectsAllowed

_isUninitializedEffectsAllowed(aEffectsAllowed?: string): boolean

Defined in dnd.target.ts:310

Check if the effects allowed are uninitialized

Parameters:

NameType
Optional aEffectsAllowedstring

Returns: boolean


_isValidPayload

_isValidPayload(aPayloadString: string): boolean

Defined in dnd.target.ts:482

Checks if the payload string is valid

Parameters:

NameType
aPayloadStringstring

Returns: boolean


_jsonToObject

_jsonToObject(aJson: string): any

Defined in dnd.target.ts:320

Converts the JSON string to a JSON object

Parameters:

NameType
aJsonstring

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:

NameType
aFormRefHTMLFormElement | string
aEventDragEvent

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:

NameType
aEventDragEvent

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:

NameType
aEventDragEvent

Returns: Addressable[]


_onGetRESTValidator

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

Defined in dnd.target.ts:1113

Returns a RESTful validator

Parameters:

NameType
aGeneratorUrlGenerator | 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:

NameType
aBaseURLstring

Returns: string


_preventDefault

_preventDefault(aEvent: Event): void

Defined in dnd.target.ts:938

Prevents the default behaviour on the event

Parameters:

NameType
aEventEvent

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:

NameType
aKeystring
aValueT
aObjectany

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:

NameType
aValidationURLstring
aAddressableAddressable
aCallbackValidationCallback

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:

NameType
aElementHTMLElement
aNamestring
aValuestring

Returns: void


_setDropEffect

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

7.2.608

5 years ago

7.2.591

5 years ago

7.2.435

5 years ago

7.2.407

5 years ago

7.2.358

5 years ago

7.2.291

5 years ago

7.2.290

5 years ago

7.0.165

5 years ago

7.0.163

5 years ago

7.0.151

5 years ago