@cooperco/cooper-component-library 0.1.102 → 0.1.104
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/package.json +1 -1
- package/dist/cms/0058-update-cta.js +0 -16
- package/dist/cms/0059-update-navigation-element.js +0 -23
- package/dist/cms/0060-update-testimonial-module.js +0 -24
- package/dist/cms/0076-rename-image-to-media-tile-content.cjs +0 -34
- package/dist/cms/0077-add-feature-variant-to-container-module.cjs +0 -37
- package/dist/cms/0085-add-table-highlight-to-content-module.cjs +0 -30
- package/dist/cms/0085-add-vertical-alignment-to-content-module.cjs +0 -36
- package/dist/cms/0086-add-background-image-to-carousel.cjs +0 -24
- package/dist/cms/contentful/graphql/queries/accordion.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/accordion.query.js +0 -19
- package/dist/cms/contentful/graphql/queries/carousel.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/carousel.query.js +0 -32
- package/dist/cms/contentful/graphql/queries/containerModule.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/containerModule.query.js +0 -140
- package/dist/cms/contentful/graphql/queries/contentModule.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/contentModule.query.js +0 -49
- package/dist/cms/contentful/graphql/queries/cta.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/cta.query.js +0 -10
- package/dist/cms/contentful/graphql/queries/footer.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/footer.query.js +0 -44
- package/dist/cms/contentful/graphql/queries/fragments.d.ts +0 -11
- package/dist/cms/contentful/graphql/queries/fragments.js +0 -172
- package/dist/cms/contentful/graphql/queries/header.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/header.query.js +0 -39
- package/dist/cms/contentful/graphql/queries/image.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/image.query.js +0 -10
- package/dist/cms/contentful/graphql/queries/index.d.ts +0 -18
- package/dist/cms/contentful/graphql/queries/index.js +0 -18
- package/dist/cms/contentful/graphql/queries/link.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/link.query.js +0 -10
- package/dist/cms/contentful/graphql/queries/logoCollection.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/logoCollection.query.js +0 -16
- package/dist/cms/contentful/graphql/queries/navigation.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/navigation.query.js +0 -10
- package/dist/cms/contentful/graphql/queries/page.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/page.query.js +0 -23
- package/dist/cms/contentful/graphql/queries/pageMetadata.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/pageMetadata.query.js +0 -16
- package/dist/cms/contentful/graphql/queries/productModule.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/productModule.query.js +0 -59
- package/dist/cms/contentful/graphql/queries/testimonial.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/testimonial.query.js +0 -23
- package/dist/cms/contentful/graphql/queries/tileCollection.query.d.ts +0 -4
- package/dist/cms/contentful/graphql/queries/tileCollection.query.js +0 -35
- package/dist/cms/contentful/graphql/queries/video.query.d.ts +0 -2
- package/dist/cms/contentful/graphql/queries/video.query.js +0 -11
- package/dist/cms/contentful/migrations/drafts/0058-update-cta.js +0 -16
- package/dist/cms/contentful/migrations/drafts/0059-update-navigation-element.js +0 -23
- package/dist/cms/contentful/migrations/drafts/create-hello-banner.cjs +0 -62
- package/dist/cms/contentful/migrations/scripts/0060-update-testimonial-module.js +0 -24
- package/dist/cms/contentful/migrations/scripts/0076-rename-image-to-media-tile-content.cjs +0 -34
- package/dist/cms/contentful/migrations/scripts/0077-add-feature-variant-to-container-module.cjs +0 -37
- package/dist/cms/contentful/migrations/scripts/0085-add-table-highlight-to-content-module.cjs +0 -30
- package/dist/cms/contentful/migrations/scripts/0085-add-vertical-alignment-to-content-module.cjs +0 -36
- package/dist/cms/contentful/migrations/scripts/0086-add-background-image-to-carousel.cjs +0 -24
- package/dist/cms/create-hello-banner.cjs +0 -62
- package/dist/cms/drafts/0058-update-cta.js +0 -16
- package/dist/cms/drafts/0059-update-navigation-element.js +0 -23
- package/dist/cms/drafts/create-hello-banner.cjs +0 -62
- package/dist/cms/migrations/drafts/0058-update-cta.js +0 -16
- package/dist/cms/migrations/drafts/0059-update-navigation-element.js +0 -23
- package/dist/cms/migrations/drafts/create-hello-banner.cjs +0 -62
- package/dist/cms/migrations/scripts/0060-update-testimonial-module.js +0 -24
- package/dist/cms/migrations/scripts/0076-rename-image-to-media-tile-content.cjs +0 -34
- package/dist/cms/migrations/scripts/0077-add-feature-variant-to-container-module.cjs +0 -37
- package/dist/cms/migrations/scripts/0085-add-table-highlight-to-content-module.cjs +0 -30
- package/dist/cms/migrations/scripts/0085-add-vertical-alignment-to-content-module.cjs +0 -36
- package/dist/cms/migrations/scripts/0086-add-background-image-to-carousel.cjs +0 -24
- package/dist/cms/scripts/0060-update-testimonial-module.js +0 -24
- package/dist/cms/scripts/0076-rename-image-to-media-tile-content.cjs +0 -34
- package/dist/cms/scripts/0077-add-feature-variant-to-container-module.cjs +0 -37
- package/dist/cms/scripts/0085-add-table-highlight-to-content-module.cjs +0 -30
- package/dist/cms/scripts/0085-add-vertical-alignment-to-content-module.cjs +0 -36
- package/dist/cms/scripts/0086-add-background-image-to-carousel.cjs +0 -24
- package/dist/types/App.vue.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/accordion.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/carousel.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/containerModule.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/contentModule.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/cta.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/footer.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/fragments.d.ts +0 -11
- package/dist/types/cms/contentful/graphql/queries/header.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/image.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/index.d.ts +0 -18
- package/dist/types/cms/contentful/graphql/queries/link.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/logoCollection.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/navigation.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/page.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/pageMetadata.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/productModule.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/testimonial.query.d.ts +0 -2
- package/dist/types/cms/contentful/graphql/queries/tileCollection.query.d.ts +0 -4
- package/dist/types/cms/contentful/graphql/queries/video.query.d.ts +0 -2
- package/dist/types/components/Accordion/Accordion.d.ts +0 -19
- package/dist/types/components/Accordion/Accordion.vue.d.ts +0 -5
- package/dist/types/components/Accordion/AccordionItem.d.ts +0 -24
- package/dist/types/components/Accordion/AccordionItem.vue.d.ts +0 -9
- package/dist/types/components/Accordion/AccordionListItem.vue.d.ts +0 -3
- package/dist/types/components/Accordion/AccordionTileItem.vue.d.ts +0 -7
- package/dist/types/components/AnimationWrapper/AnimationWrapper.d.ts +0 -7
- package/dist/types/components/AnimationWrapper/AnimationWrapper.vue.d.ts +0 -10
- package/dist/types/components/CTA/CTA.d.ts +0 -25
- package/dist/types/components/CTA/CTA.vue.d.ts +0 -7
- package/dist/types/components/CarouselModule/CarouselModule.d.ts +0 -22
- package/dist/types/components/CarouselModule/CarouselModule.vue.d.ts +0 -5
- package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.d.ts +0 -10
- package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.vue.d.ts +0 -3
- package/dist/types/components/ContainerModule/ContainerModule.d.ts +0 -29
- package/dist/types/components/ContainerModule/ContainerModule.vue.d.ts +0 -14
- package/dist/types/components/ContentModule/ContentModule.d.ts +0 -31
- package/dist/types/components/ContentModule/ContentModule.vue.d.ts +0 -7
- package/dist/types/components/Footer/FooterCopyright/FooterCopyright.d.ts +0 -10
- package/dist/types/components/Footer/FooterCopyright/FooterCopyright.vue.d.ts +0 -3
- package/dist/types/components/Footer/FooterNavigation/FooterNavigation.d.ts +0 -14
- package/dist/types/components/Footer/FooterNavigation/FooterNavigation.vue.d.ts +0 -3
- package/dist/types/components/Footer/SocialMediaRef/SocialMediaRef.d.ts +0 -4
- package/dist/types/components/Footer/SocialMediaRef/SocialMediaRef.vue.d.ts +0 -3
- package/dist/types/components/Image/Image.d.ts +0 -15
- package/dist/types/components/Image/Image.vue.d.ts +0 -6
- package/dist/types/components/LogoCollectionModule/LogoCollectionModule.d.ts +0 -9
- package/dist/types/components/LogoCollectionModule/LogoCollectionModule.vue.d.ts +0 -3
- package/dist/types/components/NavigationElement/NavigationElement.d.ts +0 -20
- package/dist/types/components/NavigationElement/NavigationElement.vue.d.ts +0 -3
- package/dist/types/components/PrimaryNavigation/PrimaryNavigation.d.ts +0 -10
- package/dist/types/components/PrimaryNavigation/PrimaryNavigation.vue.d.ts +0 -9
- package/dist/types/components/SplitModule/SplitModule.d.ts +0 -16
- package/dist/types/components/SplitModule/SplitModule.vue.d.ts +0 -3
- package/dist/types/components/TestimonialModule/TestimonialModule.d.ts +0 -21
- package/dist/types/components/TestimonialModule/TestimonialModule.vue.d.ts +0 -3
- package/dist/types/components/TileCollectionModule/TileCollectionModule.d.ts +0 -18
- package/dist/types/components/TileCollectionModule/TileCollectionModule.vue.d.ts +0 -6
- package/dist/types/components/TileContent/TileContent.d.ts +0 -55
- package/dist/types/components/TileContent/TileContentIconTile.vue.d.ts +0 -5
- package/dist/types/components/TileContent/TileContentImageStackedAnimatedTile.vue.d.ts +0 -3
- package/dist/types/components/TileContent/TileContentImageTile.vue.d.ts +0 -5
- package/dist/types/components/TileContent/TileContentTextTile.vue.d.ts +0 -5
- package/dist/types/components/TileContent/TileContentVideoTile.vue.d.ts +0 -5
- package/dist/types/components/TileLabel/TileLabel.d.ts +0 -14
- package/dist/types/components/TileLabel/TileLabel.vue.d.ts +0 -6
- package/dist/types/components/Video/Video.d.ts +0 -7
- package/dist/types/components/Video/Video.vue.d.ts +0 -3
- package/dist/types/components/components.d.ts +0 -26
- package/dist/types/components/types.d.ts +0 -19
- package/dist/types/config/colorPalettes.d.ts +0 -59
- package/dist/types/config/defaultPassthrough/config.d.ts +0 -3
- package/dist/types/config/defaultPassthrough/index.d.ts +0 -67
- package/dist/types/config/defaultPassthrough/types.d.ts +0 -51
- package/dist/types/index.d.ts +0 -13
- package/dist/types/init.d.ts +0 -3
- package/dist/types/pages/index.vue.d.ts +0 -2
- package/dist/types/router.d.ts +0 -5
- package/dist/types/src/components/HelloBar/HelloBar.d.ts +0 -23
- package/dist/types/src/components/HelloBar/HelloBar.vue.d.ts +0 -3
- package/dist/types/src/components/_internal/SimpleCard.vue.d.ts +0 -16
- package/dist/types/src/components/_internal/SimpleCarousel.vue.d.ts +0 -63
- package/dist/types/src/config/defaultPassthrough/ChartModulePt.d.ts +0 -1
- package/dist/types/types.d.ts +0 -61
- package/dist/types/utils/getTarget.d.ts +0 -2
package/dist/cms/contentful/migrations/scripts/0077-add-feature-variant-to-container-module.cjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: function (migration) {
|
|
5
|
-
const containerModule = migration.editContentType('containerModule')
|
|
6
|
-
containerModule.editField('variant').items({
|
|
7
|
-
type: 'Symbol',
|
|
8
|
-
validations: [
|
|
9
|
-
{
|
|
10
|
-
in: ['Hero', 'Centered', 'Feature'],
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
})
|
|
14
|
-
containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
|
|
15
|
-
helpText:
|
|
16
|
-
'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
|
|
17
|
-
})
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
// @ts-check
|
|
21
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
22
|
-
down: async function (migration) {
|
|
23
|
-
const containerModule = migration.editContentType('containerModule')
|
|
24
|
-
containerModule.editField('variant').items({
|
|
25
|
-
type: 'Symbol',
|
|
26
|
-
validations: [
|
|
27
|
-
{
|
|
28
|
-
in: ['Hero', 'Centered'],
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
})
|
|
32
|
-
containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
|
|
33
|
-
helpText:
|
|
34
|
-
'Determines Text size and alignment will be top left unless centered is selected as well',
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
}
|
package/dist/cms/contentful/migrations/scripts/0085-add-table-highlight-to-content-module.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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.createField('tableHighlight', {
|
|
8
|
-
name: 'Table Highlight',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
validations: [
|
|
11
|
-
{
|
|
12
|
-
in: ['Row', 'Column'],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
contentModule.changeFieldControl('tableHighlight', 'builtin', 'dropdown', {
|
|
18
|
-
helpText: 'This field only applies when displaying a table in the body copy',
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
contentModule.moveField('tableHighlight').afterField('bodyCopyAlignment')
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
// @ts-check
|
|
25
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
26
|
-
down: function (migration) {
|
|
27
|
-
const contentModule = migration.editContentType('contentModule')
|
|
28
|
-
contentModule.deleteField('tableHighlight')
|
|
29
|
-
},
|
|
30
|
-
}
|
package/dist/cms/contentful/migrations/scripts/0085-add-vertical-alignment-to-content-module.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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.createField('verticalAlignment', {
|
|
8
|
-
name: 'Vertical Alignment',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
validations: [
|
|
11
|
-
{
|
|
12
|
-
in: ['Top', 'Center', 'Bottom'],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
contentModule.changeFieldControl(
|
|
18
|
-
'verticalAlignment',
|
|
19
|
-
'builtin',
|
|
20
|
-
'dropdown',
|
|
21
|
-
{
|
|
22
|
-
helpText:
|
|
23
|
-
'Set the vertical alignment of the content module within its container.',
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
contentModule.moveField('verticalAlignment').afterField('alignment')
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
// @ts-check
|
|
31
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
-
down: function (migration) {
|
|
33
|
-
const contentModule = migration.editContentType('contentModule')
|
|
34
|
-
contentModule.deleteField('verticalAlignment')
|
|
35
|
-
},
|
|
36
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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,62 +0,0 @@
|
|
|
1
|
-
const addEntryNameField = require('../helpers/addEntryNameField.cjs')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// @ts-check
|
|
5
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
6
|
-
up: async function (migration) {
|
|
7
|
-
const helloBanner = migration.createContentType('helloBanner', {
|
|
8
|
-
name: 'Hello Banner',
|
|
9
|
-
displayField: 'entryName',
|
|
10
|
-
description: 'Manage the hello banner component',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
// Add required entryName field
|
|
14
|
-
addEntryNameField(helloBanner)
|
|
15
|
-
|
|
16
|
-
// Active field
|
|
17
|
-
helloBanner
|
|
18
|
-
.createField('active')
|
|
19
|
-
.name('Active')
|
|
20
|
-
.type('Boolean')
|
|
21
|
-
.required(true)
|
|
22
|
-
.defaultValue({ 'en-US': false })
|
|
23
|
-
helloBanner.changeFieldControl('active', 'builtin', 'boolean', {
|
|
24
|
-
helpText: 'Toggle to show/hide the hello banner',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Full Copy field
|
|
28
|
-
helloBanner
|
|
29
|
-
.createField('fullCopy')
|
|
30
|
-
.name('Full Copy')
|
|
31
|
-
.type('Text')
|
|
32
|
-
.required(true)
|
|
33
|
-
helloBanner.changeFieldControl('fullCopy', 'builtin', 'multipleLine', {
|
|
34
|
-
helpText: 'Main promotional text displayed on desktop and mobile expanded',
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Mobile Collapsed field
|
|
38
|
-
helloBanner
|
|
39
|
-
.createField('mobileCollapsed')
|
|
40
|
-
.name('Mobile Collapsed')
|
|
41
|
-
.type('Symbol')
|
|
42
|
-
.required(true)
|
|
43
|
-
helloBanner.changeFieldControl('mobileCollapsed', 'builtin', 'singleLine', {
|
|
44
|
-
helpText: 'Text displayed when the hello banner is collapsed on mobile devices',
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// CTA reference
|
|
48
|
-
helloBanner.createField('cta', {
|
|
49
|
-
name: 'CTA',
|
|
50
|
-
type: 'Link',
|
|
51
|
-
linkType: 'Entry',
|
|
52
|
-
required: false,
|
|
53
|
-
validations: [{ linkContentType: ['cta'] }],
|
|
54
|
-
})
|
|
55
|
-
helloBanner.changeFieldControl('cta', 'builtin', 'entryLinkEditor', {
|
|
56
|
-
helpText: 'Call-to-action button or link',
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
down: async function (migration) {
|
|
60
|
-
await migration.deleteContentType('helloBanner')
|
|
61
|
-
},
|
|
62
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
-
up: function (migration) {
|
|
4
|
-
const cta = migration.editContentType('cta')
|
|
5
|
-
|
|
6
|
-
cta.createField('highlighted', {
|
|
7
|
-
name: 'Highlighted',
|
|
8
|
-
type: 'Boolean',
|
|
9
|
-
defaultValue: false,
|
|
10
|
-
})
|
|
11
|
-
},
|
|
12
|
-
down: function (migration) {
|
|
13
|
-
const cta = migration.editContentType('cta')
|
|
14
|
-
cta.deleteField('highlighted')
|
|
15
|
-
},
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
-
up: function (migration) {
|
|
4
|
-
const navigationElement = migration.editContentType('navigationElement')
|
|
5
|
-
|
|
6
|
-
navigationElement.createField('highlighted', {
|
|
7
|
-
name: 'Highlighted',
|
|
8
|
-
type: 'Boolean',
|
|
9
|
-
defaultValue: false,
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
navigationElement.createField('expandedMobile', {
|
|
13
|
-
name: 'Expanded Mobile',
|
|
14
|
-
type: 'Boolean',
|
|
15
|
-
defaultValue: false,
|
|
16
|
-
})
|
|
17
|
-
},
|
|
18
|
-
down: function (migration) {
|
|
19
|
-
const navigationElement = migration.editContentType('navigationElement')
|
|
20
|
-
navigationElement.deleteField('highlighted')
|
|
21
|
-
navigationElement.deleteField('expandedMobile')
|
|
22
|
-
},
|
|
23
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const addEntryNameField = require('../helpers/addEntryNameField.cjs')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// @ts-check
|
|
5
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
6
|
-
up: async function (migration) {
|
|
7
|
-
const helloBanner = migration.createContentType('helloBanner', {
|
|
8
|
-
name: 'Hello Banner',
|
|
9
|
-
displayField: 'entryName',
|
|
10
|
-
description: 'Manage the hello banner component',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
// Add required entryName field
|
|
14
|
-
addEntryNameField(helloBanner)
|
|
15
|
-
|
|
16
|
-
// Active field
|
|
17
|
-
helloBanner
|
|
18
|
-
.createField('active')
|
|
19
|
-
.name('Active')
|
|
20
|
-
.type('Boolean')
|
|
21
|
-
.required(true)
|
|
22
|
-
.defaultValue({ 'en-US': false })
|
|
23
|
-
helloBanner.changeFieldControl('active', 'builtin', 'boolean', {
|
|
24
|
-
helpText: 'Toggle to show/hide the hello banner',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Full Copy field
|
|
28
|
-
helloBanner
|
|
29
|
-
.createField('fullCopy')
|
|
30
|
-
.name('Full Copy')
|
|
31
|
-
.type('Text')
|
|
32
|
-
.required(true)
|
|
33
|
-
helloBanner.changeFieldControl('fullCopy', 'builtin', 'multipleLine', {
|
|
34
|
-
helpText: 'Main promotional text displayed on desktop and mobile expanded',
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Mobile Collapsed field
|
|
38
|
-
helloBanner
|
|
39
|
-
.createField('mobileCollapsed')
|
|
40
|
-
.name('Mobile Collapsed')
|
|
41
|
-
.type('Symbol')
|
|
42
|
-
.required(true)
|
|
43
|
-
helloBanner.changeFieldControl('mobileCollapsed', 'builtin', 'singleLine', {
|
|
44
|
-
helpText: 'Text displayed when the hello banner is collapsed on mobile devices',
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// CTA reference
|
|
48
|
-
helloBanner.createField('cta', {
|
|
49
|
-
name: 'CTA',
|
|
50
|
-
type: 'Link',
|
|
51
|
-
linkType: 'Entry',
|
|
52
|
-
required: false,
|
|
53
|
-
validations: [{ linkContentType: ['cta'] }],
|
|
54
|
-
})
|
|
55
|
-
helloBanner.changeFieldControl('cta', 'builtin', 'entryLinkEditor', {
|
|
56
|
-
helpText: 'Call-to-action button or link',
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
down: async function (migration) {
|
|
60
|
-
await migration.deleteContentType('helloBanner')
|
|
61
|
-
},
|
|
62
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
-
up: function (migration) {
|
|
4
|
-
const cta = migration.editContentType('cta')
|
|
5
|
-
|
|
6
|
-
cta.createField('highlighted', {
|
|
7
|
-
name: 'Highlighted',
|
|
8
|
-
type: 'Boolean',
|
|
9
|
-
defaultValue: false,
|
|
10
|
-
})
|
|
11
|
-
},
|
|
12
|
-
down: function (migration) {
|
|
13
|
-
const cta = migration.editContentType('cta')
|
|
14
|
-
cta.deleteField('highlighted')
|
|
15
|
-
},
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
-
up: function (migration) {
|
|
4
|
-
const navigationElement = migration.editContentType('navigationElement')
|
|
5
|
-
|
|
6
|
-
navigationElement.createField('highlighted', {
|
|
7
|
-
name: 'Highlighted',
|
|
8
|
-
type: 'Boolean',
|
|
9
|
-
defaultValue: false,
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
navigationElement.createField('expandedMobile', {
|
|
13
|
-
name: 'Expanded Mobile',
|
|
14
|
-
type: 'Boolean',
|
|
15
|
-
defaultValue: false,
|
|
16
|
-
})
|
|
17
|
-
},
|
|
18
|
-
down: function (migration) {
|
|
19
|
-
const navigationElement = migration.editContentType('navigationElement')
|
|
20
|
-
navigationElement.deleteField('highlighted')
|
|
21
|
-
navigationElement.deleteField('expandedMobile')
|
|
22
|
-
},
|
|
23
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const addEntryNameField = require('../helpers/addEntryNameField.cjs')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// @ts-check
|
|
5
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
6
|
-
up: async function (migration) {
|
|
7
|
-
const helloBanner = migration.createContentType('helloBanner', {
|
|
8
|
-
name: 'Hello Banner',
|
|
9
|
-
displayField: 'entryName',
|
|
10
|
-
description: 'Manage the hello banner component',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
// Add required entryName field
|
|
14
|
-
addEntryNameField(helloBanner)
|
|
15
|
-
|
|
16
|
-
// Active field
|
|
17
|
-
helloBanner
|
|
18
|
-
.createField('active')
|
|
19
|
-
.name('Active')
|
|
20
|
-
.type('Boolean')
|
|
21
|
-
.required(true)
|
|
22
|
-
.defaultValue({ 'en-US': false })
|
|
23
|
-
helloBanner.changeFieldControl('active', 'builtin', 'boolean', {
|
|
24
|
-
helpText: 'Toggle to show/hide the hello banner',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Full Copy field
|
|
28
|
-
helloBanner
|
|
29
|
-
.createField('fullCopy')
|
|
30
|
-
.name('Full Copy')
|
|
31
|
-
.type('Text')
|
|
32
|
-
.required(true)
|
|
33
|
-
helloBanner.changeFieldControl('fullCopy', 'builtin', 'multipleLine', {
|
|
34
|
-
helpText: 'Main promotional text displayed on desktop and mobile expanded',
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Mobile Collapsed field
|
|
38
|
-
helloBanner
|
|
39
|
-
.createField('mobileCollapsed')
|
|
40
|
-
.name('Mobile Collapsed')
|
|
41
|
-
.type('Symbol')
|
|
42
|
-
.required(true)
|
|
43
|
-
helloBanner.changeFieldControl('mobileCollapsed', 'builtin', 'singleLine', {
|
|
44
|
-
helpText: 'Text displayed when the hello banner is collapsed on mobile devices',
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// CTA reference
|
|
48
|
-
helloBanner.createField('cta', {
|
|
49
|
-
name: 'CTA',
|
|
50
|
-
type: 'Link',
|
|
51
|
-
linkType: 'Entry',
|
|
52
|
-
required: false,
|
|
53
|
-
validations: [{ linkContentType: ['cta'] }],
|
|
54
|
-
})
|
|
55
|
-
helloBanner.changeFieldControl('cta', 'builtin', 'entryLinkEditor', {
|
|
56
|
-
helpText: 'Call-to-action button or link',
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
down: async function (migration) {
|
|
60
|
-
await migration.deleteContentType('helloBanner')
|
|
61
|
-
},
|
|
62
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: async function (migration) {
|
|
5
|
-
const testimonialModule = migration.editContentType('testimonialModule')
|
|
6
|
-
|
|
7
|
-
testimonialModule.createField('mediaPosition', {
|
|
8
|
-
name: 'Media Position',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
defaultValue: {
|
|
11
|
-
'en-US': 'Left',
|
|
12
|
-
},
|
|
13
|
-
validations: [
|
|
14
|
-
{
|
|
15
|
-
in: ['Left', 'Right'],
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
down: async function (migration) {
|
|
21
|
-
const testimonialModule = migration.editContentType('testimonialModule')
|
|
22
|
-
testimonialModule.deleteField('mediaPosition')
|
|
23
|
-
},
|
|
24
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: function (migration) {
|
|
5
|
-
const tileContent = migration.editContentType('tileContent')
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Create the new media field with support for both image and video
|
|
9
|
-
tileContent.editField('image', {
|
|
10
|
-
name: 'Media',
|
|
11
|
-
type: 'Link',
|
|
12
|
-
linkType: 'Entry',
|
|
13
|
-
required: false,
|
|
14
|
-
validations: [{ linkContentType: ['image', 'video'] }],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// @ts-check
|
|
20
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
21
|
-
down: async function (migration) {
|
|
22
|
-
const tileContent = migration.editContentType('tileContent')
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// Restore the old image field
|
|
26
|
-
tileContent.editField('image', {
|
|
27
|
-
name: 'Image',
|
|
28
|
-
type: 'Link',
|
|
29
|
-
linkType: 'Entry',
|
|
30
|
-
required: false,
|
|
31
|
-
validations: [{ linkContentType: ['image'] }],
|
|
32
|
-
})
|
|
33
|
-
},
|
|
34
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: function (migration) {
|
|
5
|
-
const containerModule = migration.editContentType('containerModule')
|
|
6
|
-
containerModule.editField('variant').items({
|
|
7
|
-
type: 'Symbol',
|
|
8
|
-
validations: [
|
|
9
|
-
{
|
|
10
|
-
in: ['Hero', 'Centered', 'Feature'],
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
})
|
|
14
|
-
containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
|
|
15
|
-
helpText:
|
|
16
|
-
'Determines layout style. Hero: full-bleed page hero with h1. Centered: standard centered layout. Feature: 50/50 split with flush image, stacks at tablet.',
|
|
17
|
-
})
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
// @ts-check
|
|
21
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
22
|
-
down: async function (migration) {
|
|
23
|
-
const containerModule = migration.editContentType('containerModule')
|
|
24
|
-
containerModule.editField('variant').items({
|
|
25
|
-
type: 'Symbol',
|
|
26
|
-
validations: [
|
|
27
|
-
{
|
|
28
|
-
in: ['Hero', 'Centered'],
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
})
|
|
32
|
-
containerModule.changeFieldControl('variant', 'builtin', 'checkbox', {
|
|
33
|
-
helpText:
|
|
34
|
-
'Determines Text size and alignment will be top left unless centered is selected as well',
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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.createField('tableHighlight', {
|
|
8
|
-
name: 'Table Highlight',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
validations: [
|
|
11
|
-
{
|
|
12
|
-
in: ['Row', 'Column'],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
contentModule.changeFieldControl('tableHighlight', 'builtin', 'dropdown', {
|
|
18
|
-
helpText: 'This field only applies when displaying a table in the body copy',
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
contentModule.moveField('tableHighlight').afterField('bodyCopyAlignment')
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
// @ts-check
|
|
25
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
26
|
-
down: function (migration) {
|
|
27
|
-
const contentModule = migration.editContentType('contentModule')
|
|
28
|
-
contentModule.deleteField('tableHighlight')
|
|
29
|
-
},
|
|
30
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
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.createField('verticalAlignment', {
|
|
8
|
-
name: 'Vertical Alignment',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
validations: [
|
|
11
|
-
{
|
|
12
|
-
in: ['Top', 'Center', 'Bottom'],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
contentModule.changeFieldControl(
|
|
18
|
-
'verticalAlignment',
|
|
19
|
-
'builtin',
|
|
20
|
-
'dropdown',
|
|
21
|
-
{
|
|
22
|
-
helpText:
|
|
23
|
-
'Set the vertical alignment of the content module within its container.',
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
contentModule.moveField('verticalAlignment').afterField('alignment')
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
// @ts-check
|
|
31
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
-
down: function (migration) {
|
|
33
|
-
const contentModule = migration.editContentType('contentModule')
|
|
34
|
-
contentModule.deleteField('verticalAlignment')
|
|
35
|
-
},
|
|
36
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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,24 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: async function (migration) {
|
|
5
|
-
const testimonialModule = migration.editContentType('testimonialModule')
|
|
6
|
-
|
|
7
|
-
testimonialModule.createField('mediaPosition', {
|
|
8
|
-
name: 'Media Position',
|
|
9
|
-
type: 'Symbol',
|
|
10
|
-
defaultValue: {
|
|
11
|
-
'en-US': 'Left',
|
|
12
|
-
},
|
|
13
|
-
validations: [
|
|
14
|
-
{
|
|
15
|
-
in: ['Left', 'Right'],
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
down: async function (migration) {
|
|
21
|
-
const testimonialModule = migration.editContentType('testimonialModule')
|
|
22
|
-
testimonialModule.deleteField('mediaPosition')
|
|
23
|
-
},
|
|
24
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// @ts-check
|
|
3
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
-
up: function (migration) {
|
|
5
|
-
const tileContent = migration.editContentType('tileContent')
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Create the new media field with support for both image and video
|
|
9
|
-
tileContent.editField('image', {
|
|
10
|
-
name: 'Media',
|
|
11
|
-
type: 'Link',
|
|
12
|
-
linkType: 'Entry',
|
|
13
|
-
required: false,
|
|
14
|
-
validations: [{ linkContentType: ['image', 'video'] }],
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// @ts-check
|
|
20
|
-
/** @type { import('contentful-migration').MigrationFunction } */
|
|
21
|
-
down: async function (migration) {
|
|
22
|
-
const tileContent = migration.editContentType('tileContent')
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// Restore the old image field
|
|
26
|
-
tileContent.editField('image', {
|
|
27
|
-
name: 'Image',
|
|
28
|
-
type: 'Link',
|
|
29
|
-
linkType: 'Entry',
|
|
30
|
-
required: false,
|
|
31
|
-
validations: [{ linkContentType: ['image'] }],
|
|
32
|
-
})
|
|
33
|
-
},
|
|
34
|
-
}
|