@cooperco/cooper-component-library 0.1.87 → 0.1.88

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,28 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const tileCollection = migration.editContentType('tileCollectionModule')
6
+
7
+ tileCollection
8
+ .createField('columns')
9
+ .name('Number of Columns')
10
+ .type('Integer')
11
+ .required(false)
12
+ .validations([{ in: [1, 2, 3] }])
13
+
14
+ tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
15
+ helpText:
16
+ 'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
17
+ })
18
+
19
+ tileCollection.moveField('columns').afterField('tiles')
20
+ },
21
+
22
+ // @ts-check
23
+ /** @type { import('contentful-migration').MigrationFunction } */
24
+ down: function (migration) {
25
+ const tileCollection = migration.editContentType('tileCollectionModule')
26
+ tileCollection.deleteField('columns')
27
+ },
28
+ }
@@ -0,0 +1,28 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const tileCollection = migration.editContentType('tileCollectionModule')
6
+
7
+ tileCollection
8
+ .createField('columns')
9
+ .name('Number of Columns')
10
+ .type('Integer')
11
+ .required(false)
12
+ .validations([{ in: [1, 2, 3] }])
13
+
14
+ tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
15
+ helpText:
16
+ 'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
17
+ })
18
+
19
+ tileCollection.moveField('columns').afterField('tiles')
20
+ },
21
+
22
+ // @ts-check
23
+ /** @type { import('contentful-migration').MigrationFunction } */
24
+ down: function (migration) {
25
+ const tileCollection = migration.editContentType('tileCollectionModule')
26
+ tileCollection.deleteField('columns')
27
+ },
28
+ }
@@ -37,6 +37,7 @@ export const getTileCollection = gql `
37
37
  variant
38
38
  tileLabelType
39
39
  includeDecoration
40
+ columns
40
41
  }
41
42
  }
42
43
  `;
@@ -45,6 +45,7 @@ export const getTileCollection: DocumentNode = gql`
45
45
  variant
46
46
  tileLabelType
47
47
  includeDecoration
48
+ columns
48
49
  }
49
50
  }
50
51
  `
@@ -0,0 +1,28 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const tileCollection = migration.editContentType('tileCollectionModule')
6
+
7
+ tileCollection
8
+ .createField('columns')
9
+ .name('Number of Columns')
10
+ .type('Integer')
11
+ .required(false)
12
+ .validations([{ in: [1, 2, 3] }])
13
+
14
+ tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
15
+ helpText:
16
+ 'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
17
+ })
18
+
19
+ tileCollection.moveField('columns').afterField('tiles')
20
+ },
21
+
22
+ // @ts-check
23
+ /** @type { import('contentful-migration').MigrationFunction } */
24
+ down: function (migration) {
25
+ const tileCollection = migration.editContentType('tileCollectionModule')
26
+ tileCollection.deleteField('columns')
27
+ },
28
+ }
@@ -45,6 +45,7 @@ export const getTileCollection: DocumentNode = gql`
45
45
  variant
46
46
  tileLabelType
47
47
  includeDecoration
48
+ columns
48
49
  }
49
50
  }
50
51
  `
@@ -0,0 +1,28 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const tileCollection = migration.editContentType('tileCollectionModule')
6
+
7
+ tileCollection
8
+ .createField('columns')
9
+ .name('Number of Columns')
10
+ .type('Integer')
11
+ .required(false)
12
+ .validations([{ in: [1, 2, 3] }])
13
+
14
+ tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
15
+ helpText:
16
+ 'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
17
+ })
18
+
19
+ tileCollection.moveField('columns').afterField('tiles')
20
+ },
21
+
22
+ // @ts-check
23
+ /** @type { import('contentful-migration').MigrationFunction } */
24
+ down: function (migration) {
25
+ const tileCollection = migration.editContentType('tileCollectionModule')
26
+ tileCollection.deleteField('columns')
27
+ },
28
+ }
@@ -45,6 +45,7 @@ export const getTileCollection: DocumentNode = gql`
45
45
  variant
46
46
  tileLabelType
47
47
  includeDecoration
48
+ columns
48
49
  }
49
50
  }
50
51
  `