9.0.10076 • Published 4 years ago

@ibm-wch-sdk/utils v9.0.10076

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

ibm-wch-sdk-utils

Exposes framework independent APIs to support the implementation of ibm-wch-sdk-ng and similar SDK.

Details

Refer to the documentation.

Changes

CHANGELOG

Class documentation

Refer to the documentation.

Utils

This library contains a set of utility functions to help implementing applications of libraries against Watson Content Hub, e.g. WCH SDK. It is independent of any UI framework.

  • WCH WCH specific utility functions.
  • URL Utility functions that assist in working with URLs.

Changelog

Current

Added

  • New method "wchSiteIdFromBaseURL" to decode the site ID from a URL

6.0.185

Added

  • Added typecheck methods for the new group element type
  • New getCategoryLeaf helper function
  • Initial version

@ibm-wch-sdk/utils

Index

External modules


Utility functions to work with WCH

Compute the API URL

The WCH API URL differs between the live and the preview system. If you decide to configure you application with an explicit API URL, e.g. for applications that are hosted outside of WCH, then you need to feed in the correct version of the URL depending on the runtime system.

The wchGetHubInfoUrlProvider method provides a default implementation for this task. It takes the live version of the API URL and a callback predicate as an input. The callback decides based on the current base URL of the application if the application is in live or preview state. The helper function will then derive the correct API URL.

Example:

import { HubInfoUrlProvider } from '@ibm-wch-sdk/api';
import { wchGetHubInfoUrlProvider } from '@ibm-wch-sdk/utils';

export function apiUrl(): HubInfoUrlProvider {
  return wchGetHubInfoUrlProvider(
    'https://my10.digitalexperience.ibm.com/api/6f0ce0ff-8a25-4fac-b66a-5d42516247eb',
    baseURL => /preview/.test(baseURL.href)
  );
}

export const environment = {
  apiUrl
};

Note It is important that apiUrl is an exported function using the function statement. Arrow functions do NOT work for the AOT compiler.

Utility functions to work with URLs

@ibm-wch-sdk/utils > "cache/cache.utils"

External module: "cache/cache.utils"

Index

Type aliases

Variables

Functions


Type aliases

CacheAccessor

Ƭ CacheAccessor: function

Defined in cache/cache.utils.ts:8

Type declaration

▸(aKey: string, aCallback: CacheCallback<V>, aLogger?: Logger): V

Parameters:

ParamType
aKeystring
aCallbackCacheCallback<V>
Optional aLoggerLogger

Returns: V


CacheCallback

Ƭ CacheCallback: function

Defined in cache/cache.utils.ts:7

Type declaration

▸(aKey: string, aLogger?: Logger): V

Parameters:

ParamType
aKeystring
Optional aLoggerLogger

Returns: V


CacheImpl

Ƭ CacheImpl: CacheValue<V>[]

Defined in cache/cache.utils.ts:15


CacheValue

Ƭ CacheValue: string, V, boolean, number

Defined in cache/cache.utils.ts:14


Variables

<Const> DEFAULT_MAXCOUNT

● DEFAULT_MAXCOUNT: 100 = 100

Defined in cache/cache.utils.ts:21


<Const> DEFAULT_TIMEOUT

● DEFAULT_TIMEOUT: number = 30 * 1000

Defined in cache/cache.utils.ts:18


<Const> _currentTime

● _currentTime: now = Date.now

Defined in cache/cache.utils.ts:24


Functions

<Const> _createCache

_createCache<V>(aTimeout?: number, aMaxValues?: number, aLogger?: Logger): CacheAccessor<V>

Defined in cache/cache.utils.ts:34

Constructs a new cache

Type parameters:

V

Parameters:

ParamTypeDescription
Optional aTimeoutnumbertimeout
Optional aMaxValuesnumbermaximum cache entries
Optional aLoggerLogger

Returns: CacheAccessor<V> the accessor function


@ibm-wch-sdk/utils > "categories/categories"

External module: "categories/categories"

Index

Functions


Functions

<Const> getCategoryLeaf

getCategoryLeaf(aCategory: Category, aIndex?: number, aFallback?: string): string

Defined in categories/categories.ts:14

Extracts the last category element

Parameters:

ParamTypeDescription
aCategoryCategorythe category
Optional aIndexnumbercategory index
Optional aFallbackstringfallback

Returns: string the last element


@ibm-wch-sdk/utils > "compare/compare"

External module: "compare/compare"

Index

Type aliases

Functions


Type aliases

Comparator

Ƭ Comparator: BiFunction<T, T, number>

Defined in compare/compare.ts:6

Comparison operator


Functions

<Const> cmpNumbers

cmpNumbers(aLeft: number, aRight: number): 0 | 1 | -1

Defined in compare/compare.ts:16

Exports a comparator for numbers

Parameters:

ParamTypeDescription
aLeftnumberleft value to compare
aRightnumberright value to compare

Returns: 0 | 1 | -1

the result


<Const> cmpStrings

cmpStrings(aLeft: string, aRight: string): number

Defined in compare/compare.ts:27

Exports a comparator for numbers

Parameters:

ParamTypeDescription
aLeftstringleft value to compare
aRightstringright value to compare

Returns: number the result


@ibm-wch-sdk/utils > "consumers/consumer"

External module: "consumers/consumer"

Index

Type aliases


Type aliases

BiConsumer

Ƭ BiConsumer: BiFunction<T1, T2, any>

Defined in consumers/consumer.ts:5


BiFunction

Ƭ BiFunction: function

Defined in consumers/consumer.ts:4

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

ParamType
t1T1
t2T2

Returns: R


Consumer

Ƭ Consumer: UnaryFunction<T, any>

Defined in consumers/consumer.ts:3


@ibm-wch-sdk/utils > "cors/cors.utils"

External module: "cors/cors.utils"

Index

Variables

Functions


Variables

<Const> NULL_ORIGIN

● NULL_ORIGIN: "null" = "null"

Defined in cors/cors.utils.ts:11


<Const> _ALL_ORIGINS

● _ALL_ORIGINS: "" = ""

Defined in cors/cors.utils.ts:8


Functions

_testOrigin

_testOrigin(aOrigin: string, aAllowedOrigins: string[], aLogger?: Logger): boolean

Defined in cors/cors.utils.ts:21

Parameters:

ParamType
aOriginstring
aAllowedOriginsstring[]
Optional aLoggerLogger

Returns: boolean


@ibm-wch-sdk/utils > "debug/debug.utils"

External module: "debug/debug.utils"

Index

Type aliases

Variables

Functions


Type aliases

AddDebugCallback

Ƭ AddDebugCallback: function

Defined in debug/debug.utils.ts:13

Type declaration

▸(aDbg: any): void

Parameters:

ParamType
aDbgany

Returns: void


Variables

<Let> COUNTER

● COUNTER: number = 0

Defined in debug/debug.utils.ts:5


<Const> _isFrozen

● _isFrozen: isFrozen = Object.isFrozen

Defined in debug/debug.utils.ts:11


Functions

_addDebugInfo

_addDebugInfo<T>(aCallback: AddDebugCallback, aObject: T): T

Defined in debug/debug.utils.ts:33

Augments the object with debug information

Type parameters:

T

Parameters:

ParamTypeDescription
aCallbackAddDebugCallback
aObjectTthe object

Returns: T the object


_addSourceCallback

_addSourceCallback(aSource: string): AddDebugCallback

Defined in debug/debug.utils.ts:18

Adds source information

Parameters:

ParamType
aSourcestring

Returns: AddDebugCallback


_addSourceDebug

_addSourceDebug<T>(aSource: string, aObject: T): T

Defined in debug/debug.utils.ts:54

Adds source information

Type parameters:

T

Parameters:

ParamTypeDescription
aSourcestringsource info
aObjectTthe object

Returns: T the original object


_getCounter

_getCounter(): number

Defined in debug/debug.utils.ts:7

Returns: number


@ibm-wch-sdk/utils > "dom/dom.utils"

External module: "dom/dom.utils"

Index

Functions


Functions

getDocument

getDocument(aDocument?: Document, aWindow?: Window): Document

Defined in dom/dom.utils.ts:27

Returns a document object if one is available

Parameters:

ParamTypeDescription
Optional aDocumentDocumentthe document object
Optional aWindowWindowoptional window object

Returns: Document the resolved document object, using the global variable as a default


getWindow

getWindow(aWindow?: Window): Window

Defined in dom/dom.utils.ts:11

Returns a window object if one is available

Parameters:

ParamTypeDescription
Optional aWindowWindowthe window object

Returns: Window the resolved window object, using the global variable as a default


@ibm-wch-sdk/utils > "elements/element"

External module: "elements/element"

Index

Type aliases

Variables

Functions

Object literals


Type aliases

OptionalPredicate

Ƭ OptionalPredicate: function

Defined in elements/element.ts:938

Type declaration

▸(aValue: T, bOptional?: boolean): boolean

Parameters:

ParamType
aValueT
Optional bOptionalboolean

Returns: boolean


Variables

<Const> _PROP_ID

● _PROP_ID: "id" = "id"

Defined in elements/element.ts:89


<Const> _PROP_SELECTION

● _PROP_SELECTION: "selection" = "selection"

Defined in elements/element.ts:87


<Const> _PROP_TYPE

● _PROP_TYPE: "elementType" = "elementType"

Defined in elements/element.ts:84


<Const> _PROP_TYPE_REF

● _PROP_TYPE_REF: "typeRef" = "typeRef"

Defined in elements/element.ts:88


<Const> _PROP_VALUE

● _PROP_VALUE: "value" = "value"

Defined in elements/element.ts:85


<Const> _PROP_VALUES

● _PROP_VALUES: "values" = "values"

Defined in elements/element.ts:86


Functions

<Const> _falseHandler

_falseHandler(): boolean

Defined in elements/element.ts:982

Returns: boolean


<Const> _getElementHandler

_getElementHandler(aElementType: string, bOptional?: boolean): OptionalPredicate<any>

Defined in elements/element.ts:984

Parameters:

ParamType
aElementTypestring
Optional bOptionalboolean

Returns: OptionalPredicate<any>


<Const> _getValueHandler

_getValueHandler(aElementType: string, bOptional?: boolean): OptionalPredicate<any>

Defined in elements/element.ts:989

Parameters:

ParamType
aElementTypestring
Optional bOptionalboolean

Returns: OptionalPredicate<any>


_hasAssetAndUrl

