@cooperco/cooper-component-library 0.1.93 → 0.1.95

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,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
+ }
@@ -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
+ }
@@ -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,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
+ }
@@ -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
+ }