@ibm-wch-sdk/ng
TypeScript icon, indicating that this package has built-in type declarations

6.0.524 • Public • Published

IBM Angular SDK for Watson 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 environment = {
  production: false,
  apiUrl
};

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

Added

  • support for registering a layout per layout mode

Changes

  • the life cycle observables onOnInit and onOnDestroy have replay semantics, i.e. they fire for each consumer that attaches to the hooks.

Breaking Changes

  • Removed the ComponentOutput events. Use the component events and subscribe to the component instance, instead.

6.0.69

Breaking Changes

  • Migrated to rxjs 6.x, all rx related code has to use the new imports
  • Changes the SDK coordinates to use the @ibm-wch-sdk/ namespace
  • Removed InjectorService since dependency injection should NOT be done via Injector classes, directly

Changes

  • Layout components are now created synchronously, instead of asynchronously to prevent flickering

Added

  • Support for tree-shakeable services
  • New ContentResolver service to support manual resolution of lazy loaded content
  • Support for lazy loading using the Router component
  • Support for dynamic pages
  • Support for group elements
  • Support for Angular 6

5.0.107 - 2018-02-28

Breaking Changes

  • Renamed ContentWithLayout to ContentItemWithLayout.

Changes

  • 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

Type aliases

Variables


Type aliases

ComponentState

Ƭ ComponentState: [RenderingContext, string]

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

Combines the active pieces of the state into one single object


Variables

<Const> LOGGER

● LOGGER: "ContentComponent" = "ContentComponent"

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


@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:42


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

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

Index

Classes

Type aliases

Variables

Functions

Object literals


Type aliases

ComponentState

Ƭ ComponentState: [ComponentTypeRef<any>, RenderingContext, string]

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

Combines the active pieces of the state into one single object


Variables

<Const> LOGGER

● LOGGER: "ContentrefComponent" = "ContentrefComponent"

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


Functions

getType

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

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

Parameters:

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

Returns: Observable<ComponentTypeRef<any>>


Object literals

<Const> LAYOUT_NOT_FOUND_LAYOUT

LAYOUT_NOT_FOUND_LAYOUT: object

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

template

● template: string = ComponentsService.DEFAULT_LAYOUT

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


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

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



<Const> PAGE_NOT_FOUND_LAYOUT

PAGE_NOT_FOUND_LAYOUT: object

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

template

● template: string = ComponentsService.PAGE_NOT_FOUND_LAYOUT

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


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

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



@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

Type aliases

Variables

Functions


Type aliases

ComponentState

Ƭ ComponentState: [RenderingContext, string]

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

Combines the active pieces of the state into one single object


Variables

<Const> LOGGER

● LOGGER: "PageComponent" = "PageComponent"

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


<Const> _EMPTY_VALUE

● _EMPTY_VALUE: "" = ""

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


<Const> _META_NAME_DESCRIPTION

● _META_NAME_DESCRIPTION: "description" = "description"

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


<Const> _META_NAME_ID

● _META_NAME_ID: "id" = "id"

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


Functions

_boxValue

_boxValue(aValue?: string): string

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

Parameters:

Name Type
Optional aValue string

Returns: string


_getDescription

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

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

Parameters:

Name Type
aSitePage SitePage
aRenderingContext RenderingContext

Returns: string


_getTitle

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

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

Parameters:

Name Type
aSitePage SitePage
aRenderingContext RenderingContext

Returns: string


_setMetaTag

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

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

Parameters:

Name Type
aMetaService Meta
aId string
Optional aValue string

Returns: void


_setTitleTag

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

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

Parameters:

Name Type
aTitle Title
Optional aValue string

Returns: void


_updateMetaData

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

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

Parameters:

Name 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

Type aliases

Variables


Type aliases

ComponentState

Ƭ ComponentState: [RenderingContext, string]

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

Combines the active pieces of the state into one single object


Variables

<Const> LOGGER

● LOGGER: "PagerefComponent" = "PagerefComponent"

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


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

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

Index

Classes

Type aliases

Variables


Type aliases

ComponentState

Ƭ ComponentState: [RenderingContext, string]

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

Combines the active pieces of the state into one single object


Variables

<Const> LOGGER

● LOGGER: "ContentPathComponent" = "ContentPathComponent"

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


@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:21


<Const> LOGGER

● LOGGER: "AbstractBaseComponent" = "AbstractBaseComponent"

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


@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:25


<Const> LOGGER

● LOGGER: "AbstractRenderingComponent" = "AbstractRenderingComponent"

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


@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:49


Variables

<Const> FIELD_CALLBACKS

● FIELD_CALLBACKS: 1 = 1

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


<Const> FIELD_OBSERVABLE

● FIELD_OBSERVABLE: 2 = 2

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


<Const> HOOK_AFTERCONTENTCHECKED

● HOOK_AFTERCONTENTCHECKED: 2 = 2

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


<Const> HOOK_AFTERCONTENTINIT

● HOOK_AFTERCONTENTINIT: 3 = 3

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


<Const> HOOK_AFTERVIEWCHECKED

● HOOK_AFTERVIEWCHECKED: 0 = 0

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

Enumeration of the possible hooks


<Const> HOOK_AFTERVIEWINIT

● HOOK_AFTERVIEWINIT: 1 = 1

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


<Const> HOOK_CHANGES

● HOOK_CHANGES: 6 = 6

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


<Const> HOOK_DESTROY

● HOOK_DESTROY: 7 = 7

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


<Const> HOOK_DOCHECK

● HOOK_DOCHECK: 4 = 4

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


<Const> HOOK_INIT

● HOOK_INIT: 5 = 5

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


<Const> KEY_REGISTRY

● KEY_REGISTRY: string | symbol = createSymbol()

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


Functions

_addHook

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

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

Registers a life cycle hook with the component

Parameters:

Name Type
aHookIdentifier number
aThis AbstractLifeCycleComponent
aHook Function

Returns: void


_assertCallbacks

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

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

Makes sure we have a callbacks array defined

Parameters:

Name Type Description
aHook any[] the hook structure

Returns: Function[] the callback field


_assertHook

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

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

Makes sure we have a hook data structure for the identifier

Parameters:

Name Type Description
aHookIdentifier number the hook identifier
aThis AbstractLifeCycleComponent the instance

Returns: any[] the hook structure


_createObservable

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

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

Construct the desired observable

Parameters:

Name Type Description
aHookIdentifier number the hook
aHook any[]
aShared boolean
aThis AbstractLifeCycleComponent the life cycle component

Returns: Observable<any> the observable


_getObservable

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

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

Registers an observable for a hook

Parameters:

Name Type Description
aHookIdentifier number the identifier for the hook
aShared boolean
aThis AbstractLifeCycleComponent the instance of the component

Returns: Observable<any> the observable


_invokeHooks

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

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

Invokes the lifecycle hooks for the component

Parameters:

Name Type Description
aHookIdentifier number
aThis AbstractLifeCycleComponent the this pointer
aArgs IArguments the arguments

Returns: void


_removeRegistry

_removeRegistry(aThis: AbstractLifeCycleComponent): void

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

Clears the registry from the component

Parameters:

Name Type Description
aThis AbstractLifeCycleComponent the instance

Returns: void


createGetter

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

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

Constructs a getter that subscribes to a value

Type parameters:

T

Parameters:

Name 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:432

Constructs a setter that is unregistered automatically in onDestroy

Type parameters:

T

Parameters:

Name 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:11


@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:

Name 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:

Name 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:355

Type declaration

▸(): string

Returns: string


Subscriptions

Ƭ Subscriptions: Subscription[]

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


Variables

<Const> KEY_EXPRESSION

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

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


<Const> KEY_OBSERVABLE_PREFIX

● KEY_OBSERVABLE_PREFIX: "on" = "on"

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


<Const> KEY_ON_DESTROY

● KEY_ON_DESTROY: "ngOnDestroy" = "ngOnDestroy"

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


<Const> KEY_SUBSCRIPTIONS

● KEY_SUBSCRIPTIONS: string | symbol = createSymbol()

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


<Const> LOGGER

● LOGGER: "LayoutDecorator" = "LayoutDecorator"

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


<Const> UNDEFINED_RENDERING_CONTEXT_SUBJECT

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

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


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

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


