Index

core/common/virtual-scroll/virtual-scroll-window.directive.ts

_virtualScrollWindowStrategyFactory
_virtualScrollWindowStrategyFactory(windowDir: VirtualScrollWindowDirective)

Provider factory for VirtualScrollWindowStrategy that simply extracts the already created VirtualScrollWindowStrategy from the given directive.

Parameters :
Name Type Optional Description
windowDir VirtualScrollWindowDirective No

The instance of VirtualScrollWindowDirective to extract the VirtualScrollWindowStrategy from.

upgrade/absolute-date.service.ts

absoluteDateServiceFactory
absoluteDateServiceFactory(datePipe: DatePipe)
Parameters :
Name Type Optional
datePipe DatePipe No

polyfills/index.ts

addPolyfills
addPolyfills()

alarms/cockpit/index.ts

alarmsCockpitRouteAndNodeConfig
alarmsCockpitRouteAndNodeConfig()

alarms/devicemanagement/index.ts

alarmsDeviceManagementRouteAndNodeConfig
alarmsDeviceManagementRouteAndNodeConfig()

core/alert/alert-on-error.ts

alertOnError
alertOnError(result: Promise)

Checks for errors in responses of requests made with @c8y/client services and displays them as alerts using AlertService.

Example

Example :
   const devices = await alertOnError(inventoryService.list({...}));
Parameters :
Name Type Optional Description
result Promise No

The result object from the @c8y/client service method

Returns : Promise<T>

The original response (success or failure) of the @c8y/client service method invokation

core/common/extension-hooks.ts

allEntriesAreEqual
allEntriesAreEqual(previous: Array, next: Array)
Parameters :
Name Type Optional
previous Array No
next Array No
Returns : boolean
fromFactories
fromFactories(factories?: Array, router?: Router, withFirstEmpty)
Parameters :
Name Type Optional Default value
factories Array Yes
router Router Yes
withFirstEmpty No true
Returns : Observable<T[]>
fromTrigger
fromTrigger(router: Router, refresh, factories: Array)
Parameters :
Name Type Optional
router Router No
refresh No
factories Array No
Returns : Observable<T[]>
fromTriggerOnce
fromTriggerOnce(router: Router, refresh, factories: Array)
Parameters :
Name Type Optional
router Router No
refresh No
factories Array No
Returns : Observable<T[]>
getActivatedRoute
getActivatedRoute(router: Router)

Helper function to get the activated route in a service (as ActivatedRoute injection only works in components). Works as long as we only use a tree and no child is active at the same time.

Parameters :
Name Type Optional Description
router Router No

The current router

Returns : ActivatedRoute
getInjectedHooks
getInjectedHooks(token: InjectionToken, injectors, type)
Parameters :
Name Type Optional Default value
token InjectionToken No
injectors No
type No InjectionType.COMPONENT
Returns : T[]
hookGeneric
hookGeneric(items, token: InjectionToken, options?: Partial)

A generic function to be used by specific implementations of the HOOK concept.

Parameters :
Name Type Optional Description
items No

The items that should be provided under the useValue or useClass attribute. Allows an extension factory to be passed as an argument, which can create instances of type T.

token InjectionToken No

The InjectionToken/HOOK to be provided.

options Partial Yes

If this is a multi provider or not (defaults to true) and provider type definition (defaults to ClassProvider) - HookOptions.

A Provider (either ValueProvider or ClassProvider) to be provided in a module.

isExtensionFactory
isExtensionFactory(obj: any)
Parameters :
Name Type Optional
obj any No
isPromise
isPromise(obj: any)
Parameters :
Name Type Optional
obj any No
Returns : Promise<T>
removeDuplicatesIds
removeDuplicatesIds(items)
Parameters :
Name Optional
items No
Returns : T[]
resolveInjectedFactories
resolveInjectedFactories(factories: Array)
Parameters :
Name Type Optional
factories Array No
sortByPriority
sortByPriority(items)
Parameters :
Name Optional
items No
Returns : T[]
stateToFactory
stateToFactory(componentsState)
Parameters :
Name Optional
componentsState No
toObservable
toObservable(value)

Converts any value provided to an Observable that emits this value once and then completes. A convenience method to represent all the data as Observables rather than a mixture of Observables and other types.

Parameters :
Name Optional Description
value No

The value the resulting Observable will emit.

Returns : Observable<T>
toObservableOfArrays
toObservableOfArrays(factoryResult, withFirstEmpty: boolean)
Parameters :
Name Type Optional
factoryResult No
withFirstEmpty boolean No
Returns : Observable<T[]>

core/file-picker-form-control/file-picker-form-control.component.ts

