Index

/home/workflows/workspace/libs/common/url/src/lib/url/app.ts

appHref
appHref()

Get the default application href

Returns : WritableSignal<string>
resolveAppUrl
resolveAppUrl(href: string, value: string)

Resolve an url against the application href. If the url starts with the application href it is removed, otherwise the url is returned unchanged.

Parameters :
Name Type Optional Description
href string No

Application href

value string No

Url to resolve

Returns : string

The resolved url

/home/workflows/workspace/libs/common/fs/src/lib/loaders/csv-file-loader.service.ts

arrayAppend
arrayAppend(array, items)

Appends items to an array

Parameters :
Name Optional
array No
items No
Returns : void

/home/workflows/workspace/libs/common/url/src/lib/url/asset.ts

assetHref
assetHref()

Get the default asset href

Returns : WritableSignal<string>
resolveAssetUrl
resolveAssetUrl(href: string, value: string)

Resolve an url against the asset href

Parameters :
Name Type Optional Description
href string No

Asset href

value string No

Url to resolve

Returns : string

The resolved url

/home/workflows/workspace/libs/common/analytics/plugins/hra-analytics/src/lib/plugin.ts

buildEventData
buildEventData(instance: AnalyticsInstance, config: HraAnalyticsPluginConfig, event: string, props)

Builds the data to send to analytics. Adds common fields like app, version, etc. and normalizes event payloads.

Parameters :
Name Type Optional Description
instance AnalyticsInstance No

Analytics instance

config HraAnalyticsPluginConfig No

Plugin config

event string No

Event name

props No

Event properties

Returns : object

Data to send to analytics

hraAnalyticsPlugin
hraAnalyticsPlugin(config: HraAnalyticsPluginConfig)

An analytics plugin that logs events to a hra endpoint

Parameters :
Name Type Optional Description
config HraAnalyticsPluginConfig No

Plugin configuration

Returns : AnalyticsPlugin

An analytics plugin

/home/workflows/workspace/libs/common/analytics/src/lib/consent/consent.service.ts

createCategoryPreferences
createCategoryPreferences(enabled: boolean)

Helper for creating categories enabled/disabled records

Parameters :
Name Type Optional Description
enabled boolean No

Whether to set categories to enabled or disabled

Returns : ConsentCategories

A record of all categories with their values set to enabled

/home/workflows/workspace/libs/common/analytics/events/src/lib/event.ts

createEvent
createEvent(type: string, category: EventCategory, trigger?: EventTrigger)

Create a new event

Parameters :
Name Type Optional Description
type string No

Event type

category EventCategory No

Event category

trigger EventTrigger Yes

Default event trigger

Returns : AnalyticsEvent<P>

A new event

/home/workflows/workspace/libs/common/util/providers/src/lib/feature.ts

createFeature
createFeature(kind: F, providers)

Create a new feature object with a kind and providers

Parameters :
Name Type Optional Description
kind F No

Feature kind

providers No

Feature providers

A feature object

getFeatureProviders
getFeatureProviders(feature: ProviderFeature)

Get the providers from a feature object

Parameters :
Name Type Optional Description
feature ProviderFeature No

Feature object

Returns : P[]

Array of providers

/home/workflows/workspace/libs/common/url/src/lib/util/href-provider.ts

createHrefProvider
createHrefProvider(provide: RawProvideHrefFn)

Wraps a href provider function with more permissive input types

Parameters :
Name Type Optional Description
provide RawProvideHrefFn No

Raw provider function

Returns : ProvideHrefFn

A provider function

/home/workflows/workspace/libs/common/url/src/lib/util/url-resolver.ts

createUrlResolverFn
createUrlResolverFn(injectResolver: InjectUrlResolverFn)

Create a function that produces resolved url signals

Parameters :
Name Type Optional Description
injectResolver InjectUrlResolverFn No

Injection function for the resolver

Returns : Signal<string>

A function to create resolved url signals

createUrlResolverInjector
createUrlResolverInjector(injectHref: InjectHrefFn, resolve: UrlResolverImplFn)

Create a new injection function that returns an url resolver. The resulting injection function must be called in an injection context.