<Const> _SYMBOLS

● _SYMBOLS: Record<string, symbol | string>

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


<Const> _expressionCache

● _expressionCache: object

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

Type declaration


Functions

LayoutComponent

LayoutComponent(aDirective?: LayoutComponentDirective): function

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

Parameters:

Name Type
Optional aDirective LayoutComponentDirective

Returns: function


LayoutMapping

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

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

Parameters:

Name Type
aID string | string[] | LayoutMappingDirective
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:565

Type parameters:

T

Parameters:

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

Returns: function


_assertBinding

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

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

Makes sure we have a binding

Type parameters:

T

Parameters:

Name Type Description
aInstance any the instance to attach the binding to
aSymbol symbol | string 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:337

Parameters:

Name Type
aKey string

Returns: string


_getExpressionFromDescriptor

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

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

Returns an expression from its descriptor

Parameters:

Name 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:394

Checks if we can find an expression from the other property

Parameters:

Name 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:422

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

Parameters:

Name 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 | string, aName: string, aHandler: RenderingContextDirective<T>): Observable<T>

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

Type parameters:

T

Parameters:

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

Returns: Observable<T>


_getOnRenderingContext

_getOnRenderingContext(aInstance: any): Observable<RenderingContext>

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

Parameters:

Name Type
aInstance any

Returns: Observable<RenderingContext>


_getResolvedExpression

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

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

Type parameters:

T

Parameters:

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

Returns: T


_getSymbol

_getSymbol(aName: string): symbol | string

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

Parameters:

Name Type
aName string

Returns: symbol | string


_isObservableExpression

_isObservableExpression(aKey: string): boolean

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

Parameters:

Name Type
aKey string

Returns: boolean


_isStringOrArray

_isStringOrArray(aValue: any): boolean

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

Tests if a value is a string or a string array

Parameters:

Name Type
aValue any

Returns: boolean


_isUpperCase

_isUpperCase(aValue: string): boolean

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

Parameters:

Name Type
aValue string

Returns: boolean


_observableExpressionFromBaseExpression

_observableExpressionFromBaseExpression(aKey: string): string

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

Parameters:

Name Type
aKey string

Returns: string


_parseExpression

_parseExpression(aExpression: string): RenderingContextDirective<any>

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

Parameters:

Name 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:131

Type parameters:

T

Parameters:

Name 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:459

Type parameters:

T

Parameters:

Name 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:230

Parameters:

Name 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:37

Type declaration

▸(ctx: RenderingContext): T

Parameters:

Name Type
ctx RenderingContext

Returns: T


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

External module: "directives/contentref.directive"

Index

Classes

Variables

Functions


Variables

<Const> KEYS

● KEYS: string[] = [KEY_LAYOUT_MODE, KEY_RENDERING_CONTEXT]

Defined in directives/contentref.directive.ts:41


<Const> LOGGER

● LOGGER: "ContentRefDirective" = "ContentRefDirective"

Defined in directives/contentref.directive.ts:43


Functions

_getComponentFactoryResolver

_getComponentFactoryResolver(aConfig?: Route): ComponentFactoryResolver

Defined in directives/contentref.directive.ts:21

Parameters:

Name Type
Optional aConfig Route

Returns: ComponentFactoryResolver


@ibm-wch-sdk/ng > "guards/root.page.guard"

External module: "guards/root.page.guard"

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:21


<Const> DEV_MODE_SUBJECT

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

Defined in internal/assert.ts:26


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

Defined in internal/assert.ts:16


Functions

assertDefined

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

Defined in internal/assert.ts:91

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertDependency

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

Defined in internal/assert.ts:41

Parameters:

Name Type
aValue any
aName string

Returns: void


assertIsAbsoluteURL

assertIsAbsoluteURL(aValue: URL | string, aMessage?: string): void

Defined in internal/assert.ts:115

Parameters:

Name Type
aValue URL | string
Optional aMessage string

Returns: void


assertIsArray

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

Defined in internal/assert.ts:71

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertIsFunction

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

Defined in internal/assert.ts:59

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertIsObservable

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

Defined in internal/assert.ts:47

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertIsPlainObject

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

Defined in internal/assert.ts:53

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertIsString

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

Defined in internal/assert.ts:65

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertNil

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

Defined in internal/assert.ts:77

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertNotNil

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

Defined in internal/assert.ts:83

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertNull

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

Defined in internal/assert.ts:103

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertTrue

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

Defined in internal/assert.ts:109

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


assertUndefined

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

Defined in internal/assert.ts:97

Parameters:

Name Type
aValue any
Optional aMessage string

Returns: void


isAssertOn

isAssertOn(): boolean

Defined in internal/assert.ts:37

Returns: boolean


isDevModeOn

isDevModeOn(): boolean

Defined in internal/assert.ts:33

Returns: boolean


@ibm-wch-sdk/ng > "module"

External module: "module"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "WchNgModule" = "WchNgModule"

Defined in module.ts:44


@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:15


@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:11


@ibm-wch-sdk/ng > "routing/default.routes"

External module: "routing/default.routes"

Index

Variables


Variables

<Const> DEFAULT_ROUTES

● DEFAULT_ROUTES: Routes = freezeDeep([ { path: '**', component: PageComponent } ])

Defined in routing/default.routes.ts:6


@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:15


@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:26


<Const> _DEFAULT_LAYOUT

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

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


<Const> _DEFAULT_LAYOUT_MODES

● _DEFAULT_LAYOUT_MODES: string[] = [DEFAULT_LAYOUT_MODE]

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


<Const> _PAGE_NOT_FOUND_LAYOUT

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

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


Functions

_createMappingEntry

_createMappingEntry(aKey: string, aLayoutMode: string): MappingEntry

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

Constructs an entry in the mapping table

Parameters:

Name Type Description
aKey string the layout key
aLayoutMode string the layout mode for debugging purposes

Returns: MappingEntry the entry


_getEntry

_getEntry(aController: string, aLayoutMode: string, aMapByLayoutMode: ByLayoutModeMapping): MappingEntry

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

Makes sure to get a subject

Parameters:

Name Type Description
aController string the controller ID
aLayoutMode string the layout mode
aMapByLayoutMode ByLayoutModeMapping the mapping from layout mode to controller mapping

Returns: MappingEntry the subject


_getLayoutModesFromComponent

_getLayoutModesFromComponent(aComponent: RegisteredComponent): string[]

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

Returns the layout modes for the component

Parameters:

Name Type Description
aComponent RegisteredComponent the layout component descriptor

Returns: string[] the modes


_getLayoutModesFromConfig

_getLayoutModesFromConfig(aModes?: string | string[]): string[]

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

Returns the layout modes for the component

Parameters:

Name Type Description
Optional aModes string | string[] the layout component descriptor

Returns: string[] the modes


_getSelectorsFromComponent

_getSelectorsFromComponent(aComponent: RegisteredComponent): string[]

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

Parameters:

Name Type
aComponent RegisteredComponent

Returns: string[]


_getTypeByLayout

_getTypeByLayout(aLayout: Layout, aLayoutMode: string, aMapping: ByLayoutModeMapping, aMarkupService: MarkupService): Observable<ComponentTypeRef<any>>

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

Parameters:

Name Type
aLayout Layout
aLayoutMode string
aMapping ByLayoutModeMapping
aMarkupService MarkupService

Returns: Observable<ComponentTypeRef<any>>


_getTypeBySelector

_getTypeBySelector(aSelector: string, aLayoutMode: string, aMapping: ByLayoutModeMapping): Observable<ComponentTypeRef<any>>

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

Parameters:

Name Type
aSelector string
aLayoutMode string
aMapping ByLayoutModeMapping

Returns: Observable<ComponentTypeRef<any>>


_getTypeByTemplateType

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

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

Parameters:

Name Type
aType string
aLayoutMode string
aMarkupService MarkupService

Returns: Observable<ComponentTypeRef<any>>


_getTypeName

_getTypeName(aType: Type<any>): string

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

Tries to decode the name from the type

Parameters:

Name Type Description
aType Type<any> the type

Returns: string the name


_onRegisterComponent

_onRegisterComponent(aController: string, aLayoutMode: string, aTypeRef: ComponentTypeRef<any>, aMap: ByLayoutModeMapping): void

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