appendErrors
appendErrors(errors: ValidationErrors, newErrors)
Parameters :
Name Type Optional
errors ValidationErrors No
newErrors No
Returns : ValidationErrors

core/forms/validate-array-elements.ts

asyncValidateArrayElements
asyncValidateArrayElements(validator: AsyncValidatorFn)

Async version of validateArrayElements.

Note that Angular by design doesn't execute async validators if synchronous validators returns any error.

Parameters :
Name Type Optional Description
validator AsyncValidatorFn No

A standard Angular asynchronous validator function.

Returns : AsyncValidatorFn
generateArrayRelatedErrors
generateArrayRelatedErrors(errors: Array)
Parameters :
Name Type Optional
errors Array No
validateArrayElements
validateArrayElements(validator: ValidatorFn)

This method can alter how validators work. It can be used in cases where there is need to validate FormControl that as value, takes array of elements. This allows to reuse validators, that works for such elements. For example if Validators.minLength(3) is used on control that takes string as value, validator will return error if string is less than 3 characters. If same is done on array of strings, validator will return error if array has less than 3 elements.

validateArrayElements(Validators.minLength(3)) method makes it possible to check every member of array if it has minimum 3 characters. If there are elements that raise error, it will be possible to extract these errors using item index.

As a example, this can be used for custom form elements, which manipulates array of elements, and there is need to display corresponding error messages for every array member that is displayed, while still using Angular's Validation approach.

Errors that are generated by this helper are prefixed with 'INNER_ARRAY_ERROR_'. Reason for this is to prevent overwriting normal validation errors that could have same key

Parameters :
Name Type Optional Description
validator ValidatorFn No

A standard Angular synchronous validator function.

Returns : ValidatorFn

upgrade/auth-bridge.service.ts

authBridgeServiceFactory
authBridgeServiceFactory(injector: any, basicAuth: BasicAuth, fetchClient: FetchClient, appState: AppStateService, tenantUiService: TenantUiService)
Parameters :
Name Type Optional
injector any No
basicAuth BasicAuth No
fetchClient FetchClient No
appState AppStateService No
tenantUiService TenantUiService No

upgrade/bridge.service.ts

bridgeServiceFactory
bridgeServiceFactory(injector: any, appState: AppStateService, router: Router, ngZone: NgZone, routerService: RouterService, actionService: ActionService, plugins: PluginsResolveService)
Parameters :
Name Type Optional
injector any No
appState AppStateService No
router Router No
ngZone NgZone No
routerService RouterService No
actionService ActionService No
plugins PluginsResolveService No

upgrade/ng1/alert.decorator.ts

c8yAlertDecorator
c8yAlertDecorator($delegate, $rootScope, $injector)
Parameters :
Name Optional
$delegate No
$rootScope No
$injector No

upgrade/ng1/navigator.provider.ts

c8yNavigatorProvider
c8yNavigatorProvider()

upgrade/ng1/http.interceptor.ts

c8yNg1HttpInterceptor
c8yNg1HttpInterceptor($q, c8yLoadingIndicator, c8yApiService)
Parameters :
Name Optional
$q No
c8yLoadingIndicator No
c8yApiService No

upgrade/ng1/title.decorator.ts

c8yTitleDecorator
c8yTitleDecorator($q, $delegate, $injector, $rootScope, $location, $templateCache, $compile, c8yHeaderService)
Parameters :
Name Optional
$q No
$delegate No
$injector No
$rootScope No
$location No
$templateCache No
$compile No
c8yHeaderService No

upgrade/ng1/root.component.ts

c8yUiRootController
c8yUiRootController($rootScope, $timeout, c8yBase, c8yNavigator, c8yApplication, c8yHeaderService)
Parameters :
Name Optional
$rootScope No
$timeout No
c8yBase No
c8yNavigator No
c8yApplication No
c8yHeaderService No

core/dynamic-forms/validation/validation-config.factory.ts

c8yValidationConfigFactory
c8yValidationConfigFactory(translate: TranslateService)
Parameters :
Name Type Optional
translate TranslateService No

upgrade/ng1/views.provider.ts

c8yViewsProvider
c8yViewsProvider($routeProvider, c8yTabsProvider, c8yPathUtils)
Parameters :
Name Optional
$routeProvider No
c8yTabsProvider No
c8yPathUtils No

widgets/cockpit/index.ts

cockpitWidgets
Instead add the `cockpitWidgetsExports` to the exports of your `cumulocity.config.ts`.
cockpitWidgets(excludeList?: Array)

Widgets module to be imported in your app module. The exclude list allows to exclude certain widgets. Calls WidgetsModule.config under the hood with the cockpitDefaultWidgets.


