@cooperco/cooper-component-library 0.1.100 → 0.1.102
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/0085-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/0087-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/containerModule.query.ts +3 -0
- package/dist/cms/contentModule.query.ts +1 -0
- package/dist/cms/contentful/migrations/scripts/0085-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/contentful/migrations/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/contentful/migrations/scripts/0087-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/contentful/queries/containerModule.query.js +3 -0
- package/dist/cms/contentful/queries/containerModule.query.ts +3 -0
- package/dist/cms/contentful/queries/contentModule.query.js +1 -0
- package/dist/cms/contentful/queries/contentModule.query.ts +1 -0
- package/dist/cms/migrations/scripts/0085-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/migrations/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/migrations/scripts/0087-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/queries/containerModule.query.ts +3 -0
- package/dist/cms/queries/contentModule.query.ts +1 -0
- package/dist/cms/scripts/0085-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/cms/scripts/0086-add-background-image-to-carousel.cjs +24 -0
- package/dist/cms/scripts/0087-add-table-highlight-to-content-module.cjs +30 -0
- package/dist/lib/component-lib.js +1861 -1796
- package/dist/lib/component-lib.umd.cjs +23 -23
- package/dist/lib/css/main.css +16 -8
- package/dist/lib/style.css +1 -1
- package/dist/types/src/components/ContentModule/ContentModule.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -41,6 +41,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
41
41
|
id
|
|
42
42
|
}
|
|
43
43
|
__typename
|
|
44
|
+
tableHighlight
|
|
44
45
|
}
|
|
45
46
|
... on TileCollectionModule {
|
|
46
47
|
sys {
|
|
@@ -80,6 +81,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
backgroundColor
|
|
84
|
+
tableHighlight
|
|
83
85
|
}
|
|
84
86
|
... on Image {
|
|
85
87
|
sys {
|
|
@@ -118,6 +120,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
118
120
|
id
|
|
119
121
|
}
|
|
120
122
|
__typename
|
|
123
|
+
tableHighlight
|
|
121
124
|
}
|
|
122
125
|
... on Image {
|
|
123
126
|
sys {
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -39,6 +39,7 @@ export const getContainerModule = gql `
|
|
|
39
39
|
id
|
|
40
40
|
}
|
|
41
41
|
__typename
|
|
42
|
+
tableHighlight
|
|
42
43
|
}
|
|
43
44
|
... on TileCollectionModule {
|
|
44
45
|
sys {
|
|
@@ -78,6 +79,7 @@ export const getContainerModule = gql `
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
backgroundColor
|
|
82
|
+
tableHighlight
|
|
81
83
|
}
|
|
82
84
|
... on Image {
|
|
83
85
|
sys {
|
|
@@ -116,6 +118,7 @@ export const getContainerModule = gql `
|
|
|
116
118
|
id
|
|
117
119
|
}
|
|
118
120
|
__typename
|
|
121
|
+
tableHighlight
|
|
119
122
|
}
|
|
120
123
|
... on Image {
|
|
121
124
|
sys {
|
|
@@ -41,6 +41,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
41
41
|
id
|
|
42
42
|
}
|
|
43
43
|
__typename
|
|
44
|
+
tableHighlight
|
|
44
45
|
}
|
|
45
46
|
... on TileCollectionModule {
|
|
46
47
|
sys {
|
|
@@ -80,6 +81,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
backgroundColor
|
|
84
|
+
tableHighlight
|
|
83
85
|
}
|
|
84
86
|
... on Image {
|
|
85
87
|
sys {
|
|
@@ -118,6 +120,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
118
120
|
id
|
|
119
121
|
}
|
|
120
122
|
__typename
|
|
123
|
+
tableHighlight
|
|
121
124
|
}
|
|
122
125
|
... on Image {
|
|
123
126
|
sys {
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -41,6 +41,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
41
41
|
id
|
|
42
42
|
}
|
|
43
43
|
__typename
|
|
44
|
+
tableHighlight
|
|
44
45
|
}
|
|
45
46
|
... on TileCollectionModule {
|
|
46
47
|
sys {
|
|
@@ -80,6 +81,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
backgroundColor
|
|
84
|
+
tableHighlight
|
|
83
85
|
}
|
|
84
86
|
... on Image {
|
|
85
87
|
sys {
|
|
@@ -118,6 +120,7 @@ export const getContainerModule: DocumentNode = gql`
|
|
|
118
120
|
id
|
|
119
121
|
}
|
|
120
122
|
__typename
|
|
123
|
+
tableHighlight
|
|
121
124
|
}
|
|
122
125
|
... on Image {
|
|
123
126
|
sys {
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|