Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

ibm-wch-sdk-ng

5.0.361 • Public • Published

IBM Angular SDK for Watston Content Hub

NPM version

This module represents a software development kit (SDK) that can be used by Angular 4 based applications to build single page applications (SPA) against Watson Content Hub (WCH) managed pages.

Changes

CHANGELOG

Usage

npm install --save ibm-wch-sdk-ng

Class documentation

Refer to the documentation.

Components

The SDK defines one top level module module for use in the application component.

imports[
    ...
    WchNgModule.forRoot({ apiUrl: new URL(apiUrl), deliveryUrl: new URL(deliveryUrl) })
    ...
]

First steps

Building an application for WCH involves a client side and a server side step. During the server side step you create your content in WCH. During the client side step you build your Angular 4 application that consumers the content.

Prerequisites

Server Side

Please refer to the Server Side Setup instructions.

Client Side

First install angular-cli using

npm install -g @angular/cli

Bootstrap your angular application

ng new PROJECT-NAME
cd PROJECT-NAME

Install the WCH SDK and its peer dependencies:

npm install --save ibm-wch-sdk-ng

Create angular components for the layouts defined during the server setup.

ng g component layouts/MY_COMPONENT

Add a layout selector to your component. The selector creates the connection between the layout identifier and the angular component. In addition it is convenient (but not required) to subclass your new component from AbstractRenderingComponent. Make the following changes to the MY_COMPONENT.ts file created in the step before:

import { LayoutComponent, AbstractRenderingComponent } from 'ibm-wch-sdk-ng';
 
@LayoutComponent({
  selector: ['MY_COMPONENT_SELECTOR']
})
@Component({
    ...
})
export class MyComponent extends AbstractRenderingComponent {
 
    constructor() {
        super();
    }
}

Make sure to add your new layout to the set of entry components of the main module, because the component will be instantiated dynamically:

@NgModule({
  ...
  entryComponents[MyComponent, ...],
  ...
})
export class AppModule {
}

You will typically run your application in local development mode, first. Configure it to use the WCH server and tenant of your choice as the backend service. Do this by adding the configured WchModule to the main application module. A convenient way to configure this module is via the environment config file. The CLI will automatically select the correct file depending on your development environment (e.g. dev vs. production).

import { WchModule } from 'ibm-wch-sdk-ng';
import { environment } from '../environments/environment';
...
@NgModule({
...
  imports[
    ...
    WchNgModule.forRoot(environment)
    ...
  ]
})
export class AppModule {
}

The content of the environment file for local development might look like this:

const HOSTNAME = 'dch-dxcloud.rtp.raleigh.ibm.com';
const TENANT_ID = '7576818c-ca11-4b86-b03d-333313c4f0ad';
export const apiUrl = `http://${HOSTNAME}/api/${TENANT_ID}`;
export const deliveryUrl = `http://${HOSTNAME}/${TENANT_ID}`;
 
export const environment = {
  production: false,
  apiUrl: new URL(apiUrl),
  deliveryUrl: new URL(deliveryUrl)
};

In a last step you'll add routing to the application. The easiest way is to configure all routes to be served by WCH pages. For this create the following router config and add it to your main application module:

import { PageComponent } from 'ibm-wch-sdk-ng';
...
import { RouterModule, Routes } from '@angular/router';
...
 
const appRoutes: Routes = [
  {
    path: '',
    redirectTo: '/home',
    pathMatch: 'full'
  },
  {
    path: '**',
    component: PageComponent
  }
];
 
@NgModule({
    ...
  imports[
    RouterModule.forRoot(appRoutes),
    ...
  ]
})
export class AppModule {
}
 

Start your local development server and enjoy:

ng serve

Note

Using the development version of the NPM registry

Add the file .npmrc to your application folder:

registry = http://wats-repob.devlab.ibm.com
@request:registry=https://registry.npmjs.org/
@types:registry=https://registry.npmjs.org/
@angular:registry=https://registry.npmjs.org/
@ngtools:registry=https://registry.npmjs.org/

Changelog

Current

5.0.107 - 2018-02-28

Breaking Changes

  • Renamed ContentWithLayout to ContentItemWithLayout.

Changed

  • Split the module into the API module ibm-wch-sdk-api and the implementation module ibm-wch-sdk-ng. No breaking change expected, since the API is re-exported by the implementation module. I recommend however to reference the exports from the API module rather than those from the implementation module.

1.0.830 - 2018-01-16

Added

  • New SearchService
  • New luceneEscapeTerm and luceneEscapeKeyValue methods to simplify the generation of search queries
  • Support for optionselection elements

Changed

  • Updated HTTP transport layer from deprecated Http to HttpClient. Requires minimum angular dependency of 4.3.0.

1.0.771 - 2018-01-16

Added

  • New WchLoggerService
  • New WchInfoService
  • Adding describeSetter in 'AbstractLifeCycleComponent'
  • Basic support for new [wchEditable] directive
  • Support for levels parameter in wch-contentref

Fixed

  • Compatibility to Angular 5

ibm-wch-sdk-ng

Index

External modules


WchNgModule

The main SDK module exposes the components and services to be used by the application. Have a look at development stories for an explanation of usecases.

Usage

imports[
    ...
    WchNgModule.forRoot({ apiUrl: new URL(apiUrl), deliveryUrl: new URL(deliveryUrl) })
    ...
]

Add the module to your main application module using the forRoot accessor method. The context passed to the accessor defines the entry URLs into WCH.

Tipps

For your convenience you can also keep the URLs as part of the environment properties. In this case pass the environment directly to the forRoot method and declare the urls as part of the environment object, e.g.

import { environment } from '../environments/environment';
...
  imports[
    ...
    WchNgModule.forRoot(environment)
  ],

with an environment properties file like this:

export const environment = {
  production: false,
  apiUrl: new URL(apiUrl),
  deliveryUrl: new URL(deliveryUrl)
};

Developing modules based on the SDK

When developing modules that use the SDK, make sure to import the WchNgComponentsModule to have access to the components and directives exposed by the SDK.

LayoutDecorator

The layout decorator allow to assign a layout name to a component.

Usage

@LayoutComponent({
  selector: 'one-column'
})
@Component({
  selector: 'app-one-column',
  ...
})
export class OneColumnComponent extends AbstractRenderingComponent implements OnInit, OnDestroy {
 

or

@LayoutComponent()
@Component({
  selector: 'app-one-column',
  ...
})
export class OneColumnComponent extends AbstractRenderingComponent implements OnInit, OnDestroy {
 

Properties

  • selector: the name of the layout. This matches the controller field in the layout descriptor. If this property is missing, then the selector of the component will be used as a fallback. The type of this field can be string or string[]. In the array form, all selectors in the array will be associated with the component.
  • mappingId?: the optional mapping ID defines a fallback layout mapping, if no layout could be determined via WCH configuration. The ID carries either a content ID, a type ID or a type name.
  • layoutMode?: the optional layout mode defines the mode that the fallback mapping applies to.

Note

You can leave out the selector property on the LayoutComponent decorator. In this case the selector of the Component will be used as the name of the layout.

LayoutMappingDecorator

The layout mapping decorator allows to register fallback layout mappings as decorations of a class.

Parameters

  • id: defines a fallback layout mapping, if no layout could be determined via WCH configuration. The ID carries either a content ID, a type ID or a type name.
  • selector: the selector of the layout, either a string or a type. If the selector is missing, we use the attached class
  • layoutMode?: the optional layout mode defines the mode that the fallback mapping applies to.

Usage

The following example maps an ID of a content item to the HeroGridComponent layout in the default layout mode:

  @LayoutMapping('e2ab99d1-9f9c-49a3-a80e-ec45c7748820', HeroGridComponent)
  class ...

RenderingContextBinding

The context binding allows to attach a property of the rendering context to an instance variable of the component. This will often improve the readability of the template.

Usage

@LayoutComponent(...)
@Component(...)
export class OneColumnComponent extends AbstractRenderingComponent {
 
  @RenderingContextBinding('elements.text.value', 'defaultValue')
  textValue: string;
}

Properties

  • selector: the selector is a simple dot notation expresssion for the desired property, relative to the rendering context. Note that this does NOT support array expressions (yet). Optionally you may also pass a function that takes a rendering context as input and returns the desired value.
  • default: an optional default value that will be used if the rendering context does not contain the element

Note

The binding assumes the existence of a onRenderingContext observable on the class. This is automatically the case if the class inherits from AbstractRenderingComponent.

AbstractRenderingComponent

Component that can be used as a super class for custom components such as layouts. The component exposes a setter for the RenderingContext in a format that is expected by the ContentrefComponent.

Attributes

  • renderingContext: the current rendering context
  • layoutMode: the current layout mode

Methods

  • trackByComponentId: method to be used with the *ngFor directive when iterating over RenderingContext references. The method returns the ID of the rendering context, allowing Angular to correlate updates of the list.

Events

  • onRenderingContext: fires when the rendering context changes
  • onLayoutMode: fires when the layout mode changes

Both the onRenderingContext and the onLayoutMode observables will complete when the component is destroyed (i.e. in the course of processing the ngOnDestroy method). This implies that subscribers attached to theses observables do NOT need to unsubscribe explicitly, if they wish their subscription to last for the duration of the lifetime of the component (see section Subscribing and Unsubscribing in the observable contract).

AbstractLifeCycleComponent

Component that offers observables that will be fired when one of the lifecycle methods is invoked. This can be used as an alternative to override the respective method on the class. The mechanism is useful because:

  • the observables can already be accessed in the constructor of the components and can reference variables in the private closure of the constructor
  • it is a common pattern to setup observable chains in the constructor and to subscribe to them to keep application state up-to-date. These subscriptions however must be unsubscribed on in the ngOnDestroy method to avoid memory leaks. Using a life cycle callback this can be easily done inside the constructor.

Methods

  • ngXXX: the original life cycle method exposed by Angular. Subclasses that want to override these methods MUST call the super method.
  • onXXX: getter for an observable for this lifecycle method.
  • unsubscribeOnDestroy(subscription): registers a subscription to be unsubscribed for in ngOnDestroy
  • safeSubscribe(observable, handler): subscribes to an observable and registers the resulting subscription with ngOnDestroy. This is the most convenient way to handle subscriptions.

PageComponent

The page component resolves the current route to the component (or page) that is associated to this route in WCH. It can therefore be considered a proxy component that decouples the application at build time from the runtime artifacts.

Usage

The component does not require any specific configuration, it attaches itself to the routing logic via dependency injection.

Usage in HTML:

<wch-page></wch-page>

Usage in the router config:

const appRoutes: Routes = [
  {
    path: '**',
    component: PageComponent
  }
];

Attributes

  • layoutMode: optionally pass the layout mode to be used when rendering the page. If not specified, the system uses the default mode.

Events

