ibm-wch-sdk-ng-edit
Module to attach inline-edit functionality to an WCH based Angular application. The library exposes the WchNgEditModule
module.
Changes
Details
Refer to the documentation.
Class documentation
Refer to the documentation.
Usage
Install the module via
npm install --save @ibm-wch-sdk/ng-edit
Add the module to your root application
@NgModule({
...
imports: [
...
WchNgEditModule.forRoot(environment)
],
...
})
export class AppModule { }
The module exposes the WchEditService
and the wchEditable
directive.
Prereqs
- @ibm-wch-sdk/ng
- Angular 6 or higher
Directive [wchEditable]
The directive attaches inline edit functionality to an element that is managed by WCH. The implementation in this library only dispatches the actual realization of the inline-edit functionality to a pluggable service provider.
The directive assumes that the Component contains a onRenderingContext
property that exposes the RenderingContext
of the item currently edited. This contract is fulfilled automatically if the component extends AbstractRenderingComponent.
The directive requires as a parameter a string identifying the editable property. This string must reference a property on the Component that has been bound to a field of the content item via a @RenderingContextBinding
directive. This directive contains the actual selector of the field. Note that this binding is done automatically if the components are generated via the CLI.
Example
<div wchEditable="myField">{{renderingContext.elements.myField.value}}</div>
assuming the following binding
export class MyComponent extends AbstractRenderingComponent {
@RenderingContextBinding('elements.myField.value') myField: string;
}
WchNgEditModule
The module exposes the directives and services. Per default it provides a service that loads the inline edit functionality from the site composer, when registering the module using the forRoot
method.
-
forRoot(config?)
: the method registers the module and provides a service to load inline edit from the site composer. The location to load the edit script from is configurable via the config script, typically used for local debugging of the script via theinlineEditUrl
member on the config object. A convenient way to inject this is to addinlineEditUrl
to your environment object and then inject the environment object.
Example
import { WchNgEditModule } from '@ibm-wch-sdk/ng-edit';
@NgModule({
...
imports: [
...
WchNgEditModule.forRoot(environment),
...
]
})
export class AppModule {
}
WchEditInfoService
The service allows to find out if an inline edit operation is taking place. Applications might want to stop any background processing during this period to avoid intercepting with the edit operation.
-
onEditing: Observable<boolean>
: the observable that tracks the state of the current inline edit operation. It is a shared observable that dispatches the current state and all subsequent states.
WchInlineEditService
Service providers implement the WchInlineEditService
and provide to the module. This service realizes the actual implementation of the inline edit operation.
-
registerComponent(el, accessor, onRenderingContext): Observable<EventTargetLike>
: this method will be invoked by the[wchEditable]
directive for every editable element in the application. Theel
parameter references the editable DOM element. Theaccessor
is string that represents the Javascript property accessor into the content items for the editable element.onRenderingContext
exposes the context of the currently edited item. The method returns an observable of an event emitter. Subscribing to this observable makes the registration active, unsubscribing cancels it. The event emitter is used to listen for edit events.
Edit events
The following inline edit events are recognized:
-
wchEditStart
: fired when an element enters into inline edit mode. This is used to track this status by theWchEditInfoService
. -
wchEditEnd
: fired when an element leaves inline edit mode (no matter whether the edit operation has been canceled or completed). This is used to track this status by theWchEditInfoService
.
WchHttpInlineEditService
The default implementation of the WchInlineEditService
. If the system is in preview mode, then the service lazily loads an inline edit script from a configurable location. Per default this location points to TODO, it can be overridden by the inlineEditUrl
property on the config object for the module.
Script requirements
The inline edit script will be loaded via an HTTP request and executed dynamically. It needs to contain an IIFE that returns a registration object with the following properties:
-
register(el, accessor, onRenderingContext): Handle
: the register method will be called for every editable element, so the implementation of the method can attach the necessary event handlers to the DOM element to make it editable. The method returns a handle that allows to cancel the registration and to attach event handlers to the inline edit process to monitor it. The method receives the DOM element via theel
parameter and anaccessor
that represents a Javascript property expression for the editable element in the content item. TheonRenderingContext
observable exposes the current context of the rendered item.
Handle
The handle needs to conform to one of the signatures of EventTargetLike from the RXJS spec. In addition it can expose a dispose
method.
-
dispose
: the dispose method on the handle will be invoked to cancel a registration. This happens when the editable element falls out of scope, e.g. because of a page switch or because the application decides to hide it or for any other reason. Implementers need to make sure to unregister all previously registered event handlers.
Require
The inline edit script can use a require
function that is available in its scope to load extra resources or services exposed by the SDK. The following services are available:
-
wch-config
: a configuration object containing URLs for the current tenant -
wch-info
: the hub configuration exposed to the SDK by the SPA -
wch-logger
: access to the SDK logging infrastructure. It is suggested to uses the exposed logger instead of console logs.
In addition the require
function will resolve URLs relative to the URL used to load the script and returns the result as text. All return values are exposed as promises.
Example for accessing the config:
const config = require('wch-config');
config.then(c => console.log(c.apiUrl));
Example for loading an extra resource:
const res = require('./myExtraResource.txt');
res.then(console.log);
Example for using the logger:
const logger = require('wch-logger');
logger
.then(logger => logger.get('MyModule'))
.then(log => log.info('some log output'));
Accessor Expression
Accessor expressions allow to identify the field of a Content Item that the inline edit operation refers to. It is a string in the format of a Javascript property accessor.
Examples
-
name
: accesses the name attribute of a content item. -
elements.myText.value
: accesses the value of a single valued element calledmyText
. -
elements.myTexts.values[2]
: accesses the third value of a multi valued element calledmyTexts
.
Changelog
Current
6.0.69
Changed
- Improved readme
Added
- Support for Angular 6
- Support for
group
elements - Initial version
WchNgEditModule
Module that allows to attach inline edit functionality to a WCH based Angular application.
Usage
Install the module
npm install --save ibm-wch-sdk-ng-edit
Import the module into your application. Use the environment variable to configure the module, this is the same configuration as for the main WchNgModule
module.
import {WchNgEditModule} from 'ibm-wch-sdk-ng-edit';
...
@NgModule({
...
imports: [
WchNgEditModule.forRoot(environment)
...
]
Annotate your editable components. Pass the selector to the text field as parameter to the directive.
<div wchEditable='elements.myText'>{{renderingContext.elements.myText.value}}</div>
Dependencies
The modules assumes an implementation of the WchInlineEditService
. This service must be injected into the main module.
Developing modules based on the SDK
When developing modules that use the SDK, make sure to import the WchNgEditComponentsModule to have access to the components and directives exposed by the SDK.
Configuration
The module can be configured via the forRoot
method or by providing overrides for the individual configuration tokens.
Components
The module exposes the following Components.
@ibm-wch-sdk/ng-edit
Index
External modules
- "components/login/abstract.login.component"
- "components/placeholder/placeholder.component"
- "config/config"
- "config/index"
- "directives/editable/abstract.editable.directive"
- "directives/editable/editable.directive"
- "directives/editable/editable.placeholder.directive"
- "index"
- "interfaces/inline.edit.service"
- "module"
- "modules/components.module"
- "modules/services.module"
- "placeholder/placeholder"
- "services/config/default.wch.edit.config"
- "services/config/index"
- "services/config/wch.edit.config"
- "services/edit/wch.inline.edit.service"
- "services/http/http.inline.edit.service"
- "services/http/index"
- "services/index"
- "services/info/index"
- "services/info/wch.edit.info.service"
- "services/info/wch.internal.edit.service"
- "services/placeholders/placeholders.service"
- "services/rendering/index"
- "services/rendering/placeholder.interceptor"
- "services/wch/index"
- "services/wch/wch.edit.service"
- "utils/assert"
- "utils/config"
- "utils/events"
- "utils/placeholder"
- "utils/replacement"
@ibm-wch-sdk/ng-edit > "components/login/abstract.login.component"
External module: "components/login/abstract.login.component"
Index
Classes
Variables
Variables
<Const>
LOGGER
● LOGGER: "AbstractLoginComponent" = "AbstractLoginComponent"
Defined in components/login/abstract.login.component.ts:17
@ibm-wch-sdk/ng-edit > "components/placeholder/placeholder.component"
External module: "components/placeholder/placeholder.component"
Index
Classes
Variables
Variables
<Let>
COUNT
● COUNT: number
= 0
Defined in components/placeholder/placeholder.component.ts:49
<Const>
LOGGER
● LOGGER: "WchPlaceholderComponent" = "WchPlaceholderComponent"
Defined in components/placeholder/placeholder.component.ts:46
@ibm-wch-sdk/ng-edit > "config/config"
External module: "config/config"
Index
Variables
- WCH_EDIT_HUB_INFO_SERVICE
- WCH_THROTTLE_LOADING
- WCH_TOKEN_DEBUG_PLACEHOLDERS
- WCH_TOKEN_DEFAULT_PLACEHOLDER_TEXT
- WCH_TOKEN_INLINE_EDIT_URL
- WCH_TOKEN_PLACEHOLDER_TAG
Variables
<Const>
WCH_EDIT_HUB_INFO_SERVICE
● WCH_EDIT_HUB_INFO_SERVICE: InjectionToken
<EditHubInfoService> = new InjectionToken(
'EditHubInfoService'
)
Defined in config/config.ts:46
<Const>
WCH_THROTTLE_LOADING
● WCH_THROTTLE_LOADING: "D1576F60-7D2A-4824-9771-A1EB574771DB" = "D1576F60-7D2A-4824-9771-A1EB574771DB"
Defined in config/config.ts:44
Injection token for placeholder debugging
see: EditHubInfoService
<Const>
WCH_TOKEN_DEBUG_PLACEHOLDERS
● WCH_TOKEN_DEBUG_PLACEHOLDERS: "03066F08-3E5E-41BE-B1E9-B0F31D0C881D" = "03066F08-3E5E-41BE-B1E9-B0F31D0C881D"
Defined in config/config.ts:36
Injection token for placeholder debugging
see: EditHubInfoService
<Const>
WCH_TOKEN_DEFAULT_PLACEHOLDER_TEXT
● WCH_TOKEN_DEFAULT_PLACEHOLDER_TEXT: "10DDECF4-3818-4B08-BD34-CA073F831E9B" = "10DDECF4-3818-4B08-BD34-CA073F831E9B"
Defined in config/config.ts:14
Injection token for default placeholder text
see: EditHubInfoService import { InjectionToken } from '@angular/core';
import { EditHubInfoService } from './../services/config/wch.edit.config';
<Const>
WCH_TOKEN_INLINE_EDIT_URL
● WCH_TOKEN_INLINE_EDIT_URL: "0E7D0A87-FBDD-4565-9C8F-DB5909B6D9AF" = "0E7D0A87-FBDD-4565-9C8F-DB5909B6D9AF"
Defined in config/config.ts:22
Injection token for inline edit url
see: EditHubInfoService
<Const>
WCH_TOKEN_PLACEHOLDER_TAG
● WCH_TOKEN_PLACEHOLDER_TAG: "C80F7BDA-438D-49F9-B63B-3BDA1FC13E99" = "C80F7BDA-438D-49F9-B63B-3BDA1FC13E99"
Defined in config/config.ts:29
Injection token for placeholder tag
see: EditHubInfoService
@ibm-wch-sdk/ng-edit > "config/index"
External module: "config/index"
Index
@ibm-wch-sdk/ng-edit > "directives/editable/abstract.editable.directive"
External module: "directives/editable/abstract.editable.directive"
Index
Classes
Type aliases
Variables
Type aliases
WchEditableType
Ƭ WchEditableType: string
| null
Defined in directives/editable/abstract.editable.directive.ts:80
Variables
<Const>
COMPONENT_ACCESSOR
● COMPONENT_ACCESSOR: AccessorType
= null
Defined in directives/editable/abstract.editable.directive.ts:83
<Let>
COUNT
● COUNT: number
= 0
Defined in directives/editable/abstract.editable.directive.ts:73
<Const>
KEY_ON_RENDERING_CONTEXT
● KEY_ON_RENDERING_CONTEXT: "onRenderingContext" = "onRenderingContext"
Defined in directives/editable/abstract.editable.directive.ts:75
<Const>
LOGGER
● LOGGER: "AbstractWchEditableDirective" = "AbstractWchEditableDirective"
Defined in directives/editable/abstract.editable.directive.ts:77
<Const>
ON_COMPONENT_ACCESSOR
● ON_COMPONENT_ACCESSOR: Observable
<string
> = of(COMPONENT_ACCESSOR)
Defined in directives/editable/abstract.editable.directive.ts:86
@ibm-wch-sdk/ng-edit > "directives/editable/editable.directive"
External module: "directives/editable/editable.directive"
Index
Classes
@ibm-wch-sdk/ng-edit > "directives/editable/editable.placeholder.directive"
External module: "directives/editable/editable.placeholder.directive"
Index
Classes
Type aliases
Variables
Functions
Type aliases
TEXT_PROPERTY
Ƭ TEXT_PROPERTY: "innerHTML" | "innerText"
Defined in directives/editable/editable.placeholder.directive.ts:72
Variables
<Const>
LOGGER
● LOGGER: "WchEditablePlaceholderDirective" = "WchEditablePlaceholderDirective"
Defined in directives/editable/editable.placeholder.directive.ts:70
Functions
_setText
▸ _setText(aProp: TEXT_PROPERTY, aLocalizedText: LocalizedText
, aElement: ElementRef
, aRenderer: Renderer2
): void
Defined in directives/editable/editable.placeholder.directive.ts:82
Assigns the text to a value
Parameters:
Name | Type | Description |
---|---|---|
aProp | TEXT_PROPERTY | the property to assign |
aLocalizedText | LocalizedText |
the actual text |
aElement | ElementRef |
the native element |
aRenderer | Renderer2 |
render used to assign the text |
Returns: void
<Const>
_textSetter
▸ _textSetter(aElement: any
, aRenderer: Renderer2
): (Anonymous function)
Defined in directives/editable/editable.placeholder.directive.ts:113
Binds the element ref and the renderer
Parameters:
Name | Type | Description |
---|---|---|
aElement | any |
the eleemnt reference |
aRenderer | Renderer2 |
the renderer |
Returns: (Anonymous function)
function that only takes the property name and the
@ibm-wch-sdk/ng-edit > "index"
External module: "index"
Index
@ibm-wch-sdk/ng-edit > "interfaces/inline.edit.service"
External module: "interfaces/inline.edit.service"
Index
Variables
- EVENT_EDIT_END
- EVENT_EDIT_START
- EVENT_INLINE_EDIT_END
- EVENT_INLINE_EDIT_START
- WchInlineEditServiceToken
Variables
<Const>
EVENT_EDIT_END
● EVENT_EDIT_END: "wchEditEnd" = "wchEditEnd"
Defined in interfaces/inline.edit.service.ts:7
<Const>
EVENT_EDIT_START
● EVENT_EDIT_START: "wchEditStart" = "wchEditStart"
Defined in interfaces/inline.edit.service.ts:6
<Const>
EVENT_INLINE_EDIT_END
● EVENT_INLINE_EDIT_END: "wchInlineEditEnd" = "wchInlineEditEnd"
Defined in interfaces/inline.edit.service.ts:10
<Const>
EVENT_INLINE_EDIT_START
● EVENT_INLINE_EDIT_START: "wchInlineEditStart" = "wchInlineEditStart"
Defined in interfaces/inline.edit.service.ts:9
<Const>
WchInlineEditServiceToken
● WchInlineEditServiceToken: InjectionToken
<WchInlineEditService
> = new InjectionToken<
WchInlineEditService
('WchInlineEditServiceToken')
Defined in interfaces/inline.edit.service.ts:15
@ibm-wch-sdk/ng-edit > "module"
External module: "module"
Index
Classes
Variables
Variables
<Const>
WCH_RC_INTERCEPTOR_TOKEN
● WCH_RC_INTERCEPTOR_TOKEN: "8453750A-4519-4184-840B-D490E909D23E" = "8453750A-4519-4184-840B-D490E909D23E"
Defined in module.ts:32
@ibm-wch-sdk/ng-edit > "modules/components.module"
External module: "modules/components.module"
Index
Classes
@ibm-wch-sdk/ng-edit > "modules/services.module"
External module: "modules/services.module"
Index
Classes
@ibm-wch-sdk/ng-edit > "placeholder/placeholder"
External module: "placeholder/placeholder"
Index
Variables
Functions
Variables
<Const>
REL_PATH_TYPE_BY_ID
● REL_PATH_TYPE_BY_ID: "delivery/v1/rendering/type/" = "delivery/v1/rendering/type/"
Defined in placeholder/placeholder.ts:8
Functions
loadAuthoringType
▸ loadAuthoringType(aService: WchHttpService
, aTypeId: string
): Observable
<AuthoringType
>
Defined in placeholder/placeholder.ts:10
Parameters:
Name | Type |
---|---|
aService | WchHttpService |
aTypeId | string |
Returns: Observable
<AuthoringType
>
@ibm-wch-sdk/ng-edit > "services/config/default.wch.edit.config"
External module: "services/config/default.wch.edit.config"
Index
Variables
Variables
<Const>
DEFAULT_DEBUG_PLACEHOLDERS
● DEFAULT_DEBUG_PLACEHOLDERS: false
= false
Defined in services/config/default.wch.edit.config.ts:8
<Const>
DEFAULT_INLINE_EDIT_URL
● DEFAULT_INLINE_EDIT_URL: "${authoringUIBaseUrl.protocol}//${authoringUIBaseUrl.host}/authoring-sites-ui/inline-edit/inline-edit.js" = "${authoringUIBaseUrl.protocol}//${authoringUIBaseUrl.host}/authoring-sites-ui/inline-edit/inline-edit.js"
Defined in services/config/default.wch.edit.config.ts:4
@ibm-wch-sdk/ng-edit > "services/config/index"
External module: "services/config/index"
Index
@ibm-wch-sdk/ng-edit > "services/config/wch.edit.config"
External module: "services/config/wch.edit.config"
Index
Interfaces
Functions
- selectDebugPlaceholder
- selectDefaultPlaceholder
- selectInlineEditURL
- selectPlaceholderTag
- selectThrottleLoading
Functions
selectDebugPlaceholder
▸ selectDebugPlaceholder(aConfig?: EditHubInfoService): boolean
Defined in services/config/wch.edit.config.ts:47
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: boolean
selectDefaultPlaceholder
▸ selectDefaultPlaceholder(aConfig?: EditHubInfoService): WchDefaultPlaceholder
Defined in services/config/wch.edit.config.ts:41
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: WchDefaultPlaceholder
selectInlineEditURL
▸ selectInlineEditURL(aConfig?: EditHubInfoService): HubInfoUrlProvider
Defined in services/config/wch.edit.config.ts:51
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: HubInfoUrlProvider
selectPlaceholderTag
▸ selectPlaceholderTag(aConfig?: EditHubInfoService): string
Defined in services/config/wch.edit.config.ts:57
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: string
selectThrottleLoading
▸ selectThrottleLoading(aConfig?: EditHubInfoService): number
Defined in services/config/wch.edit.config.ts:61
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: number
@ibm-wch-sdk/ng-edit > "services/edit/wch.inline.edit.service"
External module: "services/edit/wch.inline.edit.service"
Index
Classes
Variables
Variables
<Const>
LOGGER
● LOGGER: "WchInlineEditRegistrationService" = "WchInlineEditRegistrationService"
Defined in services/edit/wch.inline.edit.service.ts:25
@ibm-wch-sdk/ng-edit > "services/http/http.inline.edit.service"
External module: "services/http/http.inline.edit.service"
Index
Classes
Interfaces
Variables
Functions
- _createEmptyRegistration
- _createRegistration
- _createWchInlineEditEvent
- _getAbsoluteUrl
- _registerForEvent
Object literals
Variables
<Const>
EMPTY_REGISTRATION
● EMPTY_REGISTRATION: NodeStyleEventEmitter
| JQueryStyleEventEmitter
| HasEventTargetAddRemove
<any
> | NodeStyleEventEmitter
& Disposable
| JQueryStyleEventEmitter
& Disposable
| HasEventTargetAddRemove
<any
> & Disposable
= _createEmptyRegistration()
Defined in services/http/http.inline.edit.service.ts:138
<Const>
LOGGER
● LOGGER: "WchHttpInlineEditService" = "WchHttpInlineEditService"
Defined in services/http/http.inline.edit.service.ts:73
<Let>
REG_ID
● REG_ID: number
= 0
Defined in services/http/http.inline.edit.service.ts:141
<Const>
_dummyFromEvent
● _dummyFromEvent: function
= constGenerator(EMPTY)
Defined in services/http/http.inline.edit.service.ts:228
Dummy callback
param:
Type declaration
▸<T
>(): Observable
<T
>
Type parameters:
T
Returns: Observable
<T
>
<Const>
_fromHubInfoUrlProvider
● _fromHubInfoUrlProvider: UnaryFunction
<string
| URL
, string
> = compose<
URL | string,
GeneratorOrT,
string
( urlToString, fromGeneratorOrT )
Defined in services/http/http.inline.edit.service.ts:251
Converts the provider into a URL
param: the provider
returns: the URL if available
<Const>
_registerDummyComponent
● _registerDummyComponent: function
= constGenerator(of(EMPTY_REGISTRATION))
Defined in services/http/http.inline.edit.service.ts:237
Registers a dummy component
param: the native element
param: the accesor
param: rendering context
Type declaration
▸(): T
Returns: T
Functions
_createEmptyRegistration
▸ _createEmptyRegistration(): WchInlineEditRegistrationResult
Defined in services/http/http.inline.edit.service.ts:85
Creates an empty registration result as fallback
Returns: WchInlineEditRegistrationResult
_createRegistration
▸ _createRegistration(aRegisterMethod: WchInlineEditRegistration
, nativeElement: any
, accessor: AccessorType
, onRenderingContext: Observable
<RenderingContext
>, logger: Logger
): Observable
<EventTargetLike
<any
>>
Defined in services/http/http.inline.edit.service.ts:153
Constructs the registration for a native element
Parameters:
Name | Type | Description |
---|---|---|
aRegisterMethod | WchInlineEditRegistration |
registration callback method |
nativeElement | any |
the native element |
accessor | AccessorType |
accessor string |
onRenderingContext |
Observable <RenderingContext > |
rendering context |
logger | Logger |
Returns: Observable
<EventTargetLike
<any
>>
observable of the registration result in form of an event emitter
_createWchInlineEditEvent
▸ _createWchInlineEditEvent(aType: string
, aData: any
): WchInlineEditEvent
Defined in services/http/http.inline.edit.service.ts:102
Constructs the event
Parameters:
Name | Type | Description |
---|---|---|
aType | string |
the event type |
aData | any |
the event data |
Returns: WchInlineEditEvent
the event object
_getAbsoluteUrl
▸ _getAbsoluteUrl(base: string
, relative: string
): string
Defined in services/http/http.inline.edit.service.ts:199
Resolves a relative URL against a base URL
Parameters:
Name | Type | Description |
---|---|---|
base | string |
the base URL |
relative | string |
the relative URL |
Returns: string
the result
_registerForEvent
▸ _registerForEvent(aType: string
, aEmitter: EventTargetLike
<any
>, aLogger: Logger
): Observable
<WchInlineEditEvent
>
Defined in services/http/http.inline.edit.service.ts:121
Registers for an event
Parameters:
Name | Type | Description |
---|---|---|
aType | string |
the event type |
aEmitter |
EventTargetLike <any > |
the event emitter |
aLogger | Logger |
Returns: Observable
<WchInlineEditEvent
>
the sequence of events
Object literals
<Const>
EMPTY_WCH_INLINE_EDIT_SERVICE
EMPTY_WCH_INLINE_EDIT_SERVICE: object
Defined in services/http/http.inline.edit.service.ts:240
fromEvent
● fromEvent: function
= _dummyFromEvent
Defined in services/http/http.inline.edit.service.ts:242
Type declaration
▸<T
>(): Observable
<T
>
Type parameters:
T
Returns: Observable
<T
>
registerComponent
● registerComponent: function
= _registerDummyComponent
Defined in services/http/http.inline.edit.service.ts:241
Type declaration
▸(): T
Returns: T
@ibm-wch-sdk/ng-edit > "services/http/index"
External module: "services/http/index"
Index
@ibm-wch-sdk/ng-edit > "services/index"
External module: "services/index"
Index
@ibm-wch-sdk/ng-edit > "services/info/index"
External module: "services/info/index"
Index
@ibm-wch-sdk/ng-edit > "services/info/wch.edit.info.service"
External module: "services/info/wch.edit.info.service"
Index
Classes
Variables
Variables
<Const>
LOGGER
● LOGGER: "WchEditInfoService" = "WchEditInfoService"
Defined in services/info/wch.edit.info.service.ts:10
@ibm-wch-sdk/ng-edit > "services/info/wch.internal.edit.service"
External module: "services/info/wch.internal.edit.service"
Index
Classes
Variables
Variables
<Const>
DEFAULT_EDITING
● DEFAULT_EDITING: false
= false
Defined in services/info/wch.internal.edit.service.ts:9
<Const>
DEFAULT_INLINE_EDIT
● DEFAULT_INLINE_EDIT: false
= false
Defined in services/info/wch.internal.edit.service.ts:10
@ibm-wch-sdk/ng-edit > "services/placeholders/placeholders.service"
External module: "services/placeholders/placeholders.service"
Index
Classes
Interfaces
Variables
- LOGGER
- _selectFromWchPlaceholder
- opOnAccessor
- opOnData
- opOnFormattedText
- opOnPlaceholder
- opOnPlainText
- opOnType
- selectOnAccessor
- selectOnData
- selectOnFormattedText
- selectOnPlaceholder
- selectOnPlainText
- selectOnType
Variables
<Const>
LOGGER
● LOGGER: "WchPlaceholderImpl" = "WchPlaceholderImpl"
Defined in services/placeholders/placeholders.service.ts:94
<Const>
_selectFromWchPlaceholder
● _selectFromWchPlaceholder: function
= pluckProperty
Defined in services/placeholders/placeholders.service.ts:339
some type magic
Type declaration
▸<K
>(aKey: K
): UnaryFunction
<WchPlaceholder, WchPlaceholder[K]
>
Type parameters:
keyof WchPlaceholder
K : Parameters:
Name | Type |
---|---|
aKey | K |
Returns: UnaryFunction
<WchPlaceholder, WchPlaceholder[K]
>
<Const>
opOnAccessor
● opOnAccessor: OperatorFunction
<WchPlaceholder, string
> = switchMap(
selectOnAccessor
)
Defined in services/placeholders/placeholders.service.ts:357
<Const>
opOnData
● opOnData: OperatorFunction
<WchPlaceholder, any
> = switchMap(
selectOnData
)
Defined in services/placeholders/placeholders.service.ts:364
<Const>
opOnFormattedText
● opOnFormattedText: OperatorFunction
<WchPlaceholder, LocalizedText
> = switchMap(selectOnFormattedText)
Defined in services/placeholders/placeholders.service.ts:371
<Const>
opOnPlaceholder
● opOnPlaceholder: OperatorFunction
<WchPlaceholder, AuthoringPlaceholder
> = switchMap(selectOnPlaceholder)
Defined in services/placeholders/placeholders.service.ts:360
<Const>
opOnPlainText
● opOnPlainText: OperatorFunction
<WchPlaceholder, LocalizedText
> = switchMap(selectOnPlainText)
Defined in services/placeholders/placeholders.service.ts:367
<Const>
opOnType
● opOnType: OperatorFunction
<WchPlaceholder, string
> = switchMap(
selectOnType
)
Defined in services/placeholders/placeholders.service.ts:375
<Const>
selectOnAccessor
● selectOnAccessor: UnaryFunction
<WchPlaceholder, Observable
<string
>> = _selectFromWchPlaceholder('onAccessor')
Defined in services/placeholders/placeholders.service.ts:347
<Const>
selectOnData
● selectOnData: UnaryFunction
<WchPlaceholder, Observable
<any
>> = _selectFromWchPlaceholder('onData')
Defined in services/placeholders/placeholders.service.ts:349
<Const>
selectOnFormattedText
● selectOnFormattedText: UnaryFunction
<WchPlaceholder, Observable
<Object
>> = _selectFromWchPlaceholder(
'onFormattedText'
)
Defined in services/placeholders/placeholders.service.ts:351
<Const>
selectOnPlaceholder
● selectOnPlaceholder: UnaryFunction
<WchPlaceholder, Observable
<AuthoringPlaceholder
>> = _selectFromWchPlaceholder('onPlaceholder')
Defined in services/placeholders/placeholders.service.ts:348
<Const>
selectOnPlainText
● selectOnPlainText: UnaryFunction
<WchPlaceholder, Observable
<Object
>> = _selectFromWchPlaceholder('onPlainText')
Defined in services/placeholders/placeholders.service.ts:350
<Const>
selectOnType
● selectOnType: UnaryFunction
<WchPlaceholder, Observable
<string
>> = _selectFromWchPlaceholder('onType')
Defined in services/placeholders/placeholders.service.ts:354
@ibm-wch-sdk/ng-edit > "services/rendering/index"
External module: "services/rendering/index"
Index
@ibm-wch-sdk/ng-edit > "services/rendering/placeholder.interceptor"
External module: "services/rendering/placeholder.interceptor"
Index
Classes
Variables
Variables
<Const>
LOGGER
● LOGGER: "PlaceholderInterceptor" = "PlaceholderInterceptor"
Defined in services/rendering/placeholder.interceptor.ts:38
@ibm-wch-sdk/ng-edit > "services/wch/index"
External module: "services/wch/index"
Index
@ibm-wch-sdk/ng-edit > "services/wch/wch.edit.service"
External module: "services/wch/wch.edit.service"
Index
Classes
Variables
Functions
Object literals
Variables
<Const>
FALSE_OBSERVABLE
● FALSE_OBSERVABLE: Observable
<boolean
> = opFalse
Defined in services/wch/wch.edit.service.ts:74
<Const>
LOGGER
● LOGGER: "WchEditService" = "WchEditService"
Defined in services/wch/wch.edit.service.ts:72
Functions
<Const>
TO_ANONYMOUS
▸ TO_ANONYMOUS(): Observable
<User
>
Defined in services/wch/wch.edit.service.ts:76
Returns: Observable
<User
>
<Const>
TO_FALSE
▸ TO_FALSE(): Observable
<boolean
>
Defined in services/wch/wch.edit.service.ts:75
Returns: Observable
<boolean
>
<Const>
getCurrentTenantUrl
▸ getCurrentTenantUrl(aBase: string
): string
Defined in services/wch/wch.edit.service.ts:90
Parameters:
Name | Type |
---|---|
aBase | string |
Returns: string
<Const>
getCurrentUserUrl
▸ getCurrentUserUrl(aBase: string
): string
Defined in services/wch/wch.edit.service.ts:89
Parameters:
Name | Type |
---|---|
aBase | string |
Returns: string
<Const>
isAuthenticated
▸ isAuthenticated(aUser: User
): boolean
Defined in services/wch/wch.edit.service.ts:94
Parameters:
Name | Type |
---|---|
aUser | User |
Returns: boolean
Object literals
<Const>
ANONYMOUS_USER
ANONYMOUS_USER: object
Defined in services/wch/wch.edit.service.ts:66
externalId
● externalId: string
= "ibm_anonymous_user@de.ibm.com"
Defined in services/wch/wch.edit.service.ts:69
id
● id: string
= "00000000-0000-f000-0000-000000000000"
Defined in services/wch/wch.edit.service.ts:67
roles
● roles: undefined
[] = []
Defined in services/wch/wch.edit.service.ts:68
<Const>
HTTP_WITH_CREDENTIALS
HTTP_WITH_CREDENTIALS: object
Defined in services/wch/wch.edit.service.ts:78
withCredentials
● withCredentials: true
= true
Defined in services/wch/wch.edit.service.ts:78
<Const>
JSON_WITHOUT_CREDENTIALS
JSON_WITHOUT_CREDENTIALS: object
Defined in services/wch/wch.edit.service.ts:83
responseType
● responseType: "json" = "json"
Defined in services/wch/wch.edit.service.ts:86
withCredentials
● withCredentials: false
= false
Defined in services/wch/wch.edit.service.ts:86
<Const>
JSON_WITH_CREDENTIALS
JSON_WITH_CREDENTIALS: object
Defined in services/wch/wch.edit.service.ts:79
responseType
● responseType: "json" = "json"
Defined in services/wch/wch.edit.service.ts:82
withCredentials
● withCredentials: true
= true
Defined in services/wch/wch.edit.service.ts:82
@ibm-wch-sdk/ng-edit > "utils/assert"
External module: "utils/assert"
Index
Functions
Functions
_assert
▸ _assert<T
>(aPredicate: function
, aFailHandler: function
): function
Defined in utils/assert.ts:3
Type parameters:
T
Parameters:
Name | Type |
---|---|
aPredicate | function |
aFailHandler | function |
Returns: function
@ibm-wch-sdk/ng-edit > "utils/config"
External module: "utils/config"
Index
Functions
Functions
loadWchConfig
▸ loadWchConfig(aJsonp: WchHttpService
): Observable
<WchConfig
>
Defined in utils/config.ts:16
Loads the WCH config
Parameters:
Name | Type | Description |
---|---|---|
aJsonp | WchHttpService |
the JSONp callback |
Returns: Observable
<WchConfig
>
the resulting config object
@ibm-wch-sdk/ng-edit > "utils/events"
External module: "utils/events"
Index
Functions
Functions
_createWchEditableEvent
▸ _createWchEditableEvent(aType: string
, aTarget: HTMLElement
, aData: any
): WchEditableEvent
Defined in utils/events.ts:18
Constructs the event
Parameters:
Name | Type | Description |
---|---|---|
aType | string |
the event type |
aTarget | HTMLElement |
the target node |
aData | any |
the event data |
Returns: WchEditableEvent
the event object
_registerForEvent
▸ _registerForEvent(aType: string
, aTarget: HTMLElement
, aEmitter: EventTargetLike
<any
>, aLogger: Logger
): Observable
<WchEditableEvent
>
Defined in utils/events.ts:41
Registers for an event
Parameters:
Name | Type | Description |
---|---|---|
aType | string |
the event type |
aTarget | HTMLElement |
the current element |
aEmitter |
EventTargetLike <any > |
the event emitter |
aLogger | Logger |
Returns: Observable
<WchEditableEvent
>
the sequence of events
createWchEditableEvents
▸ createWchEditableEvents(aTarget: HTMLElement
, aEmitter: EventTargetLike
<any
>, aLogger: Logger
): Observable
<WchEditableEvent
>
Defined in utils/events.ts:67
Construct the event stream
Parameters:
Name | Type | Description |
---|---|---|
aTarget | HTMLElement |
the target element |
aEmitter |
EventTargetLike <any > |
the event emitter |
aLogger | Logger |
Returns: Observable
<WchEditableEvent
>
the event stream
@ibm-wch-sdk/ng-edit > "utils/placeholder"
External module: "utils/placeholder"
Index
Type aliases
Variables
- UNDEFINED
- WCH_EDITABLE_AUTO_FORMAT
- WCH_EDITABLE_HTML_FORMAT
- WCH_EDITABLE_TEXT_FORMAT
- phParseExpression
Functions
- _anyToString
- _formatFromType
- _missingPlaceholderText
- _phEscapedText
- _phGetDefault
- _phGetLocalizedText
- _phGetStaticDefault
- _showPlaceholder
- phDefaultPlaceholderText
- phFormat
- phFormattedText
- phPlaceholderFromAccessor
- phPlainText
- phShowPlaceholder
- phTypeFromAccessor
Type aliases
WchDefaultPlaceholder
Ƭ WchDefaultPlaceholder: ObservableOrT
<string
| LocalizedText
>
Defined in utils/placeholder.ts:43
type for placeholder
WchEditableFormat
Ƭ WchEditableFormat: "text" | "html" | "auto"
Defined in utils/placeholder.ts:50
Potential values for the 'wchFormat' field
Variables
<Const>
UNDEFINED
● UNDEFINED: any
= undefined
Defined in utils/placeholder.ts:56
<Const>
WCH_EDITABLE_AUTO_FORMAT
● WCH_EDITABLE_AUTO_FORMAT: "auto" = "auto"
Defined in utils/placeholder.ts:53
<Const>
WCH_EDITABLE_HTML_FORMAT
● WCH_EDITABLE_HTML_FORMAT: "html" = "html"
Defined in utils/placeholder.ts:54
<Const>
WCH_EDITABLE_TEXT_FORMAT
● WCH_EDITABLE_TEXT_FORMAT: "text" = "text"
Defined in utils/placeholder.ts:52
<Const>
phParseExpression
● phParseExpression: UnaryFunction
<string
, UnaryFunction
<any
, any
>> = partialSecond(
createCache<UnaryFunction<any, any>>(),
wchSelectAccessor
)
Defined in utils/placeholder.ts:61
Implements a cache for parsed expressions
Functions
<Const>
_anyToString
▸ _anyToString(aValue: any
): any
Defined in utils/placeholder.ts:154
Our string conversion
Parameters:
Name | Type | Description |
---|---|---|
aValue | any |
the value to convert |
Returns: any
the converted value
_formatFromType
▸ _formatFromType(aElementType: string
): WchEditableFormat
Defined in utils/placeholder.ts:342
Parameters:
Name | Type | Description |
---|---|---|
aElementType | string |
the element type |
Returns: WchEditableFormat the format value
_missingPlaceholderText
▸ _missingPlaceholderText(aDefaultLocale: string
): WchDefaultPlaceholder
Defined in utils/placeholder.ts:380
Constructs a default text in case placeholders are missing
Parameters:
Name | Type | Description |
---|---|---|
aDefaultLocale | string |
the locale |
Returns: WchDefaultPlaceholder the placeholder
_phEscapedText
▸ _phEscapedText(aEscaper: UnaryFunction
<string
, string
>, aLocale: Observable
<Locale
>, aData: Observable
<any
>, aPlaceholder: Observable
<AuthoringPlaceholder
>, aDefault: Observable
<WchDefaultPlaceholder>, aDefaultLocale: Locale
): Observable
<LocalizedText
>
Defined in utils/placeholder.ts:208
Extract text placeholder using an escaping
Parameters:
Name | Type | Description |
---|---|---|
aEscaper |
UnaryFunction <string , string > |
the escape function |
aLocale |
Observable <Locale > |
the locale |
aData |
Observable <any > |
the data |
aPlaceholder |
Observable <AuthoringPlaceholder > |
the placeholder |
aDefault |
Observable <WchDefaultPlaceholder> |
the default placeholder |
aDefaultLocale | Locale |
the default locale |
Returns: Observable
<LocalizedText
>
the resulting text
_phGetDefault
▸ _phGetDefault(aDefault: WchDefaultPlaceholder, aEscaper: UnaryFunction
<string
, string
>, aDefaultLocale: Locale
): Observable
<LocalizedText
>
Defined in utils/placeholder.ts:95
Decode the default placeholder
Parameters:
Name | Type | Description |
---|---|---|
aDefault | WchDefaultPlaceholder | the text or the localized context for the placeholder |
aEscaper |
UnaryFunction <string , string > |
the escape function |
aDefaultLocale | Locale |
the default locale |
Returns: Observable
<LocalizedText
>
the result
_phGetLocalizedText
▸ _phGetLocalizedText(aPlaceholder: AuthoringPlaceholder
, aDefault: WchDefaultPlaceholder, aEscaper: UnaryFunction
<string
, string
>, aDefaultLocale: Locale
): Observable
<LocalizedText
>
Defined in utils/placeholder.ts:118
Returns the localized text for a placeholder, either from the authoring value or from a fallback.
Parameters:
Name | Type | Description |
---|---|---|
aPlaceholder | AuthoringPlaceholder |
the authoring placeholder |
aDefault | WchDefaultPlaceholder | the default fallback |
aEscaper |
UnaryFunction <string , string > |
the escape function |
aDefaultLocale | Locale |
the default locale |
Returns: Observable
<LocalizedText
>
the resulting localized text
_phGetStaticDefault
▸ _phGetStaticDefault(aDefault: string
| LocalizedText
, aEscaper: UnaryFunction
<string
, string
>, aDefaultLocale: Locale
): LocalizedText
Defined in utils/placeholder.ts:75
Decode the default placeholder
Parameters:
Name | Type | Description |
---|---|---|
aDefault |
string | LocalizedText
|
the text or the localized context for the placeholder |
aEscaper |
UnaryFunction <string , string > |
the escape function |
aDefaultLocale | Locale |
the default locale, |
Returns: LocalizedText
the result
_showPlaceholder
▸ _showPlaceholder(aPlc: AuthoringPlaceholder
): boolean
Defined in utils/placeholder.ts:163
Tests if we want to display a placeholder
Parameters:
Name | Type | Description |
---|---|---|
aPlc | AuthoringPlaceholder |
the placeholder |
Returns: boolean
true if we want to show the placeholder, else false
phDefaultPlaceholderText
▸ phDefaultPlaceholderText(aDefaultPlaceholder: WchDefaultPlaceholder, aDefaultLocale: string
): Observable
<LocalizedText
>
Defined in utils/placeholder.ts:396
Construct the default placeholder text
Parameters:
Name | Type |
---|---|
aDefaultPlaceholder | WchDefaultPlaceholder |
aDefaultLocale | string |
Returns: Observable
<LocalizedText
>
<Const>
phFormat
▸ phFormat(onFmt: Observable
<"text" | "html" | "auto">, onPlc: Observable
<string
| Object
| function
| Observable
<string
| Object
| function
>>, onType: Observable
<string
>): Observable
<"text" | "html" | "auto">
Defined in utils/placeholder.ts:363
Decodes the format based on the format input and a potential placeholder
Parameters:
Name | Type | Description |
---|---|---|
onFmt |
Observable <"text" | "html" | "auto"> |
the format string |
onPlc |
Observable <string | Object | function | Observable <string | Object | function >> |
the placeholder string |
onType |
Observable <string > |
Returns: Observable
<"text" | "html" | "auto">
the format
<Const>
phFormattedText
▸ phFormattedText(aLocale: Observable
<string
>, aData: Observable
<any
>, aPlaceholder: Observable
<AuthoringPlaceholder
>, aDefault: Observable
<string
| Object
| function
| Observable
<string
| Object
| function
>>, aDefaultLocale: string
): Observable
<Object
>
Defined in utils/placeholder.ts:284
Formatted text
Parameters:
Name | Type | Description |
---|---|---|
aLocale |
Observable <string > |
the locale |
aData |
Observable <any > |
the data |
aPlaceholder |
Observable <AuthoringPlaceholder > |
the placeholder |
aDefault |
Observable <string | Object | function | Observable <string | Object | function >> |
|
aDefaultLocale | string |
Returns: Observable
<Object
>
the resulting formatted text
<Const>
phPlaceholderFromAccessor
▸ phPlaceholderFromAccessor(onAcc: Observable
<string
>, onType: Observable
<AuthoringType
>): Observable
<AuthoringPlaceholder
>
Defined in utils/placeholder.ts:312
Returns a placeholder from an accessor expression and the type
Parameters:
Name | Type | Description |
---|---|---|
onAcc |
Observable <string > |
the accessor expression |
onType |
Observable <AuthoringType > |
the type |
Returns: Observable
<AuthoringPlaceholder
>
the placeholder
<Const>
phPlainText
▸ phPlainText(aLocale: Observable
<string
>, aData: Observable
<any
>, aPlaceholder: Observable
<AuthoringPlaceholder
>, aDefault: Observable
<string
| Object
| function
| Observable
<string
| Object
| function
>>, aDefaultLocale: string
): Observable
<Object
>
Defined in utils/placeholder.ts:253
Plain text
Parameters:
Name | Type | Description |
---|---|---|
aLocale |
Observable <string > |
the locale |
aData |
Observable <any > |
the data |
aPlaceholder |
Observable <AuthoringPlaceholder > |
the placeholder |
aDefault |
Observable <string | Object | function | Observable <string | Object | function >> |
|
aDefaultLocale | string |
Returns: Observable
<Object
>
the resulting plain text
phShowPlaceholder
▸ phShowPlaceholder(aData: Observable
<any
>, aType: Observable
<string
>, aPlaceholder: Observable
<AuthoringPlaceholder
>): Observable
<boolean
>
Defined in utils/placeholder.ts:180
Tests if we should show a placeholder
Parameters:
Name | Type | Description |
---|---|---|
aData |
Observable <any > |
the actual data |
aType |
Observable <string > |
the element type |
aPlaceholder |
Observable <AuthoringPlaceholder > |
the placeholder |
Returns: Observable
<boolean
>
true to show the placeholder else false
<Const>
phTypeFromAccessor
▸ phTypeFromAccessor(onAcc: Observable
<string
>, onType: Observable
<AuthoringType
>): Observable
<string
>
Defined in utils/placeholder.ts:331
Returns the element type from an accessor expression and the type
Parameters:
Name | Type | Description |
---|---|---|
onAcc |
Observable <string > |
the accessor expression |
onType |
Observable <AuthoringType > |
the type |
Returns: Observable
<string
>
the element type
@ibm-wch-sdk/ng-edit > "utils/replacement"
External module: "utils/replacement"
Index
Variables
Functions
Variables
<Const>
TOKEN_EXP
● TOKEN_EXP: RegExp
= /${([^\}]+)}/g
Defined in utils/replacement.ts:3
Functions
replaceWithTokens
▸ replaceWithTokens(aValue: string
, aContext: any
): string
Defined in utils/replacement.ts:13
Replaces a string and resolves the tokens relative to the context object
Parameters:
Name | Type | Description |
---|---|---|
aValue | string |
the value |
aContext | any |
the context object |
Returns: string
the replaced token
@ibm-wch-sdk/ng-edit
Index
External modules
- "components/login/abstract.login.component"
- "components/placeholder/placeholder.component"
- "config/config"
- "config/index"
- "directives/editable/abstract.editable.directive"
- "directives/editable/editable.directive"
- "directives/editable/editable.placeholder.directive"
- "index"
- "interfaces/inline.edit.service"
- "module"
- "modules/components.module"
- "modules/services.module"
- "placeholder/placeholder"
- "services/config/default.wch.edit.config"
- "services/config/index"
- "services/config/wch.edit.config"
- "services/edit/wch.inline.edit.service"
- "services/http/http.inline.edit.service"
- "services/http/index"
- "services/index"
- "services/info/index"
- "services/info/wch.edit.info.service"
- "services/info/wch.internal.edit.service"
- "services/placeholders/placeholders.service"
- "services/rendering/index"
- "services/rendering/placeholder.interceptor"
- "services/wch/index"
- "services/wch/wch.edit.service"
- "utils/assert"
- "utils/config"
- "utils/events"
- "utils/placeholder"
- "utils/replacement"
@ibm-wch-sdk/ng-edit > "components/login/abstract.login.component" > AbstractLoginComponent
Class: AbstractLoginComponent
Some convenience methods typically used by login components
Hierarchy
AbstractLifeCycleComponent
↳ AbstractLoginComponent
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnInit
OnDestroy
Index
Constructors
Properties
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onCurrentUser
- onDoCheck
- onLoggedIn
- onLoggedOut
- onOnChanges
- onOnDestroy
- onOnInit
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new AbstractLoginComponent(aInjector: Injector
): AbstractLoginComponent
Defined in components/login/abstract.login.component.ts:28
Parameters:
Name | Type |
---|---|
aInjector | Injector |
Returns: AbstractLoginComponent
Properties
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onCurrentUser
● onCurrentUser: Observable
<User
>
Defined in components/login/abstract.login.component.ts:28
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
onLoggedIn
● onLoggedIn: Observable
<boolean
>
Defined in components/login/abstract.login.component.ts:24
onLoggedOut
● onLoggedOut: Observable
<boolean
>
Defined in components/login/abstract.login.component.ts:26
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/login/abstract.login.component.ts:83
Returns: void
ngOnInit
▸ ngOnInit(): void
Overrides AbstractLifeCycleComponent.ngOnInit
Defined in components/login/abstract.login.component.ts:77
Returns: void
safeSubscribe
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "components/placeholder/placeholder.component" > WchPlaceholderComponent
Class: WchPlaceholderComponent
Hierarchy
AbstractLifeCycleComponent
↳ WchPlaceholderComponent
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnInit
OnDestroy
RenderingContextProvider
- WchPlaceholder
Index
Constructors
Properties
- onAccessor
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onData
- onDoCheck
- onFormattedText
- onOnChanges
- onOnDestroy
- onOnInit
- onPlaceholder
- onPlainText
- onRenderingContext
- onShowPlaceholder
- onType
- wchEditable
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchPlaceholderComponent(aVcRef: ViewContainerRef
, aInternal: WchInternalEditService, aDebugPlaceholders: boolean
, aPhService: WchPlaceholderService, aInjector: Injector
): WchPlaceholderComponent
Defined in components/placeholder/placeholder.component.ts:111
Parameters:
Name | Type |
---|---|
aVcRef | ViewContainerRef |
aInternal | WchInternalEditService |
aDebugPlaceholders | boolean |
aPhService | WchPlaceholderService |
aInjector | Injector |
Returns: WchPlaceholderComponent
Properties
onAccessor
● onAccessor: Observable
<string
>
Implementation of WchPlaceholder.onAccessor
Defined in components/placeholder/placeholder.component.ts:105
The accessor expression
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onData
● onData: Observable
<any
>
Implementation of WchPlaceholder.onData
Defined in components/placeholder/placeholder.component.ts:87
Generates the accessed data, decoded from the accessor expression
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
onFormattedText
● onFormattedText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onFormattedText
Defined in components/placeholder/placeholder.component.ts:99
Generates the formatted text of an element, potentially replaced by the placeholder
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Implementation of WchPlaceholder.onPlaceholder
Defined in components/placeholder/placeholder.component.ts:81
Event exposing the current placeholder. Note that this will only fire if the application runs in preview mode. In live mode this is just the empty event.
onPlainText
● onPlainText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onPlainText
Defined in components/placeholder/placeholder.component.ts:93
Generates the text of an element, potentially replaced by the placeholder
onRenderingContext
● onRenderingContext: Observable
<RenderingContext
>
Defined in components/placeholder/placeholder.component.ts:68
Exposes the rendering context
onShowPlaceholder
● onShowPlaceholder: Observable
<boolean
>
Defined in components/placeholder/placeholder.component.ts:74
Checks if we should show or hide placeholders
onType
● onType: Observable
<string
>
Implementation of WchPlaceholder.onType
Defined in components/placeholder/placeholder.component.ts:111
Decodes the type of the currently accessed element
wchEditable
● wchEditable: WchEditableType
Defined in components/placeholder/placeholder.component.ts:62
Main input value for the directive. It denotes the element that is being edited.
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/placeholder/placeholder.component.ts:244
Returns: void
ngOnInit
▸ ngOnInit(): void
Overrides AbstractLifeCycleComponent.ngOnInit
Defined in components/placeholder/placeholder.component.ts:238
Returns: void
safeSubscribe
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "services/config/wch.edit.config" > EditHubInfoService
Interface: EditHubInfoService
Hierarchy
EditHubInfoService
Index
Properties
Properties
<Optional>
debugPlaceholders
● debugPlaceholders: boolean
Defined in services/config/wch.edit.config.ts:28
Enable or disable placeholders even if inline edit mode has not been enabled
<Optional>
defaultPlaceholderText
● defaultPlaceholderText: WchDefaultPlaceholder
Defined in services/config/wch.edit.config.ts:38
Provide a default placeholder text
<Optional>
inlineEditUrl
● inlineEditUrl: HubInfoUrlProvider
Defined in services/config/wch.edit.config.ts:17
<Optional>
placeholderTag
● placeholderTag: string
Defined in services/config/wch.edit.config.ts:23
Tag used to find placeholder content items. If left undefined, placeholders will not be inserted, automatically
<Optional>
throttleLoading
● throttleLoading: number
Defined in services/config/wch.edit.config.ts:33
Throttle loading of lib
@ibm-wch-sdk/ng-edit > "directives/editable/abstract.editable.directive" > AbstractWchEditableDirective
Class: AbstractWchEditableDirective
Hierarchy
AbstractLifeCycleComponent
↳ AbstractWchEditableDirective
↳ WchEditablePlaceholderDirective
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnInit
OnDestroy
RenderingContextProvider
Index
Constructors
Properties
- _handle
- _onAuthoringType
- onAccessor
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onData
- onDoCheck
- onOnChanges
- onOnDestroy
- onOnInit
- onPlaceholder
- onRenderingContext
- onWchEditable
- wchEditable
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
<Protected>
constructor
⊕ new AbstractWchEditableDirective(vcRef: ViewContainerRef
, aInternal: WchInternalEditService, aDebugPlaceholders: boolean
, aInjector: Injector
): AbstractWchEditableDirective
Defined in directives/editable/abstract.editable.directive.ts:130
Parameters:
Name | Type |
---|---|
vcRef | ViewContainerRef |
aInternal | WchInternalEditService |
aDebugPlaceholders | boolean |
aInjector | Injector |
Returns: AbstractWchEditableDirective
Properties
<Protected>
_handle
● _handle: string
Defined in directives/editable/abstract.editable.directive.ts:94
Internal handle used for debugging output
<Protected>
_onAuthoringType
● _onAuthoringType: Observable
<AuthoringType
>
Defined in directives/editable/abstract.editable.directive.ts:130
accessor to the authoring type
onAccessor
● onAccessor: Observable
<string
>
Defined in directives/editable/abstract.editable.directive.ts:120
Exposes the decoded accessor string into the renderign context
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onData
● onData: Observable
<any
>
Defined in directives/editable/abstract.editable.directive.ts:115
Generates the accessed data, decoded from the accessor expression
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Defined in directives/editable/abstract.editable.directive.ts:110
Event exposing the current placeholder. Note that this fill only fire if the application runs in preview mode. In live mode this is just the empty event.
onRenderingContext
● onRenderingContext: Observable
<RenderingContext
>
Defined in directives/editable/abstract.editable.directive.ts:125
Exposes the rendering context
onWchEditable
● onWchEditable: EventEmitter
<WchEditableEvent
> = new EventEmitter()
Defined in directives/editable/abstract.editable.directive.ts:104
Event that tells about the inline edit process
wchEditable
● wchEditable: WchEditableType
Defined in directives/editable/abstract.editable.directive.ts:99
Main input value for the directive. It denotes the element that is being edited.
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Inherited from AbstractLifeCycleComponent.ngOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:60
see: OnDestroy
override:
Returns: void
ngOnInit
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:55
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "directives/editable/editable.directive" > WchEditableDirective
Class: WchEditableDirective
Directive that allows an element of a layout to be editable. The directive assumes that the hosting component exposes a rendering context via the 'onRenderingContext' member. It will then attach to the 'WchInlineEditService' to register the element for edit operations.
Hierarchy
↳ AbstractWchEditableDirective
↳ WchEditableDirective
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnInit
OnDestroy
RenderingContextProvider
OnInit
OnDestroy
Index
Constructors
Properties
- _handle
- _onAuthoringType
- onAccessor
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onData
- onDoCheck
- onOnChanges
- onOnDestroy
- onOnInit
- onPlaceholder
- onRenderingContext
- onWchEditable
- wchEditable
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchEditableDirective(vcRef: ViewContainerRef
, aInternal: WchInternalEditService, aDebugPlaceholders: boolean
, aInjector: Injector
): WchEditableDirective
Overrides AbstractWchEditableDirective.constructor
Defined in directives/editable/editable.directive.ts:57
Parameters:
Name | Type |
---|---|
vcRef | ViewContainerRef |
aInternal | WchInternalEditService |
aDebugPlaceholders | boolean |
aInjector | Injector |
Returns: WchEditableDirective
Properties
<Protected>
_handle
● _handle: string
Inherited from AbstractWchEditableDirective._handle
Defined in directives/editable/abstract.editable.directive.ts:94
Internal handle used for debugging output
<Protected>
_onAuthoringType
● _onAuthoringType: Observable
<AuthoringType
>
Inherited from AbstractWchEditableDirective._onAuthoringType
Defined in directives/editable/abstract.editable.directive.ts:130
accessor to the authoring type
onAccessor
● onAccessor: Observable
<string
>
Inherited from AbstractWchEditableDirective.onAccessor
Defined in directives/editable/abstract.editable.directive.ts:120
Exposes the decoded accessor string into the renderign context
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onData
● onData: Observable
<any
>
Overrides AbstractWchEditableDirective.onData
Defined in directives/editable/editable.directive.ts:57
Generates the accessed data, decoded from the accessor expression
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Overrides AbstractWchEditableDirective.onPlaceholder
Defined in directives/editable/editable.directive.ts:51
Event exposing the current placeholder. Note that this fill only fire if the application runs in preview mode. In live mode this is just the empty event.
onRenderingContext
● onRenderingContext: Observable
<RenderingContext
>
Inherited from AbstractWchEditableDirective.onRenderingContext
Defined in directives/editable/abstract.editable.directive.ts:125
Exposes the rendering context
onWchEditable
● onWchEditable: EventEmitter
<WchEditableEvent
>
Overrides AbstractWchEditableDirective.onWchEditable
Defined in directives/editable/editable.directive.ts:44
Event that tells about the inline edit process
wchEditable
● wchEditable: WchEditableType
Overrides AbstractWchEditableDirective.wchEditable
Defined in directives/editable/editable.directive.ts:38
Main input value for the directive. It denotes the element that is being edited.
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in directives/editable/editable.directive.ts:75
Returns: void
ngOnInit
▸ ngOnInit(): void
Overrides AbstractLifeCycleComponent.ngOnInit
Defined in directives/editable/editable.directive.ts:70
Returns: void
safeSubscribe
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "directives/editable/editable.placeholder.directive" > WchEditablePlaceholderDirective
Class: WchEditablePlaceholderDirective
Directive that allows an element of a layout to be editable. The directive assumes that the hosting component exposes a rendering context via the 'onRenderingContext' member. It will then attach to the 'WchInlineEditService' to register the element for edit operations.
Hierarchy
↳ AbstractWchEditableDirective
↳ WchEditablePlaceholderDirective
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnInit
OnDestroy
RenderingContextProvider
OnInit
OnDestroy
- WchPlaceholder
Index
Constructors
Properties
- _handle
- _onAuthoringType
- onAccessor
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onData
- onDoCheck
- onFormattedText
- onOnChanges
- onOnDestroy
- onOnInit
- onPlaceholder
- onPlainText
- onRenderingContext
- onType
- onWchEditable
- wchEditable
- wchFormat
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchEditablePlaceholderDirective(vcRef: ViewContainerRef
, aElementRef: ElementRef
, aRenderer: Renderer2
, aInternal: WchInternalEditService, aDefaultPlaceholderText: WchDefaultPlaceholder, aDebugPlaceholders: boolean
, aDefaultLocale: string
, aInjector: Injector
): WchEditablePlaceholderDirective
Overrides AbstractWchEditableDirective.constructor
Defined in directives/editable/editable.placeholder.directive.ts:183
Parameters:
Name | Type |
---|---|
vcRef | ViewContainerRef |
aElementRef | ElementRef |
aRenderer | Renderer2 |
aInternal | WchInternalEditService |
aDefaultPlaceholderText | WchDefaultPlaceholder |
aDebugPlaceholders | boolean |
aDefaultLocale | string |
aInjector | Injector |
Returns: WchEditablePlaceholderDirective
Properties
<Protected>
_handle
● _handle: string
Inherited from AbstractWchEditableDirective._handle
Defined in directives/editable/abstract.editable.directive.ts:94
Internal handle used for debugging output
<Protected>
_onAuthoringType
● _onAuthoringType: Observable
<AuthoringType
>
Inherited from AbstractWchEditableDirective._onAuthoringType
Defined in directives/editable/abstract.editable.directive.ts:130
accessor to the authoring type
onAccessor
● onAccessor: Observable
<string
>
Implementation of WchPlaceholder.onAccessor
Inherited from AbstractWchEditableDirective.onAccessor
Defined in directives/editable/abstract.editable.directive.ts:120
Exposes the decoded accessor string into the renderign context
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onData
● onData: Observable
<any
>
Implementation of WchPlaceholder.onData
Overrides AbstractWchEditableDirective.onData
Defined in directives/editable/editable.placeholder.directive.ts:177
Generates the accessed data, decoded from the accessor expression
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
onFormattedText
● onFormattedText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onFormattedText
Defined in directives/editable/editable.placeholder.directive.ts:171
Generates the formatted text of an element, potentially replaced by the placeholder
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Implementation of WchPlaceholder.onPlaceholder
Overrides AbstractWchEditableDirective.onPlaceholder
Defined in directives/editable/editable.placeholder.directive.ts:159
Event exposing the current placeholder. Note that this fill only fire if the application runs in preview mode. In live mode this is just the empty event.
onPlainText
● onPlainText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onPlainText
Defined in directives/editable/editable.placeholder.directive.ts:165
Generates the text of an element, potentially replaced by the placeholder
onRenderingContext
● onRenderingContext: Observable
<RenderingContext
>
Inherited from AbstractWchEditableDirective.onRenderingContext
Defined in directives/editable/abstract.editable.directive.ts:125
Exposes the rendering context
onType
● onType: Observable
<string
>
Implementation of WchPlaceholder.onType
Defined in directives/editable/editable.placeholder.directive.ts:183
Generates the type of the current element
onWchEditable
● onWchEditable: EventEmitter
<WchEditableEvent
>
Overrides AbstractWchEditableDirective.onWchEditable
Defined in directives/editable/editable.placeholder.directive.ts:152
Event that tells about the inline edit process
wchEditable
● wchEditable: WchEditableType
Overrides AbstractWchEditableDirective.wchEditable
Defined in directives/editable/editable.placeholder.directive.ts:135
Main input value for the directive. It denotes the element that is being edited.
wchFormat
● wchFormat: WchEditableFormat
Defined in directives/editable/editable.placeholder.directive.ts:146
If specified, the directive will update the textual content of the attached node with either the value of the edited property or with the configured placeholder, if there is any. The format flag describes if the value is considered to be plain text ('text'), formatted text ('html') or if the type is to be discovered automatically.
If missing, the property has to be updated by the designer of the template, explicitly.
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in directives/editable/editable.placeholder.directive.ts:384
Returns: void
ngOnInit
▸ ngOnInit(): void
Overrides AbstractLifeCycleComponent.ngOnInit
Defined in directives/editable/editable.placeholder.directive.ts:379
Returns: void
safeSubscribe
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "module" > WchNgEditModule
Class: WchNgEditModule
Hierarchy
WchNgEditModule
Index
Constructors
Methods
Constructors
constructor
⊕ new WchNgEditModule(parentModule: WchNgEditModule): WchNgEditModule
Defined in module.ts:86
Parameters:
Name | Type |
---|---|
parentModule | WchNgEditModule |
Returns: WchNgEditModule
Methods
<Static>
forRoot
▸ forRoot(aConfig?: EditHubInfoService): ModuleWithProviders
Defined in module.ts:44
Parameters:
Name | Type |
---|---|
Optional aConfig |
EditHubInfoService |
Returns: ModuleWithProviders
@ibm-wch-sdk/ng-edit > "modules/components.module" > WchNgEditComponentsModule
Class: WchNgEditComponentsModule
Hierarchy
WchNgEditComponentsModule
Index
@ibm-wch-sdk/ng-edit > "modules/services.module" > WchNgEditServicesModule
Class: WchNgEditServicesModule
Hierarchy
WchNgEditServicesModule
Index
@ibm-wch-sdk/ng-edit > "services/edit/wch.inline.edit.service" > WchInlineEditRegistrationService
Class: WchInlineEditRegistrationService
Service that allows to register inline edit to HTML elements. The caller has to manage the life cycle, explicitly.
Hierarchy
WchInlineEditRegistrationService
Index
Constructors
Properties
Constructors
constructor
⊕ new WchInlineEditRegistrationService(aInternal: WchInternalEditService, aInjector: Injector
): WchInlineEditRegistrationService
Defined in services/edit/wch.inline.edit.service.ts:38
Parameters:
Name | Type |
---|---|
aInternal | WchInternalEditService |
aInjector | Injector |
Returns: WchInlineEditRegistrationService
Properties
register
● register: function
Defined in services/edit/wch.inline.edit.service.ts:34
Type declaration
▸(aCurrentElement: HTMLElement
, aAccessor: string
, aRenderingContext: Observable
<RenderingContext
>): Observable
<WchEditableEvent
>
Parameters:
Name | Type |
---|---|
aCurrentElement | HTMLElement |
aAccessor | string |
aRenderingContext |
Observable <RenderingContext > |
Returns: Observable
<WchEditableEvent
>
@ibm-wch-sdk/ng-edit > "services/http/http.inline.edit.service" > WchHttpInlineEditService
Class: WchHttpInlineEditService
Implementation of the {@link WchInlineEditService} that loads the inline edit library and allows to attach to that library.
Hierarchy
AbstractLifeCycleComponent
↳ WchHttpInlineEditService
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
WchInlineEditService
OnDestroy
Index
Constructors
Properties
- fromEvent
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onDoCheck
- onOnChanges
- onOnDestroy
- onOnInit
- registerComponent
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchHttpInlineEditService(aHttpClient: HttpClient
, aInternal: WchInternalEditService, aInjector: Injector
): WchHttpInlineEditService
Defined in services/http/http.inline.edit.service.ts:273
Parameters:
Name | Type |
---|---|
aHttpClient | HttpClient |
aInternal | WchInternalEditService |
aInjector | Injector |
Returns: WchHttpInlineEditService
Properties
fromEvent
● fromEvent: function
Defined in services/http/http.inline.edit.service.ts:267
Type declaration
▸<T
>(aName: string
): Observable
<T
>
Type parameters:
T
Parameters:
Name | Type |
---|---|
aName | string |
Returns: Observable
<T
>
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
registerComponent
● registerComponent: function
Defined in services/http/http.inline.edit.service.ts:269
Type declaration
▸(nativeElement: any
, accessor: AccessorType
, onRenderingContext: Observable
<RenderingContext
>): Observable
<EventTargetLike
<any
>>
Parameters:
Name | Type |
---|---|
nativeElement | any |
accessor | AccessorType |
onRenderingContext |
Observable <RenderingContext > |
Returns: Observable
<EventTargetLike
<any
>>
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in services/http/http.inline.edit.service.ts:544
Returns: void
ngOnInit
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:55
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "services/http/http.inline.edit.service" > Disposable
Interface: Disposable
Helper interface
Hierarchy
Disposable
Index
Properties
Properties
dispose
● dispose: function
Defined in services/http/http.inline.edit.service.ts:79
Type declaration
▸(): void
Returns: void
@ibm-wch-sdk/ng-edit > "services/info/wch.edit.info.service" > WchEditInfoService
Class: WchEditInfoService
Service that allows to find out if editing or inline-editing operations are currently taking place and that allows to register for changes.
Hierarchy
WchEditInfoService
Index
Constructors
Properties
Constructors
constructor
⊕ new WchEditInfoService(aInternal: WchInternalEditService, aInjector: Injector
): WchEditInfoService
Defined in services/info/wch.edit.info.service.ts:23
Parameters:
Name | Type |
---|---|
aInternal | WchInternalEditService |
aInjector | Injector |
Returns: WchEditInfoService
Properties
onEditing
● onEditing: Observable
<boolean
>
Defined in services/info/wch.edit.info.service.ts:20
observable keeping track whether an inline edit operation is happening
onInlineEdit
● onInlineEdit: Observable
<boolean
>
Defined in services/info/wch.edit.info.service.ts:23
observable keeping track whether inline edit is active
@ibm-wch-sdk/ng-edit > "services/info/wch.internal.edit.service" > WchInternalEditService
Class: WchInternalEditService
Service that manages the inline edit state
Hierarchy
WchInternalEditService
Index
Constructors
Properties
Constructors
constructor
⊕ new WchInternalEditService(): WchInternalEditService
Defined in services/info/wch.internal.edit.service.ts:27
Returns: WchInternalEditService
Properties
editableConsumer
● editableConsumer: Consumer
<WchEditableEvent
>
Defined in services/info/wch.internal.edit.service.ts:18
the subject that manages the edit operations on an element
inlineEditConsumer
● inlineEditConsumer: Consumer
<WchInlineEditEvent
>
Defined in services/info/wch.internal.edit.service.ts:21
the subject that manages the inline edit operations
onEditing
● onEditing: Observable
<boolean
>
Defined in services/info/wch.internal.edit.service.ts:24
observable keeping track whether an inline edit operation is happening
onInlineEdit
● onInlineEdit: Observable
<boolean
>
Defined in services/info/wch.internal.edit.service.ts:27
observable keeping track whether inline edit is active
@ibm-wch-sdk/ng-edit > "services/placeholders/placeholders.service" > WchPlaceholderImpl
Class: WchPlaceholderImpl
Hierarchy
WchPlaceholderImpl
Implements
Index
Constructors
Properties
Constructors
constructor
⊕ new WchPlaceholderImpl(aAccessor: WchEditableType, aProvider: RenderingContextProvider
, aDefaultLocale: string
, aInjector: Injector
): WchPlaceholderImpl
Defined in services/placeholders/placeholders.service.ts:126
Parameters:
Name | Type |
---|---|
aAccessor | WchEditableType |
aProvider | RenderingContextProvider |
aDefaultLocale | string |
aInjector | Injector |
Returns: WchPlaceholderImpl
Properties
onAccessor
● onAccessor: Observable
<string
>
Implementation of WchPlaceholder.onAccessor
Defined in services/placeholders/placeholders.service.ts:100
The accessor expression
onData
● onData: Observable
<any
>
Implementation of WchPlaceholder.onData
Defined in services/placeholders/placeholders.service.ts:111
Generates the accessed data, decoded from the accessor expression
onFormattedText
● onFormattedText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onFormattedText
Defined in services/placeholders/placeholders.service.ts:121
Generates the formatted text of an element, potentially replaced by the placeholder
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Implementation of WchPlaceholder.onPlaceholder
Defined in services/placeholders/placeholders.service.ts:106
Event exposing the current placeholder. Note that this fill only fire if the application runs in preview mode. In live mode this is just the empty event.
onPlainText
● onPlainText: Observable
<LocalizedText
>
Implementation of WchPlaceholder.onPlainText
Defined in services/placeholders/placeholders.service.ts:116
Generates the text of an element, potentially replaced by the placeholder
onType
● onType: Observable
<string
>
Implementation of WchPlaceholder.onType
Defined in services/placeholders/placeholders.service.ts:126
Generates the type of the current element
@ibm-wch-sdk/ng-edit > "services/placeholders/placeholders.service" > WchPlaceholderService
Class: WchPlaceholderService
Hierarchy
AbstractLifeCycleComponent
↳ WchPlaceholderService
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
Index
Constructors
Properties
- getPlaceholder
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onDoCheck
- onOnChanges
- onOnDestroy
- onOnInit
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchPlaceholderService(aDefaultLocale: string
, aInjector: Injector
): WchPlaceholderService
Defined in services/placeholders/placeholders.service.ts:316
Parameters:
Name | Type |
---|---|
aDefaultLocale | string |
aInjector | Injector |
Returns: WchPlaceholderService
Properties
getPlaceholder
● getPlaceholder: function
Defined in services/placeholders/placeholders.service.ts:313
Type declaration
▸(aAccessor: WchEditableType, aProvider: RenderingContextProvider
): WchPlaceholder
Parameters:
Name | Type |
---|---|
aAccessor | WchEditableType |
aProvider | RenderingContextProvider |
Returns: WchPlaceholder
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in services/placeholders/placeholders.service.ts:333
Returns: void
ngOnInit
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:55
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "services/placeholders/placeholders.service" > WchPlaceholder
Interface: WchPlaceholder
Hierarchy
WchPlaceholder
Implemented by
Index
Properties
Properties
onAccessor
● onAccessor: Observable
<string
>
Defined in services/placeholders/placeholders.service.ts:65
The accessor expression
onData
● onData: Observable
<any
>
Defined in services/placeholders/placeholders.service.ts:76
Generates the accessed data, decoded from the accessor expression
onFormattedText
● onFormattedText: Observable
<LocalizedText
>
Defined in services/placeholders/placeholders.service.ts:91
Generates the formatted text of an element, potentially replaced by the placeholder
onPlaceholder
● onPlaceholder: Observable
<AuthoringPlaceholder
>
Defined in services/placeholders/placeholders.service.ts:71
Event exposing the current placeholder. Note that this fill only fire if the application runs in preview mode. In live mode this is just the empty event.
onPlainText
● onPlainText: Observable
<LocalizedText
>
Defined in services/placeholders/placeholders.service.ts:86
Generates the text of an element, potentially replaced by the placeholder
onType
● onType: Observable
<string
>
Defined in services/placeholders/placeholders.service.ts:81
Decodes the type of the currently accessed element
@ibm-wch-sdk/ng-edit > "services/rendering/placeholder.interceptor" > PlaceholderInterceptor
Class: PlaceholderInterceptor
The service intercepts the construction of RenderingContext objects and inserts placeholder tokens.
Hierarchy
AbstractLifeCycleComponent
↳ PlaceholderInterceptor
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
RenderingContextInterceptor
OnDestroy
Index
Constructors
Properties
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onDoCheck
- onOnChanges
- onOnDestroy
- onOnInit
- opRenderingContext
- opRenderingContexts
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new PlaceholderInterceptor(aInjector: any
): PlaceholderInterceptor
Defined in services/rendering/placeholder.interceptor.ts:54
Parameters:
Name | Type |
---|---|
aInjector | any |
Returns: PlaceholderInterceptor
Properties
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
opRenderingContext
● opRenderingContext: MonoTypeOperatorFunction
<RenderingContext
>
Defined in services/rendering/placeholder.interceptor.ts:50
operator to intercept a single rendering context
opRenderingContexts
● opRenderingContexts: MonoTypeOperatorFunction
<RenderingContext
[]>
Defined in services/rendering/placeholder.interceptor.ts:54
operator to intercept a multiple rendering contexts
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in services/rendering/placeholder.interceptor.ts:195
Returns: void
ngOnInit
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:55
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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-edit > "services/wch/wch.edit.service" > WchEditService
Class: WchEditService
Hierarchy
AbstractLifeCycleComponent
↳ WchEditService
Implements
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
Index
Constructors
Properties
- login
- loginFederated
- loginURL
- loginWithGoogle
- logout
- onAfterContentChecked
- onAfterContentInit
- onAfterViewChecked
- onAfterViewInit
- onCurrentUser
- onDoCheck
- onLoggedIn
- onOnChanges
- onOnDestroy
- onOnInit
- refresh
Methods
- describeSetter
- ngAfterContentChecked
- ngAfterContentInit
- ngAfterViewChecked
- ngAfterViewInit
- ngDoCheck
- ngOnChanges
- ngOnDestroy
- ngOnInit
- safeSubscribe
- unsubscribeOnDestroy
Constructors
constructor
⊕ new WchEditService(aHttp: HttpClient
, aInjector: Injector
): WchEditService
Defined in services/wch/wch.edit.service.ts:139
Parameters:
Name | Type |
---|---|
aHttp | HttpClient |
aInjector | Injector |
Returns: WchEditService
Properties
login
● login: function
Defined in services/wch/wch.edit.service.ts:119
Performs a login. A successful login will cause the onCurrentUser observable to emit the logged in user.
param: the username
param: the password
returns: observable with the tenant ID after login
Type declaration
▸(aUserName: string
, aPassword: string
): Observable
<string
>
Parameters:
Name | Type |
---|---|
aUserName | string |
aPassword | string |
Returns: Observable
<string
>
loginFederated
● loginFederated: function
Defined in services/wch/wch.edit.service.ts:103
experimental:
Type declaration
▸(): Observable
<string
>
Returns: Observable
<string
>
loginURL
● loginURL: string
Defined in services/wch/wch.edit.service.ts:139
loginWithGoogle
● loginWithGoogle: function
Defined in services/wch/wch.edit.service.ts:108
experimental:
Type declaration
▸(): Observable
<string
>
Returns: Observable
<string
>
logout
● logout: function
Defined in services/wch/wch.edit.service.ts:125
Performs a logout. A successful logout will cause the onCurrentUser to emit the anonymous user.
Type declaration
▸(): Observable
<void
>
Returns: Observable
<void
>
<Protected>
onAfterContentChecked
● onAfterContentChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:75
see: AfterContentChecked
returns: the observable representation of this callback
<Protected>
onAfterContentInit
● onAfterContentInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:80
see: AfterContentInit
returns: the observable representation of this callback
<Protected>
onAfterViewChecked
● onAfterViewChecked: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:65
see: AfterViewChecked
returns: the observable representation of this callback
<Protected>
onAfterViewInit
● onAfterViewInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:70
see: AfterViewInit
returns: the observable representation of this callback
onCurrentUser
● onCurrentUser: Observable
<User
>
Defined in services/wch/wch.edit.service.ts:135
Monitors the current user object
<Protected>
onDoCheck
● onDoCheck: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:85
see: DoCheck
returns: the observable representation of this callback
onLoggedIn
● onLoggedIn: Observable
<boolean
>
Defined in services/wch/wch.edit.service.ts:130
Monitors the login state
<Protected>
onOnChanges
● onOnChanges: Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:90
see: OnChanges
returns: the observable representation of this callback
<Protected>
onOnDestroy
● onOnDestroy: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:100
see: OnDestroy
returns: the observable representation of this callback
<Protected>
onOnInit
● onOnInit: Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:95
see: OnInit
returns: the observable representation of this callback
refresh
● refresh: function
Defined in services/wch/wch.edit.service.ts:137
Type declaration
▸(): void
Returns: void
Methods
<Protected>
describeSetter
▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:121
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:35
see: AfterContentChecked
override:
Returns: void
ngAfterContentInit
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:40
see: AfterContentInit
override:
Returns: void
ngAfterViewChecked
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:25
see: AfterViewChecked
override:
Returns: void
ngAfterViewInit
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:30
see: AfterViewInit
override:
Returns: void
ngDoCheck
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:45
see: DoCheck
override:
Returns: void
ngOnChanges
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:50
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
ngOnDestroy
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in services/wch/wch.edit.service.ts:480
Returns: void
ngOnInit
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:55
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:134
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 /usr/build/node_modules/@ibm-wch-sdk/ng/src/components/rendering/abstract.lifecycle.component.d.ts:109
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
WchEditableDirective
The [wchEditable]
directive enables support for inline edit operations. It serves two purposes:
- attach an element to the inline edit functionality in WCH
- expose placeholder information to the application
Inline edit
Add the [wchEditable]
directive to any element that you'd like to see inline edited. The value of the directive is an accessor string that identifies the edited element, relative to the rendering context of the component. The implementation of the directive will automatically load and attach the inline edit library. You will only see an effect of this when running in preview mode with inline edit enabled.
Example:
<div wchEditable="myText">{{ myText }}</div>
Placeholders
In WCH you can define placeholder values for elements that are defined on a content type, but have not yet been filled out. The [wchEditable]
makes these configured placeholders available to the application, so the application can display them as appropriate.
Placeholders are exposed in different way, depending on the level of customization required. Following we list these way in ascending order of complexity:
Text based placeholders
For cases when both the element content as well as the placeholders are just text, you can use the following convenience way to have the application display either the element text (if defined) or the placeholder text (if defined and if the application runs in preview).
<div wchEditable="myText" wchFormat='auto'></div>
If wchFormat
is specified on an element that also has the [wchEditable]
assigned the body of the element will contain the element text or the placeholder fallback. The tag can automatically detect if the element is using plain text or formatted text and will escape the result as appropriate. The tags accepts text
, html
or auto
as a format identified.
Fine grained control
For more fine grained control of the display, or if text only display is not enough, the [wchEditable]
can be exposed as a variable on the element:
<div wchEditable="myText" #handle="wchEditable"></div>
Note that #handle
defines the local name of the variable, this can be chosen by the developer. The value wchEditable
must be used literally and denotes the directive.
This exposes directive has a number of properties that can be used to render the item with placeholders, notably:
-
onPlaceholder
: observable of the placeholder configuration -
onPlainText
: observable of the text of the element or its placeholder fallback -
onFormattedText
: observable of the formatted text of the element or its placeholder fallback. The placeholder fallback will be exposed as formatted text, too. -
onData
: observable of the actual element data referenced by the directive
Note, that both onPlainText
and onFormattedText
return a LocalizedText
object, which is the combination of the actual text and the locale for this text. This is necessary because the placeholder might be in a different locale than the element text and this combination makes it possible to produce a consistent rendering result.
Modules
The SDK splits its functionality into a module that provides services and one that provides components and directives.
WchNgEditServicesModule
The service module exposes services.
WchNgEditComponentsModule
The component module defines components and directives. Import this module from other modules that contain UI artifacts.
Configuration Tokens
The edit library makes use of Dependency Injection for its configuration. Each configuration setting is available via a dedicated injection token and can be overridden individually.
Tokens
The following tokens are available:
-
WCH_DEFAULT_PLACEHOLDER_TEXT
: default text for placeholders, see EditHubInfoService -
WCH_INLINE_EDIT_URL
: URL template used to load the inline edit library, see EditHubInfoService -
WCH_PLACEHOLDER_TAG
: if specified the tag used to locate placeholder content, see EditHubInfoService -
WCH_DEBUG_PLACEHOLDERS
: if set to true, enabled placeholders also when inline edit is not enabled, see EditHubInfoService
Components
- wch-placeholder Component that uses content projection to show or hide placeholders
Placeholder Component
The placeholder component can be used to easily show or hide placeholders for via content projection. The component will show the child element with the CSS class wch-placeholder
if a placeholder is supposed to be shown and the other elements else.
Example
The following example demonstrates the use of the component to show a placeholder image if the original image is not available and if placeholders are enabled.
<wch-placeholder wchEditable="image">
<!-- original markup -->
<img wchEditable="image" [src]="utilService.getImageUrl(rContext, IMAGE_KEY, 'short')" [alt]="image.altText ? (onImage | async).altText : ''"
[title]="image.altText ? (onImage | async).altText : ''" />
<!-- placeholder markup -->
<img wchEditable="image" class="wch-placeholder" src="https://via.placeholder.com/350x150">
</wch-placeholder>
Members
The component allows fine grained control over the placeholder display by exposing the following events:
-
onShowPlaceholder
: boolean that tells if the placeholder is supposed to be displayed or not -
onPlaceholder
: the placeholder item. This will only fire in preview mode, never in live mode -
onData
: the data referenced by thewchEditable
accessor -
onAccessor
: the resolved accessor string. This can e.g. be used to remove the reduncancy of specifying the accessor for the inner items.
EditHubInfoService
The EditHubInfoService allow to configure the WchNgEditModule by implementing an interface.