Parameters :
Name Type Optional Description
injectHref InjectHrefFn No

Injection function for the href signal

resolve UrlResolverImplFn No

Resolver implementation

An injection function for getting the resolver

/home/workflows/workspace/libs/common/url/src/lib/url/css.ts

cssUrl
cssUrl(value)

Wrap an URL in CSS url() function

Parameters :
Name Optional Description
value No

URL string or function returning URL string

Returns : Signal<string>

Signal with CSS url() wrapped URL

/home/workflows/workspace/libs/common/src/lib/utils/route-data.ts

extractData
extractData(router: Router)

Extracts the data from route using the router instance.

Parameters :
Name Type Optional Description
router Router No

Router instance.

Returns : Data

Data from the current route.

routeData
routeData()

Fetches the custom data from the current route.

Returns : Signal<Data>

Signal containing data from the current route.

/home/workflows/workspace/libs/common/analytics/plugins/hra-analytics/src/lib/util/serialize.ts

filterFalse
filterFalse(obj: T)

Creates a new object where any keys with a value strictly equal to false are removed

Parameters :
Name Type Optional Description
obj T No

Original object

Returns : Partial<T>

Filtered object

limitStackTrace
limitStackTrace(stack: string, maxLength: number)

Truncates a stack trace to a maximum length

Parameters :
Name Type Optional Description
stack string No

Original stack

maxLength number No

Maximum stack length

Returns : string

A stack with a length no greater than maxLength

pick
pick(obj: T, keys)

Pick a set of properties from an object

Parameters :
Name Type Optional Description
obj T No

Original object

keys No

Keys to pick from the object

Returns : Pick<T, K>

A subset of the object

pickAttributes
pickAttributes(el: T, attributes)

Pick a set of attributes from an element. Excludes attributes not present on the element.

Parameters :
Name Type Optional Description
el T No

Element reference

attributes No

Attributes to pick

Returns : Partial<Record<K, string>>

Values by attribute name

serialize
serialize(value)

Serializes complex values into simpler types. Currently handles the following objects:

  • Errors (and subclasses)
  • Events (ErrorEvent, KeyboardEvent, and MouseEvent)
  • Maps
  • Sets
Parameters :
Name Optional Description
value No

Value to serialize

Returns : unknown

A new value to serialize

/home/workflows/workspace/libs/common/array-util/src/lib/find-or-throw.ts

findOrThrow
findOrThrow(array, pred, error?)

Searches an array for an item matching the provided predicate. Throws if there is no match.

Parameters :
Name Optional Description
array No

Array to search

pred No

Predicate used to test for a match

error Yes

Error message used if no matching item is found

Returns : T

The first matching item

getNoMatchError
getNoMatchError(error)

Creates an error

Parameters :
Name Optional Default value Description
error No NO_MATCH_ERROR_MESSAGE

Error message

Returns : Error

A new error with the provided message

/home/workflows/workspace/libs/common/import-meta/src/import-meta.mock.ts

getImportMeta
getImportMeta()

Get a mocked version of import.meta

Returns : ImportMeta

Mocked import.meta

getImportMetaUrl
getImportMetaUrl()

Get a mocked version of import.meta.url

Returns : string

Mocked import.meta.url

/home/workflows/workspace/libs/common/import-meta/src/import-meta.ts

getImportMeta
getImportMeta()

Gets import.meta

Returns : ImportMeta

import.meta

getImportMetaUrl
getImportMetaUrl()

Gets import.meta.url

Returns : string

import.meta.url

/home/workflows/workspace/libs/common/analytics/plugins/hra-event-filter/src/lib/plugin.ts

hraEventFilterPlugin
hraEventFilterPlugin(config: HraEventFilterPluginConfig)

An analytics plugin that filters events based on an isEventEnabled callback

Parameters :
Name Type Optional Description
config HraEventFilterPluginConfig No

Plugin configuration

Returns : AnalyticsPlugin

An analytics plugin

/home/workflows/workspace/libs/common/injectors/src/lib/document.ts

injectDocument
injectDocument()

Inject the global document, i.e. the main rendering context

Returns : Document

