@cooperco/cooper-component-library 0.1.116 → 0.1.117
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.
- package/dist/cms/0089-add-load-more-to-cta-action-trigger-mapping-value.cjs +29 -0
- package/dist/cms/contentful/migrations/scripts/0089-add-load-more-to-cta-action-trigger-mapping-value.cjs +29 -0
- package/dist/cms/contentful/queries/fragments.js +5 -0
- package/dist/cms/contentful/queries/fragments.ts +5 -0
- package/dist/cms/contentful/queries/tileCollection.query.js +8 -2
- package/dist/cms/contentful/queries/tileCollection.query.ts +8 -2
- package/dist/cms/fragments.ts +5 -0
- package/dist/cms/migrations/scripts/0089-add-load-more-to-cta-action-trigger-mapping-value.cjs +29 -0
- package/dist/cms/queries/fragments.ts +5 -0
- package/dist/cms/queries/tileCollection.query.ts +8 -2
- package/dist/cms/scripts/0089-add-load-more-to-cta-action-trigger-mapping-value.cjs +29 -0
- package/dist/cms/tileCollection.query.ts +8 -2
- package/dist/lib/component-lib.js +2370 -2312
- package/dist/lib/component-lib.umd.cjs +20 -20
- package/dist/types/src/components/CTA/CTA.d.ts +1 -0
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.d.ts +2 -0
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.vue.d.ts +6 -1
- package/dist/types/src/utils/constants.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -19,11 +19,17 @@ export const getTileLabel = gql `
|
|
|
19
19
|
export const getTileCollection = gql `
|
|
20
20
|
${tileContentFragment}
|
|
21
21
|
${ctaFragment}
|
|
22
|
-
query tileCollectionQuery(
|
|
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:
|
|
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(
|
|
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:
|
|
39
|
+
tilesCollection(limit: $limit, skip: $skip) {
|
|
40
|
+
total
|
|
35
41
|
items {
|
|
36
42
|
...tileContentFragment
|
|
37
43
|
}
|
package/dist/cms/fragments.ts
CHANGED
package/dist/cms/migrations/scripts/0089-add-load-more-to-cta-action-trigger-mapping-value.cjs
ADDED
|
@@ -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(
|
|
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:
|
|
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(
|
|
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:
|
|
39
|
+
tilesCollection(limit: $limit, skip: $skip) {
|
|
40
|
+
total
|
|
35
41
|
items {
|
|
36
42
|
...tileContentFragment
|
|
37
43
|
}
|