@ibm-wch-sdk/utils v9.0.10076
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
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.
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
- "cache/cache.utils"
- "categories/categories"
- "compare/compare"
- "consumers/consumer"
- "cors/cors.utils"
- "debug/debug.utils"
- "dom/dom.utils"
- "elements/element"
- "error/error"
- "generators/generator"
- "generators/lazy.generator"
- "hash/hash.utils"
- "html/html"
- "http/http.utils"
- "i18n/localized"
- "idle/idle"
- "index"
- "js/js.core"
- "js/js.utils"
- "json/json.utils"
- "layouts/layout"
- "logger/console.logger"
- "logger/noop.logger"
- "logger/noop.logger.service"
- "logger/rx.logger"
- "messages/message.event"
- "messages/navigate.by.path.handler"
- "messages/refresh.handler"
- "messages/set.mode.handler"
- "messages/subscribe.active.route.handler"
- "messages/subscribe.handler"
- "messages/subscribe.mode.handler"
- "messages/subscribe.route.handler"
- "misc"
- "operators/operators"
- "path/path"
- "perf/perf.utils"
- "placeholder/placeholder"
- "predicates/predicates"
- "rendering/rendering"
- "rx/rx.utils"
- "search/search.utils"
- "site/site.utils"
- "site/sites.constants"
- "static/static.resources"
- "storage/clientstorage"
- "storage/storage.service"
- "url/url.utils"
- "wch/wch.service"
- "wch/wch.utils"
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:
Param | Type |
---|---|
aKey | string |
aCallback | CacheCallback<V > |
Optional aLogger | Logger |
Returns: V
CacheCallback
Ƭ CacheCallback: function
Defined in cache/cache.utils.ts:7
Type declaration
▸(aKey: string
, aLogger?: Logger
): V
Parameters:
Param | Type |
---|---|
aKey | string |
Optional aLogger | Logger |
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:
Param | Type | Description |
---|---|---|
Optional aTimeout | number | timeout |
Optional aMaxValues | number | maximum cache entries |
Optional aLogger | Logger |
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:
Param | Type | Description |
---|---|---|
aCategory | Category | the category |
Optional aIndex | number | category index |
Optional aFallback | string | fallback |
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:
Param | Type | Description |
---|---|---|
aLeft | number | left value to compare |
aRight | number | right 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:
Param | Type | Description |
---|---|---|
aLeft | string | left value to compare |
aRight | string | right 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:
Param | Type |
---|---|
t1 | T1 |
t2 | T2 |
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:
Param | Type |
---|---|
aOrigin | string |
aAllowedOrigins | string [] |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aDbg | any |
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:
Param | Type | Description |
---|---|---|
aCallback | AddDebugCallback | |
aObject | T | the object |
Returns: T
the object
_addSourceCallback
▸ _addSourceCallback(aSource: string
): AddDebugCallback
Defined in debug/debug.utils.ts:18
Adds source information
Parameters:
Param | Type |
---|---|
aSource | string |
Returns: AddDebugCallback
_addSourceDebug
▸ _addSourceDebug<T
>(aSource: string
, aObject: T
): T
Defined in debug/debug.utils.ts:54
Adds source information
Type parameters:
T
Parameters:
Param | Type | Description |
---|---|---|
aSource | string | source info |
aObject | T | the 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:
Param | Type | Description |
---|---|---|
Optional aDocument | Document | the document object |
Optional aWindow | Window | optional 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:
Param | Type | Description |
---|---|---|
Optional aWindow | Window | the 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
- _falseHandler
- _getElementHandler
- _getValueHandler
- _hasAssetAndUrl
- _isArrayOf
- _isAsset
- _isBoolean
- _isCategory
- _isCategoryElement
- _isDate
- _isDateElement
- _isElement
- _isFile
- _isFileElement
- _isFormattedTextElement
- _isGroup
- _isGroupElement
- _isImage
- _isImageElement
- _isLink
- _isLinkElement
- _isLocation
- _isLocationElement
- _isMultiDateElement
- _isMultiFileElement
- _isMultiFormattedTextElement
- _isMultiGroupElement
- _isMultiImageElement
- _isMultiLinkElement
- _isMultiNumberElement
- _isMultiOptionSelectionElement
- _isMultiProductElement
- _isMultiReferenceElement
- _isMultiTextElement
- _isMultiToggleElement
- _isMultiVideoElement
- _isNumber
- _isNumberElement
- _isOptionSelection
- _isOptionSelectionElement
- _isProductElement
- _isReference
- _isReferenceElement
- _isSingleDateElement
- _isSingleFileElement
- _isSingleFormattedTextElement
- _isSingleGroupElement
- _isSingleImageElement
- _isSingleLinkElement
- _isSingleNumberElement
- _isSingleOptionSelectionElement
- _isSingleProductElement
- _isSingleReferenceElement
- _isSingleTextElement
- _isSingleToggleElement
- _isSingleVideoElement
- _isSomeDateElement
- _isSomeFileElement
- _isSomeFormattedTextElement
- _isSomeGroupElement
- _isSomeImageElement
- _isSomeLinkElement
- _isSomeNumberElement
- _isSomeOptionSelectionElement
- _isSomeProductElement
- _isSomeReferenceElement
- _isSomeTextElement
- _isSomeToggleElement
- _isSomeVideoElement
- _isString
- _isTextElement
- _isToggleElement
- _isType
- _isTypeRef
- _isValueOf
- _isVideo
- _isVideoElement
Object literals
Type aliases
OptionalPredicate
Ƭ OptionalPredicate: function
Defined in elements/element.ts:938
Type declaration
▸(aValue: T
, bOptional?: boolean
): boolean
Parameters:
Param | Type |
---|---|
aValue | T |
Optional bOptional | boolean |
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:
Param | Type |
---|---|
aElementType | string |
Optional bOptional | boolean |
Returns: OptionalPredicate<any
>
<Const>
_getValueHandler
▸ _getValueHandler(aElementType: string
, bOptional?: boolean
): OptionalPredicate<any
>
Defined in elements/element.ts:989
Parameters:
Param | Type |
---|---|
aElementType | string |
Optional bOptional | boolean |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value to check |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
aPredicate | IsPredicate<T > |
Optional bOptional | boolean |
Returns: boolean
_isAsset
▸ _isAsset(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:518
Tests the value is a valid asset
Parameters:
Param | Type | Description |
---|---|---|
aValue | any | the value |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isCategory
▸ _isCategory(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:476
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isCategoryElement
▸ _isCategoryElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:491
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isDate
▸ _isDate(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:247
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isDateElement
▸ _isDateElement(aValue: any
): boolean
Defined in elements/element.ts:472
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isElement
▸ _isElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:1000
Tests if the value is a value element
Parameters:
Param | Type | Description |
---|---|---|
aValue | any | the value |
Optional bOptional | boolean |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value to check |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isFormattedTextElement
▸ _isFormattedTextElement(aValue: any
): boolean
Defined in elements/element.ts:340
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isGroup
▸ _isGroup(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:301
Tests if the value is a vaid group
Parameters:
Param | Type | Description |
---|---|---|
aValue | any | the value |
Optional bOptional | boolean |
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:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value to check |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isLocation
▸ _isLocation(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:785
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isLocationElement
▸ _isLocationElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:799
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiDateElement
▸ _isMultiDateElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:270
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiFileElement
▸ _isMultiFileElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:620
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiFormattedTextElement
▸ _isMultiFormattedTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:365
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiGroupElement
▸ _isMultiGroupElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:324
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiImageElement
▸ _isMultiImageElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:669
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiLinkElement
▸ _isMultiLinkElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:727
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiNumberElement
▸ _isMultiNumberElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:404
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiOptionSelectionElement
▸ _isMultiOptionSelectionElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:153
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiProductElement
▸ _isMultiProductElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:237
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiReferenceElement
▸ _isMultiReferenceElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:775
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiTextElement
▸ _isMultiTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:208
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiToggleElement
▸ _isMultiToggleElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:446
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isMultiVideoElement
▸ _isMultiVideoElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:698
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isNumber
▸ _isNumber(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:181
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isNumberElement
▸ _isNumberElement(aValue: any
): boolean
Defined in elements/element.ts:381
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isOptionSelection
▸ _isOptionSelection(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:113
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isOptionSelectionElement
▸ _isOptionSelectionElement(aValue: any
): boolean
Defined in elements/element.ts:107
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isProductElement
▸ _isProductElement(aValue: any
): boolean
Defined in elements/element.ts:173
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isReference
▸ _isReference(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:747
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isReferenceElement
▸ _isReferenceElement(aValue: any
): boolean
Defined in elements/element.ts:743
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isSingleDateElement
▸ _isSingleDateElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:257
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleFileElement
▸ _isSingleFileElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:607
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleFormattedTextElement
▸ _isSingleFormattedTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:350
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleGroupElement
▸ _isSingleGroupElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:311
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleImageElement
▸ _isSingleImageElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:656
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleLinkElement
▸ _isSingleLinkElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:714
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleNumberElement
▸ _isSingleNumberElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:391
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleOptionSelectionElement
▸ _isSingleOptionSelectionElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:137
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleProductElement
▸ _isSingleProductElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:224
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleReferenceElement
▸ _isSingleReferenceElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:760
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleTextElement
▸ _isSingleTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:195
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleToggleElement
▸ _isSingleToggleElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:433
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSingleVideoElement
▸ _isSingleVideoElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:685
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeDateElement
▸ _isSomeDateElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:808
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeFileElement
▸ _isSomeFileElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:818
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeFormattedTextElement
▸ _isSomeFormattedTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:828
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeGroupElement
▸ _isSomeGroupElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:838
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeImageElement
▸ _isSomeImageElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:848
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeLinkElement
▸ _isSomeLinkElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:858
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeNumberElement
▸ _isSomeNumberElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:868
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeOptionSelectionElement
▸ _isSomeOptionSelectionElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:878
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeProductElement
▸ _isSomeProductElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:908
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeReferenceElement
▸ _isSomeReferenceElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:888
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeTextElement
▸ _isSomeTextElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:898
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeToggleElement
▸ _isSomeToggleElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:918
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isSomeVideoElement
▸ _isSomeVideoElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:928
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isString
▸ _isString(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:177
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isTextElement
▸ _isTextElement(aValue: any
): boolean
Defined in elements/element.ts:169
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isToggleElement
▸ _isToggleElement(aValue: any
, bOptional?: boolean
): boolean
Defined in elements/element.ts:420
Parameters:
Param | Type |
---|---|
aValue | any |
Optional bOptional | boolean |
Returns: boolean
_isType
▸ _isType(aType: string
, aValue: any
| null
| undefined
): boolean
Defined in elements/element.ts:91
Parameters:
Param | Type |
---|---|
aType | string |
aValue | any | null | undefined |
Returns: boolean
_isTypeRef
▸ _isTypeRef(aValue: any
): boolean
Defined in elements/element.ts:95
Parameters:
Param | Type |
---|---|
aValue | any |
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:
Param | Type | Description |
---|---|---|
aType | string | |
aValue | any | the value |
Optional bOptional | boolean |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value to check |
Optional bOptional | boolean | flag 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:
Param | Type |
---|---|
aValue | any |
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:
Param | Type | Description |
---|---|---|
aResponse | any | the 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:
Param | Type |
---|---|
aValue | T |
Returns: (Anonymous function)
<Const>
_fromGeneratorOrT
▸ _fromGeneratorOrT<T
>(aValue: GeneratorOrT<T
>): any
Defined in generators/generator.ts:14
Type parameters:
T
Parameters:
Param | Type |
---|---|
aValue | GeneratorOrT<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:
Param | Type | Description |
---|---|---|
aGenerator | Generator<T > | the generator |
Returns: Generator<T
>
the generator
@ibm-wch-sdk/utils > "hash/hash.utils"
External module: "hash/hash.utils"
Index
Variables
- GOLDEN_RATIO_64
- HASH_SEED_64
- _DIGITS
- _FIRST_LETTERS
- _FIRST_LETTERS_LENGTH
- _LOWERCASE
- _MAX_INT
- _NEXT_LETTERS
- _NEXT_LETTERS_LENGTH
- _START
- _UPPERCASE
- _abs
- _floor
- _random
- _trunc
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:
Param | Type |
---|---|
oldHash | number |
s | string |
Returns: number
_hashStringSegment
▸ _hashStringSegment(oldHash: number
, start: number
, len: number
, s: string
): number
Defined in hash/hash.utils.ts:27
Parameters:
Param | Type |
---|---|
oldHash | number |
start | number |
len | number |
s | string |
Returns: number
_hashToIdentifier
▸ _hashToIdentifier(aHash: number
): string
Defined in hash/hash.utils.ts:61
Parameters:
Param | Type |
---|---|
aHash | number |
Returns: string
_longCombine
▸ _longCombine(oldHash: number
, data: number
): number
Defined in hash/hash.utils.ts:22
Parameters:
Param | Type |
---|---|
oldHash | number |
data | number |
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:
Param | Type |
---|---|
aValue | string |
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:
Param | Type | Description |
---|---|---|
aValue | T | the 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
- DEFAULT_POLL_TIME
- DEFAULT_POLL_TIME_VARIATION
- DEFAULT_RETRIES
- DEFAULT_USE_API
- DEFAULT_USE_BOOTSTRAP
- DEFAULT_USE_JSONP
- DEFAULT_USE_LOCAL_STORAGE
- DEFAULT_USE_POLLING
- DEFAULT_USE_STATIC_RESOURCES
- ID
- LOGGER
- MAX_POLL_TIME
- MAX_POLL_TIME_VARIATION
- MIN_POLL_TIME
- MIN_POLL_TIME_VARIATION
- _addDebugSource
- _privateUrlJsonCache
- _privateUrlStringCache
- _publicUrlJsonCache
- _publicUrlStringCache
Functions
- _addDebug
- _clip
- _createJsonResource
- _createStringResource
- _createTimer
- _getErrorResponse
- _getJsonResource
- _getStringResource
- _lazyCache
- _sendJsonRequest
- _sendRequest
- _sendTextRequest
Object literals
Type aliases
Request
Ƭ Request: function
Defined in http/http.utils.ts:35
Type declaration
▸(aUrl: string
, aOptions: HttpOptions): Observable
<T
>
Parameters:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
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:
Param | Type |
---|---|
aDbg | any |
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:
Param | Type | Description |
---|---|---|
aUrl | string | the URL |
aResult | JsonMap | the result |
Returns: JsonMap
_clip
▸ _clip(aValue: number
, aMin: number
, aMax: number
): number
Defined in http/http.utils.ts:246
Parameters:
Param | Type |
---|---|
aValue | number |
aMin | number |
aMax | number |
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:
Param | Type |
---|---|
aURL | string |
aHttpService | HttpService |
aWithCredentials | boolean |
aTrigger | Observable <any > |
aOptions | HttpResourceOptions |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aURL | string |
aHttpService | HttpService |
aWithCredentials | boolean |
aTrigger | Observable <any > |
aOptions | HttpResourceOptions |
Optional aLogger | Logger |
Returns: Observable
<string
>
_createTimer
▸ _createTimer(aOptions?: HttpResourceOptions
): Observable
<any
>
Defined in http/http.utils.ts:283
Parameters:
Param | Type |
---|---|
Optional aOptions | HttpResourceOptions |
Returns: Observable
<any
>
_getErrorResponse
▸ _getErrorResponse(aError: any
): ErrorResponse
Defined in http/http.utils.ts:43
Build an error response object
Parameters:
Param | Type | Description |
---|---|---|
aError | any | the 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:
Param | Type |
---|---|
aURL | string |
aHttpService | HttpService |
aWithCredentials | boolean |
aTrigger | Observable <any > |
Optional aOptions | HttpResourceOptions |
Optional aLogger | Logger |
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:
Param | Type | Description |
---|---|---|
aURL | string | - |
aHttpService | HttpService | - |
aWithCredentials | boolean | - |
aTrigger | Observable <any > | - |
aOptions | HttpResourceOptions | - |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
aTrigger | Observable <any > |
aHttpService | HttpService |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
aTrigger | Observable <any > |
aRequest | Request<T > |
aLogger | Logger |
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:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
aTrigger | Observable <any > |
aHttpService | HttpService |
Optional aLogger | Logger |
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:
Param | Type | Description |
---|---|---|
locContext | object |
Returns: function
isLocalizedText
▸ isLocalizedText(aText: any
): boolean
Defined in i18n/localized.ts:68
Tests if a value is a localized context
Parameters:
Param | Type | Description |
---|---|---|
aText | any | text 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:
Param | Type |
---|---|
aHandle | number |
Returns: void
<Let>
_setCallback
● _setCallback: function
Defined in idle/idle.ts:4
Type declaration
▸(aFct: Function
): number
Parameters:
Param | Type |
---|---|
aFct | Function |
Returns: number
cancelIdleCallback
● cancelIdleCallback: function
Defined in idle/idle.ts:8
Type declaration
▸(aHandle: number
): void
Parameters:
Param | Type |
---|---|
aHandle | number |
Returns: void
requestIdleCallback
● requestIdleCallback: function
Defined in idle/idle.ts:7
Type declaration
▸(aCallback: Function
): number
Parameters:
Param | Type |
---|---|
aCallback | Function |
Returns: number
External module: "index"
Index
@ibm-wch-sdk/utils > "js/js.core"
External module: "js/js.core"
Index
Interfaces
Variables
Functions
- _zipArgs
- and
- biCompose
- biComposeMono
- compose
- composeAll
- flipArgs
- getProperty
- not
- or
- partialFirst
- partialSecond
- pluckProperty
- propertyFromObject
- spreadArgs
- ternary
- toArray
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:
Param | Type | Description |
---|---|---|
aLeft | function | left check |
aRight | function | right 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:
Param | Type | Description |
---|---|---|
aFirst | UnaryFunction <S1 , D1 > | transformer of the first argument |
aSecond | UnaryFunction <S2 , D2 > | transformer of the second argument |
aFct | function | final 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:
Param | Type | Description |
---|---|---|
aTransform | UnaryFunction <S , D > | the common transform for the arguments |
aFct | function | final 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:
Param | Type | Description |
---|---|---|
aLeft | UnaryFunction <T1 , T2 > | left function |
aRight | UnaryFunction <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:
Param | Type | Description |
---|---|---|
Rest aFunctions | Function [] | 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:
Param | Type |
---|---|
aFct | function |
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:
Param | Type | Description |
---|---|---|
aValue | T | |
aKey | K | the key |
Optional aDefault | T[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:
Param | Type | Description |
---|---|---|
aFct | function | the 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:
Param | Type | Description |
---|---|---|
aLeft | function | left check |
aRight | function | right 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:
Param | Type | Description |
---|---|---|
aFunction | function | the function pointer |
aFirst | T1 | the 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:
Param | Type | Description |
---|---|---|
aFunction | function | the function pointer |
aSecond | T2 | the 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:
Param | Type | Description |
---|---|---|
aKey | K | the key |
Optional aDefault | T[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:
Param | Type |
---|---|
aValue | T |
Optional aDefault | T[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:
Param | Type |
---|---|
aFct | Function |
aArgs | any [] |
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:
Param | Type | Description |
---|---|---|
aPredicate | function | predicate |
aLeft | UnaryFunction <T , R > | left function |
aRight | UnaryFunction <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:
Param | Type | Description |
---|---|---|
aValue | ArrayLike <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
- KEY_DEBUG
- _FUNCTION_TYPE
- _UNDEFINED_TYPE
- _assign
- _binary
- _bind
- _bindKey
- _bindMember
- _freeze
- _isFrozen
- _keys
- _unary
Functions
- __bind
- __bindKey
- __bindMember
- _anyToString
- _arrayEquals
- _arrayFind
- _assertArray
- _assertFromGenerator
- _assertObject
- _byProperty
- _cloneDeep
- _createGetter
- _deepEquals
- _forEach
- _forIn
- _freezeDeep
- _isDeepEqualTo
- _lastElement
- _mergeObjects
- _nary
- _nthElement
- _objectAssign
- _objectEquals
- _partialLeft
- _push
- _random
- _reduceForIn
- _reduceToObject
- _toInteger
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:
Param | Type |
---|---|
t1 | T1 |
Returns: R
Function2
Ƭ Function2: function
Defined in js/js.utils.ts:409
Type declaration
▸(t1: T1
, t2: T2
): R
Parameters:
Param | Type |
---|---|
t1 | T1 |
t2 | T2 |
Returns: R
Function3
Ƭ Function3: function
Defined in js/js.utils.ts:410
Type declaration
▸(t1: T1
, t2: T2
, t3: T3
): R
Parameters:
Param | Type |
---|---|
t1 | T1 |
t2 | T2 |
t3 | T3 |
Returns: R
Function4
Ƭ Function4: function
Defined in js/js.utils.ts:411
Type declaration
▸(t1: T1
, t2: T2
, t3: T3
, t4: T4
): R
Parameters:
Param | Type |
---|---|
t1 | T1 |
t2 | T2 |
t3 | T3 |
t4 | T4 |
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:
Param | Type |
---|---|
aFunction | function |
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:
Param | Type |
---|---|
aFunction | function |
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:
Param | Type |
---|---|
aValue | any |
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:
Param | Type |
---|---|
aLeft | T [] |
aRight | T [] |
aPredicate | EqualsPredicate<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:
Param | Type | Description |
---|---|---|
aArray | T [] | - |
aPredicate | Predicate<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:
Param | Type |
---|---|
aKey | number | string | symbol |
aObject | any |
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:
Param | Type |
---|---|
aKey | number | string | symbol |
aObject | any |
aGenerator | Generator<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:
Param | Type |
---|---|
aKey | number | string | symbol |
aObject | any |
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:
Param | Type | Description |
---|---|---|
aKey | K | the key of the object to compare |
aPredicate | Predicate<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:
Param | Type |
---|---|
aValue | any |
Returns: any
_createGetter
▸ _createGetter<T
>(aGetter: Generator<T
>): PropertyDescriptor
Defined in js/js.utils.ts:265
Constructs a getter description
Type parameters:
T
Parameters:
Param | Type | Description |
---|---|---|
aGetter | Generator<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:
Param | Type |
---|---|
aLeft | any |
aRight | any |
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:
Param | Type | Description |
---|---|---|
aArray | T [] | the array |
aConsumer | Consumer<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:
Param | Type | Description |
---|---|---|
aObject | object | the object |
aConsumer | BiConsumer<T , string > | consumer callback |
Returns: void
_freezeDeep
▸ _freezeDeep(aValue: any
): any
Defined in js/js.utils.ts:222
Parameters:
Param | Type |
---|---|
aValue | any |
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:
Param | Type | Description |
---|---|---|
aComparison | T | the 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:
Param | Type |
---|---|
aArray | T [] |
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:
Param | Type | Description |
---|---|---|
aLeft | T | the left object |
aRight | T | the 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:
Param | Type | Description |
---|---|---|
aArity | number | the arity, i.e. the maximum number of supported arguments |
aFunction | Function | the 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:
Param | Type |
---|---|
aArray | T [] |
aIndex | number |
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:
Param | Type |
---|---|
aKey | string |
aValue | V |
aObject | T |
Returns: T
<Const>
_objectEquals
▸ _objectEquals(aLeft: any
, aRight: any
, aPredicate: EqualsPredicate<any
>): boolean
Defined in js/js.utils.ts:72
Parameters:
Param | Type |
---|---|
aLeft | any |
aRight | any |
aPredicate | EqualsPredicate<any > |
Returns: boolean
<Const>
_partialLeft
▸ _partialLeft(aFunction: function
, ...aArgs: any
[]): any
Defined in js/js.utils.ts:691
Our simple implementation
Parameters:
Param | Type | Description |
---|---|---|
aFunction | function | the original function |
Rest aArgs | any [] | 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:
Param | Type |
---|---|
aValue | T |
aArray | T [] |
Returns: T
[]
_random
▸ _random(aMin: number
, aMax: number
): number
Defined in js/js.utils.ts:255
Parameters:
Param | Type |
---|---|
aMin | number |
aMax | number |
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:
Param | Type | Description |
---|---|---|
aObject | Record <string , T > | any | the object |
aFunction | function | |
aInitial | R |
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:
Param | Type | Description |
---|---|---|
aArray | T [] | the array |
aKeyExtractor | UnaryFunction <T , string > | the key extractor |
Optional aTransformer | UnaryFunction <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:
Param | Type |
---|---|
aValue | any |
aDefault | number |
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:
Param | Type |
---|---|
aValue | string |
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
- DEFAULT_LAYOUT_MAPPING
- DEFAULT_LAYOUT_MODE
- LAYOUT_MODE_ERROR
- LAYOUT_MODE_FOOTER
- LAYOUT_MODE_HEADER
- LAYOUT_MODE_NAVIGATION
- LAYOUT_TEMPLATE_ERROR
- LAYOUT_TEMPLATE_FOOTER
- LAYOUT_TEMPLATE_HEADER
- LAYOUT_TEMPLATE_NAVIGATION
- LAYOUT_TYPE_ANGULAR
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:
Param | Type |
---|---|
aName | string |
Returns: object
<Const>
createEmptyLogger
▸ createEmptyLogger(aName: string
): object
Defined in logger/console.logger.ts:17
Parameters:
Param | Type |
---|---|
aName | string |
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:
Param | Type |
---|---|
aName | string |
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:
Param | Type |
---|---|
aLogger | Logger |
Rest aArgs | any [] |
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:
Param | Type |
---|---|
aLogger | Logger |
Rest aArgs | any [] |
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:
Param | Type |
---|---|
aLogger | Logger |
Rest aArgs | any [] |
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:
Param | Type | Description |
---|---|---|
aMode | number | the aspects to log |
Returns: (Anonymous function)
the logger callback
@ibm-wch-sdk/utils > "messages/message.event"
External module: "messages/message.event"
Index
Variables
Functions
- _createMessageHandler
- _createSdkErrorResponse
- _getMessagePort
- _isMessagePort
- _isSdkEvent
- _processMessage
- _registerSubscription
- _sendResponse
- _unsubscribe
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:
Param | Type | Description |
---|---|---|
aCorsWhitelist | Generator<PromiseLike <string []>> | generator that produces a CORS whitelist |
aMsgHandlers | Generator<SdkMessageHandler []> | generator that enumerates the set of registered message handlers |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aEvent | SdkMessagePayload |
aError | any |
aLogger | Logger |
Returns: SdkErrorResponse
_getMessagePort
▸ _getMessagePort(aEvent: MessageEvent
): MessagePort
Defined in messages/message.event.ts:97
Parameters:
Param | Type |
---|---|
aEvent | MessageEvent |
Returns: MessagePort
_isMessagePort
▸ _isMessagePort(aValue: any
): boolean
Defined in messages/message.event.ts:87
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
_isSdkEvent
▸ _isSdkEvent(aPayload: any
): boolean
Defined in messages/message.event.ts:59
Parameters:
Param | Type |
---|---|
aPayload | any |
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:
Param | Type |
---|---|
aData | SdkMessagePayload |
aEvent | MessageEvent |
aMsgHandlers | Generator<SdkMessageHandler []> |
aLogger | Logger |
Returns: PromiseLike
<SdkMessagePayload
> | SdkMessagePayload
| null
| undefined
_registerSubscription
▸ _registerSubscription(aSubscription: Subscription
): string
Defined in messages/message.event.ts:46
Parameters:
Param | Type |
---|---|
aSubscription | Subscription |
Returns: string
_sendResponse
▸ _sendResponse(aResponse: any
, aEvent: MessageEvent
, aLogger: Logger
): void
Defined in messages/message.event.ts:114
Parameters:
Param | Type |
---|---|
aResponse | any |
aEvent | MessageEvent |
aLogger | Logger |
Returns: void
_unsubscribe
▸ _unsubscribe(aHandle: string
): void
Defined in messages/message.event.ts:34
Parameters:
Param | Type |
---|---|
aHandle | string |
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:
Param | Type |
---|---|
aEvent | SdkNavigateByPathEvent |
aFlag | boolean |
Optional aError | any |
Returns: SdkNavigateByPathResponse
_isSdkNavigateByPathEvent
▸ _isSdkNavigateByPathEvent(aPayload: SdkMessagePayload
): boolean
Defined in messages/navigate.by.path.handler.ts:20
Parameters:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createNavigateByPathHandler
▸ createNavigateByPathHandler(aNavigate: function
, aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/navigate.by.path.handler.ts:51
Executes a navigation event
Parameters:
Param | Type |
---|---|
aNavigate | function |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createRefreshHandler
▸ createRefreshHandler(aRefresh: function
, aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/refresh.handler.ts:20
Executes a refresh event
Parameters:
Param | Type |
---|---|
aRefresh | function |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aEvent | SdkSetModeEvent |
aMode | SdkMode |
Optional aError | any |
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:
Param | Type | Description |
---|---|---|
aMode | SdkMode | the mode |
Returns: boolean
_isSdkSetModeEvent
▸ _isSdkSetModeEvent(aPayload: SdkMessagePayload
): boolean
Defined in messages/set.mode.handler.ts:22
Parameters:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createSetModeHandler
▸ createSetModeHandler(aPublicApiHandler: Consumer<boolean
>, aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/set.mode.handler.ts:60
Executes a navigation event
Parameters:
Param | Type |
---|---|
aPublicApiHandler | Consumer<boolean > |
Optional aLogger | Logger |
Returns: SdkMessageHandlerCallback
@ibm-wch-sdk/utils > "messages/subscribe.active.route.handler"
External module: "messages/subscribe.active.route.handler"
Index
Functions
- _createSdkActiveRouteEvent
- _createSdkSubscribeActiveRouteEventResponse
- _isSdkSubscribeActiveRouteEvent
- createSubscribeActiveRouteHandler
Functions
_createSdkActiveRouteEvent
▸ _createSdkActiveRouteEvent(aEvent: SdkSubscribeActiveRouteEvent
, aPage?: SitePage
): SdkActiveRouteEvent
Defined in messages/subscribe.active.route.handler.ts:51
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeActiveRouteEvent |
Optional aPage | SitePage |
Returns: SdkActiveRouteEvent
_createSdkSubscribeActiveRouteEventResponse
▸ _createSdkSubscribeActiveRouteEventResponse(aEvent: SdkSubscribeActiveRouteEvent
, aHandle: string
): SdkSubscribeActiveRouteEventResponse
Defined in messages/subscribe.active.route.handler.ts:31
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeActiveRouteEvent |
aHandle | string |
Returns: SdkSubscribeActiveRouteEventResponse
_isSdkSubscribeActiveRouteEvent
▸ _isSdkSubscribeActiveRouteEvent(aPayload: SdkMessagePayload
): boolean
Defined in messages/subscribe.active.route.handler.ts:68
Parameters:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
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:
Param | Type |
---|---|
onActiveRenderingContext | Observable <RenderingContext > |
Optional aLogger | Logger |
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:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createUnsubscribeHandler
▸ createUnsubscribeHandler(aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/subscribe.handler.ts:27
Subscribes to a given route
Parameters:
Param | Type |
---|---|
Optional aLogger | Logger |
Returns: SdkMessageHandlerCallback
@ibm-wch-sdk/utils > "messages/subscribe.mode.handler"
External module: "messages/subscribe.mode.handler"
Index
Functions
- _createSdkModeEvent
- _createSdkSubscribeModeEventResponse
- _isSdkSubscribeModeEvent
- createSubscribeModeHandler
Functions
_createSdkModeEvent
▸ _createSdkModeEvent(aEvent: SdkSubscribeModeEvent
, aMode: SdkMode
): SdkModeEvent
Defined in messages/subscribe.mode.handler.ts:49
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeModeEvent |
aMode | SdkMode |
Returns: SdkModeEvent
_createSdkSubscribeModeEventResponse
▸ _createSdkSubscribeModeEventResponse(aEvent: SdkSubscribeModeEvent
, aHandle: string
): SdkSubscribeModeEventResponse
Defined in messages/subscribe.mode.handler.ts:29
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeModeEvent |
aHandle | string |
Returns: SdkSubscribeModeEventResponse
_isSdkSubscribeModeEvent
▸ _isSdkSubscribeModeEvent(aPayload: SdkMessagePayload
): boolean
Defined in messages/subscribe.mode.handler.ts:66
Parameters:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createSubscribeModeHandler
▸ createSubscribeModeHandler(onUsePublic: Observable
<boolean
>, aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/subscribe.mode.handler.ts:74
Subscribes to the active route
Parameters:
Param | Type |
---|---|
onUsePublic | Observable <boolean > |
Optional aLogger | Logger |
Returns: SdkMessageHandlerCallback
@ibm-wch-sdk/utils > "messages/subscribe.route.handler"
External module: "messages/subscribe.route.handler"
Index
Functions
- _createSdkRouteEvent
- _createSdkSubscribeRouteEventResponse
- _isSdkSubscribeRouteEvent
- createSubscribeRouteHandler
Functions
_createSdkRouteEvent
▸ _createSdkRouteEvent(aEvent: SdkSubscribeRouteEvent
, aRoute: string
, aPage?: SitePage
): SdkRouteEvent
Defined in messages/subscribe.route.handler.ts:32
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeRouteEvent |
aRoute | string |
Optional aPage | SitePage |
Returns: SdkRouteEvent
_createSdkSubscribeRouteEventResponse
▸ _createSdkSubscribeRouteEventResponse(aEvent: SdkSubscribeRouteEvent
, aHandle: string
): SdkSubscribeRouteEventResponse
Defined in messages/subscribe.route.handler.ts:53
Parameters:
Param | Type |
---|---|
aEvent | SdkSubscribeRouteEvent |
aHandle | string |
Returns: SdkSubscribeRouteEventResponse
_isSdkSubscribeRouteEvent
▸ _isSdkSubscribeRouteEvent(aPayload: SdkMessagePayload
): boolean
Defined in messages/subscribe.route.handler.ts:70
Parameters:
Param | Type |
---|---|
aPayload | SdkMessagePayload |
Returns: boolean
createSubscribeRouteHandler
▸ createSubscribeRouteHandler(aGetRenderingContextByPath: function
, aLogger?: Logger
): SdkMessageHandlerCallback
Defined in messages/subscribe.route.handler.ts:78
Subscribes to a given route
Parameters:
Param | Type |
---|---|
aGetRenderingContextByPath | function |
Optional aLogger | Logger |
Returns: SdkMessageHandlerCallback
External module: "misc"
Index
@ibm-wch-sdk/utils > "operators/operators"
External module: "operators/operators"
Index
Variables
- filterArrayOf
- filterBoolean
- filterNumber
- filterObject
- filterString
- filterTypeOf
- opBoxLayoutMode
- opDeepDistinctUntilChanged
- opDistinctUntilChanged
- opFalse
- opFilterBoolean
- opFilterNotNil
- opFilterNumber
- opFilterObject
- opFilterString
- opJsonParse
- opJsonStringify
- opLevels
- opNot
- opPageArrayDistinctUntilChanged
- opPageDistinctUntilChanged
- opPluckApiOrigin
- opPluckCurrentPage
- opPluckDeliveryOrigin
- opShareLast
- opTrue
- pageArrayDistinctUntilChanged
- pageDistinctUntilChanged
- pluckApiOrigin
- pluckCurrentPage
- pluckDeliveryOrigin
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:
Param | Type |
---|---|
pred | IsPredicate<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:
Param | Type |
---|---|
aPredicate | IsPredicate<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:
Param | Type |
---|---|
src | Observable <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:
Param | Type |
---|---|
src | Observable <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:
Param | Type |
---|---|
src | Observable <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:
Param | Type |
---|---|
src | Observable <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:
Param | Type |
---|---|
src | Observable <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:
Param | Type | Description |
---|---|---|
aDefault | T | the 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:
Param | Type | Description |
---|---|---|
aDefault | Observable <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:
Param | Type | Description |
---|---|---|
aKey | K | the 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:
Param | Type |
---|---|
t1 | T1 |
t2 | T2 |
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:
Param | Type |
---|---|
aPath | string |
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:
Param | Type | Description |
---|---|---|
aValue | any | the value |
aPath | string [] | the path |
aDefault | T | optional 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:
Param | Type | Description |
---|---|---|
aPath | string [] | the path to pluck |
Optional aDefault | T |
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:
Param | Type |
---|---|
aName | string |
Returns: function
@ibm-wch-sdk/utils > "placeholder/placeholder"
External module: "placeholder/placeholder"
Index
Type aliases
Variables
Functions
- _fromAccessor
- _getAuthoringElementFromKey
- _getPlaceholderFromKey
- _getTypeFromKey
- _handleElement
- _insertPlaceholders
- _insertPlaceholdersRecursive
- _isAuthoringGroupElement
- _isAuthoringType
- _recResolveAuthType
- wchInsertPlaceholders
- wchPlaceholderFromAccessor
- wchPlaceholderResolver
- wchResolveType
- wchTypeFromAccessor
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:
Param | Type | Description |
---|---|---|
aAccessor | string | the accessor expression |
aType | AuthoringType | the actual type |
aSelector | BiFunction<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:
Param | Type | Description |
---|---|---|
aElementKey | string | the element key |
aType | AuthoringType | the 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:
Param | Type | Description |
---|---|---|
aElementKey | string | the element key |
aType | AuthoringType | the 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:
Param | Type | Description |
---|---|---|
aElementKey | string | the element key |
aType | AuthoringType | the 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:
Param | Type |
---|---|
aElement | AbstractElement |
aPlaceholder | AbstractElement |
aResolver | RenderingContextResolver |
Returns: AbstractElement
_insertPlaceholders
▸ _insertPlaceholders(aRenderingContext: RenderingContext
, aTypes: ContextMap, aCycleMap: ContextMap): RenderingContext
Defined in placeholder/placeholder.ts:151
Proxy function to inject the callback
Parameters:
Param | Type | Description |
---|---|---|
aRenderingContext | RenderingContext | the context to alter |
aTypes | ContextMap | mapping from type id to placeholder context |
aCycleMap | ContextMap | cycle 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:
Param | Type | Description |
---|---|---|
aRenderingContext | RenderingContext | the context to alter |
aTypes | ContextMap | mapping from type id to placeholder context |
aCycleMap | ContextMap | cycle protection |
aResolver | RenderingContextResolver | the 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:
Param | Type | Description |
---|---|---|
aValue | any | the 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:
Param | Type | Description |
---|---|---|
aValue | any | the 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:
Param | Type | Description |
---|---|---|
aType | AuthoringType | the type to analyze |
aGroups | AuthoringGroupElement [] | the detected group types |
aCache | Record <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:
Param | Type |
---|---|
aRenderingContext | RenderingContext |
aResolver | PlaceholderResolver |
Returns: Observable
<RenderingContext
>
wchPlaceholderFromAccessor
▸ wchPlaceholderFromAccessor(aAccessor: string
, aType: AuthoringType
): AuthoringPlaceholder
Defined in placeholder/placeholder.ts:393
Decodes the placeholder from an accessor expression
Parameters:
Param | Type | Description |
---|---|---|
aAccessor | string | the accessor expression |
aType | AuthoringType | the 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:
Param | Type | Description |
---|---|---|
aTag | string | the tag used to identify placeholder types |
aSearch | WchSdkSearch | the search service |
Returns: PlaceholderResolver the result
wchResolveType
▸ wchResolveType(aType: AuthoringType
): AuthoringType
Defined in placeholder/placeholder.ts:368
Resolves all typeRef
Parameters:
Param | Type | Description |
---|---|---|
aType | AuthoringType | the 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:
Param | Type | Description |
---|---|---|
aAccessor | string | the accessor expression |
aType | AuthoringType | the actual type |
Returns: string
the placeholder for the type
@ibm-wch-sdk/utils > "predicates/predicates"
External module: "predicates/predicates"
Index
Type aliases
Variables
- EMPTY_PROTOTYPE
- _getPrototypeOf
- _isArray
- _isBoolean
- _isFunction
- _isNil
- _isNilOrEmpty
- _isNotEmpty
- _isNotNil
- _isNull
- _isNumber
- _isString
- _isStringArray
- _isUndefined
- _toString
Functions
- _applyToString
- _isAbsoluteUrl
- _isArrayOf
- _isDate
- _isEmpty
- _isEqualTo
- _isObjectOf
- _isParseableAsDate
- _isPlainObject
- _typeOf
- isFlagSet
Type aliases
EqualsPredicate
Ƭ EqualsPredicate: function
Defined in predicates/predicates.ts:268
Type declaration
▸(aLeft: T
, aRight: T
): boolean
Parameters:
Param | Type |
---|---|
aLeft | T |
aRight | T |
Returns: boolean
IsPredicate
Ƭ IsPredicate: function
Defined in predicates/predicates.ts:14
Type declaration
▸(aValue: any
): boolean
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: boolean
Predicate
Ƭ Predicate: function
Defined in predicates/predicates.ts:266
Type declaration
▸(aValue: T
): boolean
Parameters:
Param | Type |
---|---|
aValue | T |
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:
Param | Type |
---|---|
aObject | any |
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:
Param | Type |
---|---|
aValue | T |
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:
Param | Type |
---|---|
aArray | T [] |
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:
Param | Type |
---|---|
aObject | T | 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:
Param | Type |
---|---|
aValue | any |
Returns: string
<Const>
_isAbsoluteUrl
▸ _isAbsoluteUrl(aUrl: string
): boolean
Defined in predicates/predicates.ts:165
Tests if a URL is an absolute URL
Parameters:
Param | Type | Description |
---|---|---|
aUrl | string | the 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:
Param | Type | Description |
---|---|---|
aValue | any | the value to test |
aPredicate | IsPredicate<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:
Param | Type | Description |
---|---|---|
aValue | any | the 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:
Param | Type | Description |
---|---|---|
aArray | any [] | 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:
Param | Type | Description |
---|---|---|
aComparison | T | the value to compare with |
Optional aTransform | UnaryFunction <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:
Param | Type | Description |
---|---|---|
aValue | any | the value to test |
aPredicate | IsPredicate<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:
Param | Type | Description |
---|---|---|
aValue | any | the 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:
Param | Type |
---|---|
aObject | any |
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:
Param | Type | Description |
---|---|---|
aValue | any | value 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:
Param | Type |
---|---|
aValue | number |
aFlag | number |
Returns: boolean
@ibm-wch-sdk/utils > "rendering/rendering"
External module: "rendering/rendering"
Index
Enumerations
Interfaces
Type aliases
Variables
- KEY_EXPRESSION
- KEY_PLACEHOLDER
- PROPERTY_REGEX
- _ELEMENTS
- _ELEMENT_TYPE
- _EXTRACTORS
- _LAZY_HANDLERS
- _LAZY_HANDLER_KEYS
- _LAZY_PLACEHOLDER_HANDLERS
- _VALUE
- _VALUES
- _ignoreElement
- categoryConverter
- dateConverter
- identityConverter
- identityExtractor
Functions
- _addPlaceholderToElement
- _addTypings
- _assertHandlers
- _categoryElement
- _dateElement
- _decodeExpression
- _extractAndConvert
- _getExpressionFromAccessor
- _getExpressionFromProperty
- _groupElement
- _handleElement
- _insertDirectPlaceholder
- _insertDirectValuesPlaceholder
- _insertValuePlaceholder
- _insertValueValuesPlaceholder
- _insertValuesPlaceholder
- _isElementEmpty
- _parseCategories
- _parseCategory
- _parseDate
- _pluralize
- _prepareRenderingContextInterceptors
- _pushArray
- _setMultiValue
- _setSingleValue
- _valueValuesElement
- _valueValuesElements
- _valuesElement
- _valuesElements
- groupConverter
- groupReducer
- mapToPlc
- opRcToRcs
- opRcsToRc
- valueValuesExtractor
- valuesExtractor
- wchElementFromRenderingContext
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:
Param | Type |
---|---|
aName | string |
aElement | any |
aRenderingContext | any |
Returns: void
PlaceholderHandlerType
Ƭ PlaceholderHandlerType: function
Defined in rendering/rendering.ts:261
Type declaration
▸(aElement: AbstractElement
, aPlaceholder: AbstractElement
): any
Parameters:
Param | Type |
---|---|
aElement | AbstractElement |
aPlaceholder | AbstractElement |
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
<Let>
_LAZY_HANDLER_KEYS
● _LAZY_HANDLER_KEYS: object
Defined in rendering/rendering.ts:481
Records the keys of the registered handlers
Type declaration
<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:
Param | Type |
---|---|
aElement | any |
aType | AbstractElement |
Returns: any
_addTypings
▸ _addTypings(aRenderingContext: RenderingContext
): RenderingContext
Defined in rendering/rendering.ts:633
Parameters:
Param | Type |
---|---|
aRenderingContext | RenderingContext |
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:
Param | Type | Description |
---|---|---|
aExpression | string | the 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:
Param | Type | Description |
---|---|---|
aExtractor | ValueExtractor<T > | the extractor function |
aConverter | ValueConverter<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:
Param | Type | Description |
---|---|---|
aPrototype | any | the object |
aAccessor | string | the 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:
Param | Type | Description |
---|---|---|
aPrototype | any | the prototype object |
aPropertyKey | string | the 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:
Param | Type |
---|---|
aSingleType | string |
aMultiType | string |
aName | string |
aElement | any |
aRenderingContext | any |
aExtractor | ValueExtractor<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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the element |
aPlaceholder | AbstractElement |
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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the element |
aPlaceholder | AbstractElement |
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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the element |
aPlaceholder | AbstractElement |
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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the element |
aPlaceholder | AbstractElement |
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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the element |
aPlaceholder | AbstractElement |
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:
Param | Type | Description |
---|---|---|
aElement | AbstractElement | the 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:
Param | Type | Description |
---|---|---|
aCategory | any | the category |
Returns: CategoryElement
the augmented category
<Const>
_parseCategory
▸ _parseCategory(aCategory: string
): string
[]
Defined in rendering/rendering.ts:83
Parameters:
Param | Type |
---|---|
aCategory | string |
Returns: string
[]
<Const>
_parseDate
▸ _parseDate(aValue: number
| string
| Date
): Date
Defined in rendering/rendering.ts:79
Decodes a value into a date object
Parameters:
Param | Type | Description |
---|---|---|
aValue | number | string | Date | the value |
Returns: Date
the object
_pluralize
▸ _pluralize(aValue: string
): string
Defined in rendering/rendering.ts:462
Parameters:
Param | Type |
---|---|
aValue | string |
Returns: string
_prepareRenderingContextInterceptors
▸ _prepareRenderingContextInterceptors(aRenderingContextInterceptors: RenderingContextInterceptor
[]): RenderingContextInterceptors
Defined in rendering/rendering.ts:826
Prepare a list of interceptors
Parameters:
Param | Type |
---|---|
aRenderingContextInterceptors | RenderingContextInterceptor [] |
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:
Param | Type | Description |
---|---|---|
aValues | T [] | values to insert |
aArray | T [] | 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:
Param | Type |
---|---|
aName | string |
aValue | T [] |
aSingleType | string |
aMultiType | string |
aRenderingContext | any |
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:
Param | Type |
---|---|
aName | string |
aValue | T |
aSingleType | string |
aMultiType | string |
aRenderingContext | any |
Returns: void
_valueValuesElement
▸ _valueValuesElement<T
,R
>(aType: string
, aConverter: ValueConverter<T
, R
>): void
Defined in rendering/rendering.ts:488
Type parameters:
T
R
Parameters:
Param | Type |
---|---|
aType | string |
aConverter | ValueConverter<T , R > |
Returns: void
<Const>
_valueValuesElements
▸ _valueValuesElements(aTypes: string
[]): void
Defined in rendering/rendering.ts:537
Parameters:
Param | Type |
---|---|
aTypes | string [] |
Returns: void
_valuesElement
▸ _valuesElement<T
,R
>(aType: string
, aConverter: ValueConverter<T
, R
>): void
Defined in rendering/rendering.ts:514
Type parameters:
T
R
Parameters:
Param | Type |
---|---|
aType | string |
aConverter | ValueConverter<T , R > |
Returns: void
<Const>
_valuesElements
▸ _valuesElements(aTypes: string
[]): void
Defined in rendering/rendering.ts:545
Parameters:
Param | Type |
---|---|
aTypes | string [] |
Returns: void
<Const>
groupConverter
▸ groupConverter(aGroupElement: any
): any
Defined in rendering/rendering.ts:150
Parameters:
Param | Type |
---|---|
aGroupElement | any |
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:
Param | Type |
---|---|
res | any |
el | any |
name | any |
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:
Param | Type |
---|---|
onRc | Observable <RenderingContext > |
Returns: Observable
<RenderingContext
[]>
<Const>
opRcsToRc
▸ opRcsToRc(onRcs: Observable
<RenderingContext
[]>): Observable
<RenderingContext
>
Defined in rendering/rendering.ts:815
Parameters:
Param | Type |
---|---|
onRcs | Observable <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:
Param | Type | Description |
---|---|---|
aValue | any |
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:
Param | Type | Description |
---|---|---|
aValue | any |
Returns: any
| any
[]
wchElementFromRenderingContext
▸ wchElementFromRenderingContext(aContext: RenderingContext
, aAccessor: string
): AbstractElement
Defined in rendering/rendering.ts:890
Decodes an element from the accessor
Parameters:
Param | Type | Description |
---|---|---|
aContext | RenderingContext | the rendering context |
aAccessor | string | the 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
- __pipe
- _createConsumer
- _createGetter
- _createSetter
- _createSingleSubject
- _fromObservableOrT
- _generateItem
- _safeUnsubscribe
- _safeUnsubscribeAll
- _thisThenThat
- _thisThenThats
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:
Param | Type | Description |
---|---|---|
aSubject | Subject <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:
Param | Type | Description |
---|---|---|
aObservable | Observable <T > | the observable that handles the getter events |
Optional aInitial | T | a 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:
Param | Type | Description |
---|---|---|
aSubject | Subject <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:
Param | Type | Description |
---|---|---|
aValue | ObservableOrT<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:
Param | Type |
---|---|
aGenerator | Generator<T > |
Returns: Observable
<T
>
_safeUnsubscribe
▸ _safeUnsubscribe(aSubscription: Subscription
| null
| undefined
): void
Defined in rx/rx.utils.ts:182
Parameters:
Param | Type |
---|---|
aSubscription | Subscription | null | undefined |
Returns: void
_safeUnsubscribeAll
▸ _safeUnsubscribeAll(aSubscriptions: Subscription
[] | null
| undefined
): void
Defined in rx/rx.utils.ts:193
Parameters:
Param | Type |
---|---|
aSubscriptions | Subscription [] | 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:
Param | Type |
---|---|
aFirst | Observable <T > |
aNext | Observable <T > |
Returns: Observable
<T
>
_thisThenThats
▸ _thisThenThats<T
>(...aObservables: Observable
<T
>[]): Observable
<T
>
Defined in rx/rx.utils.ts:142
Type parameters:
T
Parameters:
Param | Type |
---|---|
Rest aObservables | Observable <T >[] |
Returns: Observable
<T
>
@ibm-wch-sdk/utils > "search/search.utils"
External module: "search/search.utils"
Index
Variables
Functions
- _escapeAndQuoteTerm
- _escapeKeyValue
- _escapeKeyValueAnd
- _escapeKeyValueJoin
- _escapeKeyValueOr
- _escapeQuotes
- _escapeTerm
- _keyValue
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:
Param | Type | Description |
---|---|---|
aTerm | string |
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:
Param | Type | Description |
---|---|---|
aKey | string | the search key |
aTerm | string | null | undefined | the 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:
Param | Type | Description |
---|---|---|
aKey | string | the search key |
Rest aTerms | string [] | 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:
Param | Type | Description |
---|---|---|
aKey | string | the search key |
aJoiner | string | the operator, without spaces |
aTerms | string [] | 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:
Param | Type | Description |
---|---|---|
aKey | string | the search key |
Rest aTerms | string [] | 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:
Param | Type | Description |
---|---|---|
aTerm | string |
Returns: string
_escapeTerm
▸ _escapeTerm(aTerm: string
): string
Defined in search/search.utils.ts:13
Escapes a term according to lucence syntax
Parameters:
Param | Type | Description |
---|---|---|
aTerm | string |
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:
Param | Type | Description |
---|---|---|
aKey | string | the search key |
aValue | string | the 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
- IGNORED_SITE_PAGE_FIELDS
- LOGGER
- NO_ID
- UNKNKOWN_ID
- _assign
- _decodeURIComponent
- _encodeURIComponent
- _getBreadcrumb
- _getPage
Functions
- _cloneSitePage
- _createPartialSiteContextForSitePage
- _createSiteContextFromSearchResult
- _getEncodedPath
- _getSiteURL
- _pageArrayEquals
- _pageEquals
- _siteContextEquals
- access
- analyzeSite
- cloneSiteInfo
- dispatchError
- doDispatchError
- doMarkComplete
- doMarkUnused
- markComplete
- markUnused
- registerAsync
- registerSync
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:
Param | Type | Description |
---|---|---|
aSitePage | SitePage | the 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:
Param | Type | Description |
---|---|---|
aPage | SitePage | the site page |
aSite | Site | the 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:
Param | Type | Description |
---|---|---|
aPage | SitePage | the page in question |
aSearchResult | SitePage [] | the search result |
aSite | Site | the site object |
Returns: SiteContext
the site context
_getEncodedPath
▸ _getEncodedPath(aPath: string
): string
Defined in site/site.utils.ts:74
Parameters:
Param | Type |
---|---|
aPath | string |
Returns: string
<Const>
_getSiteURL
▸ _getSiteURL(aBaseUrl: string
): string
Defined in site/site.utils.ts:588
Parameters:
Param | Type |
---|---|
aBaseUrl | string |
Returns: string
_pageArrayEquals
▸ _pageArrayEquals(aLeft: SitePage
[], aRight: SitePage
[]): boolean
Defined in site/site.utils.ts:93
Parameters:
Param | Type |
---|---|
aLeft | SitePage [] |
aRight | SitePage [] |
Returns: boolean
_pageEquals
▸ _pageEquals(aLeft: SitePage
, aRight: SitePage
): boolean
Defined in site/site.utils.ts:51
Parameters:
Param | Type |
---|---|
aLeft | SitePage |
aRight | SitePage |
Returns: boolean
_siteContextEquals
▸ _siteContextEquals(aLeft: SiteContext
, aRight: SiteContext
): boolean
Defined in site/site.utils.ts:152
Parameters:
Param | Type |
---|---|
aLeft | SiteContext |
aRight | SiteContext |
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:
Param | Type |
---|---|
aKey | string |
aDefault | T | null | undefined |
aMapping | AsyncMapping<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:
Param | Type |
---|---|
aBreadcrumb | SitePage [] |
aParentPage | SitePage |
aChildren | SiteChild [] |
aContext | AnalysisContext |
Returns: SitePage
[]
cloneSiteInfo
▸ cloneSiteInfo(aInfo: InternalSiteInformation): InternalSiteInformation
Defined in site/site.utils.ts:166
Parameters:
Param | Type |
---|---|
aInfo | InternalSiteInformation |
Returns: InternalSiteInformation
dispatchError
▸ dispatchError(aInfo: InternalSiteInformation, aError: any
): void
Defined in site/site.utils.ts:370
Parameters:
Param | Type |
---|---|
aInfo | InternalSiteInformation |
aError | any |
Returns: void
doDispatchError
▸ doDispatchError<T
>(aMapping: AsyncMapping<T
>, aError: any
): void
Defined in site/site.utils.ts:362
Type parameters:
T
Parameters:
Param | Type |
---|---|
aMapping | AsyncMapping<T > |
aError | any |
Returns: void
doMarkComplete
▸ doMarkComplete<T
>(aMapping: AsyncMapping<T
>): void
Defined in site/site.utils.ts:349
Type parameters:
T
Parameters:
Param | Type |
---|---|
aMapping | AsyncMapping<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:
Param | Type |
---|---|
aMapping | AsyncMapping<T > |
aValue | T | null | undefined |
Returns: void
markComplete
▸ markComplete(aInfo: InternalSiteInformation): void
Defined in site/site.utils.ts:357
Parameters:
Param | Type |
---|---|
aInfo | InternalSiteInformation |
Returns: void
markUnused
▸ markUnused(aInfo: InternalSiteInformation): void
Defined in site/site.utils.ts:344
Parameters:
Param | Type |
---|---|
aInfo | InternalSiteInformation |
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:
Param | Type |
---|---|
aKey | string |
aContext | T |
aOldMap | AsyncMapping<T > |
aNewMap | AsyncMapping<T > |
aNotifications | ChangeNotification[] |
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:
Param | Type |
---|---|
aKey | string |
aContext | T |
aOldMap | SyncMapping<T > |
aNewMap | SyncMapping<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:
Param | Type |
---|---|
aStorage | Storage | null | undefined |
aScope | string |
Returns: ClientStorage
clientStorageFromWindow
▸ clientStorageFromWindow(aScope: string
, aWindow?: Window
): ClientStorage
Defined in storage/clientstorage.ts:109
Parameters:
Param | Type |
---|---|
aScope | string |
Optional aWindow | Window |
Returns: ClientStorage
createKey
▸ createKey(aKey: string
, aPrefix: string
, aSuffix: string
): string
Defined in storage/clientstorage.ts:23
Parameters:
Param | Type |
---|---|
aKey | string |
aPrefix | string |
aSuffix | string |
Returns: string
isQuotaExceeded
▸ isQuotaExceeded(e: any
): boolean
Defined in storage/clientstorage.ts:27
Parameters:
Param | Type |
---|---|
e | any |
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
- PARSE_HOST
- PARSE_URL
- SLASH
- SLASH_REGEXP
- _cloneURL
- _fallbackToEmpty
- _parseURL
- _pluckHref
- _pluckRel
- decode
- encode
Functions
- _absoluteURL
- _buildQueryString
- _decodeQueryArg
- _ensureStartingAndTrailingSlash
- _ensureTrailingSlash
- _getBaseUrlFromDocument
- _getLinksByRel
- _getPathForSearch
- _parseQuery
- _parseUrlString
- _push
- _reduceTokens
- _urlToString
- getOrigin
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:
Param | Type | Description |
---|---|---|
aUrl | string | the URL |
Optional aDoc | Document | the document |
Optional aWindow | Window | the window |
Returns: string
the resolved URL
_buildQueryString
▸ _buildQueryString(aValue: any
): string
| null
| undefined
Defined in url/url.utils.ts:172
Parameters:
Param | Type |
---|---|
aValue | any |
Returns: string
| null
| undefined
_decodeQueryArg
▸ _decodeQueryArg(aValue: string
): string
Defined in url/url.utils.ts:191
Parameters:
Param | Type |
---|---|
aValue | string |
Returns: string
_ensureStartingAndTrailingSlash
▸ _ensureStartingAndTrailingSlash(aUrl?: string
): string
Defined in url/url.utils.ts:45
Parameters:
Param | Type |
---|---|
Optional aUrl | string |
Returns: string
_ensureTrailingSlash
▸ _ensureTrailingSlash(aUrl: string
): string
Defined in url/url.utils.ts:53
Parameters:
Param | Type |
---|---|
aUrl | string |
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:
Param | Type | Description |
---|---|---|
Optional aDoc | Document | the document |
Optional aWindow | Window |
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:
Param | Type | Description |
---|---|---|
Optional aDocument | Document | |
Optional aWindow | Window |
Returns: Record
<string
, string
>
_getPathForSearch
▸ _getPathForSearch(aPath: string
): string
Defined in url/url.utils.ts:275
Parameters:
Param | Type |
---|---|
aPath | string |
Returns: string
_parseQuery
▸ _parseQuery(aQuery: string
): ParsedQuery
Defined in url/url.utils.ts:201
Parameters:
Param | Type |
---|---|
aQuery | string |
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:
Param | Type | Description |
---|---|---|
aUrl | string | the URL string |
Returns: URL
the URL object
_push
▸ _push(aEncodedKey: string
, aArray: string
[], aValue: any
): string
[]
Defined in url/url.utils.ts:146
Parameters:
Param | Type |
---|---|
aEncodedKey | string |
aArray | string [] |
aValue | any |
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:
Param | Type | Description |
---|---|---|
aTokens | string [] | target array |
aValue | any | the value to add, can be any[] or any |
aKey | string | the unencoded key |
Returns: string
[]
the resulting array
_urlToString
▸ _urlToString(aURL: URL
| string
): string
Defined in url/url.utils.ts:271
Parameters:
Param | Type |
---|---|
aURL | URL | string |
Returns: string
getOrigin
▸ getOrigin(aDoc?: Document
, aWindow?: Window
): string
Defined in url/url.utils.ts:337
Returns the orign from the doc
Parameters:
Param | Type | Description |
---|---|---|
Optional aDoc | Document | document |
Optional aWindow | Window | window |
Returns: string
the origin
@ibm-wch-sdk/utils > "wch/wch.service"
External module: "wch/wch.service"
Index
Classes
Variables
- BFF_PUBLIC_URL
- BFF_SECURE_URL
- DEFAULT_CYCLE_HANDLING
- EMPTY_PAGE_SEARCH_RESULT
- EMPTY_RENDERING_CONTEXTS
- EMPTY_RENDERING_CONTEXTS_SEQUENCE
- EMPTY_RENDERING_CONTEXT_SEARCH_RESULT
- EMPTY_SITE_PAGES_SEQUENCE
- LOGGER
- NO_RENDERING_CONTEXT
- UNKNOWN_RENDERING_CONTEXT
- _Subject
- _assign
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:
Param | Type | Description |
---|---|---|
aSegments | string [] | 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:
Param | Type | Description |
---|---|---|
aSearchResult | SearchResult <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:
Param | Type | Description |
---|---|---|
aSite | Site | the 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
- DX_SITES
- HEX_REGEXP_STRING
- HOST_REGEXP_STRING
- KEY_CYCLE
- KEY_LAYOUT_MODE
- KEY_LEVELS
- KEY_REFERENCE
- KEY_RENDERING_CONTEXT
- KEY_RENDERING_CONTEXT_MAP
- LIVE_HREF_REGEXP
- LIVE_HREF_REGEXP_STRING
- PREVIEW_HOST_REGEXP
- PREVIEW_HOST_REGEXP_STRING
- PREVIEW_HREF_REGEXP
- PREVIEW_HREF_REGEXP_STRING
- PREVIEW_INDICATOR
- PREVIEW_ORIGIN_REGEXP
- PREVIEW_ORIGIN_REGEXP_STRING
- PREVIEW_SUFFIX
- PREVIEW_SUFFIX_STAGE
- SITE_ID_STRING
- TENANT_BASED_URL
- TENANT_BASED_URL_REGEXP
- UUID_V4_REGEXP_STRING
- VALUE_ROOT
- _ALL_FETCH_LEVELS
- _DEFAULT_FETCH_LEVELS
- _FQ_SITE_ID
- _KEY_FIELD_LIST
- _KEY_PATHS
- _KEY_ROWS
- _KEY_SEARCH_FQ
- _KEY_SEARCH_Q
- _KEY_SORT
- _PREFIX_SEARCH_CLASSIFICATION
- _VALUE_FIELD_LIST
- _VALUE_MAX_ROWS
- _VALUE_ONE_ROW
- _VALUE_SEARCH_FQ_CONTENT
- _VALUE_SEARCH_FQ_PAGE
- _VALUE_SEARCH_Q
- _mergeHubInfo
Functions
- _addDebug
- _adjustRenderingContextSearchQuery
- _adjustSearchQuery
- _adjustSitePagesSearchQuery
- _boxFetchLevels
- _boxLayoutMode
- _forEachRenderingContext
- _forEachRenderingContexts
- _fqValuePush
- _fromHubInfoUrlProvider
- _getApiUrlFromDeliveryURL
- _getApiUrlFromPreview
- _getApiUrlInContext
- _getBaseUrl
- _getBaseUrlFromLocation
- _getBaseUrlFromWindow
- _getBaseUrlSuffix
- _getChildrenExpression
- _getCycleHandling
- _getDeliveryUrlFromApiURL
- _getHubInfoFromBaseURL
- _getHubInfoFromLinks
- _getLayout
- _getLiveUrlFromPreviewUrl
- _getPageSearchURL
- _getParentExpression
- _getParentPageURL
- _getPreviewUrlFromLiveUrl
- _getRenderingContextURL
- _getSearchURL
- _getSiblingsExpression
- _getSiteContextExpression
- _getSiteContextURL
- _hubInfoUrlProvider
- _internalForEachRenderingContext
- _internalForEachRenderingContexts
- _isPreviewMode
- _isPreviewOrigin
- _isSearchClassification
- _resolveRenderingContext
Object literals
Type aliases
RenderingContextCallback
Ƭ RenderingContextCallback: function
Defined in wch/wch.utils.ts:592
Type declaration
▸(rc: RenderingContext
, parent?: RenderingContext
, path?: string
): void
Parameters:
Param | Type |
---|---|
rc | RenderingContext |
Optional parent | RenderingContext |
Optional path | string |
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:
Param | Type |
---|---|
aPath | string |
aRenderingContext | RenderingContext |
Returns: RenderingContext
_adjustRenderingContextSearchQuery
▸ _adjustRenderingContextSearchQuery(aQuery: string
): string
Defined in wch/wch.utils.ts:371
Parameters:
Param | Type |
---|---|
aQuery | string |
Returns: string
_adjustSearchQuery
▸ _adjustSearchQuery(aQuery: string
, aFieldQueries: string
[]): string
Defined in wch/wch.utils.ts:325
Generically adjust the search query
Parameters:
Param | Type | Description |
---|---|---|
aQuery | string | the query |
aFieldQueries | string [] |
Returns: string
the new query string
_adjustSitePagesSearchQuery
▸ _adjustSitePagesSearchQuery(aQuery: string
, aSiteId: string
): string
Defined in wch/wch.utils.ts:382
Parameters:
Param | Type |
---|---|
aQuery | string |
aSiteId | string |
Returns: string
_boxFetchLevels
▸ _boxFetchLevels(aLevels: number
| null
| undefined
, aDefault?: number
): number
Defined in wch/wch.utils.ts:239
Parameters:
Param | Type |
---|---|
aLevels | number | null | undefined |
Optional aDefault | number |
Returns: number
_boxLayoutMode
▸ _boxLayoutMode(aMode: string
| null
| undefined
): string
Defined in wch/wch.utils.ts:111
Parameters:
Param | Type |
---|---|
aMode | string | null | undefined |
Returns: string
_forEachRenderingContext
▸ _forEachRenderingContext(aRenderingContext: RenderingContext
, aCallback: RenderingContextCallback): void
Defined in wch/wch.utils.ts:702
Parameters:
Param | Type |
---|---|
aRenderingContext | RenderingContext |
aCallback | RenderingContextCallback |
Returns: void
_forEachRenderingContexts
▸ _forEachRenderingContexts(aRenderingContext: RenderingContext
[], aCallback: RenderingContextCallback): void
Defined in wch/wch.utils.ts:683
Parameters:
Param | Type |
---|---|
aRenderingContext | RenderingContext [] |
aCallback | RenderingContextCallback |
Returns: void
_fqValuePush
▸ _fqValuePush(aValue: string
, aArray: string
[]): string
[]
Defined in wch/wch.utils.ts:312
Parameters:
Param | Type |
---|---|
aValue | string |
aArray | string [] |
Returns: string
[]
_fromHubInfoUrlProvider
▸ _fromHubInfoUrlProvider(aProvider: HubInfoUrlProvider
): URL
| null
| undefined
Defined in wch/wch.utils.ts:258
Converts the provider into a URL
Parameters:
Param | Type | Description |
---|---|---|
aProvider | HubInfoUrlProvider | the 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:
Param | Type | Description |
---|---|---|
aDeliveryURL | URL | the 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:
Param | Type | Description |
---|---|---|
aApiUrl | URL | the configured API URL, can be the live or the preview URL |
aPreviewMode | boolean | is 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:
Param | Type | Description |
---|---|---|
aApiUrl | URL | the configured API URL, can be the live or the preview URL |
aBaseURL | URL | the URL the system is loaded from, this is used to check for preview mode |
aPreviewCheck | UnaryFunction <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:
Param | Type | Description |
---|---|---|
Optional aDocument | Document | optionally the document |
Optional aWindow | Window | optionally 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:
Param | Type | Description |
---|---|---|
Optional aLocation | Location | the 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:
Param | Type | Description |
---|---|---|
Optional aWindow | Window | the optional window object |
Optional aDocument | Document | the 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:
Param | Type | Description |
---|---|---|
aBaseURL | URL | the 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:
Param | Type | Description |
---|---|---|
aPageId | string | Id of the page |
Returns: string
the string
_getCycleHandling
▸ _getCycleHandling(aCycle?: CYCLE_HANDLING
| string
): CYCLE_HANDLING
Defined in wch/wch.utils.ts:265
Parameters:
Param | Type |
---|---|
Optional aCycle | CYCLE_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:
Param | Type | Description |
---|---|---|
aApiURL | URL | the API URL |
Returns: URL
the delivery URL
_getHubInfoFromBaseURL
▸ _getHubInfoFromBaseURL(aBaseURL: URL
): HubInfo
Defined in wch/wch.utils.ts:171
Parameters:
Param | Type |
---|---|
aBaseURL | URL |
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:
Param | Type | Description |
---|---|---|
Optional aDocument | Document | the document |
Optional aWindow | Window | the window object |
Returns: HubInfo
_getLayout
▸ _getLayout(aLayoutMode: string
| undefined
, aContext: RenderingContext
| undefined
): Layout
| undefined
Defined in wch/wch.utils.ts:121
Parameters:
Param | Type |
---|---|
aLayoutMode | string | undefined |
aContext | RenderingContext | undefined |
Returns: Layout
| undefined
_getLiveUrlFromPreviewUrl
▸ _getLiveUrlFromPreviewUrl(aPreviewUrl: URL
): URL
Defined in wch/wch.utils.ts:777
Removes the preview string from the hostname
Parameters:
Param | Type | Description |
---|---|---|
aPreviewUrl | URL | the preview URL |
Returns: URL
the live URL
_getPageSearchURL
▸ _getPageSearchURL(aPath: string
, aSiteId: string
): Observable
<string
>
Defined in wch/wch.utils.ts:458
Parameters:
Param | Type |
---|---|
aPath | string |
aSiteId | string |
Returns: Observable
<string
>
_getParentExpression
▸ _getParentExpression(aParentId: string
| null
| undefined
): string
Defined in wch/wch.utils.ts:421
Returns the parent of a page
Parameters:
Param | Type |
---|---|
aParentId | string | null | undefined |
Returns: string
the string
_getParentPageURL
▸ _getParentPageURL(aParentId: string
, aSiteId: string
): Observable
<string
>
Defined in wch/wch.utils.ts:505
Parameters:
Param | Type |
---|---|
aParentId | string |
aSiteId | string |
Returns: Observable
<string
>
_getPreviewUrlFromLiveUrl
▸ _getPreviewUrlFromLiveUrl(aLiveUrl: URL
): URL
Defined in wch/wch.utils.ts:788
Insert the preview string into the hostname
Parameters:
Param | Type | Description |
---|---|---|
aLiveUrl | URL | the live URL |
Returns: URL
the preview URL
_getRenderingContextURL
▸ _getRenderingContextURL(aBaseUrl: string
, aID: string
): string
Defined in wch/wch.utils.ts:725
Parameters:
Param | Type |
---|---|
aBaseUrl | string |
aID | string |
Returns: string
_getSearchURL
▸ _getSearchURL(aQueryString: string
): Observable
<string
>
Defined in wch/wch.utils.ts:447
Builds the search query string
Parameters:
Param | Type | Description |
---|---|---|
aQueryString | string | the 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:
Param | Type | Description |
---|---|---|
aParentId | string | null | undefined | id 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:
Param | Type | Description |
---|---|---|
aParentId | string | null | undefined | the parent ID |
aPageId | string | the 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:
Param | Type |
---|---|
aParentId | string | null | undefined |
aPageId | string |
aSiteId | string |
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:
Param | Type | Description |
---|---|---|
aApiUrl | HubInfoUrlProvider | the API URL |
Optional aPreviewCheck | UnaryFunction <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:
Param | Type |
---|---|
aRenderingContext | RenderingContext |
aParent | RenderingContext | undefined |
aPath | string |
aCallback | RenderingContextCallback |
Returns: void
_internalForEachRenderingContexts
▸ _internalForEachRenderingContexts(aRenderingContext: RenderingContext
[], aParent: RenderingContext
| undefined
, aPath: string
, aCallback: RenderingContextCallback): void
Defined in wch/wch.utils.ts:604
Parameters:
Param | Type |
---|---|
aRenderingContext | RenderingContext [] |
aParent | RenderingContext | undefined |
aPath | string |
aCallback | RenderingContextCallback |
Returns: void
_isPreviewMode
▸ _isPreviewMode(aBaseURL: URL
): boolean
Defined in wch/wch.utils.ts:145
Parameters:
Param | Type |
---|---|
aBaseURL | URL |
Returns: boolean
_isPreviewOrigin
▸ _isPreviewOrigin(aOrigin: string
): boolean
Defined in wch/wch.utils.ts:157
Parameters:
Param | Type |
---|---|
aOrigin | string |
Returns: boolean
_isSearchClassification
▸ _isSearchClassification(aValue: string
): boolean
Defined in wch/wch.utils.ts:300
Parameters:
Param | Type |
---|---|
aValue | string |
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:
Param | Type |
---|---|
aRenderingContext | RenderingContext | null | undefined |
aStrategy | CYCLE_HANDLING |
aRenderingContextById | function |
Optional aLogger | Logger |
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
- "cache/cache.utils"
- "categories/categories"
- "compare/compare"
- "consumers/consumer"
- "cors/cors.utils"
- "debug/debug.utils"
- "dom/dom.utils"
- "elements/element"
- "error/error"
- "generators/generator"
- "generators/lazy.generator"
- "hash/hash.utils"
- "html/html"
- "http/http.utils"
- "i18n/localized"
- "idle/idle"
- "index"
- "js/js.core"
- "js/js.utils"
- "json/json.utils"
- "layouts/layout"
- "logger/console.logger"
- "logger/noop.logger"
- "logger/noop.logger.service"
- "logger/rx.logger"
- "messages/message.event"
- "messages/navigate.by.path.handler"
- "messages/refresh.handler"
- "messages/set.mode.handler"
- "messages/subscribe.active.route.handler"
- "messages/subscribe.handler"
- "messages/subscribe.mode.handler"
- "messages/subscribe.route.handler"
- "misc"
- "operators/operators"
- "path/path"
- "perf/perf.utils"
- "placeholder/placeholder"
- "predicates/predicates"
- "rendering/rendering"
- "rx/rx.utils"
- "search/search.utils"
- "site/site.utils"
- "site/sites.constants"
- "static/static.resources"
- "storage/clientstorage"
- "storage/storage.service"
- "url/url.utils"
- "wch/wch.service"
- "wch/wch.utils"
@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:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
Returns: Observable
<T
>
getText
▸ getText(aUrl: string
, aOptions: HttpOptions): Observable
<string
>
Defined in http/http.utils.ts:29
Parameters:
Param | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
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:
Param | Type |
---|---|
fct | function |
args | T1 |
Returns: R
Defined in js/js.core.ts:213
Type parameters:
T1
T2
R
Parameters:
Param | Type |
---|---|
fct | function |
args | T1 , T2 |
Returns: R
Defined in js/js.core.ts:214
Type parameters:
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
fct | function |
args | T1 , T2 , T3 |
Returns: R
Defined in js/js.core.ts:218
Type parameters:
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
fct | function |
args | T1 , T2 , T3 , T4 |
Returns: R
Defined in js/js.core.ts:222
Type parameters:
T1
T2
T3
T4
T5
R
Parameters:
Param | Type |
---|---|
fct | function |
args | T1 , 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:
Param | Type |
---|---|
arg1 | T1 |
Returns: T1
Defined in js/js.core.ts:184
Type parameters:
T1
T2
Parameters:
Param | Type |
---|---|
arg1 | T1 |
arg2 | T2 |
Returns: T1
, T2
Defined in js/js.core.ts:185
Type parameters:
T1
T2
T3
Parameters:
Param | Type |
---|---|
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
Returns: T1
, T2
, T3
Defined in js/js.core.ts:186
Type parameters:
T1
T2
T3
T4
Parameters:
Param | Type |
---|---|
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
arg4 | T4 |
Returns: T1
, T2
, T3
, T4
Defined in js/js.core.ts:187
Type parameters:
T1
T2
T3
T4
T5
Parameters:
Param | Type |
---|---|
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
arg4 | T4 |
arg5 | T5 |
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:
Param | Type |
---|---|
func | Function0<R > |
aThis | TH |
Returns: Function0<R
>
Defined in js/js.utils.ts:482
Type parameters:
TH
T1
R
Parameters:
Param | Type |
---|---|
func | Function1<T1 , R > |
aThis | TH |
Returns: Function1<T1
, R
>
Defined in js/js.utils.ts:484
Type parameters:
TH
T1
R
Parameters:
Param | Type |
---|---|
func | Function1<T1 , R > |
aThis | TH |
arg1 | T1 |
Returns: Function0<R
>
Defined in js/js.utils.ts:485
Type parameters:
TH
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
aThis | TH |
Returns: Function2<T1
, T2
, R
>
Defined in js/js.utils.ts:487
Type parameters:
TH
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
aThis | TH |
arg1 | T1 |
Returns: Function1<T2
, R
>
Defined in js/js.utils.ts:491
Type parameters:
TH
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
Returns: Function0<R
>
Defined in js/js.utils.ts:497
Type parameters:
TH
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
aThis | TH |
Returns: Function3<T1
, T2
, T3
, R
>
Defined in js/js.utils.ts:504
Type parameters:
TH
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
aThis | TH |
arg1 | T1 |
Returns: Function2<T2
, T3
, R
>
Defined in js/js.utils.ts:509
Type parameters:
TH
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
Returns: Function1<T3
, R
>
Defined in js/js.utils.ts:515
Type parameters:
TH
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
Returns: Function0<R
>
Defined in js/js.utils.ts:522
Type parameters:
TH
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
aThis | TH |
Returns: Function4<T1
, T2
, T3
, T4
, R
>
Defined in js/js.utils.ts:527
Type parameters:
TH
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
aThis | TH |
arg1 | T1 |
Returns: Function3<T2
, T3
, T4
, R
>
Defined in js/js.utils.ts:532
Type parameters:
TH
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
Returns: Function2<T3
, T4
, R
>
Defined in js/js.utils.ts:538
Type parameters:
TH
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
Returns: Function1<T4
, R
>
Defined in js/js.utils.ts:545
Type parameters:
TH
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
aThis | TH |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
arg4 | T4 |
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:
Param | Type |
---|---|
aKey | K |
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:
Param | Type |
---|---|
aKey | K |
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:
Param | Type |
---|---|
aKey | K |
aArg1 | T1 |
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:
Param | Type |
---|---|
aKey | K |
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:
Param | Type |
---|---|
aKey | K |
aArg1 | T1 |
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:
Param | Type |
---|---|
aKey | K |
aArg1 | T1 |
aArg2 | T2 |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
aArg1 | T1 |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
aArg1 | T1 |
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:
Param | Type |
---|---|
aThis | TH |
aKey | K |
aArg1 | T1 |
aArg2 | T2 |
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:
Param | Type |
---|---|
func | Function0<R > |
Returns: Function0<R
>
Defined in js/js.utils.ts:420
Type parameters:
T1
R
Parameters:
Param | Type |
---|---|
func | Function1<T1 , R > |
Returns: Function1<T1
, R
>
Defined in js/js.utils.ts:422
Type parameters:
T1
R
Parameters:
Param | Type |
---|---|
func | Function1<T1 , R > |
arg1 | T1 |
Returns: Function0<R
>
Defined in js/js.utils.ts:423
Type parameters:
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
Returns: Function2<T1
, T2
, R
>
Defined in js/js.utils.ts:425
Type parameters:
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
arg1 | T1 |
Returns: Function1<T2
, R
>
Defined in js/js.utils.ts:426
Type parameters:
T1
T2
R
Parameters:
Param | Type |
---|---|
func | Function2<T1 , T2 , R > |
arg1 | T1 |
arg2 | T2 |
Returns: Function0<R
>
Defined in js/js.utils.ts:427
Type parameters:
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
Returns: Function3<T1
, T2
, T3
, R
>
Defined in js/js.utils.ts:429
Type parameters:
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
arg1 | T1 |
Returns: Function2<T2
, T3
, R
>
Defined in js/js.utils.ts:434
Type parameters:
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
arg1 | T1 |
arg2 | T2 |
Returns: Function1<T3
, R
>
Defined in js/js.utils.ts:439
Type parameters:
T1
T2
T3
R
Parameters:
Param | Type |
---|---|
func | Function3<T1 , T2 , T3 , R > |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
Returns: Function0<R
>
Defined in js/js.utils.ts:445
Type parameters:
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<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:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
arg1 | T1 |
Returns: Function3<T2
, T3
, T4
, R
>
Defined in js/js.utils.ts:459
Type parameters:
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
arg1 | T1 |
arg2 | T2 |
Returns: Function2<T3
, T4
, R
>
Defined in js/js.utils.ts:464
Type parameters:
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
Returns: Function1<T4
, R
>
Defined in js/js.utils.ts:470
Type parameters:
T1
T2
T3
T4
R
Parameters:
Param | Type |
---|---|
func | Function4<T1 , T2 , T3 , T4 , R > |
arg1 | T1 |
arg2 | T2 |
arg3 | T3 |
arg4 | T4 |
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
- __@iterator
- __@unscopables
- concat
- copyWithin
- entries
- every
- fill
- filter
- find
- findIndex
- forEach
- includes
- indexOf
- join
- keys
- lastIndexOf
- map
- pop
- push
- reduce
- reduceRight
- reverse
- shift
- slice
- some
- sort
- splice
- toLocaleString
- toString
- unshift
- values
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:
Param | Type | Description |
---|---|---|
Rest items | ConcatArray <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:
Param | Type | Description |
---|---|---|
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:
Param | Type | Description |
---|---|---|
target | number | If target is negative, it is treated as length+target where length is the length of the array. |
start | number | If start is negative, it is treated as length+start. If end is negative, it is treated as length+end. |
Optional end | number | If 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A 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 thisArg | any | An 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:
Param | Type | Description |
---|---|---|
value | AnyJson | value to fill array section with |
Optional start | number | index 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 end | number | index 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An 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:
Param | Type | Description |
---|---|---|
predicate | function | find 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 thisArg | any | If 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:
Param | Type |
---|---|
predicate | function |
Optional thisArg | any |
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:
Param | Type | Description |
---|---|---|
predicate | function | find 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 thisArg | any | If 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An 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:
Param | Type | Description |
---|---|---|
searchElement | AnyJson | The element to search for. |
Optional fromIndex | number | The 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:
Param | Type | Description |
---|---|---|
searchElement | AnyJson | The value to locate in the array. |
Optional fromIndex | number | The 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:
Param | Type | Description |
---|---|---|
Optional separator | string | A 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:
Param | Type | Description |
---|---|---|
searchElement | AnyJson | The value to locate in the array. |
Optional fromIndex | number | The 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An 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:
Param | Type | Description |
---|---|---|
Rest items | AnyJson[] | 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A 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:
Param | Type |
---|---|
callbackfn | function |
initialValue | AnyJson |
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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. |
initialValue | U | If 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A 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:
Param | Type |
---|---|
callbackfn | function |
initialValue | AnyJson |
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:
Param | Type | Description |
---|---|---|
callbackfn | function | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. |
initialValue | U | If 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:
Param | Type | Description |
---|---|---|
Optional start | number | The beginning of the specified portion of the array. |
Optional end | number | The 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:
Param | Type | Description |
---|---|---|
callbackfn | function | A 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 thisArg | any | An 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:
Param | Type | Description |
---|---|---|
Optional compareFn | function | The 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:
Param | Type | Description |
---|---|---|
start | number | The zero-based location in the array from which to start removing elements. |
Optional deleteCount | number | The 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:
Param | Type | Description |
---|---|---|
start | number | The zero-based location in the array from which to start removing elements. |
deleteCount | number | The number of elements to remove. |
Rest items | AnyJson[] | 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:
Param | Type | Description |
---|---|---|
Rest items | AnyJson[] | 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:
Param | Type |
---|---|
scheduler | IdleFrameScheduler |
work | function |
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:
Param | Type |
---|---|
this | IdleFrameAction<T > |
Optional state | T |
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:
Param | Type | Description |
---|---|---|
teardown | TeardownLogic | The 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:
Param | Type | Description |
---|---|---|
subscription | Subscription | The subscription to remove. |
Returns: void
schedule
▸ schedule(state?: T
, delay?: number
): Subscription
Defined in rx/rx.utils.ts:82
Parameters:
Param | Type |
---|---|
Optional state | T |
Optional delay | number |
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:
Param | Type |
---|---|
work | function |
Optional delay | number |
Optional state | T |
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:
Param | Type |
---|---|
aSrc | Observable <T1 > |
aOp1 | OperatorFunction <T1 , T2 > |
Returns: Observable
<T2
>
Defined in rx/rx.utils.ts:203
Type parameters:
T1
T2
T3
Parameters:
Param | Type |
---|---|
aSrc | Observable <T1 > |
aOp1 | OperatorFunction <T1 , T2 > |
aOp2 | OperatorFunction <T2 , T3 > |
Returns: Observable
<T3
>
Defined in rx/rx.utils.ts:208
Type parameters:
T1
T2
T3
T4
Parameters:
Param | Type |
---|---|
aSrc | Observable <T1 > |
aOp1 | OperatorFunction <T1 , T2 > |
aOp2 | OperatorFunction <T2 , T3 > |
aOp3 | OperatorFunction <T3 , T4 > |
Returns: Observable
<T4
>
Defined in rx/rx.utils.ts:214
Type parameters:
T1
T2
T3
T4
T5
Parameters:
Param | Type |
---|---|
aSrc | Observable <T1 > |
aOp1 | OperatorFunction <T1 , T2 > |
aOp2 | OperatorFunction <T2 , T3 > |
aOp3 | OperatorFunction <T3 , T4 > |
aOp4 | OperatorFunction <T4 , T5 > |
Returns: Observable
<T5
>
Defined in rx/rx.utils.ts:221
Type parameters:
T1
T2
T3
T4
T5
T6
Parameters:
Param | Type |
---|---|
aSrc | Observable <T1 > |
aOp1 | OperatorFunction <T1 , T2 > |
aOp2 | OperatorFunction <T2 , T3 > |
aOp3 | OperatorFunction <T3 , T4 > |
aOp4 | OperatorFunction <T4 , T5 > |
aOp5 | OperatorFunction <T5 , T6 > |
Returns: Observable
<T6
>
Defined in rx/rx.utils.ts:229
Type parameters:
T1
T2
T3
T4
T5
T6
T7
Parameters:
Param | Type |
---|---|
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 > |
Returns: Observable
<T7
>
Defined in rx/rx.utils.ts:238
Type parameters:
T1
T2
T3
T4
T5
T6
T7
T8
Parameters:
Param | Type |
---|---|
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 > |
Returns: Observable
<T8
>
Defined in rx/rx.utils.ts:248
Type parameters:
T
R
Parameters:
Param | Type |
---|---|
aSrc | Observable <T > |
Rest operations | OperatorFunction <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:
Param | Type |
---|---|
path | string |
Returns: Observable
< string
| null
| undefined
>
getSiteContextById
▸ getSiteContextById(aID: string
| null
): SiteContext
Defined in site/site.utils.ts:499
Parameters:
Param | Type |
---|---|
aID | string | 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:
Param | Type |
---|---|
aBaseUrl | URL | undefined |
http | HttpService |
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:
Param | Type |
---|---|
aKey | string |
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:
Param | Type |
---|---|
storage | Storage |
scope | string |
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:
Param | Type |
---|---|
aKey | string |
Returns: AnyJson
put
▸ put(aKey: string
, aValue: AnyJson): void
Implementation of ClientStorage.put
Defined in storage/clientstorage.ts:73
Parameters:
Param | Type |
---|---|
aKey | string |
aValue | AnyJson |
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:
Param | Type |
---|---|
aKey | string |
Returns: AnyJson
put
▸ put(aKey: string
, aValue: AnyJson): void
Implementation of ClientStorage.put
Defined in storage/clientstorage.ts:87
Parameters:
Param | Type |
---|---|
aKey | string |
aValue | AnyJson |
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:
Param | Type |
---|---|
aKey | string |
Returns: AnyJson | null
| undefined
put
▸ put(aKey: string
, aValue: AnyJson): any
Defined in storage/clientstorage.ts:12
Parameters:
Param | Type |
---|---|
aKey | string |
aValue | AnyJson |
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:
Param | Type |
---|---|
aUrlsService | UrlConfig |
Optional aWindow | Window |
Returns: ClientStorageService
Properties
get
● get: function
Implementation of ClientStorage.get
Defined in storage/storage.service.ts:14
Type declaration
▸(aKey: string
): AnyJson
Parameters:
Param | Type |
---|---|
aKey | string |
Returns: AnyJson
put
● put: function
Implementation of ClientStorage.put
Defined in storage/storage.service.ts:15
Type declaration
▸(aKey: string
, aValue: AnyJson): void
Parameters:
Param | Type |
---|---|
aKey | string |
aValue | AnyJson |
Returns: void
@ibm-wch-sdk/utils > "wch/wch.service" > InternalWchService
Class: InternalWchService
Hierarchy
InternalWchService
Index
Constructors
Properties
- createPollingTrigger
- dispose
- getApiUrl
- getCorsWhitelist
- getDeliverOrigin
- getDeliveryUrl
- getJsonResource
- getRenderingContextById
- getRenderingContextByPage
- getRenderingContextByPath
- getRenderingContextByUrlSegments
- getRenderingContextForAppConfig
- getRenderingContextsByQuery
- getSitePagesByQuery
- getTextResource
- isPreviewMode
- resolveRenderingContext
- triggerRefresh
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:
Param | Type |
---|---|
aHttp | HttpService |
aJsonp | HttpService |
wchConfig | HubInfoConfig |
aUrlService | UrlConfig |
clientStorage | ClientStorage |
usePublicUrl | Observable <boolean > |
Optional aLogger | Logger |
Returns: InternalWchService
Properties
<Protected>
createPollingTrigger
● createPollingTrigger: function
Defined in wch/wch.service.ts:224
Type declaration
▸(aOptions?: HttpResourceOptions
): Observable
<any
>
Parameters:
Param | Type |
---|---|
Optional aOptions | HttpResourceOptions |
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:
Param | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
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:
Param | Type |
---|---|
aID | string | null | undefined |
Optional aLevels | number |
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:
Param | Type |
---|---|
aPage | SitePage |
Optional aLevels | number |
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:
Param | Type |
---|---|
aPath | string |
Optional aLevels | number |
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:
Param | Type |
---|---|
aSegments | string [] |
Optional aLevels | number |
Returns: Observable
< RenderingContext
| null
| undefined
>
getRenderingContextForAppConfig
● getRenderingContextForAppConfig: function
Defined in wch/wch.service.ts:201
Type declaration
▸(aLevels?: number
): Observable
<RenderingContext
>
Parameters:
Param | Type |
---|---|
Optional aLevels | number |
Returns: Observable
<RenderingContext
>
getRenderingContextsByQuery
● getRenderingContextsByQuery: function
Defined in wch/wch.service.ts:204
Type declaration
▸(aQuery: string
, aLevels?: number
): Observable
<RenderingContextQueryResult
>
Parameters:
Param | Type |
---|---|
aQuery | string |
Optional aLevels | number |
Returns: Observable
<RenderingContextQueryResult
>
getSitePagesByQuery
● getSitePagesByQuery: function
Defined in wch/wch.service.ts:208
Type declaration
▸(aQuery: string
): Observable
<SitePagesQueryResult
>
Parameters:
Param | Type |
---|---|
aQuery | string |
Returns: Observable
<SitePagesQueryResult
>
getTextResource
● getTextResource: function
Defined in wch/wch.service.ts:214
Type declaration
▸(aUrl: string
, aOptions?: HttpResourceOptions
): Observable
<string
>
Parameters:
Param | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
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:
Param | Type |
---|---|
Optional aRenderingContext | RenderingContext |
Optional aStrategy | CYCLE_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
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago