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9BlJ,IADlB,IAAAC,c,uBAgE+B,mB,OAAA,IAAb,UAAa,SACJ,mBADI,OACJ,IAAT,YAAS,SACI,mBADJ,OACI,IAAd,YAAc,SACL,mBADK,OACL,IAAV,YAAU,SACG,mBADH,OACG,IAAf,EAAAC,iBAAA,EAAAA,iBAAe,SACA,mBADA,OACA,IAAZ,UAAY,SACC,mBADD,OACC,IAAT,EAAAC,WAAA,EAAAA,WAAS,SACD,mBADC,OACD,IAAZ,UAAY,SACR,mBADQ,OACR,IAAJ,EAAAC,MAAA,EAAAA,MAAI,YAvETC,E,CAAb,E","sources":["webpack://iadviser/./src/routes/app-adviser/diagnostics/diagnostics.ts?2a85","webpack://iadviser/./src/routes/app-adviser/client/wizard/wizard.html","webpack://iadviser/./src/routes/app-adviser/client/wizard/wizard.ts"],"sourcesContent":["module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/ts-loader/index.js??ruleSet[1].rules[4].use[0]!./diagnostics.ts\"));\n\t}, \"diagnostics\");\n}","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","import { captureException } from '@sentry/core';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { HttpClient } from 'aurelia-fetch-client';\r\nimport { autoinject, computedFrom, TaskQueue } from 'aurelia-framework';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport { AppRouter } from 'aurelia-router';\r\nimport { DocumentPack } from 'components/document-pack/document-pack';\r\nimport { ConfirmModalActions } from 'components/ia-modal/ia-modal';\r\nimport { ModalService } from 'components/modal/modal-service';\r\nimport { environment } from 'environment';\r\nimport { EntityActionTypeToActionTypeLabel, mapActionTypeToEntityActionType } from 'resources/map-entity-type';\r\nimport { getAppClientInstance, getAppClientType } from 'resources/parse-jwt';\r\nimport { AureliaHooks } from 'resources/services/aurelia-hooks';\r\nimport { ClaimsService } from 'resources/services/claims-service';\r\nimport { IaToastService } from 'resources/services/ia-toast-service';\r\nimport { log } from 'resources/services/log-service';\r\nimport { EntityActionType, EntityMode, EntityType } from 'routes/app-adviser/client/quotes/interfaces';\r\nimport styles from '../quotes/quotes.css';\r\nimport { ClaimStepMap, QuoteStepMap, WebFormConsentStepMap, WebFormQuoteStepMap } from './steps/config';\r\n\r\nconst WIZARD_FORM_TYPES = [EntityType.FormQuote, EntityType.FormConsent];\r\n\r\ninterface LabelPair {\r\n label: string;\r\n ariaLabel: string;\r\n}\r\n\r\n@autoinject()\r\nexport class Wizard {\r\n public styles = styles;\r\n\r\n public forwardButtonDisabled = false;\r\n public currentDirection;\r\n public stepClickedValue;\r\n\r\n // Assume no permission by default\r\n public noPermission = true;\r\n public entityMode: EntityMode = EntityMode.None;\r\n public actionType: EntityActionType;\r\n public mappedActionType: string;\r\n public entityType: EntityType;\r\n\r\n public showSaveConfirmModal = false;\r\n public showCloseConfirmModal = false;\r\n public showStepTransitionConfirmModal = false;\r\n public showRiskModal = false;\r\n\r\n public steps = QuoteStepMap;\r\n\r\n public currentStep;\r\n public currentStepIndex = 0; // Confusingly, this is 1-based index to match the step numbers, not a 0-based index\r\n public clickedStep;\r\n\r\n public id;\r\n public entityId;\r\n public step;\r\n public newActionType;\r\n public policyId;\r\n\r\n public backButtonDisabled = false;\r\n public viewModelRef;\r\n public composeModel;\r\n\r\n public stepTransitioning = false;\r\n public stepTransitionMessage;\r\n\r\n public discardTitle = '';\r\n\r\n public hasQuoteDocumentPack = false;\r\n public hasPolicyDocumentPack = false;\r\n\r\n public policyVersionId;\r\n public isCorrection = false;\r\n\r\n public statusTypeId;\r\n public versionNo;\r\n public isTakeUp;\r\n public isEditTakeUpAction;\r\n\r\n private clientNavLabel;\r\n private formId;\r\n private formWizardRoute;\r\n\r\n /**\r\n * Indicates whether the wizard is being used for a user form workflow.\r\n * When true, the wizard behaves as a user-facing form (e.g., navigates to userFormHomeComplete on submission).\r\n * When false, it operates as a client form accessed by advisers.\r\n */\r\n public isUserForm = false;\r\n\r\n constructor(\r\n public claims: ClaimsService,\r\n public router: AppRouter,\r\n public toast: IaToastService,\r\n public http: HttpClient,\r\n public ea: EventAggregator,\r\n public hooks: AureliaHooks,\r\n public taskQueue: TaskQueue,\r\n public modal: ModalService,\r\n private i18n: I18N,\r\n ) {}\r\n\r\n async stepRendered() {\r\n if (!window.location.href.includes('localhost')) {\r\n const appClientType = getAppClientType();\r\n const appClientInstance = getAppClientInstance();\r\n const url = `/index_${appClientType.toLowerCase()}_${appClientInstance.toLowerCase()}.html`;\r\n\r\n await this.http\r\n .fetch(url, {\r\n method: 'HEAD',\r\n headers: {\r\n 'If-Modified-Since': localStorage.getItem('indexLastModified'),\r\n },\r\n })\r\n .then((response) => {\r\n if (response.headers.get('Last-modified')) {\r\n localStorage.setItem('indexLastModified', response.headers.get('Last-modified'));\r\n }\r\n\r\n if (response.status === 200) {\r\n this.ea.publish('promptForRefresh');\r\n }\r\n });\r\n }\r\n }\r\n\r\n async bind() {\r\n // Allow current step validation check to be run via an action\r\n this.hooks.addAction('wizard:validateCurrentStep', this.currentStepValidation);\r\n this.hasQuoteDocumentPack = await this.claims.hasAsync(\r\n 'IadviserProcessingQuoteQuoteSearchContextMenuQuoteDocumentPack',\r\n );\r\n this.hasPolicyDocumentPack = await this.claims.hasAsync(\r\n 'IadviserProcessingPolicyPolicyMaintenanceContextMenuPolicyDocumentPack',\r\n );\r\n }\r\n\r\n unbind() {\r\n this.hooks.removeAction('wizard:validateCurrentStep', this.currentStepValidation);\r\n }\r\n\r\n async saveCallback(type: ConfirmModalActions) {\r\n this.stepTransitioning = false;\r\n\r\n if (type === 'donotsave') {\r\n if (this.entityId) {\r\n let endpoint;\r\n let uri;\r\n\r\n const method = 'DELETE';\r\n\r\n if (this.entityType === 'quote') {\r\n endpoint = environment.clientEndpoints.quotes.delete;\r\n uri = endpoint.uri([this.id, this.entityId]);\r\n } else if (this.entityType === 'incomplete') {\r\n endpoint = environment.clientEndpoints.wizard.delete;\r\n uri = endpoint.uri([this.id, this.actionType, this.entityType, this.entityId]);\r\n } else if (this.entityType === EntityType.Claim) {\r\n endpoint = environment.clientEndpoints.claims.delete;\r\n uri = endpoint.uri([this.id, this.entityId]);\r\n }\r\n\r\n const requestTypes = ['quote', 'incomplete', 'claim'];\r\n\r\n if (requestTypes.includes(this.entityType)) {\r\n await this.http.fetch(uri, {\r\n method: method,\r\n });\r\n }\r\n }\r\n\r\n sessionStorage.removeItem('is_draft_entity');\r\n\r\n if (this.entityType === 'quote') {\r\n this.router.navigateToRoute('clientQuotes', { id: this.id, quoteId: this.entityId });\r\n } else if (this.entityType === 'policy' || this.entityType === 'incomplete') {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n });\r\n } else if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n }\r\n\r\n if (type === 'save') {\r\n let stepValid = false;\r\n\r\n // don't validate when user closes the wizard on the convert step\r\n if (this.currentStepIndex === 10) {\r\n stepValid = true;\r\n } else {\r\n stepValid = await this.currentStepValidation(false, null);\r\n }\r\n\r\n if (stepValid) {\r\n sessionStorage.removeItem('is_draft_entity');\r\n\r\n if (this.entityType === 'quote') {\r\n this.router.navigateToRoute('clientQuotes', { id: this.id, quoteId: this.entityId });\r\n } else if (this.entityType === 'policy' || this.entityType === 'incomplete') {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: parseInt(this.versionNo) + 1,\r\n });\r\n } else if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n }\r\n }\r\n\r\n this.showSaveConfirmModal = false;\r\n }\r\n\r\n async stepTransitionPrompt(type: ConfirmModalActions) {\r\n this.toast.destroyAllToasts();\r\n this.stepTransitioning = false;\r\n\r\n if (type === 'confirm') {\r\n const viewModel = this.viewModelRef?.currentViewModel;\r\n\r\n if (viewModel) {\r\n if (this.stepClickedValue) {\r\n this.visitStep(this.stepClickedValue);\r\n } else {\r\n this.visitStep(this.currentStepIndex - 1);\r\n }\r\n }\r\n }\r\n\r\n this.showStepTransitionConfirmModal = false;\r\n }\r\n\r\n async closeConfirmCallback(type: ConfirmModalActions) {\r\n this.stepTransitioning = false;\r\n\r\n if (type === 'save') {\r\n let stepValid = false;\r\n\r\n // don't validate when user closes the wizard on the convert step\r\n if (this.currentStepIndex === 10) {\r\n stepValid = true;\r\n } else {\r\n stepValid = await this.currentStepValidation(false, null);\r\n }\r\n\r\n if (stepValid) {\r\n if (this.entityType === 'quote') {\r\n this.router.navigateToRoute('clientQuotes', { id: this.id, quoteId: this.entityId });\r\n } else if (this.entityType === 'policy' || this.entityType === 'incomplete') {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n });\r\n } else if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n }\r\n }\r\n\r\n if (type === 'donotsave') {\r\n if (this.entityType === 'quote') {\r\n this.router.navigateToRoute('clientQuotes', { id: this.id, quoteId: this.entityId });\r\n } else if (this.entityType === 'policy' || this.entityType === 'incomplete') {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n });\r\n } else if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n }\r\n\r\n this.showCloseConfirmModal = false;\r\n }\r\n\r\n incompleteRiskQuestionsCallback(type: ConfirmModalActions) {\r\n this.stepTransitioning = false;\r\n\r\n // reset hasRiskUpdated flag on viewModel\r\n if (type === 'cancel') {\r\n const viewModel = this.viewModelRef?.currentViewModel;\r\n }\r\n\r\n // allow navigation\r\n if (type === 'confirm') {\r\n if (typeof this.stepClickedValue !== 'undefined') {\r\n this.visitStep(this.stepClickedValue);\r\n } else {\r\n if (this.currentDirection === 'forward') {\r\n this.visitStep(this.currentStepIndex + 1);\r\n } else if (this.currentDirection === 'back') {\r\n this.visitStep(this.currentStepIndex - 1);\r\n }\r\n }\r\n }\r\n\r\n this.showRiskModal = false;\r\n }\r\n\r\n setActiveStep(stepIndex: number) {\r\n this.steps.forEach((step) => {\r\n step.active = step.step === stepIndex ? true : false;\r\n });\r\n }\r\n\r\n async canActivate(\r\n {\r\n id,\r\n parentEntityId,\r\n entityId,\r\n actionType,\r\n entityType,\r\n entityMode,\r\n step,\r\n statusTypeId,\r\n versionNo,\r\n newActionType,\r\n isTakeUp,\r\n isEditTakeUpAction,\r\n formId,\r\n },\r\n route,\r\n ) {\r\n this.statusTypeId = statusTypeId;\r\n this.versionNo = versionNo;\r\n this.isTakeUp = isTakeUp;\r\n this.isEditTakeUpAction = isEditTakeUpAction;\r\n\r\n const entityTypeLabel = entityType.replace(/^\\w/, (c) => c.toUpperCase());\r\n route.settings.clientNavLabel = entityTypeLabel;\r\n\r\n if (isNaN(Number(step))) {\r\n step = 1;\r\n }\r\n\r\n if (entityType === EntityType.Quote) {\r\n this.discardTitle = 'New Quote';\r\n\r\n if (entityMode === 'view') {\r\n this.steps = QuoteStepMap.slice(0, 9);\r\n }\r\n\r\n if (entityMode === 'edit' || entityMode === 'new') {\r\n this.steps = QuoteStepMap;\r\n }\r\n }\r\n\r\n if (entityType === EntityType.Policy || entityType === EntityType.Incomplete) {\r\n this.discardTitle = `New ${EntityActionTypeToActionTypeLabel(newActionType ? newActionType : actionType)}`;\r\n\r\n // prevent users from changing view policy route to edit\r\n if (entityType === EntityType.Policy && !newActionType && entityMode === 'edit') {\r\n const hasCorrection = await this.claims.hasAsync(\r\n 'IadviserProcessingPolicyPolicyMaintenanceContextMenuCorrection',\r\n );\r\n const hasEditTakeup = await this.claims.hasAsync(\r\n 'IadviserProcessingPolicyPolicyMaintenanceContextMenuEditTakeUp',\r\n );\r\n if (hasCorrection || (hasEditTakeup && this.isEditTakeUpAction === 'true')) {\r\n this.isCorrection = true;\r\n this.steps = QuoteStepMap.slice(0, 9);\r\n } else {\r\n entityMode = 'view';\r\n }\r\n }\r\n\r\n if (entityMode === 'view') {\r\n this.steps = QuoteStepMap.slice(0, 9);\r\n }\r\n\r\n // *** this block can be removed when all modules are complete - START\r\n // prevent users from changing view incomplete route to edit for action types not yet released\r\n const mappedActionTyped = mapActionTypeToEntityActionType(actionType);\r\n const nonViewActionTypes = [\r\n EntityActionType.Renewal,\r\n EntityActionType.Endorsement,\r\n EntityActionType.Reinstatement,\r\n EntityActionType.Cancellation,\r\n ];\r\n\r\n if (entityType === 'incomplete' && !nonViewActionTypes.includes(mappedActionTyped)) {\r\n entityMode = 'view';\r\n }\r\n // *** this block can be removed when all modules are complete - END\r\n }\r\n\r\n if (entityType === EntityType.Claim) {\r\n this.discardTitle = 'New Claim';\r\n this.steps = ClaimStepMap;\r\n }\r\n\r\n if (entityType === EntityType.FormQuote) {\r\n this.formId = formId;\r\n this.formWizardRoute = route.name;\r\n this.steps = WebFormQuoteStepMap;\r\n this.isUserForm = route.name === 'userFormWizard';\r\n }\r\n\r\n if (entityType === EntityType.FormConsent) {\r\n this.formId = formId;\r\n this.formWizardRoute = route.name;\r\n this.steps = WebFormConsentStepMap;\r\n this.isUserForm = route.name === 'userFormWizard';\r\n }\r\n\r\n // No step number provided or invalid step number provided, default to step 1\r\n if (!step || step === '1') {\r\n this.currentStepIndex = 1;\r\n this.currentStep = this.steps[this.currentStepIndex - 1];\r\n }\r\n\r\n this.id = id;\r\n this.policyId = parentEntityId;\r\n this.entityId = entityId;\r\n this.actionType = actionType;\r\n this.mappedActionType = mapActionTypeToEntityActionType(actionType, true);\r\n this.entityType = entityType;\r\n this.entityMode = entityMode;\r\n this.step = isNaN(Number(step)) ? '1' : step;\r\n this.newActionType = newActionType;\r\n\r\n const parsedNewActionType = parseInt(newActionType);\r\n\r\n // If we have no entityId, it's a new entity, so the other params except \"id\" are not required\r\n // If new action type is not undefined, it's a new type of something not quote related\r\n if (!isNaN(parsedNewActionType) || !entityId) {\r\n this.noPermission = false;\r\n\r\n sessionStorage.setItem('is_draft_entity', 'true');\r\n }\r\n\r\n let userHasViewPermission;\r\n let userHasEditPermission;\r\n\r\n if (this.entityType === EntityType.Quote) {\r\n userHasViewPermission = await this.claims.hasAsync('IadviserProcessingQuoteFindQuoteView');\r\n userHasEditPermission = await this.claims.hasAsync('IadviserProcessingQuoteFindQuoteEdit');\r\n } else if (this.entityType === EntityType.Incomplete || this.entityType === EntityType.Policy) {\r\n userHasViewPermission = await this.claims.hasAsync('IadviserProcessingPolicyFindPolicyView');\r\n userHasEditPermission = await this.claims.hasAsync('IadviserProcessingPolicyFindPolicyEdit');\r\n } else if (this.entityType === EntityType.Claim) {\r\n userHasViewPermission = await this.claims.hasAsync('IadviserProcessingClaimsFindClaimView');\r\n userHasEditPermission = await this.claims.hasAsync('IadviserProcessingClaimsFindClaimEdit');\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n userHasViewPermission = await this.claims.hasAsync('IadviserProcessingWebFormsQuoteView');\r\n userHasEditPermission = await this.claims.hasAsync('IadviserProcessingWebFormsQuoteEdit');\r\n } else if (this.entityType === EntityType.FormConsent) {\r\n userHasViewPermission = await this.claims.hasAsync('IadviserProcessingWebFormsConsentView');\r\n userHasEditPermission = await this.claims.hasAsync('IadviserProcessingWebFormsConsentEdit');\r\n }\r\n\r\n // User has one or more of these claims\r\n if ((isNaN(parsedNewActionType) && userHasViewPermission) || userHasEditPermission) {\r\n // User has permission, but what level? Let's find out\r\n this.noPermission = false;\r\n\r\n // User has edit and view permissions\r\n if (userHasViewPermission && userHasEditPermission) {\r\n // If entityMode is already set via the route as 'view' (user selects 'View Quote') set as 'view'; else 'edit'\r\n // this.entityMode = this.entityMode === EntityMode.View ? EntityMode.View : EntityMode.Edit;\r\n }\r\n // User has view permission only\r\n else if (this.entityMode === EntityMode.View && (userHasViewPermission || userHasEditPermission)) {\r\n this.entityMode = EntityMode.View;\r\n }\r\n // User has edit permission only\r\n else if (this.entityMode === EntityMode.Edit && userHasEditPermission) {\r\n this.entityMode = EntityMode.Edit;\r\n }\r\n }\r\n\r\n if (!userHasViewPermission && !userHasEditPermission) {\r\n this.entityMode = EntityMode.None;\r\n this.noPermission = true;\r\n } else {\r\n this.noPermission = false;\r\n\r\n if (!isNaN(parsedNewActionType)) {\r\n this.entityMode = EntityMode.New;\r\n }\r\n }\r\n\r\n if (!this.noPermission && step) {\r\n log.info('Step provided in URL, display step', step);\r\n this.visitStep(parseInt(step));\r\n }\r\n\r\n this.composeModel = {\r\n id: this.id,\r\n parentEntityId: this.policyId,\r\n entityId: this.entityId,\r\n step: this.step,\r\n entityMode: this.entityMode,\r\n actionType: this.actionType,\r\n entityType: this.entityType,\r\n newActionType: this.newActionType,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n isTakeUp: this.isTakeUp,\r\n isEditTakeUpAction: this.isEditTakeUpAction,\r\n formId: this.formId,\r\n };\r\n }\r\n\r\n async stepClicked(step, index: number) {\r\n this.stepTransitioning = true;\r\n this.forwardButtonDisabled = false;\r\n\r\n const direction = index + 1 > this.currentStepIndex ? 'forward' : 'back';\r\n\r\n this.hooks.doAction('wizard:stepClicked', direction, this);\r\n\r\n this.stepClickedValue = step.step;\r\n\r\n const currentStepIsValid = await this.currentStepValidation(true, direction);\r\n\r\n if (currentStepIsValid) {\r\n this.visitStep(step.step);\r\n } else {\r\n this.stepTransitioning = false;\r\n }\r\n }\r\n\r\n async visitStep(step: number) {\r\n if (!this.entityId) {\r\n this.updateCurrentStep(step, 'any');\r\n return;\r\n }\r\n\r\n this.stepClickedValue = undefined;\r\n\r\n try {\r\n this.updateCurrentStep(step, 'any');\r\n\r\n if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute(\r\n 'claimWizard',\r\n {\r\n id: this.id,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType ?? EntityType.Claim,\r\n step: step,\r\n policyVersionId: this.policyVersionId,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else if ([EntityType.FormConsent, EntityType.FormQuote].includes(this.entityType)) {\r\n this.router.navigateToRoute(\r\n this.formWizardRoute,\r\n {\r\n id: this.id,\r\n formId: this.formId,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType,\r\n actionType: this.actionType,\r\n step: step,\r\n isEditTakeUpAction: false,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else {\r\n this.router.navigateToRoute(\r\n 'wizard',\r\n {\r\n id: this.id,\r\n parentEntityId: this.policyId,\r\n entityId: this.entityId,\r\n entityMode: this.entityMode,\r\n actionType: this.actionType,\r\n entityType: this.entityType,\r\n newActionType: this.newActionType,\r\n step: step,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n isTakeUp: this.isTakeUp,\r\n isEditTakeUpAction: this.isEditTakeUpAction,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n }\r\n\r\n setTimeout(() => this.stepRendered(), 500);\r\n } catch (error) {\r\n this.handleError(error);\r\n }\r\n }\r\n\r\n async currentStepValidation(redirectAfterCreation = true, direction) {\r\n if (this.viewModelRef?.currentViewModel) {\r\n this.currentDirection = direction;\r\n\r\n if (await this.hooks.applyFilter('showRiskQuestionModal', false)) {\r\n this.showRiskModal = true;\r\n return false;\r\n }\r\n\r\n const viewModel = this.viewModelRef?.currentViewModel;\r\n\r\n // step unchanged - allow navigating back without validating\r\n if (!viewModel?.isDirty && this.currentDirection === 'back') {\r\n return true;\r\n }\r\n\r\n if (viewModel) {\r\n /* istanbul ignore next */\r\n if (viewModel.quoteOrPolicyVersionId) {\r\n this.entityId = viewModel.quoteOrPolicyVersionId;\r\n }\r\n\r\n // validate step\r\n const result = await viewModel.validate(redirectAfterCreation);\r\n\r\n // step changed and invalid\r\n if (!result && this.currentDirection === 'back') {\r\n // show \"This step must be completed in order to save\" modal\r\n this.showStepTransitionConfirmModal = true;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /* istanbul ignore next */\r\n async continue() {\r\n this.stepClickedValue = undefined;\r\n this.stepTransitioning = true;\r\n\r\n const currentStepValid = await this.currentStepValidation(true, 'forward');\r\n\r\n if (currentStepValid) {\r\n this.nextStep();\r\n } else {\r\n this.stepTransitioning = false;\r\n }\r\n }\r\n\r\n /* istanbul ignore next */\r\n async back() {\r\n this.stepClickedValue = undefined;\r\n this.stepTransitioning = true;\r\n\r\n const currentStepValid = await this.currentStepValidation(true, 'back');\r\n\r\n if (currentStepValid) {\r\n this.previousStep();\r\n } else {\r\n this.stepTransitioning = false;\r\n }\r\n }\r\n\r\n closeButtonCallback() {\r\n // If it's a draft quote/new quote and there are changes\r\n if (this.composeModel.entityMode === EntityMode.New || sessionStorage.getItem('is_draft_entity') !== null) {\r\n this.showSaveConfirmModal = true;\r\n } else {\r\n // The current step has changes, show confirm modal\r\n if (this.viewModelRef?.currentViewModel?.isDirty) {\r\n this.showCloseConfirmModal = true;\r\n } else {\r\n if (this.entityType === 'quote') {\r\n this.router.navigateToRoute('clientQuotes', { id: this.id, quoteId: this.entityId });\r\n } else if (this.entityType === 'policy' || this.entityType === 'incomplete') {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n });\r\n } else if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (this.entityType === EntityType.FormQuote) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n } else if (this.entityType === EntityType.FormConsent) {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* istanbul ignore next */\r\n async handleError(error: Error) {\r\n captureException(error);\r\n log.error('Entity Wizard Error =>', error);\r\n }\r\n\r\n updateCurrentStep(step, direction) {\r\n if (step !== undefined && step !== null) {\r\n this.currentStepIndex = step;\r\n }\r\n\r\n if (direction === 'previous' && this.currentStepIndex > 1) {\r\n this.currentStepIndex--;\r\n }\r\n\r\n this.currentStep = this.steps[this.currentStepIndex - 1];\r\n\r\n this.setActiveStep(this.currentStepIndex);\r\n\r\n if (this.currentStepIndex === 1) {\r\n this.backButtonDisabled = true;\r\n } else {\r\n this.backButtonDisabled = false;\r\n }\r\n\r\n this.ea.subscribe('stepRendered', (message = 'Loading...') => {\r\n this.taskQueue.queueMicroTask(() => {\r\n this.stepTransitioning = false;\r\n this.stepTransitionMessage = message;\r\n });\r\n });\r\n }\r\n\r\n async nextStep() {\r\n this.hooks.doAction('wizard:nextStep');\r\n\r\n try {\r\n const hasNextStep = Object.keys(this.steps).length < Object.keys(this.steps).length + 1;\r\n\r\n if (hasNextStep) {\r\n this.currentStepIndex++;\r\n\r\n this.updateCurrentStep(null, 'next');\r\n\r\n if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute(\r\n 'claimWizard',\r\n {\r\n id: this.id,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType,\r\n policyVersionId: this.policyVersionId,\r\n step: this.currentStepIndex,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else if ([EntityType.FormConsent, EntityType.FormQuote].includes(this.entityType)) {\r\n this.router.navigateToRoute(\r\n this.formWizardRoute,\r\n {\r\n id: this.id,\r\n formId: this.formId,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType,\r\n actionType: this.actionType,\r\n step: this.currentStepIndex,\r\n isEditTakeUpAction: false,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else {\r\n this.router.navigateToRoute(\r\n 'wizard',\r\n {\r\n id: this.id,\r\n parentEntityId: this.policyId,\r\n entityId: this.entityId,\r\n entityMode: this.entityMode,\r\n actionType: this.actionType,\r\n entityType: this.entityType,\r\n step: this.currentStepIndex,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n isTakeUp: this.isTakeUp,\r\n isEditTakeUpAction: this.isEditTakeUpAction,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n }\r\n }\r\n\r\n setTimeout(() => this.stepRendered(), 500);\r\n } catch (error) {\r\n this.handleError(error);\r\n }\r\n }\r\n\r\n async previousStep() {\r\n this.hooks.doAction('wizard:previousStep');\r\n\r\n try {\r\n this.updateCurrentStep(null, 'previous');\r\n\r\n if (this.entityType === EntityType.Claim) {\r\n this.router.navigateToRoute(\r\n 'claimWizard',\r\n {\r\n id: this.id,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType,\r\n policyVersionId: this.policyVersionId,\r\n step: this.currentStepIndex,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else if (WIZARD_FORM_TYPES.includes(this.entityType)) {\r\n this.router.navigateToRoute(\r\n this.formWizardRoute,\r\n {\r\n id: this.id,\r\n formId: this.formId,\r\n entityId: this.entityId ?? 0,\r\n entityMode: this.entityMode,\r\n entityType: this.entityType,\r\n actionType: this.actionType,\r\n step: this.currentStepIndex,\r\n isEditTakeUpAction: false,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n } else {\r\n this.router.navigateToRoute(\r\n 'wizard',\r\n {\r\n id: this.id,\r\n parentEntityId: this.policyId,\r\n entityId: this.entityId,\r\n entityMode: this.entityMode,\r\n actionType: this.actionType,\r\n entityType: this.entityType,\r\n step: this.currentStepIndex,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n isTakeUp: this.isTakeUp,\r\n isEditTakeUpAction: this.isEditTakeUpAction,\r\n },\r\n {\r\n trigger: false,\r\n },\r\n );\r\n }\r\n\r\n setTimeout(() => this.stepRendered(), 500);\r\n\r\n this.forwardButtonDisabled = false;\r\n } catch (error) {\r\n this.handleError(error);\r\n }\r\n }\r\n\r\n // Special case for claims, forms && policy correction\r\n protected async finish() {\r\n this.forwardButtonDisabled = true;\r\n if (this.entityType === EntityType.Claim && this.isLastStep) {\r\n this.router.navigateToRoute('clientClaims', { id: this.id, claimId: this.entityId });\r\n } else if (WIZARD_FORM_TYPES.includes(this.entityType) && this.isLastStep) {\r\n if (this.isUserForm) {\r\n const result = await this.viewModelRef.currentViewModel.submitForm();\r\n if (result) {\r\n this.router.navigateToRoute('userFormHomeComplete');\r\n } else {\r\n // Something went wrong, re-enable submit button to allow user to try again\r\n this.forwardButtonDisabled = false;\r\n }\r\n } else {\r\n this.router.navigateToRoute('clientForms', { id: this.id, formId: this.formId });\r\n }\r\n } else if (this.isCorrection) {\r\n this.router.navigateToRoute('clientPolicies', {\r\n id: this.id,\r\n policyId: this.policyId,\r\n policyVersionId: 0,\r\n statusTypeId: this.statusTypeId,\r\n versionNo: this.versionNo,\r\n });\r\n } else {\r\n // This should never happen, as all cases where this would be called should be handled above\r\n throw new Error('Finish action is only supported for claims, user forms and policy corrections');\r\n }\r\n }\r\n\r\n // Open request quote modal\r\n async requestQuote() {\r\n const viewModel = this.viewModelRef?.currentViewModel;\r\n\r\n if (viewModel) {\r\n await this.viewModelRef.currentViewModel.requestQuote();\r\n }\r\n }\r\n\r\n // Open cancel quote request modal\r\n async cancelQuoteRequest() {\r\n const viewModel = this.viewModelRef?.currentViewModel;\r\n\r\n if (viewModel) {\r\n await this.viewModelRef.currentViewModel.cancelQuoteRequest();\r\n }\r\n }\r\n\r\n async loadDocumentPack() {\r\n this.modal\r\n .show()\r\n .content(DocumentPack, {\r\n clientId: this.id,\r\n quoteOrPolicyVersionOrClaimId: this.entityId,\r\n policyType: this.entityType,\r\n actionType: this.actionType,\r\n })\r\n .withOptions({ type: 'wide-lg' });\r\n }\r\n\r\n /**\r\n * Handler for forward button click.\r\n * \r\n * For quotes, we want to simply call continue(), but for claims, forms & policy correction we need to call finish()\r\n */\r\n protected handleForwardButtonClick() {\r\n if (this.isLastStep && ([EntityType.Claim, EntityType.FormQuote, EntityType.FormConsent].includes(this.entityType) || this.isCorrection)) {\r\n return this.finish();\r\n }\r\n\r\n return this.continue();\r\n }\r\n\r\n @computedFrom('stepTransitioning')\r\n get wizardStepsDisabled() {\r\n return this.stepTransitioning;\r\n }\r\n\r\n @computedFrom('currentStepIndex', 'steps')\r\n protected get isLastStep() {\r\n return this.currentStepIndex === this.steps.length;\r\n }\r\n\r\n @computedFrom('currentStep','isCorrection', 'isLastStep', 'isUserForm', 'steps')\r\n protected get forwardButtonLabel(): LabelPair {\r\n let forwardButtonLabel = this.isLastStep ? this.i18n.tr('buttonLabels:finish') : this.i18n.tr('buttonLabels:next');\r\n let forwardButtonAriaLabel = this.isLastStep ? this.i18n.tr('buttonLabels:finishAria') : this.i18n.tr('buttonLabels:nextAria');\r\n\r\n if (Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonLabel')) {\r\n forwardButtonLabel = this.currentStep.forwardButtonLabel;\r\n\r\n // Get aria label if provided, else default to button label\r\n forwardButtonAriaLabel = Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonAriaLabel')\r\n ? this.currentStep.forwardButtonAriaLabel\r\n : forwardButtonLabel;\r\n }\r\n\r\n if (this.isCorrection && Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonIsCorrectionLabel')) {\r\n forwardButtonLabel = this.currentStep.forwardButtonIsCorrectionLabel;\r\n\r\n // Get aria label if provided, else default to button label\r\n forwardButtonAriaLabel = Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonIsCorrectionAriaLabel')\r\n ? this.currentStep.forwardButtonIsCorrectionAriaLabel\r\n : forwardButtonLabel;\r\n }\r\n\r\n if (this.isUserForm && Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonIsUserFormLabel')) {\r\n forwardButtonLabel = this.currentStep.forwardButtonIsUserFormLabel;\r\n\r\n // Get aria label if provided, else default to button label\r\n forwardButtonAriaLabel = Object.prototype.hasOwnProperty.call(this.currentStep, 'forwardButtonIsUserFormAriaLabel')\r\n ? this.currentStep.forwardButtonIsUserFormAriaLabel\r\n : forwardButtonLabel;\r\n }\r\n\r\n return {\r\n label: forwardButtonLabel,\r\n ariaLabel: forwardButtonAriaLabel,\r\n };\r\n }\r\n\r\n @computedFrom('forwardButtonDisabled', 'stepTransitioning', 'isLastStep', 'entityMode', 'viewModelRef.currentViewModel.config.referrerFeesRequireAcknowledgement', 'viewModelRef.currentViewModel.referrerFeeAcknowledged')\r\n protected get forwardButtonIsDisabled() {\r\n const isReadOnlyLastStepButNotCorrection = !this.isCorrection && this.isLastStep && this.entityMode === EntityMode.View;\r\n const isReferrerFeeAcknowledgementRequired = this.viewModelRef?.currentViewModel?.config?.referrerFeesRequireAcknowledgement && !this.viewModelRef?.currentViewModel?.referrerFeeAcknowledged;\r\n\r\n return this.forwardButtonDisabled || this.stepTransitioning || isReadOnlyLastStepButNotCorrection || isReferrerFeeAcknowledgementRequired;\r\n }\r\n}\r\n"],"names":["module","exports","cb","require","WIZARD_FORM_TYPES","FormQuote","FormConsent","claims","router","toast","http","ea","hooks","taskQueue","modal","i18n","styles","forwardButtonDisabled","noPermission","entityMode","None","showSaveConfirmModal","showCloseConfirmModal","showStepTransitionConfirmModal","showRiskModal","steps","currentStepIndex","backButtonDisabled","stepTransitioning","discardTitle","hasQuoteDocumentPack","hasPolicyDocumentPack","isCorrection","isUserForm","stepRendered","window","location","href","includes","appClientType","appClientInstance","url","toLowerCase","this","fetch","method","headers","localStorage","getItem","then","response","get","setItem","status","publish","bind","addAction","currentStepValidation","hasAsync","unbind","removeAction","saveCallback","type","entityId","endpoint","uri","entityType","clientEndpoints","quotes","delete","id","wizard","actionType","Claim","sessionStorage","removeItem","navigateToRoute","quoteId","policyId","policyVersionId","statusTypeId","versionNo","claimId","formId","stepValid","parseInt","stepTransitionPrompt","destroyAllToasts","viewModelRef","currentViewModel","stepClickedValue","visitStep","closeConfirmCallback","incompleteRiskQuestionsCallback","currentDirection","setActiveStep","stepIndex","forEach","step","active","canActivate","route","parentEntityId","newActionType","isTakeUp","isEditTakeUpAction","entityTypeLabel","replace","c","toUpperCase","settings","clientNavLabel","isNaN","Number","Quote","slice","Policy","Incomplete","hasCorrection","hasEditTakeup","mappedActionTyped","nonViewActionTypes","Renewal","Endorsement","Reinstatement","Cancellation","formWizardRoute","name","currentStep","mappedActionType","parsedNewActionType","userHasViewPermission","userHasEditPermission","View","Edit","New","info","composeModel","stepClicked","index","direction","doAction","updateCurrentStep","undefined","trigger","setTimeout","error","handleError","redirectAfterCreation","applyFilter","viewModel","isDirty","quoteOrPolicyVersionId","validate","result","continue","nextStep","back","previousStep","closeButtonCallback","subscribe","message","queueMicroTask","stepTransitionMessage","Object","keys","length","finish","isLastStep","submitForm","Error","requestQuote","cancelQuoteRequest","loadDocumentPack","show","content","clientId","quoteOrPolicyVersionOrClaimId","policyType","withOptions","handleForwardButtonClick","forwardButtonLabel","tr","forwardButtonAriaLabel","prototype","hasOwnProperty","call","forwardButtonIsCorrectionLabel","forwardButtonIsCorrectionAriaLabel","forwardButtonIsUserFormLabel","forwardButtonIsUserFormAriaLabel","label","ariaLabel","isReadOnlyLastStepButNotCorrection","isReferrerFeeAcknowledgementRequired","config","referrerFeesRequireAcknowledgement","referrerFeeAcknowledged","computedFrom","autoinject","EventAggregator","TaskQueue","I18N","Wizard"],"sourceRoot":""}