@cooperco/cooper-component-library 0.1.94 → 0.1.96

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.
Files changed (38) hide show
  1. package/dist/cms/0082-add-body-copy-alignment-to-content-module.cjs +36 -0
  2. package/dist/cms/0083-create-placeholder-module.cjs +44 -0
  3. package/dist/cms/README.md +101 -31
  4. package/dist/cms/contentModule.query.ts +1 -0
  5. package/dist/cms/contentful/migrations/scripts/0082-add-body-copy-alignment-to-content-module.cjs +36 -0
  6. package/dist/cms/contentful/migrations/scripts/0083-create-placeholder-module.cjs +44 -0
  7. package/dist/cms/contentful/queries/contentModule.query.js +1 -0
  8. package/dist/cms/contentful/queries/contentModule.query.ts +1 -0
  9. package/dist/cms/contentful/queries/helloBanner.query.d.ts +3 -0
  10. package/dist/cms/contentful/queries/helloBanner.query.js +30 -0
  11. package/dist/cms/contentful/queries/helloBanner.query.ts +33 -0
  12. package/dist/cms/contentful/queries/index.d.ts +2 -0
  13. package/dist/cms/contentful/queries/index.js +2 -0
  14. package/dist/cms/contentful/queries/index.ts +2 -0
  15. package/dist/cms/contentful/queries/placeholderModule.query.d.ts +3 -0
  16. package/dist/cms/contentful/queries/placeholderModule.query.js +19 -0
  17. package/dist/cms/contentful/queries/placeholderModule.query.ts +22 -0
  18. package/dist/cms/helloBanner.query.ts +33 -0
  19. package/dist/cms/index.ts +2 -0
  20. package/dist/cms/migrations/scripts/0082-add-body-copy-alignment-to-content-module.cjs +36 -0
  21. package/dist/cms/migrations/scripts/0083-create-placeholder-module.cjs +44 -0
  22. package/dist/cms/placeholderModule.query.ts +22 -0
  23. package/dist/cms/queries/contentModule.query.ts +1 -0
  24. package/dist/cms/queries/helloBanner.query.ts +33 -0
  25. package/dist/cms/queries/index.ts +2 -0
  26. package/dist/cms/queries/placeholderModule.query.ts +22 -0
  27. package/dist/cms/scripts/0082-add-body-copy-alignment-to-content-module.cjs +36 -0
  28. package/dist/cms/scripts/0083-create-placeholder-module.cjs +44 -0
  29. package/dist/lib/component-lib.js +495 -489
  30. package/dist/lib/component-lib.umd.cjs +10 -10
  31. package/dist/types/cms/contentful/queries/helloBanner.query.d.ts +3 -0
  32. package/dist/types/cms/contentful/queries/index.d.ts +2 -0
  33. package/dist/types/cms/contentful/queries/placeholderModule.query.d.ts +3 -0
  34. package/dist/types/src/components/ContentModule/ContentModule.d.ts +1 -0
  35. package/dist/types/src/components/PlaceholderModule/PlaceholderModule.d.ts +12 -0
  36. package/dist/types/src/components/types.d.ts +3 -0
  37. package/dist/types/src/types.d.ts +1 -0
  38. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const contentModule = migration.editContentType('contentModule')
6
+
7
+ contentModule.createField('bodyCopyAlignment', {
8
+ name: 'Body Copy Alignment',
9
+ type: 'Symbol',
10
+ validations: [
11
+ {
12
+ in: ['Left', 'Center', 'Right'],
13
+ },
14
+ ],
15
+ })
16
+
17
+ contentModule.changeFieldControl(
18
+ 'bodyCopyAlignment',
19
+ 'builtin',
20
+ 'dropdown',
21
+ {
22
+ helpText:
23
+ 'Override the body copy text alignment independently from the general alignment. If not set, body copy will follow the general alignment.',
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('bodyCopyAlignment').afterField('bodyCopy')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('bodyCopyAlignment')
35
+ },
36
+ }
@@ -0,0 +1,44 @@
1
+ const addEntryNameField = require('../helpers/addEntryNameField.cjs')
2
+
3
+ module.exports = {
4
+ // @ts-check
5
+ /** @type { import('contentful-migration').MigrationFunction } */
6
+ up: async function (migration) {
7
+ const placeholderModule = migration.createContentType('placeholderModule', {
8
+ name: 'Placeholder Module',
9
+ displayField: 'entryName',
10
+ description: 'Manage the placeholder module component',
11
+ })
12
+
13
+ // Add required entryName field
14
+ addEntryNameField(placeholderModule)
15
+
16
+ // Module Name dropdown field
17
+ placeholderModule
18
+ .createField('moduleName')
19
+ .name('Module Name')
20
+ .type('Symbol')
21
+ .required(false)
22
+ .validations([
23
+ {
24
+ in: ['Contact Us', 'Contact Us Form'],
25
+ },
26
+ ])
27
+ placeholderModule.changeFieldControl('moduleName', 'builtin', 'dropdown', {
28
+ helpText: 'Select the placeholder module to render.',
29
+ })
30
+
31
+ // Custom Module Name field
32
+ placeholderModule
33
+ .createField('customModuleName')
34
+ .name('Custom Module Name')
35
+ .type('Symbol')
36
+ .required(false)
37
+ placeholderModule.changeFieldControl('customModuleName', 'builtin', 'singleLine', {
38
+ helpText: 'This will overwrite the dropdown selection if used. Confirm with the team before using this field.',
39
+ })
40
+ },
41
+ down: async function (migration) {
42
+ await migration.deleteContentType('placeholderModule')
43
+ },
44
+ }
@@ -1,42 +1,112 @@
1
- # Migrations
1
+ # GraphQL Queries
2
2
 
3
- ## Prerequisites
3
+ This directory contains GraphQL queries for fetching content from Contentful CMS.
4
4
 
5
- - Run `pnpm install`
6
- - Obtain a Contentful CMA token
7
- - Confirm and double check what space and environment you should be running these in
8
- - Run `pnpm exec contentful-cli-migrations --environment-id <your-env-name> --space-id <space-id> --management-token <CMA-TOKEN> --initialise` on environment if not already and update `.env`
5
+ ## Directory Structure
9
6
 
7
+ ```
8
+ cms/contentful/queries/
9
+ ├── index.ts # Barrel export file (manual updates required)
10
+ ├── fragments.ts # Shared GraphQL fragments
11
+ ├── *.query.ts # Individual component queries
12
+ └── README.md # This file
13
+ ```
10
14
 
11
- ## Helpful Docs
15
+ ## How Queries Are Exported
12
16
 