NOTE: The excluded widgets will still be part of your bundle. But as they are lazy loaded should not increase loading duration.


Parameters :
Name Type Optional Description
excludeList Array Yes

allows to exclude specific widgets by their id.

An empty module with some providers.

core/color-input/color-validator.ts

colorValidator
colorValidator(allowedModes?)
Parameters :
Name Optional
allowedModes Yes
Returns : AsyncValidatorFn

branding/shared/data/branding.type.ts

createBrandingForm
createBrandingForm(formBuilder: FormBuilder)
Parameters :
Name Type Optional
formBuilder FormBuilder No
createGenericBrandingForm
createGenericBrandingForm(formBuilder: FormBuilder)
Parameters :
Name Type Optional
formBuilder FormBuilder No

widgets/device-management/index.ts

deviceManagementWidgets
deviceManagementWidgets(excludeList?: Array)

Widgets module to be imported in your app module. The exclude list allows to exclude certain widgets. Calls WidgetsModule.config under the hood with the deviceManagementDefaultWidgets.


NOTE: The excluded widgets will still be part of your bundle. But as they are lazy loaded should not increase loading duration.


Parameters :
Name Type Optional Description
excludeList Array Yes

allows to exclude specific widgets by their id.

An empty module with some providers.

connectivity/sim/sim.module.ts

encodeFiles
encodeFiles(model: ProviderProperties, fields)
Parameters :
Name Type Optional
model ProviderProperties No
fields No

widgets/implementations/info-gauge/info-gauge-widget-config/info-gauge-widget-config.component.ts

ensureAtLeastOneDatapointSelectedAndActive
ensureAtLeastOneDatapointSelectedAndActive(datapointListAttributes)
Parameters :
Name Optional
datapointListAttributes No
Returns : ValidatorFn

core/data-grid/grid-data-source.ts

escapeRegExpPattern
escapeRegExpPattern(pattern: string)
Parameters :
Name Type Optional Default value
pattern string No ''

widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.ts

exactlyASingleDatapointActive
exactlyASingleDatapointActive()
Returns : ValidatorFn

core/i18n/i18n.module.ts

getAngularLocalesLanguageString
getAngularLocalesLanguageString(language: string)
Parameters :
Name Type Optional Default value
language string No 'en'
Returns : string
languagesFactory
languagesFactory(options: OptionsService)
Parameters :
Name Type Optional
options OptionsService No
localeId
localeId(appStateService: AppStateService)
Parameters :
Name Type Optional
appStateService AppStateService No
localePathFactory
localePathFactory(options: OptionsService)
Parameters :
Name Type Optional
options OptionsService No

core/dynamic-forms/presets.ts

getBasicInputArrayFormFieldConfig
getBasicInputArrayFormFieldConfig(config: BasicInputArrayFormConfigInterface)

Generates simple array formFieldConfig

Parameters :
Name Type Optional
config BasicInputArrayFormConfigInterface No
Returns : FormlyFieldConfig[]

FormlyFieldConfig[]

map/map.model.ts

getC8yMarker
getC8yMarker(marker, asset?: PositionManagedObject, event?: IEvent)
Parameters :
Name Type Optional
marker No
asset PositionManagedObject Yes
event IEvent Yes

alarms/alarms.helper.ts

getChildrenForViewContext
getChildrenForViewContext(context: ViewContext)
Parameters :
Name Type Optional
context ViewContext No
Returns : Routes
getViewContextRoutes
getViewContextRoutes(contexts)
Parameters :
Name Optional
contexts No
Returns : Routes

core/i18n/translation-utils.ts

getDictionaryWithTrimmedKeys
getDictionaryWithTrimmedKeys(dictionary)

We want to have translation keys unified, so they don't contain unnecessary spaces and line breaks. This way we can dynamically build keys from HTML, and match them to extracted string, that might be HTML as well.

Parameters :
Name Optional
dictionary No
trimTranslationKey
trimTranslationKey(key: string)

Returns a trimmed translation key. If the key contains HTML, it also removes all whitespaces. The reason behind it is that by default Angular compiler removes whitespaces from adjacent inline elements, which prevents ngx-translate from finding a matching entry in the dictionary.

Parameters :
Name Type Optional
key string No

core/plugins/__test__/plugins-test-helper.ts

getRemoteTestingModule
getRemoteTestingModule(providers, providersSubModule?)
Parameters :
Name Optional
providers No
providersSubModule Yes
Returns : Type<any>

gettext/gettext.ts

gettext
gettext(str: T)

Identity function used for marking strings for translation

Parameters :
Name Type Optional
str T No
Returns : T

upgrade/ng1/gettextCatalog.decorator.ts

