@cooperco/cooper-component-library 0.1.116 → 0.1.118

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,29 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const ctaAction = migration.editContentType('ctaAction')
6
+
7
+ ctaAction.editField('triggerMappingValue').validations([
8
+ {
9
+ in: ['Sign-in modal', 'Load More'],
10
+ },
11
+ ])
12
+
13
+ ctaAction.changeFieldControl('triggerMappingValue', 'builtin', 'dropdown', {
14
+ helpText: 'A trigger that determines the action of the CTA. Currently supported only for the Tile Collection module.',
15
+ })
16
+ },
17
+
18
+ // @ts-check
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: function (migration) {
21
+ const ctaAction = migration.editContentType('ctaAction')
22
+
23
+ ctaAction.editField('triggerMappingValue').validations([
24
+ {
25
+ in: ['Sign-in modal'],
26
+ },
27
+ ])
28
+ },
29
+ }
@@ -0,0 +1,29 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const ctaAction = migration.editContentType('ctaAction')
6
+
7
+ ctaAction.editField('triggerMappingValue').validations([
8
+ {
9
+ in: ['Sign-in modal', 'Load More'],
10
+ },
11
+ ])
12
+
13
+ ctaAction.changeFieldControl('triggerMappingValue', 'builtin', 'dropdown', {
14
+ helpText: 'A trigger that determines the action of the CTA. Currently supported only for the Tile Collection module.',
15
+ })
16
+ },
17
+
18
+ // @ts-check
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: function (migration) {
21
+ const ctaAction = migration.editContentType('ctaAction')
22
+
23
+ ctaAction.editField('triggerMappingValue').validations([
24
+ {
25
+ in: ['Sign-in modal'],
26
+ },
27
+ ])
28
+ },
29
+ }
@@ -93,6 +93,11 @@ export const ctaFragment = gql `
93
93
  target
94
94
  anchor
95
95
  size
96
+ ctaAction {
97
+ title
98
+ ariaDescription
99
+ triggerMappingValue
100
+ }
96
101
  }
97
102
  `;
98
103
  export const tileLabelFragment = gql `
@@ -100,6 +100,11 @@ export const ctaFragment: DocumentNode = gql`
100
100
  target
101
101
  anchor
102
102
  size
103
+ ctaAction {
104
+ title
105
+ ariaDescription
106
+ triggerMappingValue
107
+ }
103
108
  }
104
109
  `
105
110
 
@@ -19,11 +19,17 @@ export const getTileLabel = gql `
19
19
  export const getTileCollection = gql `
20
20
  ${tileContentFragment}
21
21
  ${ctaFragment}
22
- query tileCollectionQuery($id: String!, $preview: Boolean = false) {
22
+ query tileCollectionQuery(
23
+ $id: String!
24
+ $preview: Boolean = false
25
+ $limit: Int = 10
26
+ $skip: Int = 0
27
+ ) {
23
28
  tileCollectionModule(id: $id, preview: $preview) {
24
29
  headline
25
30
  bodyCopy
26
- tilesCollection(limit: 6) {
31
+ tilesCollection(limit: $limit, skip: $skip) {
32
+ total
27
33
  items {
28
34
  ...tileContentFragment
29
35
  }
@@ -27,11 +27,17 @@ export const getTileLabel: DocumentNode = gql`
27
27
  export const getTileCollection: DocumentNode = gql`
28
28
  ${tileContentFragment}
29
29
  ${ctaFragment}
30
- query tileCollectionQuery($id: String!, $preview: Boolean = false) {
30
+ query tileCollectionQuery(
31
+ $id: String!
32
+ $preview: Boolean = false
33
+ $limit: Int = 10
34
+ $skip: Int = 0
35
+ ) {
31
36
  tileCollectionModule(id: $id, preview: $preview) {
32
37
  headline
33
38
  bodyCopy
34
- tilesCollection(limit: 6) {
39
+ tilesCollection(limit: $limit, skip: $skip) {
40
+ total
35
41
  items {
36
42
  ...tileContentFragment
37
43
  }
@@ -100,6 +100,11 @@ export const ctaFragment: DocumentNode = gql`
100
100
  target
