@cooperco/cooper-component-library 0.1.95 → 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 (28) hide show
  1. package/dist/cms/0083-create-placeholder-module.cjs +44 -0
  2. package/dist/cms/contentful/migrations/scripts/0083-create-placeholder-module.cjs +44 -0
  3. package/dist/cms/contentful/queries/helloBanner.query.d.ts +3 -0
  4. package/dist/cms/contentful/queries/helloBanner.query.js +30 -0
  5. package/dist/cms/contentful/queries/helloBanner.query.ts +33 -0
  6. package/dist/cms/contentful/queries/index.d.ts +2 -0
  7. package/dist/cms/contentful/queries/index.js +2 -0
  8. package/dist/cms/contentful/queries/index.ts +2 -0
  9. package/dist/cms/contentful/queries/placeholderModule.query.d.ts +3 -0
  10. package/dist/cms/contentful/queries/placeholderModule.query.js +19 -0
  11. package/dist/cms/contentful/queries/placeholderModule.query.ts +22 -0
  12. package/dist/cms/helloBanner.query.ts +33 -0
  13. package/dist/cms/index.ts +2 -0
  14. package/dist/cms/migrations/scripts/0083-create-placeholder-module.cjs +44 -0
  15. package/dist/cms/placeholderModule.query.ts +22 -0
  16. package/dist/cms/queries/helloBanner.query.ts +33 -0
  17. package/dist/cms/queries/index.ts +2 -0
  18. package/dist/cms/queries/placeholderModule.query.ts +22 -0
  19. package/dist/cms/scripts/0083-create-placeholder-module.cjs +44 -0
  20. package/dist/lib/component-lib.js +10 -5
  21. package/dist/lib/component-lib.umd.cjs +3 -3
  22. package/dist/types/cms/contentful/queries/helloBanner.query.d.ts +3 -0
  23. package/dist/types/cms/contentful/queries/index.d.ts +2 -0
  24. package/dist/types/cms/contentful/queries/placeholderModule.query.d.ts +3 -0
  25. package/dist/types/src/components/PlaceholderModule/PlaceholderModule.d.ts +12 -0
  26. package/dist/types/src/components/types.d.ts +3 -0
  27. package/dist/types/src/types.d.ts +1 -0
  28. package/package.json +1 -1
@@ -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,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,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,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
+ `
@@ -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'
@@ -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,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
+ }
@@ -6703,7 +6703,8 @@ const i7 = {
6703
6703
  LogoCollectionModule: "LogoCollectionModule",
6704
6704
  ProductModule: "ProductModule",
6705
6705
  CardsModule: "CardsModule",
6706
- ChartModule: "ChartModule"
6706
+ ChartModule: "ChartModule",
6707
+ PlaceholderModule: "PlaceholderModule"
6707
6708
  }, s7 = {
6708
6709
  Icon: "IconTile",
6709
6710
  Image: "ImageTile",
@@ -16515,11 +16516,14 @@ const Ll = /* @__PURE__ */ Fi("doughnut", B0), Ol = /* @__PURE__ */ Fi("pie", e1
16515
16516
  TileContentTextTile: Z5,
16516
16517
  TileContentVideoTile: S5,
16517
16518
  Video: gt
16518
- }, Symbol.toStringTag, { value: "Module" })), C7 = (n) => {
16519
+ }, Symbol.toStringTag, { value: "Module" })), C7 = {
16520
+ ContactUs: "Contact Us",
16521
+ ContactUsForm: "Contact Us Form"
16522
+ }, g7 = (n) => {
16519
16523
  Object.entries(Jl).forEach(([e, t]) => {
16520
16524
  n.component(e, t);
16521
16525
  });
16522
- }, g7 = (n, e) => {
16526
+ }, m7 = (n, e) => {
16523
16527
  const t = (o, s) => {
16524
16528
  for (const r of Object.keys(s))
16525
16529
  typeof s[r] == "object" ? t(o[r], s[r]) : o[r] = s[r];
@@ -16573,6 +16577,7 @@ export {
16573
16577
  o7 as ModuleTypeName,
16574
16578
  s0 as NavigationElement,
16575
16579
  kn as NavigationElementPt,
16580
+ C7 as PlaceholderModuleName,
16576
16581
  n5 as PrimaryNavigation,
16577
16582
  Z4 as PrimaryNavigationPt,
16578
16583
  qt as SocialMediaRef,
@@ -16604,8 +16609,8 @@ export {
16604
16609
  gn as combineAccordionPassthroughs,
16605
16610
  W as combinePassthroughs,
16606
16611
  u1 as getTarget,
16607
- C7 as initGlobalComponents,
16612
+ g7 as initGlobalComponents,
16608
16613
  n7 as overridePalette,
16609
- g7 as overridePassthrough,
16614
+ m7 as overridePassthrough,
16610
16615
  C2 as withColorPalette
16611
16616
  };