Skip to content

Commit 2513356

Browse files
committed
Consistent barrel file imports for client errors and events
1 parent 6aa9b75 commit 2513356

30 files changed

Lines changed: 35 additions & 39 deletions

File tree

‎src/components/CallToAction/Newsletter/client.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
*/
66

77
import { LitElement } from 'lit'
8-
import { handleScriptError, addScriptBreadcrumb } from '@components/scripts/errors'
9-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
8+
import { addScriptBreadcrumb, ClientScriptError, handleScriptError } from '@components/scripts/errors'
109
import { getNewsletterElements } from './selectors'
1110

1211
/**

‎src/components/CallToAction/Newsletter/selectors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
isButtonElement,
55
isSpanElement,
66
} from '@components/scripts/assertions/elements'
7-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
7+
import { ClientScriptError } from '@components/scripts/errors'
88

99
export const SELECTORS = {
1010
form: '#newsletter-form',

‎src/components/Carousel/client.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import EmblaCarousel, { type EmblaOptionsType, type EmblaCarouselType } from 'embla-carousel'
22
import Autoplay from 'embla-carousel-autoplay'
3-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
4-
import { handleScriptError, addScriptBreadcrumb } from '@components/scripts/errors'
3+
import { addScriptBreadcrumb, ClientScriptError, handleScriptError } from '@components/scripts/errors'
54
import { addButtonEventListeners } from '@components/scripts/elementListeners'
65

76
/**

‎src/components/Consent/Banner/selectors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
isButtonElement,
66
isDivElement,
77
} from '@components/scripts/assertions/elements'
8-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
8+
import { ClientScriptError } from '@components/scripts/errors'
99

1010
/** Gets the HTMLDivElement wrapping the consent modal */
1111
export const getConsentWrapper = () => {

‎src/components/Consent/Preferences/selectors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Type-safe HTML element selectors for Consent Preferences
33
*/
44
import { isDivElement, isButtonElement } from '@components/scripts/assertions/elements'
5-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
5+
import { ClientScriptError } from '@components/scripts/errors'
66

77
export const SELECTORS = {
88
/** Consent customize modal wrapper */

‎src/components/ContactForm/client.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
*/
55

66
import { LitElement } from 'lit'
7-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
8-
import { handleScriptError, addScriptBreadcrumb } from '@components/scripts/errors'
7+
import { addScriptBreadcrumb, ClientScriptError, handleScriptError } from '@components/scripts/errors'
98
import { isFormElement, isButtonElement } from '@components/scripts/assertions/elements'
109

1110
export interface ContactFormElements {

‎src/components/ContactForm/email.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
minLengthEmailAddressText,
55
maxLengthEmailAddressText,
66
} from './error'
7-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
7+
import { ClientScriptError } from '@components/scripts/errors'
88
import type { ContactFormSelectors } from './selectors'
99

1010
export const initEmailValidationHandler = (selector: ContactFormSelectors) => {

‎src/components/ContactForm/selectors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Type-safe HTML element selectors
33
*/
4-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
4+
import { ClientScriptError } from '@components/scripts/errors'
55
import {
66
isButtonElement,
77
isDivElement,

‎src/components/Footer/selectors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Type-safe HTML element selectors
33
*/
4-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
4+
import { ClientScriptError } from '@components/scripts/errors'
55
import { isAnchorElement } from '@components/scripts/assertions/elements'
66

77
export const SELECTORS = {

‎src/components/Footer/server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Functions used during build process in Astro frontmatter
44
*/
55
import parsePhoneNumber from 'libphonenumber-js'
6-
import { ClientScriptError } from '@components/scripts/errors/ClientScriptError'
6+
import { ClientScriptError } from '@components/scripts/errors'
77

88
/**
99
* Format a phone number in standard format

0 commit comments

Comments
 (0)