13
- - [Contentful Migration](https://github.com/contentful/contentful-migration)
14
- - [Contentful Migration Reference Docs](https://github.com/contentful/contentful-migration/blob/main/README.md#reference-documentation)
15
- - [Contentful Data Model](https://www.contentful.com/developers/docs/concepts/data-model/)
17
+ The query export system in this project is **semi-automatic**:
16
18
 
17
- ### Instructions
19
+ ### The Process
18
20
 
19
- - Create your migration file in the scripts folder with the following format: `0002-description.cjs`
20
- - Write your migrations
21
- - This should be with an up and a down function
22
- - The up function updates the model
23
- - The down function reversts your changes
24
- - Run your migration on a test environment with the following command: `pnpm exec contentful-cli-migrations --environment-id <your-env-name> --space-id <space-id> --management-token <CMA-TOKEN>`
25
- - Optional Flags:
26
- - `--rollback`: Rolls back one migration.
21
+ 1. **Individual Query Files** - Queries are defined in individual files with the pattern `*.query.ts`
22
+ - Example: `accordion.query.ts`, `carousel.query.ts`
27
23
 
28
- ### Gotchas
24
+ 2. **Manual Barrel Export** - Queries are re-exported through `index.ts`
25
+ - Uses wildcard exports: `export * from './accordion.query.js'`
26
+ - **Note:** Exports use `.js` extensions even though source files are `.ts` (ESM compatibility)
29
27
 
30
- - Currently the rollback may change the version counter even if the migration doesnt run.
31
- - for this just update the counter to the correct counter in contentful and rerun.
32
- - The migration may run and create a content type even if the whole migration doesnt run correctly.
33
- - To fix you will need to delete the content type and re-run
28
+ 3. **Package-Level Export** - The barrel export is exposed via `package.json`:
29
+ ```json
30
+ "./cms/contentful/graphql": {
31
+ "import": "./dist/cms/contentful/queries/index.js",
32
+ "types": "./dist/cms/contentful/queries/index.d.ts"
33
+ }
34
+ ```
34
35
 
35
- ### TODO
36
+ ## Creating a New Query
36
37
 
37
- - Fix rollback versioning
38
- - This flag should cause a rollback to that specific version, in this case 0001 `--version 0001`
39
- - It should be used with `--rollback`
40
- - It should update dthe versionTracker entry on successful rollback
41
- - Run migration error handling
42
- - runMigration is currently not working as expected and bumping the counter when the migration was aborted
38
+ ### Steps Required
39
+
40
+ 1. **Create Query File** - Add your query file: `yourComponent.query.ts`
41
+
42
+ 2. **Define Query** - Follow the established pattern:
43
+ ```typescript
44
+ import { gql } from 'graphql-tag'
45
+ import type { DocumentNode } from 'graphql'
46
+ import { someFragment } from './fragments.js' // If needed
47
+
48
+ export const getYourComponent: DocumentNode = gql`
49
+ ${someFragment} // Include fragments if needed
50
+ query yourComponentQuery($id: String!, $preview: Boolean = false) {
51
+ yourComponent(id: $id, preview: $preview) {
52
+ __typename
53
+ # Add your fields here
54
+ }
55
+ }
56
+ `
57
+ ```
58
+
59
+ 3. **Update Barrel Export** - **MANUALLY ADD** export to `index.ts`:
60
+ ```typescript
61
+ export * from './yourComponent.query.js'
62
+ ```
63
+ - Maintain alphabetical order for consistency
64
+ - Use `.js` extension (not `.ts`)
65
+
66
+ ### Query Naming Conventions
67
+
68
+ - **File Name:** `componentName.query.ts` (camelCase)
69
+ - **Export Name:** `getComponentName` (camelCase with `get` prefix)
70
+ - **Query Name:** `componentNameQuery` (camelCase with `Query` suffix)
71
+
72
+ ### Example
73
+
74
+ ```typescript
75
+ // accordion.query.ts
76
+ import { gql } from 'graphql-tag'
77
+ import type { DocumentNode } from 'graphql'
78
+ import { accordionItemFragment } from './fragments.js'
79
+
80
+ export const getAccordion: DocumentNode = gql`
81
+ ${accordionItemFragment}
82
+ query accordionQuery($id: String!, $preview: Boolean = false) {
83
+ accordion(id: $id, preview: $preview) {
84
+ __typename
85
+ headline
86
+ accordionType
87
+ loadMoreButtonTitle
88
+ startOpen
89
+ accordionItemCollection {
90
+ items {
91
+ ...accordionItemFragment
92
+ }
93
+ }
94
+ }
95
+ }
96
+ `
97
+ ```
98
+
99
+ ## Using Queries in Consumer Projects
100
+
101
+ Queries are consumed via the package export:
102
+
103
+ ```typescript
104
+ import { getAccordion, getCarousel } from '@cooperco/cooper-component-library/cms/contentful/graphql'
105
+ ```
106
+
107
+ ## Important Notes
108
+
109
+ - **Manual Export Required:** The system is NOT fully automatic - you MUST manually update `index.ts` when adding new queries
110
+ - **ESM Extensions:** Always use `.js` extensions in exports (even for `.ts` source files)
111
+ - **Preview Mode:** All queries support a `preview` parameter for Contentful preview API
112
+ - **Fragments:** Shared fragments are defined in `fragments.ts` and can be reused across queries
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ bodyCopyAlignment
67
68
  placeholderModule
68
69
  }
69
70
  }
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const contentModule = migration.editContentType('contentModule')
6
+
7
+ contentModule.createField('bodyCopyAlignment', {
8
+ name: 'Body Copy Alignment',
9
+ type: 'Symbol',
10
+ validations: [
11
+ {
12
+ in: ['Left', 'Center', 'Right'],
13
+ },
14
+ ],
15
+ })
16
+
17
+ contentModule.changeFieldControl(
18
+ 'bodyCopyAlignment',
19
+ 'builtin',
20
+ 'dropdown',
21
+ {
22
+ helpText:
23
+ 'Override the body copy text alignment independently from the general alignment. If not set, body copy will follow the general alignment.',
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('bodyCopyAlignment').afterField('bodyCopy')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('bodyCopyAlignment')
35
+ },
36
+ }
@@ -0,0 +1,44 @@
1
+ const addEntryNameField = require('../helpers/addEntryNameField.cjs')
2
+
3
+ module.exports = {
4
+ // @ts-check
5
+ /** @type { import('contentful-migration').MigrationFunction } */
6
+ up: async function (migration) {
7
+ const placeholderModule = migration.createContentType('placeholderModule', {
8
+ name: 'Placeholder Module',
9
+ displayField: 'entryName',
10
+ description: 'Manage the placeholder module component',
11
+ })
12
+
13
+ // Add required entryName field
14
+ addEntryNameField(placeholderModule)
15
+
16
+ // Module Name dropdown field
17
+ placeholderModule
18
+ .createField('moduleName')
19
+ .name('Module Name')
20
+ .type('Symbol')
21
+ .required(false)
22
+ .validations([
23
+ {
24
+ in: ['Contact Us', 'Contact Us Form'],
25
+ },
26
+ ])
27
+ placeholderModule.changeFieldControl('moduleName', 'builtin', 'dropdown', {
28
+ helpText: 'Select the placeholder module to render.',
29
+ })
30
+
31
+ // Custom Module Name field
32
+ placeholderModule
33
+ .createField('customModuleName')
34
+ .name('Custom Module Name')
35
+ .type('Symbol')
36
+ .required(false)
37
+ placeholderModule.changeFieldControl('customModuleName', 'builtin', 'singleLine', {
38
+ helpText: 'This will overwrite the dropdown selection if used. Confirm with the team before using this field.',
39
+ })
40
+ },
41
+ down: async function (migration) {
42
+ await migration.deleteContentType('placeholderModule')
43
+ },
44
+ }
@@ -62,6 +62,7 @@ export const getContentModule = gql `
62
62
  }
63
63
  backgroundColor
64
64
  alignment
65
+ bodyCopyAlignment
65
66
  placeholderModule
66
67
  }
67
68
  }
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ bodyCopyAlignment
67
68
  placeholderModule
68
69
  }
69
70
  }
@@ -0,0 +1,3 @@
1
+ import type { DocumentNode } from 'graphql';
2
+ export declare const getHelloBanner: DocumentNode;
3
+ export declare const helloBannerFragment: DocumentNode;
@@ -0,0 +1,30 @@
1
+ import { gql } from 'graphql-tag';
2
+ import { ctaFragment } from './fragments.js';
3
+ export const getHelloBanner = gql `
4
+ ${ctaFragment}
5
+ query helloBannerQuery($id: String!, $preview: Boolean = false) {
6
+ helloBanner(id: $id, preview: $preview) {
7
+ __typename
8
+ entryName
9
+ active
10
+ fullCopy
11
+ mobileCollapsed
12
+ cta {
13
+ ...ctaFragment
14
+ }
15
+ }
16
+ }
17
+ `;
18
+ export const helloBannerFragment = gql `
19
+ ${ctaFragment}
20
+ fragment helloBannerFragment on HelloBanner {
21
+ __typename
22
+ entryName
23
+ active
24
+ fullCopy
25
+ mobileCollapsed
26
+ cta {
27
+ ...ctaFragment
28
+ }
29
+ }
30
+ `;
@@ -0,0 +1,33 @@
1
+ import { gql } from 'graphql-tag'
2
+ import type { DocumentNode } from 'graphql'
3
+ import { ctaFragment } from './fragments.js'
4
+
5
+ export const getHelloBanner: DocumentNode = gql`
6
+ ${ctaFragment}
7
+ query helloBannerQuery($id: String!, $preview: Boolean = false) {
8
+ helloBanner(id: $id, preview: $preview) {
9
+ __typename
10
+ entryName
11
+ active
12
+ fullCopy
13
+ mobileCollapsed
14
+ cta {
15
+ ...ctaFragment
16
+ }
17
+ }
18
+ }
19
+ `
20
+
21
+ export const helloBannerFragment = gql`
22
+ ${ctaFragment}
23
+ fragment helloBannerFragment on HelloBanner {
24
+ __typename
25
+ entryName
26
+ active
27
+ fullCopy
28
+ mobileCollapsed
29
+ cta {
30
+ ...ctaFragment
31
+ }
32
+ }
33
+ `
@@ -17,3 +17,5 @@ export * from './testimonial.query.js';
17
17
  export * from './tileCollection.query.js';
18
18
  export * from './video.query.js';
19
19
  export * from './chartModule.query.js';
20
+ export * from './helloBanner.query.js';
21
+ export * from './placeholderModule.query.js';
@@ -17,3 +17,5 @@ export * from './testimonial.query.js';
17
17
  export * from './tileCollection.query.js';
18
18
  export * from './video.query.js';
19
19
  export * from './chartModule.query.js';
20
+ export * from './helloBanner.query.js';
21
+ export * from './placeholderModule.query.js';
@@ -17,3 +17,5 @@ export * from './testimonial.query.js'
17
17
  export * from './tileCollection.query.js'
18
18
  export * from './video.query.js'
19
19
  export * from './chartModule.query.js'
20
+ export * from './helloBanner.query.js'
21
+ export * from './placeholderModule.query.js'
@@ -0,0 +1,3 @@
1
+ import type { DocumentNode } from 'graphql';
2
+ export declare const getPlaceholderModule: DocumentNode;
3
+ export declare const placeholderModuleFragment: DocumentNode;
@@ -0,0 +1,19 @@
1
+ import { gql } from 'graphql-tag';
2
+ export const getPlaceholderModule = gql `
3
+ query placeholderModuleQuery($id: String!, $preview: Boolean = false) {
4
+ placeholderModule(id: $id, preview: $preview) {
5
+ __typename
6
+ entryName
7
+ moduleName
8
+ customModuleName
9
+ }
10
+ }
11
+ `;
12
+ export const placeholderModuleFragment = gql `
13
+ fragment placeholderModuleFragment on PlaceholderModule {
14
+ __typename
15
+ entryName
16
+ moduleName
17
+ customModuleName
18
+ }
19
+ `;
@@ -0,0 +1,22 @@
1
+ import { gql } from 'graphql-tag'
2
+ import type { DocumentNode } from 'graphql'
3
+
4
+ export const getPlaceholderModule: DocumentNode = gql`
5
+ query placeholderModuleQuery($id: String!, $preview: Boolean = false) {
6
+ placeholderModule(id: $id, preview: $preview) {
7
+ __typename
8
+ entryName
9
+ moduleName
10
+ customModuleName
11
+ }
12
+ }
13
+ `
14
+
15
+ export const placeholderModuleFragment = gql`
16
+ fragment placeholderModuleFragment on PlaceholderModule {
17
+ __typename
18
+ entryName
19
+ moduleName
20
+ customModuleName
21
+ }
22
+ `
@@ -0,0 +1,33 @@
1
+ import { gql } from 'graphql-tag'
2
+ import type { DocumentNode } from 'graphql'
3
+ import { ctaFragment } from './fragments.js'
4
+
5
+ export const getHelloBanner: DocumentNode = gql`
6
+ ${ctaFragment}
7
+ query helloBannerQuery($id: String!, $preview: Boolean = false) {
8
+ helloBanner(id: $id, preview: $preview) {
9
+ __typename
10
+ entryName
11
+ active
12
+ fullCopy
13
+ mobileCollapsed
14
+ cta {
15
+ ...ctaFragment
16
+ }
17
+ }
18
+ }
19
+ `
20
+
21
+ export const helloBannerFragment = gql`
22
+ ${ctaFragment}
23
+ fragment helloBannerFragment on HelloBanner {
24
+ __typename
25
+ entryName
26
+ active
27
+ fullCopy
28
+ mobileCollapsed
29
+ cta {
30
+ ...ctaFragment
31
+ }
32
+ }
33
+ `
package/dist/cms/index.ts CHANGED
@@ -17,3 +17,5 @@ export * from './testimonial.query.js'
17
17
  export * from './tileCollection.query.js'
18
18
  export * from './video.query.js'
19
19
  export * from './chartModule.query.js'
20
+ export * from './helloBanner.query.js'
21
+ export * from './placeholderModule.query.js'
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const contentModule = migration.editContentType('contentModule')
6
+
7
+ contentModule.createField('bodyCopyAlignment', {
8
+ name: 'Body Copy Alignment',
9
+ type: 'Symbol',
10
+ validations: [
11
+ {
12
+ in: ['Left', 'Center', 'Right'],
13
+ },
14
+ ],
15
+ })
16
+
17
+ contentModule.changeFieldControl(
18
+ 'bodyCopyAlignment',
19
+ 'builtin',
20
+ 'dropdown',
21
+ {
22
+ helpText:
23
+ 'Override the body copy text alignment independently from the general alignment. If not set, body copy will follow the general alignment.',
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('bodyCopyAlignment').afterField('bodyCopy')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('bodyCopyAlignment')
35
+ },
36
+ }
@@ -0,0 +1,44 @@
1
+ const addEntryNameField = require('../helpers/addEntryNameField.cjs')
2
+
3
+ module.exports = {
4
+ // @ts-check
5
+ /** @type { import('contentful-migration').MigrationFunction } */
6
+ up: async function (migration) {
7
+ const placeholderModule = migration.createContentType('placeholderModule', {
8
+ name: 'Placeholder Module',
9
+ displayField: 'entryName',
10
+ description: 'Manage the placeholder module component',
11
+ })
12
+
13
+ // Add required entryName field
14
+ addEntryNameField(placeholderModule)
15
+
16
+ // Module Name dropdown field
17
+ placeholderModule
18
+ .createField('moduleName')
19
+ .name('Module Name')
20
+ .type('Symbol')
21
+ .required(false)
22
+ .validations([
23
+ {
24
+ in: ['Contact Us', 'Contact Us Form'],
25
+ },
26
+ ])
27
+ placeholderModule.changeFieldControl('moduleName', 'builtin', 'dropdown', {
28
+ helpText: 'Select the placeholder module to render.',
29
+ })
30
+
31
+ // Custom Module Name field
32
+ placeholderModule
33
+ .createField('customModuleName')
34
+ .name('Custom Module Name')
35
+ .type('Symbol')
36
+ .required(false)
37
+ placeholderModule.changeFieldControl('customModuleName', 'builtin', 'singleLine', {
38
+ helpText: 'This will overwrite the dropdown selection if used. Confirm with the team before using this field.',
39
+ })
40
+ },
41
+ down: async function (migration) {
42
+ await migration.deleteContentType('placeholderModule')
43
+ },
44
+ }
@@ -0,0 +1,22 @@
1
+ import { gql } from 'graphql-tag'
2
+ import type { DocumentNode } from 'graphql'
3
+
4
+ export const getPlaceholderModule: DocumentNode = gql`
5
+ query placeholderModuleQuery($id: String!, $preview: Boolean = false) {
6
+ placeholderModule(id: $id, preview: $preview) {
7
+ __typename
8
+ entryName
9
+ moduleName
10
+ customModuleName
11
+ }
12
+ }
13
+ `
14
+
15
+ export const placeholderModuleFragment = gql`
16
+ fragment placeholderModuleFragment on PlaceholderModule {
17
+ __typename
18
+ entryName
19
+ moduleName
20
+ customModuleName
21
+ }
22
+ `
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ bodyCopyAlignment
67
68
  placeholderModule
68
69
  }
69
70
  }
@@ -0,0 +1,33 @@
1
+ import { gql } from 'graphql-tag'
2
+ import type { DocumentNode } from 'graphql'
3
+ import { ctaFragment } from './fragments.js'
4
+
5
+ export const getHelloBanner: DocumentNode = gql`
6
+ ${ctaFragment}
7
+ query helloBannerQuery($id: String!, $preview: Boolean = false) {
8
+ helloBanner(id: $id, preview: $preview) {
9
+ __typename
10
+ entryName
11
+ active
12
+ fullCopy
13
+ mobileCollapsed
14
+ cta {
15
+ ...ctaFragment
16
+ }
17
+ }
18
+ }
19
+ `
20
+
21
+ export const helloBannerFragment = gql`
22
+ ${ctaFragment}
23
+ fragment helloBannerFragment on HelloBanner {
24
+ __typename
25
+ entryName
26
+ active
27
+ fullCopy
28
+ mobileCollapsed
29
+ cta {
30
+ ...ctaFragment
31
+ }
32
+ }
33
+ `
@@ -17,3 +17,5 @@ export * from './testimonial.query.js'
17
17
  export * from './tileCollection.query.js'
18
18
  export * from './video.query.js'
19
19
  export * from './chartModule.query.js'
20
+ export * from './helloBanner.query.js'
21
+ export * from './placeholderModule.query.js'