@hmcts/opal-frontend-common 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/abstract/abstract-form-base/index.d.ts +5 -5
- package/components/govuk/govuk-tabs/govuk-tabs-list-item/README.md +64 -0
- package/components/govuk/govuk-tabs/govuk-tabs-list-item/index.d.ts +21 -0
- package/components/govuk/govuk-tabs/govuk-tabs-panel/README.md +52 -0
- package/components/govuk/govuk-tabs/govuk-tabs-panel/index.d.ts +8 -0
- package/components/govuk/govuk-tabs/index.d.ts +20 -32
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +16 -13
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +56 -0
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +18 -0
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +34 -75
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-constants.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-guards-can-deactivate.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-guards-helpers.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-access-denied.component-hjYG8Hhi.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-sign-in-stub.component-CMgQc0uF.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-sign-in.component-UHSDf5ya.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-resolvers-user-state.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service-constants.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-date-service-interfaces.mjs +4 -0
- package/fesm2022/hmcts-opal-frontend-common-services-date-service-interfaces.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +15 -0
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service-mocks.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-constants.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-mocks.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service-mocks.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +23 -0
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-validators-amount.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-validators-driving-licence-number.mjs +23 -0
- package/fesm2022/hmcts-opal-frontend-common-validators-driving-licence-number.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-validators-future-date.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-validators-over-eighteen.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-validators-past-date.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-validators-pattern-validator.mjs +28 -0
- package/fesm2022/hmcts-opal-frontend-common-validators-pattern-validator.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-validators-time-format.mjs +20 -0
- package/fesm2022/hmcts-opal-frontend-common-validators-time-format.mjs.map +1 -0
- package/package.json +29 -1
- package/services/date-service/index.d.ts +10 -0
- package/services/date-service/interfaces/index.d.ts +10 -0
- package/services/transformation-service/index.d.ts +11 -0
- package/validators/driving-licence-number/index.d.ts +12 -0
- package/validators/pattern-validator/index.d.ts +14 -0
- package/validators/time-format/index.d.ts +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-base/abstract-form-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-base/hmcts-opal-frontend-common-components-abstract-abstract-form-base.ts"],"sourcesContent":["import { ChangeDetectorRef, Component, EventEmitter, OnDestroy, OnInit, Output, inject } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Subject, takeUntil } from 'rxjs';\nimport { IAbstractFormBaseFieldError } from './interfaces/abstract-form-base-field-error.interface';\nimport { IAbstractFormBaseFieldErrors } from './interfaces/abstract-form-base-field-errors.interface';\nimport { IAbstractFormBaseFormError } from './interfaces/abstract-form-base-form-error.interface';\nimport {\n IAbstractFormBaseFormErrorSummaryMessage,\n IAbstractFormControlErrorMessage,\n IAbstractFormArrayControlValidation,\n} from '@hmcts/opal-frontend-common/components/abstract/interfaces';\nimport { IAbstractFormBaseHighPriorityFormError } from './interfaces/abstract-form-base-high-priority-form-error.interface';\nimport { IAbstractFormBaseForm } from './interfaces/abstract-form-base-form.interface';\nimport { UtilsService } from '@hmcts/opal-frontend-common/services/utils-service';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractFormBaseComponent implements OnInit, OnDestroy {\n @Output() protected unsavedChanges = new EventEmitter<boolean>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() protected formSubmit = new EventEmitter<IAbstractFormBaseForm<any>>();\n\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly router = inject(Router);\n private readonly activatedRoute = inject(ActivatedRoute);\n protected readonly utilsService = inject(UtilsService);\n\n public form!: FormGroup;\n public formControlErrorMessages!: IAbstractFormControlErrorMessage;\n public formErrorSummaryMessage!: IAbstractFormBaseFormErrorSummaryMessage[];\n protected fieldErrors!: IAbstractFormBaseFieldErrors;\n protected formSubmitted = false;\n protected readonly ngUnsubscribe = new Subject<void>();\n public formErrors!: IAbstractFormBaseFormError[];\n\n constructor() {}\n\n /**\n * Scrolls to the label of the component and focuses on the field id\n *\n * @param fieldId - Field id of the component\n */\n private scroll(fieldId: string): void {\n let labelTarget;\n let fieldElement;\n\n const autocompleteLabel = document.querySelector(`label[for=${fieldId}-autocomplete]`);\n const regularLabel = document.querySelector(`label[for=${fieldId}]`);\n const fieldsetLegend = document.querySelector(`#${fieldId} .govuk-fieldset__legend`);\n\n if (autocompleteLabel) {\n labelTarget = autocompleteLabel;\n fieldElement = document.getElementById(`${fieldId}-autocomplete`);\n } else {\n labelTarget = regularLabel || fieldsetLegend;\n fieldElement = document.getElementById(fieldId);\n }\n\n if (fieldElement) {\n if (labelTarget) {\n labelTarget.scrollIntoView({ behavior: 'smooth' });\n }\n fieldElement.focus();\n }\n }\n\n /**\n * Returns the highest priority form error from the given error keys and field errors.\n * @param errorKeys - An array of error keys.\n * @param fieldErrors - An object containing field errors.\n * @returns The highest priority form error or null if no errors are found.\n */\n private getHighestPriorityError(\n errorKeys: string[] = [],\n fieldErrors: IAbstractFormBaseFieldError = {},\n ): IAbstractFormBaseHighPriorityFormError | null {\n if (errorKeys.length && Object.keys(fieldErrors).length) {\n const errors = errorKeys.map((errorType: string) => {\n return {\n ...fieldErrors[errorType],\n type: errorType,\n };\n });\n\n const sortedErrors = [...errors].sort((a, b) => a.priority - b.priority);\n\n return sortedErrors[0];\n }\n return null;\n }\n\n /**\n * Retrieves the details of the highest priority form error for a given control path.\n * @param controlPath - The path to the control in the form.\n * @returns The details of the highest priority form error, or null if there are no errors.\n */\n private getFieldErrorDetails(controlPath: (string | number)[]): IAbstractFormBaseHighPriorityFormError | null {\n // Get the control\n const control = this.form.get(controlPath);\n\n // If we have errors\n const controlErrors = control?.errors;\n\n if (controlErrors) {\n /// Get all the error keys\n const controlKey = controlPath[controlPath.length - 1];\n const errorKeys = Object.keys(controlErrors) || [];\n const fieldErrors = this.fieldErrors[controlKey] || {};\n\n if (errorKeys.length && Object.keys(fieldErrors).length) {\n return this.getHighestPriorityError(errorKeys, fieldErrors);\n }\n }\n return null;\n }\n\n /**\n * Retrieves all form errors from the provided form and its nested form groups.\n *\n * @param form - The form group to retrieve errors from.\n * @param controlPath - An optional array representing the path to the current control within the form group.\n * @returns An array of form errors, each containing the field ID, error message, priority, and type.\n */\n private getFormErrors(form: FormGroup, controlPath: (string | number)[] = []): IAbstractFormBaseFormError[] {\n // recursively get all errors from all controls in the form including nested form group controls\n const formControls = form.controls;\n\n const errorSummary = Object.keys(formControls)\n .filter((controlName) => formControls[controlName].invalid)\n .map((controlName) => {\n const control = formControls[controlName];\n\n if (control instanceof FormGroup) {\n return this.getFormErrors(control, [...controlPath, controlName]);\n }\n\n if (control instanceof FormArray) {\n return control.controls\n .map((controlItem, index) => {\n // We only support FormGroups in FormArrays\n if (controlItem instanceof FormGroup) {\n return this.getFormErrors(controlItem, [...controlPath, controlName, index]);\n }\n\n return [];\n })\n .flat();\n }\n\n const getFieldErrorDetails = this.getFieldErrorDetails([...controlPath, controlName]);\n\n // Return the error summary entry\n // If we don't have the error details, return a null message\n return {\n fieldId: controlName,\n message: getFieldErrorDetails?.message ?? null,\n priority: getFieldErrorDetails?.priority ?? 999999999,\n type: getFieldErrorDetails?.type ?? null,\n };\n })\n .flat();\n\n // Remove any null errors\n return errorSummary.filter((item) => item?.message !== null);\n }\n\n /**\n * Sets the error messages for the form controls and error summary based on the provided form errors.\n * @param formErrors - An array of form errors containing field IDs and error messages.\n */\n private setErrorMessages(formErrors: IAbstractFormBaseFormError[]) {\n // Reset the form error messages\n this.formControlErrorMessages = {};\n this.formErrorSummaryMessage = [];\n\n // Set the form error messages based on the error summary entries\n formErrors.forEach((entry) => {\n this.formControlErrorMessages[entry.fieldId] = entry.message;\n this.formErrorSummaryMessage.push({ fieldId: entry.fieldId, message: entry.message });\n });\n }\n\n /**\n * Gets the indexes of the date fields to remove based on the form error summary message.\n * @returns An array of indexes representing the date fields to remove.\n */\n private getDateFieldsToRemoveIndexes(): number[] {\n const indexesToRemove: number[] = [];\n // The order of the field ids is important\n // this is the order in which we want to remove them\n const foundIndexes = this.getFormErrorSummaryIndex(\n ['dayOfMonth', 'monthOfYear', 'year'],\n this.formErrorSummaryMessage,\n );\n\n // Determine which indexes to remove based on the found fields\n switch (foundIndexes.length) {\n case 3:\n // All three date fields are present\n indexesToRemove.push(foundIndexes[1], foundIndexes[2]);\n break;\n case 2:\n // Two date fields are present\n indexesToRemove.push(foundIndexes[1]);\n break;\n }\n\n return indexesToRemove;\n }\n\n /**\n * Returns an array of indices corresponding to the positions of the given field IDs in the form error summary message array.\n *\n * @param fieldIds - An array of field IDs to search for in the form error summary message array.\n * @param formErrorSummaryMessage - An array of form error summary messages.\n * @returns An array of indices corresponding to the positions of the field IDs in the form error summary message array.\n */\n private getFormErrorSummaryIndex(\n fieldIds: string[],\n formErrorSummaryMessage: IAbstractFormBaseFormErrorSummaryMessage[],\n ): number[] {\n return fieldIds.reduce((acc: number[], field) => {\n const index = formErrorSummaryMessage.findIndex((error) => error.fieldId === field);\n return index !== -1 ? [...acc, index] : acc;\n }, []);\n }\n\n /**\n * Removes error summary messages from the given array based on the specified indexes.\n *\n * @param formErrorSummaryMessage - The array of error summary messages.\n * @param indexes - The indexes of the error summary messages to be removed.\n * @returns The updated array of error summary messages.\n */\n private removeErrorSummaryMessages(\n formErrorSummaryMessage: IAbstractFormBaseFormErrorSummaryMessage[],\n indexes: number[],\n ): IAbstractFormBaseFormErrorSummaryMessage[] {\n return formErrorSummaryMessage.filter((_, index) => !indexes.includes(index));\n }\n\n /**\n * Splits the form errors into two arrays based on the provided field IDs.\n * Errors with field IDs included in the fieldIds array will be moved to the removedFormErrors array,\n * while the remaining errors will be moved to the cleanFormErrors array.\n *\n * @param fieldIds - An array of field IDs to filter the form errors.\n * @param formErrors - An array of form errors to be split.\n * @returns An array containing two arrays: cleanFormErrors and removedFormErrors.\n */\n private splitFormErrors(\n fieldIds: string[],\n formErrors: IAbstractFormBaseFormError[],\n ): IAbstractFormBaseFormError[][] {\n const cleanFormErrors: IAbstractFormBaseFormError[] = [];\n const removedFormErrors: IAbstractFormBaseFormError[] = [];\n\n formErrors.forEach((error) => {\n if (fieldIds.includes(error.fieldId)) {\n removedFormErrors.push(error);\n } else {\n cleanFormErrors.push(error);\n }\n });\n\n return [cleanFormErrors, removedFormErrors];\n }\n\n /**\n * Manipulates the error message for specific fields in the formErrors array.\n * @param fields - An array of field IDs to target for error message manipulation.\n * @param messageOverride - The new error message to be used for the targeted fields.\n * @param errorType - The type of error to match for the targeted fields.\n * @param formErrors - An array of IFormError objects representing the form errors.\n * @returns An array of IFormError objects with the manipulated error messages.\n */\n private manipulateFormErrorMessage(\n fields: string[],\n messageOverride: string,\n errorType: string,\n formErrors: IAbstractFormBaseFormError[],\n ): IAbstractFormBaseFormError[] {\n const manipulatedFields: IAbstractFormBaseFormError[] = [];\n formErrors.forEach((field) => {\n if (fields.includes(field.fieldId)) {\n if (field.type === errorType) {\n manipulatedFields.push({ ...field, message: messageOverride });\n } else {\n manipulatedFields.push(field);\n }\n } else {\n manipulatedFields.push(field);\n }\n });\n\n return manipulatedFields;\n }\n\n /**\n * Retrieves the form errors with the highest priority.\n *\n * @param formErrors - An array of form errors.\n * @returns An array of form errors with the highest priority.\n */\n private getHighPriorityFormErrors(formErrors: IAbstractFormBaseFormError[]): IAbstractFormBaseFormError[] {\n // Get the lowest priority (1 is the highest priority, 3 is the lowest priority)\n const lowestPriority = Math.min(...formErrors.map((item) => item.priority));\n return formErrors.filter((item) => item.priority === lowestPriority);\n }\n\n /**\n * Focuses on the error summary element and scrolls to the top of the page.\n *\n * This method first triggers change detection to ensure the view is up-to-date.\n * It then selects the error summary element with the class 'govuk-error-summary'.\n * If the error summary element is found, it sets focus on it without scrolling the page.\n * Finally, it calls a utility service to scroll to the top of the page.\n *\n * @private\n */\n private focusAndScrollToErrorSummary(): void {\n this.changeDetectorRef.detectChanges();\n\n const errorSummary = document.querySelector('.govuk-error-summary') as HTMLElement;\n if (errorSummary) {\n errorSummary.focus({ preventScroll: true });\n this.utilsService.scrollToTop();\n }\n }\n\n /**\n * Setup listener for the form value changes and to emit hasUnsavedChanges\n */\n private setupListener(): void {\n this.form.valueChanges.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n });\n }\n\n /**\n * Adds controls to a form group.\n *\n * @param formGroup - The form group to add controls to.\n * @param controls - An array of form array control validations.\n * @param index - The index of the form array control.\n */\n protected addControlsToFormGroup(\n formGroup: FormGroup,\n controls: IAbstractFormArrayControlValidation[],\n index: number,\n ): void {\n controls.forEach(({ controlName, validators }) => {\n formGroup.addControl(`${controlName}_${index}`, new FormControl(null, validators));\n });\n }\n\n /**\n * Creates a form control with the specified validators and initial value.\n *\n * @param validators - An array of validator functions.\n * @param initialValue - The initial value for the form control. Defaults to null.\n * @returns The created form control.\n */\n protected createFormControl(validators: ValidatorFn[], initialValue: string | null = null): FormControl {\n return new FormControl(initialValue, { validators: [...validators] });\n }\n\n /**\n * Handles the error messages and populates the relevant variables\n */\n protected handleErrorMessages(): void {\n this.formErrors = this.getFormErrors(this.form);\n\n this.setErrorMessages(this.formErrors);\n\n this.formErrorSummaryMessage = this.removeErrorSummaryMessages(\n this.formErrorSummaryMessage,\n this.getDateFieldsToRemoveIndexes(),\n );\n }\n\n /**\n * Checks whether the form has been touched and submitted\n *\n * @returns boolean\n */\n protected hasUnsavedChanges(): boolean {\n return this.form.dirty && !this.formSubmitted;\n }\n\n /**\n * Sets the value of a specified form control and marks it as touched.\n *\n * @param {string} value - The value to set for the form control.\n * @param {string} control - The name of the form control to update.\n */\n protected setInputValue(value: string, control: string) {\n this.form.controls[control].patchValue(value);\n this.form.controls[control].markAsTouched();\n }\n\n /**\n * Handles the form errors for the date input fields.\n * @param formErrors - An array of form errors.\n * @returns An array of form errors with the manipulated error messages.\n */\n protected handleDateInputFormErrors() {\n const dateInputFields = ['dayOfMonth', 'monthOfYear', 'year'];\n const splitFormErrors = this.splitFormErrors(dateInputFields, this.formErrors);\n const highPriorityDateControlErrors = this.getHighPriorityFormErrors(splitFormErrors[1]);\n let manipulatedFormErrors: IAbstractFormBaseFormError[] = highPriorityDateControlErrors;\n\n // If we have more than one error then we want to manipulate the error message\n if (highPriorityDateControlErrors.length > 1) {\n manipulatedFormErrors = this.manipulateFormErrorMessage(\n dateInputFields,\n 'Please enter a DOB',\n 'required',\n manipulatedFormErrors,\n );\n }\n\n return [...splitFormErrors[0], ...manipulatedFormErrors];\n }\n\n /**\n * Sets the initial error messages for the form controls.\n *\n * @param form - The FormGroup instance.\n */\n protected setInitialErrorMessages(): void {\n const formControls = this.form.controls;\n const initialFormControlErrorMessages: IAbstractFormControlErrorMessage = {};\n\n Object.keys(formControls).forEach((controlName) => {\n initialFormControlErrorMessages[controlName] = null;\n });\n\n this.formControlErrorMessages = initialFormControlErrorMessages;\n this.formErrorSummaryMessage = [];\n }\n\n /**\n * Repopulates the search form with the data from the account enquiry search.\n * @param state - The state object containing the search form data.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected rePopulateForm(state: any): void {\n this.form.patchValue(state);\n }\n\n /**\n * Adds a new form control to the form group.\n *\n * @param controlName - The name of the control to add.\n * @param validators - An array of validators to apply to the control.\n */\n protected createControl(controlName: string, validators: ValidatorFn[]): void {\n this.form.addControl(controlName, new FormControl(null, validators));\n }\n\n /**\n * Updates the validators of an existing form control.\n *\n * @param controlName - The name of the control to update.\n * @param validators - An array of validators to apply to the control.\n */\n protected updateControl(controlName: string, validators: ValidatorFn[]): void {\n const control = this.form.get(controlName);\n if (control) {\n control.setValidators(validators);\n control.updateValueAndValidity();\n } else {\n this.createControl(controlName, validators);\n }\n }\n\n /**\n * Removes a control from the form.\n *\n * @param controlName - The name of the control to remove.\n */\n protected removeControl(controlName: string): void {\n if (this.formControlErrorMessages[controlName]) {\n this.removeControlErrors(controlName);\n }\n this.form.removeControl(controlName);\n }\n\n /**\n * Removes the error message associated with the specified control name from the formControlErrorMessages object.\n *\n * @param controlName - The name of the control for which to remove the error message.\n */\n protected removeControlErrors(controlName: string): void {\n delete this.formControlErrorMessages[controlName];\n }\n\n /**\n * Clears the search form.\n */\n public handleClearForm(): void {\n this.form.reset();\n }\n\n /**\n * Handles the scroll of the component error from the summary\n *\n * @param fieldId - Field id of the component\n */\n public scrollTo(fieldId: string): void {\n this['scroll'](fieldId);\n }\n\n /**\n * Handles route with the supplied route\n *\n * @param route string of route\n * @param nonRelative boolean indicating if route is relative to the parent\n */\n public handleRoute(route: string, nonRelative: boolean = false, event?: Event): void {\n if (event) {\n event.preventDefault();\n }\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n if (nonRelative) {\n this.router.navigate([route]);\n } else {\n this.router.navigate([route], { relativeTo: this.activatedRoute.parent });\n }\n }\n\n /**\n * Handles the form submission event.\n *\n * @param event - The form submission event.\n * @returns void\n */\n public handleFormSubmit(event: SubmitEvent): void {\n this.handleErrorMessages();\n\n if (this.form.valid) {\n this.formSubmitted = true;\n const nestedFlow = event.submitter ? event.submitter.className.includes('nested-flow') : false;\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n this.formSubmit.emit({ formData: this.form.value, nestedFlow: nestedFlow });\n } else {\n this.focusAndScrollToErrorSummary();\n }\n }\n\n /**\n * Handles the input event to convert all letters in the input value to uppercase.\n * This method is triggered by an input event and modifies the input value directly.\n *\n * @param event - The input event triggered by the user.\n */\n public handleUppercaseInputMask(event: Event): void {\n const input = event.target as HTMLInputElement;\n input.value = this.utilsService.upperCaseAllLetters(input.value);\n }\n\n public ngOnInit(): void {\n if (this.form) {\n this.setupListener();\n }\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAmBsB,yBAAyB,CAAA;AACzB,IAAA,cAAc,GAAG,IAAI,YAAY,EAAW;;AAE5C,IAAA,UAAU,GAAG,IAAI,YAAY,EAA8B;AAE9D,IAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,IAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAE/C,IAAA,IAAI;AACJ,IAAA,wBAAwB;AACxB,IAAA,uBAAuB;AACpB,IAAA,WAAW;IACX,aAAa,GAAG,KAAK;AACZ,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AAC/C,IAAA,UAAU;AAEjB,IAAA,WAAA,GAAA;AAEA;;;;AAIG;AACK,IAAA,MAAM,CAAC,OAAe,EAAA;AAC5B,QAAA,IAAI,WAAW;AACf,QAAA,IAAI,YAAY;QAEhB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAa,UAAA,EAAA,OAAO,CAAgB,cAAA,CAAA,CAAC;QACtF,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAa,UAAA,EAAA,OAAO,CAAG,CAAA,CAAA,CAAC;QACpE,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAI,CAAA,EAAA,OAAO,CAA0B,wBA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AA,EAAA,IAAA,EAAA,yBAAyB,iJAFnC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEQ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAH9C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;wDAEqB,cAAc,EAAA,CAAA;sBAAjC;gBAEmB,UAAU,EAAA,CAAA;sBAA7B;;;ACtBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-form-base/abstract-form-base.component.ts","../../../projects/opal-frontend-common/components/abstract/abstract-form-base/hmcts-opal-frontend-common-components-abstract-abstract-form-base.ts"],"sourcesContent":["import { ChangeDetectorRef, Component, EventEmitter, OnDestroy, OnInit, Output, inject } from '@angular/core';\nimport { FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Subject, takeUntil } from 'rxjs';\nimport { IAbstractFormBaseFieldError } from './interfaces/abstract-form-base-field-error.interface';\nimport { IAbstractFormBaseFieldErrors } from './interfaces/abstract-form-base-field-errors.interface';\nimport { IAbstractFormBaseFormError } from './interfaces/abstract-form-base-form-error.interface';\nimport {\n IAbstractFormBaseFormErrorSummaryMessage,\n IAbstractFormControlErrorMessage,\n IAbstractFormArrayControlValidation,\n} from '@hmcts/opal-frontend-common/components/abstract/interfaces';\nimport { IAbstractFormBaseHighPriorityFormError } from './interfaces/abstract-form-base-high-priority-form-error.interface';\nimport { IAbstractFormBaseForm } from './interfaces/abstract-form-base-form.interface';\nimport { UtilsService } from '@hmcts/opal-frontend-common/services/utils-service';\n\n@Component({\n template: '',\n})\nexport abstract class AbstractFormBaseComponent implements OnInit, OnDestroy {\n @Output() protected unsavedChanges = new EventEmitter<boolean>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() protected formSubmit = new EventEmitter<IAbstractFormBaseForm<any>>();\n\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly router = inject(Router);\n private readonly activatedRoute = inject(ActivatedRoute);\n protected readonly utilsService = inject(UtilsService);\n\n public form!: FormGroup;\n public formControlErrorMessages!: IAbstractFormControlErrorMessage;\n public formErrorSummaryMessage!: IAbstractFormBaseFormErrorSummaryMessage[];\n protected fieldErrors!: IAbstractFormBaseFieldErrors;\n protected formSubmitted = false;\n protected readonly ngUnsubscribe = new Subject<void>();\n public formErrors!: IAbstractFormBaseFormError[];\n\n constructor() {}\n\n /**\n * Scrolls to the label of the component and focuses on the field id\n *\n * @param fieldId - Field id of the component\n */\n private scroll(fieldId: string): void {\n let labelTarget;\n let fieldElement;\n\n const autocompleteLabel = document.querySelector(`label[for=${fieldId}-autocomplete]`);\n const regularLabel = document.querySelector(`label[for=${fieldId}]`);\n const fieldsetLegend = document.querySelector(`#${fieldId} .govuk-fieldset__legend`);\n\n if (autocompleteLabel) {\n labelTarget = autocompleteLabel;\n fieldElement = document.getElementById(`${fieldId}-autocomplete`);\n } else {\n labelTarget = regularLabel || fieldsetLegend;\n fieldElement = document.getElementById(fieldId);\n }\n\n if (fieldElement) {\n if (labelTarget) {\n labelTarget.scrollIntoView({ behavior: 'smooth' });\n }\n fieldElement.focus();\n }\n }\n\n /**\n * Returns the highest priority form error from the given error keys and field errors.\n * @param errorKeys - An array of error keys.\n * @param fieldErrors - An object containing field errors.\n * @returns The highest priority form error or null if no errors are found.\n */\n private getHighestPriorityError(\n errorKeys: string[] = [],\n fieldErrors: IAbstractFormBaseFieldError = {},\n ): IAbstractFormBaseHighPriorityFormError | null {\n if (errorKeys.length && Object.keys(fieldErrors).length) {\n const errors = errorKeys.map((errorType: string) => {\n return {\n ...fieldErrors[errorType],\n type: errorType,\n };\n });\n\n const sortedErrors = [...errors].sort((a, b) => a.priority - b.priority);\n\n return sortedErrors[0];\n }\n return null;\n }\n\n /**\n * Retrieves the details of the highest priority form error for a given control path.\n * @param controlPath - The path to the control in the form.\n * @returns The details of the highest priority form error, or null if there are no errors.\n */\n private getFieldErrorDetails(controlPath: (string | number)[]): IAbstractFormBaseHighPriorityFormError | null {\n // Get the control\n const control = this.form.get(controlPath);\n\n // If we have errors\n const controlErrors = control?.errors;\n\n if (controlErrors) {\n /// Get all the error keys\n const controlKey = controlPath[controlPath.length - 1];\n const errorKeys = Object.keys(controlErrors) || [];\n const fieldErrors = this.fieldErrors[controlKey] || {};\n\n if (errorKeys.length && Object.keys(fieldErrors).length) {\n return this.getHighestPriorityError(errorKeys, fieldErrors);\n }\n }\n return null;\n }\n\n /**\n * Retrieves all form errors from the provided form and its nested form groups.\n *\n * @param form - The form group to retrieve errors from.\n * @param controlPath - An optional array representing the path to the current control within the form group.\n * @returns An array of form errors, each containing the field ID, error message, priority, and type.\n */\n private getFormErrors(form: FormGroup, controlPath: (string | number)[] = []): IAbstractFormBaseFormError[] {\n // recursively get all errors from all controls in the form including nested form group controls\n const formControls = form.controls;\n\n const errorSummary = Object.keys(formControls)\n .filter((controlName) => formControls[controlName].invalid)\n .map((controlName) => {\n const control = formControls[controlName];\n\n if (control instanceof FormGroup) {\n return this.getFormErrors(control, [...controlPath, controlName]);\n }\n\n if (control instanceof FormArray) {\n return control.controls\n .map((controlItem, index) => {\n // We only support FormGroups in FormArrays\n if (controlItem instanceof FormGroup) {\n return this.getFormErrors(controlItem, [...controlPath, controlName, index]);\n }\n\n return [];\n })\n .flat();\n }\n\n const getFieldErrorDetails = this.getFieldErrorDetails([...controlPath, controlName]);\n\n // Return the error summary entry\n // If we don't have the error details, return a null message\n return {\n fieldId: controlName,\n message: getFieldErrorDetails?.message ?? null,\n priority: getFieldErrorDetails?.priority ?? 999999999,\n type: getFieldErrorDetails?.type ?? null,\n };\n })\n .flat();\n\n // Remove any null errors\n return errorSummary.filter((item) => item?.message !== null);\n }\n\n /**\n * Sets the error messages for the form controls and error summary based on the provided form errors.\n * @param formErrors - An array of form errors containing field IDs and error messages.\n */\n private setErrorMessages(formErrors: IAbstractFormBaseFormError[]) {\n // Reset the form error messages\n this.formControlErrorMessages = {};\n this.formErrorSummaryMessage = [];\n\n // Set the form error messages based on the error summary entries\n formErrors.forEach((entry) => {\n this.formControlErrorMessages[entry.fieldId] = entry.message;\n this.formErrorSummaryMessage.push({ fieldId: entry.fieldId, message: entry.message });\n });\n }\n\n /**\n * Gets the indexes of the date fields to remove based on the form error summary message.\n * @returns An array of indexes representing the date fields to remove.\n */\n private getDateFieldsToRemoveIndexes(): number[] {\n const indexesToRemove: number[] = [];\n // The order of the field ids is important\n // this is the order in which we want to remove them\n const foundIndexes = this.getFormErrorSummaryIndex(\n ['dayOfMonth', 'monthOfYear', 'year'],\n this.formErrorSummaryMessage,\n );\n\n // Determine which indexes to remove based on the found fields\n switch (foundIndexes.length) {\n case 3:\n // All three date fields are present\n indexesToRemove.push(foundIndexes[1], foundIndexes[2]);\n break;\n case 2:\n // Two date fields are present\n indexesToRemove.push(foundIndexes[1]);\n break;\n }\n\n return indexesToRemove;\n }\n\n /**\n * Returns an array of indices corresponding to the positions of the given field IDs in the form error summary message array.\n *\n * @param fieldIds - An array of field IDs to search for in the form error summary message array.\n * @param formErrorSummaryMessage - An array of form error summary messages.\n * @returns An array of indices corresponding to the positions of the field IDs in the form error summary message array.\n */\n private getFormErrorSummaryIndex(\n fieldIds: string[],\n formErrorSummaryMessage: IAbstractFormBaseFormErrorSummaryMessage[],\n ): number[] {\n return fieldIds.reduce((acc: number[], field) => {\n const index = formErrorSummaryMessage.findIndex((error) => error.fieldId === field);\n return index !== -1 ? [...acc, index] : acc;\n }, []);\n }\n\n /**\n * Removes error summary messages from the given array based on the specified indexes.\n *\n * @param formErrorSummaryMessage - The array of error summary messages.\n * @param indexes - The indexes of the error summary messages to be removed.\n * @returns The updated array of error summary messages.\n */\n private removeErrorSummaryMessages(\n formErrorSummaryMessage: IAbstractFormBaseFormErrorSummaryMessage[],\n indexes: number[],\n ): IAbstractFormBaseFormErrorSummaryMessage[] {\n return formErrorSummaryMessage.filter((_, index) => !indexes.includes(index));\n }\n\n /**\n * Splits the form errors into two arrays based on the provided field IDs.\n * Errors with field IDs included in the fieldIds array will be moved to the removedFormErrors array,\n * while the remaining errors will be moved to the cleanFormErrors array.\n *\n * @param fieldIds - An array of field IDs to filter the form errors.\n * @param formErrors - An array of form errors to be split.\n * @returns An array containing two arrays: cleanFormErrors and removedFormErrors.\n */\n private splitFormErrors(\n fieldIds: string[],\n formErrors: IAbstractFormBaseFormError[],\n ): IAbstractFormBaseFormError[][] {\n const cleanFormErrors: IAbstractFormBaseFormError[] = [];\n const removedFormErrors: IAbstractFormBaseFormError[] = [];\n\n formErrors.forEach((error) => {\n if (fieldIds.includes(error.fieldId)) {\n removedFormErrors.push(error);\n } else {\n cleanFormErrors.push(error);\n }\n });\n\n return [cleanFormErrors, removedFormErrors];\n }\n\n /**\n * Manipulates the error message for specific fields in the formErrors array.\n * @param fields - An array of field IDs to target for error message manipulation.\n * @param messageOverride - The new error message to be used for the targeted fields.\n * @param errorType - The type of error to match for the targeted fields.\n * @param formErrors - An array of IFormError objects representing the form errors.\n * @returns An array of IFormError objects with the manipulated error messages.\n */\n private manipulateFormErrorMessage(\n fields: string[],\n messageOverride: string,\n errorType: string,\n formErrors: IAbstractFormBaseFormError[],\n ): IAbstractFormBaseFormError[] {\n const manipulatedFields: IAbstractFormBaseFormError[] = [];\n formErrors.forEach((field) => {\n if (fields.includes(field.fieldId)) {\n if (field.type === errorType) {\n manipulatedFields.push({ ...field, message: messageOverride });\n } else {\n manipulatedFields.push(field);\n }\n } else {\n manipulatedFields.push(field);\n }\n });\n\n return manipulatedFields;\n }\n\n /**\n * Retrieves the form errors with the highest priority.\n *\n * @param formErrors - An array of form errors.\n * @returns An array of form errors with the highest priority.\n */\n private getHighPriorityFormErrors(formErrors: IAbstractFormBaseFormError[]): IAbstractFormBaseFormError[] {\n // Get the lowest priority (1 is the highest priority, 3 is the lowest priority)\n const lowestPriority = Math.min(...formErrors.map((item) => item.priority));\n return formErrors.filter((item) => item.priority === lowestPriority);\n }\n\n /**\n * Focuses on the error summary element and scrolls to the top of the page.\n *\n * This method first triggers change detection to ensure the view is up-to-date.\n * It then selects the error summary element with the class 'govuk-error-summary'.\n * If the error summary element is found, it sets focus on it without scrolling the page.\n * Finally, it calls a utility service to scroll to the top of the page.\n *\n * @private\n */\n private focusAndScrollToErrorSummary(): void {\n this.changeDetectorRef.detectChanges();\n\n const errorSummary = document.querySelector('.govuk-error-summary') as HTMLElement;\n if (errorSummary) {\n errorSummary.focus({ preventScroll: true });\n this.utilsService.scrollToTop();\n }\n }\n\n /**\n * Setup listener for the form value changes and to emit hasUnsavedChanges\n */\n private setupListener(): void {\n this.form.valueChanges.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n });\n }\n\n /**\n * Adds controls to a form group.\n *\n * @param formGroup - The form group to add controls to.\n * @param controls - An array of form array control validations.\n * @param index - The index of the form array control.\n */\n protected addControlsToFormGroup(\n formGroup: FormGroup,\n controls: IAbstractFormArrayControlValidation[],\n index: number,\n ): void {\n controls.forEach(({ controlName, validators }) => {\n formGroup.addControl(`${controlName}_${index}`, new FormControl(null, validators));\n });\n }\n\n /**\n * Creates a form control with the specified validators and initial value.\n *\n * @param validators - An array of validator functions.\n * @param initialValue - The initial value for the form control. Defaults to null.\n * @returns The created form control.\n */\n protected createFormControl(validators: ValidatorFn[], initialValue: string | null = null): FormControl {\n return new FormControl(initialValue, { validators: [...validators] });\n }\n\n /**\n * Handles the error messages and populates the relevant variables\n */\n protected handleErrorMessages(): void {\n this.formErrors = this.getFormErrors(this.form);\n\n this.setErrorMessages(this.formErrors);\n\n this.formErrorSummaryMessage = this.removeErrorSummaryMessages(\n this.formErrorSummaryMessage,\n this.getDateFieldsToRemoveIndexes(),\n );\n }\n\n /**\n * Checks whether the form has been touched and submitted\n *\n * @returns boolean\n */\n protected hasUnsavedChanges(): boolean {\n return this.form.dirty && !this.formSubmitted;\n }\n\n /**\n * Sets the value of a form control specified by its path and marks it as touched.\n *\n * @param value - The value to set for the form control.\n * @param controlPath - The dot-delimited path to the form control within the form group.\n */\n protected setInputValue(value: string, controlPath: string): void {\n const control = this.form.get(controlPath);\n if (control) {\n control.patchValue(value);\n control.markAsTouched();\n }\n }\n\n /**\n * Handles the form errors for the date input fields.\n * @param formErrors - An array of form errors.\n * @returns An array of form errors with the manipulated error messages.\n */\n protected handleDateInputFormErrors() {\n const dateInputFields = ['dayOfMonth', 'monthOfYear', 'year'];\n const splitFormErrors = this.splitFormErrors(dateInputFields, this.formErrors);\n const highPriorityDateControlErrors = this.getHighPriorityFormErrors(splitFormErrors[1]);\n let manipulatedFormErrors: IAbstractFormBaseFormError[] = highPriorityDateControlErrors;\n\n // If we have more than one error then we want to manipulate the error message\n if (highPriorityDateControlErrors.length > 1) {\n manipulatedFormErrors = this.manipulateFormErrorMessage(\n dateInputFields,\n 'Please enter a DOB',\n 'required',\n manipulatedFormErrors,\n );\n }\n\n return [...splitFormErrors[0], ...manipulatedFormErrors];\n }\n\n /**\n * Sets the initial error messages for the form controls.\n *\n * @param form - The FormGroup instance.\n */\n protected setInitialErrorMessages(): void {\n const formControls = this.form.controls;\n const initialFormControlErrorMessages: IAbstractFormControlErrorMessage = {};\n\n Object.keys(formControls).forEach((controlName) => {\n initialFormControlErrorMessages[controlName] = null;\n });\n\n this.formControlErrorMessages = initialFormControlErrorMessages;\n this.formErrorSummaryMessage = [];\n }\n\n /**\n * Repopulates the search form with the data from the account enquiry search.\n * @param state - The state object containing the search form data.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected rePopulateForm(state: any): void {\n this.form.patchValue(state);\n }\n\n /**\n * Adds a new form control to the form group.\n *\n * @param controlName - The name of the control to add.\n * @param validators - An array of validators to apply to the control.\n */\n protected createControl(controlName: string, validators: ValidatorFn[]): void {\n this.form.addControl(controlName, new FormControl(null, validators));\n }\n\n /**\n * Updates the validators of an existing form control.\n *\n * @param controlName - The name of the control to update.\n * @param validators - An array of validators to apply to the control.\n */\n protected updateControl(controlName: string, validators: ValidatorFn[]): void {\n const control = this.form.get(controlName);\n if (control) {\n control.setValidators(validators);\n control.updateValueAndValidity();\n } else {\n this.createControl(controlName, validators);\n }\n }\n\n /**\n * Removes a control from the form.\n *\n * @param controlName - The name of the control to remove.\n */\n protected removeControl(controlName: string): void {\n if (this.formControlErrorMessages[controlName]) {\n this.removeControlErrors(controlName);\n }\n this.form.removeControl(controlName);\n }\n\n /**\n * Removes the error message associated with the specified control name from the formControlErrorMessages object.\n *\n * @param controlName - The name of the control for which to remove the error message.\n */\n protected removeControlErrors(controlName: string): void {\n delete this.formControlErrorMessages[controlName];\n }\n\n /**\n * Clears the search form.\n */\n public handleClearForm(): void {\n this.form.reset();\n }\n\n /**\n * Handles the scroll of the component error from the summary\n *\n * @param fieldId - Field id of the component\n */\n public scrollTo(fieldId: string): void {\n this['scroll'](fieldId);\n }\n\n /**\n * Handles route with the supplied route\n *\n * @param route string of route\n * @param nonRelative boolean indicating if route is relative to the parent\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public handleRoute(route: string, nonRelative: boolean = false, event?: Event, routeData?: any): void {\n if (event) {\n event.preventDefault();\n }\n\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n\n const navigationExtras = {\n ...(nonRelative ? {} : { relativeTo: this.activatedRoute.parent }),\n ...(routeData !== undefined ? { state: routeData } : {}),\n };\n\n this.router.navigate([route], navigationExtras);\n }\n\n /**\n * Handles the form submission event.\n *\n * @param event - The form submission event.\n * @returns void\n */\n public handleFormSubmit(event: SubmitEvent): void {\n this.handleErrorMessages();\n\n if (this.form.valid) {\n this.formSubmitted = true;\n const nestedFlow = event.submitter ? event.submitter.className.includes('nested-flow') : false;\n this.unsavedChanges.emit(this.hasUnsavedChanges());\n this.formSubmit.emit({ formData: this.form.value, nestedFlow: nestedFlow });\n } else {\n this.focusAndScrollToErrorSummary();\n }\n }\n\n /**\n * Handles the input event to convert all letters in the input value to uppercase.\n * This method is triggered by an input event and modifies the input value directly.\n *\n * @param event - The input event triggered by the user.\n */\n public handleUppercaseInputMask(event: Event): void {\n const input = event.target as HTMLInputElement;\n input.value = this.utilsService.upperCaseAllLetters(input.value);\n }\n\n public ngOnInit(): void {\n if (this.form) {\n this.setupListener();\n }\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAmBsB,yBAAyB,CAAA;AACzB,IAAA,cAAc,GAAG,IAAI,YAAY,EAAW;;AAE5C,IAAA,UAAU,GAAG,IAAI,YAAY,EAA8B;AAE9D,IAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,IAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAE/C,IAAA,IAAI;AACJ,IAAA,wBAAwB;AACxB,IAAA,uBAAuB;AACpB,IAAA,WAAW;IACX,aAAa,GAAG,KAAK;AACZ,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AAC/C,IAAA,UAAU;AAEjB,IAAA,WAAA,GAAA;AAEA;;;;AAIG;AACK,IAAA,MAAM,CAAC,OAAe,EAAA;AAC5B,QAAA,IAAI,WAAW;AACf,QAAA,IAAI,YAAY;QAEhB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,UAAA,EAAa,OAAO,CAAA,cAAA,CAAgB,CAAC;QACtF,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,UAAA,EAAa,OAAO,CAAA,CAAA,CAAG,CAAC;QACpE,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,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SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,iJAFnC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEQ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAH9C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;wDAEqB,cAAc,EAAA,CAAA;sBAAjC;gBAEmB,UAAU,EAAA,CAAA;sBAA7B;;;ACtBH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/abstract-tab-data.ts","../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Observable, switchMap, map, shareReplay, distinctUntilChanged, filter, startWith, takeUntil, tap } from 'rxjs';\n\nexport abstract class AbstractTabData {\n private readonly router = inject(Router);\n public readonly activatedRoute = inject(ActivatedRoute);\n public activeTab!: string;\n\n /**\n * Creates an observable stream that fetches and transforms data based on the current tab.\n *\n * It fetches data using the `fetchData` function with parameters obtained from `getParams`,\n * transforms the result using the `transform` function, and shares the result among subscribers.\n *\n * @template T The type of data returned by the fetchData observable.\n * @template U The type of the value emitted by the resulting observable.\n * @param fragment$ - An observable emitting the current tab identifier.\n * @param getParams - A function that returns parameters for data fetching based on the tab.\n * @param fetchData - A function that fetches data as an observable, given the parameters.\n * @param transform - A function to transform the fetched data before emission.\n * @returns An observable emitting the transformed fetched data, depending on the current tab.\n */\n private createConditionalStream<T, U>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => U,\n ): Observable<U> {\n return fragment$.pipe(switchMap((tab) => fetchData(getParams(tab)).pipe(map(transform), shareReplay(1))));\n }\n\n /**\n * Returns an observable stream of the current URL fragment, starting with the initial fragment or a default tab.\n *\n * This method listens to changes in the route fragment and emits the fragment value as a string.\n * It starts with the current fragment (or the provided default tab if none exists), filters out falsy values,\n * ensures only distinct values are emitted, and completes when the provided `destroy$` observable emits.\n *\n * @param defaultTab - The default tab to use if no fragment is present in the route snapshot.\n * @param destroy$ - An observable that signals when to complete the fragment stream.\n * @returns An observable emitting the current fragment string, updating on changes, and completing on destroy.\n */\n protected getFragmentStream(defaultTab: string, destroy$: Observable<void>): Observable<string> {\n return this.activatedRoute.fragment.pipe(\n startWith(this.activatedRoute.snapshot.fragment ?? defaultTab),\n filter((frag): frag is string => !!frag),\n map((tab) => tab),\n distinctUntilChanged(),\n takeUntil(destroy$),\n );\n }\n\n /**\n * Wraps a fragment stream and executes the provided callback on each tab change.\n *\n * @param fragment$ - The fragment observable stream.\n * @param clearFn - A function to execute when the tab changes.\n * @returns The fragment stream with a side-effect to run `clearFn` on each emission.\n */\n protected clearCacheOnTabChange(fragment$: Observable<string>, clearFn: () => void): Observable<string> {\n return fragment$.pipe(tap(() => clearFn()));\n }\n\n /**\n * Creates an observable data stream for a tab, transforming the fetched data as needed.\n *\n * @template T The type of the data fetched.\n * @template R The type of the transformed data.\n * @param fragment$ An observable emitting the current tab fragment.\n * @param getParams A function that returns fetch parameters based on the tab.\n * @param fetchData A function that fetches data given the parameters.\n * @param transform A function to transform the fetched data.\n * @returns An observable emitting the transformed data for the current tab.\n */\n public createTabDataStream<T, R>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => R,\n ): Observable<R> {\n return this.createConditionalStream<T, R>(fragment$, getParams, fetchData, transform);\n }\n\n /**\n * Creates an observable stream that emits a formatted count string based on the current tab and fragment.\n *\n * @template T - The type of the data returned by the fetchCount observable.\n * @param fragment$ - An observable emitting the current fragment or tab identifier.\n * @param getParams - A function that returns the parameters required for fetching the count.\n * @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.\n * @param extractCount - A function that extracts the numeric count from the fetched data.\n * @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.\n * @returns An observable that emits the formatted count string whenever the fragment or parameters change.\n */\n public createCountStream<T>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchCount: (params: any) => Observable<T>,\n extractCount: (data: T) => number,\n formatFn: (count: number) => string = (c) => `${c}`,\n ): Observable<string> {\n return fragment$.pipe(\n switchMap((tab) =>\n fetchCount(getParams(tab)).pipe(\n map((data) => formatFn(extractCount(data))),\n shareReplay(1),\n ),\n ),\n );\n }\n\n /**\n * Handles the tab switch by updating the active tab and triggering a router fragment update.\n *\n * @param fragment - The identifier of the tab to activate.\n */\n public handleTabSwitch(fragment: string): void {\n this.activeTab = fragment;\n this.router.navigate([], {\n relativeTo: this.activatedRoute.parent,\n fragment,\n });\n }\n\n /**\n * Formats a count value, capping it at a specified maximum.\n *\n * If the count exceeds the cap, returns a string in the format \"{cap}+\".\n * Otherwise, returns the count as a string.\n *\n * @param count - The number to format.\n * @param cap - The maximum value to display before capping.\n * @returns A string representing the count, capped if necessary.\n */\n public formatCountWithCap(count: number, cap: number): string {\n return count > cap ? `${cap}+` : `${count}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIsB,eAAe,CAAA;AAClB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;A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|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-abstract-abstract-tab-data.mjs","sources":["../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/abstract-tab-data.ts","../../../projects/opal-frontend-common/components/abstract/abstract-tab-data/hmcts-opal-frontend-common-components-abstract-abstract-tab-data.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Observable, switchMap, map, shareReplay, distinctUntilChanged, filter, startWith, takeUntil, tap } from 'rxjs';\n\nexport abstract class AbstractTabData {\n private readonly router = inject(Router);\n public readonly activatedRoute = inject(ActivatedRoute);\n public activeTab!: string;\n\n /**\n * Creates an observable stream that fetches and transforms data based on the current tab.\n *\n * It fetches data using the `fetchData` function with parameters obtained from `getParams`,\n * transforms the result using the `transform` function, and shares the result among subscribers.\n *\n * @template T The type of data returned by the fetchData observable.\n * @template U The type of the value emitted by the resulting observable.\n * @param fragment$ - An observable emitting the current tab identifier.\n * @param getParams - A function that returns parameters for data fetching based on the tab.\n * @param fetchData - A function that fetches data as an observable, given the parameters.\n * @param transform - A function to transform the fetched data before emission.\n * @returns An observable emitting the transformed fetched data, depending on the current tab.\n */\n private createConditionalStream<T, U>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => U,\n ): Observable<U> {\n return fragment$.pipe(switchMap((tab) => fetchData(getParams(tab)).pipe(map(transform), shareReplay(1))));\n }\n\n /**\n * Returns an observable stream of the current URL fragment, starting with the initial fragment or a default tab.\n *\n * This method listens to changes in the route fragment and emits the fragment value as a string.\n * It starts with the current fragment (or the provided default tab if none exists), filters out falsy values,\n * ensures only distinct values are emitted, and completes when the provided `destroy$` observable emits.\n *\n * @param defaultTab - The default tab to use if no fragment is present in the route snapshot.\n * @param destroy$ - An observable that signals when to complete the fragment stream.\n * @returns An observable emitting the current fragment string, updating on changes, and completing on destroy.\n */\n protected getFragmentStream(defaultTab: string, destroy$: Observable<void>): Observable<string> {\n return this.activatedRoute.fragment.pipe(\n startWith(this.activatedRoute.snapshot.fragment ?? defaultTab),\n filter((frag): frag is string => !!frag),\n map((tab) => tab),\n distinctUntilChanged(),\n takeUntil(destroy$),\n );\n }\n\n /**\n * Wraps a fragment stream and executes the provided callback on each tab change.\n *\n * @param fragment$ - The fragment observable stream.\n * @param clearFn - A function to execute when the tab changes.\n * @returns The fragment stream with a side-effect to run `clearFn` on each emission.\n */\n protected clearCacheOnTabChange(fragment$: Observable<string>, clearFn: () => void): Observable<string> {\n return fragment$.pipe(tap(() => clearFn()));\n }\n\n /**\n * Creates an observable data stream for a tab, transforming the fetched data as needed.\n *\n * @template T The type of the data fetched.\n * @template R The type of the transformed data.\n * @param fragment$ An observable emitting the current tab fragment.\n * @param getParams A function that returns fetch parameters based on the tab.\n * @param fetchData A function that fetches data given the parameters.\n * @param transform A function to transform the fetched data.\n * @returns An observable emitting the transformed data for the current tab.\n */\n public createTabDataStream<T, R>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchData: (params: any) => Observable<T>,\n transform: (data: T) => R,\n ): Observable<R> {\n return this.createConditionalStream<T, R>(fragment$, getParams, fetchData, transform);\n }\n\n /**\n * Creates an observable stream that emits a formatted count string based on the current tab and fragment.\n *\n * @template T - The type of the data returned by the fetchCount observable.\n * @param fragment$ - An observable emitting the current fragment or tab identifier.\n * @param getParams - A function that returns the parameters required for fetching the count.\n * @param fetchCount - A function that takes the parameters and returns an observable emitting the count data.\n * @param extractCount - A function that extracts the numeric count from the fetched data.\n * @param formatFn - (Optional) A function to format the count as a string. Defaults to a simple string conversion.\n * @returns An observable that emits the formatted count string whenever the fragment or parameters change.\n */\n public createCountStream<T>(\n fragment$: Observable<string>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getParams: (tab?: string) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchCount: (params: any) => Observable<T>,\n extractCount: (data: T) => number,\n formatFn: (count: number) => string = (c) => `${c}`,\n ): Observable<string> {\n return fragment$.pipe(\n switchMap((tab) =>\n fetchCount(getParams(tab)).pipe(\n map((data) => formatFn(extractCount(data))),\n shareReplay(1),\n ),\n ),\n );\n }\n\n /**\n * Handles the tab switch by updating the active tab and triggering a router fragment update.\n *\n * @param fragment - The identifier of the tab to activate.\n */\n public handleTabSwitch(fragment: string): void {\n this.activeTab = fragment;\n this.router.navigate([], {\n relativeTo: this.activatedRoute.parent,\n fragment,\n });\n }\n\n /**\n * Formats a count value, capping it at a specified maximum.\n *\n * If the count exceeds the cap, returns a string in the format \"{cap}+\".\n * Otherwise, returns the count as a string.\n *\n * @param count - The number to format.\n * @param cap - The maximum value to display before capping.\n * @returns A string representing the count, capped if necessary.\n */\n public formatCountWithCap(count: number, cap: number): string {\n return count > cap ? `${cap}+` : `${count}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIsB,eAAe,CAAA;AAClB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAChD,IAAA,SAAS;AAEhB;;;;;;;;;;;;;AAaG;AACK,IAAA,uBAAuB,CAC7B,SAA6B;;IAE7B,SAAgC;;AAEhC,IAAA,SAAyC,EACzC,SAAyB,EAAA;AAEzB,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;AAG3G;;;;;;;;;;AAUG;IACO,iBAAiB,CAAC,UAAkB,EAAE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,CAAC,QAAQ,CAAC,EAAE,EAAE;AACvB,YAAA,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM;YACtC,QAAQ;AACT,SAAA,CAAC;;AAGJ;;;;;;;;;AASG;IACI,kBAAkB,CAAC,KAAa,EAAE,GAAW,EAAA;AAClD,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,CAAA,EAAG,GAAG,CAAA,CAAA,CAAG,GAAG,CAAA,EAAG,KAAK,EAAE;;AAE9C;;AChJD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs","sources":["../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.ts","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.html","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n afterNextRender,\n inject,\n} from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IAlphagovAccessibleAutocompleteItem } from './interfaces/alphagov-accessible-autocomplete-item.interface';\nimport { AccessibleAutocompleteProps } from 'accessible-autocomplete';\nimport { Subject, pairwise, startWith, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'opal-lib-alphagov-accessible-autocomplete',\n imports: [ReactiveFormsModule],\n templateUrl: './alphagov-accessible-autocomplete.component.html',\n styleUrl: './alphagov-accessible-autocomplete.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlphagovAccessibleAutocompleteComponent implements OnInit, OnDestroy {\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) hintText!: string;\n @Input({ required: true }) autoCompleteItems: IAlphagovAccessibleAutocompleteItem[] = [];\n @Input() showAllValues = false;\n @Input({ required: false }) errors: string | null = null;\n\n @ViewChild('autocomplete') autocompleteContainer!: ElementRef<HTMLElement>;\n\n private readonly changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n private _control!: FormControl;\n private readonly ngUnsubscribe = new Subject<void>();\n public autoCompleteId!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n constructor() {\n afterNextRender(() => {\n // Only trigger the render of the component in the browser\n this.configureAutoComplete();\n });\n }\n\n /**\n * Gets the control for the alphagov-accessible-autocomplete component.\n * @returns The control for the component.\n */\n get getControl() {\n return this._control;\n }\n\n /**\n * Handles the confirmation of a selected name.\n *\n * @param selectedName - The selected name.\n * @returns void\n */\n\n private handleOnConfirm(selectedName: string | undefined): void {\n // selectedName is populated on selecting an option but is undefined onBlur, so we need to grab the input value directly from the input\n const control = this._control;\n const name = selectedName ?? (document.querySelector(`#${this.autoCompleteId}`) as HTMLInputElement).value;\n const selectedItem = this.autoCompleteItems.find((item) => item.name === name) ?? null;\n const previousValue = control.value;\n const selectedValue = selectedItem?.value ?? null;\n\n control.setValue(selectedValue);\n control.markAsTouched();\n\n // Handles initial empty state when the user clicks away from the input\n if (selectedItem === null && previousValue === null) {\n control.markAsPristine();\n } else if (selectedItem?.value !== previousValue) {\n control.markAsDirty();\n }\n\n control.updateValueAndValidity();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Retrieves the default value for the autocomplete component.\n *\n * @returns The default value as a string.\n */\n\n private getDefaultValue() {\n return this.autoCompleteItems.find((item) => item.value === this._control.value)?.name ?? '';\n }\n\n /**\n * Builds the props object for the AccessibleAutocomplete component.\n * @returns The props object for the AccessibleAutocomplete component.\n */\n private buildAutoCompleteProps(): AccessibleAutocompleteProps {\n return {\n id: this.autoCompleteId,\n element: this.autocompleteContainer.nativeElement,\n source: this.autoCompleteItems.map((item) => item.name),\n name: this.autoCompleteId,\n showAllValues: this.showAllValues,\n defaultValue: this.getDefaultValue(),\n onConfirm: (selectedName: string) => this.handleOnConfirm(selectedName),\n };\n }\n\n /**\n * Configures the auto-complete functionality using the accessible-autocomplete library.\n */\n private configureAutoComplete(): void {\n import('accessible-autocomplete').then((accessibleAutocomplete) => {\n accessibleAutocomplete.default(this.buildAutoCompleteProps());\n });\n }\n\n /**\n * Sets up the control subscription for value changes.\n * Whenever the control value changes, this method is called to handle the changes.\n * If the new value is null, it clears the autocomplete container and configures the autocomplete.\n */\n private setupControlSub(): void {\n this._control.valueChanges\n .pipe(startWith(null), pairwise(), takeUntil(this.ngUnsubscribe))\n .subscribe(([prev, next]) => {\n // If both values are null, we don't need to do anything\n if (prev === null && next === null) {\n return;\n }\n\n // Otherwise, next is null, we need to clear the autocomplete\n if (next === null) {\n this.autocompleteContainer.nativeElement.innerHTML = '';\n this.configureAutoComplete();\n }\n });\n }\n\n ngOnInit(): void {\n this.autoCompleteId = this.inputId + '-autocomplete';\n this.setupControlSub();\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input [id]=\"inputId\" [name]=\"inputName\" type=\"hid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,KAAK,EAAE;gBACE,QAAQ,EAAA,CAAA;sBAAnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACC,iBAAiB,EAAA,CAAA;sBAA3C,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAChB,aAAa,EAAA,CAAA;sBAArB;gBAC2B,MAAM,EAAA,CAAA;sBAAjC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAEC,qBAAqB,EAAA,CAAA;sBAA/C,SAAS;uBAAC,cAAc;gBAOM,OAAO,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AE1C3B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs","sources":["../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.ts","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/alphagov-accessible-autocomplete.component.html","../../../projects/opal-frontend-common/components/alphagov/alphagov-accessible-autocomplete/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n afterNextRender,\n inject,\n} from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IAlphagovAccessibleAutocompleteItem } from './interfaces/alphagov-accessible-autocomplete-item.interface';\nimport { AccessibleAutocompleteProps } from 'accessible-autocomplete';\nimport { Subject, pairwise, startWith, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'opal-lib-alphagov-accessible-autocomplete',\n imports: [ReactiveFormsModule],\n templateUrl: './alphagov-accessible-autocomplete.component.html',\n styleUrl: './alphagov-accessible-autocomplete.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlphagovAccessibleAutocompleteComponent implements OnInit, OnDestroy {\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) hintText!: string;\n @Input({ required: true }) autoCompleteItems: IAlphagovAccessibleAutocompleteItem[] = [];\n @Input() showAllValues = false;\n @Input({ required: false }) errors: string | null = null;\n\n @ViewChild('autocomplete') autocompleteContainer!: ElementRef<HTMLElement>;\n\n private readonly changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n private _control!: FormControl;\n private readonly ngUnsubscribe = new Subject<void>();\n public autoCompleteId!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n constructor() {\n afterNextRender(() => {\n // Only trigger the render of the component in the browser\n this.configureAutoComplete();\n });\n }\n\n /**\n * Gets the control for the alphagov-accessible-autocomplete component.\n * @returns The control for the component.\n */\n get getControl() {\n return this._control;\n }\n\n /**\n * Handles the confirmation of a selected name.\n *\n * @param selectedName - The selected name.\n * @returns void\n */\n\n private handleOnConfirm(selectedName: string | undefined): void {\n // selectedName is populated on selecting an option but is undefined onBlur, so we need to grab the input value directly from the input\n const control = this._control;\n const name = selectedName ?? (document.querySelector(`#${this.autoCompleteId}`) as HTMLInputElement).value;\n const selectedItem = this.autoCompleteItems.find((item) => item.name === name) ?? null;\n const previousValue = control.value;\n const selectedValue = selectedItem?.value ?? null;\n\n control.setValue(selectedValue);\n control.markAsTouched();\n\n // Handles initial empty state when the user clicks away from the input\n if (selectedItem === null && previousValue === null) {\n control.markAsPristine();\n } else if (selectedItem?.value !== previousValue) {\n control.markAsDirty();\n }\n\n control.updateValueAndValidity();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Retrieves the default value for the autocomplete component.\n *\n * @returns The default value as a string.\n */\n\n private getDefaultValue() {\n return this.autoCompleteItems.find((item) => item.value === this._control.value)?.name ?? '';\n }\n\n /**\n * Builds the props object for the AccessibleAutocomplete component.\n * @returns The props object for the AccessibleAutocomplete component.\n */\n private buildAutoCompleteProps(): AccessibleAutocompleteProps {\n return {\n id: this.autoCompleteId,\n element: this.autocompleteContainer.nativeElement,\n source: this.autoCompleteItems.map((item) => item.name),\n name: this.autoCompleteId,\n showAllValues: this.showAllValues,\n defaultValue: this.getDefaultValue(),\n onConfirm: (selectedName: string) => this.handleOnConfirm(selectedName),\n };\n }\n\n /**\n * Configures the auto-complete functionality using the accessible-autocomplete library.\n */\n private configureAutoComplete(): void {\n import('accessible-autocomplete').then((accessibleAutocomplete) => {\n accessibleAutocomplete.default(this.buildAutoCompleteProps());\n });\n }\n\n /**\n * Sets up the control subscription for value changes.\n * Whenever the control value changes, this method is called to handle the changes.\n * If the new value is null, it clears the autocomplete container and configures the autocomplete.\n */\n private setupControlSub(): void {\n this._control.valueChanges\n .pipe(startWith(null), pairwise(), takeUntil(this.ngUnsubscribe))\n .subscribe(([prev, next]) => {\n // If both values are null, we don't need to do anything\n if (prev === null && next === null) {\n return;\n }\n\n // Otherwise, next is null, we need to clear the autocomplete\n if (next === null) {\n this.autocompleteContainer.nativeElement.innerHTML = '';\n this.configureAutoComplete();\n }\n });\n }\n\n ngOnInit(): void {\n this.autoCompleteId = this.inputId + '-autocomplete';\n this.setupControlSub();\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n","<div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"!!errors\">\n <label class=\"govuk-label {{ labelClasses }}\" [for]=\"autoCompleteId\"> {{ labelText }} </label>\n @if (hintText) {\n <div id=\"{{ inputId }}-hint\" class=\"govuk-hint\">\n {{ hintText }}\n </div>\n }\n\n @if (errors) {\n <p id=\"{{ this.autoCompleteId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errors }}\n </p>\n }\n\n <div #autocomplete id=\"{{ autoCompleteId }}-container\" class=\"{{ inputClasses }}\"></div>\n <input [id]=\"inputId\" [name]=\"inputName\" type=\"hidden\" [formControl]=\"getControl\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAwBa,uCAAuC,CAAA;AACvB,IAAA,SAAS;AACR,IAAA,YAAY;AACb,IAAA,OAAO;AACP,IAAA,SAAS;AACR,IAAA,YAAY;AACZ,IAAA,QAAQ;IACT,iBAAiB,GAA0C,EAAE;IAC/E,aAAa,GAAG,KAAK;IACF,MAAM,GAAkB,IAAI;AAE7B,IAAA,qBAAqB;AAE/B,IAAA,cAAc,GAAsB,MAAM,CAAC,iBAAiB,CAAC;AACtE,IAAA,QAAQ;AACC,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AAC7C,IAAA,cAAc;IAErB,IAA+B,OAAO,CAAC,eAAuC,EAAA;;AAE5E,QAAA,IAAI,CAAC,QAAQ,GAAG,eAA8B;;AAGhD,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;;YAEnB,IAAI,CAAC,qBAAqB,EAAE;AAC9B,SAAC,CAAC;;AAGJ;;;AAGG;AACH,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,QAAQ;;AAGtB;;;;;AAKG;AAEK,IAAA,eAAe,CAAC,YAAgC,EAAA;;AAEtD,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ;AAC7B,QAAA,MAAM,IAAI,GAAG,YAAY,IAAK,QAAQ,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,cAAc,CAAA,CAAE,CAAsB,CAAC,KAAK;QAC1G,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI;AACtF,QAAA,MAAM,aAAa,GAAG,OAAO,CAAC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C,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACG,YAAY,EAAA,CAAA;sBAAvC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,QAAQ,EAAA,CAAA;sBAAnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACC,iBAAiB,EAAA,CAAA;sBAA3C,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAChB,aAAa,EAAA,CAAA;sBAArB;gBAC2B,MAAM,EAAA,CAAA;sBAAjC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAEC,qBAAqB,EAAA,CAAA;sBAA/C,SAAS;uBAAC,cAAc;gBAOM,OAAO,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AE1C3B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-accordion/govuk-accordion.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-accordion/govuk-accordion.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-accordion/hmcts-opal-frontend-common-components-govuk-govuk-accordion.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, inject, PLATFORM_ID } from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\n@Component({\n selector: 'opal-lib-govuk-accordion',\n imports: [CommonModule],\n templateUrl: './govuk-accordion.component.html',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukAccordionComponent implements AfterViewInit {\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Lifecycle hook that is called after Angular has fully initialized the component's view.\n * It is called only once after the first ngAfterContentChecked.\n * We use it to initialize the govuk-frontend component.\n */\n ngAfterViewInit() {\n if (isPlatformBrowser(this.platformId)) {\n import('govuk-frontend').then((govuk) => {\n govuk.initAll();\n });\n }\n }\n}\n","<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-default\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-1\"> Writing well for the web </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-1\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-1\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for the web.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-2\">\n Writing well for specialists\n </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-2\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-2\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for specialists.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-3\"> Know your audience </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-3\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-3\"\n >\n <p class=\"govuk-body\">This is the content for Know your audience.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-4\"> How people read </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-4\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-4\"\n >\n <p class=\"govuk-body\">This is the content for How people read.</p>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,uBAAuB,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEjD;;;;AAIG;IACH,eAAe,GAAA;AACb,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,OAAO,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAI;gBACtC,KAAK,CAAC,OAAO,EAAE;AACjB,aAAC,CAAC;;;wGAZK,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTpC,01EA4DA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDxDY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,WAC3B,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-accordion/govuk-accordion.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-accordion/govuk-accordion.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-accordion/hmcts-opal-frontend-common-components-govuk-govuk-accordion.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, inject, PLATFORM_ID } from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\n@Component({\n selector: 'opal-lib-govuk-accordion',\n imports: [CommonModule],\n templateUrl: './govuk-accordion.component.html',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukAccordionComponent implements AfterViewInit {\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Lifecycle hook that is called after Angular has fully initialized the component's view.\n * It is called only once after the first ngAfterContentChecked.\n * We use it to initialize the govuk-frontend component.\n */\n ngAfterViewInit() {\n if (isPlatformBrowser(this.platformId)) {\n import('govuk-frontend').then((govuk) => {\n govuk.initAll();\n });\n }\n }\n}\n","<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-default\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-1\"> Writing well for the web </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-1\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-1\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for the web.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-2\">\n Writing well for specialists\n </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-2\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-2\"\n >\n <p class=\"govuk-body\">This is the content for Writing well for specialists.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-3\"> Know your audience </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-3\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-3\"\n >\n <p class=\"govuk-body\">This is the content for Know your audience.</p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-default-heading-4\"> How people read </span>\n </h2>\n </div>\n <div\n id=\"accordion-default-content-4\"\n class=\"govuk-accordion__section-content\"\n aria-labelledby=\"accordion-default-heading-4\"\n >\n <p class=\"govuk-body\">This is the content for How people read.</p>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,uBAAuB,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEjD;;;;AAIG;IACH,eAAe,GAAA;AACb,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,OAAO,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAI;gBACtC,KAAK,CAAC,OAAO,EAAE;AACjB,aAAC,CAAC;;;wGAZK,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTpC,01EA4DA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDxDY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,WAC3B,CAAC,YAAY,CAAC,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,01EAAA,EAAA;;;AEPjD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-back-link/govuk-back-link.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-back-link/govuk-back-link.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-back-link/hmcts-opal-frontend-common-components-govuk-govuk-back-link.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-back-link',\n imports: [],\n templateUrl: './govuk-back-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukBackLinkComponent {\n @Output() clickEvent = new EventEmitter<Event>();\n\n /**\n * Handles the back navigation for the component by emitting an event.\n * This method prevents the default action of the event.\n *\n * @param {Event} event - The event object representing the user's action.\n */\n public onBack(event: Event): void {\n event.preventDefault();\n this.clickEvent.emit(event);\n }\n}\n","<a href=\"#\" class=\"govuk-back-link\" (click)=\"onBack($event)\">Back</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,sBAAsB,CAAA;AACvB,IAAA,UAAU,GAAG,IAAI,YAAY,EAAS;AAEhD;;;;;AAKG;AACI,IAAA,MAAM,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;;wGAXlB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,2HCRnC,+EACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDOa,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-back-link/govuk-back-link.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-back-link/govuk-back-link.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-back-link/hmcts-opal-frontend-common-components-govuk-govuk-back-link.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-back-link',\n imports: [],\n templateUrl: './govuk-back-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukBackLinkComponent {\n @Output() clickEvent = new EventEmitter<Event>();\n\n /**\n * Handles the back navigation for the component by emitting an event.\n * This method prevents the default action of the event.\n *\n * @param {Event} event - The event object representing the user's action.\n */\n public onBack(event: Event): void {\n event.preventDefault();\n this.clickEvent.emit(event);\n }\n}\n","<a href=\"#\" class=\"govuk-back-link\" (click)=\"onBack($event)\">Back</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,sBAAsB,CAAA;AACvB,IAAA,UAAU,GAAG,IAAI,YAAY,EAAS;AAEhD;;;;;AAKG;AACI,IAAA,MAAM,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;;wGAXlB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,2HCRnC,+EACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDOa,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,OAAA,EAC3B,EAAE,EAAA,eAAA,EAEM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+EAAA,EAAA;8BAGrC,UAAU,EAAA,CAAA;sBAAnB;;;AETH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-button.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-button/govuk-button.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-button/govuk-button.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-button/hmcts-opal-frontend-common-components-govuk-govuk-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'opal-lib-govuk-button',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukButtonComponent {\n @Input({ required: true }) buttonId!: string;\n @Input({ required: false }) type = 'button';\n @Input({ required: false }) buttonClasses!: string;\n\n @Output() buttonClickEvent = new EventEmitter<boolean>();\n\n /**\n * Handles the button click event.\n */\n public handleButtonClick(): void {\n this.buttonClickEvent.emit(true);\n }\n}\n","<button\n [id]=\"buttonId\"\n [type]=\"type\"\n class=\"govuk-button {{ buttonClasses }}\"\n data-module=\"govuk-button\"\n (click)=\"handleButtonClick()\"\n>\n <ng-content></ng-content>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,oBAAoB,CAAA;AACJ,IAAA,QAAQ;IACP,IAAI,GAAG,QAAQ;AACf,IAAA,aAAa;AAE/B,IAAA,gBAAgB,GAAG,IAAI,YAAY,EAAW;AAExD;;AAEG;IACI,iBAAiB,GAAA;AACtB,QAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;;wGAXvB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-button.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-button/govuk-button.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-button/govuk-button.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-button/hmcts-opal-frontend-common-components-govuk-govuk-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'opal-lib-govuk-button',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukButtonComponent {\n @Input({ required: true }) buttonId!: string;\n @Input({ required: false }) type = 'button';\n @Input({ required: false }) buttonClasses!: string;\n\n @Output() buttonClickEvent = new EventEmitter<boolean>();\n\n /**\n * Handles the button click event.\n */\n public handleButtonClick(): void {\n this.buttonClickEvent.emit(true);\n }\n}\n","<button\n [id]=\"buttonId\"\n [type]=\"type\"\n class=\"govuk-button {{ buttonClasses }}\"\n data-module=\"govuk-button\"\n (click)=\"handleButtonClick()\"\n>\n <ng-content></ng-content>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,oBAAoB,CAAA;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C,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAEhB,gBAAgB,EAAA,CAAA;sBAAzB;;;AEfH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/govuk-cancel-link.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/govuk-cancel-link.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-cancel-link',\n imports: [],\n templateUrl: './govuk-cancel-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCancelLinkComponent {\n @Input({ required: false }) cancelLinkText = 'Cancel';\n @Output() linkClickEvent = new EventEmitter<boolean>();\n\n /**\n * Handles the button click event.\n */\n public handleClick(): void {\n this.linkClickEvent.emit(true);\n }\n}\n","<a (keyup.enter)=\"handleClick()\" (click)=\"handleClick()\" class=\"govuk-link button-link\" role=\"link\" tabindex=\"0\">{{\n cancelLinkText\n}}</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,wBAAwB,CAAA;IACP,cAAc,GAAG,QAAQ;AAC3C,IAAA,cAAc,GAAG,IAAI,YAAY,EAAW;AAEtD;;AAEG;IACI,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;wGARrB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,mLCRrC,2JAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDKa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/govuk-cancel-link.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/govuk-cancel-link.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-cancel-link/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-cancel-link',\n imports: [],\n templateUrl: './govuk-cancel-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCancelLinkComponent {\n @Input({ required: false }) cancelLinkText = 'Cancel';\n @Output() linkClickEvent = new EventEmitter<boolean>();\n\n /**\n * Handles the button click event.\n */\n public handleClick(): void {\n this.linkClickEvent.emit(true);\n }\n}\n","<a (keyup.enter)=\"handleClick()\" (click)=\"handleClick()\" class=\"govuk-link button-link\" role=\"link\" tabindex=\"0\">{{\n cancelLinkText\n}}</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,wBAAwB,CAAA;IACP,cAAc,GAAG,QAAQ;AAC3C,IAAA,cAAc,GAAG,IAAI,YAAY,EAAW;AAEtD;;AAEG;IACI,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;wGARrB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,mLCRrC,2JAGA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDKa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAAA,OAAA,EAC7B,EAAE,EAAA,eAAA,EAEM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2JAAA,EAAA;8BAGnB,cAAc,EAAA,CAAA;sBAAzC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAChB,cAAc,EAAA,CAAA;sBAAvB;;;AEVH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-conditional/govuk-checkboxes-conditional.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-conditional/govuk-checkboxes-conditional.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-divider/govuk-checkboxes-divider.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-divider/govuk-checkboxes-divider.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-item/govuk-checkboxes-item.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-item/govuk-checkboxes-item.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-conditional, [opal-lib-govuk-checkboxes-conditional]',\n imports: [],\n templateUrl: './govuk-checkboxes-conditional.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesConditionalComponent implements OnInit {\n @Input({ required: true }) conditionalId!: string;\n\n @HostBinding('class') class = 'govuk-checkboxes__conditional';\n @HostBinding('id') id!: string;\n\n ngOnInit() {\n this.id = `${this.conditionalId}-conditional`;\n }\n}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-divider',\n imports: [],\n templateUrl: './govuk-checkboxes-divider.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesDividerComponent {}\n","<div class=\"govuk-checkboxes__divider\"><ng-content></ng-content></div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-item, [opal-lib-govuk-checkboxes-item]',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-checkboxes-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesItemComponent {\n private _control!: FormControl;\n\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) ariaControls!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n @HostBinding('class') class = 'govuk-checkboxes__item';\n\n get getControl() {\n return this._control;\n }\n}\n","<input\n class=\"govuk-checkboxes__input {{ inputClasses }}\"\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"checkbox\"\n [formControl]=\"getControl\"\n [attr.data-aria-controls]=\"ariaControls\"\n/>\n\n<label class=\"govuk-label govuk-checkboxes__label {{ labelClasses }}\" [for]=\"inputId\"> {{ labelText }} </label>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes',\n imports: [CommonModule],\n templateUrl: './govuk-checkboxes.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesComponent {\n @Input({ required: true }) fieldSetId!: string;\n\n @Input({ required: true }) legendText!: string;\n @Input({ required: false }) legendHint!: string;\n @Input({ required: false }) legendClasses!: string;\n @Input({ required: false }) checkboxClasses!: string;\n}\n","<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" [id]=\"fieldSetId\" [attr.aria-describedby]=\"fieldSetId\">\n <legend class=\"govuk-fieldset__legend {{ legendClasses }}\" [attr.describedby]=\"fieldSetId\">\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n\n <div class=\"govuk-checkboxes {{ checkboxClasses }}\" data-module=\"govuk-checkboxes\">\n <ng-content></ng-content>\n </div>\n </fieldset>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAQa,mCAAmC,CAAA;AACnB,IAAA,aAAa;IAElB,KAAK,GAAG,+BAA+B;AAC1C,IAAA,EAAE;IAErB,QAAQ,GAAA;QACN,IAAI,CAAC,EAAE,GAAG,CAAA,EAAG,IAAI,CAAC,aAAa,cAAc;;wGAPpC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mCAAmC,wPCRhD,6BACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDOa,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAN/C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gFAAgF,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-conditional/govuk-checkboxes-conditional.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-conditional/govuk-checkboxes-conditional.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-divider/govuk-checkboxes-divider.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-divider/govuk-checkboxes-divider.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-item/govuk-checkboxes-item.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes-item/govuk-checkboxes-item.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/govuk-checkboxes.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-checkboxes/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-conditional, [opal-lib-govuk-checkboxes-conditional]',\n imports: [],\n templateUrl: './govuk-checkboxes-conditional.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesConditionalComponent implements OnInit {\n @Input({ required: true }) conditionalId!: string;\n\n @HostBinding('class') class = 'govuk-checkboxes__conditional';\n @HostBinding('id') id!: string;\n\n ngOnInit() {\n this.id = `${this.conditionalId}-conditional`;\n }\n}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-divider',\n imports: [],\n templateUrl: './govuk-checkboxes-divider.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesDividerComponent {}\n","<div class=\"govuk-checkboxes__divider\"><ng-content></ng-content></div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';\nimport { FormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes-item, [opal-lib-govuk-checkboxes-item]',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-checkboxes-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesItemComponent {\n private _control!: FormControl;\n\n @Input({ required: true }) labelText!: string;\n @Input({ required: false }) labelClasses!: string;\n @Input({ required: true }) inputId!: string;\n @Input({ required: true }) inputName!: string;\n @Input({ required: false }) inputClasses!: string;\n @Input({ required: false }) ariaControls!: string;\n\n @Input({ required: true }) set control(abstractControl: AbstractControl | null) {\n // Form controls are passed in as abstract controls, we need to re-cast it.\n this._control = abstractControl as FormControl;\n }\n\n @HostBinding('class') class = 'govuk-checkboxes__item';\n\n get getControl() {\n return this._control;\n }\n}\n","<input\n class=\"govuk-checkboxes__input {{ inputClasses }}\"\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"checkbox\"\n [formControl]=\"getControl\"\n [attr.data-aria-controls]=\"ariaControls\"\n/>\n\n<label class=\"govuk-label govuk-checkboxes__label {{ labelClasses }}\" [for]=\"inputId\"> {{ labelText }} </label>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-checkboxes',\n imports: [CommonModule],\n templateUrl: './govuk-checkboxes.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukCheckboxesComponent {\n @Input({ required: true }) fieldSetId!: string;\n\n @Input({ required: true }) legendText!: string;\n @Input({ required: false }) legendHint!: string;\n @Input({ required: false }) legendClasses!: string;\n @Input({ required: false }) checkboxClasses!: string;\n}\n","<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" [id]=\"fieldSetId\" [attr.aria-describedby]=\"fieldSetId\">\n <legend class=\"govuk-fieldset__legend {{ legendClasses }}\" [attr.describedby]=\"fieldSetId\">\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n\n <div class=\"govuk-checkboxes {{ checkboxClasses }}\" data-module=\"govuk-checkboxes\">\n <ng-content></ng-content>\n </div>\n </fieldset>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAQa,mCAAmC,CAAA;AACnB,IAAA,aAAa;IAElB,KAAK,GAAG,+BAA+B;AAC1C,IAAA,EAAE;IAErB,QAAQ,GAAA;QACN,IAAI,CAAC,EAAE,GAAG,CAAA,EAAG,IAAI,CAAC,aAAa,cAAc;;wGAPpC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mCAAmC,wPCRhD,6BACA,EAAA,eAAA,E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AA,EAAA,EAAA,EAAA,QAAA,ECTrC,6kBAgBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDXY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIX,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,WAC5B,CAAC,YAAY,CAAC,EAAA,eAAA,EAEN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6kBAAA,EAAA;8BAGpB,UAAU,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAEE,UAAU,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACG,UAAU,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,aAAa,EAAA,CAAA;sBAAxC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,eAAe,EAAA,CAAA;sBAA1C,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AEf5B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-date-input/govuk-date-input.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-date-input/govuk-date-input.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-date-input/hmcts-opal-frontend-common-components-govuk-govuk-date-input.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormGroup, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IGovUkDateInput } from './interfaces/govuk-date-input.interface';\n\n@Component({\n selector: 'opal-lib-govuk-date-input',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-date-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukDateInputComponent {\n private _group!: FormGroup;\n\n @Input({ required: true }) fieldSetId!: string;\n\n @Input({ required: true }) legendText!: string;\n @Input({ required: false }) legendHint!: string;\n @Input({ required: false }) legendClasses!: string;\n\n @Input({ required: false }) errorDay: string | null = null;\n @Input({ required: false }) errorMonth: string | null = null;\n @Input({ required: false }) errorYear: string | null = null;\n\n @Input({ required: true }) dateInputs!: IGovUkDateInput;\n @Input({ required: true }) set group(abstractControl: AbstractControl | null) {\n this._group = abstractControl as FormGroup;\n }\n\n get getGroup() {\n return this._group;\n }\n}\n","<div\n class=\"govuk-form-group\"\n [formGroup]=\"getGroup\"\n [class.govuk-form-group--error]=\"!!errorDay || !!errorMonth || !!errorYear\"\n>\n <fieldset class=\"govuk-fieldset\" role=\"group\" [id]=\"fieldSetId\">\n <legend\n class=\"govuk-fieldset__legend {{ legendClasses }}\"\n [attr.describedby]=\"legendHint ? fieldSetId + 'Hint' : ''\"\n >\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n @if (errorDay || errorMonth || errorYear) {\n <p id=\"{{ this.fieldSetId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errorDay || errorMonth || errorYear }}\n </p>\n }\n <div class=\"govuk-date-input\" id=\"passport-issued\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.day.inputId\">\n {{ dateInputs.day.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.day.inputClasses }}\"\n [class.govuk-input--error]=\"errorDay && errorDay !== null\"\n [id]=\"dateInputs.day.inputId\"\n [name]=\"dateInputs.day.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.day.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.month.inputId\">\n {{ dateInputs.month.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.month.inputClasses }}\"\n [class.govuk-input--error]=\"errorMonth && errorMonth !== null\"\n [id]=\"dateInputs.month.inputId\"\n [name]=\"dateInputs.month.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.month.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.year.inputId\">\n {{ dateInputs.year.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.year.inputClasses }}\"\n [class.govuk-input--error]=\"errorYear && errorYear !== null\"\n [id]=\"dateInputs.year.inputId\"\n [name]=\"dateInputs.year.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.year.inputId }}\"\n />\n </div>\n </div>\n </div>\n </fieldset>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,uBAAuB,CAAA;AAC1B,IAAA,MAAM;AAEa,IAAA,UAAU;AAEV,IAAA,UAAU;AACT,IAAA,UAAU;AACV,IAAA,aAAa;IAEb,QAAQ,GAAkB,IAAI;IAC9B,UAAU,GAAkB,IAAI;IAChC,SAAS,GAAkB,IAAI;AAEhC,IAAA,UAAU;IACrC,IAA+B,KAAK,CAAC,eAAuC,EAAA;AAC1E,QAAA,IAAI,CAAC,MAAM,GAAG,eAA4B;;AAG5C,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,MAAM;;wGAnBT,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-date-input/govuk-date-input.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-date-input/govuk-date-input.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-date-input/hmcts-opal-frontend-common-components-govuk-govuk-date-input.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormGroup, AbstractControl, ReactiveFormsModule } from '@angular/forms';\nimport { IGovUkDateInput } from './interfaces/govuk-date-input.interface';\n\n@Component({\n selector: 'opal-lib-govuk-date-input',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './govuk-date-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukDateInputComponent {\n private _group!: FormGroup;\n\n @Input({ required: true }) fieldSetId!: string;\n\n @Input({ required: true }) legendText!: string;\n @Input({ required: false }) legendHint!: string;\n @Input({ required: false }) legendClasses!: string;\n\n @Input({ required: false }) errorDay: string | null = null;\n @Input({ required: false }) errorMonth: string | null = null;\n @Input({ required: false }) errorYear: string | null = null;\n\n @Input({ required: true }) dateInputs!: IGovUkDateInput;\n @Input({ required: true }) set group(abstractControl: AbstractControl | null) {\n this._group = abstractControl as FormGroup;\n }\n\n get getGroup() {\n return this._group;\n }\n}\n","<div\n class=\"govuk-form-group\"\n [formGroup]=\"getGroup\"\n [class.govuk-form-group--error]=\"!!errorDay || !!errorMonth || !!errorYear\"\n>\n <fieldset class=\"govuk-fieldset\" role=\"group\" [id]=\"fieldSetId\">\n <legend\n class=\"govuk-fieldset__legend {{ legendClasses }}\"\n [attr.describedby]=\"legendHint ? fieldSetId + 'Hint' : ''\"\n >\n {{ legendText }}\n </legend>\n @if (legendHint) {\n <div [id]=\"fieldSetId ? fieldSetId + 'Hint' : ''\" class=\"govuk-hint\">\n {{ legendHint }}\n </div>\n }\n @if (errorDay || errorMonth || errorYear) {\n <p id=\"{{ this.fieldSetId }}-error-message\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error: </span> {{ errorDay || errorMonth || errorYear }}\n </p>\n }\n <div class=\"govuk-date-input\" id=\"passport-issued\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.day.inputId\">\n {{ dateInputs.day.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.day.inputClasses }}\"\n [class.govuk-input--error]=\"errorDay && errorDay !== null\"\n [id]=\"dateInputs.day.inputId\"\n [name]=\"dateInputs.day.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.day.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.month.inputId\">\n {{ dateInputs.month.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.month.inputClasses }}\"\n [class.govuk-input--error]=\"errorMonth && errorMonth !== null\"\n [id]=\"dateInputs.month.inputId\"\n [name]=\"dateInputs.month.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.month.inputId }}\"\n />\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"dateInputs.year.inputId\">\n {{ dateInputs.year.inputLabel }}\n </label>\n <input\n class=\"govuk-input govuk-date-input__input {{ dateInputs.year.inputClasses }}\"\n [class.govuk-input--error]=\"errorYear && errorYear !== null\"\n [id]=\"dateInputs.year.inputId\"\n [name]=\"dateInputs.year.inputName\"\n type=\"text\"\n inputmode=\"numeric\"\n formControlName=\"{{ dateInputs.year.inputId }}\"\n />\n </div>\n </div>\n </div>\n </fieldset>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,uBAAuB,CAAA;AAC1B,IAAA,MAAM;AAEa,IAAA,UAAU;AAEV,IAAA,UAAU;AACT,IAAA,UAAU;AACV,IAAA,aAAa;IAEb,QAAQ,GAAkB,IAAI;IAC9B,UAAU,GAAkB,IAAI;IAChC,SAAS,GAAkB,IAAI;AAEhC,IAAA,UAAU;IACrC,IAA+B,KAAK,CAAC,eAAuC,EAAA;AAC1E,QAAA,IAAI,CAAC,MAAM,GAAG,eAA4B;;AAG5C,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,MAAM;;wGAnBT,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,aAAA,EAAA,eAAA,EAAA,QAAA,EAAA,UAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXpC,y9FA0EA,EAAA,YAAA,EAAA,CAAA,EAAA,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,EAAE,KAAK,EAAE;gBACE,aAAa,EAAA,CAAA;sBAAxC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAEE,QAAQ,EAAA,CAAA;sBAAnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,UAAU,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,SAAS,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAEC,UAAU,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACM,KAAK,EAAA,CAAA;sBAAnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AEzB3B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-details.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-details/govuk-details.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-details/govuk-details.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-details/hmcts-opal-frontend-common-components-govuk-govuk-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-details',\n imports: [],\n templateUrl: './govuk-details.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukDetailsComponent {\n @Input({ required: true }) summaryText!: string;\n}\n","<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\"> {{ summaryText }} </span>\n </summary>\n <div class=\"govuk-details__text\">\n <ng-content></ng-content>\n </div>\n</details>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,qBAAqB,CAAA;AACL,IAAA,WAAW;wGAD3B,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,0HCRlC,yQAQA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDAa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-details.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-details/govuk-details.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-details/govuk-details.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-details/hmcts-opal-frontend-common-components-govuk-govuk-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-details',\n imports: [],\n templateUrl: './govuk-details.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukDetailsComponent {\n @Input({ required: true }) summaryText!: string;\n}\n","<details class=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\"> {{ summaryText }} </span>\n </summary>\n <div class=\"govuk-details__text\">\n <ng-content></ng-content>\n </div>\n</details>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,qBAAqB,CAAA;AACL,IAAA,WAAW;wGAD3B,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,0HCRlC,yQAQA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDAa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,OAAA,EACzB,EAAE,EAAA,eAAA,EAEM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yQAAA,EAAA;8BAGpB,WAAW,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AET3B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-footer/govuk-footer.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-footer/govuk-footer.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-footer/hmcts-opal-frontend-common-components-govuk-govuk-footer.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IGovukFooterLinks } from './interfaces/govuk-footer-links.interface';\n\n@Component({\n selector: 'opal-lib-govuk-footer',\n imports: [CommonModule],\n templateUrl: './govuk-footer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukFooterComponent {\n @Input() public footerLinks!: IGovukFooterLinks;\n}\n","<footer class=\"govuk-footer\" role=\"contentinfo\">\n <div class=\"govuk-width-container\">\n <div class=\"govuk-footer__meta\">\n <div class=\"govuk-footer__meta-item govuk-footer__meta-item--grow\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-footer__licence-logo\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 483.2 195.7\"\n height=\"17\"\n width=\"41\"\n >\n <path\n fill=\"currentColor\"\n d=\"M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145\"\n />\n </svg>\n <span class=\"govuk-footer__licence-description\">\n All content is available under the\n <a class=\"govuk-footer__link\" [href]=\"footerLinks.licenseLink\" rel=\"license\"\n >Open Government Licence v{{ footerLinks.licenseVersion }}</a\n >, except where otherwise stated\n </span>\n </div>\n <div class=\"govuk-footer__meta-item\">\n <a class=\"govuk-footer__link govuk-footer__copyright-logo\" [href]=\"footerLinks.copyrightLink\"\n >© Crown copyright</a\n >\n </div>\n </div>\n </div>\n</footer>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAUa,oBAAoB,CAAA;AACf,IAAA,WAAW;wGADhB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVjC,ylDAiCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,WACxB,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-footer/govuk-footer.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-footer/govuk-footer.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-footer/hmcts-opal-frontend-common-components-govuk-govuk-footer.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IGovukFooterLinks } from './interfaces/govuk-footer-links.interface';\n\n@Component({\n selector: 'opal-lib-govuk-footer',\n imports: [CommonModule],\n templateUrl: './govuk-footer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukFooterComponent {\n @Input() public footerLinks!: IGovukFooterLinks;\n}\n","<footer class=\"govuk-footer\" role=\"contentinfo\">\n <div class=\"govuk-width-container\">\n <div class=\"govuk-footer__meta\">\n <div class=\"govuk-footer__meta-item govuk-footer__meta-item--grow\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-footer__licence-logo\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 483.2 195.7\"\n height=\"17\"\n width=\"41\"\n >\n <path\n fill=\"currentColor\"\n d=\"M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145\"\n />\n </svg>\n <span class=\"govuk-footer__licence-description\">\n All content is available under the\n <a class=\"govuk-footer__link\" [href]=\"footerLinks.licenseLink\" rel=\"license\"\n >Open Government Licence v{{ footerLinks.licenseVersion }}</a\n >, except where otherwise stated\n </span>\n </div>\n <div class=\"govuk-footer__meta-item\">\n <a class=\"govuk-footer__link govuk-footer__copyright-logo\" [href]=\"footerLinks.copyrightLink\"\n >© Crown copyright</a\n >\n </div>\n </div>\n </div>\n</footer>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAUa,oBAAoB,CAAA;AACf,IAAA,WAAW;wGADhB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVjC,ylDAiCA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BY,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,WACxB,CAAC,YAAY,CAAC,EAAA,eAAA,EAEN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ylDAAA,EAAA;8BAG/B,WAAW,EAAA,CAAA;sBAA1B;;;AEXH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-header.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header-navigation-item/govuk-header-navigation-item.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header-navigation-item/govuk-header-navigation-item.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-header/hmcts-opal-frontend-common-components-govuk-govuk-header.ts"],"sourcesContent":["import { Component, EventEmitter, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-header-navigation-item',\n imports: [],\n templateUrl: './govuk-header-navigation-item.component.html',\n styleUrl: './govuk-header-navigation-item.component.scss',\n})\nexport class GovukHeaderNavigationItemComponent {\n @Output() public actionClick = new EventEmitter<boolean>();\n\n /**\n * Handles the click event for the action button.\n * @param event - The click event.\n */\n handleClick(event: Event): void {\n event.preventDefault();\n this.actionClick.emit(true);\n }\n}\n","<a\n href=\"#\"\n class=\"govuk-link govuk-link--inverse sign-in-link cursor-pointer\"\n (click)=\"handleClick($event)\"\n (keyup.enter)=\"handleClick($event)\"\n role=\"link\"\n tabindex=\"0\"\n href=\"#\"\n>\n <ng-content select=\"[linkText]\"></ng-content>\n</a>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { IGovukHeaderLinks } from './interfaces/govuk-header-links.interface';\n@Component({\n selector: 'opal-lib-govuk-header',\n imports: [CommonModule, RouterLink],\n templateUrl: './govuk-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukHeaderComponent {\n @Input() public headerLinks!: IGovukHeaderLinks;\n}\n","<header class=\"govuk-header\" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a [href]=\"headerLinks.govukLink\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <!--[if gt IE 8]><!-->\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.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.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n </svg>\n <!--<![endif]-->\n <!--[if IE 8]>\n <img\n src=\"/assets/images/govuk-logotype-crown.png\"\n class=\"govuk-header__logotype-crown-fallback-image\"\n width=\"36\"\n height=\"32\"\n alt=\"\"\n />\n <![endif]-->\n <span class=\"govuk-header__logotype-text\">\n <ng-content select=\"[organisationName]\"></ng-content>\n </span>\n </span>\n </a>\n </div>\n <div class=\"govuk-header__content\">\n @if (headerLinks.serviceLink) {\n <a [routerLink]=\"headerLinks.serviceLink\" class=\"govuk-header__link govuk-header__service-name\">\n <ng-content select=\"[serviceName]\"></ng-content>\n </a>\n } @else {\n <span class=\"govuk-header__service-name\">\n <ng-content select=\"[serviceName]\"></ng-content>\n </span>\n }\n\n <ng-content></ng-content>\n </div>\n </div>\n</header>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,kCAAkC,CAAA;AAC5B,IAAA,WAAW,GAAG,IAAI,YAAY,EAAW;AAE1D;;;AAGG;AACH,IAAA,WAAW,CAAC,KAAY,EAAA;QACtB,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;;wGATlB,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kCAAkC,0ICR/C,qRAWA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA,CAAA;;4FDHa,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAN9C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uCAAuC,WACxC,EAAE,EAAA,QAAA,EAAA,qRAAA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA;8BAKM,WAAW,EAAA,CAAA;sBAA3B;;;MECU,oBAAoB,CAAA;AACf,IAAA,WAAW;wGADhB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-header.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header-navigation-item/govuk-header-navigation-item.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header-navigation-item/govuk-header-navigation-item.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-header/govuk-header.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-header/hmcts-opal-frontend-common-components-govuk-govuk-header.ts"],"sourcesContent":["import { Component, EventEmitter, Output } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-header-navigation-item',\n imports: [],\n templateUrl: './govuk-header-navigation-item.component.html',\n styleUrl: './govuk-header-navigation-item.component.scss',\n})\nexport class GovukHeaderNavigationItemComponent {\n @Output() public actionClick = new EventEmitter<boolean>();\n\n /**\n * Handles the click event for the action button.\n * @param event - The click event.\n */\n handleClick(event: Event): void {\n event.preventDefault();\n this.actionClick.emit(true);\n }\n}\n","<a\n href=\"#\"\n class=\"govuk-link govuk-link--inverse sign-in-link cursor-pointer\"\n (click)=\"handleClick($event)\"\n (keyup.enter)=\"handleClick($event)\"\n role=\"link\"\n tabindex=\"0\"\n href=\"#\"\n>\n <ng-content select=\"[linkText]\"></ng-content>\n</a>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { IGovukHeaderLinks } from './interfaces/govuk-header-links.interface';\n@Component({\n selector: 'opal-lib-govuk-header',\n imports: [CommonModule, RouterLink],\n templateUrl: './govuk-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukHeaderComponent {\n @Input() public headerLinks!: IGovukHeaderLinks;\n}\n","<header class=\"govuk-header\" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a [href]=\"headerLinks.govukLink\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <!--[if gt IE 8]><!-->\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c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3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n </svg>\n <!--<![endif]-->\n <!--[if IE 8]>\n <img\n src=\"/assets/images/govuk-logotype-crown.png\"\n class=\"govuk-header__logotype-crown-fallback-image\"\n width=\"36\"\n height=\"32\"\n alt=\"\"\n />\n <![endif]-->\n <span class=\"govuk-header__logotype-text\">\n <ng-content select=\"[organisationName]\"></ng-content>\n </span>\n </span>\n </a>\n </div>\n <div class=\"govuk-header__content\">\n @if (headerLinks.serviceLink) {\n <a [routerLink]=\"headerLinks.serviceLink\" class=\"govuk-header__link govuk-header__service-name\">\n <ng-content select=\"[serviceName]\"></ng-content>\n </a>\n } @else {\n <span class=\"govuk-header__service-name\">\n <ng-content select=\"[serviceName]\"></ng-content>\n </span>\n }\n\n <ng-content></ng-content>\n </div>\n </div>\n</header>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,kCAAkC,CAAA;AAC5B,IAAA,WAAW,GAAG,IAAI,YAAY,EAAW;AAE1D;;;AAGG;AACH,IAAA,WAAW,CAAC,KAAY,EAAA;QACtB,KAAK,CAAC,cAAc,EAAE;AACtB,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;;wGATlB,kCAAkC,EAAA,IAAA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,CAAA,MAAA,EAAA,CAAA;;4FAIvB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;+BACE,uBAAuB,EAAA,OAAA,EACxB,CAAC,YAAY,EAAE,UAAU,CAAC,EAAA,eAAA,EAElB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4sHAAA,EAAA;8BAG/B,WAAW,EAAA,CAAA;sBAA1B;;;AEXH;;AAEG;;;;"}
|
package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/govuk-heading-with-caption.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/govuk-heading-with-caption.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-heading-with-caption',\n imports: [],\n templateUrl: './govuk-heading-with-caption.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukHeadingWithCaptionComponent {\n @Input({ required: true }) captionText!: string;\n @Input({ required: true }) headingText!: string;\n @Input({ required: false }) headingClasses: string = 'govuk-heading-l';\n @Input({ required: false }) captionClasses: string = 'govuk-caption-l';\n}\n","<span class=\"{{ captionClasses }}\">{{ captionText }}</span>\n<h1 class=\"{{ headingClasses }}\">{{ headingText }}</h1>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,gCAAgC,CAAA;AAChB,IAAA,WAAW;AACX,IAAA,WAAW;IACV,cAAc,GAAW,iBAAiB;IAC1C,cAAc,GAAW,iBAAiB;wGAJ3D,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gCAAgC,uOCR7C,4HAEA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDMa,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAN5C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qCAAqC,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/govuk-heading-with-caption.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/govuk-heading-with-caption.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-heading-with-caption/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-govuk-heading-with-caption',\n imports: [],\n templateUrl: './govuk-heading-with-caption.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukHeadingWithCaptionComponent {\n @Input({ required: true }) captionText!: string;\n @Input({ required: true }) headingText!: string;\n @Input({ required: false }) headingClasses: string = 'govuk-heading-l';\n @Input({ required: false }) captionClasses: string = 'govuk-caption-l';\n}\n","<span class=\"{{ captionClasses }}\">{{ captionText }}</span>\n<h1 class=\"{{ headingClasses }}\">{{ headingText }}</h1>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAQa,gCAAgC,CAAA;AAChB,IAAA,WAAW;AACX,IAAA,WAAW;IACV,cAAc,GAAW,iBAAiB;IAC1C,cAAc,GAAW,iBAAiB;wGAJ3D,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gCAAgC,uOCR7C,4HAEA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDMa,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAN5C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qCAAqC,EAAA,OAAA,EACtC,EAAE,EAAA,eAAA,EAEM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4HAAA,EAAA;8BAGpB,WAAW,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACE,WAAW,EAAA,CAAA;sBAArC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACG,cAAc,EAAA,CAAA;sBAAzC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,cAAc,EAAA,CAAA;sBAAzC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AEZ5B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-pagination/govuk-pagination.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-pagination/govuk-pagination.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-pagination/hmcts-opal-frontend-common-components-govuk-govuk-pagination.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'opal-lib-govuk-pagination',\n imports: [CommonModule],\n templateUrl: './govuk-pagination.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukPaginationComponent implements OnChanges {\n @Input() currentPage = 1;\n @Input() total = 0;\n @Input() limit = 25;\n @Output() changePage = new EventEmitter<number>();\n\n public pages = signal<number[]>([]);\n public elipsedPages = signal<(number | string)[]>([]);\n public ELIPSIS = '...';\n\n /**\n * Lifecycle hook that is called when any data-bound property of the component changes.\n * It recalculates the pages for pagination.\n */\n ngOnChanges(): void {\n this.calculatePages();\n }\n\n /**\n * Handles the page change event.\n *\n * @param $event - The click event that triggered the page change.\n * @param page - The new page number.\n */\n onPageChanged($event: MouseEvent, page: number) {\n $event.preventDefault();\n this.changePage.emit(page);\n }\n\n /**\n * Calculates the number of pages based on the total number of items and the limit per page.\n * Updates the `pages` and `elipsedPages` properties accordingly.\n */\n private calculatePages() {\n const pagesCount = Math.ceil(this.total / this.limit);\n this.pages.set(this.range(1, pagesCount));\n this.elipsedPages.set(this.elipseSkippedPages(this.pages(), this.currentPage));\n }\n\n /**\n * Generates an array of numbers within a specified range.\n * @param start The starting number of the range.\n * @param end The ending number of the range.\n * @returns An array of numbers within the specified range.\n */\n private range(start: number, end: number): number[] {\n return [...Array(end).keys()].map((el) => el + start);\n }\n\n /**\n * Inserts ellipses into the given array of pages based on the current page number.\n * @param pages - The array of pages.\n * @param currentPage - The current page number.\n * @returns The modified array of pages with ellipses inserted.\n */\n private elipseSkippedPages(pages: (string | number)[], currentPage: number): (string | number)[] {\n pages = [...pages];\n\n if (currentPage < pages.length - 2) {\n // Add elipses to the right of current page\n pages.splice(currentPage + 1, pages.length - currentPage - 2, this.ELIPSIS);\n }\n\n if (currentPage >= 5) {\n // Add elipses to the left of current page\n pages.splice(1, currentPage - 3, this.ELIPSIS);\n }\n\n return pages;\n }\n}\n","<nav *ngIf=\"pages().length > 1\" class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\">\n <div *ngIf=\"currentPage > 1\" class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"#\" rel=\"prev\" (click)=\"onPageChanged($event, currentPage - 1)\">\n <svg\n class=\"govuk-pagination__icon govuk-pagination__icon--prev\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"13\"\n width=\"15\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 15 13\"\n >\n <path\n d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"\n ></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous<span class=\"govuk-visually-hidden\"> page </span></span></a\n >\n </div>\n <ul class=\"govuk-pagination__list\">\n <li\n *ngFor=\"let page of elipsedPages()\"\n class=\"govuk-pagination__item\"\n [class.govuk-pagination__item--current]=\"page === currentPage\"\n [class.govuk-pagination__item--ellipses]=\"page === ELIPSIS\"\n [attr.aria-current]=\"page === currentPage ? 'page' : null\"\n >\n <ng-container *ngIf=\"page === ELIPSIS\">⋯</ng-container>\n <a\n *ngIf=\"page !== ELIPSIS\"\n class=\"govuk-link govuk-pagination__link\"\n href=\"#\"\n (click)=\"onPageChanged($event, +page)\"\n [attr.aria-label]=\"'Page ' + page\"\n data-test-page-button\n >{{ page }}</a\n >\n </li>\n </ul>\n <div *ngIf=\"currentPage < pages().length\" class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"#\" rel=\"next\" (click)=\"onPageChanged($event, currentPage + 1)\">\n <span class=\"govuk-pagination__link-title\">Next<span class=\"govuk-visually-hidden\"> page </span></span>\n <svg\n class=\"govuk-pagination__icon govuk-pagination__icon--next\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"13\"\n width=\"15\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 15 13\"\n >\n <path\n d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"\n ></path>\n </svg>\n </a>\n </div>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,wBAAwB,CAAA;IAC1B,WAAW,GAAG,CAAC;IACf,KAAK,GAAG,CAAC;IACT,KAAK,GAAG,EAAE;AACT,IAAA,UAAU,GAAG,IAAI,YAAY,EAAU;AAE1C,IAAA,KAAK,GAAG,MAAM,CAAW,EAAE,CAAC;AAC5B,IAAA,YAAY,GAAG,MAAM,CAAsB,EAAE,CAAC;IAC9C,OAAO,GAAG,KAAK;AAEtB;;;AAGG;IACH,WAAW,GAAA;QACT,IAAI,CAAC,cAAc,EAAE;;AAGvB;;;;;AAKG;IACH,aAAa,CAAC,MAAkB,EAAE,IAAY,EAAA;QAC5C,MAAM,CAAC,cAAc,EAAE;AACvB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;AAG5B;;;AAGG;IACK,cAAc,GAAA;AACpB,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AACrD,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;;AAGhF;;;;;AAKG;IACK,KAAK,CAAC,KAAa,EAAE,GAAW,EAAA;QACtC,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;;AAGvD;;;;;AAKG;IACK,kBAAkB,CAAC,KAA0B,EAAE,WAAmB,EAAA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BAAA,CAAA,MAAA,EAAA,CAAA;;4FAIX,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,WAC5B,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs","sources":["../../../projects/opal-frontend-common/components/govuk/govuk-pagination/govuk-pagination.component.ts","../../../projects/opal-frontend-common/components/govuk/govuk-pagination/govuk-pagination.component.html","../../../projects/opal-frontend-common/components/govuk/govuk-pagination/hmcts-opal-frontend-common-components-govuk-govuk-pagination.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'opal-lib-govuk-pagination',\n imports: [CommonModule],\n templateUrl: './govuk-pagination.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GovukPaginationComponent implements OnChanges {\n @Input() currentPage = 1;\n @Input() total = 0;\n @Input() limit = 25;\n @Output() changePage = new EventEmitter<number>();\n\n public pages = signal<number[]>([]);\n public elipsedPages = signal<(number | string)[]>([]);\n public ELIPSIS = '...';\n\n /**\n * Lifecycle hook that is called when any data-bound property of the component changes.\n * It recalculates the pages for pagination.\n */\n ngOnChanges(): void {\n this.calculatePages();\n }\n\n /**\n * Handles the page change event.\n *\n * @param $event - The click event that triggered the page change.\n * @param page - The new page number.\n */\n onPageChanged($event: MouseEvent, page: number) {\n $event.preventDefault();\n this.changePage.emit(page);\n }\n\n /**\n * Calculates the number of pages based on the total number of items and the limit per page.\n * Updates the `pages` and `elipsedPages` properties accordingly.\n */\n private calculatePages() {\n const pagesCount = Math.ceil(this.total / this.limit);\n this.pages.set(this.range(1, pagesCount));\n this.elipsedPages.set(this.elipseSkippedPages(this.pages(), this.currentPage));\n }\n\n /**\n * Generates an array of numbers within a specified range.\n * @param start The starting number of the range.\n * @param end The ending number of the range.\n * @returns An array of numbers within the specified range.\n */\n private range(start: number, end: number): number[] {\n return [...Array(end).keys()].map((el) => el + start);\n }\n\n /**\n * Inserts ellipses into the given array of pages based on the current page number.\n * @param pages - The array of pages.\n * @param currentPage - The current page number.\n * @returns The modified array of pages with ellipses inserted.\n */\n private elipseSkippedPages(pages: (string | number)[], currentPage: number): (string | number)[] {\n pages = [...pages];\n\n if (currentPage < pages.length - 2) {\n // Add elipses to the right of current page\n pages.splice(currentPage + 1, pages.length - currentPage - 2, this.ELIPSIS);\n }\n\n if (currentPage >= 5) {\n // Add elipses to the left of current page\n pages.splice(1, currentPage - 3, this.ELIPSIS);\n }\n\n return pages;\n }\n}\n","<nav *ngIf=\"pages().length > 1\" class=\"govuk-pagination\" role=\"navigation\" aria-label=\"results\">\n <div *ngIf=\"currentPage > 1\" class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"#\" rel=\"prev\" (click)=\"onPageChanged($event, currentPage - 1)\">\n <svg\n class=\"govuk-pagination__icon govuk-pagination__icon--prev\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"13\"\n width=\"15\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 15 13\"\n >\n <path\n d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"\n ></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">Previous<span class=\"govuk-visually-hidden\"> page </span></span></a\n >\n </div>\n <ul class=\"govuk-pagination__list\">\n <li\n *ngFor=\"let page of elipsedPages()\"\n class=\"govuk-pagination__item\"\n [class.govuk-pagination__item--current]=\"page === currentPage\"\n [class.govuk-pagination__item--ellipses]=\"page === ELIPSIS\"\n [attr.aria-current]=\"page === currentPage ? 'page' : null\"\n >\n <ng-container *ngIf=\"page === ELIPSIS\">⋯</ng-container>\n <a\n *ngIf=\"page !== ELIPSIS\"\n class=\"govuk-link govuk-pagination__link\"\n href=\"#\"\n (click)=\"onPageChanged($event, +page)\"\n [attr.aria-label]=\"'Page ' + page\"\n data-test-page-button\n >{{ page }}</a\n >\n </li>\n </ul>\n <div *ngIf=\"currentPage < pages().length\" class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"#\" rel=\"next\" (click)=\"onPageChanged($event, currentPage + 1)\">\n <span class=\"govuk-pagination__link-title\">Next<span class=\"govuk-visually-hidden\"> page </span></span>\n <svg\n class=\"govuk-pagination__icon govuk-pagination__icon--next\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"13\"\n width=\"15\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 15 13\"\n >\n <path\n d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"\n ></path>\n </svg>\n </a>\n </div>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,wBAAwB,CAAA;IAC1B,WAAW,GAAG,CAAC;IACf,KAAK,GAAG,CAAC;IACT,KAAK,GAAG,EAAE;AACT,IAAA,UAAU,GAAG,IAAI,YAAY,EAAU;AAE1C,IAAA,KAAK,GAAG,MAAM,CAAW,EAAE,CAAC;AAC5B,IAAA,YAAY,GAAG,MAAM,CAAsB,EAAE,CAAC;IAC9C,OAAO,GAAG,KAAK;AAEtB;;;AAGG;IACH,WAAW,GAAA;QACT,IAAI,CAAC,cAAc,EAAE;;AAGvB;;;;;AAKG;IACH,aAAa,CAAC,MAAkB,EAAE,IAAY,EAAA;QAC5C,MAAM,CAAC,cAAc,EAAE;AACvB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;AAG5B;;;AAGG;IACK,cAAc,GAAA;AACpB,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IA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