@cooperco/cooper-component-library 0.1.86 → 0.1.88
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/0076-add-columns-to-tile-collection.cjs +28 -0
- package/dist/cms/0076-rename-image-to-media-tile-content.cjs +34 -0
- package/dist/cms/contentful/migrations/scripts/0076-add-columns-to-tile-collection.cjs +28 -0
- package/dist/cms/contentful/migrations/scripts/0076-rename-image-to-media-tile-content.cjs +34 -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/0076-add-columns-to-tile-collection.cjs +28 -0
- package/dist/cms/migrations/scripts/0076-rename-image-to-media-tile-content.cjs +34 -0
- package/dist/cms/queries/tileCollection.query.ts +1 -0
- package/dist/cms/scripts/0076-add-columns-to-tile-collection.cjs +28 -0
- package/dist/cms/scripts/0076-rename-image-to-media-tile-content.cjs +34 -0
- package/dist/cms/tileCollection.query.ts +1 -0
- package/dist/lib/component-lib.js +1340 -1327
- package/dist/lib/component-lib.umd.cjs +17 -17
- package/dist/lib/css/main.css +69 -83
- package/dist/lib/style.css +1 -1
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.d.ts +1 -1
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
8
|
+
.createField('columns')
|
|
9
|
+
.name('Number of Columns')
|
|
10
|
+
.type('Integer')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([{ in: [1, 2, 3] }])
|
|
13
|
+
|
|
14
|
+
tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
|
|
15
|
+
helpText:
|
|
16
|
+
'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
tileCollection.moveField('columns').afterField('tiles')
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// @ts-check
|
|
23
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
24
|
+
down: function (migration) {
|
|
25
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
26
|
+
tileCollection.deleteField('columns')
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
8
|
+
.createField('columns')
|
|
9
|
+
.name('Number of Columns')
|
|
10
|
+
.type('Integer')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([{ in: [1, 2, 3] }])
|
|
13
|
+
|
|
14
|
+
tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
|
|
15
|
+
helpText:
|
|
16
|
+
'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
tileCollection.moveField('columns').afterField('tiles')
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// @ts-check
|
|
23
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
24
|
+
down: function (migration) {
|
|
25
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
26
|
+
tileCollection.deleteField('columns')
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
8
|
+
.createField('columns')
|
|
9
|
+
.name('Number of Columns')
|
|
10
|
+
.type('Integer')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([{ in: [1, 2, 3] }])
|
|
13
|
+
|
|
14
|
+
tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
|
|
15
|
+
helpText:
|
|
16
|
+
'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
tileCollection.moveField('columns').afterField('tiles')
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// @ts-check
|
|
23
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
24
|
+
down: function (migration) {
|
|
25
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
26
|
+
tileCollection.deleteField('columns')
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
8
|
+
.createField('columns')
|
|
9
|
+
.name('Number of Columns')
|
|
10
|
+
.type('Integer')
|
|
11
|
+
.required(false)
|
|
12
|
+
.validations([{ in: [1, 2, 3] }])
|
|
13
|
+
|
|
14
|
+
tileCollection.changeFieldControl('columns', 'builtin', 'dropdown', {
|
|
15
|
+
helpText:
|
|
16
|
+
'The maximum number of tile columns to display per row. Defaults to 3 if not set. Does not apply to Image Stacked Animated variant.',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
tileCollection.moveField('columns').afterField('tiles')
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// @ts-check
|
|
23
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
24
|
+
down: function (migration) {
|
|
25
|
+
const tileCollection = migration.editContentType('tileCollectionModule')
|
|
26
|
+
tileCollection.deleteField('columns')
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|