@cooperco/cooper-component-library 0.1.72 → 0.1.74

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
+ /** @type { import('contentful-migration').MigrationFunction } */
3
+ up: function (migration) {
4
+ const accordion = migration.editContentType('accordion')
5
+
6
+ accordion
7
+ .editField('accordionItem')
8
+ .items({
9
+ type: 'Link',
10
+ validations: [
11
+ {
12
+ linkContentType: ['accordionItem', 'accordion'],
13
+ },
14
+ ],
15
+ linkType: 'Entry',
16
+ })
17
+ },
18
+
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: async function (migration) {
21
+ const accordion = migration.editContentType('accordion')
22
+
23
+ accordion
24
+ .editField('accordionItem')
25
+ .items({
26
+ type: 'Link',
27
+ validations: [
28
+ {
29
+ linkContentType: ['accordionItem'],
30
+ },
31
+ ],
32
+ linkType: 'Entry',
33
+ })
34
+ },
35
+ }
36
+
@@ -0,0 +1,37 @@
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
8
+ .createField('placeholderModule')
9
+ .name('Placeholder Module')
10
+ .type('Symbol')
11
+ .required(false)
12
+ .validations([
13
+ {
14
+ in: ['Contact Us'],
15
+ },
16
+ ])
17
+
18
+ contentModule.changeFieldControl(
19
+ 'placeholderModule',
20
+ 'builtin',
21
+ 'dropdown',
22
+ {
23
+ "helpText": "If a placeholder is selected, the fields below will be ignored.",
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('placeholderModule').beforeField('logo')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: async function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('placeholderModule')
35
+ },
36
+ }
37
+
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ placeholderModule
67
68
  }
68
69
  }
69
70
  `
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ /** @type { import('contentful-migration').MigrationFunction } */
3
+ up: function (migration) {
4
+ const accordion = migration.editContentType('accordion')
5
+
6
+ accordion
7
+ .editField('accordionItem')
8
+ .items({
9
+ type: 'Link',
10
+ validations: [
11
+ {
12
+ linkContentType: ['accordionItem', 'accordion'],
13
+ },
14
+ ],
15
+ linkType: 'Entry',
16
+ })
17
+ },
18
+
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: async function (migration) {
21
+ const accordion = migration.editContentType('accordion')
22
+
23
+ accordion
24
+ .editField('accordionItem')
25
+ .items({
26
+ type: 'Link',
27
+ validations: [
28
+ {
29
+ linkContentType: ['accordionItem'],
30
+ },
31
+ ],
32
+ linkType: 'Entry',
33
+ })
34
+ },
35
+ }
36
+
@@ -0,0 +1,37 @@
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
8
+ .createField('placeholderModule')
9
+ .name('Placeholder Module')
10
+ .type('Symbol')
11
+ .required(false)
12
+ .validations([
13
+ {
14
+ in: ['Contact Us'],
15
+ },
16
+ ])
17
+
18
+ contentModule.changeFieldControl(
19
+ 'placeholderModule',
20
+ 'builtin',
21
+ 'dropdown',
22
+ {
23
+ "helpText": "If a placeholder is selected, the fields below will be ignored.",
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('placeholderModule').beforeField('logo')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: async function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('placeholderModule')
35
+ },
36
+ }
37
+
@@ -62,6 +62,7 @@ export const getContentModule = gql `
62
62
  }
63
63
  backgroundColor
64
64
  alignment
65
+ placeholderModule
65
66
  }
66
67
  }
67
68
  `;
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ placeholderModule
67
68
  }
68
69
  }
69
70
  `
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ /** @type { import('contentful-migration').MigrationFunction } */
3
+ up: function (migration) {
4
+ const accordion = migration.editContentType('accordion')
5
+
6
+ accordion
7
+ .editField('accordionItem')
8
+ .items({
9
+ type: 'Link',
10
+ validations: [
11
+ {
12
+ linkContentType: ['accordionItem', 'accordion'],
13
+ },
14
+ ],
15
+ linkType: 'Entry',
16
+ })
17
+ },
18
+
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: async function (migration) {
21
+ const accordion = migration.editContentType('accordion')
22
+
23
+ accordion
24
+ .editField('accordionItem')
25
+ .items({
26
+ type: 'Link',
27
+ validations: [
28
+ {
29
+ linkContentType: ['accordionItem'],
30
+ },
31
+ ],
32
+ linkType: 'Entry',
33
+ })
34
+ },
35
+ }
36
+
@@ -0,0 +1,37 @@
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
8
+ .createField('placeholderModule')
9
+ .name('Placeholder Module')
10
+ .type('Symbol')
11
+ .required(false)
12
+ .validations([
13
+ {
14
+ in: ['Contact Us'],
15
+ },
16
+ ])
17
+
18
+ contentModule.changeFieldControl(
19
+ 'placeholderModule',
20
+ 'builtin',
21
+ 'dropdown',
22
+ {
23
+ "helpText": "If a placeholder is selected, the fields below will be ignored.",
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('placeholderModule').beforeField('logo')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: async function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('placeholderModule')
35
+ },
36
+ }
37
+
@@ -64,6 +64,7 @@ export const getContentModule: DocumentNode = gql`
64
64
  }
65
65
  backgroundColor
66
66
  alignment
67
+ placeholderModule
67
68
  }
68
69
  }
69
70
  `
@@ -0,0 +1,36 @@
1
+ module.exports = {
2
+ /** @type { import('contentful-migration').MigrationFunction } */
3
+ up: function (migration) {
4
+ const accordion = migration.editContentType('accordion')
5
+
6
+ accordion
7
+ .editField('accordionItem')
8
+ .items({
9
+ type: 'Link',
10
+ validations: [
11
+ {
12
+ linkContentType: ['accordionItem', 'accordion'],
13
+ },
14
+ ],
15
+ linkType: 'Entry',
16
+ })
17
+ },
18
+
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: async function (migration) {
21
+ const accordion = migration.editContentType('accordion')
22
+
23
+ accordion
24
+ .editField('accordionItem')
25
+ .items({
26
+ type: 'Link',
27
+ validations: [
28
+ {
29
+ linkContentType: ['accordionItem'],
30
+ },
31
+ ],
32
+ linkType: 'Entry',
33
+ })
34
+ },
35
+ }
36
+
@@ -0,0 +1,37 @@
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
8
+ .createField('placeholderModule')
9
+ .name('Placeholder Module')
10
+ .type('Symbol')
11
+ .required(false)
12
+ .validations([
13
+ {
14
+ in: ['Contact Us'],
15
+ },
16
+ ])
17
+
18
+ contentModule.changeFieldControl(
19
+ 'placeholderModule',
20
+ 'builtin',
21
+ 'dropdown',
22
+ {
23
+ "helpText": "If a placeholder is selected, the fields below will be ignored.",
24
+ }
25
+ )
26
+
27
+ contentModule.moveField('placeholderModule').beforeField('logo')
28
+ },
29
+
30
+ // @ts-check
31
+ /** @type { import('contentful-migration').MigrationFunction } */
32
+ down: async function (migration) {
33
+ const contentModule = migration.editContentType('contentModule')
34
+ contentModule.deleteField('placeholderModule')
35
+ },
36
+ }
37
+