@cooperco/cooper-component-library 0.1.72 → 0.1.74
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/0063-update-accordion-item-types.cjs +36 -0
- package/dist/cms/0064-create-placeholder-module.cjs +37 -0
- package/dist/cms/contentModule.query.ts +1 -0
- package/dist/cms/contentful/migrations/scripts/0063-update-accordion-item-types.cjs +36 -0
- package/dist/cms/contentful/migrations/scripts/0064-create-placeholder-module.cjs +37 -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/0063-update-accordion-item-types.cjs +36 -0
- package/dist/cms/migrations/scripts/0064-create-placeholder-module.cjs +37 -0
- package/dist/cms/queries/contentModule.query.ts +1 -0
- package/dist/cms/scripts/0063-update-accordion-item-types.cjs +36 -0
- package/dist/cms/scripts/0064-create-placeholder-module.cjs +37 -0
- package/dist/lib/component-lib.js +2495 -2413
- package/dist/lib/component-lib.umd.cjs +22 -22
- package/dist/lib/style.css +1 -1
- package/dist/types/src/components/Accordion/Accordion.d.ts +1 -1
- package/dist/types/src/components/Accordion/AccordionItem.d.ts +8 -1
- package/dist/types/src/config/defaultPassthrough/index.d.ts +5 -0
- package/package.json +113 -112
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
+
up: function (migration) {
|
|
4
|
+
const accordion = migration.editContentType('accordion')
|
|
5
|
+
|
|
6
|
+
accordion
|
|
7
|
+
.editField('accordionItem')
|
|
8
|
+
.items({
|
|
9
|
+
type: 'Link',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['accordionItem', 'accordion'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
linkType: 'Entry',
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: async function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion
|
|
24
|
+
.editField('accordionItem')
|
|
25
|
+
.items({
|
|
26
|
+
type: 'Link',
|
|
27
|
+
validations: [
|
|
28
|
+
{
|
|
29
|
+
linkContentType: ['accordionItem'],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
linkType: 'Entry',
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
8
|
+
.createField('placeholderModule')
|
|
9
|
+
.name('Placeholder Module')
|
|
10
|
+
.type('Symbol')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([
|
|
13
|
+
{
|
|
14
|
+
in: ['Contact Us'],
|
|
15
|
+
},
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
contentModule.changeFieldControl(
|
|
19
|
+
'placeholderModule',
|
|
20
|
+
'builtin',
|
|
21
|
+
'dropdown',
|
|
22
|
+
{
|
|
23
|
+
"helpText": "If a placeholder is selected, the fields below will be ignored.",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
contentModule.moveField('placeholderModule').beforeField('logo')
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// @ts-check
|
|
31
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
+
down: async function (migration) {
|
|
33
|
+
const contentModule = migration.editContentType('contentModule')
|
|
34
|
+
contentModule.deleteField('placeholderModule')
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
+
up: function (migration) {
|
|
4
|
+
const accordion = migration.editContentType('accordion')
|
|
5
|
+
|
|
6
|
+
accordion
|
|
7
|
+
.editField('accordionItem')
|
|
8
|
+
.items({
|
|
9
|
+
type: 'Link',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['accordionItem', 'accordion'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
linkType: 'Entry',
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: async function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion
|
|
24
|
+
.editField('accordionItem')
|
|
25
|
+
.items({
|
|
26
|
+
type: 'Link',
|
|
27
|
+
validations: [
|
|
28
|
+
{
|
|
29
|
+
linkContentType: ['accordionItem'],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
linkType: 'Entry',
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
8
|
+
.createField('placeholderModule')
|
|
9
|
+
.name('Placeholder Module')
|
|
10
|
+
.type('Symbol')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([
|
|
13
|
+
{
|
|
14
|
+
in: ['Contact Us'],
|
|
15
|
+
},
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
contentModule.changeFieldControl(
|
|
19
|
+
'placeholderModule',
|
|
20
|
+
'builtin',
|
|
21
|
+
'dropdown',
|
|
22
|
+
{
|
|
23
|
+
"helpText": "If a placeholder is selected, the fields below will be ignored.",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
contentModule.moveField('placeholderModule').beforeField('logo')
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// @ts-check
|
|
31
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
+
down: async function (migration) {
|
|
33
|
+
const contentModule = migration.editContentType('contentModule')
|
|
34
|
+
contentModule.deleteField('placeholderModule')
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
+
up: function (migration) {
|
|
4
|
+
const accordion = migration.editContentType('accordion')
|
|
5
|
+
|
|
6
|
+
accordion
|
|
7
|
+
.editField('accordionItem')
|
|
8
|
+
.items({
|
|
9
|
+
type: 'Link',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['accordionItem', 'accordion'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
linkType: 'Entry',
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: async function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion
|
|
24
|
+
.editField('accordionItem')
|
|
25
|
+
.items({
|
|
26
|
+
type: 'Link',
|
|
27
|
+
validations: [
|
|
28
|
+
{
|
|
29
|
+
linkContentType: ['accordionItem'],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
linkType: 'Entry',
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
8
|
+
.createField('placeholderModule')
|
|
9
|
+
.name('Placeholder Module')
|
|
10
|
+
.type('Symbol')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([
|
|
13
|
+
{
|
|
14
|
+
in: ['Contact Us'],
|
|
15
|
+
},
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
contentModule.changeFieldControl(
|
|
19
|
+
'placeholderModule',
|
|
20
|
+
'builtin',
|
|
21
|
+
'dropdown',
|
|
22
|
+
{
|
|
23
|
+
"helpText": "If a placeholder is selected, the fields below will be ignored.",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
contentModule.moveField('placeholderModule').beforeField('logo')
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// @ts-check
|
|
31
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
+
down: async function (migration) {
|
|
33
|
+
const contentModule = migration.editContentType('contentModule')
|
|
34
|
+
contentModule.deleteField('placeholderModule')
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
+
up: function (migration) {
|
|
4
|
+
const accordion = migration.editContentType('accordion')
|
|
5
|
+
|
|
6
|
+
accordion
|
|
7
|
+
.editField('accordionItem')
|
|
8
|
+
.items({
|
|
9
|
+
type: 'Link',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['accordionItem', 'accordion'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
linkType: 'Entry',
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
20
|
+
down: async function (migration) {
|
|
21
|
+
const accordion = migration.editContentType('accordion')
|
|
22
|
+
|
|
23
|
+
accordion
|
|
24
|
+
.editField('accordionItem')
|
|
25
|
+
.items({
|
|
26
|
+
type: 'Link',
|
|
27
|
+
validations: [
|
|
28
|
+
{
|
|
29
|
+
linkContentType: ['accordionItem'],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
linkType: 'Entry',
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
8
|
+
.createField('placeholderModule')
|
|
9
|
+
.name('Placeholder Module')
|
|
10
|
+
.type('Symbol')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([
|
|
13
|
+
{
|
|
14
|
+
in: ['Contact Us'],
|
|
15
|
+
},
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
contentModule.changeFieldControl(
|
|
19
|
+
'placeholderModule',
|
|
20
|
+
'builtin',
|
|
21
|
+
'dropdown',
|
|
22
|
+
{
|
|
23
|
+
"helpText": "If a placeholder is selected, the fields below will be ignored.",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
contentModule.moveField('placeholderModule').beforeField('logo')
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// @ts-check
|
|
31
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
32
|
+
down: async function (migration) {
|
|
33
|
+
const contentModule = migration.editContentType('contentModule')
|
|
34
|
+
contentModule.deleteField('placeholderModule')
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|