@cooperco/cooper-component-library 0.1.89 → 0.1.90

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.
@@ -0,0 +1,37 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const containerModule = migration.editContentType('containerModule')
6
+ containerModule.editField('variant').items({
7
+ type: 'Symbol',
8
+ validations: [
9
+ {
10
+ in: ['Hero', 'Centered', 'Feature'],
11
+ },
12
+ ],
13
+ })
14
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
15
+ helpText:
16
+ 'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
17
+ })
18
+ },
19
+
20
+ // @ts-check
21
+ /** @type { import('contentful-migration').MigrationFunction } */
22
+ down: async function (migration) {
23
+ const containerModule = migration.editContentType('containerModule')
24
+ containerModule.editField('variant').items({
25
+ type: 'Symbol',
26
+ validations: [
27
+ {
28
+ in: ['Hero', 'Centered'],
29
+ },
30
+ ],
31
+ })
32
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
33
+ helpText:
34
+ 'Determines Text size and alignment will be top left unless centered is selected as well',
35
+ })
36
+ },
37
+ }
@@ -0,0 +1,37 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const containerModule = migration.editContentType('containerModule')
6
+ containerModule.editField('variant').items({
7
+ type: 'Symbol',
8
+ validations: [
9
+ {
10
+ in: ['Hero', 'Centered', 'Feature'],
11
+ },
12
+ ],
13
+ })
14
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
15
+ helpText:
16
+ 'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
17
+ })
18
+ },
19
+
20
+ // @ts-check
21
+ /** @type { import('contentful-migration').MigrationFunction } */
22
+ down: async function (migration) {
23
+ const containerModule = migration.editContentType('containerModule')
24
+ containerModule.editField('variant').items({
25
+ type: 'Symbol',
26
+ validations: [
27
+ {
28
+ in: ['Hero', 'Centered'],
29
+ },
30
+ ],
31
+ })
32
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
33
+ helpText:
34
+ 'Determines Text size and alignment will be top left unless centered is selected as well',
35
+ })
36
+ },
37
+ }
@@ -104,6 +104,7 @@ export const tileLabelFragment = gql `
104
104
  `;
105
105
  export const tileContentFragment = gql `
106
106
  ${imageFragment}
107
+ ${videoFragment}
107
108
  ${ctaFragment}
108
109
  ${tileLabelFragment}
109
110
  fragment tileContentFragment on TileContent {
@@ -125,7 +126,12 @@ export const tileContentFragment = gql `
125
126
  }
126
127
  }
127
128
  image {
128
- ...imageFragment
129
+ ... on Image {
130
+ ...imageFragment
131
+ }
132
+ ... on Video {
133
+ ...videoFragment
134
+ }
129
135
  }
130
136
  backgroundColor
131
137
  ctasCollection(limit: 6) {
@@ -113,6 +113,7 @@ export const tileLabelFragment: DocumentNode = gql`
113
113
 
114
114
  export const tileContentFragment: DocumentNode = gql`
115
115
  ${imageFragment}
116
+ ${videoFragment}
116
117
  ${ctaFragment}
117
118
  ${tileLabelFragment}
118
119
  fragment tileContentFragment on TileContent {
@@ -134,7 +135,12 @@ export const tileContentFragment: DocumentNode = gql`
134
135
  }
135
136
  }
136
137
  image {
137
- ...imageFragment
138
+ ... on Image {
139
+ ...imageFragment
140
+ }
141
+ ... on Video {
142
+ ...videoFragment
143
+ }
138
144
  }
139
145
  backgroundColor
140
146
  ctasCollection(limit: 6) {
@@ -113,6 +113,7 @@ export const tileLabelFragment: DocumentNode = gql`
113
113
 
114
114
  export const tileContentFragment: DocumentNode = gql`
115
115
  ${imageFragment}
116
+ ${videoFragment}
116
117
  ${ctaFragment}
117
118
  ${tileLabelFragment}
118
119
  fragment tileContentFragment on TileContent {
@@ -134,7 +135,12 @@ export const tileContentFragment: DocumentNode = gql`
134
135
  }
135
136
  }
136
137
  image {
137
- ...imageFragment
138
+ ... on Image {
139
+ ...imageFragment
140
+ }
141
+ ... on Video {
142
+ ...videoFragment
143
+ }
138
144
  }
139
145
  backgroundColor
140
146
  ctasCollection(limit: 6) {
@@ -0,0 +1,37 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const containerModule = migration.editContentType('containerModule')
6
+ containerModule.editField('variant').items({
7
+ type: 'Symbol',
8
+ validations: [
9
+ {
10
+ in: ['Hero', 'Centered', 'Feature'],
11
+ },
12
+ ],
13
+ })
14
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
15
+ helpText:
16
+ 'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
17
+ })
18
+ },
19
+
20
+ // @ts-check
21
+ /** @type { import('contentful-migration').MigrationFunction } */
22
+ down: async function (migration) {
23
+ const containerModule = migration.editContentType('containerModule')
24
+ containerModule.editField('variant').items({
25
+ type: 'Symbol',
26
+ validations: [
27
+ {
28
+ in: ['Hero', 'Centered'],
29
+ },
30
+ ],
31
+ })
32
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
33
+ helpText:
34
+ 'Determines Text size and alignment will be top left unless centered is selected as well',
35
+ })
36
+ },
37
+ }
@@ -113,6 +113,7 @@ export const tileLabelFragment: DocumentNode = gql`
113
113
 
114
114
  export const tileContentFragment: DocumentNode = gql`
115
115
  ${imageFragment}
116
+ ${videoFragment}
116
117
  ${ctaFragment}
117
118
  ${tileLabelFragment}
118
119
  fragment tileContentFragment on TileContent {
@@ -134,7 +135,12 @@ export const tileContentFragment: DocumentNode = gql`
134
135
  }
135
136
  }
136
137
  image {
137
- ...imageFragment
138
+ ... on Image {
139
+ ...imageFragment
140
+ }
141
+ ... on Video {
142
+ ...videoFragment
143
+ }
138
144
  }
139
145
  backgroundColor
140
146
  ctasCollection(limit: 6) {
@@ -0,0 +1,37 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const containerModule = migration.editContentType('containerModule')
6
+ containerModule.editField('variant').items({
7
+ type: 'Symbol',
8
+ validations: [
9
+ {
10
+ in: ['Hero', 'Centered', 'Feature'],
11
+ },
12
+ ],
13
+ })
14
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
15
+ helpText:
16
+ 'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
17
+ })
18
+ },
19
+
20
+ // @ts-check
21
+ /** @type { import('contentful-migration').MigrationFunction } */
22
+ down: async function (migration) {
23
+ const containerModule = migration.editContentType('containerModule')
24
+ containerModule.editField('variant').items({
25
+ type: 'Symbol',
26
+ validations: [
27
+ {
28
+ in: ['Hero', 'Centered'],
29
+ },
30
+ ],
31
+ })
32
+ containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
33
+ helpText:
34
+ 'Determines Text size and alignment will be top left unless centered is selected as well',
35
+ })
36
+ },
37
+ }