gettextCatalogDecorator
gettextCatalogDecorator($delegate, $interpolate, c8yTranslate)
Parameters :
Name Optional
$delegate No
$interpolate No
c8yTranslate No

core/dashboard/widget-auto-refresh-context/global-refresh-loading.operator.ts

globalAutoRefreshLoading
globalAutoRefreshLoading(globalRefreshService: WidgetGlobalAutoRefreshService)
Parameters :
Name Type Optional
globalRefreshService WidgetGlobalAutoRefreshService No
Returns : MonoTypeOperatorFunction<boolean>

upgrade/ng1/groupsHierarchyNavigator.decorator.ts

groupTypesHierarchyNavigatorDecorator
groupTypesHierarchyNavigatorDecorator($delegate, $q)
Parameters :
Name Optional
$delegate No
$q No

core/action/action.service.ts

hookAction
hookAction(actions: GenericHookType, options?: Partial)

A hook to add an action using the multi-provider extension concept.

You can either provide a single Action as parameter:

Example :
 hookAction(...)

Or an array to directly register multiple:

Example :
 hookAction([...])

Or you provide an Service that implements ExtensionFactory<Action>

Example :
 export class MyActionFactory implements ExtensionFactory<Action> {...}
 ...
 hookAction(MyActionFactory)

A typed alternative to HOOK_ACTION.

Parameters :
Name Type Optional Description
actions GenericHookType No

The Action's or ExtensionFactory to be provided.

options Partial Yes

core/action-bar/action-bar.service.ts

hookActionBar
hookActionBar(items: GenericHookType, options?: Partial)

A hook to add ActionBarItems using the multi provider extension concept.

You can either provide a single ActionBarItem as parameter:

Example :
 hookActionBar(...)

Or an array to directly register multiple:

Example :
 hookActionBar([...])

Or you provide an Service that implements ExtensionFactory<ActionBarItem>

Example :
 export class MyActionBarFactory implements ExtensionFactory<ActionBarItem> {...}
 ...
 hookActionBar(MyActionBarFactory)

A typed alternative to HOOK_ACTION_BAR.

Parameters :
Name Type Optional Description
items GenericHookType No

The ActionBarItem's or ExtensionFactory to be provided.

options Partial Yes

core/breadcrumb/breadcrumb.service.ts

hookBreadcrumb
hookBreadcrumb(breadcrumb: GenericHookType, options?: Partial)

You can either provide a single Breadcrumb as parameter:

Example :
 hookBreadcrumb(...)

Or an array to directly register multiple:

Example :
 hookBreadcrumb([...])

Or you provide an Service that implements ExtensionFactory<Breadcrumb>

Example :
 export class MyBreadcrumbFactory implements ExtensionFactory<Breadcrumb> {...}
 ...
 hookBreadcrumb(MyBreadcrumbFactory)

A typed alternative to HOOK_BREADCRUMB.

Parameters :
Name Type Optional Description
breadcrumb GenericHookType No

The Breadcrumb's or ExtensionFactory to be provided.

options Partial Yes

core/dynamic-component/dynamic-component.model.ts

hookComponent
hookComponent(components: GenericHookType, options?: Partial)

A hook to add dynamic components to the UI (e.g. widgets).

You can either provide a single DynamicComponentDefinition as parameter:

Example :
 hookComponent(...)

Or an array to directly register multiple:

Example :
 hookComponent([...])

Or you provide an Service that implements ExtensionFactory<DynamicComponentDefinition>

Example :
 export class MyDynamicComponentDefinitionFactory implements ExtensionFactory<DynamicComponentDefinition> {...}
 ...
 hookComponent(MyDynamicComponentDefinitionFactory)

A typed alternative to HOOK_COMPONENTS.

Parameters :
Name Type Optional Description
components GenericHookType No

The DynamicComponentDefinition's or ExtensionFactory to be provided.

options Partial Yes
hookWidget
hookWidget(components: GenericHookType, options?: Partial)

Hook to add dynamic widget components to the UI.

You can either provide a single DynamicWidgetDefinition as parameter:

Example :
 hookWidget(...)

Or an array to directly register multiple:

Example :
 hookWidget([...])
  • Or you provide a Service that implements ExtensionFactory<DynamicWidgetDefinition>
Example :
 export class MyDynamicWidgetDefinitionFactory implements ExtensionFactory<DynamicWidgetDefinition> {...}
 ...
 hookWidget(MyDynamicWidgetDefinitionFactory)

A widget specific alternative to hookComponent..

Parameters :
Name Type Optional Description
components GenericHookType No

The DynamicWidgetDefinition's or ExtensionFactory to be provided.

options Partial Yes