  • onRenderingContext: the rendering context for the page as soon as it has been loaded
  • onLayoutMode: the layout mode used to render this page.

Error handling

If the page cannot be decoded, the system will look for a component mapped to the PAGE_NOT_FOUND_LAYOUT layout and instantiates this with an empty rendering context.

WCH Dependency

The page component uses the URL Slug managed in WCH with each page to decode the targeted page. The URL slugs form a hierarchical namespace that matches the URL namespace of the SPA. The component uses the url property of the ActivatedRoute. This property represents the sequence of path segments that will be matched against the defined URL slugs. The component will NOT interpret the parent router, so the SPA can decide to mount the WCH namespace at any location within its own namespace. ibm-wch-sdk-ng > "components/content/content.component"

External module: "components/content/content.component"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "ContentComponent" = "ContentComponent"

Defined in components/content/content.component.ts:28


ibm-wch-sdk-ng > "components/contentquery/contentquery.component"

External module: "components/contentquery/contentquery.component"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "ContentQueryComponent" = "ContentQueryComponent"

Defined in components/contentquery/contentquery.component.ts:31


ibm-wch-sdk-ng > "components/contentref/contentref.component"

External module: "components/contentref/contentref.component"

Index

Classes

Interfaces

Variables

Functions

Object literals


Variables

<Const> EMPTY_COMPONENT_OUTPUT

● EMPTY_COMPONENT_OUTPUT: Observable<ComponentOutput> = empty()

Defined in components/contentref/contentref.component.ts:90


<Const> KEY_ON_COMPONENT_OUTPUT

● KEY_ON_COMPONENT_OUTPUT: "onComponentOutput" = "onComponentOutput"

Defined in components/contentref/contentref.component.ts:56


<Const> LOGGER

● LOGGER: "ContentrefComponent" = "ContentrefComponent"

Defined in components/contentref/contentref.component.ts:51


<Const> opComponentInstance

● opComponentInstance: function = typedPluck<ComponentRef, any>('instance')

Defined in components/contentref/contentref.component.ts:210

Operator to extract the component instance from a component ref

Type declaration

▸(source: Observable<T>): Observable<T[K]>

Parameters:

Param Type
source Observable<T>

Returns: Observable<T[K]>


Functions

_getComponentFactoryResolver

_getComponentFactoryResolver(aConfig?: Route): ComponentFactoryResolver

Defined in components/contentref/contentref.component.ts:212

Parameters:

Param Type
Optional aConfig Route

Returns: ComponentFactoryResolver


_mergeOutputs

_mergeOutputs(aLayoutMode: string, aRenderingContext: RenderingContext, aComponentRef: ComponentRef<any>, aComponentFactory: ComponentFactory<any>): Observable<ComponentOutput>

Defined in components/contentref/contentref.component.ts:102

Parameters:

Param Type
aLayoutMode string
aRenderingContext RenderingContext
aComponentRef ComponentRef<any>
aComponentFactory ComponentFactory<any>

Returns: Observable<ComponentOutput>


getType

getType(aId: string, aLayoutMode: * string | undefined*, aRenderingContext: RenderingContext, aCmp: ComponentsService, aMapping: LayoutMappingService): Observable<Type<any>>

Defined in components/contentref/contentref.component.ts:162

Parameters:

Param Type
aId string
aLayoutMode string | undefined
aRenderingContext RenderingContext
aCmp ComponentsService
aMapping LayoutMappingService

Returns: Observable<Type<any>>


updateContext

updateContext(aLayoutMode: string, aRenderingContext: RenderingContext, aComponentRef: ComponentRef<any>): void

Defined in components/contentref/contentref.component.ts:186

Parameters:

Param Type
aLayoutMode string
aRenderingContext RenderingContext
aComponentRef ComponentRef<any>

Returns: void


Object literals

<Const> LAYOUT_NOT_FOUND_LAYOUT

LAYOUT_NOT_FOUND_LAYOUT: object

Defined in components/contentref/contentref.component.ts:54

template

● template: string = ComponentsService.DEFAULT_LAYOUT

Defined in components/contentref/contentref.component.ts:54


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in components/contentref/contentref.component.ts:54



<Const> PAGE_NOT_FOUND_LAYOUT

PAGE_NOT_FOUND_LAYOUT: object

Defined in components/contentref/contentref.component.ts:53

template

● template: string = ComponentsService.PAGE_NOT_FOUND_LAYOUT

Defined in components/contentref/contentref.component.ts:53


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in components/contentref/contentref.component.ts:53



ibm-wch-sdk-ng > "components/default/default.component"

External module: "components/default/default.component"

Index

Classes


ibm-wch-sdk-ng > "components/page/page.component"

External module: "components/page/page.component"

Index

Classes

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "PageComponent" = "PageComponent"

Defined in components/page/page.component.ts:17


<Const> _EMPTY_VALUE

● _EMPTY_VALUE: &quot;&quot; = ""

Defined in components/page/page.component.ts:21


<Const> _META_NAME_DESCRIPTION

● _META_NAME_DESCRIPTION: "description" = "description"

Defined in components/page/page.component.ts:20


<Const> _META_NAME_ID

● _META_NAME_ID: "id" = "id"

Defined in components/page/page.component.ts:19


Functions

_boxValue

_boxValue(aValue?: string): string

Defined in components/page/page.component.ts:28

Parameters:

Param Type
Optional aValue string

Returns: string


_getDescription

_getDescription(aSitePage: SitePage, aRenderingContext: RenderingContext): string

Defined in components/page/page.component.ts:81

Parameters:

Param Type
aSitePage SitePage
aRenderingContext RenderingContext

Returns: string


_getTitle

_getTitle(aSitePage: SitePage, aRenderingContext: RenderingContext): string

Defined in components/page/page.component.ts:63

Parameters:

Param Type
aSitePage SitePage
aRenderingContext RenderingContext

Returns: string


_setMetaTag

_setMetaTag(aMetaService: Meta, aId: string, aValue?: string): void

Defined in components/page/page.component.ts:39

Parameters:

Param Type
aMetaService Meta
aId string
Optional aValue string

Returns: void


_setTitleTag

_setTitleTag(aTitle: Title, aValue?: string): void

Defined in components/page/page.component.ts:50

Parameters:

Param Type
aTitle Title
Optional aValue string

Returns: void


_updateMetaData

_updateMetaData(aContext: RenderingContext, aTitleService: Title, aMetaService: Meta): void

Defined in components/page/page.component.ts:96

Parameters:

Param Type
aContext RenderingContext
aTitleService Title
aMetaService Meta

Returns: void


ibm-wch-sdk-ng > "components/pageref/pageref.component"

External module: "components/pageref/pageref.component"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "PagerefComponent" = "PagerefComponent"

Defined in components/pageref/pageref.component.ts:28


ibm-wch-sdk-ng > "components/path/content.path.component"

External module: "components/path/content.path.component"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "ContentPathComponent" = "ContentPathComponent"

Defined in components/path/content.path.component.ts:20


ibm-wch-sdk-ng > "components/rendering/abstract-base.component"

External module: "components/rendering/abstract-base.component"

Index

Classes

Variables


Variables

<Let> ID

● ID: number = 0

Defined in components/rendering/abstract-base.component.ts:16


<Const> LOGGER

● LOGGER: "AbstractBaseComponent" = "AbstractBaseComponent"

Defined in components/rendering/abstract-base.component.ts:14


ibm-wch-sdk-ng > "components/rendering/abstract-rendering.component"

External module: "components/rendering/abstract-rendering.component"

Index

Classes

Variables


Variables

<Let> ID

● ID: number = 0

Defined in components/rendering/abstract-rendering.component.ts:20


<Const> LOGGER

● LOGGER: "AbstractRenderingComponent" = "AbstractRenderingComponent"

Defined in components/rendering/abstract-rendering.component.ts:18


ibm-wch-sdk-ng > "components/rendering/abstract.lifecycle.component"

External module: "components/rendering/abstract.lifecycle.component"

Index

Classes

Type aliases

Variables

Functions


Type aliases

Registry

Ƭ Registry: any[][]

Defined in components/rendering/abstract.lifecycle.component.ts:47


Variables

<Const> FIELD_CALLBACKS

● FIELD_CALLBACKS: 1 = 1

Defined in components/rendering/abstract.lifecycle.component.ts:44


<Const> FIELD_OBSERVABLE

● FIELD_OBSERVABLE: 2 = 2

Defined in components/rendering/abstract.lifecycle.component.ts:45


<Const> HOOK_AFTERCONTENTCHECKED

● HOOK_AFTERCONTENTCHECKED: 2 = 2

Defined in components/rendering/abstract.lifecycle.component.ts:37


<Const> HOOK_AFTERCONTENTINIT

● HOOK_AFTERCONTENTINIT: 3 = 3

Defined in components/rendering/abstract.lifecycle.component.ts:38


<Const> HOOK_AFTERVIEWCHECKED

● HOOK_AFTERVIEWCHECKED: 0 = 0

Defined in components/rendering/abstract.lifecycle.component.ts:35


<Const> HOOK_AFTERVIEWINIT

● HOOK_AFTERVIEWINIT: 1 = 1

Defined in components/rendering/abstract.lifecycle.component.ts:36


<Const> HOOK_CHANGES

● HOOK_CHANGES: 6 = 6

Defined in components/rendering/abstract.lifecycle.component.ts:41


<Const> HOOK_DESTROY

● HOOK_DESTROY: 7 = 7

Defined in components/rendering/abstract.lifecycle.component.ts:42


<Const> HOOK_DOCHECK

● HOOK_DOCHECK: 4 = 4

Defined in components/rendering/abstract.lifecycle.component.ts:39


<Const> HOOK_INIT

● HOOK_INIT: 5 = 5

Defined in components/rendering/abstract.lifecycle.component.ts:40


<Const> KEY_REGISTRY

● KEY_REGISTRY: unique symbol = Symbol()

Defined in components/rendering/abstract.lifecycle.component.ts:50


<Const> _Subject

● _Subject: Subject = Subject

Defined in components/rendering/abstract.lifecycle.component.ts:30


Functions

_addHook

_addHook(aHookIdentifier: number, aThis: AbstractLifeCycleComponent, aHook: Function): void

Defined in components/rendering/abstract.lifecycle.component.ts:132

Parameters:

Param Type
aHookIdentifier number
aThis AbstractLifeCycleComponent
aHook Function

Returns: void


_assertCallbacks

_assertCallbacks(aHook: any[]): Function[]

Defined in components/rendering/abstract.lifecycle.component.ts:79

Parameters:

Param Type
aHook any[]

Returns: Function[]


_assertHook

_assertHook(aHookIdentifier: number, aThis: AbstractLifeCycleComponent): any[]

Defined in components/rendering/abstract.lifecycle.component.ts:68

Parameters:

Param Type
aHookIdentifier number
aThis AbstractLifeCycleComponent

Returns: any[]


_createObservable

_createObservable(aHookIdentifier: number, aHook: any[], aThis: AbstractLifeCycleComponent): Observable<any>

Defined in components/rendering/abstract.lifecycle.component.ts:92

Parameters:

Param Type
aHookIdentifier number
aHook any[]
aThis AbstractLifeCycleComponent

Returns: Observable<any>


_getObservable

_getObservable(aHookIdentifier: number, aThis: AbstractLifeCycleComponent): Observable<any>

Defined in components/rendering/abstract.lifecycle.component.ts:122

Parameters:

Param Type
aHookIdentifier number
aThis AbstractLifeCycleComponent

Returns: Observable<any>


_invokeHooks

_invokeHooks(aHookIdentifier: number, aThis: AbstractLifeCycleComponent, aArgs: IArguments): void

Defined in components/rendering/abstract.lifecycle.component.ts:145

Parameters:

Param Type
aHookIdentifier number
aThis AbstractLifeCycleComponent
aArgs IArguments

Returns: void


_removeRegistry

_removeRegistry(aThis: AbstractLifeCycleComponent): void

Defined in components/rendering/abstract.lifecycle.component.ts:57

Parameters:

Param Type
aThis AbstractLifeCycleComponent

Returns: void


createGetter

createGetter<T>(aObservable: Observable<T>, aThis: AbstractLifeCycleComponent, aInitial?: T): PropertyDescriptor

Defined in components/rendering/abstract.lifecycle.component.ts:406

Constructs a getter that subscribes to a value

Type parameters:

T

Parameters:

Param Type Description
aObservable Observable<T> the observable
aThis AbstractLifeCycleComponent the component
Optional aInitial T the optional initial value

Returns: PropertyDescriptor the descriptor


createSetter

createSetter<T>(aSubject: Subject<T>, aThis: AbstractLifeCycleComponent): PropertyDescriptor

Defined in components/rendering/abstract.lifecycle.component.ts:390

Constructs a setter that is unregistered automatically in onDestroy

Type parameters:

T

Parameters:

Param Type Description
aSubject Subject<T> the subject
aThis AbstractLifeCycleComponent the component

Returns: PropertyDescriptor the descriptor


ibm-wch-sdk-ng > "components/site/site.component"

External module: "components/site/site.component"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SiteComponent" = "SiteComponent"

Defined in components/site/site.component.ts:12


ibm-wch-sdk-ng > "decorators/bootstrap/rendering.context.bootstrap.decorator"

External module: "decorators/bootstrap/rendering.context.bootstrap.decorator"

Index

Functions


Functions

ContentWithLayoutBootstrap

ContentWithLayoutBootstrap(aDirective?: ContentWithLayoutBootstrapDirective): function

Defined in decorators/bootstrap/rendering.context.bootstrap.decorator.ts:11

Parameters:

Param Type
Optional aDirective ContentWithLayoutBootstrapDirective

Returns: function


ibm-wch-sdk-ng > "decorators/bootstrap/rendering.context.bootstrap.directive"

External module: "decorators/bootstrap/rendering.context.bootstrap.directive"

Index

Interfaces


ibm-wch-sdk-ng > "decorators/bootstrap/site.bootstrap.decorator"

External module: "decorators/bootstrap/site.bootstrap.decorator"

Index

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "SiteBootstrap" = "SiteBootstrap"

Defined in decorators/bootstrap/site.bootstrap.decorator.ts:8


Functions

SiteBootstrap

SiteBootstrap(aDirective?: SiteBootstrapDirective): function

Defined in decorators/bootstrap/site.bootstrap.decorator.ts:15

Parameters:

Param Type
Optional aDirective SiteBootstrapDirective

Returns: function


ibm-wch-sdk-ng > "decorators/bootstrap/site.bootstrap.directive"

External module: "decorators/bootstrap/site.bootstrap.directive"

Index

Interfaces


ibm-wch-sdk-ng > "decorators/layout/layout.decorator"

External module: "decorators/layout/layout.decorator"

Index

Interfaces

Type aliases

Variables

Functions


Type aliases

ExpressionGetter

Ƭ ExpressionGetter: function

Defined in decorators/layout/layout.decorator.ts:309

Type declaration

▸(): string

Returns: string


Subscriptions

Ƭ Subscriptions: Subscription[]

Defined in decorators/layout/layout.decorator.ts:43


Variables

<Const> KEY_EXPRESSION

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

Defined in decorators/layout/layout.decorator.ts:41


<Const> KEY_OBSERVABLE_PREFIX

● KEY_OBSERVABLE_PREFIX: "on" = "on"

Defined in decorators/layout/layout.decorator.ts:36


<Const> KEY_ON_DESTROY

● KEY_ON_DESTROY: "ngOnDestroy" = "ngOnDestroy"

Defined in decorators/layout/layout.decorator.ts:37


<Const> KEY_SUBSCRIPTIONS

● KEY_SUBSCRIPTIONS: unique symbol = Symbol()

Defined in decorators/layout/layout.decorator.ts:38


<Const> LOGGER

● LOGGER: "LayoutDecorator" = "LayoutDecorator"

Defined in decorators/layout/layout.decorator.ts:33


<Const> UNDEFINED_RENDERING_CONTEXT_SUBJECT

● UNDEFINED_RENDERING_CONTEXT_SUBJECT: BehaviorSubject<RenderingContext> = new _BehaviorSubject(UNDEFINED_RENDERING_CONTEXT)

Defined in decorators/layout/layout.decorator.ts:143


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

Defined in decorators/layout/layout.decorator.ts:34


<Const> _SYMBOLS

● _SYMBOLS: Symbols

Defined in decorators/layout/layout.decorator.ts:56


<Const> _expressionCache

● _expressionCache: object

Defined in decorators/layout/layout.decorator.ts:71

Type declaration


Functions

LayoutComponent

LayoutComponent(aDirective?: LayoutComponentDirective): function

Defined in decorators/layout/layout.decorator.ts:459

Parameters:

Param Type
Optional aDirective LayoutComponentDirective

Returns: function


LayoutMapping

LayoutMapping(aID: * string | string[], aSelector?: * string | string[] | Type<any>, aLayoutMode?: * string | string[]*): function

Defined in decorators/layout/layout.decorator.ts:499

Parameters:

Param Type
aID string | string[]
Optional aSelector string | string[] | Type<any>
Optional aLayoutMode string | string[]

Returns: function


RenderingContextBinding

RenderingContextBinding<T>(aBinding?: * string | RenderingContextDirective<T>*, aDefault?: T): function

Defined in decorators/layout/layout.decorator.ts:485

Type parameters:

T

Parameters:

Param Type
Optional aBinding string | RenderingContextDirective<T>
Optional aDefault T

Returns: function


_assertBinding

_assertBinding<T>(aInstance: any, aSymbol: symbol, aName: string): Binding<T>

Defined in decorators/layout/layout.decorator.ts:138

Makes sure we have a binding

Type parameters:

T

Parameters:

Param Type Description
aInstance any the instance to attach the binding to
aSymbol symbol the symbol
aName string name of the object

Returns: Binding<T> the binding


_baseExpressionFromObservableExpression

_baseExpressionFromObservableExpression(aKey: string): string

Defined in decorators/layout/layout.decorator.ts:294

Parameters:

Param Type
aKey string

Returns: string


_getExpressionFromDescriptor

_getExpressionFromDescriptor(aPrototype: any, aOtherKey: string): string | null | undefined

Defined in decorators/layout/layout.decorator.ts:319

Returns an expression from its descriptor

Parameters:

Param Type Description
aPrototype any the prototype
aOtherKey string the key

Returns: string | null | undefined

the expression, null if no expression exists and undefined if we need to fallback


_getExpressionFromPrototype

_getExpressionFromPrototype(aPrototype: any, aOtherKey: string): string | null | undefined

Defined in decorators/layout/layout.decorator.ts:345

Checks if we can find an expression from the other property

Parameters:

Param Type Description
aPrototype any the prototype
aOtherKey string the other key

Returns: string | null | undefined

the expression, null if no expression exists and undefined if we need to fallback


_getExpressionGetter

_getExpressionGetter(aPrototype: any, aExpression: * string | null | undefined*, aKey: string, aOtherKey: string): ExpressionGetter

Defined in decorators/layout/layout.decorator.ts:370

Returns a getter method that computes the expression associated with a property

Parameters:

Param Type Description
aPrototype any current prototype
aExpression string | null | undefined the expression, may be null or undefined
aKey string
aOtherKey string the alternative key

Returns: ExpressionGetter the getter. The getter returns the expression or null


_getObservableExpression

_getObservableExpression<T>(aInstance: any, aSymbol: symbol, aName: string, aHandler: RenderingContextDirective<T>): Observable<T>

Defined in decorators/layout/layout.decorator.ts:167

Type parameters:

T

Parameters:

Param Type
aInstance any
aSymbol symbol
aName string
aHandler RenderingContextDirective<T>

Returns: Observable<T>


_getOnRenderingContext

_getOnRenderingContext(aInstance: any): Observable<RenderingContext>

Defined in decorators/layout/layout.decorator.ts:145

Parameters:

Param Type
aInstance any

Returns: Observable<RenderingContext>


_getResolvedExpression

_getResolvedExpression<T>(aInstance: any, aSymbol: symbol, aBaseName: string, aObserableName: string, aHandler?: RenderingContextDirective<T>): T

Defined in decorators/layout/layout.decorator.ts:229

Type parameters:

T

Parameters:

Param Type
aInstance any
aSymbol symbol
aBaseName string
aObserableName string
Optional aHandler RenderingContextDirective<T>

Returns: T


_getSymbol

_getSymbol(aName: string): symbol

Defined in decorators/layout/layout.decorator.ts:64

Parameters:

Param Type
aName string

Returns: symbol


_isObservableExpression

_isObservableExpression(aKey: string): boolean

Defined in decorators/layout/layout.decorator.ts:280

Parameters:

Param Type
aKey string

Returns: boolean


_isUpperCase

_isUpperCase(aValue: string): boolean

Defined in decorators/layout/layout.decorator.ts:270

Parameters:

Param Type
aValue string

Returns: boolean


_observableExpressionFromBaseExpression

_observableExpressionFromBaseExpression(aKey: string): string

Defined in decorators/layout/layout.decorator.ts:304

Parameters:

Param Type
aKey string

Returns: string


_parseExpression

_parseExpression(aExpression: string): RenderingContextDirective<any>

Defined in decorators/layout/layout.decorator.ts:79

Parameters:

Param Type
aExpression string

Returns: RenderingContextDirective<any>


_registerExpression

_registerExpression<T>(aPrototype: any, aPropertyKey: string, aExpression: string, aDefault?: T): void

Defined in decorators/layout/layout.decorator.ts:124

Type parameters:

T

Parameters:

Param Type
aPrototype any
aPropertyKey string
aExpression string
Optional aDefault T

Returns: void


_registerRenderingContextDirective

_registerRenderingContextDirective<T>(aPrototype: any, aPropertyKey: string, aExpression: * string | null*, aHandler?: RenderingContextDirective<T>, aDefault?: T): void

Defined in decorators/layout/layout.decorator.ts:402

Type parameters:

T

Parameters:

Param Type
aPrototype any
aPropertyKey string
aExpression string | null
Optional aHandler RenderingContextDirective<T>
Optional aDefault T

Returns: void


_registerSubscription

_registerSubscription(aInstance: any, aSubscription: Subscription): void

Defined in decorators/layout/layout.decorator.ts:195

Parameters:

Param Type
aInstance any
aSubscription Subscription

Returns: void


ibm-wch-sdk-ng > "decorators/layout/layout.directive"

External module: "decorators/layout/layout.directive"

Index

Interfaces

Type aliases


Type aliases

RenderingContextDirective

Ƭ RenderingContextDirective: function

Defined in decorators/layout/layout.directive.ts:31

Type declaration

▸(ctx: RenderingContext): T

Parameters:

Param Type
ctx RenderingContext

Returns: T


ibm-wch-sdk-ng > "directives/contentref.directive"

External module: "directives/contentref.directive"

Index

Classes


ibm-wch-sdk-ng > "index"

External module: "index"

Index


ibm-wch-sdk-ng > "interfaces"

External module: "interfaces"

Index


ibm-wch-sdk-ng > "interfaces/hub-context"

External module: "interfaces/hub-context"

Index

Interfaces


ibm-wch-sdk-ng > "internal/assert"

External module: "internal/assert"

Index

Variables

Functions


Variables

<Let> DEV_MODE_ENABLED

● DEV_MODE_ENABLED: boolean = true

Defined in internal/assert.ts:11


<Const> DEV_MODE_SUBJECT

● DEV_MODE_SUBJECT: BehaviorSubject<boolean> = new _BehaviorSubject(DEV_MODE_ENABLED)

Defined in internal/assert.ts:16


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

Defined in internal/assert.ts:6


Functions

assertDefined

assertDefined(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:79

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertDependency

assertDependency(aValue: any, aName: string): void

Defined in internal/assert.ts:31

Parameters:

Param Type
aValue any
aName string

Returns: void


assertIsArray

assertIsArray(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:61

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertIsFunction

assertIsFunction(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:49

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertIsObservable

assertIsObservable(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:37

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertIsPlainObject

assertIsPlainObject(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:43

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertIsString

assertIsString(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:55

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertNil

assertNil(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:67

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertNotNil

assertNotNil(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:73

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertNull

assertNull(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:91

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertTrue

assertTrue(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:97

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


assertUndefined

assertUndefined(aValue: any, aMessage?: string): void

Defined in internal/assert.ts:85

Parameters:

Param Type
aValue any
Optional aMessage string

Returns: void


isAssertOn

isAssertOn(): boolean

Defined in internal/assert.ts:27

Returns: boolean


isDevModeOn

isDevModeOn(): boolean

Defined in internal/assert.ts:23

Returns: boolean


ibm-wch-sdk-ng > "module"

External module: "module"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "WchNgModule" = "WchNgModule"

Defined in module.ts:24


ibm-wch-sdk-ng > "modules/components.module"

External module: "modules/components.module"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "WchNgComponentsModule" = "WchNgComponentsModule"

Defined in modules/components.module.ts:16


ibm-wch-sdk-ng > "modules/services.module"

External module: "modules/services.module"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "WchNgServicesModule" = "WchNgServicesModule"

Defined in modules/services.module.ts:40


ibm-wch-sdk-ng > "services/bootstrap/bootstrap.service"

External module: "services/bootstrap/bootstrap.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "BootstrapService" = "BootstrapService"

Defined in services/bootstrap/bootstrap.service.ts:16


ibm-wch-sdk-ng > "services/components/components.service"

External module: "services/components/components.service"

Index

Classes

Interfaces

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "ComponentsService" = "ComponentsService"

Defined in services/components/components.service.ts:20


<Const> NO_TYPE

● NO_TYPE: Observable<Type<any>> = empty<Type>()

Defined in services/components/components.service.ts:27


<Const> _DEFAULT_LAYOUT

● _DEFAULT_LAYOUT: "wch-default-layout" = "wch-default-layout"

Defined in services/components/components.service.ts:23


<Const> _PAGE_NOT_FOUND_LAYOUT

● _PAGE_NOT_FOUND_LAYOUT: "wch-404" = "wch-404"

Defined in services/components/components.service.ts:25


Functions

_createMappingEntry

_createMappingEntry(aKey: string): MappingEntry

Defined in services/components/components.service.ts:54

Constructs an entry in the mapping table

Parameters:

Param Type Description
aKey string the layout key

Returns: MappingEntry the entry


_getEntry

_getEntry(aController: string, aMap: Mapping): MappingEntry

Defined in services/components/components.service.ts:109

Makes sure to get a subject

Parameters:

Param Type Description
aController string the controller ID
aMap Mapping the mapping

Returns: MappingEntry the subject


_getSelectors

_getSelectors(aComponent: RegisteredComponent): string[]

Defined in services/components/components.service.ts:69

Parameters:

Param Type
aComponent RegisteredComponent

Returns: string[]


_getTypeByLayout

_getTypeByLayout(aLayout: Layout, aMapping: Mapping, aMarkupService: MarkupService): Observable<Type<any>>

Defined in services/components/components.service.ts:154

Parameters:

Param Type
aLayout Layout
aMapping Mapping
aMarkupService MarkupService

Returns: Observable<Type<any>>


_getTypeBySelector

_getTypeBySelector(aSelector: string, aMapping: Mapping): Observable<Type<any>>

Defined in services/components/components.service.ts:141

Parameters:

Param Type
aSelector string
aMapping Mapping

Returns: Observable<Type<any>>


_getTypeByTemplateType

_getTypeByTemplateType(aType: string, aMarkupService: MarkupService): Observable<Type<any>>

Defined in services/components/components.service.ts:129

Parameters:

Param Type
aType string
aMarkupService MarkupService

Returns: Observable<Type<any>>


_getTypeName

_getTypeName(aType: Type<any>): string

Defined in services/components/components.service.ts:44

Tries to decode the name from the type

Parameters:

Param Type Description
aType Type<any> the type

Returns: string the name


_onRegisterComponent

_onRegisterComponent(aController: string, aType: Type<any>, aMap: Mapping): void

Defined in services/components/components.service.ts:119

Parameters:

Param Type
aController string
aType Type<any>
aMap Mapping

Returns: void


_onRegisteredComponent

_onRegisteredComponent(aComponent: RegisteredComponent, aMap: Mapping): void

Defined in services/components/components.service.ts:85

Parameters:

Param Type
aComponent RegisteredComponent
aMap Mapping

Returns: void


ibm-wch-sdk-ng > "services/config/application.config"

External module: "services/config/application.config"

Index

Interfaces


ibm-wch-sdk-ng > "services/config/application.config.service"

External module: "services/config/application.config.service"

Index

Classes


ibm-wch-sdk-ng > "services/config/empty.application.config"

External module: "services/config/empty.application.config"

Index

Object literals


Object literals

<Const> EMPTY_APPLICATION_CONFIG

EMPTY_APPLICATION_CONFIG: object

Defined in services/config/empty.application.config.ts:4

classification

● classification: string = "content"

Defined in services/config/empty.application.config.ts:7


elements

● elements: object

Defined in services/config/empty.application.config.ts:10

Type declaration


id

● id: null = null

Defined in services/config/empty.application.config.ts:5


name

● name: null = null

Defined in services/config/empty.application.config.ts:6


type

● type: null = null

Defined in services/config/empty.application.config.ts:8


typeId

● typeId: null = null

Defined in services/config/empty.application.config.ts:9



ibm-wch-sdk-ng > "services/dependency/dependency.service"

External module: "services/dependency/dependency.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "DependencyService" = "DependencyService"

Defined in services/dependency/dependency.service.ts:16


ibm-wch-sdk-ng > "services/dependency/message"

External module: "services/dependency/message"

Index

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkMessages" = "SdkMessages"

Defined in services/dependency/message.ts:5


<Const> SDK_MESSAGE_HANDLER

● SDK_MESSAGE_HANDLER: InjectionToken<SdkMessageHandler> = new InjectionToken('SdkMessageHandler')

Defined in services/dependency/message.ts:8


ibm-wch-sdk-ng > "services/dependency/message/sdk.navigate.by.path.message"

External module: "services/dependency/message/sdk.navigate.by.path.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkNavigateByPathHandler" = "SdkNavigateByPathHandler"

Defined in services/dependency/message/sdk.navigate.by.path.message.ts:9


ibm-wch-sdk-ng > "services/dependency/message/sdk.refresh.message"

External module: "services/dependency/message/sdk.refresh.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkRefreshHandler" = "SdkRefreshHandler"

Defined in services/dependency/message/sdk.refresh.message.ts:9


ibm-wch-sdk-ng > "services/dependency/message/sdk.set.mode.message"

External module: "services/dependency/message/sdk.set.mode.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkSetModeHandler" = "SdkSetModeHandler"

Defined in services/dependency/message/sdk.set.mode.message.ts:9


ibm-wch-sdk-ng > "services/dependency/message/sdk.subscribe.active.route.message"

External module: "services/dependency/message/sdk.subscribe.active.route.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkSubscribeActiveRouteHandler" = "SdkSubscribeActiveRouteHandler"

Defined in services/dependency/message/sdk.subscribe.active.route.message.ts:9


ibm-wch-sdk-ng > "services/dependency/message/sdk.subscribe.message"

External module: "services/dependency/message/sdk.subscribe.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkUnsubscribeHandler" = "SdkUnsubscribeHandler"

Defined in services/dependency/message/sdk.subscribe.message.ts:8


ibm-wch-sdk-ng > "services/dependency/message/sdk.subscribe.mode.message"

External module: "services/dependency/message/sdk.subscribe.mode.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkSubscribeModeHandler" = "SdkSubscribeModeHandler"

Defined in services/dependency/message/sdk.subscribe.mode.message.ts:9


ibm-wch-sdk-ng > "services/dependency/message/sdk.subscribe.route.message"

External module: "services/dependency/message/sdk.subscribe.route.message"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkSubscribeRouteHandler" = "SdkSubscribeRouteHandler"

Defined in services/dependency/message/sdk.subscribe.route.message.ts:9


ibm-wch-sdk-ng > "services/dependency/sdk/jsonp/jsonp"

External module: "services/dependency/sdk/jsonp/jsonp"

Index

Classes

Interfaces

Type aliases

Variables

Functions


Type aliases

JsonpCallback

Ƭ JsonpCallback: Consumer<AnyJson>

Defined in services/dependency/sdk/jsonp/jsonp.ts:22


Variables

<Const> LOGGER

● LOGGER: "SdkJsonp" = "SdkJsonp"

Defined in services/dependency/sdk/jsonp/jsonp.ts:15


<Const> _digestCache

● _digestCache: function = createCache()

Defined in services/dependency/sdk/jsonp/jsonp.ts:31

Type declaration

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

Parameters:

Param Type
t1 T1
t2 T2

Returns: R


Functions

<Const> _createDigest

_createDigest(aToken: string): string

Defined in services/dependency/sdk/jsonp/jsonp.ts:39

Parameters:

Param Type
aToken string

Returns: string


<Const> _getHash

_getHash(aToken: string): string

Defined in services/dependency/sdk/jsonp/jsonp.ts:47

Parameters:

Param Type
aToken string

Returns: string


_registerCallback

_registerCallback(aApiRoot: string, aUrl: string, aCallback: JsonpCallback, aCallbacks: JsonpCallbacks): string

Defined in services/dependency/sdk/jsonp/jsonp.ts:57

Parameters:

Param Type
aApiRoot string
aUrl string
aCallback JsonpCallback
aCallbacks JsonpCallbacks

Returns: string


<Const> _removeCallback

_removeCallback(aDigest: string, aCallbacks: JsonpCallbacks): boolean

Defined in services/dependency/sdk/jsonp/jsonp.ts:79

Parameters:

Param Type
aDigest string
aCallbacks JsonpCallbacks

Returns: boolean


ibm-wch-sdk-ng > "services/dependency/sdk/router/router"

External module: "services/dependency/sdk/router/router"

Index

Classes

Interfaces

Variables


Variables

<Const> LOGGER

● LOGGER: "SdkRouter" = "SdkRouter"

Defined in services/dependency/sdk/router/router.ts:12


ibm-wch-sdk-ng > "services/dependency/sdk/sdk"

External module: "services/dependency/sdk/sdk"

Index

Classes

Interfaces

Variables


Variables

<Const> LOGGER

● LOGGER: "Sdk" = "Sdk"

Defined in services/dependency/sdk/sdk.ts:26


<Const> _MESSAGE_EVENT

● _MESSAGE_EVENT: "message" = "message"

Defined in services/dependency/sdk/sdk.ts:13


<Const> _MODULE_NAME

● _MODULE_NAME: "WchSdk" = WCH_SDK_MODULE_NAME

Defined in services/dependency/sdk/sdk.ts:28


<Const> bHasHandlers

● bHasHandlers: boolean = (typeof addEventListener === FUNCTION_TYPE) && (typeof removeEventListener === FUNCTION_TYPE)

Defined in services/dependency/sdk/sdk.ts:15


ibm-wch-sdk-ng > "services/dependency/sdk/search/search"

External module: "services/dependency/sdk/search/search"

Index

Classes

Interfaces


ibm-wch-sdk-ng > "services/dependency/sdk/version"

External module: "services/dependency/sdk/version"

Index

Interfaces

Object literals


Object literals

<Const> SDK_VERSION

SDK_VERSION: object

Defined in services/dependency/sdk/version.ts:14

build

● build: Date = new Date(VERSION.build)

Defined in services/dependency/sdk/version.ts:16


version

● version: Version = new Version(VERSION.version)

Defined in services/dependency/sdk/version.ts:15



ibm-wch-sdk-ng > "services/http/http.service"

External module: "services/http/http.service"

Index

Classes


ibm-wch-sdk-ng > "services/http/http.service.on.http.client"

External module: "services/http/http.service.on.http.client"

Index

Classes


ibm-wch-sdk-ng > "services/http/http.service.on.jsonp"

External module: "services/http/http.service.on.jsonp"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "HttpServiceOnJsonp" = "HttpServiceOnJsonp"

Defined in services/http/http.service.on.jsonp.ts:17


ibm-wch-sdk-ng > "services/hub-info/hub-info.service"

External module: "services/hub-info/hub-info.service"

Index

Classes


ibm-wch-sdk-ng > "services/info/wch.info.service"

External module: "services/info/wch.info.service"

Index

Classes


ibm-wch-sdk-ng > "services/injection/injection.service"

External module: "services/injection/injection.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "InjectorService" = "InjectorService"

Defined in services/injection/injection.service.ts:11


ibm-wch-sdk-ng > "services/logger/logger.service"

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

Index

Classes

Variables

Functions


Variables

<Const> CREATE_CONSOLE_LOGGER

● CREATE_CONSOLE_LOGGER: function = createConsoleLogger

Defined in services/logger/logger.service.ts:19

Type declaration

▸(source: T): R

Parameters:

Param Type
source T

Returns: R


<Const> CREATE_EMPTY_LOGGER

● CREATE_EMPTY_LOGGER: function = createEmptyLogger

Defined in services/logger/logger.service.ts:21

Type declaration

▸(source: T): R

Parameters:

Param Type
source T

Returns: R


<Const> _LOGGERS

● _LOGGERS: object

Defined in services/logger/logger.service.ts:16

Type declaration


<Let> _hasLoggerDelegateOverride

● _hasLoggerDelegateOverride: boolean = false

Defined in services/logger/logger.service.ts:27


<Let> _loggerDelegateOverride

● _loggerDelegateOverride: any

Defined in services/logger/logger.service.ts:24


<Const> _modeSubscription

● _modeSubscription: Subscription = DEV_MODE_SUBJECT.subscribe(mode => { // we only need to refresh if there was not explicit override if (_hasLoggerDelegateOverride) { _refreshLoggers(); } })

Defined in services/logger/logger.service.ts:109


Functions

_getLogger

_getLogger(aName: any): any

Defined in services/logger/logger.service.ts:33

Parameters:

Param Type
aName any

Returns: any


_getLoggerDelegate

_getLoggerDelegate(): any

Defined in services/logger/logger.service.ts:29

Returns: any


_isLogging

_isLogging(): boolean

Defined in services/logger/logger.service.ts:42

Tests if logging is enabled

Returns: boolean true if logging is enabled, else false


_logDeferred

_logDeferred(aFunction: Function, aArgs: IArguments): void

Defined in services/logger/logger.service.ts:75

Parameters:

Param Type
aFunction Function
aArgs IArguments

Returns: void


_logError

_logError(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:60

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_logErrorDeferred

_logErrorDeferred(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:88

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_logInfo

_logInfo(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:47

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_logInfoDeferred

_logInfoDeferred(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:83

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_logWarn

_logWarn(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:66

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_logWarnDeferred

_logWarnDeferred(aType: string, ...aArgs: any[]): void

Defined in services/logger/logger.service.ts:93

Parameters:

Param Type
aType string
Rest aArgs any[]

Returns: void


_refreshLoggers

_refreshLoggers(): void

Defined in services/logger/logger.service.ts:98

Returns: void


ibm-wch-sdk-ng > "services/logger/wch.logger.service"

External module: "services/logger/wch.logger.service"

Index

Classes

Functions


Functions

_createLoggerProxy

_createLoggerProxy(aName: string): Logger

Defined in services/logger/wch.logger.service.ts:12

Constructs a proxy around our logger

Parameters:

Param Type Description
aName string the name of the loger

Returns: Logger the proxy


ibm-wch-sdk-ng > "services/mappings/mappings.service"

External module: "services/mappings/mappings.service"

Index

Classes

Interfaces

Variables

Functions


Variables

<Const> EMPTY_ARRAY

● EMPTY_ARRAY: string[] = []

Defined in services/mappings/mappings.service.ts:37


<Const> EMPTY_LAYOUT_MODES

● EMPTY_LAYOUT_MODES: string[] = [DEFAULT_LAYOUT_MODE]

Defined in services/mappings/mappings.service.ts:38


<Const> LOGGER

● LOGGER: "MappingsService" = "MappingsService"

Defined in services/mappings/mappings.service.ts:20


Functions

_getIds

_getIds(aMapping: RegisteredMapping): string[]

Defined in services/mappings/mappings.service.ts:58

Parameters:

Param Type
aMapping RegisteredMapping

Returns: string[]


_getLayoutModes

_getLayoutModes(aMapping: RegisteredMapping): string[]

Defined in services/mappings/mappings.service.ts:69

Parameters:

Param Type
aMapping RegisteredMapping

Returns: string[]


_getMapping

_getMapping(aKey: * string | null | undefined*, aMap: Mappings): MappingEntry | undefined

Defined in services/mappings/mappings.service.ts:33

Parameters:

Param Type
aKey string | null | undefined
aMap Mappings

Returns: MappingEntry | undefined


_getSelector

_getSelector(aLayoutMode: string, aRenderingContext: RenderingContext, aMap: Mappings): string | undefined

Defined in services/mappings/mappings.service.ts:128

Parameters:

Param Type
aLayoutMode string
aRenderingContext RenderingContext
aMap Mappings

Returns: string | undefined


_getSelectors

_getSelectors(aMapping: RegisteredMapping): string[]

Defined in services/mappings/mappings.service.ts:80

Parameters:

Param Type
aMapping RegisteredMapping

Returns: string[]


_onRegisterMapping

_onRegisterMapping(aId: string, aSelector: string, aLayoutMode: string, aMap: Mappings): void

Defined in services/mappings/mappings.service.ts:107

Parameters:

Param Type
aId string
aSelector string
aLayoutMode string
aMap Mappings

Returns: void


_onRegisteredMapping

_onRegisteredMapping(aMapping: RegisteredMapping, aMap: Mappings): void

Defined in services/mappings/mappings.service.ts:95

Parameters:

Param Type
aMapping RegisteredMapping
aMap Mappings

Returns: void


_registerAll

_registerAll(aIds: string[], aModes: string[], aSelectors: string[], aMap: Mappings): void

Defined in services/mappings/mappings.service.ts:85

Parameters:

Param Type
aIds string[]
aModes string[]
aSelectors string[]
aMap Mappings

Returns: void


_registerMapping

_registerMapping(aId: * string | string[], aSelector: * string | string[] | Type<any>, aLayoutMode: * string | string[]*, aMap: Mappings): void

Defined in services/mappings/mappings.service.ts:153

Parameters:

Param Type
aId string | string[]
aSelector string | string[] | Type<any>
aLayoutMode string | string[]
aMap Mappings

Returns: void


_toStringArray

_toStringArray(aValue: any, aDefault: string[]): string[]

Defined in services/mappings/mappings.service.ts:47

Parameters:

Param Type
aValue any
aDefault string[]

Returns: string[]


ibm-wch-sdk-ng > "services/markup/markup.service"

External module: "services/markup/markup.service"

Index

Classes

Interfaces

Type aliases

Variables


Type aliases

MarkupGenerator

Ƭ MarkupGenerator: function

Defined in services/markup/markup.service.ts:5

Type declaration

▸(context: RenderingContext, options?: any): string

Parameters:

Param Type
context RenderingContext
Optional options any

Returns: string


Variables

<Const> KEY_PROVIDERS

● KEY_PROVIDERS: unique symbol = Symbol()

Defined in services/markup/markup.service.ts:16


ibm-wch-sdk-ng > "services/page/active.page.service"

External module: "services/page/active.page.service"

Index

Classes


ibm-wch-sdk-ng > "services/refresh/refresh.service"

External module: "services/refresh/refresh.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "RefreshService" = "RefreshService"

Defined in services/refresh/refresh.service.ts:7


ibm-wch-sdk-ng > "services/search/search.service"

External module: "services/search/search.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "SearchService" = "SearchService"

Defined in services/search/search.service.ts:11


ibm-wch-sdk-ng > "services/storage/storage.service"

External module: "services/storage/storage.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "StorageService" = "StorageService"

Defined in services/storage/storage.service.ts:7


ibm-wch-sdk-ng > "services/url/urls.service"

External module: "services/url/urls.service"

Index

Classes

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "UrlsService" = "UrlsService"

Defined in services/url/urls.service.ts:20


Functions

_getBaseUrlFromDocument

_getBaseUrlFromDocument(aDoc: Document): string | undefined

Defined in services/url/urls.service.ts:30

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

Parameters:

Param Type Description
aDoc Document the document

Returns: string | undefined

the URL


_getBaseUrlFromWindow

_getBaseUrlFromWindow(): string | undefined

Defined in services/url/urls.service.ts:47

Extracts the base URL from the window

Returns: string | undefined

the URL


ibm-wch-sdk-ng > "services/wch.service"

External module: "services/wch.service"

Index

Classes

Variables

Functions

Object literals


Variables

<Const> DEFAULT_CYCLE_HANDLING

● DEFAULT_CYCLE_HANDLING: BREAK = CYCLE_HANDLING.BREAK

Defined in services/wch.service.ts:135


<Const> EMPTY_PAGE_SEARCH_RESULT

● EMPTY_PAGE_SEARCH_RESULT: PageSearchResult[] = []

Defined in services/wch.service.ts:116


<Const> EMPTY_RENDERING_CONTEXTS

● EMPTY_RENDERING_CONTEXTS: RenderingContext[] = []

Defined in services/wch.service.ts:117


<Const> EMPTY_RENDERING_CONTEXTS_SEQUENCE

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

Defined in services/wch.service.ts:123


<Const> EMPTY_RENDERING_CONTEXT_SEARCH_RESULT

● EMPTY_RENDERING_CONTEXT_SEARCH_RESULT: RenderingContextSearchResult[] = []

Defined in services/wch.service.ts:115


<Const> EMPTY_SITE_PAGES_SEQUENCE

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

Defined in services/wch.service.ts:124


<Const> LOGGER

● LOGGER: "WchService" = "WchService"

Defined in services/wch.service.ts:131


<Const> NO_RENDERING_CONTEXT

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

Defined in services/wch.service.ts:126


<Const> UNKNOWN_RENDERING_CONTEXT

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

Defined in services/wch.service.ts:129


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

Defined in services/wch.service.ts:113


<Const> _Subject

● _Subject: Subject = Subject

Defined in services/wch.service.ts:132


Functions

_pluckDocument

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

Defined in services/wch.service.ts:143

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 services/wch.service.ts:153

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 services/wch.service.ts:118

numFound

● numFound: number = 0

Defined in services/wch.service.ts:118


renderingContexts

● renderingContexts: RenderingContext[] = EMPTY_RENDERING_CONTEXTS

Defined in services/wch.service.ts:118



<Const> EMPTY_SITE_PAGES_QUERY

EMPTY_SITE_PAGES_QUERY: object

Defined in services/wch.service.ts:119

numFound

● numFound: number = 0

Defined in services/wch.service.ts:119


sitePages

● sitePages: undefined[] = []

Defined in services/wch.service.ts:119



ibm-wch-sdk-ng > "services/zone/zone.service"

External module: "services/zone/zone.service"

Index

Classes


ibm-wch-sdk-ng > "utils/bootstrap.utils"

External module: "utils/bootstrap.utils"

Index

Type aliases

Variables

Functions


Type aliases

BootstrapInput

Ƭ BootstrapInput: * BootstrapSource<T> | Generator<BootstrapSource<T>> *

Defined in utils/bootstrap.utils.ts:35


BootstrapSource

Ƭ BootstrapSource: * T | string | ObservableInput<T> *

Defined in utils/bootstrap.utils.ts:34


Variables

<Const> LOGGER

● LOGGER: "BootstrapUtils" = "BootstrapUtils"

Defined in utils/bootstrap.utils.ts:30


<Const> data

● data: object

Defined in utils/bootstrap.utils.ts:51

Type declaration


Functions

<Const> _addDebug

_addDebug<T>(aObject: T): T

Defined in utils/bootstrap.utils.ts:32

Type parameters:

T

Parameters:

Param Type
aObject T

Returns: T


_bootstrapClear

_bootstrapClear(): void

Defined in utils/bootstrap.utils.ts:121

Returns: void


_bootstrapGet

_bootstrapGet(aKey: string): Observable<AnyJson>

Defined in utils/bootstrap.utils.ts:134

Parameters:

Param Type
aKey string

Returns: Observable<AnyJson>


_bootstrapInputToObservable

_bootstrapInputToObservable<T>(aValue: BootstrapInput<T>): Observable<T>

Defined in utils/bootstrap.utils.ts:59

Converts the input to an observable of the desired type

Type parameters:

T

Parameters:

Param Type Description
aValue BootstrapInput<T> the value to convert

Returns: Observable<T> the type


_bootstrapPut

_bootstrapPut(aKey: string, aValue: * AnyJson | string | ObservableInput<AnyJson> | Generator<AnyJson>*): void

Defined in utils/bootstrap.utils.ts:149

Parameters:

Param Type
aKey string
aValue AnyJson | string | ObservableInput<AnyJson> | Generator<AnyJson>

Returns: void


_bootstrapPutContentWithLayout

_bootstrapPutContentWithLayout(aContext: * ContentItemWithLayout | string*): Subscription | undefined

Defined in utils/bootstrap.utils.ts:179

Parameters:

Param Type
aContext ContentItemWithLayout | string

Returns: Subscription | undefined


_bootstrapPutSite

_bootstrapPutSite(aInput: BootstrapInput<Site>, aSiteId?: string): Subscription | undefined

Defined in utils/bootstrap.utils.ts:220

Parameters:

Param Type
aInput BootstrapInput<Site>
Optional aSiteId string

Returns: Subscription | undefined


_bootstrapRemove

_bootstrapRemove(aKey: string): void

Defined in utils/bootstrap.utils.ts:165

Parameters:

Param Type
aKey string

Returns: void


_generatorToObservable

_generatorToObservable<T>(aGenerator: Generator<BootstrapSource<T>>): Observable<T>

Defined in utils/bootstrap.utils.ts:90

Converts a generator, the result of the generator can be another input

Type parameters:

T

Parameters:

Param Type Description
aGenerator Generator<BootstrapSource<T>> the generator

Returns: Observable<T> the observable


_internalPut

_internalPut(aKey: string, aValue: BootstrapInput<AnyJson>): void

Defined in utils/bootstrap.utils.ts:105

Parameters:

Param Type
aKey string
aValue BootstrapInput<AnyJson>

Returns: void


_isBootstrapInput

_isBootstrapInput<T>(aValue: any): boolean

Defined in utils/bootstrap.utils.ts:43

Tests if the value is a valid input

Type parameters:

T

Parameters:

Param Type Description
aValue any the value

Returns: boolean true if the value is valid


ibm-wch-sdk-ng > "utils/component.mapping.utils"

External module: "utils/component.mapping.utils"

Index

Interfaces

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "ComponentMappingUtils" = "ComponentMappingUtils"

Defined in utils/component.mapping.utils.ts:10


<Const> _ReplaySubject

● _ReplaySubject: ReplaySubject = ReplaySubject

Defined in utils/component.mapping.utils.ts:11


<Const> _mappingsSubject

● _mappingsSubject: ReplaySubject<RegisteredMapping> = new _ReplaySubject()

Defined in utils/component.mapping.utils.ts:33


Functions

_destroy

_destroy(): void

Defined in utils/component.mapping.utils.ts:82

Returns: void


_getRegistered

_getRegistered(): Observable<RegisteredMapping>

Defined in utils/component.mapping.utils.ts:39

Returns: Observable<RegisteredMapping>


_registerFromLayoutComponent

_registerFromLayoutComponent(aDirective: LayoutComponentDirective, aType: Type<any>): void

Defined in utils/component.mapping.utils.ts:49

Parameters:

Param Type
aDirective LayoutComponentDirective
aType Type<any>

Returns: void


_registerFromMappingDirective

_registerFromMappingDirective(aID: * string | string[], aLayoutMode: * string | string[] | undefined | null, aValue: any): void

Defined in utils/component.mapping.utils.ts:70

Parameters:

Param Type
aID string | string[]
aLayoutMode string | string[] | undefined | null
aValue any

Returns: void


ibm-wch-sdk-ng > "utils/component.utils"

External module: "utils/component.utils"

Index

Interfaces

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "ComponentUtils" = "ComponentUtils"

Defined in utils/component.utils.ts:13


<Const> _ReplaySubject

● _ReplaySubject: ReplaySubject = ReplaySubject

Defined in utils/component.utils.ts:14


<Const> componentsObservable

● componentsObservable: Observable<RegisteredComponent> = componentsSubject.asObservable()

Defined in utils/component.utils.ts:23


<Const> componentsSubject

● componentsSubject: ReplaySubject<RegisteredComponent> = new _ReplaySubject()

Defined in utils/component.utils.ts:22


Functions

_destroy

_destroy(): void

Defined in utils/component.utils.ts:40

Returns: void


_getRegisteredComponents

_getRegisteredComponents(): Observable<RegisteredComponent>

Defined in utils/component.utils.ts:25

Returns: Observable<RegisteredComponent>


_getSelectors

_getSelectors(aSelector: * string | string[] | Type<any> | null | undefined*): string[]

Defined in utils/component.utils.ts:61

Parameters:

Param Type
aSelector string | string[] | Type<any> | null | undefined

Returns: string[]


_pluckSelector

_pluckSelector(aMetadata: any): any

Defined in utils/component.utils.ts:51

Extracts the selector

Parameters:

Param Type Description
aMetadata any metadata

Returns: any the selector


_registerComponent

_registerComponent(aDirective: LayoutComponentDirective, aType: Type<any>): void

Defined in utils/component.utils.ts:29

Parameters:

Param Type
aDirective LayoutComponentDirective
aType Type<any>

Returns: void


ibm-wch-sdk-ng > "utils/http.service"

External module: "utils/http.service"

Index

Variables


Variables

<Const> HTTP_SERVICE

● HTTP_SERVICE: InjectionToken<HttpService> = new InjectionToken(LOGGER)

Defined in utils/http.service.ts:7


<Const> LOGGER

● LOGGER: "HttpService" = "HttpService"

Defined in utils/http.service.ts:5


ibm-wch-sdk-ng > "utils/http.service.on.http"

External module: "utils/http.service.on.http"

Index

Variables

Functions


Variables

<Const> HTTP_SERVICE_ON_HTTP

● HTTP_SERVICE_ON_HTTP: InjectionToken<HttpService> = new InjectionToken(LOGGER)

Defined in utils/http.service.on.http.ts:12


<Const> LOGGER

● LOGGER: "HttpServiceOnHttp" = "HttpServiceOnHttp"

Defined in utils/http.service.on.http.ts:10


Functions

createHttpServiceOnHttp

createHttpServiceOnHttp(aHttp: Http): HttpService

Defined in utils/http.service.on.http.ts:22

Creates an http service on top of the (deprecated) http client deprecated: use createHttpServiceOnHttpClient instead

Parameters:

Param Type Description
aHttp Http the http angular service

Returns: HttpService the created service


ibm-wch-sdk-ng > "utils/http.service.on.http.client"

External module: "utils/http.service.on.http.client"

Index

Variables

Functions


Variables

<Const> HTTP_SERVICE_ON_HTTP_CLIENT

● HTTP_SERVICE_ON_HTTP_CLIENT: InjectionToken<HttpService> = new InjectionToken(LOGGER)

Defined in utils/http.service.on.http.client.ts:11


<Const> LOGGER

● LOGGER: "HttpServiceOnHttpClient" = "HttpServiceOnHttpClient"

Defined in utils/http.service.on.http.client.ts:9


Functions

createHttpServiceOnHttpClient

createHttpServiceOnHttpClient(aHttp: HttpClient): HttpService

Defined in utils/http.service.on.http.client.ts:19

Implements the {@link HttpService} interface on top of the {@link HttpClient} interface.

Parameters:

Param Type Description
aHttp HttpClient the client

Returns: HttpService service implementation


ibm-wch-sdk-ng > "utils/http.service.on.jsonp"

External module: "utils/http.service.on.jsonp"

Index

Interfaces

Variables

Functions


Variables

<Const> HTTP_SERVICE_ON_JSONP

● HTTP_SERVICE_ON_JSONP: InjectionToken<HttpService> = new InjectionToken(LOGGER)

Defined in utils/http.service.on.jsonp.ts:17


<Const> JSONP_CALLBACK

● JSONP_CALLBACK: "callback=JSONP_CALLBACK" = "callback=JSONP_CALLBACK"

Defined in utils/http.service.on.jsonp.ts:19


<Const> LOGGER

● LOGGER: "HttpServiceOnJsonp" = "HttpServiceOnJsonp"

Defined in utils/http.service.on.jsonp.ts:15


<Const> _JSONP_CALLBACK_PREFIX

● _JSONP_CALLBACK_PREFIX: string = ${_MODULE_NAME}.jsonp.callback.

Defined in utils/http.service.on.jsonp.ts:23


<Const> _MODULE_NAME

● _MODULE_NAME: "WchSdk" = Sdk.MODULE_NAME

Defined in utils/http.service.on.jsonp.ts:22


<Const> _assertInAngularZone

● _assertInAngularZone: assertInAngularZone = NgZone.assertInAngularZone

Defined in utils/http.service.on.jsonp.ts:50

expect to run in an Angular zone


<Const> _assertNotInAngularZone

● _assertNotInAngularZone: assertNotInAngularZone = NgZone.assertNotInAngularZone

Defined in utils/http.service.on.jsonp.ts:45

expect to NOT run in an Angular zone


Functions

_addCallback

_addCallback(aUrl: string): string

Defined in utils/http.service.on.jsonp.ts:209

Adds the JSONP callback parameter to the URL

Parameters:

Param Type Description
aUrl string the URL

Returns: string the callback


_removeNode

_removeNode(aNode: HTMLScriptElement): void

Defined in utils/http.service.on.jsonp.ts:30

Parameters:

Param Type
aNode HTMLScriptElement

Returns: void


_sendRequest

_sendRequest<T>(aUrl: string, aDoc: Document, aScope: any, aPending: PendingRequests): Observable<T>

Defined in utils/http.service.on.jsonp.ts:62

Type parameters:

T

Parameters:

Param Type
aUrl string
aDoc Document
aScope any
aPending PendingRequests

Returns: Observable<T>


createHttpServiceOnJsonp

createHttpServiceOnJsonp(aDoc: Document, aScope: any, aZoneService: ZoneService): HttpService

Defined in utils/http.service.on.jsonp.ts:229

Implements the {@link HttpService} interface via JSONP requests.

Parameters:

Param Type Description
aDoc Document the document
aScope any the SDK scope
aZoneService ZoneService

Returns: HttpService service implementation


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

External module: "utils/js.utils"

Index

Variables

Functions


Variables

<Const> KEY_DEBUG

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

Defined in utils/js.utils.ts:19


<Const> _assign

● _assign: assign = Object.assign

Defined in utils/js.utils.ts:21


<Const> _defineProperties

● _defineProperties: defineProperties = Object.defineProperties

Defined in utils/js.utils.ts:22


<Const> _false

● _false: false = false

Defined in utils/js.utils.ts:32


<Const> _getPrototype

● _getPrototype: getPrototypeOf = Object.getPrototypeOf

Defined in utils/js.utils.ts:105


<Const> _keys

● _keys: keys = Object.keys

Defined in utils/js.utils.ts:38


<Const> _true

● _true: true = true

Defined in utils/js.utils.ts:27


Functions

_concatArguments

_concatArguments(aDst: any[], aArgs: IArguments): any[]

Defined in utils/js.utils.ts:96

Parameters:

Param Type
aDst any[]
aArgs IArguments

Returns: any[]


_getClassName

_getClassName(aThis: any, aDefault?: string): string

Defined in utils/js.utils.ts:113

Tries to decode the classname

Parameters:

Param Type Description
aThis any the instance pointer
Optional aDefault string default name

Returns: string


_perfCloneDeep

_perfCloneDeep(aValue: any): any

Defined in utils/js.utils.ts:45

Parameters:

Param Type
aValue any

Returns: any


_perfDeepEquals

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

Defined in utils/js.utils.ts:78

Parameters:

Param Type
aLeft any
aRight any

Returns: boolean


_perfFreezeDeep

_perfFreezeDeep(aValue: any): any

Defined in utils/js.utils.ts:61

Parameters:

Param Type
aValue any

Returns: any


ibm-wch-sdk-ng > "utils/markup.utils"

External module: "utils/markup.utils"

Index

Interfaces

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "MarkupUtils" = "MarkupUtils"

Defined in utils/markup.utils.ts:8


Functions

_addMarkup

_addMarkup(aRenderingContext: RenderingContext, aMapping: MarkupMapping, aProviders: MarkupProviders): void

Defined in utils/markup.utils.ts:91

Parameters:

Param Type
aRenderingContext RenderingContext
aMapping MarkupMapping
aProviders MarkupProviders

Returns: void


_defineAccessor

_defineAccessor(aRenderingContext: RenderingContext, aHandlebarsMarkup: Markup, aOptions?: any): void

Defined in utils/markup.utils.ts:32

Parameters:

Param Type
aRenderingContext RenderingContext
aHandlebarsMarkup Markup
Optional aOptions any

Returns: void


_defineAccessors

_defineAccessors(aRenderingContext: RenderingContext, aHandlebarsMarkup: Markup[], aOptions?: any): void

Defined in utils/markup.utils.ts:71

Parameters:

Param Type
aRenderingContext RenderingContext
aHandlebarsMarkup Markup[]
Optional aOptions any

Returns: void


_emptyMarkupMapping

_emptyMarkupMapping(): MarkupMapping

Defined in utils/markup.utils.ts:84

Returns: MarkupMapping


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

External module: "utils/ng.utils"

Index

Variables

Functions


Variables

<Const> LOGGER

● LOGGER: "ng.utils" = "ng.utils"

Defined in utils/ng.utils.ts:8


Functions

_lazyInjector

_lazyInjector<T>(aToken: * Type<T> | InjectionToken<T>*, aInjector: Injector, notFoundValue?: T): Generator<T>

Defined in utils/ng.utils.ts:19

Generates a generator function that reads the value of an {@link Injector} when the injector is accessed for the first time.

Type parameters:

T

Parameters:

Param Type Description
aToken Type<T> | InjectionToken<T> the token to read
aInjector Injector the injector object
Optional notFoundValue T the fallback value

Returns: Generator<T> the lazy generator object


_onInject

_onInject(aInjector: Injector): function

Defined in utils/ng.utils.ts:35

Constructs a callback function

Parameters:

Param Type Description
aInjector Injector -

Returns: function function that resolves


ibm-wch-sdk-ng > "utils/page.utils"

External module: "utils/page.utils"

Index

Variables

Functions


Variables

<Const> _ReplaySubject

● _ReplaySubject: ReplaySubject = ReplaySubject

Defined in utils/page.utils.ts:6


<Const> pageSubject

● pageSubject: ReplaySubject<RenderingContext> = new _ReplaySubject(1)

Defined in utils/page.utils.ts:9


Functions

_disposeActivePage

_disposeActivePage(): void

Defined in utils/page.utils.ts:19

Returns: void


_getActivePage

_getActivePage(): Observable<RenderingContext>

Defined in utils/page.utils.ts:11

Returns: Observable<RenderingContext>


_setActivePage

_setActivePage(aRenderingContext: RenderingContext): void

Defined in utils/page.utils.ts:15

Parameters:

Param Type
aRenderingContext RenderingContext

Returns: void


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

External module: "utils/perf.utils"

Index

Variables

Functions


Variables

<Let> COUNT

● COUNT: number = 0

Defined in utils/perf.utils.ts:4


<Const> bHasPerformance

● bHasPerformance: boolean = (typeof performance !== 'undefined')

Defined in utils/perf.utils.ts:7


Functions

_measure

_measure(aName: string): function

Defined in utils/perf.utils.ts:9

Parameters:

Param Type
aName string

Returns: function


ibm-wch-sdk-ng > "utils/reflect.utils"

External module: "utils/reflect.utils"

Index

Variables


Variables

<Const> _getOwnMetadata

● _getOwnMetadata: any = Reflect['getOwnMetadata']

Defined in utils/reflect.utils.ts:3


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

External module: "utils/rx.utils"

Index

Classes

Interfaces

Functions


Functions

_completeLater

_completeLater<T>(aSubject: Subject<T>): function

Defined in utils/rx.utils.ts:22

Constructs a callback function that completes the subject and then unsubscribes all pending subscriptions

Type parameters:

T

Parameters:

Param Type Description
aSubject Subject<T> the subject

Returns: function the callback


_createLater

_createLater<K,O,T>(aGenerator: function): function

Defined in utils/rx.utils.ts:115

Produces a value at a later point in time on top of a generator

Type parameters:

K

O

T

Parameters:

Param Type Description
aGenerator function the generator function

Returns: function a function that takes a parameter and generates an observable based on the result


_createZoneSchedulers

_createZoneSchedulers(aZone: NgZone, aDelegate?: IScheduler): ZoneSchedulers

Defined in utils/rx.utils.ts:93

Parameters:

Param Type
aZone NgZone
Optional aDelegate IScheduler

Returns: ZoneSchedulers


_distinctSubject

_distinctSubject<T>(aSubject: Subject<T>): Observable<T>

Defined in utils/rx.utils.ts:103

Type parameters:

T

Parameters:

Param Type
aSubject Subject<T>

Returns: Observable<T>


_unsubscribeLater

_unsubscribeLater(aSubscription: * Subscription | null | undefined*): function

Defined in utils/rx.utils.ts:32

Parameters:

Param Type
aSubscription Subscription | null | undefined

Returns: function


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

External module: "utils/site.utils"

Index

Functions


Functions

_getPathFromUrlSegments

_getPathFromUrlSegments(aSegments: UrlSegment[]): string

Defined in utils/site.utils.ts:12

Constructs the URL path based on the segemnets

Parameters:

Param Type Description
aSegments UrlSegment[] the segments

Returns: string the path


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

External module: "utils/url.utils"

Index

Variables

Functions


Variables

<Const> decode

● decode: decodeURIComponent = decodeURIComponent

Defined in utils/url.utils.ts:10


Functions

_createBaseURL

_createBaseURL(aUrl: URL): string

Defined in utils/url.utils.ts:12

Parameters:

Param Type
aUrl URL

Returns: string


_ensureTrailingSlash

_ensureTrailingSlash(aUrl: string): string

Defined in utils/url.utils.ts:6

Parameters:

Param Type
aUrl string

Returns: string


ibm-wch-sdk-ng > "utils/url.utils.ifaces"

External module: "utils/url.utils.ifaces"

Index

Type aliases


Type aliases

QueryInput

Ƭ QueryInput: * string | string[] | null | undefined | URLSearchParams | Query | HttpParams *

Defined in utils/url.utils.ifaces.ts:7


ibm-wch-sdk-ng > "utils/urls"

External module: "utils/urls"

Index

Variables


Variables

<Const> BFF_BASE_URL

● BFF_BASE_URL: Observable<string> = USE_PUBLIC_URL.pipe( map<boolean, string>(bFlag => bFlag ? BFF_PUBLIC_URL : BFF_SECURE_URL), distinctUntilChanged(), shareLast() )

Defined in utils/urls.ts:18

observable that exposes the current base URL for the BFF. The URL does NOT start with a slash but ends with a slash


<Const> BFF_PUBLIC_URL

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

Defined in utils/urls.ts:10


<Const> BFF_SECURE_URL

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

Defined in utils/urls.ts:11


<Const> DEFAULT_PUBLIC_URL

● DEFAULT_PUBLIC_URL: true = true

Defined in utils/urls.ts:9


<Const> USE_PUBLIC_URL

● USE_PUBLIC_URL: BehaviorSubject<boolean> = new BehaviorSubject(DEFAULT_PUBLIC_URL)

Defined in utils/urls.ts:14


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

External module: "utils/wch.utils"

Index

Variables

Functions


Variables

<Const> KEY_ON_LAYOUT_MODE

● KEY_ON_LAYOUT_MODE: "onLayoutMode" = "onLayoutMode"

Defined in utils/wch.utils.ts:29


<Const> KEY_ON_RENDERING_CONTEXT

● KEY_ON_RENDERING_CONTEXT: "onRenderingContext" = "onRenderingContext"

Defined in utils/wch.utils.ts:28


<Const> LOGGER

● LOGGER: "WchUtils" = "WchUtils"

Defined in utils/wch.utils.ts:26


Functions

_getRenderingContextURL

_getRenderingContextURL(aID: string): Observable<string>

Defined in utils/wch.utils.ts:37

Parameters:

Param Type
aID string

Returns: Observable<string>


_getSiteURL

_getSiteURL(aSiteID?: string): Observable<string>

Defined in utils/wch.utils.ts:48

Parameters:

Param Type
Optional aSiteID string

Returns: Observable<string>


ibm-wch-sdk-ng > "version"

External module: "version"

Index

Object literals


Object literals

<Const> VERSION

VERSION: object

Defined in version.ts:1

build

● build: string = "01a021c9-8427-4cdd-bdd1-18ad1dda695d"

Defined in version.ts:3


version

● version: string = "f507579f-a7b0-4d70-9027-87aa5e35b020"

Defined in version.ts:2



Components

This section lists the components exposed by the SDK:

Services

The SDK exposes the following services:

  • BoostrapService: used to register pre-built data records for a speedy first page experience
  • ComponentsService: used to register angular components as layouts
  • LayoutMappingService: used to register fallback layout mappings
  • HubInfoService: provides configuration data to the SDK, typically injected by the application
  • WchInfoService: exposes resolved configuration data as used by the SDK. Based on HubInfoService but after applying all necessary fallbacks.
  • ActivePageService: provides access to the currently rendered page
  • SDK Service: exposes selected functions of the SDK via the global window object, so these function can be used from non-Angular components or via cross-frame messaging.
  • SearchService: exposes a convenience API to search for pages and content.
  • RefreshService: service to refresh REST based data

Stories

Stories describing how to do interesting stuff with the ibm-wch-sdk-ng.

HubInfoService

The hub info service provides information about the entry URLs to WCH. It exposes the following information:

  • apiUrl: URL to access the API layer, e.g. 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'
  • deliveryUrl: URL to access the delivery layer, e.g. 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'
  • cycleHandlingStrategy?: Specifies how the SDK deals with cyclic data structures, one of BREAK or RESOLVE.
  • fetchLevels?: Number of levels to fetch per request to the rendering context. If missing all levels will be fetched.
  • httpOptions?: Configuration of the HTTP strategy for the live site. Of type HttpResourceOptions.
  • httpPreviewOptions?: Configuration of the HTTP strategy for the preview site. Of type HttpResourceOptions.

Note that the URLs may end with a slash, however this is not required.

HttpResourceOptions

  • pollTime?: The system will periodically poll for updates. This setting configures the polling interval in [ms]. Consider to configure a different value for the live site and the preview site.
  • pollTimeVariation?: In order to avoid fetching many request at the same time, this settings allows to introduce a time window from which the polling interval will be selected randomly. Sensible values are between 0 and 1, relative to the pollTime. Default is 0.15.
  • useLocalStorage?: If enabled the system will try to load data from local storage before making an HTTP call. Defaults to true.
  • useBootstrap?: If enabled the system will try to load inline data before making an HTTP call. Defaults to true. Use the [Bootstrapservice][./../bootstrap] to add this data.
  • useStaticResources?: If enabled the system will try to load prerendered data from the delivery site before making an API call. This can lead to 404 responses that are logged in some browsers, however this is not an error. Defaults to true.
  • useApi?: If enabled the system will load site data and content items from the WCH REST APIs. When disabled it will only use one of the methods mentioned above. Defaults to true. Setting it to false is not recommended for production scenarios, but rather for testing, e.g. performance testing.
  • useJsonP?: If enabled the system uses JSONP to load data. From a caching perspective this is more efficient than an XHR, because XHR requests are subject to CORS and as a consequence generate an origin specific cache entry. Defaults to true.

Usage

    WchNgModule.forRoot({ apiUrl: new URL(apiUrl), deliveryUrl: new URL(deliveryUrl) })

alternative

    import { environment } from '../environments/environment';
 
    WchNgModule.forRoot(environment)

Assuming that the required settings are part of the environment settings and the build uses the Angular CLI environment concepts.

We recommend to define the apiUrl and the deliveryUrl only for development mode, assuming that the application in production mode will be served from WCH. In that case, the system will detect the apiUrl and the deliveryUrl automatically. In case the production mode application will be served from a different server than WCH, make sure to add an explicit configuration of the URLs.

Tipps

When maintaining a wchtools data folder with your application, this folder already has a .wchtoolsoptions.json file that contains the API URL. We recommend to read this file and initialize the environment variables from that source, to avoid duplication.

Declare the .wchtoolsoptions.json files as a modulein the typings.d.ts file, e.g. like this:

declare module "*/.wchtoolsoptions.json" {
  const value: any;
  export default value;
}

In your environment.ts read the module, e.g. like this:

import * as OPTIONS from './../../data/.wchtoolsoptions.json';
 
export const environment = {
  production: false,
  apiUrl: OPTIONS['x-ibm-dx-tenant-base-url'],
  httpOptions: { pollTime: 10 * 20 * 1000 }, httpPreviewOptions: { pollTime: 10 * 1000 }
};

Note that it is sufficient to specify the apiUrl property, the matching deliveryUrl property will be derived from it, automatically.

Note

  • The naming of the fields was chosen such that it is consistent to the naming of the corresponding fields in the rendering context.
  • The type of the fields is compatible to a URL object.

Modules

The SDK splits its functionality into a module that provides services and one that provides components and directives.

WchNgServiceModule

The service module exposes services.

WchNgComponentsModule

The component module defines components and directives. Import this module from other modules that contain UI artifacts.

Common Interfaces

ContentrefComponent

The contentref component acts as a proxy component and renders that component that is referenced by the RenderingContext.

Usage

The component requires the rendering context to be injected.

Usage in HTML:

<wch-contentref [renderingContext]="..."></wch-contentref>

Attributes

  • renderingContext: the rendering context for the component
  • layoutMode: the layout mode used to render the component. If not specified the system uses a default.

Events

  • onComponent: the actual angular component instance that gets created
  • onComponentOutput: a proxied output event sent by the dynamically created component. This event will be wrapped into a ComponentOutput interface.

Note

The contentref component is similar to the PageComponent. The difference is that it receives its configuration information explicitly via a RenderingContext whereas the PageComponent gets the context via the indirection of the active route.

WCH Dependency

The component relies on the layouts element in the RenderingContext. Depending on the type the contentref component will select the correct component to instantiate:

  • Angular4: uses the controller field together with the ComponentService to locate a native Angular 4 component.
  • handlebars:

ComponentOutput

Interface that wraps an event emitted by a dynamically created component.

Properties

  • renderingContext: rendering context of the component emitting the event
  • layoutMode: layout mode of the component emitting the event
  • component: the actual component instance that emitted the event
  • output: the output declaration representing the event
  • event: the emitted event

ComponentsService

This service allow to register components with layout IDs. Consider to use the inline form of the @LayoutComponent instead.

Constants

  • DEFAULT_LAYOUT: name of the component rendered if the layout cannot be resolved
  • PAGE_NOT_FOUND_LAYOUT: name of the component rendered if the page cannot be resolved

ibm-wch-sdk-ng

Index

External modules


ibm-wch-sdk-ng > "components/content/content.component" > ContentComponent

Class: ContentComponent

Hierarchy

AbstractLifeCycleComponent

↳ ContentComponent

Implements

  • OnInit
  • OnDestroy
  • OnChanges
  • DoCheck
  • AfterContentInit
  • AfterContentChecked
  • AfterViewInit
  • AfterViewChecked
  • OnDestroy

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentComponent(aWchService: WchService): ContentComponent

Defined in components/content/content.component.ts:80

Parameters:

Param Type
aWchService WchService

Returns: ContentComponent


Properties

id

● id: string

Defined in components/content/content.component.ts:42


layoutMode

● layoutMode: string

Defined in components/content/content.component.ts:50


levels

● levels: * string | number | null | undefined *

Defined in components/content/content.component.ts:56


onComponent

● onComponent: EventEmitter<any> = new EventEmitter()

Defined in components/content/content.component.ts:74


onComponentOutput

● onComponentOutput: EventEmitter<ComponentOutput> = new EventEmitter()

Defined in components/content/content.component.ts:68


onLayoutMode

● onLayoutMode: Observable<string>

Defined in components/content/content.component.ts:80


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Defined in components/content/content.component.ts:62


Accessors

<Protected> onAfterContentChecked

getonAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:270

Returns: Observable<void>


<Protected> onAfterContentInit

getonAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:278

Returns: Observable<void>


<Protected> onAfterViewChecked

getonAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:254

Returns: Observable<void>


<Protected> onAfterViewInit

getonAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

Defined in components/rendering/abstract.lifecycle.component.ts:262

Returns: Observable<void>


<Protected> onDoCheck

getonDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:286

Returns: Observable<void>


<Protected> onOnChanges

getonOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:294

Returns: Observable<SimpleChanges>


<Protected> onOnDestroy

getonOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:310

Returns: Observable<void>


<Protected> onOnInit

getonOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:302

Returns: Observable<void>


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

Defined in components/rendering/abstract.lifecycle.component.ts:337

Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component. deprecated: use createSetter instead

Type parameters:

T

Parameters:

Param Type Description
aSubject Subject<T> the subject

Returns: PropertyDescriptor the property descriptor


ngAfterContentChecked

ngAfterContentChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:204

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:212

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:188

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

Defined in components/rendering/abstract.lifecycle.component.ts:196

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:220

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:228

Parameters:

Param Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

Defined in components/content/content.component.ts:140

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:236

Returns: void


safeSubscribe

safeSubscribe<T>(aObservable: Subscribable<T>, aObserver?: * PartialObserver<T> | function | string*, error?: function, complete?: function): void

Inherited from AbstractLifeCycleComponent.safeSubscribe

Defined in components/rendering/abstract.lifecycle.component.ts:356

Type parameters:

T

Parameters:

Param Type
aObservable Subscribable<T>
Optional aObserver PartialObserver<T> | function | string
Optional error function
Optional complete function

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:322

Parameters:

Param Type
aSubscription Subscription

Returns: void


ibm-wch-sdk-ng > "components/contentquery/contentquery.component" > ContentQueryComponent

Class: ContentQueryComponent

Hierarchy

AbstractLifeCycleComponent

↳ ContentQueryComponent

Implements

  • OnInit
  • OnDestroy
  • OnChanges
  • DoCheck
  • AfterContentInit
  • AfterContentChecked
  • AfterViewInit
  • AfterViewChecked
  • AfterViewInit
  • OnDestroy

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentQueryComponent(aRenderer: Renderer2, aElement: ElementRef, aWchService: WchService): ContentQueryComponent

Defined in components/contentquery/contentquery.component.ts:77

Parameters:

Param Type
aRenderer Renderer2
aElement ElementRef
aWchService WchService

Returns: ContentQueryComponent


Properties

layoutMode

● layoutMode: string

Defined in components/contentquery/contentquery.component.ts:47


levels

● levels: * string | number | null | undefined *

Defined in components/contentquery/contentquery.component.ts:59


onLayoutMode

● onLayoutMode: Observable<string>

Defined in components/contentquery/contentquery.component.ts:65


onNumFound

● onNumFound: Observable<number>

Defined in components/contentquery/contentquery.component.ts:77


onRenderingContexts

● onRenderingContexts: Observable<RenderingContext[]>

Defined in components/contentquery/contentquery.component.ts:71


query

● query: QueryInput

Defined in components/contentquery/contentquery.component.ts:53


Accessors

<Protected> onAfterContentChecked

getonAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:270

Returns: Observable<void>


<Protected> onAfterContentInit

getonAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:278

Returns: Observable<void>


<Protected> onAfterViewChecked

getonAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:254

Returns: Observable<void>


<Protected> onAfterViewInit

getonAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

Defined in components/rendering/abstract.lifecycle.component.ts:262

Returns: Observable<void>


<Protected> onDoCheck

getonDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:286

Returns: Observable<void>


<Protected> onOnChanges

getonOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:294

Returns: Observable<SimpleChanges>


<Protected> onOnDestroy

getonOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:310

Returns: Observable<void>


<Protected> onOnInit

getonOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:302

Returns: Observable<void>


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

Defined in components/rendering/abstract.lifecycle.component.ts:337

Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component. deprecated: use createSetter instead

Type parameters:

T

Parameters:

Param Type Description
aSubject Subject<T> the subject

Returns: PropertyDescriptor the property descriptor


ngAfterContentChecked

ngAfterContentChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:204

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:212

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:188

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Overrides AbstractLifeCycleComponent.ngAfterViewInit

Defined in components/contentquery/contentquery.component.ts:171

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:220

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:228

Parameters:

Param Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

Defined in components/contentquery/contentquery.component.ts:176

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:236

Returns: void


safeSubscribe

safeSubscribe<T>(aObservable: Subscribable<T>, aObserver?: * PartialObserver<T> | function | string*, error?: function, complete?: function): void

Inherited from AbstractLifeCycleComponent.safeSubscribe

Defined in components/rendering/abstract.lifecycle.component.ts:356

Type parameters:

T

Parameters:

Param Type
aObservable Subscribable<T>
Optional aObserver PartialObserver<T> | function | string
Optional error function
Optional complete function

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:322

Parameters:

Param Type
aSubscription Subscription

Returns: void


ibm-wch-sdk-ng > "components/contentref/contentref.component" > ContentrefComponent

Class: ContentrefComponent

Hierarchy

AbstractRenderingComponent

↳ ContentrefComponent

Implements

  • OnInit
  • OnDestroy
  • OnChanges
  • DoCheck
  • AfterContentInit
  • AfterContentChecked
  • AfterViewInit
  • AfterViewChecked
  • OnDestroy
  • AfterViewInit
  • OnDestroy

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentrefComponent(aFctResolver: ComponentFactoryResolver, aCmp: ComponentsService, aMapping: LayoutMappingService, aWchService: WchService, aActivatedRoute: ActivatedRoute): ContentrefComponent

Overrides AbstractRenderingComponent.constructor

Defined in components/contentref/contentref.component.ts:272

Parameters:

Param Type
aFctResolver ComponentFactoryResolver
aCmp ComponentsService
aMapping LayoutMappingService
aWchService WchService
aActivatedRoute ActivatedRoute

Returns: ContentrefComponent


Properties

<Protected> _id

● _id: string

Inherited from AbstractRenderingComponent._id

Defined in components/rendering/abstract-rendering.component.ts:28


contentrefHost

● contentrefHost: ContentrefDirective

Defined in components/contentref/contentref.component.ts:272

Reference to the view area that contains the dynamic component


<Optional> cycleHandlingStrategy

● cycleHandlingStrategy: * CYCLE_HANDLING | string *

Defined in components/contentref/contentref.component.ts:242


layoutMode

● layoutMode: string

Overrides AbstractRenderingComponent.layoutMode

Defined in components/contentref/contentref.component.ts:254


onComponent

● onComponent: Observable<any>

Defined in components/contentref/contentref.component.ts:266

Output that will be triggered when a new component was created


onComponentOutput

● onComponentOutput: Observable<ComponentOutput>

Defined in components/contentref/contentref.component.ts:260


onLayoutMode

● onLayoutMode: Observable<string>

Inherited from AbstractRenderingComponent.onLayoutMode

Defined in components/rendering/abstract-rendering.component.ts:40


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Inherited from AbstractRenderingComponent.onRenderingContext

Defined in components/rendering/abstract-rendering.component.ts:34


renderingContext

● renderingContext: RenderingContext

Overrides AbstractRenderingComponent.renderingContext

Defined in components/contentref/contentref.component.ts:248


Accessors

<Protected> context

getcontext(): Observable<RenderingContext>

Inherited from AbstractRenderingComponent.context

Defined in components/rendering/abstract-rendering.component.ts:120

Returns: Observable<RenderingContext>


<Protected> onAfterContentChecked

getonAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:270

Returns: Observable<void>


<Protected> onAfterContentInit

getonAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:278

Returns: Observable<void>


<Protected> onAfterViewChecked

getonAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:254

Returns: Observable<void>


<Protected> onAfterViewInit

getonAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

Defined in components/rendering/abstract.lifecycle.component.ts:262

Returns: Observable<void>


<Protected> onDoCheck

getonDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:286

Returns: Observable<void>


<Protected> onOnChanges

getonOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:294

Returns: Observable<SimpleChanges>


<Protected> onOnDestroy

getonOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:310

Returns: Observable<void>


<Protected> onOnInit

getonOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:302

Returns: Observable<void>


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

Defined in components/rendering/abstract.lifecycle.component.ts:337

Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component. deprecated: use createSetter instead

Type parameters:

T

Parameters:

Param Type Description
aSubject Subject<T> the subject

Returns: PropertyDescriptor the property descriptor


ngAfterContentChecked

ngAfterContentChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentChecked

Defined in components/rendering/abstract.lifecycle.component.ts:204

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

Defined in components/rendering/abstract.lifecycle.component.ts:212

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

Defined in components/rendering/abstract.lifecycle.component.ts:188

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Overrides AbstractLifeCycleComponent.ngAfterViewInit

Defined in components/contentref/contentref.component.ts:387

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

Defined in components/rendering/abstract.lifecycle.component.ts:220

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

Defined in components/rendering/abstract.lifecycle.component.ts:228

Parameters:

Param Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractRenderingComponent.ngOnDestroy

Defined in components/contentref/contentref.component.ts:393

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

Defined in components/rendering/abstract.lifecycle.component.ts:236

Returns: void


safeSubscribe

safeSubscribe<T>(aObservable: Subscribable<T>, aObserver?: * PartialObserver<T> | function | string*, error?: function, complete?: function): void

Inherited from AbstractLifeCycleComponent.safeSubscribe

Defined in components/rendering/abstract.lifecycle.component.ts:356

Type parameters:

T

Parameters:

Param Type
aObservable Subscribable<T>
Optional aObserver PartialObserver<T> | function | string
Optional error function
Optional complete function

Returns: void


trackByComponentId

trackByComponentId(aIndex: number, aRenderingContext: RenderingContext): string

Inherited from AbstractRenderingComponent.trackByComponentId

Defined in components/rendering/abstract-rendering.component.ts:132

Parameters:

Param Type
aIndex number
aRenderingContext RenderingContext

Returns: string


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

Defined in components/rendering/abstract.lifecycle.component.ts:322

Parameters:

Param Type
aSubscription Subscription

Returns: void


ibm-wch-sdk-ng > "components/contentref/contentref.component" > ComponentOutput

Interface: ComponentOutput

Hierarchy

ComponentOutput

Index

Properties


Properties

component

● component: any

Defined in components/contentref/contentref.component.ts:77


event

● event: any

Defined in components/contentref/contentref.component.ts:87


layoutMode

● layoutMode: string

Defined in components/contentref/contentref.component.ts:72


output

● output: OutputDefinition

Defined in components/contentref/contentref.component.ts:82


renderingContext

● renderingContext: RenderingContext

Defined in components/contentref/contentref.component.ts:67


ibm-wch-sdk-ng > "components/contentref/contentref.component" > OutputDefinition

Interface: OutputDefinition

Hierarchy

OutputDefinition

Index

Properties


Properties

propName

● propName: string

Defined in components/contentref/contentref.component.ts:59


templateName

● templateName: string

Defined in components/contentref/contentref.component.ts:60


ibm-wch-sdk-ng > "services/components/components.service" > ComponentsService

Class: ComponentsService

Hierarchy

ComponentsService

Implements

  • OnDestroy

Index

Constructors

Properties


Constructors

constructor

new ComponentsService(markupService: MarkupService): ComponentsService

Defined in services/components/components.service.ts:201

Parameters:

Param Type
markupService MarkupService

Returns: ComponentsService


Properties

getTypeByLayout

● getTypeByLayout: function

Defined in services/components/components.service.ts:188

Type declaration

▸(aLayout: Layout): Observable<Type<any>>

Parameters:

Param Type
aLayout Layout

Returns: Observable<Type<any>>


getTypeBySelector

● getTypeBySelector: function

Defined in services/components/components.service.ts:196

Type declaration

▸(aSelector: string): Observable<Type<any>>

Parameters:

Param Type
aSelector string

Returns: Observable<Type<any>>


ngOnDestroy

● ngOnDestroy: function

Defined in services/components/components.service.ts:201

Type declaration

▸(): void

Returns: void


registerType

● registerType: function

Defined in services/components/components.service.ts:180

Type declaration

▸(aController: string, aType: Type<any>): void

Parameters:

Param Type
aController string
aType Type<any>

Returns: void


<Static> DEFAULT_LAYOUT

● DEFAULT_LAYOUT: "wch-default-layout" = _DEFAULT_LAYOUT

Defined in services/components/components.service.ts:172


<Static> PAGE_NOT_FOUND_LAYOUT

● PAGE_NOT_FOUND_LAYOUT: "wch-404" = _PAGE_NOT_FOUND_LAYOUT

Defined in services/components/components.service.ts:177


ibm-wch-sdk-ng > "services/mappings/mappings.service" > LayoutMappingService

Class: LayoutMappingService

Hierarchy

LayoutMappingService

Implements

  • OnDestroy

Index

Constructors

Properties


Constructors

constructor

new LayoutMappingService(): LayoutMappingService

Defined in services/mappings/mappings.service.ts:188

Returns: LayoutMappingService


Properties

getSelector

● getSelector: function

Defined in services/mappings/mappings.service.ts:183

Type declaration

▸(aLayoutMode: string, aRenderingContext: RenderingContext): string | undefined

Parameters:

Param Type
aLayoutMode string
aRenderingContext RenderingContext

Returns: string | undefined


ngOnDestroy

● ngOnDestroy: function

Defined in services/mappings/mappings.service.ts:188

Type declaration

▸(): void

Returns: void


registerMapping

● registerMapping: function

Defined in services/mappings/mappings.service.ts:174

Type declaration

▸(aId: * string | string[], aSelector: * string | string[] | Type<any>, aLayoutMode?: * string | string[]*): void

Parameters:

Param Type
aId string | string[]
aSelector string | string[] | Type<any>
Optional aLayoutMode string | string[]

Returns: void


ibm-wch-sdk-ng > "components/page/page.component" > PageComponent

Class: PageComponent

Hierarchy

AbstractBaseComponent

↳ PageComponent

Implements

  • OnInit
  • OnDestroy
  • OnChanges
  • DoCheck
  • AfterContentInit
  • AfterContentChecked
  • AfterViewInit
  • AfterViewChecked
  • OnDestroy

Index

Constructors

Properties

Accessors