The document object

/home/workflows/workspace/libs/common/analytics/src/lib/feature/feature.directive.ts

injectFeaturePath
injectFeaturePath()

Injects the feature path for the current location

Returns : Signal<string>

A signal with the current feature path

/home/workflows/workspace/libs/common/analytics/src/lib/analytics/analytics.service.ts

injectLogEvent
injectLogEvent()

Injects a functional equivalent of AnalyticsService.logEvent for ease of use in components/directive/etc. The function also automatically adds the feature path to the event props on each call.

Returns : void

A function to log events

/home/workflows/workspace/libs/common/injectors/src/lib/window.ts

injectWindow
injectWindow()

Inject the global window

Returns : unknown

The window object

/home/workflows/workspace/libs/common/url/src/lib/util/path.ts

isAbsolute
isAbsolute(path: string)

Test whether a path is an absolute url

Parameters :
Name Type Optional Description
path string No

Path to test

Returns : boolean

true if the path is absolute, false otherwise

joinWithSlash
joinWithSlash(start: string, end: string)

Joins two paths with a signle slash between them

Parameters :
Name Type Optional Description
start string No

First path

end string No

Second path

Returns : string

The concatenated path

stripLeadingHash
stripLeadingHash(fragment: string)

Remove the leading hash symbol from a fragment (if present)

Parameters :
Name Type Optional Description
fragment string No

Fragment to strip

Returns : string

New fragment

stripTrailingSlash
stripTrailingSlash(path: string)

Remove the trailing slash from a path while preserving the fragment and query parameters (if present)

Parameters :
Name Type Optional Description
path string No

Url to strip

Returns : string

New url

/home/workflows/workspace/libs/common/router-ext/src/lib/util/event.ts

isAuxClick
isAuxClick(event: MouseEvent)

Test whether a mouse event is an auxiliary click

Parameters :
Name Type Optional Description
event MouseEvent No

Click event

Returns : boolean

true if the event is an auxiliary click, false otherwise

/home/workflows/workspace/libs/common/src/lib/utils/monitor-height.ts

monitorHeight
monitorHeight(elementFn)

Monitors the height of a given element.

Parameters :
Name Optional Description
elementFn No

The element function that fetches the element to monitor.

Returns : Signal<number>

Height as a signal.

/home/workflows/workspace/libs/common/url/src/lib/url/page.ts

pageHref
pageHref()

Get the default page href

Returns : WritableSignal<string>
resolvePageUrl
resolvePageUrl(href: string, value: string)

Resolve an url against the page href

Parameters :
Name Type Optional Description
href string No

Page href

value string No

Url to resolve

Returns : string

The resolved url

/home/workflows/workspace/libs/common/analytics/src/lib/providers.ts

provideAnalytics
provideAnalytics(...features: undefined)

Provide analytics with features

Parameters :
Name Optional Description
features No

Any number of analytics features

Returns : EnvironmentProviders

Environment providers

withErrorHandler
withErrorHandler(config: AnalyticsErrorHandlerConfig)

Install a global ErrorHandler that logs errors to analytics

Parameters :
Name Type Optional Default value
config AnalyticsErrorHandlerConfig No {}
Returns : AnalyticsFeature

An analytics feature

withPlugins
withPlugins(...plugins: undefined)

Add one or more analytics plugins

Parameters :
Name Optional Description
plugins No

Plugins and plugin factories

Returns : AnalyticsFeature

An analytics feature

withRouterEvents
withRouterEvents()

Log events from the angular router to analytics

Returns : AnalyticsFeature

An analytics feature

/home/workflows/workspace/libs/common/router-ext/src/lib/providers.ts

provideRouterExt
provideRouterExt(...features: undefined)

Provide additional router features. Must be used along side of provideRouter.

Parameters :
Name Optional Description
features No

Router extension features

Returns : EnvironmentProviders

Environment providers

/home/workflows/workspace/libs/common/analytics/src/lib/analytics-features/router-events.ts

setupRouterEventListener
setupRouterEventListener()

Setup a router event listener that logs page views and errors to analytics

Returns : void

results matching ""

    No results matching ""