Index

src/querying/metadata.ts

BlueriqChild
BlueriqChild(type: Type, options?: BlueriqChildOptions)

Property decorator for letting a component automatically query an element with specified characteristics. The result is kept in sync with the page model as element updates arrive.

Parameters :
Name Type Optional
type Type No
options BlueriqChildOptions Yes
Returns : PropertyDecorator
BlueriqChild
BlueriqChild(type: Type, selector: string, options?: BlueriqChildOptions)
Parameters :
Name Type Optional
type Type No
selector string No
options BlueriqChildOptions Yes
Returns : PropertyDecorator
BlueriqChild
BlueriqChild(type: Type, selector?, options: BlueriqChildOptions)
Parameters :
Name Type Optional Default value
type Type No
selector Yes
options BlueriqChildOptions No {}
Returns : PropertyDecorator
BlueriqChildren
BlueriqChildren(type: Type, options?: BlueriqChildrenOptions)

Property decorator for letting a component automatically query for elements with specified characteristics. The result is kept in sync with the page model as element updates arrive.

Parameters :
Name Type Optional
type Type No
options BlueriqChildrenOptions Yes
Returns : PropertyDecorator
BlueriqChildren
BlueriqChildren(type: Type, selector: string, options?: BlueriqChildrenOptions)
Parameters :
Name Type Optional
type Type No
selector string No
options BlueriqChildrenOptions Yes
Returns : PropertyDecorator
BlueriqChildren
BlueriqChildren(type: Type, selector?, options: BlueriqChildrenOptions)
Parameters :
Name Type Optional Default value
type Type No
selector Yes
options BlueriqChildrenOptions No {}
Returns : PropertyDecorator

src/component/metadata.ts

BlueriqComponent
BlueriqComponent(component: BlueriqComponent)

Decorator function to go along the Angular ComponentDecorator to specify the details of a Blueriq component.

Parameters :
Name Type Optional
component BlueriqComponent No
Returns : ClassDecorator

src/component/selector.ts

bySelector
bySelector(selector: string, options?: SelectorOptions)

Creates a component matcher from a CSS-like selector. Optionally allows for specifying a priority offset when the priority as computed from the selector is desired to be changed.

For scoped components that are registered with BlueriqComponents.scoped, it is advised to use this function as it ensures the selector is only compiled once. Furthermore, any errors that may occur from the compilation of the selector become apparent during startup, instead of during the first time the component is in scope.

Any errors that occur during the compilation of the selector will not be handled gracefully as would be the case when a raw string selector would have been used.

Parameters :
Name Type Optional
selector string No
options SelectorOptions Yes
Returns : ComponentMatcher[]

src/rxjs/cleanup.ts

cleanup
cleanup(cleanupFn)
Parameters :
Name Optional
cleanupFn No
Returns : MonoTypeOperatorFunction<T>

src/component/types.ts

getAngularComponent
[object Object],[object Object],[object Object]
getAngularComponent(element: Element)

Given a Blueriq element, returns the Angular ComponentRef that was rendered for the element. This may be undefined, in the case where the element has not been rendered using BqElementDirective.

Parameters :
Name Type Optional Description
element Element No

The Blueriq element to obtain the ComponentRef for.

Returns : ComponentRef | undefined

forms/src/control.ts

getBlueriqField
getBlueriqField(control: FormControl)
Parameters :
Name Type Optional
control FormControl No
Returns : Field

forms/src/validator.ts

getFieldMessages
getFieldMessages(control: FormControl)

Returns a set of field messages as currently registered on the form control. This is different from using Blueriq's Field.messages in the sense that a form control's messages may include frontend validation results as the user is currently typing in the form control.

Parameters :
Name Type Optional
control FormControl No
Returns : FieldMessages

src/api/error.ts

isBlueriqError
isBlueriqError(error: any, errorType?: ErrorType)

Determines if the error is recognized as BlueriqResponseError, optionally requiring a specific type of error. If an error is not recognized as such, it may be because of several reasons such as the following:

  1. No internet connection or network related glitches
  2. Incorrect backend/proxy configuration, resulting in endpoints not being found.
Parameters :
Name Type Optional Description
error any No

Some error to potentially recognize as Blueriq error.

errorType ErrorType Yes

Optionally require error to be of a specific type.

devtools/test/testing.ts

prepareDevtoolsFixture
prepareDevtoolsFixture()
Returns : void
removeFromArray
removeFromArray(array, predicate)
Parameters :
Name Optional
array No
predicate No
Returns : void

src/session/startup/module.ts

provideLocalStorage
provideLocalStorage()
Returns : Storage | null
provideSessionStorage
provideSessionStorage()
Returns : Storage | null

src/api/error_redirect.ts

withErrorRedirect
withErrorRedirect(originalUrl: string, errorRedirectUrl: string)

Augments the original URL with a query parameter that causes the Runtime to redirect to the provided error redirect URL if processing of the request fails.

This is relevant when file downloads are performed using a GET request by changing the browser's URL. Normally, such requests would result in a "Content-Disposition: attachment" response, which will cause the browser to download the response's content and abort the GET redirect. In failure situations however, no "Content-Disposition" response can be sent so the browser will follow the GET redirect, which results in showing a page with some JSON data. This can be prevented by sending along an "error redirect" URL that will cause a "302 Found" response with the provided URL to be generated instead, such that the browser follows the redirect to the desired location.

If you are consuming downloads using XHR, then you do actually want to receive JSON responses instead of following a redirect. In that case, simply do not use this function and handle the JSON error response instead.

Parameters :
Name Type Optional Description
originalUrl string No

The original URL that does not yet have error redirect information.

errorRedirectUrl string No

The URL to redirect to when processing fails.

Returns : string

An URL that mirrors the original URL with an error redirect query parameter added.

results matching ""

    No results matching ""