101
101
  anchor
102
102
  size
103
+ ctaAction {
104
+ title
105
+ ariaDescription
106
+ triggerMappingValue
107
+ }
103
108
  }
104
109
  `
105
110
 
@@ -0,0 +1,29 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const ctaAction = migration.editContentType('ctaAction')
6
+
7
+ ctaAction.editField('triggerMappingValue').validations([
8
+ {
9
+ in: ['Sign-in modal', 'Load More'],
10
+ },
11
+ ])
12
+
13
+ ctaAction.changeFieldControl('triggerMappingValue', 'builtin', 'dropdown', {
14
+ helpText: 'A trigger that determines the action of the CTA. Currently supported only for the Tile Collection module.',
15
+ })
16
+ },
17
+
18
+ // @ts-check
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: function (migration) {
21
+ const ctaAction = migration.editContentType('ctaAction')
22
+
23
+ ctaAction.editField('triggerMappingValue').validations([
24
+ {
25
+ in: ['Sign-in modal'],
26
+ },
27
+ ])
28
+ },
29
+ }
@@ -100,6 +100,11 @@ export const ctaFragment: DocumentNode = gql`
100
100
  target
101
101
  anchor
102
102
  size
103
+ ctaAction {
104
+ title
105
+ ariaDescription
106
+ triggerMappingValue
107
+ }
103
108
  }
104
109
  `
105
110
 
@@ -27,11 +27,17 @@ export const getTileLabel: DocumentNode = gql`
27
27
  export const getTileCollection: DocumentNode = gql`
28
28
  ${tileContentFragment}
29
29
  ${ctaFragment}
30
- query tileCollectionQuery($id: String!, $preview: Boolean = false) {
30
+ query tileCollectionQuery(
31
+ $id: String!
32
+ $preview: Boolean = false
33
+ $limit: Int = 10
34
+ $skip: Int = 0
35
+ ) {
31
36
  tileCollectionModule(id: $id, preview: $preview) {
32
37
  headline
33
38
  bodyCopy
34
- tilesCollection(limit: 6) {
39
+ tilesCollection(limit: $limit, skip: $skip) {
40
+ total
35
41
  items {
36
42
  ...tileContentFragment
37
43
  }
@@ -0,0 +1,29 @@
1
+ module.exports = {
2
+ // @ts-check
3
+ /** @type { import('contentful-migration').MigrationFunction } */
4
+ up: function (migration) {
5
+ const ctaAction = migration.editContentType('ctaAction')
6
+
7
+ ctaAction.editField('triggerMappingValue').validations([
8
+ {
9
+ in: ['Sign-in modal', 'Load More'],
10
+ },
11
+ ])
12
+
13
+ ctaAction.changeFieldControl('triggerMappingValue', 'builtin', 'dropdown', {
14
+ helpText: 'A trigger that determines the action of the CTA. Currently supported only for the Tile Collection module.',
15
+ })
16
+ },
17
+
18
+ // @ts-check
19
+ /** @type { import('contentful-migration').MigrationFunction } */
20
+ down: function (migration) {
21
+ const ctaAction = migration.editContentType('ctaAction')
22
+
23
+ ctaAction.editField('triggerMappingValue').validations([
24
+ {
25
+ in: ['Sign-in modal'],
26
+ },
27
+ ])
28
+ },
29
+ }
@@ -27,11 +27,17 @@ export const getTileLabel: DocumentNode = gql`
27
27
  export const getTileCollection: DocumentNode = gql`
28
28
  ${tileContentFragment}
29
29
  ${ctaFragment}
30
- query tileCollectionQuery($id: String!, $preview: Boolean = false) {
30
+ query tileCollectionQuery(
31
+ $id: String!
32
+ $preview: Boolean = false
33
+ $limit: Int = 10
34
+ $skip: Int = 0
35
+ ) {
31
36
  tileCollectionModule(id: $id, preview: $preview) {
32
37
  headline
33
38
  bodyCopy
34
- tilesCollection(limit: 6) {
39
+ tilesCollection(limit: $limit, skip: $skip) {
40
+ total
35
41
  items {
36
42
  ...tileContentFragment
37
43
  }