Options to configure the hook.

isEagerDynamicComponents
isEagerDynamicComponents(componentDefinition: DynamicComponents)
Parameters :
Name Type Optional
componentDefinition DynamicComponents No
isLazyDynamicComponents
isLazyDynamicComponents(componentDefinition: DynamicComponents)
Parameters :
Name Type Optional
componentDefinition DynamicComponents No

core/data-grid/action-controls-extension.service.ts

hookDataGridActionControls
hookDataGridActionControls(action: GenericHookType, options?: Partial)

You can either provide a single ActionControlHook as parameter:

Example :
 hookDataGridActionControls(...)

Or an array to directly register multiple:

Example :
 hookDataGridActionControls([...])

Or you provide a service that implements ActionControlFactory

Example :
 export class MyActionControlsFactory implements ActionControlFactory {...}
 ...
 hookDataGridActionControls(MyActionControlsFactory)
Parameters :
Name Type Optional
action GenericHookType No
options Partial Yes

device-list/device-list-extension.service.ts

hookDeviceListColumns
hookDeviceListColumns(columns: GenericHookType, options?: Partial)

A hook to override the default device grid columns configuration in c8y-device-list component.

Parameters :
Name Type Optional
columns GenericHookType No
options Partial Yes

register-device/dropdown/register-device-extension.service.ts

hookDeviceRegistration
hookDeviceRegistration(registration: GenericHookType, options?: Partial)

You can either provide a single RegisterDeviceExtension as parameter:

Example :
 hookDeviceRegistration(...)

Or an array to directly register multiple:

Example :
 hookDeviceRegistration([...])

Or you provide an Service that implements ExtensionFactory<RegisterDeviceExtension>

Example :
 export class MyDeviceRegistrationFactory implements ExtensionFactory<RegisterDeviceExtension> {...}
 ...
 hookDeviceRegistration(MyDeviceRegistrationFactory)

A typed alternative to HOOK_DEVICE_REGISTRATION.

Parameters :
Name Type Optional Description
registration GenericHookType No

The RegisterDeviceExtension's or ExtensionFactory to be provided.

options Partial Yes

core/docs/docs.models.ts

hookDocs
hookDocs(doc: GenericHookType)

You can either provide a single DocLink as parameter:

Example :
 hookOptions(...)

Or an array to directly register multiple:

Example :
 hookOptions([...])

