Skip to main content

form/index

@boldpenguin/sdk-reduxGlobals"form/index"

Index

Variables

Functions

Variables

Const getAppetite

getAppetite: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.appetite)

Get appetite from application form

Appetite is an inclusive set of carriers products. Answers can remove a carrier product from appetite, known as pre-submission "do not quote" or pre-sub DNQ.

param BpSdk Redux store


Const getApplicationFeatures

getApplicationFeatures: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.features ?? [])

Get features array from application form

param BpSdk Redux store


Const getApplicationForm

getApplicationForm: function & OutputSelectorFields‹function› & object = createSelector(getApplication, (application) => application.form)

Get application form

param BpSdk Redux store


Const getApplicationFormProgress

getApplicationFormProgress: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.percent_completed)

Get application form progress

param BpSdk Redux store


Const getApplicationFormProgressForwardOnly

getApplicationFormProgressForwardOnly: function & OutputSelectorFields‹function› & object = createSelector( getApplication, (application) => application.progress.meta.form.forwardProgressPercent )

Get application form progress as a percentage that will only ever go forwards, even if new question sets are added

param BpSdk Redux store


Const getApplicationSource

getApplicationSource: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => ({ source: form.source, metadata: form.source_metadata, }))

Get application form source object

param BpSdk Redux store


Const getApplicationState

getApplicationState: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.state)

Get application form state

param BpSdk Redux store


Const getCurrentCarrierProductBucket

getCurrentCarrierProductBucket: function & OutputSelectorFields‹function› & object = createSelector(getCarriersProductsBuckets, getApplicationForm, (buckets, form) => buckets.find((bucket) => bucket.id === form.current_bucket_id), )

Returns the current carrier product bucket the application form is using. Can be undefined. The current bucket will change throughout the application.


Const getFormId

getFormId: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.id)

Get current application form ID

param BpSdk Redux store


Const getQuoteId

getQuoteId: function & OutputSelectorFields‹function› & object = createSelector(getApplicationForm, (form) => form.reference_id ?? '')

Get reference_id from application form as quoteId

param BpSdk Redux store


Const getStorefrontActiveEnrolledProductsCodes

getStorefrontActiveEnrolledProductsCodes: function & OutputSelectorFields‹function› & object = createSelector( getApplicationForm, (form) => form.storefront_active_enrolled_product_codes, )

Functions

Const getCarriersProductsBuckets

getCarriersProductsBuckets(state: BpSdkStore): ICarrierProductBucket[]

Gets all the carrier product buckets for tenant that owns the application form. This data is static on the application form.

Parameters:

NameTypeDescription
stateBpSdkStoreBpSdk Redux store

Returns: ICarrierProductBucket[]

ICarrierProductBucket as array