@cooperco/cooper-component-library 0.1.114 → 0.1.115
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/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/carousel.query.ts +8 -0
- package/dist/cms/contentful/migrations/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/contentful/queries/carousel.query.js +8 -0
- package/dist/cms/contentful/queries/carousel.query.ts +8 -0
- package/dist/cms/migrations/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/queries/carousel.query.ts +8 -0
- package/dist/cms/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/lib/component-lib.js +2877 -2793
- package/dist/lib/component-lib.umd.cjs +24 -24
- package/dist/lib/style.css +1 -1
- package/dist/types/src/components/CarouselModule/CarouselModule.d.ts +2 -0
- package/dist/types/src/components/TileContent/TileContent.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const carousel = migration.editContentType('carouselModule')
|
|
6
|
+
|
|
7
|
+
carousel
|
|
8
|
+
.createField('backgroundImage')
|
|
9
|
+
.name('Background Image')
|
|
10
|
+
.type('Link')
|
|
11
|
+
.linkType('Entry')
|
|
12
|
+
.required(false)
|
|
13
|
+
.validations([{ linkContentType: ['image'] }])
|
|
14
|
+
|
|
15
|
+
carousel.moveField('backgroundImage').afterField('backgroundColor')
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const carousel = migration.editContentType('carouselModule')
|
|
22
|
+
carousel.deleteField('backgroundImage')
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag'
|
|
2
2
|
import type { DocumentNode } from 'graphql'
|
|
3
|
+
import { imageFragment } from './fragments.js'
|
|
3
4
|
|
|
4
5
|
export const getCarousel: DocumentNode = gql`
|
|
6
|
+
${imageFragment}
|
|
5
7
|
query carouselQuery($id: String!, $preview: Boolean = false) {
|
|
6
8
|
carouselModule(id: $id, preview: $preview) {
|
|
9
|
+
sys {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
7
12
|
headline
|
|
8
13
|
backgroundColor
|
|
9
14
|
variant
|
|
15
|
+
backgroundImage {
|
|
16
|
+
...imageFragment
|
|
17
|
+
}
|
|
10
18
|
carouselItemsCollection {
|
|
11
19
|
items {
|
|
12
20
|
... on TestimonialModule {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const carousel = migration.editContentType('carouselModule')
|
|
6
|
+
|
|
7
|
+
carousel
|
|
8
|
+
.createField('backgroundImage')
|
|
9
|
+
.name('Background Image')
|
|
10
|
+
.type('Link')
|
|
11
|
+
.linkType('Entry')
|
|
12
|
+
.required(false)
|
|
13
|
+
.validations([{ linkContentType: ['image'] }])
|
|
14
|
+
|
|
15
|
+
carousel.moveField('backgroundImage').afterField('backgroundColor')
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const carousel = migration.editContentType('carouselModule')
|
|
22
|
+
carousel.deleteField('backgroundImage')
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag';
|
|
2
|
+
import { imageFragment } from './fragments.js';
|
|
2
3
|
export const getCarousel = gql `
|
|
4
|
+
${imageFragment}
|
|
3
5
|
query carouselQuery($id: String!, $preview: Boolean = false) {
|
|
4
6
|
carouselModule(id: $id, preview: $preview) {
|
|
7
|
+
sys {
|
|
8
|
+
id
|
|
9
|
+
}
|
|
5
10
|
headline
|
|
6
11
|
backgroundColor
|
|
7
12
|
variant
|
|
13
|
+
backgroundImage {
|
|
14
|
+
...imageFragment
|
|
15
|
+
}
|
|
8
16
|
carouselItemsCollection {
|
|
9
17
|
items {
|
|
10
18
|
... on TestimonialModule {
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag'
|
|
2
2
|
import type { DocumentNode } from 'graphql'
|
|
3
|
+
import { imageFragment } from './fragments.js'
|
|
3
4
|
|
|
4
5
|
export const getCarousel: DocumentNode = gql`
|
|
6
|
+
${imageFragment}
|
|
5
7
|
query carouselQuery($id: String!, $preview: Boolean = false) {
|
|
6
8
|
carouselModule(id: $id, preview: $preview) {
|
|
9
|
+
sys {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
7
12
|
headline
|
|
8
13
|
backgroundColor
|
|
9
14
|
variant
|
|
15
|
+
backgroundImage {
|
|
16
|
+
...imageFragment
|
|
17
|
+
}
|
|
10
18
|
carouselItemsCollection {
|
|
11
19
|
items {
|
|
12
20
|
... on TestimonialModule {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const carousel = migration.editContentType('carouselModule')
|
|
6
|
+
|
|
7
|
+
carousel
|
|
8
|
+
.createField('backgroundImage')
|
|
9
|
+
.name('Background Image')
|
|
10
|
+
.type('Link')
|
|
11
|
+
.linkType('Entry')
|
|
12
|
+
.required(false)
|
|
13
|
+
.validations([{ linkContentType: ['image'] }])
|
|
14
|
+
|
|
15
|
+
carousel.moveField('backgroundImage').afterField('backgroundColor')
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const carousel = migration.editContentType('carouselModule')
|
|
22
|
+
carousel.deleteField('backgroundImage')
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { gql } from 'graphql-tag'
|
|
2
2
|
import type { DocumentNode } from 'graphql'
|
|
3
|
+
import { imageFragment } from './fragments.js'
|
|
3
4
|
|
|
4
5
|
export const getCarousel: DocumentNode = gql`
|
|
6
|
+
${imageFragment}
|
|
5
7
|
query carouselQuery($id: String!, $preview: Boolean = false) {
|
|
6
8
|
carouselModule(id: $id, preview: $preview) {
|
|
9
|
+
sys {
|
|
10
|
+
id
|
|
11
|
+
}
|
|
7
12
|
headline
|
|
8
13
|
backgroundColor
|
|
9
14
|
variant
|
|
15
|
+
backgroundImage {
|
|
16
|
+
...imageFragment
|
|
17
|
+
}
|
|
10
18
|
carouselItemsCollection {
|
|
11
19
|
items {
|
|
12
20
|
... on TestimonialModule {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const carousel = migration.editContentType('carouselModule')
|
|
6
|
+
|
|
7
|
+
carousel
|
|
8
|
+
.createField('backgroundImage')
|
|
9
|
+
.name('Background Image')
|
|
10
|
+
.type('Link')
|
|
11
|
+
.linkType('Entry')
|
|
12
|
+
.required(false)
|
|
13
|
+
.validations([{ linkContentType: ['image'] }])
|
|
14
|
+
|
|
15
|
+
carousel.moveField('backgroundImage').afterField('backgroundColor')
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const carousel = migration.editContentType('carouselModule')
|
|
22
|
+
carousel.deleteField('backgroundImage')
|
|
23
|
+
},
|
|
24
|
+
}
|