Parameters:

Name Type
aController string
aLayoutMode string
aTypeRef ComponentTypeRef<any>
aMap ByLayoutModeMapping

Returns: void


_onRegisteredComponent

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

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

Parameters:

Name Type
aComponent RegisteredComponent
aMap ByLayoutModeMapping

Returns: void


_registerByLayoutModesAndSelectors

_registerByLayoutModesAndSelectors(aTypeRef: ComponentTypeRef<any>, aLayoutModes: string[], aSelectors: string[], aMap: ByLayoutModeMapping): void

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

Parameters:

Name Type
aTypeRef ComponentTypeRef<any>
aLayoutModes string[]
aSelectors string[]
aMap ByLayoutModeMapping

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:11

Type declaration


id

● id: null = null

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


kind

● kind: undefined[] = []

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


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:9


typeId

● typeId: null = null

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



@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:15


@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:6


<Const> SDK_MESSAGE_HANDLER

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

Defined in services/dependency/message.ts:9


@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

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

Parameters:

Name Type
aKey string
aCallback CacheCallback<V>
Optional aLogger Logger

Returns: V


Functions

<Const> _createDigest

_createDigest(aToken: string): string

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

Parameters:

Name Type
aToken string

Returns: string


<Const> _getHash

_getHash(aToken: string): string

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

Parameters:

Name 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:

Name 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:

Name 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:11


@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:15

build

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

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


version

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

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



@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

Functions


Functions

selectApiURL

selectApiURL(aService?: HubInfoConfig): HubInfoUrlProvider

Defined in services/hub-info/hub-info.service.ts:105

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: HubInfoUrlProvider


selectBaseURL

selectBaseURL(aService?: HubInfoConfig): HubInfoUrlProvider

Defined in services/hub-info/hub-info.service.ts:115

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: HubInfoUrlProvider


selectCycleHandlingStrategy

selectCycleHandlingStrategy(aService?: HubInfoConfig): CYCLE_HANDLING | string

Defined in services/hub-info/hub-info.service.ts:131

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: CYCLE_HANDLING | string


selectDeliveryURL

selectDeliveryURL(aService?: HubInfoConfig): HubInfoUrlProvider

Defined in services/hub-info/hub-info.service.ts:109

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: HubInfoUrlProvider


selectFetchLevels

selectFetchLevels(aService?: HubInfoConfig): number

Defined in services/hub-info/hub-info.service.ts:137

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: number


selectHttpOptions

selectHttpOptions(aService?: HubInfoConfig): HttpResourceOptions

Defined in services/hub-info/hub-info.service.ts:119

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: HttpResourceOptions


selectHttpPreviewOptions

selectHttpPreviewOptions(aService?: HubInfoConfig): HttpResourceOptions

Defined in services/hub-info/hub-info.service.ts:125

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: HttpResourceOptions


@ibm-wch-sdk/ng > "services/hub-info/tokens"

External module: "services/hub-info/tokens"

Index

Variables


Variables

<Const> WCH_HUB_INFO_CONFIG

● WCH_HUB_INFO_CONFIG: InjectionToken<HubInfoConfig> = new InjectionToken( 'HubInfoConfig' )

Defined in services/hub-info/tokens.ts:83


<Const> WCH_TOKEN_API_URL

● WCH_TOKEN_API_URL: "D86BA418-5252-45BB-938C-E17BBE044D0F" = "D86BA418-5252-45BB-938C-E17BBE044D0F"

Defined in services/hub-info/tokens.ts:15

URL to access the API layer

Naming of this field according to the field in the rendering context

example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'

example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_BASE_URL

● WCH_TOKEN_BASE_URL: "F5EBA2A4-2C6F-4FEF-B3D5-3C801CB1F2EB" = "F5EBA2A4-2C6F-4FEF-B3D5-3C801CB1F2EB"

Defined in services/hub-info/tokens.ts:40

URL that represents the base URL of the path based routing of the application. This prefix will be preserved when generating and recognizing URLs. If this property is not configured, then it will be decoded from the window location.

example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'

example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

example: 'https://my.external.example.com/'

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_CYCLE_HANDLING_STRATEGY

● WCH_TOKEN_CYCLE_HANDLING_STRATEGY: "FAB70C09-F04A-4702-A8CC-87D3A3CED224" = "FAB70C09-F04A-4702-A8CC-87D3A3CED224"

Defined in services/hub-info/tokens.ts:72

Optionally specify how the SDK is supposed to deal with cyclic references in the content data structure. Per default the rendering context will break cycles by representing the duplicate element in a reference path by an unresolved reference. When configuring the strategy to {@link CYCLE_HANDLING.RESOLVE}, the ContentrefComponent will use a resolved refence when rendering the context, instead of the unresolved reference. This bears the risk of an infinite loop during rendering. The actual rendering context objects will still not have cycles, so a JSON serialization of these objects will produce a valid result.

Default is {@link CYCLE_HANDLING.BREAK}

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_DELIVERY_URL

● WCH_TOKEN_DELIVERY_URL: "4BEFD6AD-FA4C-42D7-8C4C-2DCA38CDB499" = "4BEFD6AD-FA4C-42D7-8C4C-2DCA38CDB499"

Defined in services/hub-info/tokens.ts:27

URL to access the delivery

Naming of this field according to the field in the rendering context

example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'

example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_FETCH_LEVELS

● WCH_TOKEN_FETCH_LEVELS: "62906A7D-0DE3-4404-AE7C-89E5FD91C72D" = "62906A7D-0DE3-4404-AE7C-89E5FD91C72D"

Defined in services/hub-info/tokens.ts:81

Number of levels to fetch per request to the rendering context. If missing all levels will be fetched.

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_HTTP_OPTIONS

● WCH_TOKEN_HTTP_OPTIONS: "536C2178-F41A-4F56-AF89-83B52E5274D9" = "536C2178-F41A-4F56-AF89-83B52E5274D9"

Defined in services/hub-info/tokens.ts:47

Optionally specify how the SDK makes outbound requests

see: [[HubInfoConfig]]


<Const> WCH_TOKEN_HTTP_PREVIEW_OPTIONS

● WCH_TOKEN_HTTP_PREVIEW_OPTIONS: "3AC667BA-FBAE-426D-BE7C-00DF1364280D" = "3AC667BA-FBAE-426D-BE7C-00DF1364280D"

Defined in services/hub-info/tokens.ts:54

Optionally specify how the SDK makes outbound requests for the preview case

see: [[HubInfoConfig]]


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

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

Index

Classes


@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: UnaryFunction<string, Logger> = createConsoleLogger

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


<Const> CREATE_EMPTY_LOGGER

● CREATE_EMPTY_LOGGER: UnaryFunction<string, Logger> = createEmptyLogger

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


<Const> _LOGGERS

● _LOGGERS: object

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

Type declaration


<Let> _hasLoggerDelegateOverride

● _hasLoggerDelegateOverride: boolean = false

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


<Let> _loggerDelegateOverride

● _loggerDelegateOverride: any

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


<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:110


Functions

_getLogger

_getLogger(aName: any): any

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

Parameters:

Name Type
aName any

Returns: any


_getLoggerDelegate

_getLoggerDelegate(): any

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

Returns: any


_isLogging

_isLogging(): boolean

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

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:76

Parameters:

Name Type
aFunction Function
aArgs IArguments

Returns: void


_logError

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_logErrorDeferred

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_logInfo

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_logInfoDeferred

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_logWarn

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_logWarnDeferred

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

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

Parameters:

Name Type
aType string
Rest aArgs any[]

Returns: void


_refreshLoggers

_refreshLoggers(): void

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

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:13

Constructs a proxy around our logger

Parameters:

Name 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

Type aliases

Variables

Functions


Type aliases

MappingEntry

Ƭ MappingEntry: Record<string, Selector>

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


Selector

Ƭ Selector: string | Type<any>

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


Variables

<Const> EMPTY_ARRAY

● EMPTY_ARRAY: string[] = []

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


<Const> EMPTY_LAYOUT_MODES

● EMPTY_LAYOUT_MODES: string[] = [DEFAULT_LAYOUT_MODE]

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


<Const> LOGGER

● LOGGER: "MappingsService" = "MappingsService"

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


Functions

_findMappingByKind