Or you provide an Service that implements ExtensionFactory<DocLink> ```typescript

Parameters :
Name Type Optional Description
doc GenericHookType No

The DocLink's or ExtensionFactory to be provided.

core/drawer/drawer.service.ts

hookDrawer
hookDrawer(drawer: GenericHookType, options?: Partial)

You can either provide a single DrawerItem as parameter:

Example :
 hookDrawer(...)

Or an array to directly register multiple:

Example :
 hookDrawer([...])

Or you provide a Service that implements ExtensionFactory<DrawerItem>

Example :
 export class MyDrawerFactory implements ExtensionFactory<DrawerItem> {...}
 ...
 hookDrawer(MyDrawerFactory)

A typed alternative to HOOK_DRAWER.

Parameters :
Name Type Optional Description
drawer GenericHookType No

The DrawerItem's or ExtensionFactory to be provided.

options Partial Yes

core/provider-configuration/provider-configuration-hook.ts

hookDynamicProviderConfig
hookDynamicProviderConfig(config: GenericHookType, options?: Partial)

You can either provide a single DynamicProviderConfig as parameter:

Example :
 hookDynamicProviderConfig(...)

Or an array to directly register multiple:

Example :
 hookDynamicProviderConfig([...])

Or you provide an Service that implements ExtensionFactory<DynamicProviderConfig>

Example :
 export class MyDynamicProviderConfigFactory implements ExtensionFactory<DynamicProviderConfig> {...}
 ...
 hookDynamicProviderConfig(MyDynamicProviderConfigFactory)

A typed alternative to HOOK_DYNAMIC_PROVIDER_CONFIG.

Parameters :
Name Type Optional Description
config GenericHookType No

The DynamicProviderConfig's or ExtensionFactory to be provided.

options Partial Yes

core/data-grid/filter-chip/filter-mapper.factory.ts

hookFilterMapper
hookFilterMapper(mapper: HookValueType, options?: Partial)

You can either provide a single FilterMapper as parameter:

Example :
 hookFilterMapper(...)

Or an array to directly register multiple:

Example :
 hookFilterMapper([...])

Or you provide an Service that implements FilterMapper

Example :
 export class MyFilterMapper implements FilterMapper {...}
 ...
 hookFilterMapper(MyFilterMapper)

A typed alternative to using HOOK_FILTER_MAPPER.

Parameters :
Name Type Optional Description
mapper HookValueType No

A filter mapper, e.g. BooleanFilterMapper, or ExtensionFactory to be provided.

options Partial Yes

If this is a multi provider or not (defaults to true) and provider type definition (defaults to ClassProvider) - HookOptions.

operations/bulk-operations-service/bulk-operations.service.ts

hookListBulkType
hookListBulkType(type: GenericHookType, options?: Partial)

You can either provide a single OperationType as parameter:

Example :
 hookListBulkType(...)

Or an array to directly register multiple:

Example :
 hookListBulkType([...])

Or you provide an Service that implements ExtensionFactory<OperationType>

Example :
 export class MyListBulkTypeFactory implements ExtensionFactory<OperationType> {...}
 ...
 hookListBulkType(MyListBulkTypeFactory)

A typed alternative to HOOK_LIST_BULK_TYPE.

Parameters :
Name Type Optional Description
type GenericHookType No

The OperationType's or ExtensionFactory to be provided.

options Partial Yes

core/navigator/navigator.service.ts

hookNavigator
hookNavigator(nodes: GenericHookType, options?: Partial)

You can either provide a single NavigatorNode or NavigatorNodeData as parameter:

Example :
 hookNavigator(...)

Or an array to directly register multiple:

Example :
 hookNavigator([...])

Or you provide an Service that implements ExtensionFactory<NavigatorNode | NavigatorNodeData>

Example :
 export class MyNavigatorFactory implements ExtensionFactory<NavigatorNode | NavigatorNodeData> {...}
 ...
 hookNavigator(MyNavigatorFactory)

A typed alternative to HOOK_NAVIGATOR_NODES.

Parameters :
Name Type Optional Description
nodes GenericHookType No

The NavigatorNode's, NavigatorNodeData's or ExtensionFactory to be provided.

options Partial Yes

core/common/options.service.ts

hookOptions
hookOptions(options: GenericHookType, hookOptions?: Partial)

You can either provide a single ApplicationOptions as parameter:

Example :
 hookOptions(...)

Or an array to directly register multiple:

Example :
 hookOptions([...])

Or you provide an Service that implements ExtensionFactory<ApplicationOptions>

Example :
 export class MyApplicationOptionsFactory implements ExtensionFactory<ApplicationOptions> {...}
 ...
 hookOptions(MyApplicationOptionsFactory)

A typed alternative to HOOK_OPTIONS.

Parameters :
Name Type Optional Description
options GenericHookType No

The ApplicationOptions's or ExtensionFactory to be provided.

hookOptions Partial Yes

core/i18n/patterns-message.hook.ts

hookPatternMessages
hookPatternMessages(patterns: GenericHookType, options?: Partial)

You can either provide a single PatternMessages as parameter:

Example :
 hookPatternMessages(...)

Or an array to directly register multiple:

Example :
 hookPatternMessages([...])

Or you provide an Service that implements ExtensionFactory<PatternMessages>

Example :
 export class MyPatternMessagesFactory implements ExtensionFactory<PatternMessages> {...}
 ...
 hookPatternMessages(MyPatternMessagesFactory)

A typed alternative to HOOK_PATTERN_MESSAGES.

Parameters :
Name Type Optional Description
patterns GenericHookType No

The PatternMessages's or ExtensionFactory to be provided.

options Partial Yes

core/router/router.service.ts

hookRoute
hookRoute(route: GenericHookType, options?: Partial)

You can either provide a single Route as parameter:

Example :
 hookRoute(...)

Or an array to directly register multiple:

Example :
 hookRoute([...])

Or you provide an Service that implements ExtensionFactory<Route>

Example :
 export class MyRouteFactory implements ExtensionFactory<Route> {...}
 ...
 hookRoute(MyRouteFactory)

A typed alternative to HOOK_ROUTE.

Parameters :
Name Type Optional Description
route GenericHookType No

The Route's or ExtensionFactory to be provided.

options Partial Yes

core/search/search.service.ts

hookSearch
Please don't use the search factory. It will be refactored soon.
hookSearch(search: GenericHookType, options?: Partial)

You can either provide a single Search as parameter:

Example :
 hookSearch(...)

Or an array to directly register multiple:

Example :
 hookSearch([...])

Or you provide an Service that implements ExtensionFactory<Search>

Example :
 export class MySearchFactory implements ExtensionFactory<Search> {...}
 ...
 hookSearch(MySearchFactory)

A typed alternative to HOOK_SEARCH.

Parameters :
Name Type Optional Description
search GenericHookType No

The Search's or ExtensionFactory to be provided.

options Partial Yes

core/common/service-registry.service.ts

hookService
hookService(extensionKey: T, service: Type)

Registers a service using a specified extension key. This function facilitates dynamic service registration, enabling services to be retrieved and used throughout the application based on their extension key.

Parameters :
Name Type Optional Description
extensionKey T No

The unique identifier for the service, defined within the ExtensionKeys interface.

service Type No

The class type of the service to register.

services/status-options/status-options.model.ts

hookServiceStatus
hookServiceStatus(status: GenericHookType, options?: Partial)

Extension hook allowing to register custom service statuses and configure their visual presentation.

You can either provide a single StatusOption as parameter:

Example :
 hookServiceStatus(...)

Or an array to directly register multiple:

Example :
 hookServiceStatus([...])

Or you provide an Service that implements ExtensionFactory<StatusOption>

Example :
 export class MyServiceStatusFactory implements ExtensionFactory<StatusOption> {...}
 ...
 hookServiceStatus(MyServiceStatusFactory)

A typed alternative to HOOK_SERVICE_STATUS.

Parameters :
Name Type Optional Description
status GenericHookType No

The StatusOption's or ExtensionFactory to be provided.

options Partial Yes

core/stepper/stepper.service.ts

hookStepper
hookStepper(step: GenericHookType, options?: Partial)

You can either provide a single Step as parameter:

Example :
 hookStepper(...)

Or an array to directly register multiple:

Example :
 hookStepper([...])

Or you provide an Service that implements ExtensionFactory<Step>

Example :
 export class MyStepFactory implements ExtensionFactory<Step> {...}
 ...
 hookStepper(MyStepFactory)

A typed alternative to HOOK_STEPPER.

Parameters :
Name Type Optional Description
step GenericHookType No

The Step's or ExtensionFactory to be provided.

options Partial Yes

core/tabs/tabs.service.ts

hookTab
hookTab(tabs: GenericHookType, options?: Partial)

You can either provide a single Tab as parameter:

Example :
 hookTab(...)

Or an array to directly register multiple:

Example :
 hookTab([...])

Or you provide an Service that implements ExtensionFactory<Tab>

Example :
 export class MyTabFactory implements ExtensionFactory<Tab> {...}
 ...
 hookTab(MyTabFactory)

A typed alternative to HOOK_TABS.

Parameters :
Name Type Optional Description
tabs GenericHookType No

The Tab's or ExtensionFactory to be provided.

options Partial Yes

core/version/version.model.ts

hookVersion
hookVersion(versions: GenericHookType, options?: Partial)

You can either provide a single Version as parameter:

Example :
 hookVersion(...)

Or an array to directly register multiple:

Example :
 hookVersion([...])

Or you provide an Service that implements ExtensionFactory<Version>

Example :
 export class MyVersionFactory implements ExtensionFactory<Version> {...}
 ...
 hookVersion(MyVersionFactory)

A typed alternative to HOOK_VERSION.

Parameters :
Name Type Optional Description
versions GenericHookType No

The Version's or ExtensionFactory to be provided.

options Partial Yes

core/wizard/wizard.model.ts

hookWizard
hookWizard(wizard: GenericHookType, options?: Partial)

A hook to add wizard entries.

You can either provide a single WizardEntry as parameter:

Example :
 hookWizard(...)

Or an array to directly register multiple:

Example :
 hookWizard([...])

Or you provide an Service that implements ExtensionFactory<WizardEntry>

Example :
 export class MyWizardFactory implements ExtensionFactory<WizardEntry> {...}
 ...
 hookWizard(MyWizardFactory)

A typed alternative to HOOK_WIZARD.

Parameters :
Name Type Optional Description
wizard GenericHookType No

The WizardEntry's or ExtensionFactory to be provided.

options Partial Yes

core/common/common.module.ts

initializeServices
initializeServices(translateService: TranslateService, state: AppStateService, userPreferences: UserPreferencesService)
Parameters :
Name Type Optional
translateService TranslateService No
state AppStateService No
userPreferences UserPreferencesService No

protocol-lpwan/multiple-lns-connectors/multiple-lns-connector.model.ts

isActilityConnection
isActilityConnection(connection)
Parameters :
Name Optional
connection No
Returns : ActilityConnection
isLoriotConnection
isLoriotConnection(connection)
Parameters :
Name Optional
connection No
Returns : LoriotConnection
isSigfoxConnection
isSigfoxConnection(connection)
Parameters :
Name Optional
connection No
Returns : SigfoxConnection

auth-configuration/basic-settings/basic-settings.model.ts

isBasic
isBasic(tenantLoginOption: TenantLoginOption)
Parameters :
Name Type Optional
tenantLoginOption TenantLoginOption No
isOauthInternal
isOauthInternal(tenantLoginOption: TenantLoginOption)
Parameters :
Name Type Optional
tenantLoginOption TenantLoginOption No

sub-assets/fullscreen.util.ts

isFullScreenEnabled
isFullScreenEnabled(element)
Parameters :
Name Optional
element No
toggleFullscreen
toggleFullscreen(element)
Parameters :
Name Optional
element No

replace-device/replace-device-wizard/replace-device-wizard.model.ts

isValidReplaceDeviceStepState
isValidReplaceDeviceStepState(state)
Parameters :
Name Optional
state No

widgets/implementations/three-d-rotation/lazy-box-model/lazy-load-box-model.ts

loadBoxModel
loadBoxModel()

core/i18n/__mocks__/load-locale.ts

loadLocale
loadLocale(_moduleLang)
Parameters :
Name Optional
_moduleLang No

editor/editor.component.ts

loadMonacoEditor
loadMonacoEditor()

lazy/three-orbit-controls/index.ts

loadOrbitControls
loadOrbitControls()

Dynamically imports the OrbitControls of three js.

Returns : Promise<>

A Promise of OrbitControls (three js).

widgets/implementations/three-d-rotation/lazy-phone-model/lazy-load-phone-model.ts

loadPhoneModel
loadPhoneModel()

lazy/three/index.ts

loadThree
loadThree()

Dynamically imports three js.

Returns : Promise<>

A Promise of three js.

widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.service.ts

mapToSourceValueObject
mapToSourceValueObject(undefined)
Parameters :
Name Optional
No
Returns : literal type

core/common/memoize.decorator.ts

memoize
memoize(resolver?)

Decorator to memoize function results.

Parameters :
Name Optional Description
resolver Yes

Cache key resolver function, used by memoize from lodash.

widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.ts

minOneDatapointActive
minOneDatapointActive()
Returns : ValidatorFn

core/dynamic-forms/i18n/translate.extension.ts

registerTranslateExtension
registerTranslateExtension(translate: TranslateService, parser: TranslateParser)
Parameters :
Name Type Optional
translate TranslateService No
parser TranslateParser No

core/common/retry-with-delay.operator.ts

retryWithDelay
retryWithDelay(delayTime: number, count: number)
Parameters :
Name Type Optional Default value
delayTime number No
count number No 1
Returns : MonoTypeOperatorFunction<T>

upgrade/upgraded-services/roles.service.ts

RolesServiceFactory
RolesServiceFactory(injector)
Parameters :
Name Optional
injector No

device-shell/command-templates/command-templates.component.ts

rootScopeCommandTemplateFactory
rootScopeCommandTemplateFactory($injector: Injector)
Parameters :
Name Type Optional
$injector Injector No

device-protocols/device-type-detail.component.ts

rootScopeTypeDetailFactory
rootScopeTypeDetailFactory($injector: Injector)
Parameters :
Name Type Optional
$injector Injector No

core/forms/simple-json-path-validator.directive.ts

simpleJsonPathValidator
simpleJsonPathValidator(control: AbstractControl)
Parameters :
Name Type Optional
control AbstractControl No
Returns : ValidationErrors | null

upgrade/smart-rules.service.ts

SmartRulesServiceFactory
SmartRulesServiceFactory(injector: any)
Parameters :
Name Type Optional
injector any No

alarms/ng1-smart-rules-upgrade.service.ts

SmartRulesUpgradeServiceFactory
SmartRulesUpgradeServiceFactory(injector: any)
Parameters :
Name Type Optional
injector any No

core/common/number.pipe.ts

strToNumber
strToNumber(value)

Transforms a string into a number (if needed).

Parameters :
Name Optional
value No
Returns : number

core/common/throttle.decorator.ts

throttle
throttle(wait?, options?)

Decorator to throttle functions call.

Parameters :
Name Optional Description
wait Yes

throttle time.

options Yes

set triggers, eg on trailing edge or falling edge, see lodash documentation for details

api/data.module.ts

toProvider
toProvider(provide: Type)
Parameters :
Name Type Optional
provide Type No
Returns : Provider

core/forms/unique-in-collection-by-path-validation.directive.ts

uniqueInCollectionByPathValidator
uniqueInCollectionByPathValidator(collection: Iterable, path: string, comparator?)
Parameters :
Name Type Optional
collection Iterable No
path string No
comparator Yes
Returns : ValidatorFn

upgrade/upgraded-services/user-inventory-roles.service.ts

UserInventoryRolesFactory
UserInventoryRolesFactory(injector)
Parameters :
Name Optional
injector No

results matching ""

    No results matching ""