_hasAssetAndUrl(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:532

Tests if an element has at least an asset and a URL

Parameters:

ParamTypeDescription
aValueanythe value to check
Optional bOptionalbooleanflag to test if the video is optional

Returns: boolean true if we have an video, else false


_isArrayOf

_isArrayOf<T>(aValue: any, aPredicate: IsPredicate<T>, bOptional?: boolean): boolean

Defined in elements/element.ts:123

Type parameters:

T

Parameters:

ParamType
aValueany
aPredicateIsPredicate<T>
Optional bOptionalboolean

Returns: boolean


_isAsset

_isAsset(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:518

Tests the value is a valid asset

Parameters:

ParamTypeDescription
aValueanythe value
Optional bOptionalbooleanflag to test if the asset is optional

Returns: boolean true if the element is an asset


_isBoolean

_isBoolean(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:185

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isCategory

_isCategory(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:476

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isCategoryElement

_isCategoryElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:491

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isDate

_isDate(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:247

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isDateElement

_isDateElement(aValue: any): boolean

Defined in elements/element.ts:472

Parameters:

ParamType
aValueany

Returns: boolean


_isElement

_isElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:1000

Tests if the value is a value element

Parameters:

ParamTypeDescription
aValueanythe value
Optional bOptionalboolean

Returns: boolean true if the value is a valid element


_isFile

_isFile(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:550

Tests if an element is a video. If the element is optional, it can be null or an arbitrary object. Otherwise we must have at least an asset and a URL.

Parameters:

ParamTypeDescription
aValueanythe value to check
Optional bOptionalbooleanflag to test if the video is optional

Returns: boolean true if we have an video, else false


_isFileElement

_isFileElement(aValue: any): boolean

Defined in elements/element.ts:506

Parameters:

ParamType
aValueany

Returns: boolean


_isFormattedTextElement

_isFormattedTextElement(aValue: any): boolean

Defined in elements/element.ts:340

Parameters:

ParamType
aValueany

Returns: boolean


_isGroup

_isGroup(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:301

Tests if the value is a vaid group

Parameters:

ParamTypeDescription
aValueanythe value
Optional bOptionalboolean

Returns: boolean true if the value is a group, else false


_isGroupElement

_isGroupElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:286

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isImage

_isImage(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:596

Tests if an element is an image. If the element is optional, it can be null or an arbitrary object. Otherwise we must have at least an asset and a URL.

Parameters:

ParamTypeDescription
aValueanythe value to check
Optional bOptionalbooleanflag to test if the image is optional

Returns: boolean true if we have an image, else false


_isImageElement

_isImageElement(aValue: any): boolean

Defined in elements/element.ts:646

Parameters:

ParamType
aValueany

Returns: boolean


_isLink

_isLink(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:578

Tests if we have a link element. We consider the element to exist if it has at least one of its fields set.

Parameters:

ParamTypeDescription
aValueanythe value
Optional bOptionalbooleanflag to test if the asset is optional

Returns: boolean true if the element is a link


_isLinkElement

_isLinkElement(aValue: any): boolean

Defined in elements/element.ts:462

Parameters:

ParamType
aValueany

Returns: boolean


_isLocation

_isLocation(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:785

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isLocationElement

_isLocationElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:799

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiDateElement

_isMultiDateElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:270

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiFileElement

_isMultiFileElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:620

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiFormattedTextElement

_isMultiFormattedTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:365

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiGroupElement

_isMultiGroupElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:324

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiImageElement

_isMultiImageElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:669

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiLinkElement

_isMultiLinkElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:727

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiNumberElement

_isMultiNumberElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:404

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiOptionSelectionElement

_isMultiOptionSelectionElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:153

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiProductElement

_isMultiProductElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:237

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiReferenceElement

_isMultiReferenceElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:775

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiTextElement

_isMultiTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:208

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiToggleElement

_isMultiToggleElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:446

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isMultiVideoElement

_isMultiVideoElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:698

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isNumber

_isNumber(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:181

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isNumberElement

_isNumberElement(aValue: any): boolean

Defined in elements/element.ts:381

Parameters:

ParamType
aValueany

Returns: boolean


_isOptionSelection

_isOptionSelection(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:113

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isOptionSelectionElement

_isOptionSelectionElement(aValue: any): boolean

Defined in elements/element.ts:107

Parameters:

ParamType
aValueany

Returns: boolean


_isProductElement

_isProductElement(aValue: any): boolean

Defined in elements/element.ts:173

Parameters:

ParamType
aValueany

Returns: boolean


_isReference

_isReference(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:747

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isReferenceElement

_isReferenceElement(aValue: any): boolean

Defined in elements/element.ts:743

Parameters:

ParamType
aValueany

Returns: boolean


_isSingleDateElement

_isSingleDateElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:257

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleFileElement

_isSingleFileElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:607

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleFormattedTextElement

_isSingleFormattedTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:350

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleGroupElement

_isSingleGroupElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:311

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleImageElement

_isSingleImageElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:656

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleLinkElement

_isSingleLinkElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:714

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleNumberElement

_isSingleNumberElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:391

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleOptionSelectionElement

_isSingleOptionSelectionElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:137

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleProductElement

_isSingleProductElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:224

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleReferenceElement

_isSingleReferenceElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:760

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleTextElement

_isSingleTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:195

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleToggleElement

_isSingleToggleElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:433

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSingleVideoElement

_isSingleVideoElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:685

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeDateElement

_isSomeDateElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:808

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeFileElement

_isSomeFileElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:818

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeFormattedTextElement

_isSomeFormattedTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:828

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeGroupElement

_isSomeGroupElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:838

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeImageElement

_isSomeImageElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:848

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeLinkElement

_isSomeLinkElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:858

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeNumberElement

_isSomeNumberElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:868

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeOptionSelectionElement

_isSomeOptionSelectionElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:878

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeProductElement

_isSomeProductElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:908

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeReferenceElement

_isSomeReferenceElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:888

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeTextElement

_isSomeTextElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:898

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeToggleElement

_isSomeToggleElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:918

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isSomeVideoElement

_isSomeVideoElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:928

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isString

_isString(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:177

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isTextElement

_isTextElement(aValue: any): boolean

Defined in elements/element.ts:169

Parameters:

ParamType
aValueany

Returns: boolean


_isToggleElement

_isToggleElement(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:420

Parameters:

ParamType
aValueany
Optional bOptionalboolean

Returns: boolean


_isType

_isType(aType: string, aValue: any | null | undefined): boolean

Defined in elements/element.ts:91

Parameters:

ParamType
aTypestring
aValueany | null | undefined

Returns: boolean


_isTypeRef

_isTypeRef(aValue: any): boolean

Defined in elements/element.ts:95

Parameters:

ParamType
aValueany

Returns: boolean


_isValueOf

_isValueOf(aType: string, aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:1015

Tests if the value is a value element

Parameters:

ParamTypeDescription
aTypestring
aValueanythe value
Optional bOptionalboolean

Returns: boolean true if the value is a valid element


_isVideo

_isVideo(aValue: any, bOptional?: boolean): boolean

Defined in elements/element.ts:564

Tests if an element is a video. If the element is optional, it can be null or an arbitrary object. Otherwise we must have at least an asset and a URL.

Parameters:

ParamTypeDescription
aValueanythe value to check
Optional bOptionalbooleanflag to test if the video is optional

Returns: boolean true if we have an video, else false


_isVideoElement

_isVideoElement(aValue: any): boolean

Defined in elements/element.ts:636

Parameters:

ParamType
aValueany

Returns: boolean


Object literals

<Const> ELEMENT_HANDLERS

ELEMENT_HANDLERS: object

Defined in elements/element.ts:943

Maps from element type to handler function

__computed

● __computed: _isSomeVideoElement = _isSomeVideoElement

Defined in elements/element.ts:944 Defined in elements/element.ts:945 Defined in elements/element.ts:946 Defined in elements/element.ts:947 Defined in elements/element.ts:948 Defined in elements/element.ts:949 Defined in elements/element.ts:950 Defined in elements/element.ts:951 Defined in elements/element.ts:952 Defined in elements/element.ts:953 Defined in elements/element.ts:954 Defined in elements/element.ts:955 Defined in elements/element.ts:956 Defined in elements/element.ts:957 Defined in elements/element.ts:958



<Const> VALUE_HANDLERS

VALUE_HANDLERS: object

Defined in elements/element.ts:964

Maps from element type to handler function

__computed

● __computed: _isVideo = _isVideo

Defined in elements/element.ts:965 Defined in elements/element.ts:966 Defined in elements/element.ts:967 Defined in elements/element.ts:968 Defined in elements/element.ts:969 Defined in elements/element.ts:970 Defined in elements/element.ts:971 Defined in elements/element.ts:972 Defined in elements/element.ts:973 Defined in elements/element.ts:974 Defined in elements/element.ts:975 Defined in elements/element.ts:976 Defined in elements/element.ts:977 Defined in elements/element.ts:978 Defined in elements/element.ts:979



@ibm-wch-sdk/utils > "error/error"

External module: "error/error"

Index

Functions


Functions

isErrorResponse

isErrorResponse(aResponse: any): boolean

Defined in error/error.ts:10

Tests if a response is an error response

Parameters:

ParamTypeDescription
aResponseanythe response object

Returns: boolean true if the response is an error response, else false


@ibm-wch-sdk/utils > "generators/generator"

External module: "generators/generator"

Index

Type aliases

Functions


Type aliases

Generator

Ƭ Generator: function

Defined in generators/generator.ts:5

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


GeneratorOrT

Ƭ GeneratorOrT: T | function

Defined in generators/generator.ts:7


Functions

<Const> _arrayGenerator

_arrayGenerator<T>(): T[]

Defined in generators/generator.ts:9

Type parameters:

T

Returns: T[]


<Const> _constGenerator

_constGenerator<T>(aValue: T): (Anonymous function)

Defined in generators/generator.ts:12

Type parameters:

T

Parameters:

ParamType
aValueT

Returns: (Anonymous function)


<Const> _fromGeneratorOrT

_fromGeneratorOrT<T>(aValue: GeneratorOrT<T>): any

Defined in generators/generator.ts:14

Type parameters:

T

Parameters:

ParamType
aValueGeneratorOrT<T>

Returns: any


<Const> _objectGenerator

_objectGenerator(): any

Defined in generators/generator.ts:10

Returns: any


@ibm-wch-sdk/utils > "generators/lazy.generator"

External module: "generators/lazy.generator"

Index

Functions


Functions

_lazyGenerator

_lazyGenerator<T>(aGenerator: Generator<T>): Generator<T>

Defined in generators/lazy.generator.ts:10

Creates a lazy generator for the value

Type parameters:

T

Parameters:

ParamTypeDescription
aGeneratorGenerator<T>the generator

Returns: Generator<T> the generator


@ibm-wch-sdk/utils > "hash/hash.utils"

External module: "hash/hash.utils"

Index

Variables

Functions


Variables

<Const> GOLDEN_RATIO_64

● GOLDEN_RATIO_64: 1140071481932319900 = 1140071481932319900

Defined in hash/hash.utils.ts:8


<Const> HASH_SEED_64

● HASH_SEED_64: 5177618702824568000 = 5177618702824568000

Defined in hash/hash.utils.ts:11


<Const> _DIGITS

● _DIGITS: "0123456789" = "0123456789"

Defined in hash/hash.utils.ts:41


<Const> _FIRST_LETTERS

● _FIRST_LETTERS: string = _START + _LOWERCASE + _UPPERCASE

Defined in hash/hash.utils.ts:46


<Const> _FIRST_LETTERS_LENGTH

● _FIRST_LETTERS_LENGTH: number = _FIRST_LETTERS.length

Defined in hash/hash.utils.ts:48


<Const> _LOWERCASE

● _LOWERCASE: "abcdefghijklmnopqrstuvwxyz" = "abcdefghijklmnopqrstuvwxyz"

Defined in hash/hash.utils.ts:42


<Const> _MAX_INT

● _MAX_INT: number = Number.MAX_SAFE_INTEGER

Defined in hash/hash.utils.ts:78


<Const> _NEXT_LETTERS

● _NEXT_LETTERS: string = _FIRST_LETTERS + _DIGITS

Defined in hash/hash.utils.ts:47


<Const> _NEXT_LETTERS_LENGTH

● _NEXT_LETTERS_LENGTH: number = _NEXT_LETTERS.length

Defined in hash/hash.utils.ts:49


<Const> _START

● _START: "$_" = "$_"

Defined in hash/hash.utils.ts:40


<Const> _UPPERCASE

● _UPPERCASE: string = _LOWERCASE.toUpperCase()

Defined in hash/hash.utils.ts:43


<Const> _abs

● _abs: abs = Math.abs

Defined in hash/hash.utils.ts:52


<Const> _floor

● _floor: floor = Math.floor

Defined in hash/hash.utils.ts:53


<Const> _random

● _random: random = Math.random

Defined in hash/hash.utils.ts:76


<Const> _trunc

● _trunc: trunc = Math.trunc

Defined in hash/hash.utils.ts:77


Functions

_hashString

_hashString(oldHash: number, s: string): number

Defined in hash/hash.utils.ts:35

Parameters:

ParamType
oldHashnumber
sstring

Returns: number


_hashStringSegment

_hashStringSegment(oldHash: number, start: number, len: number, s: string): number

Defined in hash/hash.utils.ts:27

Parameters:

ParamType
oldHashnumber
startnumber
lennumber
sstring

Returns: number


_hashToIdentifier

_hashToIdentifier(aHash: number): string

Defined in hash/hash.utils.ts:61

Parameters:

ParamType
aHashnumber

Returns: string


_longCombine

_longCombine(oldHash: number, data: number): number

Defined in hash/hash.utils.ts:22

Parameters:

ParamType
oldHashnumber
datanumber

Returns: number


_longHash

_longHash(): number

Defined in hash/hash.utils.ts:18

Returns: number


_randomIdentifier

_randomIdentifier(): string

Defined in hash/hash.utils.ts:85

Returns: string


@ibm-wch-sdk/utils > "html/html"

External module: "html/html"

Index

Variables

Functions

Object literals


Variables

<Const> _escapeMatch

● _escapeMatch: UnaryFunction<Object, never> = partialFirst(getProperty, htmlEscapes)

Defined in html/html.ts:22

Function that executes the escape


<Const> htmlEscaper

● htmlEscaper: RegExp = /&<>"'\//g

Defined in html/html.ts:17


Functions

<Const> _escapeHtml

_escapeHtml(aValue: string): string

Defined in html/html.ts:25

Parameters:

ParamType
aValuestring

Returns: string


<Const> escapeHtml

escapeHtml<T>(aValue: T): string | T

Defined in html/html.ts:34

Applies HTML escaping to strings

Type parameters:

T

Parameters:

ParamTypeDescription
aValueTthe value

Returns: string | T

the escaped value


Object literals

<Const> htmlEscapes

htmlEscapes: object

Defined in html/html.ts:7

"

": string = """

Defined in html/html.ts:11


&

&: string = "&"

Defined in html/html.ts:8


'

': string = "'"

Defined in html/html.ts:12


/

● /: string = "/"

Defined in html/html.ts:13


<

<: string = "<"

Defined in html/html.ts:9


>

>: string = ">"

Defined in html/html.ts:10



@ibm-wch-sdk/utils > "http/http.utils"

External module: "http/http.utils"

Index

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

Request

Ƭ Request: function

Defined in http/http.utils.ts:35

Type declaration

▸(aUrl: string, aOptions: HttpOptions): Observable<T>

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions

Returns: Observable<T>


Variables

<Const> DEFAULT_POLL_TIME

● DEFAULT_POLL_TIME: number = 10 * 1000

Defined in http/http.utils.ts:194


<Const> DEFAULT_POLL_TIME_VARIATION

● DEFAULT_POLL_TIME_VARIATION: 0.15 = 0.15

Defined in http/http.utils.ts:189


<Const> DEFAULT_RETRIES

● DEFAULT_RETRIES: 10 = 10

Defined in http/http.utils.ts:199


<Const> DEFAULT_USE_API

● DEFAULT_USE_API: true = true

Defined in http/http.utils.ts:209


<Const> DEFAULT_USE_BOOTSTRAP

● DEFAULT_USE_BOOTSTRAP: true = true

Defined in http/http.utils.ts:219


<Const> DEFAULT_USE_JSONP

● DEFAULT_USE_JSONP: true = true

Defined in http/http.utils.ts:224


<Const> DEFAULT_USE_LOCAL_STORAGE

● DEFAULT_USE_LOCAL_STORAGE: true = true

Defined in http/http.utils.ts:204


<Const> DEFAULT_USE_POLLING

● DEFAULT_USE_POLLING: true = true

Defined in http/http.utils.ts:229


<Const> DEFAULT_USE_STATIC_RESOURCES

● DEFAULT_USE_STATIC_RESOURCES: true = true

Defined in http/http.utils.ts:214


<Let> ID

● ID: number = 0

Defined in http/http.utils.ts:32


<Const> LOGGER

● LOGGER: "http.utils" = "http.utils"

Defined in http/http.utils.ts:17


<Const> MAX_POLL_TIME

● MAX_POLL_TIME: number = Number.MAX_SAFE_INTEGER

Defined in http/http.utils.ts:233


<Const> MAX_POLL_TIME_VARIATION

● MAX_POLL_TIME_VARIATION: 0.5 = 0.5

Defined in http/http.utils.ts:237


<Const> MIN_POLL_TIME

● MIN_POLL_TIME: 1000 = 1000

Defined in http/http.utils.ts:232


<Const> MIN_POLL_TIME_VARIATION

● MIN_POLL_TIME_VARIATION: 0 = 0

Defined in http/http.utils.ts:236


<Const> _addDebugSource

● _addDebugSource: function = dbgSourceCallback(LOGGER)

Defined in http/http.utils.ts:318

Type declaration

▸(aDbg: any): void

Parameters:

ParamType
aDbgany

Returns: void


<Const> _privateUrlJsonCache

● _privateUrlJsonCache: function = _lazyCache<Observable>()

Defined in http/http.utils.ts:275

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


<Const> _privateUrlStringCache

● _privateUrlStringCache: function = _lazyCache<Observable>()

Defined in http/http.utils.ts:274

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


<Const> _publicUrlJsonCache

● _publicUrlJsonCache: function = _lazyCache<Observable>()

Defined in http/http.utils.ts:271

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


<Const> _publicUrlStringCache

● _publicUrlStringCache: function = _lazyCache<Observable>()

Defined in http/http.utils.ts:270

Type declaration

▸(): T | null | undefined

Returns: T | null | undefined


Functions

_addDebug

_addDebug(aUrl: string, aResult: JsonMap): JsonMap

Defined in http/http.utils.ts:326

Add debugging information to the result

Parameters:

ParamTypeDescription
aUrlstringthe URL
aResultJsonMapthe result

Returns: JsonMap


_clip

_clip(aValue: number, aMin: number, aMax: number): number

Defined in http/http.utils.ts:246

Parameters:

ParamType
aValuenumber
aMinnumber
aMaxnumber

Returns: number


_createJsonResource

_createJsonResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<AnyJson>

Defined in http/http.utils.ts:336

Parameters:

ParamType
aURLstring
aHttpServiceHttpService
aWithCredentialsboolean
aTriggerObservable<any>
aOptionsHttpResourceOptions
Optional aLoggerLogger

Returns: Observable<AnyJson>


_createStringResource

_createStringResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:367

Parameters:

ParamType
aURLstring
aHttpServiceHttpService
aWithCredentialsboolean
aTriggerObservable<any>
aOptionsHttpResourceOptions
Optional aLoggerLogger

Returns: Observable<string>


_createTimer

_createTimer(aOptions?: HttpResourceOptions): Observable<any>

Defined in http/http.utils.ts:283

Parameters:

ParamType
Optional aOptionsHttpResourceOptions

Returns: Observable<any>


_getErrorResponse

_getErrorResponse(aError: any): ErrorResponse

Defined in http/http.utils.ts:43

Build an error response object

Parameters:

ParamTypeDescription
aErroranythe error

Returns: ErrorResponse the response


_getJsonResource

_getJsonResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions?: HttpResourceOptions, aLogger?: Logger): Observable<AnyJson>

Defined in http/http.utils.ts:441

Parameters:

ParamType
aURLstring
aHttpServiceHttpService
aWithCredentialsboolean
aTriggerObservable<any>
Optional aOptionsHttpResourceOptions
Optional aLoggerLogger

Returns: Observable<AnyJson>


_getStringResource

_getStringResource(aURL: string, aHttpService: HttpService, aWithCredentials: boolean, aTrigger: Observable<any>, aOptions: HttpResourceOptions, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:404

Represents an HTTP request, potentially made via the cache

Parameters:

ParamTypeDescription
aURLstring-
aHttpServiceHttpService-
aWithCredentialsboolean-
aTriggerObservable<any>-
aOptionsHttpResourceOptions-
Optional aLoggerLogger

Returns: Observable<string>


_lazyCache

_lazyCache<V>(): function

Defined in http/http.utils.ts:265

Creates a cache that will generated lazily

Type parameters:

V

Returns: function


_sendJsonRequest

_sendJsonRequest<T>(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aHttpService: HttpService, aLogger?: Logger): Observable<T>

Defined in http/http.utils.ts:142

Type parameters:

T

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions
aTriggerObservable<any>
aHttpServiceHttpService
Optional aLoggerLogger

Returns: Observable<T>


_sendRequest

_sendRequest<T>(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aRequest: Request<T>, aLogger: Logger): Observable<T>

Defined in http/http.utils.ts:69

Type parameters:

T

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions
aTriggerObservable<any>
aRequestRequest<T>
aLoggerLogger

Returns: Observable<T>


_sendTextRequest

_sendTextRequest(aUrl: string, aOptions: HttpOptions, aTrigger: Observable<any>, aHttpService: HttpService, aLogger?: Logger): Observable<string>

Defined in http/http.utils.ts:169

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions
aTriggerObservable<any>
aHttpServiceHttpService
Optional aLoggerLogger

Returns: Observable<string>


Object literals

<Const> DEFAULT_HTTP_RESOURCE_OPTIONS

DEFAULT_HTTP_RESOURCE_OPTIONS: object

Defined in http/http.utils.ts:250

pollTime

● pollTime: number = DEFAULT_POLL_TIME

Defined in http/http.utils.ts:252


pollTimeVariation

● pollTimeVariation: number = DEFAULT_POLL_TIME_VARIATION

Defined in http/http.utils.ts:251


retries

● retries: number = DEFAULT_RETRIES

Defined in http/http.utils.ts:253


useApi

● useApi: true = DEFAULT_USE_API

Defined in http/http.utils.ts:259


useBootstrap

● useBootstrap: true = DEFAULT_USE_BOOTSTRAP

Defined in http/http.utils.ts:255


useJsonP

● useJsonP: true = DEFAULT_USE_JSONP

Defined in http/http.utils.ts:257


useLocalStorage

● useLocalStorage: true = DEFAULT_USE_LOCAL_STORAGE

Defined in http/http.utils.ts:254


usePolling

● usePolling: true = DEFAULT_USE_POLLING

Defined in http/http.utils.ts:258


useStaticResources

● useStaticResources: true = DEFAULT_USE_STATIC_RESOURCES

Defined in http/http.utils.ts:256



@ibm-wch-sdk/utils > "i18n/localized"

External module: "i18n/localized"

Index

Variables

Functions


Variables

<Const> localizedText

● localizedText: BiFunction<string, Locale, LocalizedText> = zipArgs as any

Defined in i18n/localized.ts:20

expose a tuple as text


<Const> pluckLocale

● pluckLocale: UnaryFunction<LocalizedText, Locale> = partialSecond( getProperty, 1 ) as any

Defined in i18n/localized.ts:29

Accessor for locales from a localized context


<Const> pluckText

● pluckText: UnaryFunction<LocalizedText, string> = partialSecond( getProperty, 0 ) as any

Defined in i18n/localized.ts:37

Accessor for text from a localized context


Functions

<Const> cmpByLocalizedContext

cmpByLocalizedContext(locContext: object): function

Defined in i18n/localized.ts:51

Returns a comparator that orders localizations according to the preferences of a localized context

Parameters:

ParamTypeDescription
locContextobject

Returns: function


isLocalizedText

isLocalizedText(aText: any): boolean

Defined in i18n/localized.ts:68

Tests if a value is a localized context

Parameters:

ParamTypeDescription
aTextanytext to check

Returns: boolean true if the text is a localized context, else false


@ibm-wch-sdk/utils > "idle/idle"

External module: "idle/idle"

Index

Variables


Variables

<Let> _cancelCallback

● _cancelCallback: function

Defined in idle/idle.ts:5

Type declaration

▸(aHandle: number): void

Parameters:

ParamType
aHandlenumber

Returns: void


<Let> _setCallback

● _setCallback: function

Defined in idle/idle.ts:4

Type declaration

▸(aFct: Function): number

Parameters:

ParamType
aFctFunction

Returns: number


cancelIdleCallback

● cancelIdleCallback: function

Defined in idle/idle.ts:8

Type declaration

▸(aHandle: number): void

Parameters:

ParamType
aHandlenumber

Returns: void


requestIdleCallback

● requestIdleCallback: function

Defined in idle/idle.ts:7

Type declaration

▸(aCallback: Function): number

Parameters:

ParamType
aCallbackFunction

Returns: number


@ibm-wch-sdk/utils > "index"

External module: "index"

Index


@ibm-wch-sdk/utils > "js/js.core"

External module: "js/js.core"

Index

Interfaces

Variables

Functions


Variables

<Const> UNDEFINED

● UNDEFINED: any = undefined

Defined in js/js.core.ts:6


<Const> arraySlice

● arraySlice: slice = Array.prototype.slice

Defined in js/js.core.ts:197


<Const> zipArgs

● zipArgs: ZippedArgs = _zipArgs as any

Defined in js/js.core.ts:210

Expose the array method in a strongly typed way


Functions

_zipArgs

_zipArgs(): any

Defined in js/js.core.ts:203

Make a shallow copy of the arguments.

The alternative would have been to use Array.of, but is this supported, everywhere?

Returns: any


<Const> and

and(aLeft: function, aRight: function): (Anonymous function)

Defined in js/js.core.ts:104

Performs the "and" function

Parameters:

ParamTypeDescription
aLeftfunctionleft check
aRightfunctionright check

Returns: (Anonymous function) the or function


<Const> biCompose

biCompose(aFirst: UnaryFunction<S1, D1>, aSecond: UnaryFunction<S2, D2>, aFct: function): (Anonymous function)

Defined in js/js.core.ts:149

Represents the composition of two functions

Parameters:

ParamTypeDescription
aFirstUnaryFunction<S1, D1>transformer of the first argument
aSecondUnaryFunction<S2, D2>transformer of the second argument
aFctfunctionfinal function

Returns: (Anonymous function)


<Const> biComposeMono

biComposeMono(aTransform: UnaryFunction<S, D>, aFct: function): function

Defined in js/js.core.ts:163

Represents the composition of two functions where they have the same argument

Parameters:

ParamTypeDescription
aTransformUnaryFunction<S, D>the common transform for the arguments
aFctfunctionfinal function

Returns: function


<Const> compose

compose(aLeft: UnaryFunction<T1, T2>, aRight: UnaryFunction<T2, R>): (Anonymous function)

Defined in js/js.core.ts:134

Represents the composition of two functions

Parameters:

ParamTypeDescription
aLeftUnaryFunction<T1, T2>left function
aRightUnaryFunction<T2, R>right function

Returns: (Anonymous function)


<Const> composeAll

composeAll(...aFunctions: Function[]): (Anonymous function)

Defined in js/js.core.ts:175

Composes the sequence of functions

Parameters:

ParamTypeDescription
Rest aFunctionsFunction[]the functions

Returns: (Anonymous function) the composition result


<Const> flipArgs

flipArgs(aFct: function): (Anonymous function)

Defined in js/js.core.ts:181

switch the order of arguments

Parameters:

ParamType
aFctfunction

Returns: (Anonymous function)


<Const> getProperty

getProperty<T,K>(aValue: T, aKey: K, aDefault?: T[K] | undefined): T[K]

Defined in js/js.core.ts:42

Generates a function that returns a property

Type parameters:

T

K : keyof T

Parameters:

ParamTypeDescription
aValueT
aKeyKthe key
Optional aDefaultT[K] | undefined

Returns: T[K] extractor function


<Const> not

not(aFct: function): (Anonymous function)

Defined in js/js.core.ts:78

Negates a function

Parameters:

ParamTypeDescription
aFctfunctionthe original function

Returns: (Anonymous function) the negated function


<Const> or

or(aLeft: function, aRight: function): (Anonymous function)

Defined in js/js.core.ts:90

Performs the "or" function

Parameters:

ParamTypeDescription
aLeftfunctionleft check
aRightfunctionright check*

Returns: (Anonymous function) the or function


<Const> partialFirst

partialFirst(aFunction: function, aFirst: T1): (Anonymous function)

Defined in js/js.core.ts:33

Binds the first parameter

Parameters:

ParamTypeDescription
aFunctionfunctionthe function pointer
aFirstT1the first parameter

Returns: (Anonymous function) the reduced function


<Const> partialSecond

partialSecond(aFunction: function, aSecond: T2): (Anonymous function)

Defined in js/js.core.ts:19

Binds the second parameter

Parameters:

ParamTypeDescription
aFunctionfunctionthe function pointer
aSecondT2the second parameter

Returns: (Anonymous function) the reduced function


<Const> pluckProperty

pluckProperty<T,K>(aKey: K, aDefault?: T[K] | undefined): UnaryFunction<T, T[K]>

Defined in js/js.core.ts:54

Generates a function that returns a property

Type parameters:

T

K : keyof T

Parameters:

ParamTypeDescription
aKeyKthe key
Optional aDefaultT[K] | undefined

Returns: UnaryFunction<T, T[K]> extractor function


<Const> propertyFromObject

propertyFromObject<T,K>(aValue: T, aDefault?: T[K] | undefined): UnaryFunction<K, T[K]>

Defined in js/js.core.ts:65

Generates a function that returns a property

Type parameters:

T

K : keyof T

Parameters:

ParamType
aValueT
Optional aDefaultT[K] | undefined

Returns: UnaryFunction<K, T[K]> extractor function


<Const> spreadArgs

spreadArgs(aFct: Function, aArgs: any[]): any

Defined in js/js.core.ts:229

Parameters:

ParamType
aFctFunction
aArgsany[]

Returns: any


<Const> ternary

ternary(aPredicate: function, aLeft: UnaryFunction<T, R>, aRight: UnaryFunction<T, R>): (Anonymous function)

Defined in js/js.core.ts:120

Performs the ternary operation

Parameters:

ParamTypeDescription
aPredicatefunctionpredicate
aLeftUnaryFunction<T, R>left function
aRightUnaryFunction<T, R>right function

Returns: (Anonymous function) the or function


<Const> toArray

toArray(aValue: ArrayLike<T>): any

Defined in js/js.core.ts:238

Converts an array like to an arry

Parameters:

ParamTypeDescription
aValueArrayLike<T>the array like

Returns: any the array


@ibm-wch-sdk/utils > "js/js.utils"

External module: "js/js.utils"

Index

Interfaces

Type aliases

Variables

Functions


Type aliases

Function0

Ƭ Function0: function

Defined in js/js.utils.ts:407

Type declaration

▸(): R

Returns: R


Function1

Ƭ Function1: function

Defined in js/js.utils.ts:408

Type declaration

▸(t1: T1): R

Parameters:

ParamType
t1T1

Returns: R


Function2

Ƭ Function2: function

Defined in js/js.utils.ts:409

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

ParamType
t1T1
t2T2

Returns: R


Function3

Ƭ Function3: function

Defined in js/js.utils.ts:410

Type declaration

▸(t1: T1, t2: T2, t3: T3): R

Parameters:

ParamType
t1T1
t2T2
t3T3

Returns: R


Function4

Ƭ Function4: function

Defined in js/js.utils.ts:411

Type declaration

▸(t1: T1, t2: T2, t3: T3, t4: T4): R

Parameters:

ParamType
t1T1
t2T2
t3T3
t4T4

Returns: R


Variables

<Const> KEY_DEBUG

● KEY_DEBUG: "$$DEBUG" = "$$DEBUG"

Defined in js/js.utils.ts:20


<Const> _FUNCTION_TYPE

● _FUNCTION_TYPE: * "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"

  • = typeof _keys

Defined in js/js.utils.ts:215


<Const> _UNDEFINED_TYPE

● _UNDEFINED_TYPE: * "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"

  • = typeof UNDEFINED

Defined in js/js.utils.ts:214


<Const> _assign

● _assign: assign = Object.assign

Defined in js/js.utils.ts:26


<Const> _binary

● _binary: function = partialFirst(_nary, 2) as any

Defined in js/js.utils.ts:403

Guarantees a binary function param: the original function

returns: the binary function

Type declaration

▸<T1,T2,R>(aFunction: function): BiFunction<T1, T2, R>

Type parameters:

T1

T2

R

Parameters:

ParamType
aFunctionfunction

Returns: BiFunction<T1, T2, R>


<Const> _bind

● _bind: Bind = __bind as any

Defined in js/js.utils.ts:570

Our simple implementation param: the original function

param: the this argument

param: the arguments

returns: the final function


<Const> _bindKey

● _bindKey: BindKey = __bindKey as any

Defined in js/js.utils.ts:681

The bind member magic


<Const> _bindMember

● _bindMember: BindMember = __bindMember as any

Defined in js/js.utils.ts:624

The bind member magic


<Const> _freeze

● _freeze: freeze = Object.freeze

Defined in js/js.utils.ts:28


<Const> _isFrozen

● _isFrozen: isFrozen = Object.isFrozen

Defined in js/js.utils.ts:29


<Const> _keys

● _keys: keys = Object.keys

Defined in js/js.utils.ts:25


<Const> _unary

● _unary: function = partialFirst(_nary, 1) as any

Defined in js/js.utils.ts:393

Guarantees a unary function param: the original function

returns: the unary function

Type declaration

▸<T,R>(aFunction: function): UnaryFunction<T, R>

Type parameters:

T

R

Parameters:

ParamType
aFunctionfunction

Returns: UnaryFunction<T, R>


Functions

__bind

__bind(): any

Defined in js/js.utils.ts:556

Returns: any


__bindKey

__bindKey(): ___bindKey

Defined in js/js.utils.ts:662

Our simple implementation

Returns: ___bindKey the final function


__bindMember

__bindMember(): any

Defined in js/js.utils.ts:615

Our simple implementation

Returns: any the final function


<Const> _anyToString

_anyToString(aValue: any): string

Defined in js/js.utils.ts:128

Parameters:

ParamType
aValueany

Returns: string


<Const> _arrayEquals

_arrayEquals<T>(aLeft: T[], aRight: T[], aPredicate: EqualsPredicate<T>): boolean

Defined in js/js.utils.ts:38

Type parameters:

T

Parameters:

ParamType
aLeftT[]
aRightT[]
aPredicateEqualsPredicate<T>

Returns: boolean


<Const> _arrayFind

_arrayFind<T>(aArray: T[], aPredicate: Predicate<T>): T

Defined in js/js.utils.ts:711

Locates an element in an array

Type parameters:

T

Parameters:

ParamTypeDescription
aArrayT[]-
aPredicatePredicate<T>

Returns: T


<Const> _assertArray

_assertArray<T>(aKey: number | string | symbol, aObject: any): T[]

Defined in js/js.utils.ts:182

Type parameters:

T

Parameters:

ParamType
aKeynumber | string | symbol
aObjectany

Returns: T[]


<Const> _assertFromGenerator

_assertFromGenerator<T>(aKey: number | string | symbol, aObject: any, aGenerator: Generator<T>): T

Defined in js/js.utils.ts:173

Type parameters:

T

Parameters:

ParamType
aKeynumber | string | symbol
aObjectany
aGeneratorGenerator<T>

Returns: T


<Const> _assertObject

_assertObject<T>(aKey: number | string | symbol, aObject: any): T

Defined in js/js.utils.ts:179

Type parameters:

T

Parameters:

ParamType
aKeynumber | string | symbol
aObjectany

Returns: T


<Const> _byProperty

_byProperty<T,K>(aKey: K, aPredicate: Predicate<T[K]>): Predicate<T>

Defined in js/js.utils.ts:332

Generates a predicate that compares a named property of an object with another predicate

Type parameters:

T

K : keyof T

Parameters:

ParamTypeDescription
aKeyKthe key of the object to compare
aPredicatePredicate<T[K]>the predicate that compares the value of the property

Returns: Predicate<T> the final predicate


_cloneDeep

_cloneDeep(aValue: any): any

Defined in js/js.utils.ts:154

Parameters:

ParamType
aValueany

Returns: any


_createGetter

_createGetter<T>(aGetter: Generator<T>): PropertyDescriptor

Defined in js/js.utils.ts:265

Constructs a getter description

Type parameters:

T

Parameters:

ParamTypeDescription
aGetterGenerator<T>the getter

Returns: PropertyDescriptor the description of the getter


<Const> _deepEquals

_deepEquals(aLeft: any, aRight: any): boolean

Defined in js/js.utils.ts:108

Parameters:

ParamType
aLeftany
aRightany

Returns: boolean


<Const> _forEach

_forEach<T>(aArray: T[], aConsumer: Consumer<T>): void

Defined in js/js.utils.ts:343

Just run a callback for each element in an array

Type parameters:

T

Parameters:

ParamTypeDescription
aArrayT[]the array
aConsumerConsumer<T>consumer callback

Returns: void


_forIn

_forIn<T>(aObject: object, aConsumer: BiConsumer<T, string>): void

Defined in js/js.utils.ts:352

Run a callback for each key value pair

Type parameters:

T

Parameters:

ParamTypeDescription
aObjectobjectthe object
aConsumerBiConsumer<T, string>consumer callback

Returns: void


_freezeDeep

_freezeDeep(aValue: any): any

Defined in js/js.utils.ts:222

Parameters:

ParamType
aValueany

Returns: any


<Const> _isDeepEqualTo

_isDeepEqualTo<T>(aComparison: T): Predicate<T>

Defined in js/js.utils.ts:702

Returns a function that tests if a value is equal to another value

Type parameters:

T

Parameters:

ParamTypeDescription
aComparisonTthe value to compare with

Returns: Predicate<T> the predicate


<Const> _lastElement

_lastElement<T>(aArray: T[]): T

Defined in js/js.utils.ts:185

Type parameters:

T

Parameters:

ParamType
aArrayT[]

Returns: T


_mergeObjects

_mergeObjects<T>(aLeft: T, aRight: T): T

Defined in js/js.utils.ts:721

Merge objects together and consider undefined or empty objects as not overridable

Type parameters:

T

Parameters:

ParamTypeDescription
aLeftTthe left object
aRightTthe right object

Returns: T the resulting object


_nary

_nary(aArity: number, aFunction: Function): Function

Defined in js/js.utils.ts:374

Implements a wrapper function that limits the arguments to the given size

Parameters:

ParamTypeDescription
aAritynumberthe arity, i.e. the maximum number of supported arguments
aFunctionFunctionthe function

Returns: Function the limited function


<Const> _nthElement

_nthElement<T>(aArray: T[], aIndex: number): T

Defined in js/js.utils.ts:188

Type parameters:

T

Parameters:

ParamType
aArrayT[]
aIndexnumber

Returns: T


<Const> _objectAssign

_objectAssign<T,V>(aKey: string, aValue: V, aObject: T): T

Defined in js/js.utils.ts:144

Type parameters:

T

V

Parameters:

ParamType
aKeystring
aValueV
aObjectT

Returns: T


<Const> _objectEquals

_objectEquals(aLeft: any, aRight: any, aPredicate: EqualsPredicate<any>): boolean

Defined in js/js.utils.ts:72

Parameters:

ParamType
aLeftany
aRightany
aPredicateEqualsPredicate<any>

Returns: boolean


<Const> _partialLeft

_partialLeft(aFunction: function, ...aArgs: any[]): any

Defined in js/js.utils.ts:691

Our simple implementation

Parameters:

ParamTypeDescription
aFunctionfunctionthe original function
Rest aArgsany[]the arguments

Returns: any the final function


<Const> _push

_push<T>(aValue: T, aArray: T[]): T[]

Defined in js/js.utils.ts:123

Type parameters:

T

Parameters:

ParamType
aValueT
aArrayT[]

Returns: T[]


_random

_random(aMin: number, aMax: number): number

Defined in js/js.utils.ts:255

Parameters:

ParamType
aMinnumber
aMaxnumber

Returns: number


_reduceForIn

_reduceForIn<T,R>(aObject: Record<string, T> | any, aFunction: function, aInitial: R): R

Defined in js/js.utils.ts:279

Run a callback for each key value pair

Type parameters:

T

R

Parameters:

ParamTypeDescription
aObjectRecord<string, T> | anythe object
aFunctionfunction
aInitialR

Returns: R


_reduceToObject

_reduceToObject<T,V>(aArray: T[], aKeyExtractor: UnaryFunction<T, string>, aTransformer?: UnaryFunction<T, V>): Record<string, V>

Defined in js/js.utils.ts:307

Groups an array into an object given a key extractor

Type parameters:

T

V

Parameters:

ParamTypeDescription
aArrayT[]the array
aKeyExtractorUnaryFunction<T, string>the key extractor
Optional aTransformerUnaryFunction<T, V>the transformer for the values, defaults to the identity operation

Returns: Record<string, V> the mapping


_toInteger

_toInteger(aValue: any, aDefault: number): number

Defined in js/js.utils.ts:197

Parameters:

ParamType
aValueany
aDefaultnumber

Returns: number


@ibm-wch-sdk/utils > "json/json.utils"

External module: "json/json.utils"

Index

Interfaces

Type aliases

Variables


Type aliases

AnyJson

Ƭ AnyJson: boolean | number | string | null | JsonArray | JsonMap

Defined in json/json.utils.ts:6


JsonMap

Ƭ JsonMap: any

Defined in json/json.utils.ts:7


Variables

<Const> _jsonParse

● _jsonParse: function = unary(JSON.parse)

Defined in json/json.utils.ts:10

Type declaration

▸<T>(aValue: string): T

Type parameters:

T

Parameters:

ParamType
aValuestring

Returns: T


<Const> _jsonStringify

● _jsonStringify: UnaryFunction<any, string> = unary(JSON.stringify)

Defined in json/json.utils.ts:11


@ibm-wch-sdk/utils > "layouts/layout"

External module: "layouts/layout"

Index

Variables

Object literals


Variables

<Const> DEFAULT_LAYOUT_MAPPING

● DEFAULT_LAYOUT_MAPPING: object

Defined in layouts/layout.ts:37

Type declaration


<Const> DEFAULT_LAYOUT_MODE

● DEFAULT_LAYOUT_MODE: "default" = "default"

Defined in layouts/layout.ts:4


<Const> LAYOUT_MODE_ERROR

● LAYOUT_MODE_ERROR: "wch-error" = "wch-error"

Defined in layouts/layout.ts:10


<Const> LAYOUT_MODE_FOOTER

● LAYOUT_MODE_FOOTER: "wch-footer" = "wch-footer"

Defined in layouts/layout.ts:9


<Const> LAYOUT_MODE_HEADER

● LAYOUT_MODE_HEADER: "wch-header" = "wch-header"

Defined in layouts/layout.ts:8


<Const> LAYOUT_MODE_NAVIGATION

● LAYOUT_MODE_NAVIGATION: "wch-navigation" = "wch-navigation"

Defined in layouts/layout.ts:7


<Const> LAYOUT_TEMPLATE_ERROR

● LAYOUT_TEMPLATE_ERROR: "wch-error" = "wch-error"

Defined in layouts/layout.ts:15


<Const> LAYOUT_TEMPLATE_FOOTER

● LAYOUT_TEMPLATE_FOOTER: "wch-footer" = "wch-footer"

Defined in layouts/layout.ts:14


<Const> LAYOUT_TEMPLATE_HEADER

● LAYOUT_TEMPLATE_HEADER: "wch-header" = "wch-header"

Defined in layouts/layout.ts:13


<Const> LAYOUT_TEMPLATE_NAVIGATION

● LAYOUT_TEMPLATE_NAVIGATION: "wch-navigation" = "wch-navigation"

Defined in layouts/layout.ts:12


<Const> LAYOUT_TYPE_ANGULAR

● LAYOUT_TYPE_ANGULAR: "angular" = "angular"

Defined in layouts/layout.ts:5


Object literals

<Const> LAYOUT_ERROR

LAYOUT_ERROR: object

Defined in layouts/layout.ts:32

template

● template: string = LAYOUT_TEMPLATE_ERROR

Defined in layouts/layout.ts:34


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in layouts/layout.ts:33



<Const> LAYOUT_FOOTER

LAYOUT_FOOTER: object

Defined in layouts/layout.ts:27

template

● template: string = LAYOUT_TEMPLATE_FOOTER

Defined in layouts/layout.ts:29


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in layouts/layout.ts:28



<Const> LAYOUT_HEADER

LAYOUT_HEADER: object

Defined in layouts/layout.ts:22

template

● template: string = LAYOUT_TEMPLATE_HEADER

Defined in layouts/layout.ts:24


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in layouts/layout.ts:23



<Const> LAYOUT_NAVIGATION

LAYOUT_NAVIGATION: object

Defined in layouts/layout.ts:17

template

● template: string = LAYOUT_TEMPLATE_NAVIGATION

Defined in layouts/layout.ts:19


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in layouts/layout.ts:18



@ibm-wch-sdk/utils > "logger/console.logger"

External module: "logger/console.logger"

Index

Variables

Functions


Variables

<Const> _console

● _console: Console = console

Defined in logger/console.logger.ts:8


Functions

<Const> createConsoleLogger

createConsoleLogger(aName: string): object

Defined in logger/console.logger.ts:11

Parameters:

ParamType
aNamestring

Returns: object


<Const> createEmptyLogger

createEmptyLogger(aName: string): object

Defined in logger/console.logger.ts:17

Parameters:

ParamType
aNamestring

Returns: object


@ibm-wch-sdk/utils > "logger/noop.logger"

External module: "logger/noop.logger"

Index

Object literals


Object literals

<Const> NOOP_LOGGER

NOOP_LOGGER: object

Defined in logger/noop.logger.ts:8

Logger that really does not log anything

error

● error: noop = noop

Defined in logger/noop.logger.ts:11


info

● info: noop = noop

Defined in logger/noop.logger.ts:9


warn

● warn: noop = noop

Defined in logger/noop.logger.ts:10



@ibm-wch-sdk/utils > "logger/noop.logger.service"

External module: "logger/noop.logger.service"

Index

Object literals


Object literals

<Const> NOOP_LOGGER_SERVICE

NOOP_LOGGER_SERVICE: object

Defined in logger/noop.logger.service.ts:9

Fallback logger service that exposes noop loggers returns: the service

get

get(aName: string): Logger

Defined in logger/noop.logger.service.ts:10

Parameters:

ParamType
aNamestring

Returns: Logger



@ibm-wch-sdk/utils > "logger/rx.logger"

External module: "logger/rx.logger"

Index

Enumerations

Variables

Functions


Variables

<Const> rxError

● rxError: function = _rxLoggerMember(RxLogger.ERROR)

Defined in logger/rx.logger.ts:116

Function that perform an info logging in an rx pipeline onto a given logger with a particular prefix param: the logger to log to

param: prefix arguments prepended for each logging statement

returns: function that takes a context object for logging

Type declaration

▸<T>(aLogger: Logger, ...aArgs: any[]): function

Type parameters:

T

Parameters:

ParamType
aLoggerLogger
Rest aArgsany[]

Returns: function


<Const> rxLogAll

● rxLogAll: function = _rxLoggerMember(RxLogger.ALL)

Defined in logger/rx.logger.ts:101

Function that perform an info logging in an rx pipeline onto a given logger with a particular prefix param: the logger to log to

param: prefix arguments prepended for each logging statement

returns: function that takes a context object for logging

example: const info = rxInfo(logger);

stream.pipe( info('onValue') )

Type declaration

▸<T>(aLogger: Logger, ...aArgs: any[]): function

Type parameters:

T

Parameters:

ParamType
aLoggerLogger
Rest aArgsany[]

Returns: function


<Const> rxNext

● rxNext: function = _rxLoggerMember(RxLogger.NEXT)

Defined in logger/rx.logger.ts:78

Function that perform an info logging in an rx pipeline onto a given logger with a particular prefix param: the logger to log to

param: prefix arguments prepended for each logging statement

returns: function that takes a context object for logging

example: const info = rxInfo(logger);

stream.pipe( info('onValue') )

Type declaration

▸<T>(aLogger: Logger, ...aArgs: any[]): function

Type parameters:

T

Parameters:

ParamType
aLoggerLogger
Rest aArgsany[]

Returns: function


Functions

<Const> _rxLoggerMember

_rxLoggerMember(aMode: number): (Anonymous function)

Defined in logger/rx.logger.ts:30

Returns a function that logs particular aspects of a subscription

Parameters:

ParamTypeDescription
aModenumberthe aspects to log

Returns: (Anonymous function) the logger callback


@ibm-wch-sdk/utils > "messages/message.event"

External module: "messages/message.event"

Index

Variables

Functions


Variables

<Const> RESPONSE_SUFFIX

● RESPONSE_SUFFIX: "Response" = "Response"

Defined in messages/message.event.ts:24


<Const> _SUBSCRIPTIONS

● _SUBSCRIPTIONS: object

Defined in messages/message.event.ts:27

Type declaration


Functions

_createMessageHandler

_createMessageHandler(aCorsWhitelist: Generator<PromiseLike<string[]>>, aMsgHandlers: Generator<SdkMessageHandler[]>, aLogger?: Logger): function

Defined in messages/message.event.ts:195

Constructs an event listener that listens for messages

Parameters:

ParamTypeDescription
aCorsWhitelistGenerator<PromiseLike<string[]>>generator that produces a CORS whitelist
aMsgHandlersGenerator<SdkMessageHandler[]>generator that enumerates the set of registered message handlers
Optional aLoggerLogger

Returns: function the listener that can be attached to the window object


_createSdkErrorResponse

_createSdkErrorResponse(aEvent: SdkMessagePayload, aError: any, aLogger: Logger): SdkErrorResponse

Defined in messages/message.event.ts:72

Parameters:

ParamType
aEventSdkMessagePayload
aErrorany
aLoggerLogger

Returns: SdkErrorResponse


_getMessagePort

_getMessagePort(aEvent: MessageEvent): MessagePort

Defined in messages/message.event.ts:97

Parameters:

ParamType
aEventMessageEvent

Returns: MessagePort


_isMessagePort

_isMessagePort(aValue: any): boolean

Defined in messages/message.event.ts:87

Parameters:

ParamType
aValueany

Returns: boolean


_isSdkEvent

_isSdkEvent(aPayload: any): boolean

Defined in messages/message.event.ts:59

Parameters:

ParamType
aPayloadany

Returns: boolean


_processMessage

_processMessage(aData: SdkMessagePayload, aEvent: MessageEvent, aMsgHandlers: Generator<SdkMessageHandler[]>, aLogger: Logger): PromiseLike<SdkMessagePayload> | SdkMessagePayload | null | undefined

Defined in messages/message.event.ts:160

Parameters:

ParamType
aDataSdkMessagePayload
aEventMessageEvent
aMsgHandlersGenerator<SdkMessageHandler[]>
aLoggerLogger

Returns: PromiseLike<SdkMessagePayload> | SdkMessagePayload | null | undefined


_registerSubscription

_registerSubscription(aSubscription: Subscription): string

Defined in messages/message.event.ts:46

Parameters:

ParamType
aSubscriptionSubscription

Returns: string


_sendResponse

_sendResponse(aResponse: any, aEvent: MessageEvent, aLogger: Logger): void

Defined in messages/message.event.ts:114

Parameters:

ParamType
aResponseany
aEventMessageEvent
aLoggerLogger

Returns: void


_unsubscribe

_unsubscribe(aHandle: string): void

Defined in messages/message.event.ts:34

Parameters:

ParamType
aHandlestring

Returns: void


@ibm-wch-sdk/utils > "messages/navigate.by.path.handler"

External module: "messages/navigate.by.path.handler"

Index

Functions


Functions

_createSdkNavigateByPathResponse

_createSdkNavigateByPathResponse(aEvent: SdkNavigateByPathEvent, aFlag: boolean, aError?: any): SdkNavigateByPathResponse

Defined in messages/navigate.by.path.handler.ts:34

Parameters:

ParamType
aEventSdkNavigateByPathEvent
aFlagboolean
Optional aErrorany

Returns: SdkNavigateByPathResponse


_isSdkNavigateByPathEvent

_isSdkNavigateByPathEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/navigate.by.path.handler.ts:20

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createNavigateByPathHandler

createNavigateByPathHandler(aNavigate: function, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/navigate.by.path.handler.ts:51

Executes a navigation event

Parameters:

ParamType
aNavigatefunction
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/refresh.handler"

External module: "messages/refresh.handler"

Index

Functions


Functions

_isSdkRefreshEvent

_isSdkRefreshEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/refresh.handler.ts:12

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createRefreshHandler

createRefreshHandler(aRefresh: function, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/refresh.handler.ts:20

Executes a refresh event

Parameters:

ParamType
aRefreshfunction
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/set.mode.handler"

External module: "messages/set.mode.handler"

Index

Functions


Functions

_createSdkSetModeResponse

_createSdkSetModeResponse(aEvent: SdkSetModeEvent, aMode: SdkMode, aError?: any): SdkSetModeResponse

Defined in messages/set.mode.handler.ts:35

Parameters:

ParamType
aEventSdkSetModeEvent
aModeSdkMode
Optional aErrorany

Returns: SdkSetModeResponse


_isProtected

_isProtected(aMode: SdkMode): boolean

Defined in messages/set.mode.handler.ts:53

Tests if we need to switch to protected mode

Parameters:

ParamTypeDescription
aModeSdkModethe mode

Returns: boolean


_isSdkSetModeEvent

_isSdkSetModeEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/set.mode.handler.ts:22

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createSetModeHandler

createSetModeHandler(aPublicApiHandler: Consumer<boolean>, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/set.mode.handler.ts:60

Executes a navigation event

Parameters:

ParamType
aPublicApiHandlerConsumer<boolean>
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/subscribe.active.route.handler"

External module: "messages/subscribe.active.route.handler"

Index

Functions


Functions

_createSdkActiveRouteEvent

_createSdkActiveRouteEvent(aEvent: SdkSubscribeActiveRouteEvent, aPage?: SitePage): SdkActiveRouteEvent

Defined in messages/subscribe.active.route.handler.ts:51

Parameters:

ParamType
aEventSdkSubscribeActiveRouteEvent
Optional aPageSitePage

Returns: SdkActiveRouteEvent


_createSdkSubscribeActiveRouteEventResponse

_createSdkSubscribeActiveRouteEventResponse(aEvent: SdkSubscribeActiveRouteEvent, aHandle: string): SdkSubscribeActiveRouteEventResponse

Defined in messages/subscribe.active.route.handler.ts:31

Parameters:

ParamType
aEventSdkSubscribeActiveRouteEvent
aHandlestring

Returns: SdkSubscribeActiveRouteEventResponse


_isSdkSubscribeActiveRouteEvent

_isSdkSubscribeActiveRouteEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/subscribe.active.route.handler.ts:68

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createSubscribeActiveRouteHandler

createSubscribeActiveRouteHandler(onActiveRenderingContext: Observable<RenderingContext>, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/subscribe.active.route.handler.ts:76

Subscribes to the active route

Parameters:

ParamType
onActiveRenderingContextObservable<RenderingContext>
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/subscribe.handler"

External module: "messages/subscribe.handler"

Index

Functions


Functions

_isSdkUnsubscribeEvent

_isSdkUnsubscribeEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/subscribe.handler.ts:19

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createUnsubscribeHandler

createUnsubscribeHandler(aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/subscribe.handler.ts:27

Subscribes to a given route

Parameters:

ParamType
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/subscribe.mode.handler"

External module: "messages/subscribe.mode.handler"

Index

Functions


Functions

_createSdkModeEvent

_createSdkModeEvent(aEvent: SdkSubscribeModeEvent, aMode: SdkMode): SdkModeEvent

Defined in messages/subscribe.mode.handler.ts:49

Parameters:

ParamType
aEventSdkSubscribeModeEvent
aModeSdkMode

Returns: SdkModeEvent


_createSdkSubscribeModeEventResponse

_createSdkSubscribeModeEventResponse(aEvent: SdkSubscribeModeEvent, aHandle: string): SdkSubscribeModeEventResponse

Defined in messages/subscribe.mode.handler.ts:29

Parameters:

ParamType
aEventSdkSubscribeModeEvent
aHandlestring

Returns: SdkSubscribeModeEventResponse


_isSdkSubscribeModeEvent

_isSdkSubscribeModeEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/subscribe.mode.handler.ts:66

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createSubscribeModeHandler

createSubscribeModeHandler(onUsePublic: Observable<boolean>, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/subscribe.mode.handler.ts:74

Subscribes to the active route

Parameters:

ParamType
onUsePublicObservable<boolean>
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "messages/subscribe.route.handler"

External module: "messages/subscribe.route.handler"

Index

Functions


Functions

_createSdkRouteEvent

_createSdkRouteEvent(aEvent: SdkSubscribeRouteEvent, aRoute: string, aPage?: SitePage): SdkRouteEvent

Defined in messages/subscribe.route.handler.ts:32

Parameters:

ParamType
aEventSdkSubscribeRouteEvent
aRoutestring
Optional aPageSitePage

Returns: SdkRouteEvent


_createSdkSubscribeRouteEventResponse

_createSdkSubscribeRouteEventResponse(aEvent: SdkSubscribeRouteEvent, aHandle: string): SdkSubscribeRouteEventResponse

Defined in messages/subscribe.route.handler.ts:53

Parameters:

ParamType
aEventSdkSubscribeRouteEvent
aHandlestring

Returns: SdkSubscribeRouteEventResponse


_isSdkSubscribeRouteEvent

_isSdkSubscribeRouteEvent(aPayload: SdkMessagePayload): boolean

Defined in messages/subscribe.route.handler.ts:70

Parameters:

ParamType
aPayloadSdkMessagePayload

Returns: boolean


createSubscribeRouteHandler

createSubscribeRouteHandler(aGetRenderingContextByPath: function, aLogger?: Logger): SdkMessageHandlerCallback

Defined in messages/subscribe.route.handler.ts:78

Subscribes to a given route

Parameters:

ParamType
aGetRenderingContextByPathfunction
Optional aLoggerLogger

Returns: SdkMessageHandlerCallback


@ibm-wch-sdk/utils > "misc"

External module: "misc"

Index


@ibm-wch-sdk/utils > "operators/operators"

External module: "operators/operators"

Index

Variables

Functions


Variables

<Const> filterArrayOf

● filterArrayOf: function = compose( partialFirst(partialSecond, isArrayOf), filter ) as any

Defined in operators/operators.ts:139

Returns an operator function that filters array of a particular type para: pred the predicate to test the elements of the array

returns: the operator function

Type declaration

▸<T>(pred: IsPredicate<T>): OperatorFunction<any, T[]>

Type parameters:

T

Parameters:

ParamType
predIsPredicate<T>

Returns: OperatorFunction<any, T[]>


<Const> filterBoolean

● filterBoolean: Generator<MonoTypeOperatorFunction<boolean>> = partialLeft(filter, isBoolean) as any

Defined in operators/operators.ts:118

deprecated: use #opFilterBoolean instead


<Const> filterNumber

● filterNumber: Generator<MonoTypeOperatorFunction<number>> = partialLeft(filter, isNumber) as any

Defined in operators/operators.ts:124

deprecated: use #opFilterNumber instead


<Const> filterObject

● filterObject: Generator<MonoTypeOperatorFunction<any>> = partialLeft(filter, isPlainObject)

Defined in operators/operators.ts:130

deprecated: use #opFilterObject instead


<Const> filterString

● filterString: Generator<MonoTypeOperatorFunction<string>> = partialLeft(filter, isString) as any

Defined in operators/operators.ts:112

deprecated: use #opFilterString instead


<Const> filterTypeOf

● filterTypeOf: function = filter

Defined in operators/operators.ts:289

Only returns objects of a particular type param: the type predicate

returns: the filter operator

Type declaration

▸<T>(aPredicate: IsPredicate<T>): OperatorFunction<any, T>

Type parameters:

T

Parameters:

ParamType
aPredicateIsPredicate<T>

Returns: OperatorFunction<any, T>


<Const> opBoxLayoutMode

● opBoxLayoutMode: OperatorFunction<string, string> = map< string, string

(wchBoxLayoutMode)

Defined in operators/operators.ts:250

Operator to box the layout mode


<Const> opDeepDistinctUntilChanged

● opDeepDistinctUntilChanged: function = distinctUntilChanged(deepEquals)

Defined in operators/operators.ts:56

Like #distinctUntilChanged using #deepEquals param: source sequence

returns: target sequence without consecutive duplicates

Type declaration

▸<T>(src: Observable<T>): Observable<T>

Type parameters:

T

Parameters:

ParamType
srcObservable<T>

Returns: Observable<T>


<Const> opDistinctUntilChanged

● opDistinctUntilChanged: function = distinctUntilChanged()

Defined in operators/operators.ts:66

Like #distinctUntilChanged param: source sequence

returns: target sequence without consecutive duplicates

Type declaration

▸<T>(src: Observable<T>): Observable<T>

Type parameters:

T

Parameters:

ParamType
srcObservable<T>

Returns: Observable<T>


<Const> opFalse

● opFalse: Observable<boolean> = of(false)

Defined in operators/operators.ts:320

Operator representing false


<Const> opFilterBoolean

● opFilterBoolean: OperatorFunction<any, boolean> = filter( isBoolean )

Defined in operators/operators.ts:159

Filters booleans param: any sequence

returns: the sequence of booleans


<Const> opFilterNotNil

● opFilterNotNil: function = filter(isNotNil)

Defined in operators/operators.ts:104

Makes sure the sequence does not have nils param: source sequence

returns: sequence without nils

Type declaration

▸<T>(src: Observable<T>): Observable<T>

Type parameters:

T

Parameters:

ParamType
srcObservable<T>

Returns: Observable<T>


<Const> opFilterNumber

● opFilterNumber: OperatorFunction<any, number> = filter(isNumber)

Defined in operators/operators.ts:168

Filters number param: any sequence

returns: the sequence of numbers


<Const> opFilterObject

● opFilterObject: OperatorFunction<any, any> = filter( isPlainObject )

Defined in operators/operators.ts:175

Filters plain objects param: any sequence

returns: the sequence of objects


<Const> opFilterString

● opFilterString: OperatorFunction<any, string> = filter(isString)

Defined in operators/operators.ts:152

Filters strings param: any sequence

returns: the sequence of strings


<Const> opJsonParse

● opJsonParse: function = map( jsonParse ) as any

Defined in operators/operators.ts:261

Parses a string into a JSON object param: the source sequence

returns: the result sequence

Type declaration

▸<T>(src: Observable<string>): Observable<T>

Type parameters:

T

Parameters:

ParamType
srcObservable<string>

Returns: Observable<T>


<Const> opJsonStringify

● opJsonStringify: OperatorFunction<any, string> = map( jsonStringify )

Defined in operators/operators.ts:271

Parses a string into a JSON object param: the source sequence

returns: the result sequence


<Const> opLevels

● opLevels: OperatorFunction< string | number | null | undefined, number> = map<string | number | null | undefined, number>( partialSecond(toInteger, DEFAULT_FETCH_LEVELS) )

Defined in operators/operators.ts:240

Converts the levels to a valid number value


<Const> opNot

● opNot: MonoTypeOperatorFunction<boolean> = map(bFlag => !bFlag)

Defined in operators/operators.ts:281

Negates a boolean param: the source sequence

returns: the result sequence


<Const> opPageArrayDistinctUntilChanged

● opPageArrayDistinctUntilChanged: MonoTypeOperatorFunction<SitePage[]> = distinctUntilChanged(pageArrayEquals)

Defined in operators/operators.ts:84

Like #distinctUntilChanged using #pageArrayEquals param: source sequence

returns: target sequence without consecutive duplicates


<Const> opPageDistinctUntilChanged

● opPageDistinctUntilChanged: MonoTypeOperatorFunction<SitePage> = distinctUntilChanged(pageEquals)

Defined in operators/operators.ts:76

Like #distinctUntilChanged using #pageEquals param: source sequence

returns: target sequence without consecutive duplicates


<Const> opPluckApiOrigin

● opPluckApiOrigin: OperatorFunction<RenderingContext, string> = pluck('context', 'hub', 'apiUrl', 'origin')

Defined in operators/operators.ts:194

Extracts the origin of the API URL from the rendering context param: rendering context to pluck from

returns: the API URL


<Const> opPluckCurrentPage

● opPluckCurrentPage: OperatorFunction<RenderingContext, SitePage> = map(pageFromRenderingContext)

Defined in operators/operators.ts:232

Operator to pluck the current page param: rendering context to pluck from

returns: the plucked page


<Const> opPluckDeliveryOrigin

● opPluckDeliveryOrigin: OperatorFunction<RenderingContext, string> = pluck('context', 'hub', 'deliveryUrl', 'origin')

Defined in operators/operators.ts:214

Extracts the origin of the Delivery URL from the rendering context param: rendering context to pluck from

returns: the delivery URL


<Const> opShareLast

● opShareLast: function = shareReplay(1)

Defined in operators/operators.ts:94

Shares and replays only the latest emission param: source sequence

returns: same sequence with last element shared

Type declaration

▸<T>(src: Observable<T>): Observable<T>

Type parameters:

T

Parameters:

ParamType
srcObservable<T>

Returns: Observable<T>


<Const> opTrue

● opTrue: Observable<boolean> = of(true)

Defined in operators/operators.ts:325

Operator representing true


<Const> pageArrayDistinctUntilChanged

● pageArrayDistinctUntilChanged: Generator<MonoTypeOperatorFunction<SitePage[]>> = partialLeft(distinctUntilChanged, pageArrayEquals) as any

Defined in operators/operators.ts:29

deprecated: use #opPageArrayDistinctUntilChanged instead


<Const> pageDistinctUntilChanged

● pageDistinctUntilChanged: Generator<MonoTypeOperatorFunction<SitePage>> = partialLeft(distinctUntilChanged, pageEquals) as any

Defined in operators/operators.ts:23

deprecated: use #opPageDistinctUntilChanged instead


<Const> pluckApiOrigin

● pluckApiOrigin: Generator<OperatorFunction<RenderingContext, string>> = partialLeft(pluck, 'context', 'hub', 'apiUrl', 'origin') as any

Defined in operators/operators.ts:184

Extracts the origin of the API URL from the rendering context deprecated: use #opPluckApiOrigin instead


<Const> pluckCurrentPage

● pluckCurrentPage: Generator<OperatorFunction<RenderingContext, SitePage>> = partialLeft(map, pageFromRenderingContext) as any

Defined in operators/operators.ts:222

deprecated: use #opPluckCurrentPage instead


<Const> pluckDeliveryOrigin

● pluckDeliveryOrigin: Generator<OperatorFunction<RenderingContext, string>> = partialLeft(pluck, 'context', 'hub', 'deliveryUrl', 'origin') as any

Defined in operators/operators.ts:204

Extracts the origin of the Delivery URL from the rendering context deprecated: use #opPluckDeliveryOrigin instead


Functions

<Const> deepDistinctUntilChanged

deepDistinctUntilChanged<T>(): MonoTypeOperatorFunction<T>

Defined in operators/operators.ts:18

Type parameters:

T

Returns: MonoTypeOperatorFunction<T>


<Const> filterNotNil

filterNotNil<T>(): MonoTypeOperatorFunction<T>

Defined in operators/operators.ts:39

Type parameters:

T

Returns: MonoTypeOperatorFunction<T>


<Const> mapDefault

mapDefault<T>(aDefault: T): OperatorFunction<T, T>

Defined in operators/operators.ts:314

Operator that returns the default value for each nil value of the source sequence

Type parameters:

T

Parameters:

ParamTypeDescription
aDefaultTthe default value

Returns: OperatorFunction<T, T> the operator


<Const> shareLast

shareLast<T>(): MonoTypeOperatorFunction<T>

Defined in operators/operators.ts:35

Type parameters:

T

Returns: MonoTypeOperatorFunction<T>


<Const> switchMapDefault

switchMapDefault<T>(aDefault: Observable<T>): OperatorFunction<T, T>

Defined in operators/operators.ts:301

Operator that returns the default sequence for each nil value of the source sequence

Type parameters:

T

Parameters:

ParamTypeDescription
aDefaultObservable<T>the default sequence

Returns: OperatorFunction<T, T> the operator


<Const> typedPluck

typedPluck<T,K>(aKey: K): OperatorFunction<T, T[K]>

Defined in operators/operators.ts:47

Operator that plucks a key from an object and makes sure that the key exists

Type parameters:

T

K : keyof T & string

Parameters:

ParamTypeDescription
aKeyKthe key to pluck

Returns: OperatorFunction<T, T[K]> the operator


@ibm-wch-sdk/utils > "path/path"

External module: "path/path"

Index

Variables

Functions


Variables

<Const> _binaryProperty

● _binaryProperty: function = binary(getProperty)

Defined in path/path.ts:58

Type declaration

▸(t1: T1, t2: T2): R

Parameters:

ParamType
t1T1
t2T2

Returns: R


<Const> charCodeOfDot

● charCodeOfDot: number = '.'.charCodeAt(0)

Defined in path/path.ts:7


<Const> parsePath

● parsePath: UnaryFunction<string, string[]> = partialSecond( createCache<string[]>(), _parsePath )

Defined in path/path.ts:52

Our parsing function, we assume that the resulting array is read only


<Const> reEscapeChar

● reEscapeChar: RegExp = /\(\)?/g

Defined in path/path.ts:8


<Const> rePropName

● rePropName: RegExp = RegExp( // Match anything that isn't a dot or bracket. '[^.\]+' + '|' + // Or match property names within brackets. '\[(?:' + // Match a non-string expression. '(^"\'.)' + '|' + // Or match strings (supports escaping characters). '("\')((?:(?!\2)^\\|\\.)?)\2' + ')\]' + '|' + // Or match "" as the space between consecutive dots or empty brackets. '(?=(?:\.|\\)(?:\.|\\|$))', 'g' )

Defined in path/path.ts:10


Functions

<Const> _parsePath

_parsePath(aPath: string): string[]

Defined in path/path.ts:31

Converts string to a property path array.

Parameters:

ParamType
aPathstring

Returns: string[]


<Const> getPath

getPath(aValue: any, aPath: string[], aDefault: T): any

Defined in path/path.ts:69

Extracts the value of the path for the property

Parameters:

ParamTypeDescription
aValueanythe value
aPathstring[]the path
aDefaultToptional default value if the path could not be resolved

Returns: any the actual property


pluckPath

pluckPath<T>(aPath: string[], aDefault?: T): UnaryFunction<any, T>

Defined in path/path.ts:81

Returns a function that plucks the given path from an object

Type parameters:

T

Parameters:

ParamTypeDescription
aPathstring[]the path to pluck
Optional aDefaultT

Returns: UnaryFunction<any, T> the pluck function


@ibm-wch-sdk/utils > "perf/perf.utils"

External module: "perf/perf.utils"

Index

Variables

Functions


Variables

<Let> COUNT

● COUNT: number = 0

Defined in perf/perf.utils.ts:6


<Const> bHasPerformance

● bHasPerformance: boolean = typeof performance !== UNDEFINED_TYPE && isFunction(performance.mark) && isFunction(performance.measure)

Defined in perf/perf.utils.ts:9


Functions

_measure

_measure(aName: string): function

Defined in perf/perf.utils.ts:14

Parameters:

ParamType
aNamestring

Returns: function


@ibm-wch-sdk/utils > "placeholder/placeholder"

External module: "placeholder/placeholder"

Index

Type aliases

Variables

Functions


Type aliases

ContextMap

Ƭ ContextMap: Record<string, RenderingContext>

Defined in placeholder/placeholder.ts:61


PlaceholderResolver

Ƭ PlaceholderResolver: UnaryFunction<string[], Observable<RenderingContext[]>>

Defined in placeholder/placeholder.ts:56

Given a series of type IDs, return the placeholder content items


RenderingContextResolver

Ƭ RenderingContextResolver: UnaryFunction<RenderingContext, RenderingContext>

Defined in placeholder/placeholder.ts:63


Variables

<Const> _ELEMENTS

● _ELEMENTS: "elements" = "elements"

Defined in placeholder/placeholder.ts:50


<Const> _ELEMENT_TYPE

● _ELEMENT_TYPE: "elementType" = "elementType"

Defined in placeholder/placeholder.ts:51


<Const> keyTypeOf

● keyTypeOf: UnaryFunction<RenderingContext, string> = pluckProperty( 'typeId' )

Defined in placeholder/placeholder.ts:168


Functions

_fromAccessor

_fromAccessor<T>(aAccessor: string, aType: AuthoringType, aSelector: BiFunction<string, AuthoringType, T>): T

Defined in placeholder/placeholder.ts:284

Decodes something from an accessor

Type parameters:

T

Parameters:

ParamTypeDescription
aAccessorstringthe accessor expression
aTypeAuthoringTypethe actual type
aSelectorBiFunction<string, AuthoringType, T>the selector expression

Returns: T the placeholder for the type


_getAuthoringElementFromKey

_getAuthoringElementFromKey(aElementKey: string, aType: AuthoringType): AuthoringElement

Defined in placeholder/placeholder.ts:232

Returns the authoring element from a particular key

Parameters:

ParamTypeDescription
aElementKeystringthe element key
aTypeAuthoringTypethe authoring type

Returns: AuthoringElement the element


_getPlaceholderFromKey

_getPlaceholderFromKey(aElementKey: string, aType: AuthoringType): AuthoringPlaceholder

Defined in placeholder/placeholder.ts:248

Returns the placeholder from a particular key

Parameters:

ParamTypeDescription
aElementKeystringthe element key
aTypeAuthoringTypethe authoring type

Returns: AuthoringPlaceholder the placeholder


_getTypeFromKey

_getTypeFromKey(aElementKey: string, aType: AuthoringType): string

Defined in placeholder/placeholder.ts:267

Returns the eleemnt type from a particular key

Parameters:

ParamTypeDescription
aElementKeystringthe element key
aTypeAuthoringTypethe authoring type

Returns: string the type


_handleElement

_handleElement(aElement: AbstractElement, aPlaceholder: AbstractElement, aResolver: RenderingContextResolver): AbstractElement

Defined in placeholder/placeholder.ts:71

Process an individual element

Parameters:

ParamType
aElementAbstractElement
aPlaceholderAbstractElement
aResolverRenderingContextResolver

Returns: AbstractElement


_insertPlaceholders

_insertPlaceholders(aRenderingContext: RenderingContext, aTypes: ContextMap, aCycleMap: ContextMap): RenderingContext

Defined in placeholder/placeholder.ts:151

Proxy function to inject the callback

Parameters:

ParamTypeDescription
aRenderingContextRenderingContextthe context to alter
aTypesContextMapmapping from type id to placeholder context
aCycleMapContextMapcycle protection

Returns: RenderingContext the resolved context


_insertPlaceholdersRecursive

_insertPlaceholdersRecursive(aRenderingContext: RenderingContext, aTypes: ContextMap, aCycleMap: ContextMap, aResolver: RenderingContextResolver): RenderingContext

Defined in placeholder/placeholder.ts:112

Inserts the placeholders and recurses into the rendering context structures

Parameters:

ParamTypeDescription
aRenderingContextRenderingContextthe context to alter
aTypesContextMapmapping from type id to placeholder context
aCycleMapContextMapcycle protection
aResolverRenderingContextResolverthe recursion pointer

Returns: RenderingContext the resolved context


_isAuthoringGroupElement

_isAuthoringGroupElement(aValue: any): boolean

Defined in placeholder/placeholder.ts:320

Tests if a field is a content type

Parameters:

ParamTypeDescription
aValueanythe value to check

Returns: boolean true if this value is an authoring type


_isAuthoringType

_isAuthoringType(aValue: any): boolean

Defined in placeholder/placeholder.ts:309

Tests if a field is a content type

Parameters:

ParamTypeDescription
aValueanythe value to check

Returns: boolean true if this value is an authoring type


_recResolveAuthType

_recResolveAuthType(aType: AuthoringType, aGroups: AuthoringGroupElement[], aCache: Record<string, AuthoringType>): void

Defined in placeholder/placeholder.ts:338

Recursively follows all type references and registers them

Parameters:

ParamTypeDescription
aTypeAuthoringTypethe type to analyze
aGroupsAuthoringGroupElement[]the detected group types
aCacheRecord<string, AuthoringType>the cache of the resolved authoring type

Returns: void


wchInsertPlaceholders

wchInsertPlaceholders(aRenderingContext: RenderingContext, aResolver: PlaceholderResolver): Observable<RenderingContext>

Defined in placeholder/placeholder.ts:172

Parameters:

ParamType
aRenderingContextRenderingContext
aResolverPlaceholderResolver

Returns: Observable<RenderingContext>


wchPlaceholderFromAccessor

wchPlaceholderFromAccessor(aAccessor: string, aType: AuthoringType): AuthoringPlaceholder

Defined in placeholder/placeholder.ts:393

Decodes the placeholder from an accessor expression

Parameters:

ParamTypeDescription
aAccessorstringthe accessor expression
aTypeAuthoringTypethe actual type

Returns: AuthoringPlaceholder the placeholder for the type


wchPlaceholderResolver

wchPlaceholderResolver(aTag: string, aSearch: WchSdkSearch): PlaceholderResolver

Defined in placeholder/placeholder.ts:202

Returns a resolver for placeholders based on WCH search

Parameters:

ParamTypeDescription
aTagstringthe tag used to identify placeholder types
aSearchWchSdkSearchthe search service

Returns: PlaceholderResolver the result


wchResolveType

wchResolveType(aType: AuthoringType): AuthoringType

Defined in placeholder/placeholder.ts:368

Resolves all typeRef

Parameters:

ParamTypeDescription
aTypeAuthoringTypethe authoring type

Returns: AuthoringType the resolved type (a copy)


wchTypeFromAccessor

wchTypeFromAccessor(aAccessor: string, aType: AuthoringType): string

Defined in placeholder/placeholder.ts:409

Decodes the placeholder from an accessor expression

Parameters:

ParamTypeDescription
aAccessorstringthe accessor expression
aTypeAuthoringTypethe actual type

Returns: string the placeholder for the type


@ibm-wch-sdk/utils > "predicates/predicates"

External module: "predicates/predicates"

Index

Type aliases

Variables

Functions


Type aliases

EqualsPredicate

Ƭ EqualsPredicate: function

Defined in predicates/predicates.ts:268

Type declaration

▸(aLeft: T, aRight: T): boolean

Parameters:

ParamType
aLeftT
aRightT

Returns: boolean


IsPredicate

Ƭ IsPredicate: function

Defined in predicates/predicates.ts:14

Type declaration

▸(aValue: any): boolean

Parameters:

ParamType
aValueany

Returns: boolean


Predicate

Ƭ Predicate: function

Defined in predicates/predicates.ts:266

Type declaration

▸(aValue: T): boolean

Parameters:

ParamType
aValueT

Returns: boolean


Variables

<Const> EMPTY_PROTOTYPE

● EMPTY_PROTOTYPE: any = _getPrototypeOf({})

Defined in predicates/predicates.ts:143


<Const> _getPrototypeOf

● _getPrototypeOf: getPrototypeOf = Object.getPrototypeOf

Defined in predicates/predicates.ts:142


<Const> _isArray

● _isArray: IsPredicate<any[]> = Array.isArray

Defined in predicates/predicates.ts:20


<Const> _isBoolean

● _isBoolean: IsPredicate<boolean> = _isEqualTo( _typeOf(!0), _typeOf ) as any

Defined in predicates/predicates.ts:100

Tests if a value is a boolean value param: the value

returns: true if the value is boolean, else false


<Const> _isFunction

● _isFunction: IsPredicate<Function> = _isEqualTo( _applyToString(_applyToString), _applyToString ) as any

Defined in predicates/predicates.ts:53


<Const> _isNil

● _isNil: function = or( _isUndefined, _isNull ) as any

Defined in predicates/predicates.ts:127

Type declaration

▸(aObject: any): boolean

Parameters:

ParamType
aObjectany

Returns: boolean


<Const> _isNilOrEmpty

● _isNilOrEmpty: function = not(_isNotEmpty)

Defined in predicates/predicates.ts:248

Tests if the array does not exist or if it is empty param: the array

returns: true if the array is nil or empty, else false

Type declaration

▸(aValue: T): boolean

Parameters:

ParamType
aValueT

Returns: boolean


<Const> _isNotEmpty

● _isNotEmpty: function = pluckProperty< any[], keyof any[]

('length') as any

Defined in predicates/predicates.ts:236

Tests if an array is not empty param: the array

returns: true if the array is not empty, else false

Type declaration

▸<T>(aArray: T[]): boolean

Type parameters:

T

Parameters:

ParamType
aArrayT[]

Returns: boolean


<Const> _isNotNil

● _isNotNil: function = not( _isNil ) as any

Defined in predicates/predicates.ts:138

Type declaration

▸<T>(aObject: T | null | undefined): boolean

Type parameters:

T

Parameters:

ParamType
aObjectT | null | undefined

Returns: boolean


<Const> _isNull

● _isNull: IsPredicate<null> = _isEqualTo(null) as any

Defined in predicates/predicates.ts:119


<Const> _isNumber

● _isNumber: IsPredicate<number> = _isEqualTo(_typeOf(0), _typeOf) as any

Defined in predicates/predicates.ts:82

Tests if a value is a number value param: the value

returns: true if the value is number, else false


<Const> _isString

● _isString: IsPredicate<string> = _isEqualTo( _applyToString(''), _applyToString ) as any

Defined in predicates/predicates.ts:63


<Const> _isStringArray

● _isStringArray: IsPredicate<string[]> = partialSecond( _isArrayOf, _isString ) as any

Defined in predicates/predicates.ts:189

Tests if all elements of the array are of type string param: the value to test

param: the predicate to test each element with

returns: true if the value is an array and all elements are of the specific type


<Const> _isUndefined

● _isUndefined: IsPredicate<undefined> = _isEqualTo(UNDEFINED) as any

Defined in predicates/predicates.ts:111


<Const> _toString

● _toString: toString = Object.prototype.toString

Defined in predicates/predicates.ts:19


Functions

_applyToString

_applyToString(aValue: any): string

Defined in predicates/predicates.ts:44

Parameters:

ParamType
aValueany

Returns: string


<Const> _isAbsoluteUrl

_isAbsoluteUrl(aUrl: string): boolean

Defined in predicates/predicates.ts:165

Tests if a URL is an absolute URL

Parameters:

ParamTypeDescription
aUrlstringthe URL string

Returns: boolean true if the URL is absolute, else false


_isArrayOf

_isArrayOf<T>(aValue: any, aPredicate: IsPredicate<T>): boolean

Defined in predicates/predicates.ts:176

Tests if all elements of the array are of a particular type

Type parameters:

T

Parameters:

ParamTypeDescription
aValueanythe value to test
aPredicateIsPredicate<T>the predicate to test each element with

Returns: boolean true if the value is an array and all elements are of the specific type


_isDate

_isDate(aValue: any): boolean

Defined in predicates/predicates.ts:90

Tests if a value is a date

Parameters:

ParamTypeDescription
aValueanythe value

Returns: boolean true if the value is date, else false


<Const> _isEmpty

_isEmpty(aArray: any[]): boolean

Defined in predicates/predicates.ts:228

Tests if an array is empty

Parameters:

ParamTypeDescription
aArrayany[]the array

Returns: boolean true if the array is empty, else false


<Const> _isEqualTo

_isEqualTo<T,R>(aComparison: T, aTransform?: UnaryFunction<R, T>): Predicate<R>

Defined in predicates/predicates.ts:28

Returns a function that tests if a value is equal to another value

Type parameters:

T

R

Parameters:

ParamTypeDescription
aComparisonTthe value to compare with
Optional aTransformUnaryFunction<R, T>

Returns: Predicate<R> the predicate


_isObjectOf

_isObjectOf<T>(aValue: any, aPredicate: IsPredicate<T>): boolean

Defined in predicates/predicates.ts:202

Tests if all fields of an object are of a particular type

Type parameters:

T

Parameters:

ParamTypeDescription
aValueanythe value to test
aPredicateIsPredicate<T>the predicate to test each element with

Returns: boolean true if the value is an array and all elements are of the specific type


_isParseableAsDate

_isParseableAsDate(aValue: any): boolean

Defined in predicates/predicates.ts:258

Tests if all fields of an object are of a particular type

Parameters:

ParamTypeDescription
aValueanythe value to test

Returns: boolean true if the value is an array and all elements are of the specific type


_isPlainObject

_isPlainObject(aObject: any): boolean

Defined in predicates/predicates.ts:150

Parameters:

ParamType
aObjectany

Returns: boolean


<Const> _typeOf

_typeOf(aValue: any): "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"

Defined in predicates/predicates.ts:74

TypeOf as a function

Parameters:

ParamTypeDescription
aValueanyvalue to check

Returns: "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"

the type


isFlagSet

isFlagSet(aValue: number, aFlag: number): boolean

Defined in predicates/predicates.ts:270

Parameters:

ParamType
aValuenumber
aFlagnumber

Returns: boolean


@ibm-wch-sdk/utils > "rendering/rendering"

External module: "rendering/rendering"

Index

Enumerations

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

ExpressionGetter

Ƭ ExpressionGetter: Generator<string>

Defined in rendering/rendering.ts:705


HandlerType

Ƭ HandlerType: function

Defined in rendering/rendering.ts:450

Type declaration

▸(aName: string, aElement: any, aRenderingContext: any): void

Parameters:

ParamType
aNamestring
aElementany
aRenderingContextany

Returns: void


PlaceholderHandlerType

Ƭ PlaceholderHandlerType: function

Defined in rendering/rendering.ts:261

Type declaration

▸(aElement: AbstractElement, aPlaceholder: AbstractElement): any

Parameters:

ParamType
aElementAbstractElement
aPlaceholderAbstractElement

Returns: any


ValueConverter

Ƭ ValueConverter: UnaryFunction<T, R>

Defined in rendering/rendering.ts:128

Converts a value


ValueExtractor

Ƭ ValueExtractor: UnaryFunction<any, T | T[] | null>

Defined in rendering/rendering.ts:66

Function that extracts a value


Variables

<Const> KEY_EXPRESSION

● KEY_EXPRESSION: "45b01348-de92-44a0-8103-7b7dc471ad8c" = "45b01348-de92-44a0-8103-7b7dc471ad8c"

Defined in rendering/rendering.ts:702


<Const> KEY_PLACEHOLDER

● KEY_PLACEHOLDER: "$$PLACEHOLDER" = "$$PLACEHOLDER"

Defined in rendering/rendering.ts:56


<Const> PROPERTY_REGEX

● PROPERTY_REGEX: RegExp = /^(^[+)([\d+])?$/

Defined in rendering/rendering.ts:748


<Const> _ELEMENTS

● _ELEMENTS: "elements" = "elements"

Defined in rendering/rendering.ts:58


<Const> _ELEMENT_TYPE

● _ELEMENT_TYPE: "elementType" = "elementType"

Defined in rendering/rendering.ts:61


<Const> _EXTRACTORS

● _EXTRACTORS: Record<string, ValueExtractor<any>>

Defined in rendering/rendering.ts:71

extractors


<Let> _LAZY_HANDLERS

● _LAZY_HANDLERS: object

Defined in rendering/rendering.ts:470

Type declaration

key: string: HandlerType


<Let> _LAZY_HANDLER_KEYS

● _LAZY_HANDLER_KEYS: object

Defined in rendering/rendering.ts:481

Records the keys of the registered handlers

Type declaration

key: string: HandlerKind


<Let> _LAZY_PLACEHOLDER_HANDLERS

● _LAZY_PLACEHOLDER_HANDLERS: Record<string, PlaceholderHandlerType>

Defined in rendering/rendering.ts:269


<Const> _VALUE

● _VALUE: "value" = "value"

Defined in rendering/rendering.ts:60


<Const> _VALUES

● _VALUES: "values" = "values"

Defined in rendering/rendering.ts:59


<Const> _ignoreElement

● _ignoreElement: noop = noop

Defined in rendering/rendering.ts:584


<Const> categoryConverter

● categoryConverter: _parseCategories = _parseCategories

Defined in rendering/rendering.ts:143

Converts a category to a parsed category object


<Const> dateConverter

● dateConverter: _parseDate = _parseDate

Defined in rendering/rendering.ts:138

Converts a value to a date object


<Const> identityConverter

● identityConverter: identity = identity

Defined in rendering/rendering.ts:133

Identity conversion


<Const> identityExtractor

● identityExtractor: identity = identity

Defined in rendering/rendering.ts:103

Nothing to do for extraction


Functions

_addPlaceholderToElement

_addPlaceholderToElement(aElement: any, aType: AbstractElement): any

Defined in rendering/rendering.ts:651

Helper function that inserts a placeholder into an element

Parameters:

ParamType
aElementany
aTypeAbstractElement

Returns: any


_addTypings

_addTypings(aRenderingContext: RenderingContext): RenderingContext

Defined in rendering/rendering.ts:633

Parameters:

ParamType
aRenderingContextRenderingContext

Returns: RenderingContext


<Const> _assertHandlers

_assertHandlers(): void

Defined in rendering/rendering.ts:589

Makes sure we have initialized the handlers

Returns: void


_categoryElement

_categoryElement(): void

Defined in rendering/rendering.ts:565

Returns: void


<Const> _dateElement

_dateElement(): void

Defined in rendering/rendering.ts:558

Returns: void


_decodeExpression

_decodeExpression(aExpression: string): string

Defined in rendering/rendering.ts:670

Decodes the expression back to an expression into elements. The expression might point either to the optimized element or to the elements structure itself.

Parameters:

ParamTypeDescription
aExpressionstringthe original expression

Returns: string the decoded expression


_extractAndConvert

_extractAndConvert<T,R>(aExtractor: ValueExtractor<T>, aConverter: ValueConverter<T, R>): ValueExtractor<R>

Defined in rendering/rendering.ts:207

Returns a combined function that extracts a value and converts it

Type parameters:

T

R

Parameters:

ParamTypeDescription
aExtractorValueExtractor<T>the extractor function
aConverterValueConverter<T, R>the converter

Returns: ValueExtractor<R> the function


_getExpressionFromAccessor

_getExpressionFromAccessor(aPrototype: any, aAccessor: string): string | undefined

Defined in rendering/rendering.ts:758

Tranlates the accessor to an expression

Parameters:

ParamTypeDescription
aPrototypeanythe object
aAccessorstringthe accessor string, possibly indexed

Returns: string | undefined

the accessor expression, relative to the rendering context


_getExpressionFromProperty

_getExpressionFromProperty(aPrototype: any, aPropertyKey: string): string | null | undefined

Defined in rendering/rendering.ts:716

Returns the property binding expression from the getter of a property. A property is always bound to a top level element, NOT to an inner value of a group expression.

Parameters:

ParamTypeDescription
aPrototypeanythe prototype object
aPropertyKeystringthe property key

Returns: string | null | undefined

the expression or undefined if it does not exist


<Const> _groupElement

_groupElement(): void

Defined in rendering/rendering.ts:551

Returns: void


_handleElement

_handleElement<T,R>(aSingleType: string, aMultiType: string, aName: string, aElement: any, aRenderingContext: any, aExtractor: ValueExtractor<T>): void

Defined in rendering/rendering.ts:229

Type parameters:

T

R

Parameters:

ParamType
aSingleTypestring
aMultiTypestring
aNamestring
aElementany
aRenderingContextany
aExtractorValueExtractor<T>

Returns: void


_insertDirectPlaceholder

_insertDirectPlaceholder(aElement: AbstractElement, aPlaceholder: AbstractElement): AbstractElement

Defined in rendering/rendering.ts:312

Adds a placeholder to a direct value element

Parameters:

ParamTypeDescription
aElementAbstractElementthe element
aPlaceholderAbstractElement

Returns: AbstractElement the element


_insertDirectValuesPlaceholder

_insertDirectValuesPlaceholder(aElement: AbstractElement, aPlaceholder: AbstractElement): AbstractElement

Defined in rendering/rendering.ts:428

Insert a placeholder into a raw/values structure

Parameters:

ParamTypeDescription
aElementAbstractElementthe element
aPlaceholderAbstractElement

Returns: AbstractElement the replaced element


_insertValuePlaceholder

_insertValuePlaceholder(aElement: AbstractElement, aPlaceholder: AbstractElement): AbstractElement

Defined in rendering/rendering.ts:279

Adds a placeholder to a single value element

Parameters:

ParamTypeDescription
aElementAbstractElementthe element
aPlaceholderAbstractElement

Returns: AbstractElement the element


_insertValueValuesPlaceholder

_insertValueValuesPlaceholder(aElement: AbstractElement, aPlaceholder: AbstractElement): AbstractElement

Defined in rendering/rendering.ts:398

Insert a placeholder into a value/values structure

Parameters:

ParamTypeDescription
aElementAbstractElementthe element
aPlaceholderAbstractElement

Returns: AbstractElement the replaced element


_insertValuesPlaceholder

_insertValuesPlaceholder(aElement: AbstractElement, aPlaceholder: AbstractElement): AbstractElement

Defined in rendering/rendering.ts:348

Adds a placeholder to a single value element

Parameters:

ParamTypeDescription
aElementAbstractElementthe element
aPlaceholderAbstractElement

Returns: AbstractElement the element


_isElementEmpty

_isElementEmpty(aElement: AbstractElement): boolean

Defined in rendering/rendering.ts:300

Test if an element is empty. That's the case if it just defines the element type, but nohing else

Parameters:

ParamTypeDescription
aElementAbstractElementthe element

Returns: boolean true if the element is empty, else false


_parseCategories

_parseCategories(aCategory: any): CategoryElement

Defined in rendering/rendering.ts:91

Parses a category element by adding a parsed value

Parameters:

ParamTypeDescription
aCategoryanythe category

Returns: CategoryElement the augmented category


<Const> _parseCategory

_parseCategory(aCategory: string): string[]

Defined in rendering/rendering.ts:83

Parameters:

ParamType
aCategorystring

Returns: string[]


<Const> _parseDate

_parseDate(aValue: number | string | Date): Date

Defined in rendering/rendering.ts:79

Decodes a value into a date object

Parameters:

ParamTypeDescription
aValuenumber | string | Datethe value

Returns: Date the object


_pluralize

_pluralize(aValue: string): string

Defined in rendering/rendering.ts:462

Parameters:

ParamType
aValuestring

Returns: string


_prepareRenderingContextInterceptors

_prepareRenderingContextInterceptors(aRenderingContextInterceptors: RenderingContextInterceptor[]): RenderingContextInterceptors

Defined in rendering/rendering.ts:826

Prepare a list of interceptors

Parameters:

ParamType
aRenderingContextInterceptorsRenderingContextInterceptor[]

Returns: RenderingContextInterceptors


<Const> _pushArray

_pushArray<T>(aValues: T[], aArray: T[]): T[]

Defined in rendering/rendering.ts:334

Inserts a sequence of elements into the target array

Type parameters:

T

Parameters:

ParamTypeDescription
aValuesT[]values to insert
aArrayT[]target array

Returns: T[] the target array


_setMultiValue

_setMultiValue<T>(aName: string, aValue: T[], aSingleType: string, aMultiType: string, aRenderingContext: any): void

Defined in rendering/rendering.ts:184

Type parameters:

T

Parameters:

ParamType
aNamestring
aValueT[]
aSingleTypestring
aMultiTypestring
aRenderingContextany

Returns: void


_setSingleValue

_setSingleValue<T>(aName: string, aValue: T, aSingleType: string, aMultiType: string, aRenderingContext: any): void

Defined in rendering/rendering.ts:162

Type parameters:

T

Parameters:

ParamType
aNamestring
aValueT
aSingleTypestring
aMultiTypestring
aRenderingContextany

Returns: void


_valueValuesElement

_valueValuesElement<T,R>(aType: string, aConverter: ValueConverter<T, R>): void

Defined in rendering/rendering.ts:488

Type parameters:

T

R

Parameters:

ParamType
aTypestring
aConverterValueConverter<T, R>

Returns: void


<Const> _valueValuesElements

_valueValuesElements(aTypes: string[]): void

Defined in rendering/rendering.ts:537

Parameters:

ParamType
aTypesstring[]

Returns: void


_valuesElement

_valuesElement<T,R>(aType: string, aConverter: ValueConverter<T, R>): void

Defined in rendering/rendering.ts:514

Type parameters:

T

R

Parameters:

ParamType
aTypestring
aConverterValueConverter<T, R>

Returns: void


<Const> _valuesElements

_valuesElements(aTypes: string[]): void

Defined in rendering/rendering.ts:545

Parameters:

ParamType
aTypesstring[]

Returns: void


<Const> groupConverter

groupConverter(aGroupElement: any): any

Defined in rendering/rendering.ts:150

Parameters:

ParamType
aGroupElementany

Returns: any


<Const> groupReducer

groupReducer(res: any, el: any, name: any): any

Defined in rendering/rendering.ts:148

Converts a group element into a simpler structure

Parameters:

ParamType
resany
elany
nameany

Returns: any


<Const> mapToPlc

mapToPlc(): number

Defined in rendering/rendering.ts:339

Returns: number


<Const> opRcToRcs

opRcToRcs(onRc: Observable<RenderingContext>): Observable<RenderingContext[]>

Defined in rendering/rendering.ts:809

Parameters:

ParamType
onRcObservable<RenderingContext>

Returns: Observable<RenderingContext[]>


<Const> opRcsToRc

opRcsToRc(onRcs: Observable<RenderingContext[]>): Observable<RenderingContext>

Defined in rendering/rendering.ts:815

Parameters:

ParamType
onRcsObservable<RenderingContext[]>

Returns: Observable<RenderingContext>


valueValuesExtractor

valueValuesExtractor(aValue: any): any | any[]

Defined in rendering/rendering.ts:110

Extracts the 'values' field if it is an array, else the 'value' field

Parameters:

ParamTypeDescription
aValueany

Returns: any | any[]


valuesExtractor

valuesExtractor(aValue: any): any | any[]

Defined in rendering/rendering.ts:120

Extracts the 'values' field if it is an array, else the object itself

Parameters:

ParamTypeDescription
aValueany

Returns: any | any[]


wchElementFromRenderingContext

wchElementFromRenderingContext(aContext: RenderingContext, aAccessor: string): AbstractElement

Defined in rendering/rendering.ts:890

Decodes an element from the accessor

Parameters:

ParamTypeDescription
aContextRenderingContextthe rendering context
aAccessorstringthe accessor expression

Returns: AbstractElement the element or undefineds


Object literals

<Const> NOOP_INTERCEPTORS

NOOP_INTERCEPTORS: object

Defined in rendering/rendering.ts:818

opRenderingContext

● opRenderingContext: identity = identity

Defined in rendering/rendering.ts:819


opRenderingContexts

● opRenderingContexts: identity = identity

Defined in rendering/rendering.ts:820



@ibm-wch-sdk/utils > "rx/rx.utils"

External module: "rx/rx.utils"

Index

Classes

Interfaces

Type aliases

Variables

Functions


Type aliases

ObservableOrT

Ƭ ObservableOrT: GeneratorOrT<T> | Observable<GeneratorOrT<T>>

Defined in rx/rx.utils.ts:265


Variables

<Const> EMPTY_JSON_OBSERVABLE

● EMPTY_JSON_OBSERVABLE: Observable<AnyJson> = EMPTY

Defined in rx/rx.utils.ts:176


<Const> EMPTY_STRING_OBSERVABLE

● EMPTY_STRING_OBSERVABLE: Observable<string> = EMPTY

Defined in rx/rx.utils.ts:171


<Const> _pipe

● _pipe: RxPipe = __pipe as any

Defined in rx/rx.utils.ts:263


<Const> _slice

● _slice: slice = Array.prototype.slice

Defined in rx/rx.utils.ts:255


<Const> idleFrameScheduler

● idleFrameScheduler: SchedulerLike = new IdleFrameScheduler()

Defined in rx/rx.utils.ts:102


Functions

__pipe

__pipe(): any

Defined in rx/rx.utils.ts:257

Returns: any


_createConsumer

_createConsumer<T>(aSubject: Subject<T> | Observer<T>): Consumer<T>

Defined in rx/rx.utils.ts:34

Binds to the next function of a subject

Type parameters:

T

Parameters:

ParamTypeDescription
aSubjectSubject<T> | Observer<T>the subject that handles the events

Returns: Consumer<T> the binding function


_createGetter

_createGetter<T>(aObservable: Observable<T>, aInitial?: T): PropertyDescriptor

Defined in rx/rx.utils.ts:59

Constructs a getter description

Type parameters:

T

Parameters:

ParamTypeDescription
aObservableObservable<T>the observable that handles the getter events
Optional aInitialTa potential initial value

Returns: PropertyDescriptor the description of the getter


_createSetter

_createSetter<T>(aSubject: Subject<T>): PropertyDescriptor

Defined in rx/rx.utils.ts:44

Constructs a setter description

Type parameters:

T

Parameters:

ParamTypeDescription
aSubjectSubject<T>the subject that handles the setter events

Returns: PropertyDescriptor the description of the setter


_createSingleSubject

_createSingleSubject<T>(): ReplaySubject<T>

Defined in rx/rx.utils.ts:152

Constructs a singe replay subject

Type parameters:

T

Returns: ReplaySubject<T> the subject


_fromObservableOrT

_fromObservableOrT<T>(aValue: ObservableOrT<T>): Observable<T>

Defined in rx/rx.utils.ts:273

Converts the generic type into an observable of the desired type

Type parameters:

T

Parameters:

ParamTypeDescription
aValueObservableOrT<T>the generic type

Returns: Observable<T> observable of the desired type


_generateItem

_generateItem<T>(aGenerator: Generator<T>): Observable<T>

Defined in rx/rx.utils.ts:163

Type parameters:

T

Parameters:

ParamType
aGeneratorGenerator<T>

Returns: Observable<T>


_safeUnsubscribe

_safeUnsubscribe(aSubscription: Subscription | null | undefined): void

Defined in rx/rx.utils.ts:182

Parameters:

ParamType
aSubscriptionSubscription | null | undefined

Returns: void


_safeUnsubscribeAll

_safeUnsubscribeAll(aSubscriptions: Subscription[] | null | undefined): void

Defined in rx/rx.utils.ts:193

Parameters:

ParamType
aSubscriptionsSubscription[] | null | undefined

Returns: void


_thisThenThat

_thisThenThat<T>(aFirst: Observable<T>, aNext: Observable<T>): Observable<T>

Defined in rx/rx.utils.ts:113

Type parameters:

T

Parameters:

ParamType
aFirstObservable<T>
aNextObservable<T>

Returns: Observable<T>


_thisThenThats

_thisThenThats<T>(...aObservables: Observable<T>[]): Observable<T>

Defined in rx/rx.utils.ts:142

Type parameters:

T

Parameters:

ParamType
Rest aObservablesObservable<T>[]

Returns: Observable<T>


@ibm-wch-sdk/utils > "search/search.utils"

External module: "search/search.utils"

Index

Variables

Functions


Variables

<Const> _VALUE_MAX_ROWS

● _VALUE_MAX_ROWS: 2147483647 = 2147483647

Defined in search/search.utils.ts:6


Functions

_escapeAndQuoteTerm

_escapeAndQuoteTerm(aTerm: string): string

Defined in search/search.utils.ts:31

Escapes a term according to lucence syntax

Parameters:

ParamTypeDescription
aTermstring

Returns: string


_escapeKeyValue

_escapeKeyValue(aKey: string, aTerm: string | null | undefined): string

Defined in search/search.utils.ts:57

Generates a search selector and escapes the value. If the value is missing the method generates an expression that searches for missing values.

Parameters:

ParamTypeDescription
aKeystringthe search key
aTermstring | null | undefinedthe unescaped value

Returns: string the result of the escaping


_escapeKeyValueAnd

_escapeKeyValueAnd(aKey: string, ...aTerms: string[]): string

Defined in search/search.utils.ts:100

Generates a selector and joins with 'AND'

Parameters:

ParamTypeDescription
aKeystringthe search key
Rest aTermsstring[]the unescaped value

Returns: string the result of the escaping


_escapeKeyValueJoin

_escapeKeyValueJoin(aKey: string, aJoiner: string, aTerms: string[]): string

Defined in search/search.utils.ts:75

Generates a search selector using a logical concatenation of the values

Parameters:

ParamTypeDescription
aKeystringthe search key
aJoinerstringthe operator, without spaces
aTermsstring[]the unescaped value

Returns: string the result of the escaping


_escapeKeyValueOr

_escapeKeyValueOr(aKey: string, ...aTerms: string[]): string

Defined in search/search.utils.ts:112

Generates a selector and joins with 'OR'

Parameters:

ParamTypeDescription
aKeystringthe search key
Rest aTermsstring[]the unescaped value

Returns: string the result of the escaping


_escapeQuotes

_escapeQuotes(aTerm: string): string

Defined in search/search.utils.ts:22

Escapes the values that have to be escaped in a quoted term

Parameters:

ParamTypeDescription
aTermstring

Returns: string


_escapeTerm

_escapeTerm(aTerm: string): string

Defined in search/search.utils.ts:13

Escapes a term according to lucence syntax

Parameters:

ParamTypeDescription
aTermstring

Returns: string


_keyValue

_keyValue(aKey: string, aValue: string): string

Defined in search/search.utils.ts:44

Generates a key value selector. There is no need to enclose the value in double quotes, since the value is escaped, anyway.

Parameters:

ParamTypeDescription
aKeystringthe search key
aValuestringthe escaped value

Returns: string the result of the escaping


@ibm-wch-sdk/utils > "site/site.utils"

External module: "site/site.utils"

Index

Classes

Interfaces

Type aliases

Variables

Functions


Type aliases

ChangeNotification

Ƭ ChangeNotification: function

Defined in site/site.utils.ts:122

Type declaration

▸(): void

Returns: void


Variables

<Const> IGNORED_SITE_PAGE_FIELDS

● IGNORED_SITE_PAGE_FIELDS: string[] = 'children'

Defined in site/site.utils.ts:241

Listing of fields NOT copy from a site page


<Const> LOGGER

● LOGGER: "SiteUtils" = "SiteUtils"

Defined in site/site.utils.ts:99


<Const> NO_ID

● NO_ID: string = null

Defined in site/site.utils.ts:119


<Const> UNKNKOWN_ID

● UNKNKOWN_ID: string = undefined

Defined in site/site.utils.ts:114


<Const> _assign

● _assign: assign = Object.assign

Defined in site/site.utils.ts:28


<Const> _decodeURIComponent

● _decodeURIComponent: decodeURIComponent = decodeURIComponent

Defined in site/site.utils.ts:26


<Const> _encodeURIComponent

● _encodeURIComponent: encodeURIComponent = encodeURIComponent

Defined in site/site.utils.ts:27


<Const> _getBreadcrumb

● _getBreadcrumb: UnaryFunction<any, Object> = pluckPath(parsePath('context.breadcrumb'))

Defined in site/site.utils.ts:31


<Const> _getPage

● _getPage: UnaryFunction<RenderingContext, SitePage> = composeAll( _getBreadcrumb, lastElement )

Defined in site/site.utils.ts:39


Functions

_cloneSitePage

_cloneSitePage(aSitePage: SitePage): SitePage

Defined in site/site.utils.ts:249

Performs a shallow clone of a site page

Parameters:

ParamTypeDescription
aSitePageSitePagethe site page

Returns: SitePage the cloned page


_createPartialSiteContextForSitePage

_createPartialSiteContextForSitePage(aPage: SitePage, aSite: Site): SiteContext

Defined in site/site.utils.ts:521

Returns the partial rendering context for a site page

Parameters:

ParamTypeDescription
aPageSitePagethe site page
aSiteSitethe site

Returns: SiteContext the context


_createSiteContextFromSearchResult

_createSiteContextFromSearchResult(aPage: SitePage, aSearchResult: SitePage[], aSite: Site): SiteContext

Defined in site/site.utils.ts:544

Decomposes a search result into a site context structure

Parameters:

ParamTypeDescription
aPageSitePagethe page in question
aSearchResultSitePage[]the search result
aSiteSitethe site object

Returns: SiteContext the site context


_getEncodedPath

_getEncodedPath(aPath: string): string

Defined in site/site.utils.ts:74

Parameters:

ParamType
aPathstring

Returns: string


<Const> _getSiteURL

_getSiteURL(aBaseUrl: string): string

Defined in site/site.utils.ts:588

Parameters:

ParamType
aBaseUrlstring

Returns: string


_pageArrayEquals

_pageArrayEquals(aLeft: SitePage[], aRight: SitePage[]): boolean

Defined in site/site.utils.ts:93

Parameters:

ParamType
aLeftSitePage[]
aRightSitePage[]

Returns: boolean


_pageEquals

_pageEquals(aLeft: SitePage, aRight: SitePage): boolean

Defined in site/site.utils.ts:51

Parameters:

ParamType
aLeftSitePage
aRightSitePage

Returns: boolean


_siteContextEquals

_siteContextEquals(aLeft: SiteContext, aRight: SiteContext): boolean

Defined in site/site.utils.ts:152

Parameters:

ParamType
aLeftSiteContext
aRightSiteContext

Returns: boolean


access

access<T>(aKey: string, aDefault: T | null | undefined, aMapping: AsyncMapping<T>): BehaviorSubject< T | null | undefined>

Defined in site/site.utils.ts:375

Type parameters:

T

Parameters:

ParamType
aKeystring
aDefaultT | null | undefined
aMappingAsyncMapping<T>

Returns: BehaviorSubject< T | null | undefined>


analyzeSite

analyzeSite(aBreadcrumb: SitePage[], aParentPage: SitePage, aChildren: SiteChild[], aContext: AnalysisContext): SitePage[]

Defined in site/site.utils.ts:267

Parameters:

ParamType
aBreadcrumbSitePage[]
aParentPageSitePage
aChildrenSiteChild[]
aContextAnalysisContext

Returns: SitePage[]


cloneSiteInfo

cloneSiteInfo(aInfo: InternalSiteInformation): InternalSiteInformation

Defined in site/site.utils.ts:166

Parameters:

ParamType
aInfoInternalSiteInformation

Returns: InternalSiteInformation


dispatchError

dispatchError(aInfo: InternalSiteInformation, aError: any): void

Defined in site/site.utils.ts:370

Parameters:

ParamType
aInfoInternalSiteInformation
aErrorany

Returns: void


doDispatchError

doDispatchError<T>(aMapping: AsyncMapping<T>, aError: any): void

Defined in site/site.utils.ts:362

Type parameters:

T

Parameters:

ParamType
aMappingAsyncMapping<T>
aErrorany

Returns: void


doMarkComplete

doMarkComplete<T>(aMapping: AsyncMapping<T>): void

Defined in site/site.utils.ts:349

Type parameters:

T

Parameters:

ParamType
aMappingAsyncMapping<T>

Returns: void


doMarkUnused

doMarkUnused<T>(aMapping: AsyncMapping<T>, aValue: T | null | undefined): void

Defined in site/site.utils.ts:333

Type parameters:

T

Parameters:

ParamType
aMappingAsyncMapping<T>
aValueT | null | undefined

Returns: void


markComplete

markComplete(aInfo: InternalSiteInformation): void

Defined in site/site.utils.ts:357

Parameters:

ParamType
aInfoInternalSiteInformation

Returns: void


markUnused

markUnused(aInfo: InternalSiteInformation): void

Defined in site/site.utils.ts:344

Parameters:

ParamType
aInfoInternalSiteInformation

Returns: void


registerAsync

registerAsync<T>(aKey: string, aContext: T, aOldMap: AsyncMapping<T>, aNewMap: AsyncMapping<T>, aNotifications: ChangeNotification[]): void

Defined in site/site.utils.ts:188

Type parameters:

T

Parameters:

ParamType
aKeystring
aContextT
aOldMapAsyncMapping<T>
aNewMapAsyncMapping<T>
aNotificationsChangeNotification[]

Returns: void


registerSync

registerSync<T>(aKey: string, aContext: T, aOldMap: SyncMapping<T>, aNewMap: SyncMapping<T>): void

Defined in site/site.utils.ts:228

Type parameters:

T

Parameters:

ParamType
aKeystring
aContextT
aOldMapSyncMapping<T>
aNewMapSyncMapping<T>

Returns: void


@ibm-wch-sdk/utils > "site/sites.constants"

External module: "site/sites.constants"

Index

Variables


Variables

<Const> _EMPTY_SITE

● _EMPTY_SITE: Site = freezeDeep({ pages: [], id: null })

Defined in site/sites.constants.ts:6


<Const> _EMPTY_SITE_CONTEXT

● _EMPTY_SITE_CONTEXT: SiteContext = freezeDeep({ parent: undefined, sibling: [], breadcrumb: [], children: [], site: _EMPTY_SITE })

Defined in site/sites.constants.ts:11


<Const> _UNDEFINED_SITE_CONTEXT

● _UNDEFINED_SITE_CONTEXT: SiteContext = freezeDeep({ parent: undefined, sibling: [], breadcrumb: [], children: [], site: undefined })

Defined in site/sites.constants.ts:19


@ibm-wch-sdk/utils > "static/static.resources"

External module: "static/static.resources"

Index

Classes


@ibm-wch-sdk/utils > "storage/clientstorage"

External module: "storage/clientstorage"

Index

Classes

Interfaces

Functions


Functions

clientStorageFromStorage

clientStorageFromStorage(aStorage: Storage | null | undefined, aScope: string): ClientStorage

Defined in storage/clientstorage.ts:98

Parameters:

ParamType
aStorageStorage | null | undefined
aScopestring

Returns: ClientStorage


clientStorageFromWindow

clientStorageFromWindow(aScope: string, aWindow?: Window): ClientStorage

Defined in storage/clientstorage.ts:109

Parameters:

ParamType
aScopestring
Optional aWindowWindow

Returns: ClientStorage


createKey

createKey(aKey: string, aPrefix: string, aSuffix: string): string

Defined in storage/clientstorage.ts:23

Parameters:

ParamType
aKeystring
aPrefixstring
aSuffixstring

Returns: string


isQuotaExceeded

isQuotaExceeded(e: any): boolean

Defined in storage/clientstorage.ts:27

Parameters:

ParamType
eany

Returns: boolean


@ibm-wch-sdk/utils > "storage/storage.service"

External module: "storage/storage.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "ClientStorageService" = "ClientStorageService"

Defined in storage/storage.service.ts:9


@ibm-wch-sdk/utils > "url/url.utils"

External module: "url/url.utils"

Index

Type aliases

Variables

Functions


Type aliases

ParsedQuery

Ƭ ParsedQuery: Record<string, string | string[]>

Defined in url/url.utils.ts:183


Variables

<Const> PARSE_HOST

● PARSE_HOST: RegExp = /^(^:+)(?:\:(\d+))?$/

Defined in url/url.utils.ts:64


<Const> PARSE_URL

● PARSE_URL: RegExp = /^(((?:^:\/?#+):)?(?:\/\/(^\/?#))?)(^?#)(\?(?:^#))?(#(?:.))?$/

Defined in url/url.utils.ts:62

Regular expression to parse a URL according to

https://tools.ietf.org/html/rfc3986#appendix-B


<Const> SLASH

● SLASH: "/" = "/"

Defined in url/url.utils.ts:37


<Const> SLASH_REGEXP

● SLASH_REGEXP: RegExp = /^(?:\/)(.?)(?:\/)*$/

Defined in url/url.utils.ts:35


<Const> _cloneURL

● _cloneURL: UnaryFunction<URL, URL> = ternary( isNotNil, compose( _urlToString, _parseURL ), identity )

Defined in url/url.utils.ts:124


<Const> _fallbackToEmpty

● _fallbackToEmpty: UnaryFunction< string | undefined, string> = ternary( isNotNil, identity, constGenerator('') )

Defined in url/url.utils.ts:67

Fallback to an empty string if the value is not defined


<Const> _parseURL

● _parseURL: UnaryFunction< URL | string | null | undefined, URL | null | undefined> = ternary(isString, _parseUrlString, identity)

Defined in url/url.utils.ts:113


<Const> _pluckHref

● _pluckHref: UnaryFunction<HTMLLinkElement, string> = pluckProperty<HTMLLinkElement, 'href'>('href')

Defined in url/url.utils.ts:293

Accesor function of the element by href


<Const> _pluckRel

● _pluckRel: UnaryFunction<HTMLLinkElement, string> = pluckProperty<HTMLLinkElement, 'rel'>('rel')

Defined in url/url.utils.ts:288

Accesor function of the element by rel


<Const> decode

● decode: decodeURIComponent = decodeURIComponent

Defined in url/url.utils.ts:135


<Const> encode

● encode: encodeURIComponent = encodeURIComponent

Defined in url/url.utils.ts:134


Functions

_absoluteURL

_absoluteURL(aUrl: string, aDoc?: Document, aWindow?: Window): string

Defined in url/url.utils.ts:324

Makes sure the URL is absolute, resolved against the base URL

Parameters:

ParamTypeDescription
aUrlstringthe URL
Optional aDocDocumentthe document
Optional aWindowWindowthe window

Returns: string the resolved URL


_buildQueryString

_buildQueryString(aValue: any): string | null | undefined

Defined in url/url.utils.ts:172

Parameters:

ParamType
aValueany

Returns: string | null | undefined


_decodeQueryArg

_decodeQueryArg(aValue: string): string

Defined in url/url.utils.ts:191

Parameters:

ParamType
aValuestring

Returns: string


_ensureStartingAndTrailingSlash

_ensureStartingAndTrailingSlash(aUrl?: string): string

Defined in url/url.utils.ts:45

Parameters:

ParamType
Optional aUrlstring

Returns: string


_ensureTrailingSlash

_ensureTrailingSlash(aUrl: string): string

Defined in url/url.utils.ts:53

Parameters:

ParamType
aUrlstring

Returns: string


_getBaseUrlFromDocument

_getBaseUrlFromDocument(aDoc?: Document, aWindow?: Window): URL | undefined

Defined in url/url.utils.ts:249

Extracts the base URL from the current document see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

Parameters:

ParamTypeDescription
Optional aDocDocumentthe document
Optional aWindowWindow

Returns: URL | undefined

the URL


_getLinksByRel

_getLinksByRel(aDocument?: Document, aWindow?: Window): Record<string, string>

Defined in url/url.utils.ts:300

Returns all links in the document, ordered by rel

Parameters:

ParamTypeDescription
Optional aDocumentDocument
Optional aWindowWindow

Returns: Record<string, string>


_getPathForSearch

_getPathForSearch(aPath: string): string

Defined in url/url.utils.ts:275

Parameters:

ParamType
aPathstring

Returns: string


_parseQuery

_parseQuery(aQuery: string): ParsedQuery

Defined in url/url.utils.ts:201

Parameters:

ParamType
aQuerystring

Returns: ParsedQuery


_parseUrlString

_parseUrlString(aUrl: string): URL

Defined in url/url.utils.ts:80

Parses the URL string by applying a regular expression. Avoiding the use of the URL constructor which is not available on some platforms, notably not on Angular universal.

Parameters:

ParamTypeDescription
aUrlstringthe URL string

Returns: URL the URL object


_push

_push(aEncodedKey: string, aArray: string[], aValue: any): string[]

Defined in url/url.utils.ts:146

Parameters:

ParamType
aEncodedKeystring
aArraystring[]
aValueany

Returns: string[]


_reduceTokens

_reduceTokens(aTokens: string[], aValue: any, aKey: string): string[]

Defined in url/url.utils.ts:159

Reducer function used to reduce encoded key value pairs into an array

Parameters:

ParamTypeDescription
aTokensstring[]target array
aValueanythe value to add, can be any[] or any
aKeystringthe unencoded key

Returns: string[] the resulting array


_urlToString

_urlToString(aURL: URL | string): string

Defined in url/url.utils.ts:271

Parameters:

ParamType
aURLURL | string

Returns: string


getOrigin

getOrigin(aDoc?: Document, aWindow?: Window): string

Defined in url/url.utils.ts:337

Returns the orign from the doc

Parameters:

ParamTypeDescription
Optional aDocDocumentdocument
Optional aWindowWindowwindow

Returns: string the origin


@ibm-wch-sdk/utils > "wch/wch.service"

External module: "wch/wch.service"

Index

Classes

Variables

Functions

Object literals


Variables

<Const> BFF_PUBLIC_URL

● BFF_PUBLIC_URL: "delivery/v1/rendering/" = "delivery/v1/rendering/"

Defined in wch/wch.service.ts:174


<Const> BFF_SECURE_URL

● BFF_SECURE_URL: "mydelivery/v1/rendering/" = "mydelivery/v1/rendering/"

Defined in wch/wch.service.ts:175


<Const> DEFAULT_CYCLE_HANDLING

● DEFAULT_CYCLE_HANDLING: BREAK = CYCLE_HANDLING.BREAK

Defined in wch/wch.service.ts:137


<Const> EMPTY_PAGE_SEARCH_RESULT

● EMPTY_PAGE_SEARCH_RESULT: PageSearchResult[] = []

Defined in wch/wch.service.ts:108


<Const> EMPTY_RENDERING_CONTEXTS

● EMPTY_RENDERING_CONTEXTS: RenderingContext[] = []

Defined in wch/wch.service.ts:109


<Const> EMPTY_RENDERING_CONTEXTS_SEQUENCE

● EMPTY_RENDERING_CONTEXTS_SEQUENCE: Observable<RenderingContextQueryResult> = of(EMPTY_RENDERING_QUERY)

Defined in wch/wch.service.ts:121


<Const> EMPTY_RENDERING_CONTEXT_SEARCH_RESULT

● EMPTY_RENDERING_CONTEXT_SEARCH_RESULT: RenderingContextSearchResult[] = []

Defined in wch/wch.service.ts:107


<Const> EMPTY_SITE_PAGES_SEQUENCE

● EMPTY_SITE_PAGES_SEQUENCE: Observable<SitePagesQueryResult> = of( EMPTY_SITE_PAGES_QUERY )

Defined in wch/wch.service.ts:124


<Const> LOGGER

● LOGGER: "WchService" = "WchService"

Defined in wch/wch.service.ts:133


<Const> NO_RENDERING_CONTEXT

● NO_RENDERING_CONTEXT: Observable<RenderingContext> = of( EMPTY_RENDERING_CONTEXT ).pipe(map(cloneDeep))

Defined in wch/wch.service.ts:128


<Const> UNKNOWN_RENDERING_CONTEXT

● UNKNOWN_RENDERING_CONTEXT: Observable<RenderingContext> = of(undefined)

Defined in wch/wch.service.ts:131


<Const> _Subject

● _Subject: Subject = Subject

Defined in wch/wch.service.ts:134


<Const> _assign

● _assign: assign = Object.assign

Defined in wch/wch.service.ts:172


Functions

_getPathFromUrlSegments

_getPathFromUrlSegments(aSegments: string[]): string

Defined in wch/wch.service.ts:165

Constructs the URL path based on the segemnets

Parameters:

ParamTypeDescription
aSegmentsstring[]the segments

Returns: string the path


_pluckDocument

_pluckDocument<T>(aSearchResult: SearchResult<T>): T

Defined in wch/wch.service.ts:145

Extracts the document element from a search result

Type parameters:

T

Parameters:

ParamTypeDescription
aSearchResultSearchResult<T>the result

Returns: T the document


_pluckSiteId

_pluckSiteId(aSite: Site): string

Defined in wch/wch.service.ts:155

Extracts the site ID from the site

Parameters:

ParamTypeDescription
aSiteSitethe site

Returns: string the document


Object literals

<Const> EMPTY_RENDERING_QUERY

EMPTY_RENDERING_QUERY: object

Defined in wch/wch.service.ts:110

numFound

● numFound: number = 0

Defined in wch/wch.service.ts:111


renderingContexts

● renderingContexts: RenderingContext[] = EMPTY_RENDERING_CONTEXTS

Defined in wch/wch.service.ts:112



<Const> EMPTY_SITE_PAGES_QUERY

EMPTY_SITE_PAGES_QUERY: object

Defined in wch/wch.service.ts:114

numFound

● numFound: number = 0

Defined in wch/wch.service.ts:115


sitePages

● sitePages: undefined[] = []

Defined in wch/wch.service.ts:116



@ibm-wch-sdk/utils > "wch/wch.utils"

External module: "wch/wch.utils"

Index

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

RenderingContextCallback

Ƭ RenderingContextCallback: function

Defined in wch/wch.utils.ts:592

Type declaration

▸(rc: RenderingContext, parent?: RenderingContext, path?: string): void

Parameters:

ParamType
rcRenderingContext
Optional parentRenderingContext
Optional pathstring

Returns: void


Variables

<Const> DX_SITES

● DX_SITES: "dxsites" = "dxsites"

Defined in wch/wch.utils.ts:75


<Const> HEX_REGEXP_STRING

● HEX_REGEXP_STRING: "0-9a-fA-F" = "0-9a-fA-F"

Defined in wch/wch.utils.ts:77


<Const> HOST_REGEXP_STRING

● HOST_REGEXP_STRING: "^.\:" = "^.\:"

Defined in wch/wch.utils.ts:78


<Const> KEY_CYCLE

● KEY_CYCLE: "$$CYCLE" = "$$CYCLE"

Defined in wch/wch.utils.ts:55


<Const> KEY_LAYOUT_MODE

● KEY_LAYOUT_MODE: "layoutMode" = "layoutMode"

Defined in wch/wch.utils.ts:275


<Const> KEY_LEVELS

● KEY_LEVELS: "levels" = "levels"

Defined in wch/wch.utils.ts:276


<Const> KEY_REFERENCE

● KEY_REFERENCE: "$$REF" = "$$REF"

Defined in wch/wch.utils.ts:56


<Const> KEY_RENDERING_CONTEXT

● KEY_RENDERING_CONTEXT: "renderingContext" = "renderingContext"

Defined in wch/wch.utils.ts:274


<Const> KEY_RENDERING_CONTEXT_MAP

● KEY_RENDERING_CONTEXT_MAP: unique symbol = Symbol('RenderingContextMap')

Defined in wch/wch.utils.ts:53


<Const> LIVE_HREF_REGEXP

● LIVE_HREF_REGEXP: RegExp = new RegExp(LIVE_HREF_REGEXP_STRING)

Defined in wch/wch.utils.ts:96


<Const> LIVE_HREF_REGEXP_STRING

● LIVE_HREF_REGEXP_STRING: string = ^(http[s]?:\/\/(?:${HOST_REGEXP_STRING}+))((?:\.${HOST_REGEXP_STRING}+)+(?:.*))$

Defined in wch/wch.utils.ts:95


<Const> PREVIEW_HOST_REGEXP

● PREVIEW_HOST_REGEXP: RegExp = new RegExp(PREVIEW_HOST_REGEXP_STRING)

Defined in wch/wch.utils.ts:88


<Const> PREVIEW_HOST_REGEXP_STRING

● PREVIEW_HOST_REGEXP_STRING: string = ^(?:(${HOST_REGEXP_STRING}+)${PREVIEW_INDICATOR})((?:\\.${HOST_REGEXP_STRING}+)+)$

Defined in wch/wch.utils.ts:87


<Const> PREVIEW_HREF_REGEXP

● PREVIEW_HREF_REGEXP: RegExp = new RegExp(PREVIEW_HREF_REGEXP_STRING)

Defined in wch/wch.utils.ts:100


<Const> PREVIEW_HREF_REGEXP_STRING

● PREVIEW_HREF_REGEXP_STRING: string = ^(http[s]?:\/\/(?:${HOST_REGEXP_STRING}+))${PREVIEW_INDICATOR}((?:\.${HOST_REGEXP_STRING}+)+(?:.*))$

Defined in wch/wch.utils.ts:99


<Const> PREVIEW_INDICATOR

● PREVIEW_INDICATOR: string = (?:${PREVIEW_SUFFIX}|${PREVIEW_SUFFIX_STAGE})

Defined in wch/wch.utils.ts:86


<Const> PREVIEW_ORIGIN_REGEXP

● PREVIEW_ORIGIN_REGEXP: RegExp = new RegExp(PREVIEW_ORIGIN_REGEXP_STRING)

Defined in wch/wch.utils.ts:92


<Const> PREVIEW_ORIGIN_REGEXP_STRING

● PREVIEW_ORIGIN_REGEXP_STRING: string = ^http[s]?:\\/\\/(?:(${HOST_REGEXP_STRING}+)${PREVIEW_INDICATOR})((?:\\.${HOST_REGEXP_STRING}+)+)(:\\d+)?$

Defined in wch/wch.utils.ts:91


<Const> PREVIEW_SUFFIX

● PREVIEW_SUFFIX: "-preview" = "-preview"

Defined in wch/wch.utils.ts:84


<Const> PREVIEW_SUFFIX_STAGE

● PREVIEW_SUFFIX_STAGE: "-preview-stage" = "-preview-stage"

Defined in wch/wch.utils.ts:85


<Const> SITE_ID_STRING

● SITE_ID_STRING: "\w\d_-%" = "\w\d_-%"

Defined in wch/wch.utils.ts:76


<Const> TENANT_BASED_URL

● TENANT_BASED_URL: string = ^(?:\\/api)?(?:\\/(${UUID_V4_REGEXP_STRING}))?(?:(?:\\/${DX_SITES}\\/)(${SITE_ID_STRING}+))?(?:\\/)?(?:.*)$

Defined in wch/wch.utils.ts:80


<Const> TENANT_BASED_URL_REGEXP

● TENANT_BASED_URL_REGEXP: RegExp = new RegExp(TENANT_BASED_URL)

Defined in wch/wch.utils.ts:81


<Const> UUID_V4_REGEXP_STRING

● UUID_V4_REGEXP_STRING: string = ${HEX_REGEXP_STRING}{8}-${HEX_REGEXP_STRING}{4}-4${HEX_REGEXP_STRING}{3}-[89abAB]${HEX_REGEXP_STRING}{3}-${HEX_REGEXP_STRING}{12}

Defined in wch/wch.utils.ts:79


<Const> VALUE_ROOT

● VALUE_ROOT: "$" = "$"

Defined in wch/wch.utils.ts:590


<Const> _ALL_FETCH_LEVELS

● _ALL_FETCH_LEVELS: -1 = -1

Defined in wch/wch.utils.ts:102


<Const> _DEFAULT_FETCH_LEVELS

● _DEFAULT_FETCH_LEVELS: -1 = _ALL_FETCH_LEVELS

Defined in wch/wch.utils.ts:103


<Const> _FQ_SITE_ID

● _FQ_SITE_ID: "siteId" = "siteId"

Defined in wch/wch.utils.ts:292


<Const> _KEY_FIELD_LIST

● _KEY_FIELD_LIST: "fl" = "fl"

Defined in wch/wch.utils.ts:281


<Const> _KEY_PATHS

● _KEY_PATHS: "paths" = "paths"

Defined in wch/wch.utils.ts:284


<Const> _KEY_ROWS

● _KEY_ROWS: "rows" = "rows"

Defined in wch/wch.utils.ts:283


<Const> _KEY_SEARCH_FQ

● _KEY_SEARCH_FQ: "fq" = "fq"

Defined in wch/wch.utils.ts:288


<Const> _KEY_SEARCH_Q

● _KEY_SEARCH_Q: "q" = "q"

Defined in wch/wch.utils.ts:279


<Const> _KEY_SORT

● _KEY_SORT: "sort" = "sort"

Defined in wch/wch.utils.ts:282


<Const> _PREFIX_SEARCH_CLASSIFICATION

● _PREFIX_SEARCH_CLASSIFICATION: "classification" = "classification"

Defined in wch/wch.utils.ts:291


<Const> _VALUE_FIELD_LIST

● _VALUE_FIELD_LIST: "document:json" = "document:json"

Defined in wch/wch.utils.ts:287


<Const> _VALUE_MAX_ROWS

● _VALUE_MAX_ROWS: string = anyToString(0x7fffffff)

Defined in wch/wch.utils.ts:286


<Const> _VALUE_ONE_ROW

● _VALUE_ONE_ROW: "1" = "1"

Defined in wch/wch.utils.ts:285


<Const> _VALUE_SEARCH_FQ_CONTENT

● _VALUE_SEARCH_FQ_CONTENT: "classification:(content)" = "classification:(content)"

Defined in wch/wch.utils.ts:289


<Const> _VALUE_SEARCH_FQ_PAGE

● _VALUE_SEARCH_FQ_PAGE: "classification:(page)" = "classification:(page)"

Defined in wch/wch.utils.ts:290


<Const> _VALUE_SEARCH_Q

● _VALUE_SEARCH_Q: ":" = ":"

Defined in wch/wch.utils.ts:280


<Const> _mergeHubInfo

● _mergeHubInfo: BiFunction<HubInfo, HubInfo, HubInfo> = mergeObjects

Defined in wch/wch.utils.ts:209

Merges the config of two hub infos


Functions

_addDebug

_addDebug(aPath: string, aRenderingContext: RenderingContext): RenderingContext

Defined in wch/wch.utils.ts:523

Parameters:

ParamType
aPathstring
aRenderingContextRenderingContext

Returns: RenderingContext


_adjustRenderingContextSearchQuery

_adjustRenderingContextSearchQuery(aQuery: string): string

Defined in wch/wch.utils.ts:371

Parameters:

ParamType
aQuerystring

Returns: string


_adjustSearchQuery

_adjustSearchQuery(aQuery: string, aFieldQueries: string[]): string

Defined in wch/wch.utils.ts:325

Generically adjust the search query

Parameters:

ParamTypeDescription
aQuerystringthe query
aFieldQueriesstring[]

Returns: string the new query string


_adjustSitePagesSearchQuery

_adjustSitePagesSearchQuery(aQuery: string, aSiteId: string): string

Defined in wch/wch.utils.ts:382

Parameters:

ParamType
aQuerystring
aSiteIdstring

Returns: string


_boxFetchLevels

_boxFetchLevels(aLevels: number | null | undefined, aDefault?: number): number

Defined in wch/wch.utils.ts:239

Parameters:

ParamType
aLevelsnumber | null | undefined
Optional aDefaultnumber

Returns: number


_boxLayoutMode

_boxLayoutMode(aMode: string | null | undefined): string

Defined in wch/wch.utils.ts:111

Parameters:

ParamType
aModestring | null | undefined

Returns: string


_forEachRenderingContext

_forEachRenderingContext(aRenderingContext: RenderingContext, aCallback: RenderingContextCallback): void

Defined in wch/wch.utils.ts:702

Parameters:

ParamType
aRenderingContextRenderingContext
aCallbackRenderingContextCallback

Returns: void


_forEachRenderingContexts

_forEachRenderingContexts(aRenderingContext: RenderingContext[], aCallback: RenderingContextCallback): void

Defined in wch/wch.utils.ts:683

Parameters:

ParamType
aRenderingContextRenderingContext[]
aCallbackRenderingContextCallback

Returns: void


_fqValuePush

_fqValuePush(aValue: string, aArray: string[]): string[]

Defined in wch/wch.utils.ts:312

Parameters:

ParamType
aValuestring
aArraystring[]

Returns: string[]


_fromHubInfoUrlProvider

_fromHubInfoUrlProvider(aProvider: HubInfoUrlProvider): URL | null | undefined

Defined in wch/wch.utils.ts:258

Converts the provider into a URL

Parameters:

ParamTypeDescription
aProviderHubInfoUrlProviderthe provider

Returns: URL | null | undefined

the URL if available


_getApiUrlFromDeliveryURL

_getApiUrlFromDeliveryURL(aDeliveryURL: URL): URL

Defined in wch/wch.utils.ts:228

Computes the API URL given the delivery URL

Parameters:

ParamTypeDescription
aDeliveryURLURLthe delivery URL

Returns: URL the API URL


_getApiUrlFromPreview

_getApiUrlFromPreview(aApiUrl: URL, aPreviewMode: boolean): URL

Defined in wch/wch.utils.ts:803

Constructs a API URL based on a context check callback

Parameters:

ParamTypeDescription
aApiUrlURLthe configured API URL, can be the live or the preview URL
aPreviewModebooleanis preview active

Returns: URL the correct API URL


_getApiUrlInContext

_getApiUrlInContext(aApiUrl: URL, aBaseURL: URL, aPreviewCheck: UnaryFunction<URL, boolean>): URL

Defined in wch/wch.utils.ts:826

Constructs a API URL based on a context check callback

Parameters:

ParamTypeDescription
aApiUrlURLthe configured API URL, can be the live or the preview URL
aBaseURLURLthe URL the system is loaded from, this is used to check for preview mode
aPreviewCheckUnaryFunction<URL, boolean>customer provided callback to test the baseURL for preview mode

Returns: URL the correct API URL


_getBaseUrl

_getBaseUrl(aDocument?: Document, aWindow?: Window): URL

Defined in wch/wch.utils.ts:884

Decodes the base URL. The base URL is the URL that all routing URLs will start with and will be resolved as relative. The URL ends with a slash character. see: APP_BASE_URL

Parameters:

ParamTypeDescription
Optional aDocumentDocumentoptionally the document
Optional aWindowWindowoptionally the window

Returns: URL the URL


_getBaseUrlFromLocation

_getBaseUrlFromLocation(aLocation?: Location): URL | undefined

Defined in wch/wch.utils.ts:756

Extracts the base URL from the window location

Parameters:

ParamTypeDescription
Optional aLocationLocationthe location object

Returns: URL | undefined

the base URL or undefined


_getBaseUrlFromWindow

_getBaseUrlFromWindow(aWindow?: Window, aDocument?: Document): URL | undefined

Defined in wch/wch.utils.ts:843

Returns a base URL from the window

Parameters:

ParamTypeDescription
Optional aWindowWindowthe optional window object
Optional aDocumentDocumentthe document object

Returns: URL | undefined

the base URL


_getBaseUrlSuffix

_getBaseUrlSuffix(aBaseURL: URL): string

Defined in wch/wch.utils.ts:735

Parses the base URL and returns the probable base URL suffix

Parameters:

ParamTypeDescription
aBaseURLURLthe URL

Returns: string the suffix


_getChildrenExpression

_getChildrenExpression(aPageId: string): string

Defined in wch/wch.utils.ts:410

Returns the search expression that finds the children of a page

Parameters:

ParamTypeDescription
aPageIdstringId of the page

Returns: string the string


_getCycleHandling

_getCycleHandling(aCycle?: CYCLE_HANDLING | string): CYCLE_HANDLING

Defined in wch/wch.utils.ts:265

Parameters:

ParamType
Optional aCycleCYCLE_HANDLING | string

Returns: CYCLE_HANDLING


_getDeliveryUrlFromApiURL

_getDeliveryUrlFromApiURL(aApiURL: URL): URL

Defined in wch/wch.utils.ts:217

Computes the delivery URL given the API URL

Parameters:

ParamTypeDescription
aApiURLURLthe API URL

Returns: URL the delivery URL


_getHubInfoFromBaseURL

_getHubInfoFromBaseURL(aBaseURL: URL): HubInfo

Defined in wch/wch.utils.ts:171

Parameters:

ParamType
aBaseURLURL

Returns: HubInfo


_getHubInfoFromLinks

_getHubInfoFromLinks(aDocument?: Document, aWindow?: Window): HubInfo

Defined in wch/wch.utils.ts:196

Decodes the hub info from links in the document

Parameters:

ParamTypeDescription
Optional aDocumentDocumentthe document
Optional aWindowWindowthe window object

Returns: HubInfo


_getLayout

_getLayout(aLayoutMode: string | undefined, aContext: RenderingContext | undefined): Layout | undefined

Defined in wch/wch.utils.ts:121

Parameters:

ParamType
aLayoutModestring | undefined
aContextRenderingContext | undefined

Returns: Layout | undefined


_getLiveUrlFromPreviewUrl

_getLiveUrlFromPreviewUrl(aPreviewUrl: URL): URL

Defined in wch/wch.utils.ts:777

Removes the preview string from the hostname

Parameters:

ParamTypeDescription
aPreviewUrlURLthe preview URL

Returns: URL the live URL


_getPageSearchURL

_getPageSearchURL(aPath: string, aSiteId: string): Observable<string>

Defined in wch/wch.utils.ts:458

Parameters:

ParamType
aPathstring
aSiteIdstring

Returns: Observable<string>


_getParentExpression

_getParentExpression(aParentId: string | null | undefined): string

Defined in wch/wch.utils.ts:421

Returns the parent of a page

Parameters:

ParamType
aParentIdstring | null | undefined

Returns: string the string


_getParentPageURL

_getParentPageURL(aParentId: string, aSiteId: string): Observable<string>

Defined in wch/wch.utils.ts:505

Parameters:

ParamType
aParentIdstring
aSiteIdstring

Returns: Observable<string>


_getPreviewUrlFromLiveUrl

_getPreviewUrlFromLiveUrl(aLiveUrl: URL): URL

Defined in wch/wch.utils.ts:788

Insert the preview string into the hostname

Parameters:

ParamTypeDescription
aLiveUrlURLthe live URL

Returns: URL the preview URL


_getRenderingContextURL

_getRenderingContextURL(aBaseUrl: string, aID: string): string

Defined in wch/wch.utils.ts:725

Parameters:

ParamType
aBaseUrlstring
aIDstring

Returns: string


_getSearchURL

_getSearchURL(aQueryString: string): Observable<string>

Defined in wch/wch.utils.ts:447

Builds the search query string

Parameters:

ParamTypeDescription
aQueryStringstringthe query string

Returns: Observable<string> the result


_getSiblingsExpression

_getSiblingsExpression(aParentId: string | null | undefined): string

Defined in wch/wch.utils.ts:396

Returns the search expression that finds the siblings of a page

Parameters:

ParamTypeDescription
aParentIdstring | null | undefinedid of the parent page

Returns: string the string


_getSiteContextExpression

_getSiteContextExpression(aParentId: string | null | undefined, aPageId: string): string

Defined in wch/wch.utils.ts:432

Returns the expression to get the complete site context in one call

Parameters:

ParamTypeDescription
aParentIdstring | null | undefinedthe parent ID
aPageIdstringthe page ID

Returns: string the expression


_getSiteContextURL

_getSiteContextURL(aParentId: string | null | undefined, aPageId: string, aSiteId: string): Observable<string>

Defined in wch/wch.utils.ts:479

Parameters:

ParamType
aParentIdstring | null | undefined
aPageIdstring
aSiteIdstring

Returns: Observable<string>


_hubInfoUrlProvider

_hubInfoUrlProvider(aApiUrl: HubInfoUrlProvider, aPreviewCheck?: UnaryFunction<URL, boolean>): HubInfoUrlProvider

Defined in wch/wch.utils.ts:897

Exposes a provider based on a API URL and a preview callback

Parameters:

ParamTypeDescription
aApiUrlHubInfoUrlProviderthe API URL
Optional aPreviewCheckUnaryFunction<URL, boolean>callback to test if the base URL is a preview URL. If empty, use the built in default check

Returns: HubInfoUrlProvider the provider


_internalForEachRenderingContext

_internalForEachRenderingContext(aRenderingContext: RenderingContext, aParent: RenderingContext | undefined, aPath: string, aCallback: RenderingContextCallback): void

Defined in wch/wch.utils.ts:631

Parameters:

ParamType
aRenderingContextRenderingContext
aParentRenderingContext | undefined
aPathstring
aCallbackRenderingContextCallback

Returns: void


_internalForEachRenderingContexts

_internalForEachRenderingContexts(aRenderingContext: RenderingContext[], aParent: RenderingContext | undefined, aPath: string, aCallback: RenderingContextCallback): void

Defined in wch/wch.utils.ts:604

Parameters:

ParamType
aRenderingContextRenderingContext[]
aParentRenderingContext | undefined
aPathstring
aCallbackRenderingContextCallback

Returns: void


_isPreviewMode

_isPreviewMode(aBaseURL: URL): boolean

Defined in wch/wch.utils.ts:145

Parameters:

ParamType
aBaseURLURL

Returns: boolean


_isPreviewOrigin

_isPreviewOrigin(aOrigin: string): boolean

Defined in wch/wch.utils.ts:157

Parameters:

ParamType
aOriginstring

Returns: boolean


_isSearchClassification

_isSearchClassification(aValue: string): boolean

Defined in wch/wch.utils.ts:300

Parameters:

ParamType
aValuestring

Returns: boolean


_resolveRenderingContext

_resolveRenderingContext(aRenderingContext: RenderingContext | null | undefined, aStrategy: CYCLE_HANDLING, aRenderingContextById: function, aLogger?: Logger): Observable< RenderingContext | null | undefined>

Defined in wch/wch.utils.ts:535

Parameters:

ParamType
aRenderingContextRenderingContext | null | undefined
aStrategyCYCLE_HANDLING
aRenderingContextByIdfunction
Optional aLoggerLogger

Returns: Observable< RenderingContext | null | undefined>


Object literals

<Const> EMPTY_RENDERING_CONTEXT

EMPTY_RENDERING_CONTEXT: object

Defined in wch/wch.utils.ts:58

context

● context: SiteContext = EMPTY_SITE_CONTEXT

Defined in wch/wch.utils.ts:63


elements

● elements: object

Defined in wch/wch.utils.ts:60

Type declaration


id

● id: null = null

Defined in wch/wch.utils.ts:59


layouts

● layouts: object = DEFAULT_LAYOUT_MAPPING

Defined in wch/wch.utils.ts:61

Type declaration


markups

● markups: object

Defined in wch/wch.utils.ts:62

Type declaration



<Const> UNDEFINED_HUB_INFO

UNDEFINED_HUB_INFO: object

Defined in wch/wch.utils.ts:163

apiUrl

● apiUrl: undefined = undefined

Defined in wch/wch.utils.ts:164


deliveryUrl

● deliveryUrl: undefined = undefined

Defined in wch/wch.utils.ts:165



<Const> UNDEFINED_RENDERING_CONTEXT

UNDEFINED_RENDERING_CONTEXT: object

Defined in wch/wch.utils.ts:66

context

● context: SiteContext = EMPTY_SITE_CONTEXT

Defined in wch/wch.utils.ts:71


elements

● elements: object

Defined in wch/wch.utils.ts:68

Type declaration


id

● id: undefined = undefined

Defined in wch/wch.utils.ts:67


layouts

● layouts: object = DEFAULT_LAYOUT_MAPPING

Defined in wch/wch.utils.ts:69

Type declaration


markups

● markups: object

Defined in wch/wch.utils.ts:70

Type declaration



@ibm-wch-sdk/utils

Index

External modules


@ibm-wch-sdk/utils > "http/http.utils" > HttpOptions

Interface: HttpOptions

Hierarchy

HttpOptions

Index

Properties


Properties

<Optional> dispatchError

● dispatchError: boolean

Defined in http/http.utils.ts:24


withCredentials

● withCredentials: boolean

Defined in http/http.utils.ts:22


@ibm-wch-sdk/utils > "http/http.utils" > HttpService

Interface: HttpService

Hierarchy

HttpService

Index

Methods


Methods

getJson

getJson<T>(aUrl: string, aOptions: HttpOptions): Observable<T>

Defined in http/http.utils.ts:28

Type parameters:

T

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions

Returns: Observable<T>


getText

getText(aUrl: string, aOptions: HttpOptions): Observable<string>

Defined in http/http.utils.ts:29

Parameters:

ParamType
aUrlstring
aOptionsHttpOptions

Returns: Observable<string>


@ibm-wch-sdk/utils > "js/js.core" > SpreadArgs

Interface: SpreadArgs

Hierarchy

SpreadArgs

Callable

__call<T1,R>(fct: function, args: T1): R

__call<T1,T2,R>(fct: function, args: T1, T2): R

__call<T1,T2,T3,R>(fct: function, args: T1, T2, T3): R

__call<T1,T2,T3,T4,R>(fct: function, args: T1, T2, T3, T4): R

__call<T1,T2,T3,T4,T5,R>(fct: function, args: T1, T2, T3, T4, T5): R

Defined in js/js.core.ts:212

Type parameters:

T1

R

Parameters:

ParamType
fctfunction
argsT1

Returns: R

Defined in js/js.core.ts:213

Type parameters:

T1

T2

R

Parameters:

ParamType
fctfunction
argsT1, T2

Returns: R

Defined in js/js.core.ts:214

Type parameters:

T1

T2

T3

R

Parameters:

ParamType
fctfunction
argsT1, T2, T3

Returns: R

Defined in js/js.core.ts:218

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
fctfunction
argsT1, T2, T3, T4

Returns: R

Defined in js/js.core.ts:222

Type parameters:

T1

T2

T3

T4

T5

R

Parameters:

ParamType
fctfunction
argsT1, T2, T3, T4, T5

Returns: R

Index


@ibm-wch-sdk/utils > "js/js.core" > ZippedArgs

Interface: ZippedArgs

Hierarchy

ZippedArgs

Callable

__call<T1>(arg1: T1): T1

__call<T1,T2>(arg1: T1, arg2: T2): T1, T2

__call<T1,T2,T3>(arg1: T1, arg2: T2, arg3: T3): T1, T2, T3

__call<T1,T2,T3,T4>(arg1: T1, arg2: T2, arg3: T3, arg4: T4): T1, T2, T3, T4

__call<T1,T2,T3,T4,T5>(arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): T1, T2, T3, T4, T5

Defined in js/js.core.ts:183

Type parameters:

T1

Parameters:

ParamType
arg1T1

Returns: T1

Defined in js/js.core.ts:184

Type parameters:

T1

T2

Parameters:

ParamType
arg1T1
arg2T2

Returns: T1, T2

Defined in js/js.core.ts:185

Type parameters:

T1

T2

T3

Parameters:

ParamType
arg1T1
arg2T2
arg3T3

Returns: T1, T2, T3

Defined in js/js.core.ts:186

Type parameters:

T1

T2

T3

T4

Parameters:

ParamType
arg1T1
arg2T2
arg3T3
arg4T4

Returns: T1, T2, T3, T4

Defined in js/js.core.ts:187

Type parameters:

T1

T2

T3

T4

T5

Parameters:

ParamType
arg1T1
arg2T2
arg3T3
arg4T4
arg5T5

Returns: T1, T2, T3, T4, T5

Index


@ibm-wch-sdk/utils > "js/js.utils" > Bind

Interface: Bind

Hierarchy

Bind

Callable

__call<TH,R>(func: Function0<R>, aThis: TH): Function0<R>

__call<TH,T1,R>(func: Function1<T1, R>, aThis: TH): Function1<T1, R>

__call<TH,T1,R>(func: Function1<T1, R>, aThis: TH, arg1: T1): Function0<R>

__call<TH,T1,T2,R>(func: Function2<T1, T2, R>, aThis: TH): Function2<T1, T2, R>

__call<TH,T1,T2,R>(func: Function2<T1, T2, R>, aThis: TH, arg1: T1): Function1<T2, R>

__call<TH,T1,T2,R>(func: Function2<T1, T2, R>, aThis: TH, arg1: T1, arg2: T2): Function0<R>

__call<TH,T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, aThis: TH): Function3<T1, T2, T3, R>

__call<TH,T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, aThis: TH, arg1: T1): Function2<T2, T3, R>

__call<TH,T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, aThis: TH, arg1: T1, arg2: T2): Function1<T3, R>

__call<TH,T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, aThis: TH, arg1: T1, arg2: T2, arg3: T3): Function0<R>

__call<TH,T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, aThis: TH): Function4<T1, T2, T3, T4, R>

__call<TH,T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, aThis: TH, arg1: T1): Function3<T2, T3, T4, R>

__call<TH,T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, aThis: TH, arg1: T1, arg2: T2): Function2<T3, T4, R>

__call<TH,T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, aThis: TH, arg1: T1, arg2: T2, arg3: T3): Function1<T4, R>

__call<TH,T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, aThis: TH, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>

Defined in js/js.utils.ts:480

Type parameters:

TH

R

Parameters:

ParamType
funcFunction0<R>
aThisTH

Returns: Function0<R>

Defined in js/js.utils.ts:482

Type parameters:

TH

T1

R

Parameters:

ParamType
funcFunction1<T1, R>
aThisTH

Returns: Function1<T1, R>

Defined in js/js.utils.ts:484

Type parameters:

TH

T1

R

Parameters:

ParamType
funcFunction1<T1, R>
aThisTH
arg1T1

Returns: Function0<R>

Defined in js/js.utils.ts:485

Type parameters:

TH

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>
aThisTH

Returns: Function2<T1, T2, R>

Defined in js/js.utils.ts:487

Type parameters:

TH

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>
aThisTH
arg1T1

Returns: Function1<T2, R>

Defined in js/js.utils.ts:491

Type parameters:

TH

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>
aThisTH
arg1T1
arg2T2

Returns: Function0<R>

Defined in js/js.utils.ts:497

Type parameters:

TH

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
aThisTH

Returns: Function3<T1, T2, T3, R>

Defined in js/js.utils.ts:504

Type parameters:

TH

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
aThisTH
arg1T1

Returns: Function2<T2, T3, R>

Defined in js/js.utils.ts:509

Type parameters:

TH

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
aThisTH
arg1T1
arg2T2

Returns: Function1<T3, R>

Defined in js/js.utils.ts:515

Type parameters:

TH

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
aThisTH
arg1T1
arg2T2
arg3T3

Returns: Function0<R>

Defined in js/js.utils.ts:522

Type parameters:

TH

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
aThisTH

Returns: Function4<T1, T2, T3, T4, R>

Defined in js/js.utils.ts:527

Type parameters:

TH

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
aThisTH
arg1T1

Returns: Function3<T2, T3, T4, R>

Defined in js/js.utils.ts:532

Type parameters:

TH

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
aThisTH
arg1T1
arg2T2

Returns: Function2<T3, T4, R>

Defined in js/js.utils.ts:538

Type parameters:

TH

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
aThisTH
arg1T1
arg2T2
arg3T3

Returns: Function1<T4, R>

Defined in js/js.utils.ts:545

Type parameters:

TH

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
aThisTH
arg1T1
arg2T2
arg3T3
arg4T4

Returns: Function0<R>

Index


@ibm-wch-sdk/utils > "js/js.utils" > BindKey

Interface: BindKey

Hierarchy

BindKey

Callable

__call<TH,K,V,R>(aKey: K): Function1<TH, R>

__call<TH,T1,K,V,R>(aKey: K): Function2<TH, T1, R>

__call<TH,T1,K,V,R>(aKey: K, aArg1: T1): Function1<TH, R>

__call<TH,T1,T2,K,V,R>(aKey: K): Function3<TH, T1, T2, R>

__call<TH,T1,T2,K,V,R>(aKey: K, aArg1: T1): Function2<TH, T2, R>

__call<TH,T1,T2,K,V,R>(aKey: K, aArg1: T1, aArg2: T2): Function1<TH, R>

Defined in js/js.utils.ts:626

Type parameters:

TH

K : keyof TH

V : TH[K] & Function0<R>

R

Parameters:

ParamType
aKeyK

Returns: Function1<TH, R>

Defined in js/js.utils.ts:630

Type parameters:

TH

T1

K : keyof TH

V : TH[K] & Function1<T1, R>

R

Parameters:

ParamType
aKeyK

Returns: Function2<TH, T1, R>

Defined in js/js.utils.ts:634

Type parameters:

TH

T1

K : keyof TH

V : TH[K] & Function1<T1, R>

R

Parameters:

ParamType
aKeyK
aArg1T1

Returns: Function1<TH, R>

Defined in js/js.utils.ts:638

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aKeyK

Returns: Function3<TH, T1, T2, R>

Defined in js/js.utils.ts:642

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aKeyK
aArg1T1

Returns: Function2<TH, T2, R>

Defined in js/js.utils.ts:646

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aKeyK
aArg1T1
aArg2T2

Returns: Function1<TH, R>

Index


@ibm-wch-sdk/utils > "js/js.utils" > BindMember

Interface: BindMember

Hierarchy

BindMember

Callable

__call<TH,K,V,R>(aThis: TH, aKey: K): Function0<R>

__call<TH,T1,K,V,R>(aThis: TH, aKey: K): Function1<T1, R>

__call<TH,T1,K,V,R>(aThis: TH, aKey: K, aArg1: T1): Function0<R>

__call<TH,T1,T2,K,V,R>(aThis: TH, aKey: K): Function2<T1, T2, R>

__call<TH,T1,T2,K,V,R>(aThis: TH, aKey: K, aArg1: T1): Function1<T2, R>

__call<TH,T1,T2,K,V,R>(aThis: TH, aKey: K, aArg1: T1, aArg2: T2): Function0<R>

Defined in js/js.utils.ts:572

Type parameters:

TH

K : keyof TH

V : TH[K] & Function0<R>

R

Parameters:

ParamType
aThisTH
aKeyK

Returns: Function0<R>

Defined in js/js.utils.ts:577

Type parameters:

TH

T1

K : keyof TH

V : TH[K] & Function1<T1, R>

R

Parameters:

ParamType
aThisTH
aKeyK

Returns: Function1<T1, R>

Defined in js/js.utils.ts:582

Type parameters:

TH

T1

K : keyof TH

V : TH[K] & Function1<T1, R>

R

Parameters:

ParamType
aThisTH
aKeyK
aArg1T1

Returns: Function0<R>

Defined in js/js.utils.ts:587

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aThisTH
aKeyK

Returns: Function2<T1, T2, R>

Defined in js/js.utils.ts:592

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aThisTH
aKeyK
aArg1T1

Returns: Function1<T2, R>

Defined in js/js.utils.ts:597

Type parameters:

TH

T1

T2

K : keyof TH

V : TH[K] & Function2<T1, T2, R>

R

Parameters:

ParamType
aThisTH
aKeyK
aArg1T1
aArg2T2

Returns: Function0<R>

Index


@ibm-wch-sdk/utils > "js/js.utils" > Partial

Interface: Partial

Hierarchy

Partial

Callable

__call<R>(func: Function0<R>): Function0<R>

__call<T1,R>(func: Function1<T1, R>): Function1<T1, R>

__call<T1,R>(func: Function1<T1, R>, arg1: T1): Function0<R>

__call<T1,T2,R>(func: Function2<T1, T2, R>): Function2<T1, T2, R>

__call<T1,T2,R>(func: Function2<T1, T2, R>, arg1: T1): Function1<T2, R>

__call<T1,T2,R>(func: Function2<T1, T2, R>, arg1: T1, arg2: T2): Function0<R>

__call<T1,T2,T3,R>(func: Function3<T1, T2, T3, R>): Function3<T1, T2, T3, R>

__call<T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, arg1: T1): Function2<T2, T3, R>

__call<T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2): Function1<T3, R>

__call<T1,T2,T3,R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, arg3: T3): Function0<R>

__call<T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>): Function4<T1, T2, T3, T4, R>

__call<T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1): Function3<T2, T3, T4, R>

__call<T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2): Function2<T3, T4, R>

__call<T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3): Function1<T4, R>

__call<T1,T2,T3,T4,R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>

Defined in js/js.utils.ts:418

Type parameters:

R

Parameters:

ParamType
funcFunction0<R>

Returns: Function0<R>

Defined in js/js.utils.ts:420

Type parameters:

T1

R

Parameters:

ParamType
funcFunction1<T1, R>

Returns: Function1<T1, R>

Defined in js/js.utils.ts:422

Type parameters:

T1

R

Parameters:

ParamType
funcFunction1<T1, R>
arg1T1

Returns: Function0<R>

Defined in js/js.utils.ts:423

Type parameters:

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>

Returns: Function2<T1, T2, R>

Defined in js/js.utils.ts:425

Type parameters:

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>
arg1T1

Returns: Function1<T2, R>

Defined in js/js.utils.ts:426

Type parameters:

T1

T2

R

Parameters:

ParamType
funcFunction2<T1, T2, R>
arg1T1
arg2T2

Returns: Function0<R>

Defined in js/js.utils.ts:427

Type parameters:

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>

Returns: Function3<T1, T2, T3, R>

Defined in js/js.utils.ts:429

Type parameters:

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
arg1T1

Returns: Function2<T2, T3, R>

Defined in js/js.utils.ts:434

Type parameters:

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
arg1T1
arg2T2

Returns: Function1<T3, R>

Defined in js/js.utils.ts:439

Type parameters:

T1

T2

T3

R

Parameters:

ParamType
funcFunction3<T1, T2, T3, R>
arg1T1
arg2T2
arg3T3

Returns: Function0<R>

Defined in js/js.utils.ts:445

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>

Returns: Function4<T1, T2, T3, T4, R>

Defined in js/js.utils.ts:453

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
arg1T1

Returns: Function3<T2, T3, T4, R>

Defined in js/js.utils.ts:459

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
arg1T1
arg2T2

Returns: Function2<T3, T4, R>

Defined in js/js.utils.ts:464

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
arg1T1
arg2T2
arg3T3

Returns: Function1<T4, R>

Defined in js/js.utils.ts:470

Type parameters:

T1

T2

T3

T4

R

Parameters:

ParamType
funcFunction4<T1, T2, T3, T4, R>
arg1T1
arg2T2
arg3T3
arg4T4

Returns: Function0<R>

Index


@ibm-wch-sdk/utils > "json/json.utils" > JsonArray

Interface: JsonArray

Hierarchy

Array<AnyJson>

↳ JsonArray

Indexable

[n: number]: AnyJson

Index

Properties

Methods


Properties

Array

● Array: ArrayConstructor

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1298


length

● length: number

Inherited from Array.length

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1139

Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.


Methods

__@iterator

__@iterator(): IterableIterator<AnyJson>

Inherited from Array.Symbol.iterator

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.iterable.d.ts:52

Iterator

Returns: IterableIterator<AnyJson>


__@unscopables

__@unscopables(): object

Inherited from Array.Symbol.unscopables

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:94

Returns an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

Returns: object


concat

concat(...items: ConcatArray<AnyJson>[]): AnyJson[]

concat(...items: ( T | ConcatArray<T>)[]): AnyJson[]

Inherited from Array.concat

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1161

Combines two or more arrays.

Parameters:

ParamTypeDescription
Rest itemsConcatArray<AnyJson>[]Additional items to add to the end of array1.

Returns: AnyJson[]

Inherited from Array.concat

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1166

Combines two or more arrays.

Parameters:

ParamTypeDescription
Rest items( T | ConcatArray<T>)[]Additional items to add to the end of array1.

Returns: AnyJson[]


copyWithin

copyWithin(target: number, start: number, end?: number): this

Inherited from Array.copyWithin

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.core.d.ts:64

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Parameters:

ParamTypeDescription
targetnumberIf target is negative, it is treated as length+target where length is the length of the array.
startnumberIf start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
Optional endnumberIf not specified, length of the this object is used as its default value.

Returns: this


entries

entries(): IterableIterator<[number, AnyJson]>

Inherited from Array.entries

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.iterable.d.ts:57

Returns an iterable of key, value pairs for every entry in the array

Returns: IterableIterator<[number, AnyJson]>


every

every(callbackfn: function, thisArg?: any): boolean

Inherited from Array.every

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1226

Determines whether all the members of an array satisfy the specified test.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: boolean


fill

fill(value: AnyJson, start?: number, end?: number): this

Inherited from Array.fill

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.core.d.ts:53

Returns the this object after filling the section identified by start and end with value

Parameters:

ParamTypeDescription
valueAnyJsonvalue to fill array section with
Optional startnumberindex to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.
Optional endnumberindex to stop filling the array at. If end is negative, it is treated as length+end.

Returns: this


filter

filter<S>(callbackfn: function, thisArg?: any): S[]

filter(callbackfn: function, thisArg?: any): AnyJson[]

Inherited from Array.filter

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1250

Returns the elements of an array that meet the condition specified in a callback function.

Type parameters:

S : AnyJson

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: S[]

Inherited from Array.filter

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1256

Returns the elements of an array that meet the condition specified in a callback function.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: AnyJson[]


find

find<S>(predicate: function, thisArg?: any): S | undefined

find(predicate: function, thisArg?: any): AnyJson | undefined

Inherited from Array.find

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.core.d.ts:31

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

Type parameters:

S : AnyJson

Parameters:

ParamTypeDescription
predicatefunctionfind calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
Optional thisArganyIf provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns: S | undefined

Inherited from Array.find

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.core.d.ts:32

Parameters:

ParamType
predicatefunction
Optional thisArgany

Returns: AnyJson | undefined


findIndex

findIndex(predicate: function, thisArg?: any): number

Inherited from Array.findIndex

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.core.d.ts:43

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

Parameters:

ParamTypeDescription
predicatefunctionfind calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.
Optional thisArganyIf provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns: number


forEach

forEach(callbackfn: function, thisArg?: any): void

Inherited from Array.forEach

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1238

Performs the specified action for each element in an array.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: void


includes

includes(searchElement: AnyJson, fromIndex?: number): boolean

Inherited from Array.includes

Defined in /usr/build/node_modules/typescript/lib/lib.es2016.array.include.d.ts:27

Determines whether an array includes a certain element, returning true or false as appropriate.

Parameters:

ParamTypeDescription
searchElementAnyJsonThe element to search for.
Optional fromIndexnumberThe position in this array at which to begin searching for searchElement.

Returns: boolean


indexOf

indexOf(searchElement: AnyJson, fromIndex?: number): number

Inherited from Array.indexOf

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1214

Returns the index of the first occurrence of a value in an array.

Parameters:

ParamTypeDescription
searchElementAnyJsonThe value to locate in the array.
Optional fromIndexnumberThe array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

Returns: number


join

join(separator?: string): string

Inherited from Array.join

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1171

Adds all the elements of an array separated by the specified separator string.

Parameters:

ParamTypeDescription
Optional separatorstringA string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

Returns: string


keys

keys(): IterableIterator<number>

Inherited from Array.keys

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.iterable.d.ts:62

Returns an iterable of keys in the array

Returns: IterableIterator<number>


lastIndexOf

lastIndexOf(searchElement: AnyJson, fromIndex?: number): number

Inherited from Array.lastIndexOf

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1220

Returns the index of the last occurrence of a specified value in an array.

Parameters:

ParamTypeDescription
searchElementAnyJsonThe value to locate in the array.
Optional fromIndexnumberThe array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.

Returns: number


map

map<U>(callbackfn: function, thisArg?: any): U[]

Inherited from Array.map

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1244

Calls a defined callback function on each element of an array, and returns an array that contains the results.

Type parameters:

U

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: U[]


pop

pop(): AnyJson | undefined

Inherited from Array.pop

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1151

Removes the last element from an array and returns it.

Returns: AnyJson | undefined


push

push(...items: AnyJson[]): number

Inherited from Array.push

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1156

Appends new elements to an array, and returns the new length of the array.

Parameters:

ParamTypeDescription
Rest itemsAnyJson[]New elements of the Array.

Returns: number


reduce

reduce(callbackfn: function): AnyJson

reduce(callbackfn: function, initialValue: AnyJson): AnyJson

reduce<U>(callbackfn: function, initialValue: U): U

Inherited from Array.reduce

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1262

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

Returns: AnyJson

Inherited from Array.reduce

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1263

Parameters:

ParamType
callbackfnfunction
initialValueAnyJson

Returns: AnyJson

Inherited from Array.reduce

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1269

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type parameters:

U

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
initialValueUIf initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns: U


reduceRight

reduceRight(callbackfn: function): AnyJson

reduceRight(callbackfn: function, initialValue: AnyJson): AnyJson

reduceRight<U>(callbackfn: function, initialValue: U): U

Inherited from Array.reduceRight

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1275

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

Returns: AnyJson

Inherited from Array.reduceRight

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1276

Parameters:

ParamType
callbackfnfunction
initialValueAnyJson

Returns: AnyJson

Inherited from Array.reduceRight

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1282

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type parameters:

U

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
initialValueUIf initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns: U


reverse

reverse(): AnyJson[]

Inherited from Array.reverse

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1175

Reverses the elements in an Array.

Returns: AnyJson[]


shift

shift(): AnyJson | undefined

Inherited from Array.shift

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1179

Removes the first element from an array and returns it.

Returns: AnyJson | undefined


slice

slice(start?: number, end?: number): AnyJson[]

Inherited from Array.slice

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1185

Returns a section of an array.

Parameters:

ParamTypeDescription
Optional startnumberThe beginning of the specified portion of the array.
Optional endnumberThe end of the specified portion of the array.

Returns: AnyJson[]


some

some(callbackfn: function, thisArg?: any): boolean

Inherited from Array.some

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1232

Determines whether the specified callback function returns true for any element of an array.

Parameters:

ParamTypeDescription
callbackfnfunctionA function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
Optional thisArganyAn object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns: boolean


sort

sort(compareFn?: function): this

Inherited from Array.sort

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1190

Sorts an array.

Parameters:

ParamTypeDescription
Optional compareFnfunctionThe name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.

Returns: this


splice

splice(start: number, deleteCount?: number): AnyJson[]

splice(start: number, deleteCount: number, ...items: AnyJson[]): AnyJson[]

Inherited from Array.splice

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1196

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

Parameters:

ParamTypeDescription
startnumberThe zero-based location in the array from which to start removing elements.
Optional deleteCountnumberThe number of elements to remove.

Returns: AnyJson[]

Inherited from Array.splice

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1203

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

Parameters:

ParamTypeDescription
startnumberThe zero-based location in the array from which to start removing elements.
deleteCountnumberThe number of elements to remove.
Rest itemsAnyJson[]Elements to insert into the array in place of the deleted elements.

Returns: AnyJson[]


toLocaleString

toLocaleString(): string

Inherited from Array.toLocaleString

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1147

Returns a string representation of an array. The elements are converted to string using their toLocalString methods.

Returns: string


toString

toString(): string

Inherited from Array.toString

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1143

Returns a string representation of an array.

Returns: string


unshift

unshift(...items: AnyJson[]): number

Inherited from Array.unshift

Defined in /usr/build/node_modules/typescript/lib/lib.es5.d.ts:1208

Inserts new elements at the start of an array.

Parameters:

ParamTypeDescription
Rest itemsAnyJson[]Elements to insert at the start of the Array.

Returns: number


values

values(): IterableIterator<AnyJson>

Inherited from Array.values

Defined in /usr/build/node_modules/typescript/lib/lib.es2015.iterable.d.ts:67

Returns an iterable of values in the array

Returns: IterableIterator<AnyJson>


@ibm-wch-sdk/utils > "logger/rx.logger" > RxLogger

Enumeration: RxLogger

Checks what to log

Index

Enumeration members


Enumeration members

ALL

ALL: = 7

Defined in logger/rx.logger.ts:16


DONE

DONE: = 2

Defined in logger/rx.logger.ts:14


ERROR

ERROR: = 4

Defined in logger/rx.logger.ts:15


NEXT

NEXT: = 1

Defined in logger/rx.logger.ts:13


@ibm-wch-sdk/utils > "rendering/rendering" > HandlerKind

Enumeration: HandlerKind

Index

Enumeration members


Enumeration members

MULTI_VALUES

MULTI_VALUES:

Defined in rendering/rendering.ts:474


SINGLE

SINGLE:

Defined in rendering/rendering.ts:475


SINGLE_VALUE

SINGLE_VALUE: = 1

Defined in rendering/rendering.ts:473


@ibm-wch-sdk/utils > "rendering/rendering" > RenderingContextInterceptors

Interface: RenderingContextInterceptors

Hierarchy

RenderingContextInterceptors

Index

Properties


Properties

opRenderingContext

● opRenderingContext: MonoTypeOperatorFunction<RenderingContext>

Defined in rendering/rendering.ts:801


opRenderingContexts

● opRenderingContexts: MonoTypeOperatorFunction<RenderingContext[]>

Defined in rendering/rendering.ts:802


@ibm-wch-sdk/utils > "rx/rx.utils" > IdleFrameAction

Class: IdleFrameAction

Type parameters

T

Hierarchy

Subscription

↳ IdleFrameAction

Implements

  • SubscriptionLike
  • SchedulerAction<T>

Index

Constructors

Properties

Methods


Constructors

constructor

new IdleFrameAction(scheduler: IdleFrameScheduler, work: function): IdleFrameAction

Overrides Subscription.__constructor

Defined in rx/rx.utils.ts:74

Parameters:

ParamType
schedulerIdleFrameScheduler
workfunction

Returns: IdleFrameAction


Properties

<Protected> _parent

● _parent: Subscription

Inherited from Subscription._parent

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:23

internal:


<Protected> _parents

● _parents: Subscription[]

Inherited from Subscription._parents

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:25

internal:


closed

● closed: boolean

Inherited from Subscription.closed

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:21

A flag to indicate whether this Subscription has already been unsubscribed. type: {boolean}


<Protected> scheduler

● scheduler: IdleFrameScheduler

Defined in rx/rx.utils.ts:76


<Protected> work

● work: function

Defined in rx/rx.utils.ts:77

Type declaration

▸(this: IdleFrameAction<T>, state?: T): void

Parameters:

ParamType
thisIdleFrameAction<T>
Optional stateT

Returns: void


<Static> EMPTY

● EMPTY: Subscription

Inherited from Subscription.EMPTY

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:16

nocollapse:


Methods

add

add(teardown: TeardownLogic): Subscription

Inherited from Subscription.add

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:58

Adds a tear down to be called during the unsubscribe() of this Subscription.

If the tear down being added is a subscription that is already unsubscribed, is the same reference add is being called on, or is Subscription.EMPTY, it will not be added.

If this subscription is already in an closed state, the passed tear down logic will be executed immediately.

Parameters:

ParamTypeDescription
teardownTeardownLogicThe additional logic to execute on teardown.

Returns: Subscription Returns the Subscription used or created to be added to the inner subscriptions list. This Subscription can be used with remove() to remove the passed teardown logic from the inner subscriptions list.


remove

remove(subscription: Subscription): void

Inherited from Subscription.remove

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:65

Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription.

Parameters:

ParamTypeDescription
subscriptionSubscriptionThe subscription to remove.

Returns: void


schedule

schedule(state?: T, delay?: number): Subscription

Defined in rx/rx.utils.ts:82

Parameters:

ParamType
Optional stateT
Optional delaynumber

Returns: Subscription


unsubscribe

unsubscribe(): void

Inherited from Subscription.unsubscribe

Defined in /usr/build/node_modules/rxjs/internal/Subscription.d.ts:39

Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created.

Returns: void


@ibm-wch-sdk/utils > "rx/rx.utils" > IdleFrameScheduler

Class: IdleFrameScheduler

Hierarchy

IdleFrameScheduler

Implements

  • SchedulerLike

Index

Methods


Methods

now

now(): number

Defined in rx/rx.utils.ts:89

Returns: number


schedule

schedule<T>(work: function, delay?: number, state?: T): Subscription

Defined in rx/rx.utils.ts:93

Type parameters:

T

Parameters:

ParamType
workfunction
Optional delaynumber
Optional stateT

Returns: Subscription


@ibm-wch-sdk/utils > "rx/rx.utils" > RxPipe

Interface: RxPipe

Hierarchy

RxPipe

Callable

__call<T1,T2>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>): Observable<T2>

__call<T1,T2,T3>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>): Observable<T3>

__call<T1,T2,T3,T4>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>, aOp3: OperatorFunction<T3, T4>): Observable<T4>

__call<T1,T2,T3,T4,T5>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>, aOp3: OperatorFunction<T3, T4>, aOp4: OperatorFunction<T4, T5>): Observable<T5>

__call<T1,T2,T3,T4,T5,T6>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>, aOp3: OperatorFunction<T3, T4>, aOp4: OperatorFunction<T4, T5>, aOp5: OperatorFunction<T5, T6>): Observable<T6>

__call<T1,T2,T3,T4,T5,T6,T7>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>, aOp3: OperatorFunction<T3, T4>, aOp4: OperatorFunction<T4, T5>, aOp5: OperatorFunction<T5, T6>, aOp6: OperatorFunction<T6, T7>): Observable<T7>

__call<T1,T2,T3,T4,T5,T6,T7,T8>(aSrc: Observable<T1>, aOp1: OperatorFunction<T1, T2>, aOp2: OperatorFunction<T2, T3>, aOp3: OperatorFunction<T3, T4>, aOp4: OperatorFunction<T4, T5>, aOp5: OperatorFunction<T5, T6>, aOp6: OperatorFunction<T6, T7>, aOp7: OperatorFunction<T7, T8>): Observable<T8>

__call<T,R>(aSrc: Observable<T>, ...operations: OperatorFunction<any, any>[]): Observable<R>

Defined in rx/rx.utils.ts:200

Type parameters:

T1

T2

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>

Returns: Observable<T2>

Defined in rx/rx.utils.ts:203

Type parameters:

T1

T2

T3

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>

Returns: Observable<T3>

Defined in rx/rx.utils.ts:208

Type parameters:

T1

T2

T3

T4

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>
aOp3OperatorFunction<T3, T4>

Returns: Observable<T4>

Defined in rx/rx.utils.ts:214

Type parameters:

T1

T2

T3

T4

T5

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>
aOp3OperatorFunction<T3, T4>
aOp4OperatorFunction<T4, T5>

Returns: Observable<T5>

Defined in rx/rx.utils.ts:221

Type parameters:

T1

T2

T3

T4

T5

T6

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>
aOp3OperatorFunction<T3, T4>
aOp4OperatorFunction<T4, T5>
aOp5OperatorFunction<T5, T6>

Returns: Observable<T6>

Defined in rx/rx.utils.ts:229

Type parameters:

T1

T2

T3

T4

T5

T6

T7

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>
aOp3OperatorFunction<T3, T4>
aOp4OperatorFunction<T4, T5>
aOp5OperatorFunction<T5, T6>
aOp6OperatorFunction<T6, T7>

Returns: Observable<T7>

Defined in rx/rx.utils.ts:238

Type parameters:

T1

T2

T3

T4

T5

T6

T7

T8

Parameters:

ParamType
aSrcObservable<T1>
aOp1OperatorFunction<T1, T2>
aOp2OperatorFunction<T2, T3>
aOp3OperatorFunction<T3, T4>
aOp4OperatorFunction<T4, T5>
aOp5OperatorFunction<T5, T6>
aOp6OperatorFunction<T6, T7>
aOp7OperatorFunction<T7, T8>

Returns: Observable<T8>

Defined in rx/rx.utils.ts:248

Type parameters:

T

R

Parameters:

ParamType
aSrcObservable<T>
Rest operationsOperatorFunction<any, any>[]

Returns: Observable<R>

Index


@ibm-wch-sdk/utils > "site/site.utils" > InternalSiteInformation

Class: InternalSiteInformation

Hierarchy

InternalSiteInformation

Index

Properties


Properties

_idToContext

● _idToContext: SyncMapping<SiteContext>

Defined in site/site.utils.ts:130


_pathToId

● _pathToId: AsyncMapping<string>

Defined in site/site.utils.ts:127


_siteContext

● _siteContext: SiteContext = cloneDeep(UNDEFINED_SITE_CONTEXT)

Defined in site/site.utils.ts:133


@ibm-wch-sdk/utils > "site/site.utils" > SiteInformation

Class: SiteInformation

Hierarchy

SiteInformation

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new SiteInformation(): SiteInformation

Defined in site/site.utils.ts:406

Returns: SiteInformation


Properties

<Private> bInitialized

● bInitialized: boolean = false

Defined in site/site.utils.ts:394


observer

● observer: Observer<Site>

Defined in site/site.utils.ts:406


<Private> siteInfo

● siteInfo: InternalSiteInformation = new InternalSiteInformation()

Defined in site/site.utils.ts:404


<Private> siteSubject

● siteSubject: ReplaySubject<Site> = createSingleSubject()

Defined in site/site.utils.ts:399


Accessors

site

getsite(): Observable<Site>

Defined in site/site.utils.ts:509

Returns: Observable<Site>


Methods

<Private> clear

clear(): void

Defined in site/site.utils.ts:464

Returns: void


getIdByPath

getIdByPath(path: string): Observable< string | null | undefined>

Defined in site/site.utils.ts:484

Parameters:

ParamType
pathstring

Returns: Observable< string | null | undefined>


getSiteContextById

getSiteContextById(aID: string | null): SiteContext

Defined in site/site.utils.ts:499

Parameters:

ParamType
aIDstring | null

Returns: SiteContext


@ibm-wch-sdk/utils > "site/site.utils" > AnalysisContext

Interface: AnalysisContext

Hierarchy

AnalysisContext

Index

Properties


Properties

_newInfo

● _newInfo: InternalSiteInformation

Defined in site/site.utils.ts:140


_notifications

● _notifications: ChangeNotification[]

Defined in site/site.utils.ts:142


_oldInfo

● _oldInfo: InternalSiteInformation

Defined in site/site.utils.ts:139


_site

● _site: Site

Defined in site/site.utils.ts:138


@ibm-wch-sdk/utils > "site/site.utils" > AsyncMapping

Interface: AsyncMapping

Type parameters

T

Hierarchy

AsyncMapping

Indexable

[key: string]: BehaviorSubject<T>

Index


@ibm-wch-sdk/utils > "site/site.utils" > SyncMapping

Interface: SyncMapping

Type parameters

T

Hierarchy

SyncMapping

Indexable

[key: string]: T

Index


@ibm-wch-sdk/utils > "static/static.resources" > StaticResources

Class: StaticResources

Hierarchy

StaticResources

Index

Constructors

Properties

Methods


Constructors

constructor

new StaticResources(aBaseUrl: URL | undefined, http: HttpService): StaticResources

Defined in static/static.resources.ts:17

Parameters:

ParamType
aBaseUrlURL | undefined
httpHttpService

Returns: StaticResources


Properties

<Private> base

● base: string

Defined in static/static.resources.ts:17


<Private> http

● http: HttpService

Defined in static/static.resources.ts:20


Methods

get

get(aKey: string): Observable<AnyJson>

Defined in static/static.resources.ts:31

Parameters:

ParamType
aKeystring

Returns: Observable<AnyJson>


@ibm-wch-sdk/utils > "storage/clientstorage" > ClientStorageOnLocalStorage

Class: ClientStorageOnLocalStorage

Hierarchy

ClientStorageOnLocalStorage

Implements

Index

Constructors

Properties

Methods


Constructors

constructor

new ClientStorageOnLocalStorage(storage: Storage, scope: string): ClientStorageOnLocalStorage

Defined in storage/clientstorage.ts:54

Parameters:

ParamType
storageStorage
scopestring

Returns: ClientStorageOnLocalStorage


Properties

<Private> prefix

● prefix: string

Defined in storage/clientstorage.ts:53


<Private> storage

● storage: Storage

Defined in storage/clientstorage.ts:56


<Private> suffix

● suffix: string

Defined in storage/clientstorage.ts:54


Methods

get

get(aKey: string): AnyJson

Implementation of ClientStorage.get

Defined in storage/clientstorage.ts:63

Parameters:

ParamType
aKeystring

Returns: AnyJson


put

put(aKey: string, aValue: AnyJson): void

Implementation of ClientStorage.put

Defined in storage/clientstorage.ts:73

Parameters:

ParamType
aKeystring
aValueAnyJson

Returns: void


@ibm-wch-sdk/utils > "storage/clientstorage" > EmptyClientStorage

Class: EmptyClientStorage

Hierarchy

EmptyClientStorage

Implements

Index

Methods


Methods

get

get(aKey: string): AnyJson

Implementation of ClientStorage.get

Defined in storage/clientstorage.ts:83

Parameters:

ParamType
aKeystring

Returns: AnyJson


put

put(aKey: string, aValue: AnyJson): void

Implementation of ClientStorage.put

Defined in storage/clientstorage.ts:87

Parameters:

ParamType
aKeystring
aValueAnyJson

Returns: void


@ibm-wch-sdk/utils > "storage/clientstorage" > ClientStorage

Interface: ClientStorage

Hierarchy

ClientStorage

Implemented by

Index

Methods


Methods

get

get(aKey: string): AnyJson | null | undefined

Defined in storage/clientstorage.ts:10

Parameters:

ParamType
aKeystring

Returns: AnyJson | null | undefined


put

put(aKey: string, aValue: AnyJson): any

Defined in storage/clientstorage.ts:12

Parameters:

ParamType
aKeystring
aValueAnyJson

Returns: any


@ibm-wch-sdk/utils > "storage/storage.service" > ClientStorageService

Class: ClientStorageService

Hierarchy

ClientStorageService

Implements

Index

Constructors

Properties


Constructors

constructor

new ClientStorageService(aUrlsService: UrlConfig, aWindow?: Window): ClientStorageService

Defined in storage/storage.service.ts:15

Parameters:

ParamType
aUrlsServiceUrlConfig
Optional aWindowWindow

Returns: ClientStorageService


Properties

get

● get: function

Implementation of ClientStorage.get

Defined in storage/storage.service.ts:14

Type declaration

▸(aKey: string): AnyJson

Parameters:

ParamType
aKeystring

Returns: AnyJson


put

● put: function

Implementation of ClientStorage.put

Defined in storage/storage.service.ts:15

Type declaration

▸(aKey: string, aValue: AnyJson): void

Parameters:

ParamType
aKeystring
aValueAnyJson

Returns: void


@ibm-wch-sdk/utils > "wch/wch.service" > InternalWchService

Class: InternalWchService

Hierarchy

InternalWchService

Index

Constructors

Properties


Constructors

constructor

new InternalWchService(aHttp: HttpService, aJsonp: HttpService, wchConfig: HubInfoConfig, aUrlService: UrlConfig, clientStorage: ClientStorage, usePublicUrl: Observable<boolean>, aLogger?: Logger): InternalWchService

Defined in wch/wch.service.ts:226

Parameters:

ParamType
aHttpHttpService
aJsonpHttpService
wchConfigHubInfoConfig
aUrlServiceUrlConfig
clientStorageClientStorage
usePublicUrlObservable<boolean>
Optional aLoggerLogger

Returns: InternalWchService


Properties

<Protected> createPollingTrigger

● createPollingTrigger: function

Defined in wch/wch.service.ts:224

Type declaration

▸(aOptions?: HttpResourceOptions): Observable<any>

Parameters:

ParamType
Optional aOptionsHttpResourceOptions

Returns: Observable<any>


dispose

● dispose: function

Defined in wch/wch.service.ts:179

Type declaration

▸(): void

Returns: void


getApiUrl

● getApiUrl: function

Defined in wch/wch.service.ts:181

Type declaration

▸(): URL

Returns: URL


getCorsWhitelist

● getCorsWhitelist: function

Defined in wch/wch.service.ts:209

Type declaration

▸(): Observable<string[]>

Returns: Observable<string[]>


getDeliverOrigin

● getDeliverOrigin: function

Defined in wch/wch.service.ts:184

Type declaration

▸(): string

Returns: string


getDeliveryUrl

● getDeliveryUrl: function

Defined in wch/wch.service.ts:182

Type declaration

▸(): URL

Returns: URL


getJsonResource

● getJsonResource: function

Defined in wch/wch.service.ts:210

Type declaration

▸<T>(aUrl: string, aOptions?: HttpResourceOptions): Observable<T>

Type parameters:

T

Parameters:

ParamType
aUrlstring
Optional aOptionsHttpResourceOptions

Returns: Observable<T>


getRenderingContextById

● getRenderingContextById: function

Defined in wch/wch.service.ts:185

Type declaration

▸(aID: string | null | undefined, aLevels?: number): Observable< RenderingContext | null | undefined>

Parameters:

ParamType
aIDstring | null | undefined
Optional aLevelsnumber

Returns: Observable< RenderingContext | null | undefined>


getRenderingContextByPage

● getRenderingContextByPage: function

Defined in wch/wch.service.ts:197

Type declaration

▸(aPage: SitePage, aLevels?: number): Observable< RenderingContext | null | undefined>

Parameters:

ParamType
aPageSitePage
Optional aLevelsnumber

Returns: Observable< RenderingContext | null | undefined>


getRenderingContextByPath

● getRenderingContextByPath: function

Defined in wch/wch.service.ts:193

Type declaration

▸(aPath: string, aLevels?: number): Observable< RenderingContext | null | undefined>

Parameters:

ParamType
aPathstring
Optional aLevelsnumber

Returns: Observable< RenderingContext | null | undefined>


getRenderingContextByUrlSegments

● getRenderingContextByUrlSegments: function

Defined in wch/wch.service.ts:189

Type declaration

▸(aSegments: string[], aLevels?: number): Observable< RenderingContext | null | undefined>

Parameters:

ParamType
aSegmentsstring[]
Optional aLevelsnumber

Returns: Observable< RenderingContext | null | undefined>


getRenderingContextForAppConfig

● getRenderingContextForAppConfig: function

Defined in wch/wch.service.ts:201

Type declaration

▸(aLevels?: number): Observable<RenderingContext>

Parameters:

ParamType
Optional aLevelsnumber

Returns: Observable<RenderingContext>


getRenderingContextsByQuery

● getRenderingContextsByQuery: function

Defined in wch/wch.service.ts:204

Type declaration

▸(aQuery: string, aLevels?: number): Observable<RenderingContextQueryResult>

Parameters:

ParamType
aQuerystring
Optional aLevelsnumber

Returns: Observable<RenderingContextQueryResult>


getSitePagesByQuery

● getSitePagesByQuery: function

Defined in wch/wch.service.ts:208

Type declaration

▸(aQuery: string): Observable<SitePagesQueryResult>

Parameters:

ParamType
aQuerystring

Returns: Observable<SitePagesQueryResult>


getTextResource

● getTextResource: function

Defined in wch/wch.service.ts:214

Type declaration

▸(aUrl: string, aOptions?: HttpResourceOptions): Observable<string>

Parameters:

ParamType
aUrlstring
Optional aOptionsHttpResourceOptions

Returns: Observable<string>


isPreviewMode

● isPreviewMode: function

Defined in wch/wch.service.ts:183

Type declaration

▸(): boolean

Returns: boolean


resolveRenderingContext

● resolveRenderingContext: function

Defined in wch/wch.service.ts:218

Type declaration

▸(aRenderingContext?: RenderingContext, aStrategy?: CYCLE_HANDLING): Observable< RenderingContext | null | undefined>

Parameters:

ParamType
Optional aRenderingContextRenderingContext
Optional aStrategyCYCLE_HANDLING

Returns: Observable< RenderingContext | null | undefined>


triggerRefresh

● triggerRefresh: function

Defined in wch/wch.service.ts:180

Type declaration

▸(): void

Returns: void


@ibm-wch-sdk/utils > "wch/wch.utils" > RenderingContextMap

Interface: RenderingContextMap

Hierarchy

RenderingContextMap

Indexable

[id: string]: RenderingContext

Index


@ibm-wch-sdk/utils > "wch/wch.utils" > WchDebug

Interface: WchDebug

Hierarchy

WchDebug

Index

Properties


Properties

path

● path: string

Defined in wch/wch.utils.ts:46


9.0.10076

4 years ago

9.0.10067

4 years ago

9.0.10034

4 years ago

9.0.10040

4 years ago

9.0.495

4 years ago

9.0.493

4 years ago

9.0.462

4 years ago

9.0.407

4 years ago

9.0.384

4 years ago

9.0.361

4 years ago

9.0.360

4 years ago

9.0.271

4 years ago

9.0.251

4 years ago

9.0.242

4 years ago

9.0.216

4 years ago

9.0.209

4 years ago

6.0.524

5 years ago

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

6.0.498

5 years ago

6.0.496

5 years ago

6.0.477

5 years ago

7.0.165

5 years ago

7.0.163

5 years ago

7.0.151

5 years ago

6.0.455

6 years ago

7.0.25

6 years ago

7.0.22

6 years ago

7.0.16

6 years ago

7.0.14

6 years ago

7.0.13

6 years ago

6.0.401

6 years ago

6.0.383

6 years ago

6.0.341

6 years ago

6.0.264

6 years ago

6.0.293

6 years ago

6.0.287

6 years ago

6.0.238

6 years ago

6.0.232

6 years ago

6.0.230

6 years ago

6.0.229

6 years ago

6.0.224

6 years ago

6.0.223

6 years ago

6.0.185

6 years ago

6.0.178

6 years ago

6.0.162

6 years ago

6.0.159

6 years ago

6.0.157

6 years ago

6.0.155

6 years ago

6.0.154

6 years ago

6.0.152

6 years ago

6.0.149

6 years ago

6.0.132

6 years ago

6.0.126

6 years ago

6.0.120

6 years ago

6.0.119

6 years ago

6.0.118

6 years ago

6.0.112

6 years ago

6.0.108

6 years ago

6.0.107

6 years ago

6.0.75

6 years ago

6.0.66

6 years ago

6.0.54

6 years ago

6.0.42

6 years ago

6.0.41

6 years ago

6.0.17

6 years ago