_findMappingByKind(aKeys: string[], aMap: Mappings): MappingEntry | undefined

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

Parameters:

Name Type
aKeys string[]
aMap Mappings

Returns: MappingEntry | undefined


_getIds

_getIds(aMapping: RegisteredMapping): string[]

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

Parameters:

Name Type
aMapping RegisteredMapping

Returns: string[]


_getKinds

_getKinds(aMapping: RegisteredMapping): string[]

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

Parameters:

Name Type
aMapping RegisteredMapping

Returns: string[]


_getLayoutModes

_getLayoutModes(aMapping: RegisteredMapping): string[]

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

Parameters:

Name Type
aMapping RegisteredMapping

Returns: string[]


_getMappingById

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

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

Parameters:

Name Type
aKey string | null | undefined
aMap Mappings

Returns: MappingEntry | undefined


_getMappingByKind

_getMappingByKind(aKeys: string[] | null | undefined, aMap: Mappings): MappingEntry | undefined

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

Parameters:

Name Type
aKeys 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:223

Parameters:

Name Type
aLayoutMode string
aRenderingContext RenderingContext
aMap Mappings

Returns: string | undefined


_getSelectors

_getSelectors(aMapping: RegisteredMapping): Selector[]

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

Parameters:

Name Type
aMapping RegisteredMapping

Returns: Selector[]


_onRegisterMapping

_onRegisterMapping(aId: string, aSelector: Selector, aLayoutMode: string, aMap: Record<string, MappingEntry>): void

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

Parameters:

Name Type
aId string
aSelector Selector
aLayoutMode string
aMap Record<string, MappingEntry>

Returns: void


_onRegisteredMapping

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

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

Parameters:

Name Type
aMapping RegisteredMapping
aMap Mappings

Returns: void


_registerAll

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

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

Parameters:

Name Type
aIds string[]
aKinds string[]
aModes string[]
aSelectors Selector[]
aMap Mappings

Returns: void


_registerAllMappings

_registerAllMappings(aIds: string[], aModes: string[], aSelectors: Selector[], aMap: Record<string, MappingEntry>): void

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

Parameters:

Name Type
aIds string[]
aModes string[]
aSelectors Selector[]
aMap Record<string, MappingEntry>

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:256

Parameters:

Name 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:80

Parameters:

Name 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:7

Type declaration

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

Parameters:

Name Type
context RenderingContext
Optional options any

Returns: string


Variables

<Const> KEY_PROVIDERS

● KEY_PROVIDERS: string | symbol = createSymbol()

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


@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/resolver/content.resolver.service"

External module: "services/resolver/content.resolver.service"

Index

Classes

Variables


Variables

<Const> LOGGER

● LOGGER: "ContentResolverService" = "ContentResolverService"

Defined in services/resolver/content.resolver.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:12


@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


Variables

<Const> LOGGER

● LOGGER: "UrlsService" = "UrlsService"

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


@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:154


<Const> EMPTY_PAGE_SEARCH_RESULT

● EMPTY_PAGE_SEARCH_RESULT: PageSearchResult[] = []

Defined in services/wch.service.ts:125


<Const> EMPTY_RENDERING_CONTEXTS

● EMPTY_RENDERING_CONTEXTS: RenderingContext[] = []

Defined in services/wch.service.ts:126


<Const> EMPTY_RENDERING_CONTEXTS_SEQUENCE

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

Defined in services/wch.service.ts:138


<Const> EMPTY_RENDERING_CONTEXT_SEARCH_RESULT

● EMPTY_RENDERING_CONTEXT_SEARCH_RESULT: RenderingContextSearchResult[] = []

Defined in services/wch.service.ts:124


<Const> EMPTY_SITE_PAGES_SEQUENCE

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

Defined in services/wch.service.ts:141


<Const> LOGGER

● LOGGER: "WchService" = "WchService"

Defined in services/wch.service.ts:150


<Const> NO_RENDERING_CONTEXT

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

Defined in services/wch.service.ts:145


<Const> UNKNOWN_RENDERING_CONTEXT

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

Defined in services/wch.service.ts:148


<Const> _BehaviorSubject

● _BehaviorSubject: BehaviorSubject = BehaviorSubject

Defined in services/wch.service.ts:122


<Const> _Subject

● _Subject: Subject = Subject

Defined in services/wch.service.ts:151


Functions

_pluckDocument

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

Defined in services/wch.service.ts:162

Extracts the document element from a search result

Type parameters:

T

Parameters:

Name Type Description
aSearchResult SearchResult<T> the result

Returns: T the document


_pluckSiteId

_pluckSiteId(aSite: Site): string

Defined in services/wch.service.ts:172

Extracts the site ID from the site

Parameters:

Name 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:127

numFound

● numFound: number = 0

Defined in services/wch.service.ts:128


renderingContexts

● renderingContexts: RenderingContext[] = EMPTY_RENDERING_CONTEXTS

Defined in services/wch.service.ts:129



<Const> EMPTY_SITE_PAGES_QUERY

EMPTY_SITE_PAGES_QUERY: object

Defined in services/wch.service.ts:131

numFound

● numFound: number = 0

Defined in services/wch.service.ts:132


sitePages

● sitePages: undefined[] = []

Defined in services/wch.service.ts:133



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

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

Index

Classes

Functions


Functions

opAssertInAngularZone

opAssertInAngularZone<T>(): MonoTypeOperatorFunction<T>

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

Helper operator to assert that a function is executed in an angular zone

Type parameters:

T

Returns: MonoTypeOperatorFunction<T> the assertion operator


@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:42


BootstrapSource

Ƭ BootstrapSource: T | string | ObservableInput<T>

Defined in utils/bootstrap.utils.ts:41


Variables

<Const> LOGGER

● LOGGER: "BootstrapUtils" = "BootstrapUtils"

Defined in utils/bootstrap.utils.ts:37


<Const> data

● data: object

Defined in utils/bootstrap.utils.ts:65

Type declaration


Functions

<Const> _addDebug

_addDebug<T>(aObject: T): T

Defined in utils/bootstrap.utils.ts:39

Type parameters:

T

Parameters:

Name Type
aObject T

Returns: T


_bootstrapClear

_bootstrapClear(): void

Defined in utils/bootstrap.utils.ts:139

Returns: void


_bootstrapGet

_bootstrapGet(aKey: string): Observable<AnyJson>

Defined in utils/bootstrap.utils.ts:152

Parameters:

Name Type
aKey string

Returns: Observable<AnyJson>


_bootstrapInputToObservable

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

Defined in utils/bootstrap.utils.ts:73

Converts the input to an observable of the desired type

Type parameters:

T

Parameters:

Name 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:167

Parameters:

Name 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:200

Parameters:

Name Type
aContext ContentItemWithLayout | string

Returns: Subscription | undefined


_bootstrapPutSite

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

Defined in utils/bootstrap.utils.ts:244

Parameters:

Name Type
aInput BootstrapInput<Site>
Optional aSiteId string

Returns: Subscription | undefined


_bootstrapRemove

_bootstrapRemove(aKey: string): void

Defined in utils/bootstrap.utils.ts:186

Parameters:

Name Type
aKey string

Returns: void


_generatorToObservable

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

Defined in utils/bootstrap.utils.ts:106

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

Type parameters:

T

Parameters:

Name 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:123

Parameters:

Name Type
aKey string
aValue BootstrapInput<AnyJson>

Returns: void


_isBootstrapInput

_isBootstrapInput<T>(aValue: any): boolean

Defined in utils/bootstrap.utils.ts:52

Tests if the value is a valid input

Type parameters:

T

Parameters:

Name 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:13


<Const> _ReplaySubject

● _ReplaySubject: ReplaySubject = ReplaySubject

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


<Const> _mappingsSubject

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

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


Functions

_destroy

_destroy(): void

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

Returns: void


_getRegistered

_getRegistered(): Observable<RegisteredMapping>

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

Returns: Observable<RegisteredMapping>


_registerFromLayoutComponent

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

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

Parameters:

Name Type
aDirective LayoutComponentDirective
aType Type<any>

Returns: void


_registerFromMappingDirective

_registerFromMappingDirective(aDirective: LayoutMappingDirective, aComponent: Type<any>): void

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

Parameters:

Name Type
aDirective LayoutMappingDirective
aComponent Type<any>

Returns: void


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

External module: "utils/component.utils"

Index

Interfaces

Variables

Functions


Variables

<Const> EMPTY_ARRAY

● EMPTY_ARRAY: string[] = []

Defined in utils/component.utils.ts:21


<Const> KEY_ANNOTATIONS

● KEY_ANNOTATIONS: string | symbol = createSymbol()

Defined in utils/component.utils.ts:24


<Const> LOGGER

● LOGGER: "ComponentUtils" = "ComponentUtils"

Defined in utils/component.utils.ts:18


<Const> REFLECT_ANNOTATIONS

● REFLECT_ANNOTATIONS: "annotations" = "annotations"

Defined in utils/component.utils.ts:22


<Const> _ReplaySubject

● _ReplaySubject: ReplaySubject = ReplaySubject

Defined in utils/component.utils.ts:19


<Const> componentsObservable

● componentsObservable: ReplaySubject<RegisteredComponent> = componentsSubject

Defined in utils/component.utils.ts:82


<Const> componentsSubject

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

Defined in utils/component.utils.ts:81


Functions

_addAnnotation

_addAnnotation(aAnnotation: any, aHost: any): any[]

Defined in utils/component.utils.ts:35

Adds one of our own annotations to the host and returns the set of annotations.

Parameters:

Name Type Description
aAnnotation any the annotation to add
aHost any the host to add the annotations to

Returns: any[] the list of annotations


_destroy

_destroy(): void

Defined in utils/component.utils.ts:102

Returns: void


_getAllAnnotations

_getAllAnnotations(aHost: any): any[]

Defined in utils/component.utils.ts:56

Returns all known annotations, which are a combination of our own annotations and the angular annotations.

Parameters:

Name Type Description
aHost any the type to get the annotations from

Returns: any[] the list of annotations


_getAnnotations

_getAnnotations(aHost: any): any[]

Defined in utils/component.utils.ts:45

Returns our annotations for a function type

Parameters:

Name Type Description
aHost any the type to get the annotations from

Returns: any[] the list of annotations


_getRegisteredComponents

_getRegisteredComponents(): Observable<RegisteredComponent>

Defined in utils/component.utils.ts:84

Returns: Observable<RegisteredComponent>


_getSelector

_getSelector(aSelector: string | Type<any> | null | undefined): string | undefined

Defined in utils/component.utils.ts:123

Parameters:

Name Type
aSelector string | Type<any> | null | undefined

Returns: string | undefined


_getSelectors

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

Defined in utils/component.utils.ts:148

Parameters:

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

Returns: string[]


_pluckSelector

_pluckSelector(aMetadata: any): any

Defined in utils/component.utils.ts:113

Extracts the selector

Parameters:

Name Type Description
aMetadata any metadata

Returns: any the selector


_registerComponent

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

Defined in utils/component.utils.ts:88

Parameters:

Name 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:

Name 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:

Name 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:14


<Const> JSONP_CALLBACK

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

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


<Const> LOGGER

● LOGGER: "HttpServiceOnJsonp" = "HttpServiceOnJsonp"

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


<Const> _JSONP_CALLBACK_PREFIX

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

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


<Const> _MODULE_NAME

● _MODULE_NAME: "WchSdk" = Sdk.MODULE_NAME

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


<Const> _assertInAngularZone

● _assertInAngularZone: assertInAngularZone = NgZone.assertInAngularZone

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

expect to run in an Angular zone


<Const> _assertNotInAngularZone

● _assertNotInAngularZone: assertNotInAngularZone = NgZone.assertNotInAngularZone

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

expect to NOT run in an Angular zone


Functions

_addCallback

_addCallback(aUrl: string): string

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

Adds the JSONP callback parameter to the URL

Parameters:

Name Type Description
aUrl string the URL

Returns: string the callback


_removeNode

_removeNode(aNode: HTMLScriptElement): void

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

Parameters:

Name 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:59

Type parameters:

T

Parameters:

Name 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:226

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

Parameters:

Name 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:8


<Const> _assign

● _assign: assign = Object.assign

Defined in utils/js.utils.ts:10


<Const> _defineProperties

● _defineProperties: defineProperties = Object.defineProperties

Defined in utils/js.utils.ts:11


<Const> _false

● _false: false = false

Defined in utils/js.utils.ts:21


<Const> _getPrototype

● _getPrototype: getPrototypeOf = Object.getPrototypeOf

Defined in utils/js.utils.ts:93


<Const> _keys

● _keys: keys = Object.keys

Defined in utils/js.utils.ts:26


<Const> _true

● _true: true = true

Defined in utils/js.utils.ts:16


<Const> opDistinctComponentTypeRef

● opDistinctComponentTypeRef: MonoTypeOperatorFunction<ComponentTypeRef<any>> = distinctUntilChanged(_isEqualComponentTypeRef)

Defined in utils/js.utils.ts:128


Functions

_concatArguments

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

Defined in utils/js.utils.ts:84

Parameters:

Name Type
aDst any[]
aArgs IArguments

Returns: any[]


_getClassName

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

Defined in utils/js.utils.ts:101

Tries to decode the classname

Parameters:

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

Returns: string


_isEqualComponentTypeRef

_isEqualComponentTypeRef(aLeft: ComponentTypeRef<any>, aRight: ComponentTypeRef<any>): boolean

Defined in utils/js.utils.ts:118

Parameters:

Name Type
aLeft ComponentTypeRef<any>
aRight ComponentTypeRef<any>

Returns: boolean


_perfCloneDeep

_perfCloneDeep(aValue: any): any

Defined in utils/js.utils.ts:33

Parameters:

Name Type
aValue any

Returns: any


_perfDeepEquals

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

Defined in utils/js.utils.ts:66

Parameters:

Name Type
aLeft any
aRight any

Returns: boolean


_perfFreezeDeep

_perfFreezeDeep(aValue: any): any

Defined in utils/js.utils.ts:49

Parameters:

Name Type
aValue any

Returns: any


@ibm-wch-sdk/ng > "utils/lazy.injector"

External module: "utils/lazy.injector"

Index

Functions


Functions

lazyInjector

lazyInjector<T,R>(aInjector: Injector, aToken: any, aDefault?: T, aTransform?: UnaryFunction<T, R>): Generator<R>

Defined in utils/lazy.injector.ts:14

Performs a lazy lookup of a dependency via an injector

Type parameters:

T

R

Parameters:

Name Type Description
aInjector Injector the injector
aToken any the token
Optional aDefault T an optional default of fallback token
Optional aTransform UnaryFunction<T, R>

Returns: Generator<R> lazy injection result


@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:

Name 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:

Name 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:

Name 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/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:

Name Type
aRenderingContext RenderingContext

Returns: void


@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:15

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

Type parameters:

T

Parameters:

Name 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:108

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

Type parameters:

K

O

T

Parameters:

Name 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?: SchedulerLike): ZoneSchedulers

Defined in utils/rx.utils.ts:86

Parameters:

Name Type
aZone NgZone
Optional aDelegate SchedulerLike

Returns: ZoneSchedulers


_distinctSubject

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

Defined in utils/rx.utils.ts:96

Type parameters:

T

Parameters:

Name Type
aSubject Subject<T>

Returns: Observable<T>


_unsubscribeLater

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

Defined in utils/rx.utils.ts:25

Parameters:

Name 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:

Name Type Description
aSegments UrlSegment[] the segments

Returns: string the path


@ibm-wch-sdk/ng > "utils/symbol"

External module: "utils/symbol"

Index

Variables


Variables

<Const> createSymbol

● createSymbol: Generator<symbol | string> = typeof Symbol === UNDEFINED_TYPE ? hashRandomIdentifier : Symbol

Defined in utils/symbol.ts:9

Creates a unique symbol, either as a real symbol or as a random string if symbols are not available.

returns: the unique symbol


@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): string

Defined in utils/url.utils.ts:12

Parameters:

Name Type
aUrl URL | string

Returns: string


_ensureTrailingSlash

_ensureTrailingSlash(aUrl: string): string

Defined in utils/url.utils.ts:6

Parameters:

Name 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(), opShareLast )

Defined in utils/urls.ts:16

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:8


<Const> BFF_SECURE_URL

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

