@cooperco/cooper-component-library 0.1.60 → 0.1.62
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/README.md +106 -4
- package/dist/cms/0001-init.cjs +41 -0
- package/dist/cms/0002-create-image.cjs +34 -0
- package/dist/cms/0003-create-video.cjs +52 -0
- package/dist/cms/0004-create-testimonial.cjs +56 -0
- package/dist/cms/0005-create-tile-label.cjs +41 -0
- package/dist/cms/0006-create-accordion-item.cjs +83 -0
- package/dist/cms/0007-create-accordion.cjs +45 -0
- package/dist/cms/0008-create-page-metadata.cjs +69 -0
- package/dist/cms/0009-create-page.cjs +57 -0
- package/dist/cms/0010-create-link.cjs +86 -0
- package/dist/cms/0011-create-navigation-element.cjs +54 -0
- package/dist/cms/0012-create-primary-navigation.cjs +46 -0
- package/dist/cms/0013-create-tile-content.cjs +99 -0
- package/dist/cms/0014-create-tile-collection.cjs +96 -0
- package/dist/cms/0015-create-highlighted-text.cjs +24 -0
- package/dist/cms/0016-create-content-module.cjs +105 -0
- package/dist/cms/0017-create-cta.cjs +97 -0
- package/dist/cms/0018-create-container-module.cjs +134 -0
- package/dist/cms/0019-social-media.cjs +45 -0
- package/dist/cms/0020-create-footer.cjs +93 -0
- package/dist/cms/0021-create-carousel.cjs +68 -0
- package/dist/cms/0022-create-logo-collection.cjs +58 -0
- package/dist/cms/0023-create-split-module.cjs +66 -0
- package/dist/cms/0024-create-container-collection.cjs +58 -0
- package/dist/cms/0025-edit-container-module.cjs +15 -0
- package/dist/cms/0026-add-localization.cjs +181 -0
- package/dist/cms/0027-add-field-to-content-module.cjs +24 -0
- package/dist/cms/0028-add-load-more-accordion.cjs +22 -0
- package/dist/cms/0029-add-start-open-to-accordion.cjs +22 -0
- package/dist/cms/0030-add-mobile-image.cjs +37 -0
- package/dist/cms/0031-update-tile-content-helptext.cjs +19 -0
- package/dist/cms/0032-add-include-decorations.cjs +33 -0
- package/dist/cms/0033-add-centered-option-content-module.cjs +27 -0
- package/dist/cms/0034-update-tile-content.cjs +19 -0
- package/dist/cms/0035-update-tile-content-subheadline.cjs +19 -0
- package/dist/cms/0036-multiple-cta-option.cjs +160 -0
- package/dist/cms/0037-edit-content-module.cjs +15 -0
- package/dist/cms/0038-add-mobile-image-bottom-option-container-module.cjs +31 -0
- package/dist/cms/0039-limit-ctas-collections-size.cjs +39 -0
- package/dist/cms/0040-edit-content-tile.cjs +15 -0
- package/dist/cms/0041-edit-cta-add-btn-size.cjs +28 -0
- package/dist/cms/0042-edit-cta-update-button-type.cjs +23 -0
- package/dist/cms/0043-edit-link-add-third-party-id.cjs +24 -0
- package/dist/cms/0044-edit-footer-update-copyright-links-validation-type.cjs +144 -0
- package/dist/cms/0045-edit-carousel-add-heading-field.cjs +21 -0
- package/dist/cms/0046-update-tile-content.cjs +48 -0
- package/dist/cms/0047-create-body-copy.cjs +51 -0
- package/dist/cms/0048-create-tab-module.cjs +51 -0
- package/dist/cms/0049-create-product-module.cjs +68 -0
- package/dist/cms/0050-update-container.cjs +29 -0
- package/dist/cms/0051-update-accordion.cjs +22 -0
- package/dist/cms/0052-update-tile-content.cjs +41 -0
- package/dist/cms/0053-add-fields-to-tab-module.cjs +44 -0
- package/dist/cms/0054-update-product-module-logo-collection.cjs +70 -0
- package/dist/cms/0055-create-cta-action.cjs +50 -0
- package/dist/cms/0056-update-cta.cjs +25 -0
- package/dist/cms/0057-add-show-cart-to-page.cjs +26 -0
- package/dist/cms/README.md +112 -0
- package/dist/cms/accordion.query.ts +21 -0
- package/dist/cms/addEntryNameField.cjs +9 -0
- package/dist/cms/carousel.query.ts +34 -0
- package/dist/cms/containerModule.query.ts +142 -0
- package/dist/cms/contentModule.query.ts +51 -0
- package/dist/cms/contentful/graphql/queries/accordion.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/accordion.query.js +19 -0
- package/dist/cms/contentful/graphql/queries/carousel.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/carousel.query.js +32 -0
- package/dist/cms/contentful/graphql/queries/containerModule.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/containerModule.query.js +140 -0
- package/dist/cms/contentful/graphql/queries/contentModule.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/contentModule.query.js +49 -0
- package/dist/cms/contentful/graphql/queries/cta.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/cta.query.js +10 -0
- package/dist/cms/contentful/graphql/queries/footer.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/footer.query.js +44 -0
- package/dist/cms/contentful/graphql/queries/fragments.d.ts +11 -0
- package/dist/cms/contentful/graphql/queries/fragments.js +172 -0
- package/dist/cms/contentful/graphql/queries/header.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/header.query.js +39 -0
- package/dist/cms/contentful/graphql/queries/image.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/image.query.js +10 -0
- package/dist/cms/contentful/graphql/queries/index.d.ts +18 -0
- package/dist/cms/contentful/graphql/queries/index.js +18 -0
- package/dist/cms/contentful/graphql/queries/link.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/link.query.js +10 -0
- package/dist/cms/contentful/graphql/queries/logoCollection.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/logoCollection.query.js +16 -0
- package/dist/cms/contentful/graphql/queries/navigation.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/navigation.query.js +10 -0
- package/dist/cms/contentful/graphql/queries/page.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/page.query.js +23 -0
- package/dist/cms/contentful/graphql/queries/pageMetadata.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/pageMetadata.query.js +16 -0
- package/dist/cms/contentful/graphql/queries/productModule.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/productModule.query.js +59 -0
- package/dist/cms/contentful/graphql/queries/testimonial.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/testimonial.query.js +23 -0
- package/dist/cms/contentful/graphql/queries/tileCollection.query.d.ts +4 -0
- package/dist/cms/contentful/graphql/queries/tileCollection.query.js +35 -0
- package/dist/cms/contentful/graphql/queries/video.query.d.ts +2 -0
- package/dist/cms/contentful/graphql/queries/video.query.js +11 -0
- package/dist/cms/contentful/migrations/README.md +42 -0
- package/dist/cms/contentful/migrations/helpers/addEntryNameField.cjs +9 -0
- package/dist/cms/contentful/migrations/scripts/0001-init.cjs +41 -0
- package/dist/cms/contentful/migrations/scripts/0002-create-image.cjs +34 -0
- package/dist/cms/contentful/migrations/scripts/0003-create-video.cjs +52 -0
- package/dist/cms/contentful/migrations/scripts/0004-create-testimonial.cjs +56 -0
- package/dist/cms/contentful/migrations/scripts/0005-create-tile-label.cjs +41 -0
- package/dist/cms/contentful/migrations/scripts/0006-create-accordion-item.cjs +83 -0
- package/dist/cms/contentful/migrations/scripts/0007-create-accordion.cjs +45 -0
- package/dist/cms/contentful/migrations/scripts/0008-create-page-metadata.cjs +69 -0
- package/dist/cms/contentful/migrations/scripts/0009-create-page.cjs +57 -0
- package/dist/cms/contentful/migrations/scripts/0010-create-link.cjs +86 -0
- package/dist/cms/contentful/migrations/scripts/0011-create-navigation-element.cjs +54 -0
- package/dist/cms/contentful/migrations/scripts/0012-create-primary-navigation.cjs +46 -0
- package/dist/cms/contentful/migrations/scripts/0013-create-tile-content.cjs +99 -0
- package/dist/cms/contentful/migrations/scripts/0014-create-tile-collection.cjs +96 -0
- package/dist/cms/contentful/migrations/scripts/0015-create-highlighted-text.cjs +24 -0
- package/dist/cms/contentful/migrations/scripts/0016-create-content-module.cjs +105 -0
- package/dist/cms/contentful/migrations/scripts/0017-create-cta.cjs +97 -0
- package/dist/cms/contentful/migrations/scripts/0018-create-container-module.cjs +134 -0
- package/dist/cms/contentful/migrations/scripts/0019-social-media.cjs +45 -0
- package/dist/cms/contentful/migrations/scripts/0020-create-footer.cjs +93 -0
- package/dist/cms/contentful/migrations/scripts/0021-create-carousel.cjs +68 -0
- package/dist/cms/contentful/migrations/scripts/0022-create-logo-collection.cjs +58 -0
- package/dist/cms/contentful/migrations/scripts/0023-create-split-module.cjs +66 -0
- package/dist/cms/contentful/migrations/scripts/0024-create-container-collection.cjs +58 -0
- package/dist/cms/contentful/migrations/scripts/0025-edit-container-module.cjs +15 -0
- package/dist/cms/contentful/migrations/scripts/0026-add-localization.cjs +181 -0
- package/dist/cms/contentful/migrations/scripts/0027-add-field-to-content-module.cjs +24 -0
- package/dist/cms/contentful/migrations/scripts/0028-add-load-more-accordion.cjs +22 -0
- package/dist/cms/contentful/migrations/scripts/0029-add-start-open-to-accordion.cjs +22 -0
- package/dist/cms/contentful/migrations/scripts/0030-add-mobile-image.cjs +37 -0
- package/dist/cms/contentful/migrations/scripts/0031-update-tile-content-helptext.cjs +19 -0
- package/dist/cms/contentful/migrations/scripts/0032-add-include-decorations.cjs +33 -0
- package/dist/cms/contentful/migrations/scripts/0033-add-centered-option-content-module.cjs +27 -0
- package/dist/cms/contentful/migrations/scripts/0034-update-tile-content.cjs +19 -0
- package/dist/cms/contentful/migrations/scripts/0035-update-tile-content-subheadline.cjs +19 -0
- package/dist/cms/contentful/migrations/scripts/0036-multiple-cta-option.cjs +160 -0
- package/dist/cms/contentful/migrations/scripts/0037-edit-content-module.cjs +15 -0
- package/dist/cms/contentful/migrations/scripts/0038-add-mobile-image-bottom-option-container-module.cjs +31 -0
- package/dist/cms/contentful/migrations/scripts/0039-limit-ctas-collections-size.cjs +39 -0
- package/dist/cms/contentful/migrations/scripts/0040-edit-content-tile.cjs +15 -0
- package/dist/cms/contentful/migrations/scripts/0041-edit-cta-add-btn-size.cjs +28 -0
- package/dist/cms/contentful/migrations/scripts/0042-edit-cta-update-button-type.cjs +23 -0
- package/dist/cms/contentful/migrations/scripts/0043-edit-link-add-third-party-id.cjs +24 -0
- package/dist/cms/contentful/migrations/scripts/0044-edit-footer-update-copyright-links-validation-type.cjs +144 -0
- package/dist/cms/contentful/migrations/scripts/0045-edit-carousel-add-heading-field.cjs +21 -0
- package/dist/cms/contentful/migrations/scripts/0046-update-tile-content.cjs +48 -0
- package/dist/cms/contentful/migrations/scripts/0047-create-body-copy.cjs +51 -0
- package/dist/cms/contentful/migrations/scripts/0048-create-tab-module.cjs +51 -0
- package/dist/cms/contentful/migrations/scripts/0049-create-product-module.cjs +68 -0
- package/dist/cms/contentful/migrations/scripts/0050-update-container.cjs +29 -0
- package/dist/cms/contentful/migrations/scripts/0051-update-accordion.cjs +22 -0
- package/dist/cms/contentful/migrations/scripts/0052-update-tile-content.cjs +41 -0
- package/dist/cms/contentful/migrations/scripts/0053-add-fields-to-tab-module.cjs +44 -0
- package/dist/cms/contentful/migrations/scripts/0054-update-product-module-logo-collection.cjs +70 -0
- package/dist/cms/contentful/migrations/scripts/0055-create-cta-action.cjs +50 -0
- package/dist/cms/contentful/migrations/scripts/0056-update-cta.cjs +25 -0
- package/dist/cms/contentful/migrations/scripts/0057-add-show-cart-to-page.cjs +26 -0
- package/dist/cms/contentful/queries/README.md +112 -0
- package/dist/cms/contentful/queries/accordion.query.d.ts +2 -0
- package/dist/cms/contentful/queries/accordion.query.js +19 -0
- package/dist/cms/contentful/queries/accordion.query.ts +21 -0
- package/dist/cms/contentful/queries/carousel.query.d.ts +2 -0
- package/dist/cms/contentful/queries/carousel.query.js +32 -0
- package/dist/cms/contentful/queries/carousel.query.ts +34 -0
- package/dist/cms/contentful/queries/containerModule.query.d.ts +2 -0
- package/dist/cms/contentful/queries/containerModule.query.js +140 -0
- package/dist/cms/contentful/queries/containerModule.query.ts +142 -0
- package/dist/cms/contentful/queries/contentModule.query.d.ts +2 -0
- package/dist/cms/contentful/queries/contentModule.query.js +49 -0
- package/dist/cms/contentful/queries/contentModule.query.ts +51 -0
- package/dist/cms/contentful/queries/cta.query.d.ts +2 -0
- package/dist/cms/contentful/queries/cta.query.js +10 -0
- package/dist/cms/contentful/queries/cta.query.ts +12 -0
- package/dist/cms/contentful/queries/footer.query.d.ts +2 -0
- package/dist/cms/contentful/queries/footer.query.js +44 -0
- package/dist/cms/contentful/queries/footer.query.ts +50 -0
- package/dist/cms/contentful/queries/fragments.d.ts +11 -0
- package/dist/cms/contentful/queries/fragments.js +172 -0
- package/dist/cms/contentful/queries/fragments.ts +183 -0
- package/dist/cms/contentful/queries/header.query.d.ts +2 -0
- package/dist/cms/contentful/queries/header.query.js +39 -0
- package/dist/cms/contentful/queries/header.query.ts +41 -0
- package/dist/cms/contentful/queries/image.query.d.ts +2 -0
- package/dist/cms/contentful/queries/image.query.js +10 -0
- package/dist/cms/contentful/queries/image.query.ts +12 -0
- package/dist/cms/contentful/queries/index.d.ts +18 -0
- package/dist/cms/contentful/queries/index.js +18 -0
- package/dist/cms/contentful/queries/index.ts +18 -0
- package/dist/cms/contentful/queries/link.query.d.ts +2 -0
- package/dist/cms/contentful/queries/link.query.js +10 -0
- package/dist/cms/contentful/queries/link.query.ts +12 -0
- package/dist/cms/contentful/queries/logoCollection.query.d.ts +2 -0
- package/dist/cms/contentful/queries/logoCollection.query.js +16 -0
- package/dist/cms/contentful/queries/logoCollection.query.ts +18 -0
- package/dist/cms/contentful/queries/navigation.query.d.ts +2 -0
- package/dist/cms/contentful/queries/navigation.query.js +10 -0
- package/dist/cms/contentful/queries/navigation.query.ts +12 -0
- package/dist/cms/contentful/queries/page.query.d.ts +2 -0
- package/dist/cms/contentful/queries/page.query.js +23 -0
- package/dist/cms/contentful/queries/page.query.ts +25 -0
- package/dist/cms/contentful/queries/pageMetadata.query.d.ts +2 -0
- package/dist/cms/contentful/queries/pageMetadata.query.js +16 -0
- package/dist/cms/contentful/queries/pageMetadata.query.ts +18 -0
- package/dist/cms/contentful/queries/productModule.query.d.ts +2 -0
- package/dist/cms/contentful/queries/productModule.query.js +59 -0
- package/dist/cms/contentful/queries/productModule.query.ts +61 -0
- package/dist/cms/contentful/queries/testimonial.query.d.ts +2 -0
- package/dist/cms/contentful/queries/testimonial.query.js +23 -0
- package/dist/cms/contentful/queries/testimonial.query.ts +25 -0
- package/dist/cms/contentful/queries/tileCollection.query.d.ts +4 -0
- package/dist/cms/contentful/queries/tileCollection.query.js +35 -0
- package/dist/cms/contentful/queries/tileCollection.query.ts +39 -0
- package/dist/cms/contentful/queries/video.query.d.ts +2 -0
- package/dist/cms/contentful/queries/video.query.js +11 -0
- package/dist/cms/contentful/queries/video.query.ts +13 -0
- package/dist/cms/cta.query.ts +12 -0
- package/dist/cms/footer.query.ts +50 -0
- package/dist/cms/fragments.ts +183 -0
- package/dist/cms/header.query.ts +41 -0
- package/dist/cms/helpers/addEntryNameField.cjs +9 -0
- package/dist/cms/image.query.ts +12 -0
- package/dist/cms/index.ts +18 -0
- package/dist/cms/link.query.ts +12 -0
- package/dist/cms/logoCollection.query.ts +18 -0
- package/dist/cms/migrations/README.md +42 -0
- package/dist/cms/migrations/helpers/addEntryNameField.cjs +9 -0
- package/dist/cms/migrations/scripts/0001-init.cjs +41 -0
- package/dist/cms/migrations/scripts/0002-create-image.cjs +34 -0
- package/dist/cms/migrations/scripts/0003-create-video.cjs +52 -0
- package/dist/cms/migrations/scripts/0004-create-testimonial.cjs +56 -0
- package/dist/cms/migrations/scripts/0005-create-tile-label.cjs +41 -0
- package/dist/cms/migrations/scripts/0006-create-accordion-item.cjs +83 -0
- package/dist/cms/migrations/scripts/0007-create-accordion.cjs +45 -0
- package/dist/cms/migrations/scripts/0008-create-page-metadata.cjs +69 -0
- package/dist/cms/migrations/scripts/0009-create-page.cjs +57 -0
- package/dist/cms/migrations/scripts/0010-create-link.cjs +86 -0
- package/dist/cms/migrations/scripts/0011-create-navigation-element.cjs +54 -0
- package/dist/cms/migrations/scripts/0012-create-primary-navigation.cjs +46 -0
- package/dist/cms/migrations/scripts/0013-create-tile-content.cjs +99 -0
- package/dist/cms/migrations/scripts/0014-create-tile-collection.cjs +96 -0
- package/dist/cms/migrations/scripts/0015-create-highlighted-text.cjs +24 -0
- package/dist/cms/migrations/scripts/0016-create-content-module.cjs +105 -0
- package/dist/cms/migrations/scripts/0017-create-cta.cjs +97 -0
- package/dist/cms/migrations/scripts/0018-create-container-module.cjs +134 -0
- package/dist/cms/migrations/scripts/0019-social-media.cjs +45 -0
- package/dist/cms/migrations/scripts/0020-create-footer.cjs +93 -0
- package/dist/cms/migrations/scripts/0021-create-carousel.cjs +68 -0
- package/dist/cms/migrations/scripts/0022-create-logo-collection.cjs +58 -0
- package/dist/cms/migrations/scripts/0023-create-split-module.cjs +66 -0
- package/dist/cms/migrations/scripts/0024-create-container-collection.cjs +58 -0
- package/dist/cms/migrations/scripts/0025-edit-container-module.cjs +15 -0
- package/dist/cms/migrations/scripts/0026-add-localization.cjs +181 -0
- package/dist/cms/migrations/scripts/0027-add-field-to-content-module.cjs +24 -0
- package/dist/cms/migrations/scripts/0028-add-load-more-accordion.cjs +22 -0
- package/dist/cms/migrations/scripts/0029-add-start-open-to-accordion.cjs +22 -0
- package/dist/cms/migrations/scripts/0030-add-mobile-image.cjs +37 -0
- package/dist/cms/migrations/scripts/0031-update-tile-content-helptext.cjs +19 -0
- package/dist/cms/migrations/scripts/0032-add-include-decorations.cjs +33 -0
- package/dist/cms/migrations/scripts/0033-add-centered-option-content-module.cjs +27 -0
- package/dist/cms/migrations/scripts/0034-update-tile-content.cjs +19 -0
- package/dist/cms/migrations/scripts/0035-update-tile-content-subheadline.cjs +19 -0
- package/dist/cms/migrations/scripts/0036-multiple-cta-option.cjs +160 -0
- package/dist/cms/migrations/scripts/0037-edit-content-module.cjs +15 -0
- package/dist/cms/migrations/scripts/0038-add-mobile-image-bottom-option-container-module.cjs +31 -0
- package/dist/cms/migrations/scripts/0039-limit-ctas-collections-size.cjs +39 -0
- package/dist/cms/migrations/scripts/0040-edit-content-tile.cjs +15 -0
- package/dist/cms/migrations/scripts/0041-edit-cta-add-btn-size.cjs +28 -0
- package/dist/cms/migrations/scripts/0042-edit-cta-update-button-type.cjs +23 -0
- package/dist/cms/migrations/scripts/0043-edit-link-add-third-party-id.cjs +24 -0
- package/dist/cms/migrations/scripts/0044-edit-footer-update-copyright-links-validation-type.cjs +144 -0
- package/dist/cms/migrations/scripts/0045-edit-carousel-add-heading-field.cjs +21 -0
- package/dist/cms/migrations/scripts/0046-update-tile-content.cjs +48 -0
- package/dist/cms/migrations/scripts/0047-create-body-copy.cjs +51 -0
- package/dist/cms/migrations/scripts/0048-create-tab-module.cjs +51 -0
- package/dist/cms/migrations/scripts/0049-create-product-module.cjs +68 -0
- package/dist/cms/migrations/scripts/0050-update-container.cjs +29 -0
- package/dist/cms/migrations/scripts/0051-update-accordion.cjs +22 -0
- package/dist/cms/migrations/scripts/0052-update-tile-content.cjs +41 -0
- package/dist/cms/migrations/scripts/0053-add-fields-to-tab-module.cjs +44 -0
- package/dist/cms/migrations/scripts/0054-update-product-module-logo-collection.cjs +70 -0
- package/dist/cms/migrations/scripts/0055-create-cta-action.cjs +50 -0
- package/dist/cms/migrations/scripts/0056-update-cta.cjs +25 -0
- package/dist/cms/migrations/scripts/0057-add-show-cart-to-page.cjs +26 -0
- package/dist/cms/navigation.query.ts +12 -0
- package/dist/cms/page.query.ts +25 -0
- package/dist/cms/pageMetadata.query.ts +18 -0
- package/dist/cms/productModule.query.ts +61 -0
- package/dist/cms/queries/README.md +112 -0
- package/dist/cms/queries/accordion.query.ts +21 -0
- package/dist/cms/queries/carousel.query.ts +34 -0
- package/dist/cms/queries/containerModule.query.ts +142 -0
- package/dist/cms/queries/contentModule.query.ts +51 -0
- package/dist/cms/queries/cta.query.ts +12 -0
- package/dist/cms/queries/footer.query.ts +50 -0
- package/dist/cms/queries/fragments.ts +183 -0
- package/dist/cms/queries/header.query.ts +41 -0
- package/dist/cms/queries/image.query.ts +12 -0
- package/dist/cms/queries/index.ts +18 -0
- package/dist/cms/queries/link.query.ts +12 -0
- package/dist/cms/queries/logoCollection.query.ts +18 -0
- package/dist/cms/queries/navigation.query.ts +12 -0
- package/dist/cms/queries/page.query.ts +25 -0
- package/dist/cms/queries/pageMetadata.query.ts +18 -0
- package/dist/cms/queries/productModule.query.ts +61 -0
- package/dist/cms/queries/testimonial.query.ts +25 -0
- package/dist/cms/queries/tileCollection.query.ts +39 -0
- package/dist/cms/queries/video.query.ts +13 -0
- package/dist/cms/scripts/0001-init.cjs +41 -0
- package/dist/cms/scripts/0002-create-image.cjs +34 -0
- package/dist/cms/scripts/0003-create-video.cjs +52 -0
- package/dist/cms/scripts/0004-create-testimonial.cjs +56 -0
- package/dist/cms/scripts/0005-create-tile-label.cjs +41 -0
- package/dist/cms/scripts/0006-create-accordion-item.cjs +83 -0
- package/dist/cms/scripts/0007-create-accordion.cjs +45 -0
- package/dist/cms/scripts/0008-create-page-metadata.cjs +69 -0
- package/dist/cms/scripts/0009-create-page.cjs +57 -0
- package/dist/cms/scripts/0010-create-link.cjs +86 -0
- package/dist/cms/scripts/0011-create-navigation-element.cjs +54 -0
- package/dist/cms/scripts/0012-create-primary-navigation.cjs +46 -0
- package/dist/cms/scripts/0013-create-tile-content.cjs +99 -0
- package/dist/cms/scripts/0014-create-tile-collection.cjs +96 -0
- package/dist/cms/scripts/0015-create-highlighted-text.cjs +24 -0
- package/dist/cms/scripts/0016-create-content-module.cjs +105 -0
- package/dist/cms/scripts/0017-create-cta.cjs +97 -0
- package/dist/cms/scripts/0018-create-container-module.cjs +134 -0
- package/dist/cms/scripts/0019-social-media.cjs +45 -0
- package/dist/cms/scripts/0020-create-footer.cjs +93 -0
- package/dist/cms/scripts/0021-create-carousel.cjs +68 -0
- package/dist/cms/scripts/0022-create-logo-collection.cjs +58 -0
- package/dist/cms/scripts/0023-create-split-module.cjs +66 -0
- package/dist/cms/scripts/0024-create-container-collection.cjs +58 -0
- package/dist/cms/scripts/0025-edit-container-module.cjs +15 -0
- package/dist/cms/scripts/0026-add-localization.cjs +181 -0
- package/dist/cms/scripts/0027-add-field-to-content-module.cjs +24 -0
- package/dist/cms/scripts/0028-add-load-more-accordion.cjs +22 -0
- package/dist/cms/scripts/0029-add-start-open-to-accordion.cjs +22 -0
- package/dist/cms/scripts/0030-add-mobile-image.cjs +37 -0
- package/dist/cms/scripts/0031-update-tile-content-helptext.cjs +19 -0
- package/dist/cms/scripts/0032-add-include-decorations.cjs +33 -0
- package/dist/cms/scripts/0033-add-centered-option-content-module.cjs +27 -0
- package/dist/cms/scripts/0034-update-tile-content.cjs +19 -0
- package/dist/cms/scripts/0035-update-tile-content-subheadline.cjs +19 -0
- package/dist/cms/scripts/0036-multiple-cta-option.cjs +160 -0
- package/dist/cms/scripts/0037-edit-content-module.cjs +15 -0
- package/dist/cms/scripts/0038-add-mobile-image-bottom-option-container-module.cjs +31 -0
- package/dist/cms/scripts/0039-limit-ctas-collections-size.cjs +39 -0
- package/dist/cms/scripts/0040-edit-content-tile.cjs +15 -0
- package/dist/cms/scripts/0041-edit-cta-add-btn-size.cjs +28 -0
- package/dist/cms/scripts/0042-edit-cta-update-button-type.cjs +23 -0
- package/dist/cms/scripts/0043-edit-link-add-third-party-id.cjs +24 -0
- package/dist/cms/scripts/0044-edit-footer-update-copyright-links-validation-type.cjs +144 -0
- package/dist/cms/scripts/0045-edit-carousel-add-heading-field.cjs +21 -0
- package/dist/cms/scripts/0046-update-tile-content.cjs +48 -0
- package/dist/cms/scripts/0047-create-body-copy.cjs +51 -0
- package/dist/cms/scripts/0048-create-tab-module.cjs +51 -0
- package/dist/cms/scripts/0049-create-product-module.cjs +68 -0
- package/dist/cms/scripts/0050-update-container.cjs +29 -0
- package/dist/cms/scripts/0051-update-accordion.cjs +22 -0
- package/dist/cms/scripts/0052-update-tile-content.cjs +41 -0
- package/dist/cms/scripts/0053-add-fields-to-tab-module.cjs +44 -0
- package/dist/cms/scripts/0054-update-product-module-logo-collection.cjs +70 -0
- package/dist/cms/scripts/0055-create-cta-action.cjs +50 -0
- package/dist/cms/scripts/0056-update-cta.cjs +25 -0
- package/dist/cms/scripts/0057-add-show-cart-to-page.cjs +26 -0
- package/dist/cms/testimonial.query.ts +25 -0
- package/dist/cms/tileCollection.query.ts +39 -0
- package/dist/cms/video.query.ts +13 -0
- package/dist/lib/component-lib.js +1293 -1272
- package/dist/lib/component-lib.umd.cjs +16 -16
- package/dist/lib/css/main.css +17 -16
- package/dist/lib/style.css +1 -1
- package/dist/types/cms/contentful/graphql/queries/accordion.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/carousel.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/containerModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/contentModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/cta.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/footer.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/fragments.d.ts +11 -0
- package/dist/types/cms/contentful/graphql/queries/header.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/image.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/index.d.ts +18 -0
- package/dist/types/cms/contentful/graphql/queries/link.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/logoCollection.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/navigation.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/page.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/pageMetadata.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/productModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/testimonial.query.d.ts +2 -0
- package/dist/types/cms/contentful/graphql/queries/tileCollection.query.d.ts +4 -0
- package/dist/types/cms/contentful/graphql/queries/video.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/accordion.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/carousel.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/containerModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/contentModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/cta.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/footer.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/fragments.d.ts +11 -0
- package/dist/types/cms/contentful/queries/header.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/image.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/index.d.ts +18 -0
- package/dist/types/cms/contentful/queries/link.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/logoCollection.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/navigation.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/page.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/pageMetadata.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/productModule.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/testimonial.query.d.ts +2 -0
- package/dist/types/cms/contentful/queries/tileCollection.query.d.ts +4 -0
- package/dist/types/cms/contentful/queries/video.query.d.ts +2 -0
- package/dist/types/components/Accordion/Accordion.d.ts +1 -0
- package/dist/types/components/ContentModule/ContentModule.d.ts +1 -0
- package/dist/types/src/App.vue.d.ts +2 -0
- package/dist/types/src/components/Accordion/Accordion.d.ts +19 -0
- package/dist/types/src/components/Accordion/Accordion.vue.d.ts +5 -0
- package/dist/types/src/components/Accordion/AccordionItem.d.ts +24 -0
- package/dist/types/src/components/Accordion/AccordionItem.vue.d.ts +9 -0
- package/dist/types/src/components/Accordion/AccordionListItem.vue.d.ts +3 -0
- package/dist/types/src/components/Accordion/AccordionTileItem.vue.d.ts +7 -0
- package/dist/types/src/components/AnimationWrapper/AnimationWrapper.d.ts +7 -0
- package/dist/types/src/components/AnimationWrapper/AnimationWrapper.vue.d.ts +10 -0
- package/dist/types/src/components/CTA/CTA.d.ts +25 -0
- package/dist/types/src/components/CTA/CTA.vue.d.ts +7 -0
- package/dist/types/src/components/CarouselModule/CarouselModule.d.ts +22 -0
- package/dist/types/src/components/CarouselModule/CarouselModule.vue.d.ts +5 -0
- package/dist/types/src/components/ContainerCollectionModule/ContainerCollectionModule.d.ts +10 -0
- package/dist/types/src/components/ContainerCollectionModule/ContainerCollectionModule.vue.d.ts +3 -0
- package/dist/types/src/components/ContainerModule/ContainerModule.d.ts +29 -0
- package/dist/types/src/components/ContainerModule/ContainerModule.vue.d.ts +14 -0
- package/dist/types/src/components/ContentModule/ContentModule.d.ts +31 -0
- package/dist/types/src/components/ContentModule/ContentModule.vue.d.ts +7 -0
- package/dist/types/src/components/Footer/FooterCopyright/FooterCopyright.d.ts +10 -0
- package/dist/types/src/components/Footer/FooterCopyright/FooterCopyright.vue.d.ts +3 -0
- package/dist/types/src/components/Footer/FooterNavigation/FooterNavigation.d.ts +14 -0
- package/dist/types/src/components/Footer/FooterNavigation/FooterNavigation.vue.d.ts +3 -0
- package/dist/types/src/components/Footer/SocialMediaRef/SocialMediaRef.d.ts +4 -0
- package/dist/types/src/components/Footer/SocialMediaRef/SocialMediaRef.vue.d.ts +3 -0
- package/dist/types/src/components/Image/Image.d.ts +15 -0
- package/dist/types/src/components/Image/Image.vue.d.ts +6 -0
- package/dist/types/src/components/LogoCollectionModule/LogoCollectionModule.d.ts +9 -0
- package/dist/types/src/components/LogoCollectionModule/LogoCollectionModule.vue.d.ts +3 -0
- package/dist/types/src/components/NavigationElement/NavigationElement.d.ts +20 -0
- package/dist/types/src/components/NavigationElement/NavigationElement.vue.d.ts +3 -0
- package/dist/types/src/components/PrimaryNavigation/PrimaryNavigation.d.ts +10 -0
- package/dist/types/src/components/PrimaryNavigation/PrimaryNavigation.vue.d.ts +9 -0
- package/dist/types/src/components/SplitModule/SplitModule.d.ts +16 -0
- package/dist/types/src/components/SplitModule/SplitModule.vue.d.ts +3 -0
- package/dist/types/src/components/TestimonialModule/TestimonialModule.d.ts +21 -0
- package/dist/types/src/components/TestimonialModule/TestimonialModule.vue.d.ts +3 -0
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.d.ts +18 -0
- package/dist/types/src/components/TileCollectionModule/TileCollectionModule.vue.d.ts +6 -0
- package/dist/types/src/components/TileContent/TileContent.d.ts +55 -0
- package/dist/types/src/components/TileContent/TileContentIconTile.vue.d.ts +5 -0
- package/dist/types/src/components/TileContent/TileContentImageStackedAnimatedTile.vue.d.ts +3 -0
- package/dist/types/src/components/TileContent/TileContentImageTile.vue.d.ts +5 -0
- package/dist/types/src/components/TileContent/TileContentTextTile.vue.d.ts +5 -0
- package/dist/types/src/components/TileContent/TileContentVideoTile.vue.d.ts +5 -0
- package/dist/types/src/components/TileLabel/TileLabel.d.ts +14 -0
- package/dist/types/src/components/TileLabel/TileLabel.vue.d.ts +6 -0
- package/dist/types/src/components/Video/Video.d.ts +7 -0
- package/dist/types/src/components/Video/Video.vue.d.ts +3 -0
- package/dist/types/src/components/components.d.ts +26 -0
- package/dist/types/src/components/types.d.ts +20 -0
- package/dist/types/src/config/colorPalettes.d.ts +59 -0
- package/dist/types/src/config/defaultPassthrough/config.d.ts +3 -0
- package/dist/types/src/config/defaultPassthrough/index.d.ts +67 -0
- package/dist/types/src/config/defaultPassthrough/types.d.ts +51 -0
- package/dist/types/src/index.d.ts +13 -0
- package/dist/types/src/init.d.ts +3 -0
- package/dist/types/src/pages/index.vue.d.ts +2 -0
- package/dist/types/src/router.d.ts +5 -0
- package/dist/types/src/types.d.ts +61 -0
- package/dist/types/src/utils/getTarget.d.ts +2 -0
- package/package.json +14 -6
|
@@ -0,0 +1,51 @@
|
|
|
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 bodyCopy = migration.createContentType('bodyCopy', {
|
|
8
|
+
name: 'Body Copy',
|
|
9
|
+
displayField: 'entryName',
|
|
10
|
+
description: 'Manage the body copy module',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
// Add required assetName field
|
|
14
|
+
addEntryNameField(bodyCopy)
|
|
15
|
+
|
|
16
|
+
// Add bodyCopy field
|
|
17
|
+
bodyCopy
|
|
18
|
+
.createField('bodyCopy')
|
|
19
|
+
.name('Body Copy')
|
|
20
|
+
.type('RichText')
|
|
21
|
+
.required(true)
|
|
22
|
+
.validations([
|
|
23
|
+
{
|
|
24
|
+
enabledMarks: ['bold', 'italic', 'underline'],
|
|
25
|
+
message: 'Only bold, italic, and underline marks are allowed',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
enabledNodeTypes: [
|
|
29
|
+
'ordered-list',
|
|
30
|
+
'unordered-list',
|
|
31
|
+
'hr',
|
|
32
|
+
'hyperlink',
|
|
33
|
+
'embedded-entry-inline',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
nodes: {
|
|
38
|
+
'embedded-entry-inline': [
|
|
39
|
+
{
|
|
40
|
+
linkContentType: ['highlightedText'],
|
|
41
|
+
message: 'You can only embedd Higlighted Text.',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
])
|
|
47
|
+
},
|
|
48
|
+
down: async function (migration) {
|
|
49
|
+
await migration.deleteContentType('bodyCopy')
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 tabModule = migration.createContentType('tabModule', {
|
|
8
|
+
name: 'Tab Module',
|
|
9
|
+
displayField: 'entryName',
|
|
10
|
+
description: 'Manage the tab module',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
// Add required assetName field
|
|
14
|
+
addEntryNameField(tabModule)
|
|
15
|
+
|
|
16
|
+
// Add title field
|
|
17
|
+
tabModule
|
|
18
|
+
.createField('title')
|
|
19
|
+
.name('Title')
|
|
20
|
+
.type('Symbol')
|
|
21
|
+
.required(true)
|
|
22
|
+
|
|
23
|
+
// Add header title field
|
|
24
|
+
tabModule
|
|
25
|
+
.createField('headerTitle')
|
|
26
|
+
.name('Header Title')
|
|
27
|
+
.type('Symbol')
|
|
28
|
+
.required(true)
|
|
29
|
+
|
|
30
|
+
// Body Copy reference
|
|
31
|
+
tabModule.createField('bodyCopy', {
|
|
32
|
+
name: 'Body Copy',
|
|
33
|
+
type: 'Link',
|
|
34
|
+
linkType: 'Entry',
|
|
35
|
+
validations: [{ linkContentType: ['bodyCopy'] }],
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// CTA Reference
|
|
39
|
+
tabModule.createField('cta', {
|
|
40
|
+
name: 'CTA',
|
|
41
|
+
type: 'Link',
|
|
42
|
+
linkType: 'Entry',
|
|
43
|
+
validations: [{ linkContentType: ['cta'] }],
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
},
|
|
48
|
+
down: async function (migration) {
|
|
49
|
+
await migration.deleteContentType('tabModule')
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 productModule = migration.createContentType('productModule', {
|
|
8
|
+
name: 'Product Module',
|
|
9
|
+
displayField: 'entryName',
|
|
10
|
+
description: 'Manage the product module',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
// Add required assetName field
|
|
14
|
+
addEntryNameField(productModule)
|
|
15
|
+
|
|
16
|
+
// Add header logo reference
|
|
17
|
+
productModule.createField('headerLogo', {
|
|
18
|
+
name: 'Header Logo',
|
|
19
|
+
type: 'Link',
|
|
20
|
+
linkType: 'Entry',
|
|
21
|
+
validations: [{ linkContentType: ['image'] }],
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
// Add header title field
|
|
25
|
+
productModule.createField('headerTitle', {
|
|
26
|
+
name: 'Header Title',
|
|
27
|
+
type: 'Symbol',
|
|
28
|
+
required: true,
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// Add subtitle field
|
|
32
|
+
productModule.createField('subtitle', {
|
|
33
|
+
name: 'Subtitle',
|
|
34
|
+
type: 'Symbol',
|
|
35
|
+
required: true,
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// Add tabs array reference
|
|
39
|
+
productModule
|
|
40
|
+
.createField('tabs')
|
|
41
|
+
.name('Tabs')
|
|
42
|
+
.required(true)
|
|
43
|
+
.type('Array')
|
|
44
|
+
.items({
|
|
45
|
+
type: 'Link',
|
|
46
|
+
linkType: 'Entry',
|
|
47
|
+
validations: [
|
|
48
|
+
{
|
|
49
|
+
linkContentType: ['tabModule'],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
// Add logo collection reference
|
|
55
|
+
productModule.createField('logoCollection', {
|
|
56
|
+
name: 'Logo Collection',
|
|
57
|
+
type: 'Link',
|
|
58
|
+
linkType: 'Entry',
|
|
59
|
+
validations: [{ linkContentType: ['logoCollectionModule'] }],
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
down: async function (migration) {
|
|
66
|
+
await migration.deleteContentType('productModule')
|
|
67
|
+
},
|
|
68
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const containerModule = migration.editContentType('containerModule')
|
|
6
|
+
containerModule.createField('testimonialTile', {
|
|
7
|
+
name: 'Testimonial Tile',
|
|
8
|
+
type: 'Link',
|
|
9
|
+
linkType: 'Entry',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['testimonialModule'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
})
|
|
17
|
+
containerModule.changeFieldControl('testimonialTile', 'builtin', 'entryLinkEditor', {
|
|
18
|
+
helpText:
|
|
19
|
+
'Select a testimonial tile to display in the container that will overlay the image',
|
|
20
|
+
})
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// @ts-check
|
|
24
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
25
|
+
down: async function (migration) {
|
|
26
|
+
const containerModule = migration.editContentType('containerModule')
|
|
27
|
+
containerModule.deleteField('testimonialTile')
|
|
28
|
+
},
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const accordion = migration.editContentType('accordion')
|
|
6
|
+
// Add headline field
|
|
7
|
+
accordion
|
|
8
|
+
.createField('headline')
|
|
9
|
+
.name('Headline')
|
|
10
|
+
.type('Symbol')
|
|
11
|
+
.required(false)
|
|
12
|
+
|
|
13
|
+
accordion.moveField('headline').beforeField('accordionItem')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// @ts-check
|
|
17
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
18
|
+
down: async function (migration) {
|
|
19
|
+
const accordion = migration.editContentType('accordion')
|
|
20
|
+
accordion.deleteField('headline')
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tileCollectionModule = migration.editContentType('tileCollectionModule')
|
|
6
|
+
|
|
7
|
+
tileCollectionModule.moveField('variant').beforeField('headline')
|
|
8
|
+
const tileCollectionModuleVariant = tileCollectionModule.editField("variant");
|
|
9
|
+
tileCollectionModuleVariant
|
|
10
|
+
.validations([{ "in": ["Icon", "Image", "Video", "Text", "Image Stacked Animated", "Multiple"] }])
|
|
11
|
+
tileCollectionModule.changeFieldControl("variant", "builtin", "dropdown", { "helpText": `If "Multiple" selected, the rest of the fields will be ignored` })
|
|
12
|
+
|
|
13
|
+
const tileContent = migration.editContentType('tileContent')
|
|
14
|
+
const tileContentVariant = tileContent.createField("variant");
|
|
15
|
+
tileContentVariant
|
|
16
|
+
.name("Variant")
|
|
17
|
+
.type("Symbol")
|
|
18
|
+
.localized(false)
|
|
19
|
+
.required(false)
|
|
20
|
+
.validations([{ "in": ["Full Image"] }])
|
|
21
|
+
.disabled(false)
|
|
22
|
+
.omitted(false)
|
|
23
|
+
tileContent.changeFieldControl("variant", "builtin", "dropdown", { "helpText": "If Full Image is selected, all other fields will be ignored" })
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
27
|
+
down: async function (migration) {
|
|
28
|
+
const tileCollectionModule = migration.editContentType('tileCollectionModule')
|
|
29
|
+
tileCollectionModule.deleteField('variant')
|
|
30
|
+
|
|
31
|
+
const tileCollectionModuleVariant = tileCollectionModule.editField("variant");
|
|
32
|
+
tileCollectionModuleVariant
|
|
33
|
+
.validations([{ "in": ["Icon", "Image", "Video", "Text", "Image Stacked Animated"] }])
|
|
34
|
+
tileCollectionModule.changeFieldControl("variant", "builtin", "dropdown", { "helpText": "" })
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
const tileContent = migration.editContentType('tileContent')
|
|
38
|
+
tileContent.deleteField('variant')
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const tabModule = migration.editContentType('tabModule')
|
|
6
|
+
|
|
7
|
+
// Add productId field
|
|
8
|
+
const productIdField = tabModule.createField("productId");
|
|
9
|
+
productIdField
|
|
10
|
+
.name("Product ID")
|
|
11
|
+
.type("Symbol")
|
|
12
|
+
.localized(false)
|
|
13
|
+
.required(false)
|
|
14
|
+
.disabled(false)
|
|
15
|
+
.omitted(false)
|
|
16
|
+
|
|
17
|
+
tabModule.changeFieldControl("productId", "builtin", "singleLine", {
|
|
18
|
+
"helpText": "A product Id to sync tabs across Product Modules. Will probably need to get from a developer."
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
// Add placeholderContent field
|
|
22
|
+
const placeholderContentField = tabModule.createField("placeholderContent");
|
|
23
|
+
placeholderContentField
|
|
24
|
+
.name("Placeholder Content")
|
|
25
|
+
.type("Symbol")
|
|
26
|
+
.localized(false)
|
|
27
|
+
.required(false)
|
|
28
|
+
.disabled(false)
|
|
29
|
+
.omitted(false)
|
|
30
|
+
tabModule.changeFieldControl("placeholderContent", "builtin", "singleLine", {
|
|
31
|
+
"helpText": "If this field is filled it will ignore other fields"
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
// Position placeholderContent field above title field
|
|
35
|
+
tabModule.moveField('placeholderContent').beforeField('title')
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
39
|
+
down: async function (migration) {
|
|
40
|
+
const tabModule = migration.editContentType('tabModule')
|
|
41
|
+
tabModule.deleteField('productId')
|
|
42
|
+
tabModule.deleteField('placeholderContent')
|
|
43
|
+
},
|
|
44
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const productModule = migration.editContentType('productModule')
|
|
6
|
+
|
|
7
|
+
// Create the new field with the desired ID and name
|
|
8
|
+
productModule.createField('footerContent', {
|
|
9
|
+
name: 'Footer Content',
|
|
10
|
+
type: 'Link',
|
|
11
|
+
linkType: 'Entry',
|
|
12
|
+
validations: [{
|
|
13
|
+
linkContentType: ['logoCollectionModule', 'containerModule']
|
|
14
|
+
}],
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
// Transform existing entries to migrate data from old field to new field
|
|
18
|
+
migration.transformEntries({
|
|
19
|
+
contentType: 'productModule',
|
|
20
|
+
from: ['logoCollection'],
|
|
21
|
+
to: ['footerContent'],
|
|
22
|
+
transformEntryForLocale: async (fromFields, currentLocale) => {
|
|
23
|
+
if (!fromFields.logoCollection || !fromFields.logoCollection[currentLocale]) {
|
|
24
|
+
return
|
|
25
|
+
} else {
|
|
26
|
+
return {
|
|
27
|
+
footerContent: fromFields.logoCollection[currentLocale],
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// Delete the old field after data migration
|
|
34
|
+
productModule.deleteField('logoCollection')
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
38
|
+
down: async function (migration) {
|
|
39
|
+
const productModule = migration.editContentType('productModule')
|
|
40
|
+
|
|
41
|
+
// Recreate the old field
|
|
42
|
+
productModule.createField('logoCollection', {
|
|
43
|
+
name: 'Logo Collection',
|
|
44
|
+
type: 'Link',
|
|
45
|
+
linkType: 'Entry',
|
|
46
|
+
validations: [{
|
|
47
|
+
linkContentType: ['logoCollectionModule']
|
|
48
|
+
}],
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Transform entries back from new field to old field
|
|
52
|
+
migration.transformEntries({
|
|
53
|
+
contentType: 'productModule',
|
|
54
|
+
from: ['footerContent'],
|
|
55
|
+
to: ['logoCollection'],
|
|
56
|
+
transformEntryForLocale: async (fromFields, currentLocale) => {
|
|
57
|
+
if (!fromFields.footerContent || !fromFields.footerContent[currentLocale]) {
|
|
58
|
+
return
|
|
59
|
+
} else {
|
|
60
|
+
return {
|
|
61
|
+
logoCollection: fromFields.footerContent[currentLocale],
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
// Delete the new field
|
|
68
|
+
productModule.deleteField('footerContent')
|
|
69
|
+
},
|
|
70
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const addEntryNameField = require('../helpers/addEntryNameField.cjs')
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
// @ts-check
|
|
5
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
6
|
+
up: function (migration) {
|
|
7
|
+
const ctaAction = migration.createContentType('ctaAction', {
|
|
8
|
+
name: 'CTA Action',
|
|
9
|
+
description: 'Used to control CTA actions other than navigation.',
|
|
10
|
+
displayField: 'entryName',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
addEntryNameField(ctaAction)
|
|
14
|
+
|
|
15
|
+
// Title
|
|
16
|
+
ctaAction.createField('title', {
|
|
17
|
+
name: 'Title',
|
|
18
|
+
type: 'Symbol',
|
|
19
|
+
required: true,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
// Aria Description
|
|
23
|
+
ctaAction.createField('ariaDescription', {
|
|
24
|
+
name: 'Aria Description',
|
|
25
|
+
type: 'Symbol',
|
|
26
|
+
required: true,
|
|
27
|
+
})
|
|
28
|
+
ctaAction.changeFieldControl('ariaDescription', 'builtin', 'singleLine', {
|
|
29
|
+
helpText: 'Aria description for CTA Action',
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// Cta Type
|
|
33
|
+
ctaAction.createField('triggerMappingValue', {
|
|
34
|
+
name: 'Trigger Mapping Value',
|
|
35
|
+
type: 'Symbol',
|
|
36
|
+
required: true,
|
|
37
|
+
validations: [
|
|
38
|
+
{
|
|
39
|
+
in: ['Sign-in modal'],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
})
|
|
43
|
+
ctaAction.changeFieldControl('triggerMappingValue', 'builtin', 'dropdown', {
|
|
44
|
+
helpText: 'A trigger that will determine the action of the CTA',
|
|
45
|
+
})
|
|
46
|
+
},
|
|
47
|
+
down: function (migration) {
|
|
48
|
+
migration.deleteContentType('ctaAction')
|
|
49
|
+
},
|
|
50
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
3
|
+
up: function (migration) {
|
|
4
|
+
const cta = migration.editContentType('cta')
|
|
5
|
+
|
|
6
|
+
cta.createField('ctaAction', {
|
|
7
|
+
name: 'CTA Action',
|
|
8
|
+
type: 'Link',
|
|
9
|
+
linkType: 'Entry',
|
|
10
|
+
validations: [
|
|
11
|
+
{
|
|
12
|
+
linkContentType: ['ctaAction'],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
cta.moveField('ctaAction').beforeField('link')
|
|
17
|
+
cta.changeFieldControl('ctaAction', 'builtin', 'entry-link-list', {
|
|
18
|
+
helpText: 'If CTA Action is used, the Link will be ignored.',
|
|
19
|
+
})
|
|
20
|
+
},
|
|
21
|
+
down: function (migration) {
|
|
22
|
+
const cta = migration.editContentType('cta')
|
|
23
|
+
cta.deleteField('ctaAction')
|
|
24
|
+
},
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// @ts-check
|
|
3
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
4
|
+
up: function (migration) {
|
|
5
|
+
const page = migration.editContentType('page')
|
|
6
|
+
|
|
7
|
+
// Add showCart field
|
|
8
|
+
const showCartField = page.createField("showCart");
|
|
9
|
+
showCartField
|
|
10
|
+
.name("Show Cart")
|
|
11
|
+
.type("Boolean")
|
|
12
|
+
.localized(false)
|
|
13
|
+
.required(false)
|
|
14
|
+
.disabled(false)
|
|
15
|
+
.omitted(false)
|
|
16
|
+
page.changeFieldControl("showCart", "builtin", "boolean", {
|
|
17
|
+
"helpText": "Toggle to show/hide the cart functionality on this page"
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/** @type { import('contentful-migration').MigrationFunction } */
|
|
22
|
+
down: async function (migration) {
|
|
23
|
+
const page = migration.editContentType('page')
|
|
24
|
+
page.deleteField('showCart')
|
|
25
|
+
},
|
|
26
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# GraphQL Queries
|
|
2
|
+
|
|
3
|
+
This directory contains GraphQL queries for fetching content from Contentful CMS.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
cms/contentful/queries/
|
|
9
|
+
├── index.ts # Barrel export file (manual updates required)
|
|
10
|
+
├── fragments.ts # Shared GraphQL fragments
|
|
11
|
+
├── *.query.ts # Individual component queries
|
|
12
|
+
└── README.md # This file
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## How Queries Are Exported
|
|
16
|
+
|
|
17
|
+
The query export system in this project is **semi-automatic**:
|
|
18
|
+
|
|
19
|
+
### The Process
|
|
20
|
+
|
|
21
|
+
1. **Individual Query Files** - Queries are defined in individual files with the pattern `*.query.ts`
|
|
22
|
+
- Example: `accordion.query.ts`, `carousel.query.ts`
|
|
23
|
+
|
|
24
|
+
2. **Manual Barrel Export** - Queries are re-exported through `index.ts`
|
|
25
|
+
- Uses wildcard exports: `export * from './accordion.query.js'`
|
|
26
|
+
- **Note:** Exports use `.js` extensions even though source files are `.ts` (ESM compatibility)
|
|
27
|
+
|
|
28
|
+
3. **Package-Level Export** - The barrel export is exposed via `package.json`:
|
|
29
|
+
```json
|
|
30
|
+
"./cms/contentful/graphql": {
|
|
31
|
+
"import": "./dist/cms/contentful/queries/index.js",
|
|
32
|
+
"types": "./dist/cms/contentful/queries/index.d.ts"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Creating a New Query
|
|
37
|
+
|
|
38
|
+
### Steps Required
|
|
39
|
+
|
|
40
|
+
1. **Create Query File** - Add your query file: `yourComponent.query.ts`
|
|
41
|
+
|
|
42
|
+
2. **Define Query** - Follow the established pattern:
|
|
43
|
+
```typescript
|
|
44
|
+
import { gql } from 'graphql-tag'
|
|
45
|
+
import type { DocumentNode } from 'graphql'
|
|
46
|
+
import { someFragment } from './fragments.js' // If needed
|
|
47
|
+
|
|
48
|
+
export const getYourComponent: DocumentNode = gql`
|
|
49
|
+
${someFragment} // Include fragments if needed
|
|
50
|
+
query yourComponentQuery($id: String!, $preview: Boolean = false) {
|
|
51
|
+
yourComponent(id: $id, preview: $preview) {
|
|
52
|
+
__typename
|
|
53
|
+
# Add your fields here
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. **Update Barrel Export** - **MANUALLY ADD** export to `index.ts`:
|
|
60
|
+
```typescript
|
|
61
|
+
export * from './yourComponent.query.js'
|
|
62
|
+
```
|
|
63
|
+
- Maintain alphabetical order for consistency
|
|
64
|
+
- Use `.js` extension (not `.ts`)
|
|
65
|
+
|
|
66
|
+
### Query Naming Conventions
|
|
67
|
+
|
|
68
|
+
- **File Name:** `componentName.query.ts` (camelCase)
|
|
69
|
+
- **Export Name:** `getComponentName` (camelCase with `get` prefix)
|
|
70
|
+
- **Query Name:** `componentNameQuery` (camelCase with `Query` suffix)
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
// accordion.query.ts
|
|
76
|
+
import { gql } from 'graphql-tag'
|
|
77
|
+
import type { DocumentNode } from 'graphql'
|
|
78
|
+
import { accordionItemFragment } from './fragments.js'
|
|
79
|
+
|
|
80
|
+
export const getAccordion: DocumentNode = gql`
|
|
81
|
+
${accordionItemFragment}
|
|
82
|
+
query accordionQuery($id: String!, $preview: Boolean = false) {
|
|
83
|
+
accordion(id: $id, preview: $preview) {
|
|
84
|
+
__typename
|
|
85
|
+
headline
|
|
86
|
+
accordionType
|
|
87
|
+
loadMoreButtonTitle
|
|
88
|
+
startOpen
|
|
89
|
+
accordionItemCollection {
|
|
90
|
+
items {
|
|
91
|
+
...accordionItemFragment
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Using Queries in Consumer Projects
|
|
100
|
+
|
|
101
|
+
Queries are consumed via the package export:
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { getAccordion, getCarousel } from '@cooperco/cooper-component-library/cms/contentful/graphql'
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Important Notes
|
|
108
|
+
|
|
109
|
+
- **Manual Export Required:** The system is NOT fully automatic - you MUST manually update `index.ts` when adding new queries
|
|
110
|
+
- **ESM Extensions:** Always use `.js` extensions in exports (even for `.ts` source files)
|
|
111
|
+
- **Preview Mode:** All queries support a `preview` parameter for Contentful preview API
|
|
112
|
+
- **Fragments:** Shared fragments are defined in `fragments.ts` and can be reused across queries
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag'
|
|
2
|
+
import type { DocumentNode } from 'graphql'
|
|
3
|
+
import { accordionItemFragment } from './fragments.js'
|
|
4
|
+
|
|
5
|
+
export const getAccordion: DocumentNode = gql`
|
|
6
|
+
${accordionItemFragment}
|
|
7
|
+
query accordionQuery($id: String!, $preview: Boolean = false) {
|
|
8
|
+
accordion(id: $id, preview: $preview) {
|
|
9
|
+
__typename
|
|
10
|
+
headline
|
|
11
|
+
accordionType
|
|
12
|
+
loadMoreButtonTitle
|
|
13
|
+
startOpen
|
|
14
|
+
accordionItemCollection {
|
|
15
|
+
items {
|
|
16
|
+
...accordionItemFragment
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag'
|
|
2
|
+
import type { DocumentNode } from 'graphql'
|
|
3
|
+
|
|
4
|
+
export const getCarousel: DocumentNode = gql`
|
|
5
|
+
query carouselQuery($id: String!, $preview: Boolean = false) {
|
|
6
|
+
carouselModule(id: $id, preview: $preview) {
|
|
7
|
+
headline
|
|
8
|
+
backgroundColor
|
|
9
|
+
variant
|
|
10
|
+
carouselItemsCollection {
|
|
11
|
+
items {
|
|
12
|
+
... on TestimonialModule {
|
|
13
|
+
sys {
|
|
14
|
+
id
|
|
15
|
+
}
|
|
16
|
+
__typename
|
|
17
|
+
}
|
|
18
|
+
... on TileContent {
|
|
19
|
+
sys {
|
|
20
|
+
id
|
|
21
|
+
}
|
|
22
|
+
__typename
|
|
23
|
+
}
|
|
24
|
+
... on ContainerModule {
|
|
25
|
+
sys {
|
|
26
|
+
id
|
|
27
|
+
}
|
|
28
|
+
__typename
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`
|