@cooperco/cooper-component-library 0.1.84 → 0.1.86
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/0073-add-body-copy-to-tile-collection.cjs +22 -0
- package/dist/cms/0074-fix-accordion-start-open-widget.cjs +27 -0
- package/dist/cms/0075-make-content-module-headline-optional.cjs +10 -0
- package/dist/cms/contentful/migrations/scripts/0073-add-body-copy-to-tile-collection.cjs +22 -0
- package/dist/cms/contentful/migrations/scripts/0074-fix-accordion-start-open-widget.cjs +27 -0
- package/dist/cms/contentful/migrations/scripts/0075-make-content-module-headline-optional.cjs +10 -0
- package/dist/cms/contentful/queries/tileCollection.query.js +1 -0
- package/dist/cms/contentful/queries/tileCollection.query.ts +1 -0
- package/dist/cms/migrations/scripts/0073-add-body-copy-to-tile-collection.cjs +22 -0
- package/dist/cms/migrations/scripts/0074-fix-accordion-start-open-widget.cjs +27 -0
- package/dist/cms/migrations/scripts/0075-make-content-module-headline-optional.cjs +10 -0
- package/dist/cms/queries/tileCollection.query.ts +1 -0
- package/dist/cms/scripts/0073-add-body-copy-to-tile-collection.cjs +22 -0
- package/dist/cms/scripts/0074-fix-accordion-start-open-widget.cjs +27 -0
- package/dist/cms/scripts/0075-make-content-module-headline-optional.cjs +10 -0
- package/dist/cms/tileCollection.query.ts +1 -0
- package/dist/lib/component-lib.js +1948 -1889
- package/dist/lib/component-lib.umd.cjs +34 -34
- package/dist/lib/css/main.css +53 -7
- package/dist/lib/style.css +1 -1
- package/dist/types/src/components/Accordion/Accordion.d.ts +1 -0
- package/dist/types/src/components/ContentModule/ContentModule.d.ts +8 -0
- package/dist/types/src/components/Image/Image.d.ts +2 -0
- package/dist/types/src/components/Image/Image.vue.d.ts +1 -0
- package/dist/types/src/types.d.ts +1 -0
- package/package.json +118 -117
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
6
|
+
|
|
7
|
+
tileCollection.createField('bodyCopy', {
|
|
8
|
+
name: 'Body Copy',
|
|
9
|
+
type: 'Symbol',
|
|
10
|
+
required: false,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
tileCollection.moveField('bodyCopy').afterField('headline')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// @ts-check
|
|
17
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
18
|
+
down: function (migration) {
|
|
19
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
20
|
+
tileCollection.deleteField('bodyCopy')
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const accordion = migration.editContentType('accordion')
|
|
6
|
+
|
|
7
|
+
accordion.editField('startOpen').defaultValue({
|
|
8
|
+
'en-US': true,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'boolean', {
|
|
12
|
+
trueLabel: 'Yes',
|
|
13
|
+
falseLabel: 'No',
|
|
14
|
+
helpText: 'If the accordion should start with the first item open',
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'singleLine', {
|
|
24
|
+
helpText: 'If the accordion should start with the first item open',
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
up: (migration) => {
|
|
3
|
+
const contentModule = migration.editContentType('contentModule')
|
|
4
|
+
contentModule.editField('headline').required(false)
|
|
5
|
+
},
|
|
6
|
+
down: async (migration) => {
|
|
7
|
+
const contentModule = migration.editContentType('contentModule')
|
|
8
|
+
contentModule.editField('headline').required(true)
|
|
9
|
+
},
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
6
|
+
|
|
7
|
+
tileCollection.createField('bodyCopy', {
|
|
8
|
+
name: 'Body Copy',
|
|
9
|
+
type: 'Symbol',
|
|
10
|
+
required: false,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
tileCollection.moveField('bodyCopy').afterField('headline')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// @ts-check
|
|
17
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
18
|
+
down: function (migration) {
|
|
19
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
20
|
+
tileCollection.deleteField('bodyCopy')
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const accordion = migration.editContentType('accordion')
|
|
6
|
+
|
|
7
|
+
accordion.editField('startOpen').defaultValue({
|
|
8
|
+
'en-US': true,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'boolean', {
|
|
12
|
+
trueLabel: 'Yes',
|
|
13
|
+
falseLabel: 'No',
|
|
14
|
+
helpText: 'If the accordion should start with the first item open',
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'singleLine', {
|
|
24
|
+
helpText: 'If the accordion should start with the first item open',
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
up: (migration) => {
|
|
3
|
+
const contentModule = migration.editContentType('contentModule')
|
|
4
|
+
contentModule.editField('headline').required(false)
|
|
5
|
+
},
|
|
6
|
+
down: async (migration) => {
|
|
7
|
+
const contentModule = migration.editContentType('contentModule')
|
|
8
|
+
contentModule.editField('headline').required(true)
|
|
9
|
+
},
|
|
10
|
+
}
|
|
@@ -30,6 +30,7 @@ export const getTileCollection: DocumentNode = gql`
|
|
|
30
30
|
query tileCollectionQuery($id: String!, $preview: Boolean = false) {
|
|
31
31
|
tileCollectionModule(id: $id, preview: $preview) {
|
|
32
32
|
headline
|
|
33
|
+
bodyCopy
|
|
33
34
|
tilesCollection(limit: 6) {
|
|
34
35
|
items {
|
|
35
36
|
...tileContentFragment
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
6
|
+
|
|
7
|
+
tileCollection.createField('bodyCopy', {
|
|
8
|
+
name: 'Body Copy',
|
|
9
|
+
type: 'Symbol',
|
|
10
|
+
required: false,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
tileCollection.moveField('bodyCopy').afterField('headline')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// @ts-check
|
|
17
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
18
|
+
down: function (migration) {
|
|
19
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
20
|
+
tileCollection.deleteField('bodyCopy')
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const accordion = migration.editContentType('accordion')
|
|
6
|
+
|
|
7
|
+
accordion.editField('startOpen').defaultValue({
|
|
8
|
+
'en-US': true,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'boolean', {
|
|
12
|
+
trueLabel: 'Yes',
|
|
13
|
+
falseLabel: 'No',
|
|
14
|
+
helpText: 'If the accordion should start with the first item open',
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'singleLine', {
|
|
24
|
+
helpText: 'If the accordion should start with the first item open',
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
up: (migration) => {
|
|
3
|
+
const contentModule = migration.editContentType('contentModule')
|
|
4
|
+
contentModule.editField('headline').required(false)
|
|
5
|
+
},
|
|
6
|
+
down: async (migration) => {
|
|
7
|
+
const contentModule = migration.editContentType('contentModule')
|
|
8
|
+
contentModule.editField('headline').required(true)
|
|
9
|
+
},
|
|
10
|
+
}
|
|
@@ -30,6 +30,7 @@ export const getTileCollection: DocumentNode = gql`
|
|
|
30
30
|
query tileCollectionQuery($id: String!, $preview: Boolean = false) {
|
|
31
31
|
tileCollectionModule(id: $id, preview: $preview) {
|
|
32
32
|
headline
|
|
33
|
+
bodyCopy
|
|
33
34
|
tilesCollection(limit: 6) {
|
|
34
35
|
items {
|
|
35
36
|
...tileContentFragment
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
6
|
+
|
|
7
|
+
tileCollection.createField('bodyCopy', {
|
|
8
|
+
name: 'Body Copy',
|
|
9
|
+
type: 'Symbol',
|
|
10
|
+
required: false,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
tileCollection.moveField('bodyCopy').afterField('headline')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// @ts-check
|
|
17
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
18
|
+
down: function (migration) {
|
|
19
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
20
|
+
tileCollection.deleteField('bodyCopy')
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const accordion = migration.editContentType('accordion')
|
|
6
|
+
|
|
7
|
+
accordion.editField('startOpen').defaultValue({
|
|
8
|
+
'en-US': true,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'boolean', {
|
|
12
|
+
trueLabel: 'Yes',
|
|
13
|
+
falseLabel: 'No',
|
|
14
|
+
helpText: 'If the accordion should start with the first item open',
|
|
15
|
+
})
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// @ts-check
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion.changeFieldControl('startOpen', 'builtin', 'singleLine', {
|
|
24
|
+
helpText: 'If the accordion should start with the first item open',
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
up: (migration) => {
|
|
3
|
+
const contentModule = migration.editContentType('contentModule')
|
|
4
|
+
contentModule.editField('headline').required(false)
|
|
5
|
+
},
|
|
6
|
+
down: async (migration) => {
|
|
7
|
+
const contentModule = migration.editContentType('contentModule')
|
|
8
|
+
contentModule.editField('headline').required(true)
|
|
9
|
+
},
|
|
10
|
+
}
|
|
@@ -30,6 +30,7 @@ export const getTileCollection: DocumentNode = gql`
|
|
|
30
30
|
query tileCollectionQuery($id: String!, $preview: Boolean = false) {
|
|
31
31
|
tileCollectionModule(id: $id, preview: $preview) {
|
|
32
32
|
headline
|
|
33
|
+
bodyCopy
|
|
33
34
|
tilesCollection(limit: 6) {
|
|
34
35
|
items {
|
|
35
36
|
...tileContentFragment
|