Defined in utils/urls.ts:9


<Const> DEFAULT_PUBLIC_URL

● DEFAULT_PUBLIC_URL: true = true

Defined in utils/urls.ts:7


<Const> USE_PUBLIC_URL

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

Defined in utils/urls.ts:12


@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:12


<Const> KEY_ON_RENDERING_CONTEXT

● KEY_ON_RENDERING_CONTEXT: "onRenderingContext" = "onRenderingContext"

Defined in utils/wch.utils.ts:11


<Const> LOGGER

● LOGGER: "WchUtils" = "WchUtils"

Defined in utils/wch.utils.ts:9


Functions

_getAppBaseHref

_getAppBaseHref(aBaseUrl?: HubInfoUrlProvider, aDoc?: Document): string

Defined in utils/wch.utils.ts:52

Decodes the base href of the application from the config or the doc fallback

Parameters:

Name Type Description
Optional aBaseUrl HubInfoUrlProvider the optional base URL
Optional aDoc Document the document

Returns: string the path prefix that is supposed to be recognized as URLs


_getAppBaseURL

_getAppBaseURL(aBaseUrl?: HubInfoUrlProvider, aDoc?: Document): string

Defined in utils/wch.utils.ts:34

Decodes the base href of the application from the config or the doc fallback

Parameters:

Name Type Description
Optional aBaseUrl HubInfoUrlProvider the optional base URL
Optional aDoc Document the document

Returns: string the path prefix that is supposed to be recognized as URLs


_getPrefix

_getPrefix(aUrl: string): string

Defined in utils/wch.utils.ts:20

Decodes the path prefix from the URL that is the starting segment

Parameters:

Name Type Description
aUrl string the potentially absolute URL

Returns: string the path prefix


_getRenderingContextURL

_getRenderingContextURL(aID: string): Observable<string>

Defined in utils/wch.utils.ts:66

Parameters:

Name Type
aID string

Returns: Observable<string>


_getSiteURL

_getSiteURL(): Observable<string>

Defined in utils/wch.utils.ts:77

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 module.

HubInfoService

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

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.

Injection Tokens

Although the typical way to configure the WchNgModule is via its forRoot method, all configuration options are handled as tokens of the dependency injector. This makes it possible to configure individual aspects on a granular level. The injection tokens are:

  • WCH_TOKEN_API_URL
  • WCH_TOKEN_DELIVERY_URL
  • WCH_TOKEN_BASE_URL
  • WCH_TOKEN_HTTP_OPTIONS
  • WCH_TOKEN_HTTP_PREVIEW_OPTIONS
  • WCH_TOKEN_CYCLE_HANDLING_STRATEGY
  • WCH_TOKEN_FETCH_LEVELS

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
  • RenderingContextProvider

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentComponent(aWchService: WchService): ContentComponent

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

Parameters:

Name Type
aWchService WchService

Returns: ContentComponent


Properties

id

● id: string

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


layoutMode

● layoutMode: string

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


levels

● levels: string | number | null | undefined

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


onComponent

● onComponent: ReplaySubject<any> = createSingleSubject()

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


onLayoutMode

● onLayoutMode: Observable<string>

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

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


onState

● onState: Observable<ComponentState>

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

The component state


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

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:82

Parameters:

Name Type
aRenderer Renderer2
aElement ElementRef
aWchService WchService

Returns: ContentQueryComponent


Properties

layoutMode

● layoutMode: string

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


levels

● levels: string | number | null | undefined

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


onLayoutMode

● onLayoutMode: Observable<string>

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


onNumFound

● onNumFound: Observable<number>

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


onRenderingContexts

● onRenderingContexts: Observable<RenderingContext[]>

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


query

● query: QueryInput

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


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Overrides AbstractLifeCycleComponent.ngAfterViewInit

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

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

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
  • RenderingContextProvider
  • OnDestroy

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentrefComponent(aCmp: ComponentsService, aMapping: LayoutMappingService, aWchService: WchService): ContentrefComponent

Overrides AbstractRenderingComponent.constructor

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

Parameters:

Name Type
aCmp ComponentsService
aMapping LayoutMappingService
aWchService WchService

Returns: ContentrefComponent


Properties

<Protected> _id

● _id: string

Inherited from AbstractRenderingComponent._id

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


<Optional> cycleHandlingStrategy

● cycleHandlingStrategy: CYCLE_HANDLING | string

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


layoutMode

● layoutMode: string

Overrides AbstractRenderingComponent.layoutMode

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


onComponent

● onComponent: ReplaySubject<any> = createSingleSubject()

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

Output that will be triggered when a new component was created


onLayoutMode

● onLayoutMode: Observable<string>

Inherited from AbstractRenderingComponent.onLayoutMode

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Inherited from AbstractRenderingComponent.onRenderingContext

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


onState

● onState: Observable<ComponentState>

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

The component state


onType

● onType: Observable<ComponentTypeRef<any>>

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

The current type to render


renderingContext

● renderingContext: RenderingContext

Overrides AbstractRenderingComponent.renderingContext

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


Accessors

<Protected> context

get context(): Observable<RenderingContext>

Inherited from AbstractRenderingComponent.context

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

Returns: Observable<RenderingContext>


<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractRenderingComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


trackByComponentId

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

Inherited from AbstractRenderingComponent.trackByComponentId

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

Parameters:

Name 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:359

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


@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:321

Parameters:

Name Type
markupService MarkupService

Returns: ComponentsService


Properties

getTypeByLayout

● getTypeByLayout: function

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

Type declaration

▸(aLayout: Layout, aLayoutMode?: string): Observable<ComponentTypeRef<any>>

Parameters:

Name Type
aLayout Layout
Optional aLayoutMode string

Returns: Observable<ComponentTypeRef<any>>


getTypeBySelector

● getTypeBySelector: function

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

Type declaration

▸(aSelector: string, aLayoutMode?: string): Observable<ComponentTypeRef<any>>

Parameters:

Name Type
aSelector string
Optional aLayoutMode string

Returns: Observable<ComponentTypeRef<any>>


ngOnDestroy

● ngOnDestroy: function

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

Type declaration

▸(): void

Returns: void


registerType

● registerType: function

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

Type declaration

▸(aController: string | string[], aType: ComponentTypeRef<any>, aLayoutModes?: string | string[]): void

Parameters:

Name Type
aController string | string[]
aType ComponentTypeRef<any>
Optional aLayoutModes string | string[]

Returns: void


<Static> DEFAULT_LAYOUT

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

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


<Static> PAGE_NOT_FOUND_LAYOUT

● PAGE_NOT_FOUND_LAYOUT: "wch-404" = _PAGE_NOT_FOUND_LAYOUT

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


@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:302

Returns: LayoutMappingService


Properties

getSelector

● getSelector: function

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

Type declaration

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

Parameters:

Name Type
aLayoutMode string
aRenderingContext RenderingContext

Returns: string | undefined


ngOnDestroy

● ngOnDestroy: function

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

Type declaration

▸(): void

Returns: void


registerMapping

● registerMapping: function

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

Type declaration

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

Parameters:

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

Returns: void


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

Class: DefaultComponent

Hierarchy

DefaultComponent

Index


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

Class: PageComponent

Hierarchy

AbstractBaseComponent

↳ PageComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new PageComponent(aRoute: ActivatedRoute, aWchService: WchService, aTitleService: Title, aMetaService: Meta): PageComponent

Overrides AbstractBaseComponent.constructor

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

Parameters:

Name Type
aRoute ActivatedRoute
aWchService WchService
aTitleService Title
aMetaService Meta

Returns: PageComponent


Properties

layoutMode

● layoutMode: string

Inherited from AbstractBaseComponent.layoutMode

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


onComponent

● onComponent: ReplaySubject<any> = createSingleSubject()

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


onLayoutMode

● onLayoutMode: Observable<string>

Overrides AbstractBaseComponent.onLayoutMode

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Overrides AbstractBaseComponent.onRenderingContext

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


onState

● onState: Observable<ComponentState>

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

The component state


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: PagerefComponent

Hierarchy

AbstractLifeCycleComponent

↳ PagerefComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new PagerefComponent(aWchService: WchService): PagerefComponent

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

Parameters:

Name Type
aWchService WchService

Returns: PagerefComponent


Properties

