@total_onion/onion-library 3.1.0 → 3.2.0
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/index.js +10 -0
- package/onion-loader.js +22 -14
- package/onion-utils.mjs +18 -19
- package/package.json +29 -5
- package/.github/workflows/npm-publish.yml +0 -38
- package/.prettierrc +0 -22
- package/__spec__/copyBlockComponent.spec.js +0 -94
- package/__spec__/copyFile.spec.js +0 -78
- package/__spec__/copyFileKeeping.spec.js +0 -74
- package/__spec__/files/source.txt +0 -1
- package/__spec__/update-all-components.spec.js +0 -99
- package/__spec__/update-component.spec.js +0 -165
- package/assembleAssetList.js +0 -69
- package/breakpoints.scss +0 -6
- package/build-library.js +0 -4
- package/checkBuildAssets.js +0 -18
- package/components/block-accent-image-v3/accent-image-v3.js +0 -7
- package/components/block-accent-image-v3/accent-image-v3.scss +0 -4
- package/components/block-accent-image-v3/accent-image-v3.twig +0 -137
- package/components/block-accent-image-v3/group_6890e1233ff2d.json +0 -81
- package/components/block-accordion-v3/accordion-v3.js +0 -119
- package/components/block-accordion-v3/accordion-v3.scss +0 -197
- package/components/block-accordion-v3/accordion-v3.twig +0 -51
- package/components/block-accordion-v3/group_6888d2f0b230b.json +0 -458
- package/components/block-back-to-top-button-v3/back-to-top-button-v3.js +0 -12
- package/components/block-back-to-top-button-v3/back-to-top-button-v3.scss +0 -68
- package/components/block-back-to-top-button-v3/back-to-top-button-v3.twig +0 -40
- package/components/block-back-to-top-button-v3/group_63e24e04a1e61.json +0 -323
- package/components/block-betterreviews-display-v3/betterreviews-display-v3.js +0 -10
- package/components/block-betterreviews-display-v3/betterreviews-display-v3.scss +0 -104
- package/components/block-betterreviews-display-v3/betterreviews-display-v3.twig +0 -24
- package/components/block-betterreviews-display-v3/group_6892880fc1a00.json +0 -182
- package/components/block-block-interactions-v3/block-interactions-v3.js +0 -53
- package/components/block-block-interactions-v3/block-interactions-v3.scss +0 -32
- package/components/block-block-interactions-v3/block-interactions-v3.twig +0 -55
- package/components/block-block-interactions-v3/group_687e1575ba23d.json +0 -700
- package/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js +0 -243
- package/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.scss +0 -156
- package/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.twig +0 -146
- package/components/block-carousel-multi-layout-v3/group_686bd42e551d6.json +0 -578
- package/components/block-cocktail-recipe-v3/cocktail-recipe-v3.js +0 -127
- package/components/block-cocktail-recipe-v3/cocktail-recipe-v3.scss +0 -345
- package/components/block-cocktail-recipe-v3/cocktail-recipe-v3.twig +0 -93
- package/components/block-cocktail-recipe-v3/group_68fff19fa4dd0.json +0 -202
- package/components/block-cover-link-v3/cover-link-v3.js +0 -7
- package/components/block-cover-link-v3/cover-link-v3.scss +0 -10
- package/components/block-cover-link-v3/cover-link-v3.twig +0 -16
- package/components/block-cover-link-v3/group_687192c28b7eb.json +0 -96
- package/components/block-divider-v3/divider-v3.js +0 -8
- package/components/block-divider-v3/divider-v3.scss +0 -103
- package/components/block-divider-v3/divider-v3.twig +0 -45
- package/components/block-divider-v3/group_686b919696bfe.json +0 -891
- package/components/block-featured-image-gallery-v3/featured-image-gallery-v3.js +0 -44
- package/components/block-featured-image-gallery-v3/featured-image-gallery-v3.scss +0 -93
- package/components/block-featured-image-gallery-v3/featured-image-gallery-v3.twig +0 -43
- package/components/block-featured-image-gallery-v3/group_5f91897095b42.json +0 -88
- package/components/block-form-selection-v3/form-selection-v3.js +0 -78
- package/components/block-form-selection-v3/form-selection-v3.scss +0 -38
- package/components/block-form-selection-v3/form-selection-v3.twig +0 -84
- package/components/block-form-selection-v3/group_68752e7949e53.json +0 -351
- package/components/block-gradient-layer-v3/gradient-layer-v3.js +0 -7
- package/components/block-gradient-layer-v3/gradient-layer-v3.scss +0 -8
- package/components/block-gradient-layer-v3/gradient-layer-v3.twig +0 -78
- package/components/block-gradient-layer-v3/group_686fdadc85df4.json +0 -206
- package/components/block-group-container-v3/group-container-v3.js +0 -7
- package/components/block-group-container-v3/group-container-v3.php +0 -14
- package/components/block-group-container-v3/group-container-v3.scss +0 -45
- package/components/block-group-container-v3/group-container-v3.twig +0 -70
- package/components/block-group-container-v3/group_6865578ada499.json +0 -3660
- package/components/block-lottie-content-v3/group_687197027216d.json +0 -177
- package/components/block-lottie-content-v3/lottie-content-v3.js +0 -25
- package/components/block-lottie-content-v3/lottie-content-v3.scss +0 -2
- package/components/block-lottie-content-v3/lottie-content-v3.twig +0 -15
- package/components/block-market-selector-v3/group_68752075dd831.json +0 -129
- package/components/block-market-selector-v3/market-selector-v3.js +0 -7
- package/components/block-market-selector-v3/market-selector-v3.scss +0 -120
- package/components/block-market-selector-v3/market-selector-v3.twig +0 -40
- package/components/block-modal-form-v3/modal-form-v3.js +0 -59
- package/components/block-modal-form-v3/modal-form-v3.scss +0 -6
- package/components/block-modal-form-v3/modal-form-v3.twig +0 -30
- package/components/block-nav-menu-container-v3/group_687e00b45e9a3.json +0 -187
- package/components/block-nav-menu-container-v3/nav-menu-container-v3.js +0 -7
- package/components/block-nav-menu-container-v3/nav-menu-container-v3.scss +0 -3
- package/components/block-nav-menu-container-v3/nav-menu-container-v3.twig +0 -23
- package/components/block-post-info-v3/group_6866429531436.json +0 -3112
- package/components/block-post-info-v3/post-info-v3/bazaarvoice-inline.twig +0 -13
- package/components/block-post-info-v3/post-info-v3/better-reviews.twig +0 -15
- package/components/block-post-info-v3/post-info-v3/divider.twig +0 -8
- package/components/block-post-info-v3/post-info-v3/drink-description.twig +0 -10
- package/components/block-post-info-v3/post-info-v3/global-image.twig +0 -22
- package/components/block-post-info-v3/post-info-v3/gradient-layer.twig +0 -78
- package/components/block-post-info-v3/post-info-v3/gradient-overlay.twig +0 -10
- package/components/block-post-info-v3/post-info-v3/post-author.twig +0 -17
- package/components/block-post-info-v3/post-info-v3/post-buy-now.twig +0 -116
- package/components/block-post-info-v3/post-info-v3/post-categories.twig +0 -15
- package/components/block-post-info-v3/post-info-v3/post-headline.twig +0 -15
- package/components/block-post-info-v3/post-info-v3/post-image.twig +0 -47
- package/components/block-post-info-v3/post-info-v3/post-info-description.twig +0 -15
- package/components/block-post-info-v3/post-info-v3/post-info-subtitle.twig +0 -14
- package/components/block-post-info-v3/post-info-v3/post-link.twig +0 -42
- package/components/block-post-info-v3/post-info-v3/post-name.twig +0 -12
- package/components/block-post-info-v3/post-info-v3/post-publish-date.twig +0 -12
- package/components/block-post-info-v3/post-info-v3/post-tags.twig +0 -24
- package/components/block-post-info-v3/post-info-v3/post-text-alternative-style.twig +0 -16
- package/components/block-post-info-v3/post-info-v3/post-title.twig +0 -15
- package/components/block-post-info-v3/post-info-v3/post-video.twig +0 -27
- package/components/block-post-info-v3/post-info-v3/reservebar-add-to-cart.twig +0 -32
- package/components/block-post-info-v3/post-info-v3/shopify-add-to-cart.twig +0 -31
- package/components/block-post-info-v3/post-info-v3/social-networks.twig +0 -33
- package/components/block-post-info-v3/post-info-v3/spacer-v3.twig +0 -9
- package/components/block-post-info-v3/post-info-v3.js +0 -10
- package/components/block-post-info-v3/post-info-v3.scss +0 -210
- package/components/block-post-info-v3/post-info-v3.twig +0 -67
- package/components/block-product-info-v3/group_68909995b6550.json +0 -3544
- package/components/block-product-info-v3/product-info-v3/product-abv.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-cask-type-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-cask-type.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-colour-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-colour.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-description.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-finish-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-finish.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-headline.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-image.twig +0 -43
- package/components/block-product-info-v3/product-info-v3/product-name.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-nose-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-nose.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-pair-with-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-pair-with.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-palate-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-palate.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-taste-label.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-taste.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/product-volume.twig +0 -14
- package/components/block-product-info-v3/product-info-v3/spacer-v3.twig +0 -9
- package/components/block-product-info-v3/product-info-v3.js +0 -7
- package/components/block-product-info-v3/product-info-v3.scss +0 -171
- package/components/block-product-info-v3/product-info-v3.twig +0 -43
- package/components/block-raw-html-v3/group_686ba68d603a2.json +0 -212
- package/components/block-raw-html-v3/raw-html-v3.js +0 -7
- package/components/block-raw-html-v3/raw-html-v3.scss +0 -2
- package/components/block-raw-html-v3/raw-html-v3.twig +0 -17
- package/components/block-responsive-table-v3/group_6617ecc987ddd.json +0 -394
- package/components/block-responsive-table-v3/responsive-table-v3.js +0 -7
- package/components/block-responsive-table-v3/responsive-table-v3.scss +0 -49
- package/components/block-responsive-table-v3/responsive-table-v3.twig +0 -47
- package/components/block-scrolling-banner-v3/group_68e67fca1ec80.json +0 -664
- package/components/block-scrolling-banner-v3/scrolling-banner-v3.js +0 -144
- package/components/block-scrolling-banner-v3/scrolling-banner-v3.scss +0 -104
- package/components/block-scrolling-banner-v3/scrolling-banner-v3.twig +0 -72
- package/components/block-section-separator-v3/group_6874c8d79b84b.json +0 -576
- package/components/block-section-separator-v3/section-separator-v3.js +0 -7
- package/components/block-section-separator-v3/section-separator-v3.scss +0 -42
- package/components/block-section-separator-v3/section-separator-v3.twig +0 -46
- package/components/block-single-column-container-v3/group_6887640458d61.json +0 -481
- package/components/block-single-column-container-v3/single-column-container-v3.js +0 -7
- package/components/block-single-column-container-v3/single-column-container-v3.scss +0 -14
- package/components/block-single-column-container-v3/single-column-container-v3.twig +0 -30
- package/components/block-single-responsive-image-v3/group_6867bcf24c2fc.json +0 -128
- package/components/block-single-responsive-image-v3/single-responsive-image-v3.js +0 -7
- package/components/block-single-responsive-image-v3/single-responsive-image-v3.scss +0 -9
- package/components/block-single-responsive-image-v3/single-responsive-image-v3.twig +0 -24
- package/components/block-site-copyright-notice-v3/group_66296c3716b4f.json +0 -304
- package/components/block-site-copyright-notice-v3/index.html +0 -33
- package/components/block-site-copyright-notice-v3/site-copyright-notice-v3.js +0 -58
- package/components/block-site-copyright-notice-v3/site-copyright-notice-v3.scss +0 -21
- package/components/block-site-copyright-notice-v3/site-copyright-notice-v3.twig +0 -30
- package/components/block-site-logo-container-v3/group_687e3b887b508.json +0 -175
- package/components/block-site-logo-container-v3/site-logo-container-v3.js +0 -7
- package/components/block-site-logo-container-v3/site-logo-container-v3.scss +0 -29
- package/components/block-site-logo-container-v3/site-logo-container-v3.twig +0 -40
- package/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js +0 -7
- package/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.scss +0 -16
- package/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.twig +0 -24
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +0 -8
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.scss +0 -31
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.twig +0 -18
- package/components/block-social-networks-v3/group_6891d4d7db414.json +0 -146
- package/components/block-social-networks-v3/social-networks-v3.js +0 -7
- package/components/block-social-networks-v3/social-networks-v3.scss +0 -7
- package/components/block-social-networks-v3/social-networks-v3.twig +0 -24
- package/components/block-spacer-v3/group_686b8cb48c708.json +0 -131
- package/components/block-spacer-v3/spacer-v3.js +0 -8
- package/components/block-spacer-v3/spacer-v3.scss +0 -19
- package/components/block-spacer-v3/spacer-v3.twig +0 -13
- package/components/block-spotify-embed-v3/group_67d04c4c4cf78.json +0 -120
- package/components/block-spotify-embed-v3/spotify-embed-v3.js +0 -7
- package/components/block-spotify-embed-v3/spotify-embed-v3.scss +0 -11
- package/components/block-spotify-embed-v3/spotify-embed-v3.twig +0 -23
- package/components/block-standard-content-v3/group_68655756737c9.json +0 -344
- package/components/block-standard-content-v3/standard-content-v3.js +0 -39
- package/components/block-standard-content-v3/standard-content-v3.scss +0 -11
- package/components/block-standard-content-v3/standard-content-v3.twig +0 -46
- package/components/block-sticky-buy-cta-v3/group_68b061bb56543.json +0 -172
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +0 -7
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.scss +0 -2
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.twig +0 -92
- package/components/block-sub-group-container-v3/group_686ceba7d6066.json +0 -2142
- package/components/block-sub-group-container-v3/sub-group-container-v3.js +0 -9
- package/components/block-sub-group-container-v3/sub-group-container-v3.scss +0 -27
- package/components/block-sub-group-container-v3/sub-group-container-v3.twig +0 -59
- package/components/block-video-content-v3/group_687190b8d26df.json +0 -169
- package/components/block-video-content-v3/video-content-v3.js +0 -12
- package/components/block-video-content-v3/video-content-v3.scss +0 -123
- package/components/block-video-content-v3/video-content-v3.twig +0 -26
- package/components/component-accent-image-v3/accent-image-v3.twig +0 -119
- package/components/component-accent-image-v3/group_686cd5547efd2.json +0 -975
- package/components/component-accent-text-v3/accent-text-v3-extra.scss +0 -2
- package/components/component-accent-text-v3/accent-text-v3.scss +0 -60
- package/components/component-accent-text-v3/group_686b91fed8f5f.json +0 -220
- package/components/component-accordion-v3/accordion-v3.js +0 -113
- package/components/component-accordion-v3/accordion-v3.scss +0 -189
- package/components/component-accordion-v3/accordion-v3.twig +0 -39
- package/components/component-accordion-v3/group_66ab7edfc6d63.json +0 -535
- package/components/component-animations-style-v3/animations-style-v3.twig +0 -5
- package/components/component-animations-v3/animations-v3.scss +0 -161
- package/components/component-animations-v3/animations-v3.twig +0 -19
- package/components/component-animations-v3/group_689f39c37980a.json +0 -499
- package/components/component-better-reviews-v3/better-reviews-v3.scss +0 -137
- package/components/component-block-padding-v3/block-padding-v3.scss +0 -64
- package/components/component-block-padding-v3/block-padding-v3.twig +0 -33
- package/components/component-block-padding-v3/group_689f66f3e26df.json +0 -535
- package/components/component-block-settings-v3/block-settings-v3.scss +0 -46
- package/components/component-block-settings-v3/block-settings-v3.twig +0 -34
- package/components/component-block-settings-v3/group_689f649af2ac4.json +0 -983
- package/components/component-blockquote-v3/blockquote-v3.scss +0 -54
- package/components/component-box-shadow-v3/box-shadow-v3.scss +0 -12
- package/components/component-buy-now-button-v3/buy-now-buttons-v3.twig +0 -69
- package/components/component-carousel-fields-v3/group_686fd30f4d873.json +0 -3025
- package/components/component-child-block-video-fields/group_6852a4f384204.json +0 -536
- package/components/component-content-box-settings-v3/content-box-settings-v3.scss +0 -205
- package/components/component-content-box-settings-v3/content-box-settings-v3.twig +0 -156
- package/components/component-content-box-settings-v3/group_686e6ec702acc.json +0 -1729
- package/components/component-content-box-v3/content-box-v3.js +0 -6
- package/components/component-content-box-v3/content-box-v3.scss +0 -28
- package/components/component-content-box-v3/content-box-v3.twig +0 -23
- package/components/component-content-box-v3/group_686b8a4f1fe5d.json +0 -568
- package/components/component-content-image-v3/content-image-v3.scss +0 -33
- package/components/component-content-image-v3/content-image-v3.twig +0 -77
- package/components/component-content-image-v3/group_68722935c428f.json +0 -647
- package/components/component-core-body-close-v3/core-body-close-v3.twig +0 -2
- package/components/component-core-body-open-v3/core-body-open-v3.twig +0 -32
- package/components/component-core-group-container-styles-v3/core-group-container-styles-v3.scss +0 -48
- package/components/component-core-head-v3/core-head-v3.twig +0 -62
- package/components/component-cta-selection-v3/cta-selection-v3.twig +0 -256
- package/components/component-cta-selection-v3/group_686e93eb832a6.json +0 -1117
- package/components/component-e-shop-settings-v3/e-shop-settings-v3.twig +0 -114
- package/components/component-element-positioning-v3/element-positioning-v3.scss +0 -41
- package/components/component-element-positioning-v3/element-positioning-v3.twig +0 -42
- package/components/component-element-positioning-v3/group_6882281544263.json +0 -635
- package/components/component-endpoints/endpoints.php +0 -32
- package/components/component-flex-layout-container-v3/flex-layout-container-v3.scss +0 -38
- package/components/component-flex-layout-container-v3/flex-layout-container-v3.twig +0 -28
- package/components/component-flex-layout-container-v3/group_6887a026bbc33.json +0 -773
- package/components/component-global-content-max-width-v3/global-content-max-width-v3.twig +0 -10
- package/components/component-global-content-max-width-v3/group_63c83de4f0a99.json +0 -58
- package/components/component-gradient-overlay-v3/gradient-overlay-v3.scss +0 -43
- package/components/component-gradient-overlay-v3/gradient-overlay-v3.twig +0 -58
- package/components/component-gradient-overlay-v3/group_686fd9ca50b63.json +0 -495
- package/components/component-grid-gap-mults-v3/grid-gap-mults-v3.twig +0 -10
- package/components/component-grid-gap-mults-v3/group_689221b94ce69.json +0 -220
- package/components/component-grid-layout-container-v3/grid-layout-container-v3.scss +0 -154
- package/components/component-grid-layout-container-v3/grid-layout-container-v3.twig +0 -88
- package/components/component-grid-layout-container-v3/group_6882282e65bf2.json +0 -1525
- package/components/component-grid-layout-element-v3/grid-layout-element-v3.scss +0 -47
- package/components/component-grid-layout-element-v3/grid-layout-element-v3.twig +0 -23
- package/components/component-grid-layout-element-v3/group_68822860bda9f.json +0 -728
- package/components/component-nav-menu-v3/group_68da703f710ff.json +0 -432
- package/components/component-nav-menu-v3/nav-menu-v3.scss +0 -43
- package/components/component-nav-menu-v3/nav-menu-v3.twig +0 -75
- package/components/component-responsive-image-v3/group_6867bc53f1da8.json +0 -1515
- package/components/component-responsive-image-v3/responsive-image-v3.scss +0 -63
- package/components/component-responsive-image-v3/responsive-image-v3.twig +0 -71
- package/components/component-responsive-picture-element-v3/responsive-picture-element-v3.twig +0 -35
- package/components/component-responsive-show-hide/responsive-show-hide-v3.twig +0 -9
- package/components/component-social-media-share-v3/social-media-share-v3-extra.scss +0 -6
- package/components/component-social-media-share-v3/social-media-share-v3.scss +0 -131
- package/components/component-social-networks-v3/social-networks-v3.scss +0 -73
- package/components/component-social-networks-v3/social-networks-v3.twig +0 -43
- package/components/component-text-editor-settings-container-classes-v3/text-editor-settings-container-classes-v3.twig +0 -9
- package/components/component-text-editor-settings-element-classes-v3/text-editor-settings-element-classes-v3.twig +0 -13
- package/components/component-text-editor-settings-v3/group_687a4e2334e37.json +0 -1377
- package/components/component-text-editor-settings-variables-v3/text-editor-settings-variables-v3.twig +0 -61
- package/components/component-video-component-v3/video-component-v3.twig +0 -90
- package/components/component-video-fields-v3/group_6872282f44634.json +0 -1013
- package/components/component-video-trigger-button-v3/video-trigger-button-v3.twig +0 -14
- package/components/component-wysiwyg-editor-v3/group_6867e153af466.json +0 -127
- package/components/component-wysiwyg-editor-v3/wysiwyg-editor-v3.twig +0 -18
- package/components/core-block-editor-assets-v3/core-block-editor-assets-v3.php +0 -14
- package/components/core-core-block-render-function-v3/core-block-render-function-v3.php +0 -39
- package/components/core-core-design-settings-v3/core-design-settings-v3.php +0 -43
- package/components/core-core-post-overrides-v3/core-post-overrides-v3.php +0 -21
- package/components/core-core-themes/core-themes-v3.php +0 -68
- package/components/core-core-typography-v3/core-typography-v3.php +0 -239
- package/components/core-globals/globals.php +0 -39
- package/components/entrypoint-entry-point-classes-v3/entry-point-classes-v3.twig +0 -12
- package/components/entrypoint-entry-point-html-v3/entry-point-html-v3.twig +0 -19
- package/components/entrypoint-entry-point-style-v3/entry-point-style-v3.twig +0 -11
- package/components/fields-acf-wysiwyg-options-v3/acf-wysiwyg-options-v3.php +0 -221
- package/components/fields-animations-v3/animations-v3.scss +0 -127
- package/components/fields-archive-pages-v3/group_635e777ce46d4.json +0 -150
- package/components/fields-cocktail-info-v3/group_64c29b7f188ca.json +0 -686
- package/components/fields-content-container-settings-v3/content-container-settings-v3.scss +0 -213
- package/components/fields-content-container-v3/content-container-v3.js +0 -96
- package/components/fields-content-container-v3/content-container-v3.scss +0 -31
- package/components/fields-core-critical-v3/core-critical-v3.scss +0 -13
- package/components/fields-core-css-modules-v3/core-css-modules-v3.scss +0 -13
- package/components/fields-core-css-sizing-vars-v3/core-css-sizing-vars-v3.scss +0 -125
- package/components/fields-core-cta-v3/core-cta-v3.scss +0 -276
- package/components/fields-core-functions-v3/core-functions-v3.scss +0 -30
- package/components/fields-core-generic-v3/core-generic-v3.scss +0 -299
- package/components/fields-core-mixins-v3/core-mixins-v3.scss +0 -744
- package/components/fields-core-root-variables-v3/core-root-variables-v3.scss +0 -47
- package/components/fields-core-typography-mixins-v3/core-typography-mixins-v3.scss +0 -1080
- package/components/fields-core-typography-v3/core-typography-v3.scss +0 -457
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.js +0 -270
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.scss +0 -106
- package/components/fields-drink-responsibly-notice-v3/group_68751257883ad.json +0 -266
- package/components/fields-dynamic-critical-css-v3/group_65abcd463e8d0.json +0 -126
- package/components/fields-e-shop-settings-v3/e-shop-settings-v3.twig +0 -87
- package/components/fields-e-shop-settings-v3/group_650b24b4e623d.json +0 -803
- package/components/fields-global-preload-v3/group_65e0bd35e781b.json +0 -289
- package/components/fields-image-management-service-v3/group_677813165b633.json +0 -149
- package/components/fields-ingredients-list/group_6900f19dadebf.json +0 -225
- package/components/fields-modal-popup-content-v3/group_689876f1ee3fc.json +0 -403
- package/components/fields-modal-popup-content-v3/modal-popup-content-v3.twig +0 -18
- package/components/fields-post-info-v3/group_6867bbe167dd2.json +0 -1089
- package/components/fields-product-info-v3/group_689098dd3a131.json +0 -721
- package/components/fields-upload-filesize-limit-v3/group_659d259760a1d.json +0 -56
- package/components/fields-video-management-services-v3/group_67b4cac05cb30.json +0 -146
- package/components/webc-counter-display/counter-display.css +0 -2
- package/components/webc-counter-display/counter-display.html +0 -5
- package/components/webc-counter-display/counter-display.js +0 -30
- package/components/webc-counter-display/index.html +0 -30
- package/components/webc-layout-container/index.html +0 -108
- package/components/webc-layout-container/layout-container.css +0 -9
- package/components/webc-layout-container/layout-container.html +0 -5
- package/components/webc-layout-container/layout-container.js +0 -22
- package/components/webc-loadmore-trigger/index.html +0 -30
- package/components/webc-loadmore-trigger/loadmore-trigger.css +0 -20
- package/components/webc-loadmore-trigger/loadmore-trigger.html +0 -6
- package/components/webc-loadmore-trigger/loadmore-trigger.js +0 -34
- package/components/webc-post-carousel-display-module/index.html +0 -30
- package/components/webc-post-carousel-display-module/post-carousel-display-module.css +0 -36
- package/components/webc-post-carousel-display-module/post-carousel-display-module.html +0 -5
- package/components/webc-post-carousel-display-module/post-carousel-display-module.js +0 -48
- package/components/webc-post-filter-module/dev-content/amber.webp +0 -0
- package/components/webc-post-filter-module/dev-content/bluey.webp +0 -0
- package/components/webc-post-filter-module/dev-content/chucky-vanille.webp +0 -0
- package/components/webc-post-filter-module/dev-content/dev-content.js +0 -347
- package/components/webc-post-filter-module/dev-content/dev-contentlocal.js +0 -362
- package/components/webc-post-filter-module/dev-content/fat-gigio-basket-life.webp +0 -0
- package/components/webc-post-filter-module/dev-content/fat-gigio-kitten.webp +0 -0
- package/components/webc-post-filter-module/dev-content/fat-gigio-sleepy.webp +0 -0
- package/components/webc-post-filter-module/dev-content/kai-lounging.webp +0 -0
- package/components/webc-post-filter-module/dev-content/kai-selfie.webp +0 -0
- package/components/webc-post-filter-module/dev-content/kai.webp +0 -0
- package/components/webc-post-filter-module/dev-content/lulu-mad.webp +0 -0
- package/components/webc-post-filter-module/dev-content/lulu-serious.webp +0 -0
- package/components/webc-post-filter-module/dev-content/martha-on-the-mat.webp +0 -0
- package/components/webc-post-filter-module/dev-content/max-on-the-mat.webp +0 -0
- package/components/webc-post-filter-module/dev-content/mephy-dreams-of-mice.webp +0 -0
- package/components/webc-post-filter-module/dev-content/mr-business-doing-work.webp +0 -0
- package/components/webc-post-filter-module/dev-content/mr-business-on-top.webp +0 -0
- package/components/webc-post-filter-module/dev-content/peanut-keeping-an-eye.webp +0 -0
- package/components/webc-post-filter-module/dev-content/pete-at-work.webp +0 -0
- package/components/webc-post-filter-module/dev-content/pete-bath.webp +0 -0
- package/components/webc-post-filter-module/dev-content/pete-dinosaur.webp +0 -0
- package/components/webc-post-filter-module/dev-content/pete-lawn.webp +0 -0
- package/components/webc-post-filter-module/dev-content/pete-snacks.webp +0 -0
- package/components/webc-post-filter-module/dev-content/ramses-kitten.webp +0 -0
- package/components/webc-post-filter-module/dev-content/ramses-school-day.webp +0 -0
- package/components/webc-post-filter-module/dev-content/ramses-tired.webp +0 -0
- package/components/webc-post-filter-module/dev-content/remy-garden-contemplation.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-field.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-luxury-2.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-luxury.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-puppy-good-dog.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-puppy-pose.webp +0 -0
- package/components/webc-post-filter-module/dev-content/sky-security.webp +0 -0
- package/components/webc-post-filter-module/dev-content/vanille-asleep.webp +0 -0
- package/components/webc-post-filter-module/dev-content/vanille-bass.webp +0 -0
- package/components/webc-post-filter-module/dev-content/vanille-party.webp +0 -0
- package/components/webc-post-filter-module/dev-content/vanille-puppy-eyes.webp +0 -0
- package/components/webc-post-filter-module/dev-content/vanille-puppy.webp +0 -0
- package/components/webc-post-filter-module/index.html +0 -30
- package/components/webc-post-filter-module/post-filter-module.css +0 -59
- package/components/webc-post-filter-module/post-filter-module.html +0 -13
- package/components/webc-post-filter-module/post-filter-module.js +0 -359
- package/components/webc-post-filter-module-no-group/index.html +0 -30
- package/components/webc-post-filter-module-no-group/post-filter-module-no-group.css +0 -59
- package/components/webc-post-filter-module-no-group/post-filter-module-no-group.html +0 -13
- package/components/webc-post-filter-module-no-group/post-filter-module-no-group.js +0 -312
- package/components/webc-post-grid-display-module/index.html +0 -30
- package/components/webc-post-grid-display-module/post-grid-display-module.css +0 -42
- package/components/webc-post-grid-display-module/post-grid-display-module.html +0 -6
- package/components/webc-post-grid-display-module/post-grid-display-module.js +0 -48
- package/components/webc-ptfg-9000/index.html +0 -108
- package/components/webc-ptfg-9000/ptfg-9000.css +0 -14
- package/components/webc-ptfg-9000/ptfg-9000.html +0 -1
- package/components/webc-ptfg-9000/ptfg-9000.js +0 -42
- package/components/webc-responsive-image/index.html +0 -108
- package/components/webc-responsive-image/layout-container.css +0 -9
- package/components/webc-responsive-image/layout-container.js +0 -22
- package/components/webc-responsive-image/responsive-image.html +0 -15
- package/components/webc-slot-test/slot-test.html +0 -25
- package/components/webc-text-input-trigger/index.html +0 -30
- package/components/webc-text-input-trigger/text-input-trigger.css +0 -6
- package/components/webc-text-input-trigger/text-input-trigger.html +0 -4
- package/components/webc-text-input-trigger/text-input-trigger.js +0 -33
- package/components/webc-toggle-trigger/index.html +0 -30
- package/components/webc-toggle-trigger/toggle-trigger.css +0 -13
- package/components/webc-toggle-trigger/toggle-trigger.html +0 -8
- package/components/webc-toggle-trigger/toggle-trigger.js +0 -53
- package/createDynamicBlockScss-v3.js +0 -25
- package/createJsAssets-v3.js +0 -35
- package/createJsAssets.js +0 -31
- package/createNewBlock.js +0 -131
- package/createNewChildBlock2.js +0 -142
- package/createPreviewScss.js +0 -35
- package/datalayer-tools.mjs +0 -2
- package/duplicateBlock.js +0 -123
- package/esbuild.mjs +0 -87
- package/exportAllBlocks.js +0 -144
- package/exportBlock.js +0 -109
- package/exportChildBlock.js +0 -102
- package/exportCustomCachesToLibrary.js +0 -73
- package/exportEntrypointToLibrary.js +0 -76
- package/exportImagesToLibrary.js +0 -68
- package/exportSEOExtrasToLibrary.js +0 -73
- package/exportToLibrary.js +0 -548
- package/importBlock.js +0 -92
- package/importChildBlock.js +0 -76
- package/install-component.js +0 -204
- package/list-components.js +0 -9
- package/new-block-templates/template-block-json.js +0 -37
- package/new-block-templates/template-default.js +0 -21
- package/new-block-templates/template-js-blank.js +0 -12
- package/new-block-templates/template-scss-blank.js +0 -6
- package/no-audio.vtt +0 -4
- package/onion-loader-dev.js +0 -260
- package/onion-loader-local.js +0 -222
- package/public/.gitkeep +0 -0
- package/public/assetList.mjs +0 -3
- package/public/block-accent-image-v3/accent-image-v3.css +0 -2
- package/public/block-accent-image-v3/accent-image-v3.js +0 -7
- package/public/block-accordion-v3/accordion-v3.css +0 -380
- package/public/block-accordion-v3/accordion-v3.js +0 -117
- package/public/block-back-to-top-button-v3/back-to-top-button-v3.css +0 -64
- package/public/block-back-to-top-button-v3/back-to-top-button-v3.js +0 -12
- package/public/block-betterreviews-display-v3/betterreviews-display-v3.css +0 -95
- package/public/block-betterreviews-display-v3/betterreviews-display-v3.js +0 -7
- package/public/block-block-interactions-v3/block-interactions-v3.css +0 -36
- package/public/block-block-interactions-v3/block-interactions-v3.js +0 -44
- package/public/block-carousel-multi-layout-v3/carousel-multi-layout-v3.css +0 -187
- package/public/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js +0 -185
- package/public/block-cocktail-recipe-v3/cocktail-recipe-v3.css +0 -268
- package/public/block-cocktail-recipe-v3/cocktail-recipe-v3.js +0 -93
- package/public/block-cover-link-v3/cover-link-v3.css +0 -8
- package/public/block-cover-link-v3/cover-link-v3.js +0 -7
- package/public/block-divider-v3/divider-v3.css +0 -74
- package/public/block-divider-v3/divider-v3.js +0 -7
- package/public/block-featured-image-gallery-v3/featured-image-gallery-v3.css +0 -98
- package/public/block-featured-image-gallery-v3/featured-image-gallery-v3.js +0 -44
- package/public/block-form-selection-v3/form-selection-v3.css +0 -31
- package/public/block-form-selection-v3/form-selection-v3.js +0 -61
- package/public/block-gradient-layer-v3/gradient-layer-v3.css +0 -45
- package/public/block-gradient-layer-v3/gradient-layer-v3.js +0 -7
- package/public/block-group-container-v3/group-container-v3.css +0 -303
- package/public/block-group-container-v3/group-container-v3.js +0 -7
- package/public/block-lottie-content-v3/lottie-content-v3.css +0 -0
- package/public/block-lottie-content-v3/lottie-content-v3.js +0 -25
- package/public/block-market-selector-v3/market-selector-v3.css +0 -136
- package/public/block-market-selector-v3/market-selector-v3.js +0 -7
- package/public/block-modal-form-v3/modal-form-v3.css +0 -0
- package/public/block-modal-form-v3/modal-form-v3.js +0 -44
- package/public/block-nav-menu-container-v3/nav-menu-container-v3.css +0 -3
- package/public/block-nav-menu-container-v3/nav-menu-container-v3.js +0 -7
- package/public/block-post-info-v3/post-info-v3.css +0 -1148
- package/public/block-post-info-v3/post-info-v3.js +0 -7
- package/public/block-post-type-filter-grid-v3/post-type-filter-grid-v3.css +0 -873
- package/public/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +0 -13
- package/public/block-product-info-v3/product-info-v3.css +0 -846
- package/public/block-product-info-v3/product-info-v3.js +0 -7
- package/public/block-raw-html-v3/raw-html-v3.css +0 -0
- package/public/block-raw-html-v3/raw-html-v3.js +0 -7
- package/public/block-responsive-table-v3/responsive-table-v3.css +0 -50
- package/public/block-responsive-table-v3/responsive-table-v3.js +0 -7
- package/public/block-scrolling-banner-v3/scrolling-banner-v3.css +0 -93
- package/public/block-scrolling-banner-v3/scrolling-banner-v3.js +0 -118
- package/public/block-section-separator-v3/section-separator-v3.css +0 -43
- package/public/block-section-separator-v3/section-separator-v3.js +0 -7
- package/public/block-single-column-container-v3/single-column-container-v3.css +0 -14
- package/public/block-single-column-container-v3/single-column-container-v3.js +0 -7
- package/public/block-single-responsive-image-v3/single-responsive-image-v3.css +0 -61
- package/public/block-single-responsive-image-v3/single-responsive-image-v3.js +0 -7
- package/public/block-site-copyright-notice-v3/site-copyright-notice-v3.css +0 -20
- package/public/block-site-copyright-notice-v3/site-copyright-notice-v3.js +0 -44
- package/public/block-site-logo-container-v3/site-logo-container-v3.css +0 -18
- package/public/block-site-logo-container-v3/site-logo-container-v3.js +0 -7
- package/public/block-site-title-and-tagline-v3/site-title-and-tagline-v3.css +0 -12
- package/public/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js +0 -7
- package/public/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.css +0 -25
- package/public/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +0 -8
- package/public/block-social-networks-v3/social-networks-v3.css +0 -74
- package/public/block-social-networks-v3/social-networks-v3.js +0 -7
- package/public/block-spacer-v3/spacer-v3.css +0 -16
- package/public/block-spacer-v3/spacer-v3.js +0 -2
- package/public/block-spotify-embed-v3/spotify-embed-v3.css +0 -7
- package/public/block-spotify-embed-v3/spotify-embed-v3.js +0 -7
- package/public/block-standard-content-v3/standard-content-v3.css +0 -423
- package/public/block-standard-content-v3/standard-content-v3.js +0 -7
- package/public/block-sticky-buy-cta-v3/sticky-buy-cta-v3.css +0 -0
- package/public/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +0 -7
- package/public/block-sub-group-container-v3/sub-group-container-v3.css +0 -288
- package/public/block-sub-group-container-v3/sub-group-container-v3.js +0 -2
- package/public/block-video-content-v3/video-content-v3.css +0 -102
- package/public/block-video-content-v3/video-content-v3.js +0 -11
- package/public/dynamicBlockScss-v3.css +0 -6392
- package/public/dynamicBlockScss-v3.scss +0 -37
- package/public/jsAssets.mjs +0 -4
- package/public/publicBundleBase.css +0 -4742
- package/public/publicBundleBase.scss +0 -11
- package/removeBlock.js +0 -124
- package/update-all-components.js +0 -135
- package/update-component.js +0 -537
- package/update-template.js +0 -537
package/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VideoController from './onion-videocontroller/onion-videocontroller.js';
|
|
2
|
+
import ModalController from './onion-modalcontroller/onion-modalcontroller.js';
|
|
3
|
+
export * from './onion-utils.mjs';
|
|
4
|
+
export * from './entry-animation-observer.js';
|
|
5
|
+
|
|
6
|
+
export default VideoController;
|
|
7
|
+
export { VideoController, ModalController };
|
|
8
|
+
export { default as modalController } from './onion-modalcontroller/onion-modalcontroller.js';
|
|
9
|
+
export { default as videoController } from './onion-videocontroller/onion-videocontroller.js';
|
|
10
|
+
export { default as onionLoader } from './onion-loader.js';
|
package/onion-loader.js
CHANGED
|
@@ -52,27 +52,35 @@ function lazyloaderInit() {
|
|
|
52
52
|
options.debugLogMessages && console.log('Lazy Loader initialized!');
|
|
53
53
|
options.lazyBlocksToSearchFor = [];
|
|
54
54
|
assetArray.forEach((asset) => {
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
) {
|
|
55
|
+
// if (
|
|
56
|
+
// asset.assetKey.includes('-v3') &&
|
|
57
|
+
// !asset.assetKey.includes('sub-block')
|
|
58
|
+
// ) {
|
|
59
|
+
// options.assetMap[asset.assetKey] = {
|
|
60
|
+
// js: () =>
|
|
61
|
+
// import(
|
|
62
|
+
// `Assets/blocks/${asset.assetKey}/${asset.assetKey}${options.fileSuffixJs}`
|
|
63
|
+
// ),
|
|
64
|
+
// // import(
|
|
65
|
+
// // `NodeModules/@total_onion/onion-library/components/block-${asset.assetKey}/${asset.assetKey}${options.fileSuffixJs}`
|
|
66
|
+
// // ),
|
|
67
|
+
// css: options.ignoreCss === true
|
|
68
|
+
// };
|
|
69
|
+
// }
|
|
70
|
+
if (asset.assetKey.includes('-v3')) {
|
|
59
71
|
options.assetMap[asset.assetKey] = {
|
|
60
72
|
js: () =>
|
|
61
73
|
import(
|
|
62
|
-
`
|
|
74
|
+
`Assets/sub-blocks/${asset.assetKey}/${asset.assetKey}${options.fileSuffixJs}`
|
|
63
75
|
),
|
|
64
|
-
css: options.ignoreCss ===
|
|
76
|
+
css: options.ignoreCss === false
|
|
65
77
|
};
|
|
66
|
-
} else {
|
|
67
78
|
}
|
|
68
|
-
if (
|
|
69
|
-
options.filePrefix === 'nodemodules' &&
|
|
70
|
-
!asset.assetKey.includes('-v3')
|
|
71
|
-
) {
|
|
79
|
+
if (!asset.assetKey.includes('-v3')) {
|
|
72
80
|
options.assetMap[asset.assetKey] = {
|
|
73
81
|
js: () =>
|
|
74
82
|
import(
|
|
75
|
-
`Assets/
|
|
83
|
+
`Assets/blocks/${asset.assetKey}/${asset.assetKey}${options.fileSuffixJs}`
|
|
76
84
|
),
|
|
77
85
|
css: options.ignoreCss === false
|
|
78
86
|
};
|
|
@@ -236,7 +244,7 @@ export function loadCss(assetKey) {
|
|
|
236
244
|
assetKey.includes('-v3')
|
|
237
245
|
) {
|
|
238
246
|
import(
|
|
239
|
-
/* webpackChunkName: "[request]" */ `
|
|
247
|
+
/* webpackChunkName: "[request]" */ `Assets/sub-blocks/${assetKey}/${assetKey}${options.fileSuffixCss}`
|
|
240
248
|
).then(() => resolve(true));
|
|
241
249
|
} else if (
|
|
242
250
|
options.css === true &&
|
|
@@ -244,7 +252,7 @@ export function loadCss(assetKey) {
|
|
|
244
252
|
!assetKey.includes('-v3')
|
|
245
253
|
) {
|
|
246
254
|
import(
|
|
247
|
-
/* webpackChunkName: "[request]" */ `Assets/
|
|
255
|
+
/* webpackChunkName: "[request]" */ `Assets/blocks/${assetKey}/${assetKey}${options.fileSuffixCss}`
|
|
248
256
|
).then(() => resolve(true));
|
|
249
257
|
} else {
|
|
250
258
|
return resolve(true);
|
package/onion-utils.mjs
CHANGED
|
@@ -88,24 +88,24 @@ export function inCriticalCssConfig(assetKey) {
|
|
|
88
88
|
return true;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export function loadCss(assetKey, options = { css: true }) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
91
|
+
// /**
|
|
92
|
+
// * Dynamically loads the css for the block if it has not already been included in critical css or the css property is set to false.
|
|
93
|
+
// * @param {string} assetKey The assetkey string of the block.
|
|
94
|
+
// * @param {object} options The options object which will at the very least contain the css property set to true.
|
|
95
|
+
// * @returns {promise}
|
|
96
|
+
// */
|
|
97
|
+
// export function loadCss(assetKey, options = { css: true }) {
|
|
98
|
+
// const promise = new Promise((resolve) => {
|
|
99
|
+
// if (options.css === true && !inCriticalCssConfig(assetKey)) {
|
|
100
|
+
// import(
|
|
101
|
+
// /* webpackChunkName: "[request]" */ `Assets/scss/blocks/${assetKey}.scss`
|
|
102
|
+
// ).then(() => resolve(true));
|
|
103
|
+
// } else {
|
|
104
|
+
// return resolve(true);
|
|
105
|
+
// }
|
|
106
|
+
// });
|
|
107
|
+
// return promise;
|
|
108
|
+
// }
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* Checks for browser, device and OS and then adds the relevant classes to the html tag.
|
|
@@ -680,7 +680,6 @@ const api = {
|
|
|
680
680
|
isEmailValid,
|
|
681
681
|
isInViewport,
|
|
682
682
|
isTablet,
|
|
683
|
-
loadCss,
|
|
684
683
|
mobileCheck,
|
|
685
684
|
resizeDebouncer,
|
|
686
685
|
supportsWebp,
|
package/package.json
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@total_onion/onion-library",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Component library",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"module": "./index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./index.js",
|
|
10
|
+
"./onion-utils": "./onion-utils.mjs",
|
|
11
|
+
"./onion-utils.mjs": "./onion-utils.mjs",
|
|
12
|
+
"./onion-loader": "./onion-loader.js",
|
|
13
|
+
"./onion-loader.js": "./onion-loader.js",
|
|
14
|
+
"./entry-animation-observer": "./entry-animation-observer.js",
|
|
15
|
+
"./entry-animation-observer.js": "./entry-animation-observer.js",
|
|
16
|
+
"./onion-videocontroller": "./onion-videocontroller/onion-videocontroller.js",
|
|
17
|
+
"./onion-videocontroller.js": "./onion-videocontroller/onion-videocontroller.js",
|
|
18
|
+
"./onion-modalcontroller": "./onion-modalcontroller/onion-modalcontroller.js",
|
|
19
|
+
"./onion-modalcontroller.js": "./onion-modalcontroller/onion-modalcontroller.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.js",
|
|
23
|
+
"onion-utils.mjs",
|
|
24
|
+
"onion-loader.js",
|
|
25
|
+
"entry-animation-observer.js",
|
|
26
|
+
"onion-videocontroller",
|
|
27
|
+
"onion-modalcontroller"
|
|
28
|
+
],
|
|
6
29
|
"scripts": {
|
|
7
30
|
"build": "node build-library.js",
|
|
8
31
|
"test": ""
|
|
@@ -18,8 +41,7 @@
|
|
|
18
41
|
},
|
|
19
42
|
"homepage": "https://github.com/TotalOnion/onion-library#readme",
|
|
20
43
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
-
"swiper": "^14.1.0"
|
|
44
|
+
"@vimeo/player": "^2.26.0"
|
|
23
45
|
},
|
|
24
46
|
"devDependencies": {
|
|
25
47
|
"autoprefixer": "^10.4.27",
|
|
@@ -36,6 +58,8 @@
|
|
|
36
58
|
"postcss-preset-env": "^11.2.0",
|
|
37
59
|
"prettier": "^2.6.2",
|
|
38
60
|
"url-loader": "^4.1.1",
|
|
39
|
-
"yargs": "^17.4.1"
|
|
61
|
+
"yargs": "^17.4.1",
|
|
62
|
+
"lottie-web": "^5.13.0",
|
|
63
|
+
"swiper": "^14.1.0"
|
|
40
64
|
}
|
|
41
65
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to NPM when a release is created
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [published]
|
|
9
|
-
branches:
|
|
10
|
-
- master
|
|
11
|
-
permissions:
|
|
12
|
-
id-token: write # Required for OIDC
|
|
13
|
-
contents: read
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: 24
|
|
23
|
-
# Ensure npm 11.5.1 or later is installed
|
|
24
|
-
- name: Update npm
|
|
25
|
-
run: npm install -g npm@latest
|
|
26
|
-
- run: npm ci
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
publish:
|
|
30
|
-
needs: build
|
|
31
|
-
runs-on: ubuntu-latest
|
|
32
|
-
steps:
|
|
33
|
-
- uses: actions/checkout@v4
|
|
34
|
-
- uses: actions/setup-node@v4
|
|
35
|
-
with:
|
|
36
|
-
node-version: 24
|
|
37
|
-
registry-url: https://registry.npmjs.org/
|
|
38
|
-
- run: npm publish
|
package/.prettierrc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"useTabs": true,
|
|
3
|
-
"overrides": [
|
|
4
|
-
{
|
|
5
|
-
"files": "*.test.js",
|
|
6
|
-
"options": {
|
|
7
|
-
"semi": true
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"files": ["*.js", "*.css", "*.scss"],
|
|
12
|
-
"options": {
|
|
13
|
-
"useTabs": true,
|
|
14
|
-
"semi": true,
|
|
15
|
-
"singleQuote": true,
|
|
16
|
-
"trailingComma": "none",
|
|
17
|
-
"tabWidth": 4,
|
|
18
|
-
"bracketSpacing": false
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { promisify } = require('util');
|
|
4
|
-
|
|
5
|
-
// Import the function to be tested
|
|
6
|
-
const updateComponent = require('../update-component');
|
|
7
|
-
|
|
8
|
-
// Promisify the fs functions used in the copyBlockComponent function
|
|
9
|
-
const readdirPromisified = promisify(fs.readdir);
|
|
10
|
-
const accessPromisified = promisify(fs.access);
|
|
11
|
-
|
|
12
|
-
// Create a utility function to remove the file (used after each test)
|
|
13
|
-
const removeFile = async (filePath) => {
|
|
14
|
-
try {
|
|
15
|
-
await fs.promises.unlink(filePath);
|
|
16
|
-
} catch (err) {
|
|
17
|
-
// If the file doesn't exist, ignore the error
|
|
18
|
-
if (err.code !== 'ENOENT') {
|
|
19
|
-
console.error('Error removing the file:', err);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
xdescribe('copyBlockComponent function', () => {
|
|
25
|
-
const libraryPath = 'testFiles/library'; // Assuming the libraryPath is defined for the tests
|
|
26
|
-
const componentName = 'TestComponent';
|
|
27
|
-
|
|
28
|
-
// Before each test, create the source directory with some test files
|
|
29
|
-
beforeEach(async () => {
|
|
30
|
-
try {
|
|
31
|
-
const sourceDir = path.join(libraryPath, 'components', componentName);
|
|
32
|
-
await fs.promises.mkdir(sourceDir, { recursive: true });
|
|
33
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.php'), 'Test PHP content');
|
|
34
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.js'), 'Test JS content');
|
|
35
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.scss'), 'Test SCSS content');
|
|
36
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.json'), 'Test JSON content');
|
|
37
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.twig'), 'Test Twig content');
|
|
38
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.vue'), 'Test Vue content');
|
|
39
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.extra'), 'Test Extra content');
|
|
40
|
-
await fs.promises.writeFile(path.join(sourceDir, 'TestComponent.spec'), 'Test Spec content');
|
|
41
|
-
} catch (err) {
|
|
42
|
-
console.error('Error creating the source directory:', err);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// After each test, remove the source and destination files
|
|
47
|
-
afterEach(async () => {
|
|
48
|
-
try {
|
|
49
|
-
const sourceDir = path.join(libraryPath, 'components', componentName);
|
|
50
|
-
await fs.promises.rmdir(sourceDir, { recursive: true });
|
|
51
|
-
await removeFile('./inc/acf-blocks/TestComponent.php');
|
|
52
|
-
await removeFile('./assets/js/blocks/TestComponent.js');
|
|
53
|
-
await removeFile('./assets/scss/blocks/TestComponent.scss');
|
|
54
|
-
await removeFile('./acf-json/TestComponent.json');
|
|
55
|
-
await removeFile('./views/blocks/TestComponent.twig');
|
|
56
|
-
await removeFile('./assets/vue/blocks/TestComponent.vue');
|
|
57
|
-
await removeFile('./assets/scss/blocks/TestComponent/TestComponent.extra');
|
|
58
|
-
} catch (err) {
|
|
59
|
-
console.error('Error cleaning up the test files:', err);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it('should copy files from source to destination based on the file types', async () => {
|
|
64
|
-
// Call the function to be tested
|
|
65
|
-
await updateComponent.copyBlockComponent(componentName);
|
|
66
|
-
|
|
67
|
-
// Assert that the destination files exist for each file type
|
|
68
|
-
const destinationFiles = [
|
|
69
|
-
'./inc/acf-blocks/TestComponent.php',
|
|
70
|
-
'./assets/js/blocks/TestComponent.js',
|
|
71
|
-
'./assets/scss/blocks/TestComponent.scss',
|
|
72
|
-
'./acf-json/TestComponent.json',
|
|
73
|
-
'./views/blocks/TestComponent.twig',
|
|
74
|
-
'./assets/vue/blocks/TestComponent.vue',
|
|
75
|
-
'./assets/scss/blocks/TestComponent/TestComponent.extra',
|
|
76
|
-
];
|
|
77
|
-
|
|
78
|
-
for (const filePath of destinationFiles) {
|
|
79
|
-
const fileExists = await accessPromisified(filePath)
|
|
80
|
-
.then(() => true)
|
|
81
|
-
.catch(() => false);
|
|
82
|
-
expect(fileExists).toBe(true);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Assert that the destination files contain the same content as the source files
|
|
86
|
-
const sourceDir = path.join(libraryPath, 'components', componentName);
|
|
87
|
-
const fileTypes = ['php', 'js', 'scss', 'json', 'twig', 'vue', 'extra'];
|
|
88
|
-
for (const fileType of fileTypes) {
|
|
89
|
-
const sourceContent = await fs.promises.readFile(path.join(sourceDir, `TestComponent.${fileType}`), 'utf-8');
|
|
90
|
-
const destinationContent = await fs.promises.readFile(path.join(`./${fileType === 'extra' ? 'assets/scss/blocks/TestComponent' : fileType}s/TestComponent.${fileType}`), 'utf-8');
|
|
91
|
-
expect(destinationContent).toBe(sourceContent);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const updateComponent = require('../update-component');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
describe('copyFile function', () => {
|
|
9
|
-
const sourceFilePath = './__spec__/files/source.txt';
|
|
10
|
-
const destinationFilePath = './__spec__/files/destination.txt';
|
|
11
|
-
|
|
12
|
-
// Helper function to delete a file if it exists
|
|
13
|
-
const deleteFileIfExists = (filePath) => {
|
|
14
|
-
if (fs.existsSync(filePath)) {
|
|
15
|
-
fs.unlinkSync(destinationFilePath);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
deleteFileIfExists(destinationFilePath);
|
|
21
|
-
jest.resetModules();
|
|
22
|
-
jest.clearAllMocks();
|
|
23
|
-
});
|
|
24
|
-
afterEach(() => {
|
|
25
|
-
deleteFileIfExists(destinationFilePath);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// Test case 1: Ensure the file is copied when destination does not exists
|
|
30
|
-
test('copies file if it does not exist', async () => {
|
|
31
|
-
await updateComponent.copyFile(sourceFilePath, destinationFilePath);
|
|
32
|
-
|
|
33
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
34
|
-
await new Promise((resolve) => setTimeout(resolve, 150)); // Adjust the delay time as needed
|
|
35
|
-
|
|
36
|
-
expect(fs.existsSync(destinationFilePath)).toBe(true);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// Test case 2: Ensure the file is copied even if the destination exists
|
|
40
|
-
test('overwrite file when destination file already exists', async () => {
|
|
41
|
-
// Create a dummy destination file to simulate an existing file
|
|
42
|
-
fs.writeFileSync(destinationFilePath, 'Dummy content Newer');
|
|
43
|
-
|
|
44
|
-
await updateComponent.copyFile(sourceFilePath, destinationFilePath);
|
|
45
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
46
|
-
await new Promise((resolve) => setTimeout(resolve, 50)); // Adjust the delay time as needed
|
|
47
|
-
|
|
48
|
-
// Assert that the destination file still exists after the function call
|
|
49
|
-
expect(fs.existsSync(destinationFilePath)).toBe(true);
|
|
50
|
-
|
|
51
|
-
// get file content
|
|
52
|
-
const destinationContent = fs.readFileSync(destinationFilePath, 'utf8');
|
|
53
|
-
|
|
54
|
-
// content should be
|
|
55
|
-
expect(destinationContent).toBe('Dummy content');
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// Test case 3: Ensure the function handles errors properly
|
|
59
|
-
test('handles errors when copying the file', async () => {
|
|
60
|
-
// Create a dummy destination file to simulate an existing file
|
|
61
|
-
// fs.writeFileSync(destinationFilePath, 'Dummy content');
|
|
62
|
-
const sourceFilePath = './__spec__/nonexistent_source.txt';
|
|
63
|
-
|
|
64
|
-
// Ensure that console.error is called with the error message
|
|
65
|
-
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
66
|
-
|
|
67
|
-
await updateComponent.copyFileKeeping(sourceFilePath, destinationFilePath);
|
|
68
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
69
|
-
await new Promise((resolve) => setTimeout(resolve, 50)); // Adjust the delay time as needed
|
|
70
|
-
|
|
71
|
-
// Assert that console.error was called with the expected error message
|
|
72
|
-
expect(consoleErrorSpy).toHaveBeenCalled();
|
|
73
|
-
|
|
74
|
-
// Restore the original console.error function
|
|
75
|
-
consoleErrorSpy.mockRestore();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
// const path = require('path');
|
|
5
|
-
const updateComponent = require('../update-component');
|
|
6
|
-
|
|
7
|
-
describe('copyFileKeeping', () => {
|
|
8
|
-
const sourceFilePath = './__spec__/files/source.txt';
|
|
9
|
-
const destinationFilePath = './__spec__/files/destination.txt';
|
|
10
|
-
|
|
11
|
-
// Helper function to delete a file if it exists
|
|
12
|
-
const deleteFileIfExists = (filePath) => {
|
|
13
|
-
if (fs.existsSync(filePath)) {
|
|
14
|
-
fs.unlinkSync(destinationFilePath);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
beforeEach(() => {
|
|
19
|
-
deleteFileIfExists(destinationFilePath);
|
|
20
|
-
jest.resetModules();
|
|
21
|
-
jest.clearAllMocks();
|
|
22
|
-
});
|
|
23
|
-
afterEach(() => {
|
|
24
|
-
deleteFileIfExists(destinationFilePath);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// Test case 1: Ensure the file is copied when destination does not exists
|
|
28
|
-
test('copies file if it does not exist', async () => {
|
|
29
|
-
await updateComponent.copyFileKeeping(sourceFilePath, destinationFilePath);
|
|
30
|
-
|
|
31
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
32
|
-
await new Promise((resolve) => setTimeout(resolve, 50)); // Adjust the delay time as needed
|
|
33
|
-
|
|
34
|
-
expect(fs.existsSync(destinationFilePath)).toBe(true);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Test case 2: Ensure the file is NOT copied when destination exists
|
|
38
|
-
test('copies file when destination file already exists', async () => {
|
|
39
|
-
// Create a dummy destination file to simulate an existing file
|
|
40
|
-
fs.writeFileSync(destinationFilePath, 'Dummy content Newer');
|
|
41
|
-
|
|
42
|
-
await updateComponent.copyFileKeeping(sourceFilePath, destinationFilePath);
|
|
43
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
44
|
-
await new Promise((resolve) => setTimeout(resolve, 50)); // Adjust the delay time as needed
|
|
45
|
-
|
|
46
|
-
// Assert that the destination file still exists after the function call
|
|
47
|
-
expect(fs.existsSync(destinationFilePath)).toBe(true);
|
|
48
|
-
|
|
49
|
-
// get file content
|
|
50
|
-
const destinationContent = fs.readFileSync(destinationFilePath, 'utf8');
|
|
51
|
-
|
|
52
|
-
expect(destinationContent).toBe('Dummy content Newer');
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// Test case 3: Ensure the function handles errors properly
|
|
56
|
-
test('handles errors when copying the file', async () => {
|
|
57
|
-
// Create a dummy destination file to simulate an existing file
|
|
58
|
-
// fs.writeFileSync(destinationFilePath, 'Dummy content');
|
|
59
|
-
const sourceFilePath = './__spec__/nonexistent_source.txt';
|
|
60
|
-
|
|
61
|
-
// Ensure that console.error is called with the error message
|
|
62
|
-
const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
63
|
-
|
|
64
|
-
await updateComponent.copyFileKeeping(sourceFilePath, destinationFilePath);
|
|
65
|
-
// Wait for a short delay to allow the asynchronous operation to complete
|
|
66
|
-
await new Promise((resolve) => setTimeout(resolve, 50)); // Adjust the delay time as needed
|
|
67
|
-
|
|
68
|
-
// Assert that console.error was called with the expected error message
|
|
69
|
-
expect(consoleErrorSpy).toHaveBeenCalled();
|
|
70
|
-
|
|
71
|
-
// Restore the original console.error function
|
|
72
|
-
consoleErrorSpy.mockRestore();
|
|
73
|
-
});
|
|
74
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Dummy content
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const glob = require('glob');
|
|
4
|
-
const fs = jest.mock('fs');
|
|
5
|
-
const updateAllComponents = require('../update-all-components');
|
|
6
|
-
|
|
7
|
-
describe('getComponentsList', () => {
|
|
8
|
-
afterEach(() => {
|
|
9
|
-
jest.resetModules(); // Reset all mocked modules after each test
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('returns the correct components list when project-components-list.json is found', () => {
|
|
13
|
-
const projectComponentsList = {
|
|
14
|
-
"block": [
|
|
15
|
-
"accordion",
|
|
16
|
-
"standard-content-v2"
|
|
17
|
-
],
|
|
18
|
-
"fields": [
|
|
19
|
-
"video-standard",
|
|
20
|
-
"responsive-show-hide"
|
|
21
|
-
],
|
|
22
|
-
"admin": [
|
|
23
|
-
"filter-pages-by-block",
|
|
24
|
-
"resizable-editor-sidebar"
|
|
25
|
-
]
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
jest.mock('fs', () => ({
|
|
29
|
-
existsSync: jest.fn().mockReturnValue(true),
|
|
30
|
-
readFileSync: jest
|
|
31
|
-
.fn()
|
|
32
|
-
.mockReturnValue(JSON.stringify(projectComponentsList)),
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
const result = updateAllComponents.getComponentsList();
|
|
36
|
-
|
|
37
|
-
// random order
|
|
38
|
-
result.map(m => expect([
|
|
39
|
-
"block-accordion",
|
|
40
|
-
"block-standard-content-v2",
|
|
41
|
-
|
|
42
|
-
"admin-core-mixins",
|
|
43
|
-
"admin-core-design-system",
|
|
44
|
-
"admin-core-generic",
|
|
45
|
-
"admin-core-critical",
|
|
46
|
-
"admin-core-functions",
|
|
47
|
-
|
|
48
|
-
"admin-filter-pages-by-block",
|
|
49
|
-
"admin-resizable-editor-sidebar",
|
|
50
|
-
"fields-video-standard",
|
|
51
|
-
"fields-responsive-show-hide",
|
|
52
|
-
|
|
53
|
-
"admin-core-cta",
|
|
54
|
-
"admin-core-root-variables",
|
|
55
|
-
"admin-core-css-sizing-vars",
|
|
56
|
-
"admin-core-colour-data-config",
|
|
57
|
-
"admin-core-wordpress-block-editor-preview",
|
|
58
|
-
"admin-core-editor-cta-style-select",
|
|
59
|
-
"admin-core-gradient-designer",
|
|
60
|
-
"admin-core-typography",
|
|
61
|
-
]).toContain(m));
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('returns the correct components list when project-components-list.json is not found', () => {
|
|
65
|
-
jest.mock('fs', () => ({
|
|
66
|
-
existsSync: jest.fn().mockReturnValue(false), // Simulate 'project-components-list.json' not existing
|
|
67
|
-
}));
|
|
68
|
-
|
|
69
|
-
jest.mock('glob', () => ({
|
|
70
|
-
// mock components in the filesystem
|
|
71
|
-
sync: jest.fn().mockReturnValue([
|
|
72
|
-
`./node_modules/@pernod-ricard-global-cms/cbl-component-library/components/component1`,
|
|
73
|
-
`./node_modules/@pernod-ricard-global-cms/cbl-component-library/components/component2`,
|
|
74
|
-
]),
|
|
75
|
-
}));
|
|
76
|
-
const result = updateAllComponents.getComponentsList();
|
|
77
|
-
|
|
78
|
-
// random order
|
|
79
|
-
result.map(m => expect([
|
|
80
|
-
"admin-core-mixins",
|
|
81
|
-
"admin-core-design-system",
|
|
82
|
-
"admin-core-generic",
|
|
83
|
-
"admin-core-critical",
|
|
84
|
-
"admin-core-functions",
|
|
85
|
-
|
|
86
|
-
"component1",
|
|
87
|
-
"component2",
|
|
88
|
-
|
|
89
|
-
"admin-core-cta",
|
|
90
|
-
"admin-core-root-variables",
|
|
91
|
-
"admin-core-css-sizing-vars",
|
|
92
|
-
"admin-core-colour-data-config",
|
|
93
|
-
"admin-core-wordpress-block-editor-preview",
|
|
94
|
-
"admin-core-editor-cta-style-select",
|
|
95
|
-
"admin-core-gradient-designer",
|
|
96
|
-
"admin-core-typography",
|
|
97
|
-
]).toContain(m));
|
|
98
|
-
});
|
|
99
|
-
});
|