layoutMode

● layoutMode: string

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


levels

● levels: string | number | null | undefined

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


onComponent

● onComponent: ReplaySubject<any> = createSingleSubject()

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


onLayoutMode

● onLayoutMode: Observable<string>

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

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


onState

● onState: Observable<ComponentState>

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

The component state


sitePage

● sitePage: SitePage

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


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: ContentPathComponent

Hierarchy

AbstractBaseComponent

↳ ContentPathComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new ContentPathComponent(aWchService: WchService): ContentPathComponent

Overrides AbstractBaseComponent.constructor

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

Parameters:

Name Type
aWchService WchService

Returns: ContentPathComponent


Properties

layoutMode

● layoutMode: string

Inherited from AbstractBaseComponent.layoutMode

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


levels

● levels: string | number | null | undefined

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


onComponent

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

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


onLayoutMode

● onLayoutMode: Observable<string>

Overrides AbstractBaseComponent.onLayoutMode

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


onPath

● onPath: Observable<string>

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Overrides AbstractBaseComponent.onRenderingContext

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


onState

● onState: Observable<ComponentState>

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

The component state


path

● path: string

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


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: AbstractBaseComponent

Hierarchy

AbstractLifeCycleComponent

↳ AbstractBaseComponent

PageComponent

ContentPathComponent

SiteComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new AbstractBaseComponent(): AbstractBaseComponent

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

Returns: AbstractBaseComponent


Properties

layoutMode

● layoutMode: string

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


onLayoutMode

● onLayoutMode: Observable<string>

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

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


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Inherited from AbstractLifeCycleComponent.ngOnDestroy

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

see: OnDestroy

override:

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: AbstractRenderingComponent

Hierarchy

AbstractLifeCycleComponent

↳ AbstractRenderingComponent

ContentrefComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new AbstractRenderingComponent(): AbstractRenderingComponent

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

Returns: AbstractRenderingComponent


Properties

<Protected> _id

● _id: string

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


layoutMode

● layoutMode: string

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

The current layout mode for convenience


onLayoutMode

● onLayoutMode: Observable<string>

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

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


renderingContext

● renderingContext: RenderingContext

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

The current rendering context for convenience


Accessors

<Protected> context

get context(): Observable<RenderingContext>

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

Returns: Observable<RenderingContext>


<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


trackByComponentId

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

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

Parameters:

Name 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:359

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: AbstractLifeCycleComponent

Base class that allows to register life cycle hooks. This class is supposed to be subclassed before use.

The 'ngXXX' methods override the methods from the Angular life cycle interfaces. If you overridde any of these methods make sure to call the super method.

The 'onXXX' methods expose observables that will be triggered when the life cycle method occurs. This is a convenient way to register hooks in the constructor of a subclass without having to override any method.

The {@link #onOnDestroy} observable is especially useful, since it can be used as a termination signal for automatic unsubscriptions via the http://reactivex.io/documentation/operators/takeuntil.html operation.

Note that hooks such as onOnInit and onOnDestroy only fire once. If you depend on such a hook in an observable chain more than once make sure to share the emissions (typically via shareReplay )

Hierarchy

AbstractLifeCycleComponent

ContentComponent

ContentQueryComponent

AbstractRenderingComponent

AbstractBaseComponent

PagerefComponent

Implements

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

Index

Accessors

Methods


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

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

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:

Name Type Description
aSubject Subject<T> the subject

Returns: PropertyDescriptor the property descriptor


ngAfterContentChecked

ngAfterContentChecked(): void

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

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

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

see: OnDestroy

override:

Returns: void


ngOnInit

ngOnInit(): void

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

see: OnInit

override:

Returns: void


safeSubscribe

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

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

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Class: SiteComponent

Hierarchy

AbstractBaseComponent

↳ SiteComponent

Implements

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

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new SiteComponent(aWchService: WchService): SiteComponent

Overrides AbstractBaseComponent.constructor

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

Parameters:

Name Type
aWchService WchService

Returns: SiteComponent


Properties

layoutMode

● layoutMode: string

Inherited from AbstractBaseComponent.layoutMode

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


onComponent

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

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


onLayoutMode

● onLayoutMode: Observable<string>

Overrides AbstractBaseComponent.onLayoutMode

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


onRenderingContext

● onRenderingContext: Observable<RenderingContext>

Overrides AbstractBaseComponent.onRenderingContext

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


Accessors

<Protected> onAfterContentChecked

get onAfterContentChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentChecked

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

see: AfterContentChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterContentInit

get onAfterContentInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterContentInit

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

see: AfterContentInit

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewChecked

get onAfterViewChecked(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewChecked

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

see: AfterViewChecked

Returns: Observable<void> the observable representation of this callback


<Protected> onAfterViewInit

get onAfterViewInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onAfterViewInit

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

see: AfterViewInit

Returns: Observable<void> the observable representation of this callback


<Protected> onDoCheck

get onDoCheck(): Observable<void>

Inherited from AbstractLifeCycleComponent.onDoCheck

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

see: DoCheck

Returns: Observable<void> the observable representation of this callback


<Protected> onOnChanges

get onOnChanges(): Observable<SimpleChanges>

Inherited from AbstractLifeCycleComponent.onOnChanges

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

see: OnChanges

Returns: Observable<SimpleChanges> the observable representation of this callback


<Protected> onOnDestroy

get onOnDestroy(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnDestroy

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

see: OnDestroy

Returns: Observable<void> the observable representation of this callback


<Protected> onOnInit

get onOnInit(): Observable<void>

Inherited from AbstractLifeCycleComponent.onOnInit

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

see: OnInit

Returns: Observable<void> the observable representation of this callback


Methods

<Protected> describeSetter

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

Inherited from AbstractLifeCycleComponent.describeSetter

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

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:

Name 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:241

see: AfterContentChecked

override:

Returns: void


ngAfterContentInit

ngAfterContentInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterContentInit

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

see: AfterContentInit

override:

Returns: void


ngAfterViewChecked

ngAfterViewChecked(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewChecked

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

see: AfterViewChecked

override:

Returns: void


ngAfterViewInit

ngAfterViewInit(): void

Inherited from AbstractLifeCycleComponent.ngAfterViewInit

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

see: AfterViewInit

override:

Returns: void


ngDoCheck

ngDoCheck(): void

Inherited from AbstractLifeCycleComponent.ngDoCheck

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

see: DoCheck

override:

Returns: void


ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Inherited from AbstractLifeCycleComponent.ngOnChanges

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

see: OnChanges

override:

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Overrides AbstractLifeCycleComponent.ngOnDestroy

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

Returns: void


ngOnInit

ngOnInit(): void

Inherited from AbstractLifeCycleComponent.ngOnInit

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

see: OnInit

override:

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:393

Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.

deprecated: use takeUntil(onOnDestroy) instead

Type parameters:

T

Parameters:

Name Type Description
aObservable Subscribable<T> the observable to subscribe to
Optional aObserver PartialObserver<T> | function | string the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance.
Optional error function optional error handler
Optional complete function optional completion handler

Returns: void


<Protected> unsubscribeOnDestroy

unsubscribeOnDestroy(aSubscription: Subscription): void

Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy

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

Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.

deprecated: use takeUntil(onOnDestroy) instead

Parameters:

Name Type Description
aSubscription Subscription the subscription to unsubscribe on

Returns: void


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

Interface: ContentWithLayoutBootstrapDirective

Hierarchy

ContentWithLayoutBootstrapDirective

Index


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

Interface: SiteBootstrapDirective

Hierarchy

SiteBootstrapDirective

Index

Properties


Properties

<Optional> siteId

● siteId: string

Defined in decorators/bootstrap/site.bootstrap.directive.ts:7


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

Interface: Binding

Type parameters

T

Hierarchy

Binding

Index

Properties


Properties

name

● name: string

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


observable

● observable: Observable<T>

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


subscription

● subscription: Subscription

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


value

● value: T

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


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

Interface: LayoutComponentDirective

Hierarchy

LayoutComponentDirective

Index

Properties


Properties

<Optional> componentFactoryResolver

● componentFactoryResolver: ComponentFactoryResolver

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

The optional component factory resolver used to instantiate the component


<Optional> layoutMode

● layoutMode: string | string[]

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


<Optional> mappingId

● mappingId: string | string[]

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


<Optional> selector

● selector: string | string[]

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


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

Interface: LayoutMappingDirective

Hierarchy

LayoutMappingDirective

Index

Properties


Properties

<Optional> id

● id: string | string[]

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

Type IDs or content IDs to map this to


<Optional> kind

● kind: CONTENT_ITEM_KIND | CONTENT_ITEM_KIND[]

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

Type IDs to map this to


<Optional> layoutMode

● layoutMode: string | string[]

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


<Optional> selector

● selector: string | string[]

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


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

Class: ContentRefDirective

Hierarchy

ContentRefDirective

Implements

  • OnChanges
  • OnDestroy

Index

Constructors

Properties

Methods


Constructors

constructor

new ContentRefDirective(_viewContainerRef: ViewContainerRef, _cmpResolver: ComponentFactoryResolver, _activatedRoute: ActivatedRoute): ContentRefDirective

Defined in directives/contentref.directive.ts:83

Parameters:

Name Type
_viewContainerRef ViewContainerRef
_cmpResolver ComponentFactoryResolver
_activatedRoute ActivatedRoute

Returns: ContentRefDirective


Properties

<Private>``<Optional> _cc

● _cc: ComponentRef<any>

Defined in directives/contentref.directive.ts:83

The currently used component


<Private>``<Optional> _cr

● _cr: ComponentFactoryResolver

Defined in directives/contentref.directive.ts:73

The currently used resolver


<Private>``<Optional> _ct

● _ct: ComponentTypeRef<any>

Defined in directives/contentref.directive.ts:78

The currently used type


<Private> _r

● _r: ComponentFactoryResolver

Defined in directives/contentref.directive.ts:68

The default component factory resolver


<Private> _viewContainerRef

● _viewContainerRef: ViewContainerRef

Defined in directives/contentref.directive.ts:86


cmpResolver

● cmpResolver: ComponentFactoryResolver

Defined in directives/contentref.directive.ts:49


layoutMode

● layoutMode: string

Defined in directives/contentref.directive.ts:58


onComponent

● onComponent: Subject<any> = createSingleSubject()

Defined in directives/contentref.directive.ts:63

Output that will be triggered when a new component was created


renderingContext

● renderingContext: RenderingContext

Defined in directives/contentref.directive.ts:53


wchContentRef

● wchContentRef: ComponentTypeRef<any>

Defined in directives/contentref.directive.ts:47


Methods

ngOnChanges

ngOnChanges(changes: SimpleChanges): void

Defined in directives/contentref.directive.ts:98

Parameters:

Name Type
changes SimpleChanges

Returns: void


ngOnDestroy

ngOnDestroy(): void

Defined in directives/contentref.directive.ts:165

Returns: void


@ibm-wch-sdk/ng > "guards/root.page.guard" > SelectFirstRootPageGuard

Class: SelectFirstRootPageGuard

Hierarchy

SelectFirstRootPageGuard

Implements

  • CanActivate

Index

Constructors

Properties

Methods


Constructors

constructor

new SelectFirstRootPageGuard(aSearchService: SearchService, aRouter: Router): SelectFirstRootPageGuard

Defined in guards/root.page.guard.ts:22

Parameters:

Name Type
aSearchService SearchService
aRouter Router

Returns: SelectFirstRootPageGuard


Properties

<Private> aRouter

● aRouter: Router

Defined in guards/root.page.guard.ts:23


<Private> aSearchService

● aSearchService: SearchService

Defined in guards/root.page.guard.ts:23


Methods

canActivate

canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>

Defined in guards/root.page.guard.ts:25

Parameters:

Name Type
route ActivatedRouteSnapshot
state RouterStateSnapshot

Returns: Observable<boolean>


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

Interface: HubContext

Hierarchy

HubContext

Index

Properties


Properties

apiUrl

● apiUrl: URL

Defined in interfaces/hub-context.ts:10


deliveryUrl

● deliveryUrl: URL

Defined in interfaces/hub-context.ts:17


<Optional> isPreviewMode

● isPreviewMode: boolean

Defined in interfaces/hub-context.ts:22


@ibm-wch-sdk/ng > "module" > WchNgModule

Class: WchNgModule

Hierarchy

WchNgModule

Index

Constructors

Methods


Constructors

constructor

new WchNgModule(parentModule: WchNgModule, loggerService: LoggerProxy, depService: DependencyService): WchNgModule

Defined in module.ts:145

Parameters:

Name Type
parentModule WchNgModule
loggerService LoggerProxy
depService DependencyService

Returns: WchNgModule


Methods

<Static> forRoot

forRoot(aService?: HubInfoConfig): ModuleWithProviders

Defined in module.ts:55

Parameters:

Name Type
Optional aService HubInfoConfig

Returns: ModuleWithProviders


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

Class: WchNgComponentsModule

Hierarchy

WchNgComponentsModule

Index


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

Class: WchNgServicesModule

Hierarchy

WchNgServicesModule

Index

Constructors


Constructors

constructor

new WchNgServicesModule(parentModule: WchNgServicesModule, loggerService: LoggerProxy, depService: DependencyService): WchNgServicesModule

Defined in modules/services.module.ts:18

Parameters:

Name Type
parentModule WchNgServicesModule
loggerService LoggerProxy
depService DependencyService

Returns: WchNgServicesModule


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

Class: ApplicationConfigService

Hierarchy

ApplicationConfigService

Index

Constructors

Properties

Accessors


Constructors

constructor

new ApplicationConfigService(wchService: WchService): ApplicationConfigService

Defined in services/config/application.config.service.ts:12

Parameters:

Name Type
wchService WchService

Returns: ApplicationConfigService


Properties

<Private> wchService

● wchService: WchService

Defined in services/config/application.config.service.ts:14


Accessors

appConfig

get appConfig(): Observable<ApplicationConfig>

Defined in services/config/application.config.service.ts:17

Returns: Observable<ApplicationConfig>


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

Class: DependencyService

Hierarchy

DependencyService

Implements

  • OnDestroy

Index

Constructors

Properties

Accessors


Constructors

constructor

new DependencyService(loggerService: WchLoggerService, router: Router, urlsService: UrlsService, wchService: WchService, aInjector: Injector): DependencyService

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

Parameters:

Name Type
loggerService WchLoggerService
router Router
urlsService UrlsService
wchService WchService
aInjector Injector

Returns: DependencyService


Properties

<Private> _sdk

● _sdk: Sdk

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


ngOnDestroy

● ngOnDestroy: function

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

Type declaration

▸(): void

Returns: void


Accessors

sdk

get sdk(): Sdk

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

Returns: Sdk


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

Class: SdkNavigateByPathHandler

Executes a navigation event

Hierarchy

SdkNavigateByPathHandler

Implements

  • SdkMessageHandler

Index

Constructors

Properties


Constructors

constructor

new SdkNavigateByPathHandler(router: Router, loggerService: WchLoggerService): SdkNavigateByPathHandler

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

Parameters:

Name Type
router Router
loggerService WchLoggerService

Returns: SdkNavigateByPathHandler


Properties

handle

● handle: SdkMessageHandlerCallback

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


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

Class: SdkRefreshHandler

Executes a refresh event

Hierarchy

SdkRefreshHandler

Implements

  • SdkMessageHandler

Index

Constructors

Properties


Constructors

constructor

new SdkRefreshHandler(refreshService: RefreshService, loggerService: WchLoggerService): SdkRefreshHandler

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

Parameters:

Name Type
refreshService RefreshService
loggerService WchLoggerService

Returns: SdkRefreshHandler


Properties

handle

● handle: SdkMessageHandlerCallback

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


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

Class: SdkSetModeHandler

Executes a navigation event

Hierarchy

SdkSetModeHandler

Implements

  • SdkMessageHandler

Index

Constructors

Properties


Constructors

constructor

new SdkSetModeHandler(l

Readme

Keywords

none

Package Sidebar

Install

npm i @ibm-wch-sdk/ng

Weekly Downloads

4

Version

6.0.524

License

MIT

Unpacked Size

4.67 MB

Total Files

270

Last publish

Collaborators

  • marcin-pasiewicz
  • nikodem.graczewski.acoustic
  • willizard
  • pawel.galias-ac