@covet-pics/covet-pics-widget 0.111.0 → 0.111.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/covet-pics-direct-buy_6.cjs.entry.js +26 -10
- package/dist/cjs/covet-pics-gallery-grid_3.cjs.entry.js +52 -22
- package/dist/cjs/covet-pics-gallery-header_3.cjs.entry.js +28 -13
- package/dist/cjs/covet-pics-gallery-item-caption.cjs.entry.js +2 -2
- package/dist/cjs/covet-pics-highlighted-hotspots_2.cjs.entry.js +63 -22
- package/dist/cjs/covet-pics-star-rating.cjs.entry.js +1 -1
- package/dist/cjs/covet-pics-widget.cjs.entry.js +45 -30
- package/dist/cjs/covet-pics-widget.cjs.js +2 -2
- package/dist/cjs/{index-d4e21dc3.js → index-7e3816c8.js} +0 -18
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sort-ecd4fc1f.js +33 -0
- package/dist/cjs/storeUtils-b074bb51.js +633 -0
- package/dist/cjs/{utils-70e645ee.js → utils-85481438.js} +4 -2
- package/dist/collection/components/covet-pics-gallery-grid/covet-pics-gallery-grid.js +40 -11
- package/dist/collection/components/covet-pics-gallery-header/covet-pics-gallery-header.js +43 -11
- package/dist/collection/components/covet-pics-gallery-item-detail/covet-pics-gallery-item-detail.js +25 -2
- package/dist/collection/components/covet-pics-gallery-slider/covet-pics-gallery-slider.js +36 -7
- package/dist/collection/components/covet-pics-highlighted/covet-pics-highlighted-hotspots.js +60 -1
- package/dist/collection/components/covet-pics-highlighted/covet-pics-highlighted-page.js +79 -19
- package/dist/collection/components/covet-pics-highlighted/covet-pics-highlighted.js +41 -7
- package/dist/collection/components/covet-pics-popup/covet-pics-popup.js +32 -6
- package/dist/collection/components/covet-pics-upload/covet-pics-upload.js +34 -3
- package/dist/collection/components/covet-pics-widget/covet-pics-widget.js +46 -18
- package/dist/collection/services/gallery-loader-service.js +0 -12
- package/dist/collection/store/analytics.js +19 -0
- package/dist/collection/store/configureStore.js +10 -0
- package/dist/collection/store/preview.js +50 -0
- package/dist/collection/store/reducer.js +20 -0
- package/dist/collection/store/sizes.js +32 -0
- package/dist/collection/store/sort.js +28 -0
- package/dist/collection/store/storeUtils.js +38 -0
- package/dist/collection/store/url.js +34 -0
- package/dist/collection/store/widgetId.js +43 -0
- package/dist/collection/utils/utils.js +4 -2
- package/dist/covet-pics-widget/covet-pics-widget.esm.js +1 -1
- package/dist/covet-pics-widget/covet-pics-widget.js +1 -1
- package/dist/covet-pics-widget/p-1789fe72.system.js +4 -0
- package/dist/covet-pics-widget/p-2a14cf01.system.entry.js +4 -0
- package/dist/covet-pics-widget/p-417eb012.js +5 -0
- package/dist/covet-pics-widget/{p-270a008c.system.entry.js → p-439ac2d3.system.entry.js} +1 -1
- package/dist/covet-pics-widget/{p-89b48157.system.entry.js → p-46c108ba.system.entry.js} +1 -1
- package/dist/covet-pics-widget/{p-4d031e88.entry.js → p-48b8f234.entry.js} +1 -1
- package/dist/covet-pics-widget/p-4a6436fb.js +4 -0
- package/dist/covet-pics-widget/p-599549f0.entry.js +40 -0
- package/dist/covet-pics-widget/p-62b29b82.system.js +4 -0
- package/dist/covet-pics-widget/p-658e52dc.js +4 -0
- package/dist/covet-pics-widget/p-8681e25e.js +4 -0
- package/dist/covet-pics-widget/p-8a80f29d.entry.js +4 -0
- package/dist/covet-pics-widget/p-8e80114c.system.entry.js +4 -0
- package/dist/covet-pics-widget/{p-ed304a06.system.entry.js → p-c2db630b.system.entry.js} +4 -4
- package/dist/covet-pics-widget/{p-5f21a587.entry.js → p-c369b18f.entry.js} +1 -1
- package/dist/covet-pics-widget/p-c8a2075e.system.js +4 -0
- package/dist/covet-pics-widget/p-cab44811.entry.js +4 -0
- package/dist/covet-pics-widget/p-dde9e776.entry.js +24 -0
- package/dist/covet-pics-widget/p-df9096ee.entry.js +4 -0
- package/dist/covet-pics-widget/p-e10f9033.system.entry.js +4 -0
- package/dist/covet-pics-widget/p-f6cd34bc.system.js +4 -0
- package/dist/covet-pics-widget/p-f997e681.system.entry.js +40 -0
- package/dist/covet-pics-widget/p-fff02de2.system.js +5 -0
- package/dist/esm/covet-pics-direct-buy_6.entry.js +26 -10
- package/dist/esm/covet-pics-gallery-grid_3.entry.js +52 -22
- package/dist/esm/covet-pics-gallery-header_3.entry.js +28 -13
- package/dist/esm/covet-pics-gallery-item-caption.entry.js +2 -2
- package/dist/esm/covet-pics-highlighted-hotspots_2.entry.js +63 -22
- package/dist/esm/covet-pics-star-rating.entry.js +1 -1
- package/dist/esm/covet-pics-widget.entry.js +45 -30
- package/dist/esm/covet-pics-widget.js +2 -2
- package/dist/esm/{index-2e4b1834.js → index-4605ce75.js} +1 -17
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sort-bd1ac802.js +30 -0
- package/dist/esm/storeUtils-70d6c31c.js +619 -0
- package/dist/esm/{utils-f99d19f7.js → utils-12d4efc2.js} +4 -2
- package/dist/esm-es5/covet-pics-direct-buy_6.entry.js +4 -4
- package/dist/esm-es5/covet-pics-gallery-grid_3.entry.js +2 -2
- package/dist/esm-es5/covet-pics-gallery-header_3.entry.js +1 -1
- package/dist/esm-es5/covet-pics-gallery-item-caption.entry.js +1 -1
- package/dist/esm-es5/covet-pics-highlighted-hotspots_2.entry.js +1 -1
- package/dist/esm-es5/covet-pics-star-rating.entry.js +1 -1
- package/dist/esm-es5/covet-pics-widget.entry.js +2 -2
- package/dist/esm-es5/covet-pics-widget.js +1 -1
- package/dist/esm-es5/index-4605ce75.js +5 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/sort-bd1ac802.js +4 -0
- package/dist/esm-es5/storeUtils-70d6c31c.js +4 -0
- package/dist/esm-es5/utils-12d4efc2.js +4 -0
- package/dist/types/components/covet-pics-gallery-grid/covet-pics-gallery-grid.d.ts +9 -1
- package/dist/types/components/covet-pics-gallery-header/covet-pics-gallery-header.d.ts +9 -0
- package/dist/types/components/covet-pics-gallery-item-detail/covet-pics-gallery-item-detail.d.ts +6 -0
- package/dist/types/components/covet-pics-gallery-slider/covet-pics-gallery-slider.d.ts +8 -0
- package/dist/types/components/covet-pics-highlighted/covet-pics-highlighted-hotspots.d.ts +11 -0
- package/dist/types/components/covet-pics-highlighted/covet-pics-highlighted-page.d.ts +27 -15
- package/dist/types/components/covet-pics-highlighted/covet-pics-highlighted.d.ts +10 -0
- package/dist/types/components/covet-pics-popup/covet-pics-popup.d.ts +6 -0
- package/dist/types/components/covet-pics-upload/covet-pics-upload.d.ts +9 -0
- package/dist/types/components/covet-pics-widget/covet-pics-widget.d.ts +4 -1
- package/dist/types/components.d.ts +89 -0
- package/dist/types/services/gallery-loader-service.d.ts +0 -2
- package/dist/types/store/analytics.d.ts +11 -0
- package/dist/types/store/configureStore.d.ts +2 -0
- package/dist/types/store/preview.d.ts +47 -0
- package/dist/types/store/reducer.d.ts +49 -0
- package/dist/types/store/sizes.d.ts +30 -0
- package/dist/types/store/sort.d.ts +29 -0
- package/dist/types/store/storeUtils.d.ts +7 -0
- package/dist/types/store/url.d.ts +23 -0
- package/dist/types/store/widgetId.d.ts +43 -0
- package/dist/types/utils/utils.d.ts +5 -2
- package/package.json +2 -2
- package/dist/cjs/store-90bc6cce.js +0 -211
- package/dist/collection/store/store.js +0 -23
- package/dist/covet-pics-widget/p-0303a6fb.entry.js +0 -4
- package/dist/covet-pics-widget/p-0ddcc374.entry.js +0 -4
- package/dist/covet-pics-widget/p-1f5f1c88.system.entry.js +0 -4
- package/dist/covet-pics-widget/p-35423147.system.js +0 -4
- package/dist/covet-pics-widget/p-36946294.system.js +0 -4
- package/dist/covet-pics-widget/p-55d3f33f.js +0 -5
- package/dist/covet-pics-widget/p-62511a7e.js +0 -4
- package/dist/covet-pics-widget/p-632fea2a.system.entry.js +0 -40
- package/dist/covet-pics-widget/p-641eae1e.system.js +0 -5
- package/dist/covet-pics-widget/p-79b6a825.js +0 -4
- package/dist/covet-pics-widget/p-8315d786.system.entry.js +0 -4
- package/dist/covet-pics-widget/p-8a89f8a7.entry.js +0 -4
- package/dist/covet-pics-widget/p-dace7a64.system.entry.js +0 -4
- package/dist/covet-pics-widget/p-dbb115ef.system.js +0 -4
- package/dist/covet-pics-widget/p-ed4ad4c9.entry.js +0 -24
- package/dist/covet-pics-widget/p-ff15f05a.entry.js +0 -40
- package/dist/esm/store-f4433f52.js +0 -209
- package/dist/esm-es5/index-2e4b1834.js +0 -5
- package/dist/esm-es5/store-f4433f52.js +0 -4
- package/dist/esm-es5/utils-f99d19f7.js +0 -4
- package/dist/types/store/store.d.ts +0 -13
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const utils = require('./utils-
|
|
8
|
+
const index = require('./index-7e3816c8.js');
|
|
9
|
+
const utils = require('./utils-85481438.js');
|
|
10
10
|
const lazy = require('./lazy-68db6903.js');
|
|
11
11
|
const fragment = require('./fragment-29c21ac8.js');
|
|
12
|
+
const storeUtils = require('./storeUtils-b074bb51.js');
|
|
12
13
|
const _commonjsHelpers = require('./_commonjsHelpers-b66a770d.js');
|
|
13
|
-
|
|
14
|
+
require('./sort-ecd4fc1f.js');
|
|
14
15
|
|
|
15
16
|
const covetPicsDirectBuyCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA\") format(\"woff\");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-pointer-events{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-pointer-events.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-ms-scroll-snap-type:x mandatory;-webkit-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-ms-scroll-snap-type:y mandatory;-webkit-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:\"\";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}:host{z-index:1;background-color:#ffffff;--covet-pics-button-size:40px;--covet-pics-padding-size:40px;--covet-pics-font-color:#101010;--covet-pics-background-color:#fcfbfc}:host{position:fixed;bottom:0;overflow:scroll;width:100%;max-height:0;-webkit-box-shadow:0 -8px 16px 0 rgba(0, 0, 0, 0.05);box-shadow:0 -8px 16px 0 rgba(0, 0, 0, 0.05);-webkit-transition:max-height 0.35s ease-in-out;transition:max-height 0.35s ease-in-out;min-width:auto}:host(.open){max-height:100%}.main{margin:0 var(--covet-pics-padding-size);padding-bottom:150px;position:relative}.close{background:none;border:none;position:absolute;top:0;right:0;padding:0;margin:0;cursor:pointer;-webkit-transform:rotate(270deg);transform:rotate(270deg);outline:none !important}.close:hover svg .icon-arrow-path,.close:active svg .icon-arrow-path,.close:focus svg .icon-arrow-path{stroke:#000000}.close svg{width:var(--covet-pics-button-size);height:var(--covet-pics-button-size)}.close svg .icon-arrow-path{-webkit-transition:all 0.25s ease;transition:all 0.25s ease}.title{font-size:14px;font-weight:400;line-height:var(--covet-pics-button-size);width:calc(100% - var(--covet-pics-button-size));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin:10px 0 0 0}.title a{text-decoration:none;color:var(--covet-pics-font-color)}.price-wrap{display:-ms-flexbox;display:flex;height:32px;background:var(--covet-pics-background-color);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;text-transform:uppercase}.price-wrap label{color:var(--covet-pics-font-color);font-weight:300;max-width:80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.price-wrap .price{font-weight:600}.btn-buy{border:none;background-color:var(--covet-pics-button-color);color:var(--covet-pics-button-text-color);font-family:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;text-transform:uppercase;text-align:center;cursor:pointer;font-size:14px;line-height:1;padding:17px 17px max(17px, env(safe-area-inset-bottom, 25px)) 17px;margin-bottom:0}.btn-buy:hover,.btn-buy:active,.btn-buy:focus{background-color:var(--covet-pics-button-hover-color)}.btn-buy.style-1:hover,.btn-buy.style-1:active,.btn-buy.style-1:focus{background-color:var(--covet-pics-button-text-hover-color)}.btn-buy.style-2:hover,.btn-buy.style-2:active,.btn-buy.style-2:focus{background-color:var(--covet-pics-button-color);color:var(--covet-pics-button-text-hover-color)}.btn-buy:disabled{background:#EEEEEE;color:#808080;pointer-events:none}.options{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-bottom-color:#EEE;height:48px;padding:0 8px 0 12px;-moz-text-align-last:right;text-align-last:right;font-weight:300;color:var(--covet-pics-font-color);position:relative;cursor:pointer;outline:none !important;-webkit-transition:border 0.25s ease;transition:border 0.25s ease}.options.opened{border-left:1px solid #EEE;border-right:1px solid #EEE}.options.opened .options-container{display:block}.options:hover,.options:active,.options:focus,.options:focus-within{border-bottom-color:#000000}.options label{width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;outline:none !important}.options label .option-name{margin:auto 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.options label .selected-option{margin:auto 0;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M0 0h24v24H0z'%3E%3C/path%3E%3Cpath stroke='%23A0A0A0' d='M16.95 10.25L12 15.2l-4.95-4.95'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 50%;background-size:24px;padding-right:26px;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50%;font-family:inherit;cursor:pointer;font-weight:bold}.options label .selected-option.empty{height:16px;line-height:1rem;width:20%}.options .options-container{display:none;position:absolute;top:48px;left:-1px;background:#FFF;z-index:2;width:100%;border:1px solid #eee;border-top:0;max-height:114px;overflow:auto;cursor:pointer}.options .options-container .option-value{min-height:32px;font-size:12px;color:#101010;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:none !important}.options .options-container .option-value.selected .selected-indic{height:24px;border-left:2px solid #101010}.options .options-container .option-value .value-text{margin-left:4px;margin-right:4px;padding:0 10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%;font-size:12px;min-height:32px}.options .options-container .option-value:hover .value-text,.options .options-container .option-value:active .value-text,.options .options-container .option-value:focus .value-text{background:#F7F7F7}.main-gallery{overflow:hidden;width:100%}.main-gallery .swiper-slide{width:200px;height:200px;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.main-gallery .swiper-slide img{max-width:100%;max-height:100%}.main-gallery .swiper-wrapper{max-height:200px}.footer{background-color:var(--covet-pics-background-color);position:absolute;width:100%;bottom:0;z-index:1}.footer .price-wrap{padding:0 var(--covet-pics-padding-size);width:calc(100% - var(--covet-pics-padding-size) * 2)}.swiper-pagination-bullets{padding:10px 0;border-bottom:1px solid var(--covet-pics-font-color);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;-ms-flex:none;flex:none;border-radius:100%;background:var(--covet-pics-font-color);opacity:0.2;margin:0 4px}.swiper-pagination-bullet.swiper-pagination-bullet-active{opacity:1;background:var(--covet-pics-font-color)}@media only screen and (min-width: 800px){:host{display:none;height:100%;z-index:1;position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden}:host(.open){display:block}.title{width:100%;padding-left:10px}.close{left:calc(var(--covet-pics-button-size) / -2);right:unset;-webkit-transform:unset;transform:unset}.wrap{height:100%;overflow:auto}.footer{position:absolute}}";
|
|
16
17
|
|
|
@@ -3982,7 +3983,7 @@ const CovetPicsPopup = class {
|
|
|
3982
3983
|
// prevent body to scroll setting overflow: hidden
|
|
3983
3984
|
document.body.classList.add("covet-pics-popup-scroll-lock");
|
|
3984
3985
|
this.modalOpen.emit();
|
|
3985
|
-
if (this.
|
|
3986
|
+
if (storeUtils.getUseAnalytics(this.appState)) {
|
|
3986
3987
|
const category = "Covet.pics Popup";
|
|
3987
3988
|
const action = "Covet.pics Popup Open";
|
|
3988
3989
|
const label = "Covet.pics Popup Open - " + this.itemId;
|
|
@@ -4033,7 +4034,7 @@ const CovetPicsPopup = class {
|
|
|
4033
4034
|
return false;
|
|
4034
4035
|
}
|
|
4035
4036
|
this.renderDirectBuyCart();
|
|
4036
|
-
if (this.
|
|
4037
|
+
if (storeUtils.getUseAnalytics(this.appState)) {
|
|
4037
4038
|
const category = "Covet.pics Popup";
|
|
4038
4039
|
const action = "Covet.pics Add-to-Cart Click";
|
|
4039
4040
|
const label = "Covet.pics Add-to-Cart Click - " + event.detail.productId;
|
|
@@ -4045,7 +4046,7 @@ const CovetPicsPopup = class {
|
|
|
4045
4046
|
if (!this.isActive) {
|
|
4046
4047
|
return false;
|
|
4047
4048
|
}
|
|
4048
|
-
if (this.
|
|
4049
|
+
if (storeUtils.getUseAnalytics(this.appState)) {
|
|
4049
4050
|
const category = "Covet.pics Popup";
|
|
4050
4051
|
const action = "Covet.pics Link Click";
|
|
4051
4052
|
const label = "Covet.pics Link Click - " + event.detail.gaCampaign;
|
|
@@ -4094,20 +4095,20 @@ const CovetPicsPopup = class {
|
|
|
4094
4095
|
gallery_item_id: this.itemId,
|
|
4095
4096
|
product_id: productId,
|
|
4096
4097
|
};
|
|
4097
|
-
|
|
4098
|
+
storeUtils.sendBeacon(this.appState, "direct_buy", beaconData);
|
|
4098
4099
|
}
|
|
4099
4100
|
sendModalOpenBeacon() {
|
|
4100
4101
|
const data = {
|
|
4101
4102
|
gallery_item_id: this.itemId,
|
|
4102
4103
|
};
|
|
4103
|
-
|
|
4104
|
+
storeUtils.sendBeacon(this.appState, "modal_open", data);
|
|
4104
4105
|
}
|
|
4105
4106
|
sendProductLinkClickBeacon(id) {
|
|
4106
4107
|
const data = {
|
|
4107
4108
|
gallery_item_id: this.itemId,
|
|
4108
4109
|
link_id: id,
|
|
4109
4110
|
};
|
|
4110
|
-
|
|
4111
|
+
storeUtils.sendBeacon(this.appState, "grid_link_click", data);
|
|
4111
4112
|
}
|
|
4112
4113
|
resetShareLinksState() {
|
|
4113
4114
|
this.copyLinkCopied = false;
|
|
@@ -4442,6 +4443,10 @@ const CovetPicsPopup = class {
|
|
|
4442
4443
|
this.setMoneyFormat();
|
|
4443
4444
|
// insert <style> for lock scroll in document head
|
|
4444
4445
|
document.head.insertAdjacentHTML("beforeend", "<style>.covet-pics-popup-scroll-lock{overflow:hidden}</style>");
|
|
4446
|
+
this.appState = this.appStore.getState();
|
|
4447
|
+
this.appStore.subscribe(() => {
|
|
4448
|
+
this.appState = this.appStore.getState();
|
|
4449
|
+
});
|
|
4445
4450
|
}
|
|
4446
4451
|
componentDidUpdate() {
|
|
4447
4452
|
this.updatePopup();
|
|
@@ -11468,6 +11473,9 @@ const CovetPicsUpload = class {
|
|
|
11468
11473
|
document.body.classList.add("covet-pics-popup-scroll-lock");
|
|
11469
11474
|
this.uploadOpen.emit();
|
|
11470
11475
|
}
|
|
11476
|
+
componentWillLoad() {
|
|
11477
|
+
this.initStore();
|
|
11478
|
+
}
|
|
11471
11479
|
componentDidLoad() {
|
|
11472
11480
|
smoothscroll.polyfill();
|
|
11473
11481
|
this.initUppy();
|
|
@@ -11475,6 +11483,14 @@ const CovetPicsUpload = class {
|
|
|
11475
11483
|
this.openUpload();
|
|
11476
11484
|
}
|
|
11477
11485
|
}
|
|
11486
|
+
initStore() {
|
|
11487
|
+
this.appState = this.appStore.getState();
|
|
11488
|
+
this.widgetWidth = this.appState.size.widgetWidth;
|
|
11489
|
+
this.appStore.subscribe(() => {
|
|
11490
|
+
this.appState = this.appStore.getState();
|
|
11491
|
+
this.widgetWidth = this.appState.size.widgetWidth;
|
|
11492
|
+
});
|
|
11493
|
+
}
|
|
11478
11494
|
select(selector) {
|
|
11479
11495
|
return this.el.shadowRoot.querySelector(selector);
|
|
11480
11496
|
}
|
|
@@ -11618,7 +11634,7 @@ const CovetPicsUpload = class {
|
|
|
11618
11634
|
"--covet-pics-popup-background-color": utils.hexToRGBA(this.backgroundColor, (this.backgroundOpacity / 100).toString()),
|
|
11619
11635
|
"--covet-pics-scrollbar-width": `${this.getScrollbarWidth().width}px`,
|
|
11620
11636
|
"--covet-pics-scrollbar-padding": `${this.getScrollbarWidth().paddingRgiht}px`,
|
|
11621
|
-
"--covet-pics-upload-img-ratio": `${
|
|
11637
|
+
"--covet-pics-upload-img-ratio": `${this.widgetWidth < 480 ? (this.widgetWidth - 48) / 352 : 1}` // TODO temp solution
|
|
11622
11638
|
};
|
|
11623
11639
|
if (this.fontFamily) {
|
|
11624
11640
|
cssVariables = Object.assign(Object.assign({}, cssVariables), { "--covet-pics-font-family": this.fontFamily + ", sans-serif" });
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const utils$1 = require('./utils-
|
|
8
|
+
const index = require('./index-7e3816c8.js');
|
|
9
|
+
const utils$1 = require('./utils-85481438.js');
|
|
10
10
|
const _commonjsHelpers = require('./_commonjsHelpers-b66a770d.js');
|
|
11
|
-
const store = require('./store-90bc6cce.js');
|
|
12
11
|
const lazy = require('./lazy-68db6903.js');
|
|
13
12
|
const effectFade = require('./effect-fade-085023a9.js');
|
|
14
13
|
|
|
@@ -3456,8 +3455,8 @@ const CovetPicsGalleryGrid = class {
|
|
|
3456
3455
|
this.isLoading = false;
|
|
3457
3456
|
this.showSort = false;
|
|
3458
3457
|
this.showBreakdown = false;
|
|
3459
|
-
this.selectedItemIndex = null;
|
|
3460
3458
|
this.isGridDisabled = false;
|
|
3459
|
+
this.selectedItemIndex = null;
|
|
3461
3460
|
this.filterChangedHandler = (event) => {
|
|
3462
3461
|
event.preventDefault();
|
|
3463
3462
|
event.stopPropagation();
|
|
@@ -3481,7 +3480,7 @@ const CovetPicsGalleryGrid = class {
|
|
|
3481
3480
|
};
|
|
3482
3481
|
this.scrollHandler = (event) => {
|
|
3483
3482
|
let elBottomPosition = utils$1.getSize(this.el, "bottom");
|
|
3484
|
-
let toBottom = Math.max(elBottomPosition -
|
|
3483
|
+
let toBottom = Math.max(elBottomPosition - this.appState.size.windowHeight, 0);
|
|
3485
3484
|
if (toBottom < 300) {
|
|
3486
3485
|
this.nextPage.emit(event);
|
|
3487
3486
|
}
|
|
@@ -3566,7 +3565,7 @@ const CovetPicsGalleryGrid = class {
|
|
|
3566
3565
|
if (this.loader.previewMode) {
|
|
3567
3566
|
document.body.querySelectorAll("covet-pics-popup").forEach(node => node.remove());
|
|
3568
3567
|
}
|
|
3569
|
-
this.popup = utils$1.createCovetPicsPopup(this.loader, this.items);
|
|
3568
|
+
this.popup = utils$1.createCovetPicsPopup(this.loader, this.items, this.appStore);
|
|
3570
3569
|
document.body.appendChild(this.popup);
|
|
3571
3570
|
}
|
|
3572
3571
|
initUploadWidget() {
|
|
@@ -3574,7 +3573,7 @@ const CovetPicsGalleryGrid = class {
|
|
|
3574
3573
|
document.querySelectorAll("covet-pics-upload").forEach(uploadWidget => uploadWidget.remove());
|
|
3575
3574
|
}
|
|
3576
3575
|
if (this.loader.data.settings["customer_photo_item_position"] || this.loader.data.settings["customer_photo_upload_button_selector"] || this.showHeader) {
|
|
3577
|
-
this.upload = utils$1.createUploadPopup(this.loader);
|
|
3576
|
+
this.upload = utils$1.createUploadPopup(this.loader, this.appStore);
|
|
3578
3577
|
document.body.appendChild(this.upload);
|
|
3579
3578
|
}
|
|
3580
3579
|
}
|
|
@@ -3587,6 +3586,7 @@ const CovetPicsGalleryGrid = class {
|
|
|
3587
3586
|
this.initFilters();
|
|
3588
3587
|
this.initPopup();
|
|
3589
3588
|
this.initUploadWidget();
|
|
3589
|
+
this.initStore();
|
|
3590
3590
|
}
|
|
3591
3591
|
componentDidLoad() {
|
|
3592
3592
|
if (this.layout === "collage")
|
|
@@ -3604,6 +3604,14 @@ const CovetPicsGalleryGrid = class {
|
|
|
3604
3604
|
this.iso.reloadItems();
|
|
3605
3605
|
this.iso.arrange();
|
|
3606
3606
|
}
|
|
3607
|
+
initStore() {
|
|
3608
|
+
this.appState = this.appStore.getState();
|
|
3609
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
3610
|
+
this.appStore.subscribe(() => {
|
|
3611
|
+
this.appState = this.appStore.getState();
|
|
3612
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
3613
|
+
});
|
|
3614
|
+
}
|
|
3607
3615
|
checkAndOpenPopup() {
|
|
3608
3616
|
if (this.sharedItemId === "none")
|
|
3609
3617
|
return false;
|
|
@@ -3703,7 +3711,7 @@ const CovetPicsGalleryGrid = class {
|
|
|
3703
3711
|
: `${layout}-item ${idx + 1}/${itemsLength}, post created ${utils$1.getDateFromTimestamp(createdTime)}`;
|
|
3704
3712
|
}
|
|
3705
3713
|
renderStandardItem(item, idx, itemsLength) {
|
|
3706
|
-
const itemWidth =
|
|
3714
|
+
const itemWidth = this.isDesktopScreen
|
|
3707
3715
|
? (100 - (this.desktopItemPadding * (this.desktopPhotosPerRow - 1))) / this.desktopPhotosPerRow
|
|
3708
3716
|
: (100 - (this.mobileItemPadding * (this.mobilePhotosPerRow - 1))) / this.mobilePhotosPerRow;
|
|
3709
3717
|
let caption = this.loader.data.settings.item_label_text;
|
|
@@ -3716,16 +3724,16 @@ const CovetPicsGalleryGrid = class {
|
|
|
3716
3724
|
return index.h("covet-pics-gallery-item", { class: { "grid-item": this.layout === "grid", "collage-item": this.layout === "collage" }, tabindex: this.isGridDisabled ? -1 : 0, "animation-duration": item.animationDuration, "hover-background-opacity": item.hoverBackgroundOpacity, "hover-border-color": item.hoverBorderColor, "hover-color-from": item.hoverColorFrom, "hover-color-to": item.hoverColorTo, "image-url": item.imageUrl, "item-source": item.source, "label-caption": item.labelCaption, "label-color": item.labelColor, "label-font-size": item.labelFontSize, "label-font-style": item.labelFontStyle });
|
|
3717
3725
|
}
|
|
3718
3726
|
renderDetailUploadItem(item) {
|
|
3719
|
-
return index.h("covet-pics-gallery-item-detail", { class: { "grid-item": this.layout === "grid", "collage-item": this.layout === "collage" }, tabindex: this.isGridDisabled ? -1 : 0, "image-url": item.imageUrl, "item-source": item.source, "label-caption": item.labelCaption, itemStyle: item.itemStyle });
|
|
3727
|
+
return index.h("covet-pics-gallery-item-detail", { class: { "grid-item": this.layout === "grid", "collage-item": this.layout === "collage" }, tabindex: this.isGridDisabled ? -1 : 0, "image-url": item.imageUrl, "item-source": item.source, "label-caption": item.labelCaption, itemStyle: item.itemStyle, appStore: this.appStore });
|
|
3720
3728
|
}
|
|
3721
3729
|
renderDetailItem(item, idx, itemsLength) {
|
|
3722
|
-
const itemWidth =
|
|
3730
|
+
const itemWidth = this.isDesktopScreen
|
|
3723
3731
|
? (100 - (this.desktopItemPadding * (this.desktopPhotosPerRow - 1))) / this.desktopPhotosPerRow
|
|
3724
3732
|
: (100 - (this.mobileItemPadding * (this.mobilePhotosPerRow - 1))) / this.mobilePhotosPerRow;
|
|
3725
|
-
return index.h("covet-pics-gallery-item-detail", { class: { "grid-item": this.layout === "grid", "collage-item": this.layout === "collage", "highlighted": this.isHighlighted(idx) }, tabindex: 0, highlighted: this.isHighlighted(idx), "image-url": utils$1.getCoverImage(item.cover_images.medium_resolution, item.images.medium_resolution), "image-high-resolution-url": utils$1.getCoverImage(item.cover_images.high_resolution, item.images.high_resolution), "image-responsive-sizes": utils$1.getSizesForResponsiveImage(this.desktopPhotosPerRow, this.mobilePhotosPerRow), "item-id": item.id, "item-source": item.source, "item-style": this.itemStyle, "item-type": item.data_type, "item-width": itemWidth, links: item.links, "popup-disabled": this.loader.data.settings.popup_disable_modal, "popup-redirect-mode": this.loader.data.settings.item_open_link, url: item.url, "background-color": this.loader.data.settings.background_color, "primary-color": this.loader.data.settings.primary_color, "star-color": this.loader.data.settings.star_color, layout: this.layout, "user-name": item.username, caption: item.caption, "created-time": item.created_time, verified: item.verified, rating: item.rating !== null ? item.rating : 0, "alt-tag": this.itemImgAltTag(item.caption, idx, itemsLength, item.created_time, this.layout) });
|
|
3733
|
+
return index.h("covet-pics-gallery-item-detail", { class: { "grid-item": this.layout === "grid", "collage-item": this.layout === "collage", "highlighted": this.isHighlighted(idx) }, tabindex: 0, highlighted: this.isHighlighted(idx), "image-url": utils$1.getCoverImage(item.cover_images.medium_resolution, item.images.medium_resolution), "image-high-resolution-url": utils$1.getCoverImage(item.cover_images.high_resolution, item.images.high_resolution), "image-responsive-sizes": utils$1.getSizesForResponsiveImage(this.desktopPhotosPerRow, this.mobilePhotosPerRow), "item-id": item.id, "item-source": item.source, "item-style": this.itemStyle, "item-type": item.data_type, "item-width": itemWidth, links: item.links, "popup-disabled": this.loader.data.settings.popup_disable_modal, "popup-redirect-mode": this.loader.data.settings.item_open_link, url: item.url, "background-color": this.loader.data.settings.background_color, "primary-color": this.loader.data.settings.primary_color, "star-color": this.loader.data.settings.star_color, layout: this.layout, "user-name": item.username, caption: item.caption, "created-time": item.created_time, verified: item.verified, rating: item.rating !== null ? item.rating : 0, "alt-tag": this.itemImgAltTag(item.caption, idx, itemsLength, item.created_time, this.layout), appStore: this.appStore });
|
|
3726
3734
|
}
|
|
3727
3735
|
renderHeader() {
|
|
3728
|
-
return (index.h("covet-pics-gallery-header", { "product-title": this.productTitle, rating: this.rating, "rating-count": this.ratingCount, breakdown: this.breakdown, "header-type": this.headerType, "show-sort": this.headerShowSort.toString(), "show-average-star-rating": this.headerShowAverageRating.toString(), "show-breakdown": this.showBreakdown.toString() }));
|
|
3736
|
+
return (index.h("covet-pics-gallery-header", { "product-title": this.productTitle, rating: this.rating, "rating-count": this.ratingCount, breakdown: this.breakdown, "header-type": this.headerType, "show-sort": this.headerShowSort.toString(), "show-average-star-rating": this.headerShowAverageRating.toString(), "show-breakdown": this.showBreakdown.toString(), appStore: this.appStore }));
|
|
3729
3737
|
}
|
|
3730
3738
|
render() {
|
|
3731
3739
|
if (typeof this.items !== "undefined" && typeof this.loader !== "undefined") {
|
|
@@ -4066,7 +4074,7 @@ const CovetPicsGallerySlider = class {
|
|
|
4066
4074
|
if (this.loader.previewMode) {
|
|
4067
4075
|
document.body.querySelectorAll("covet-pics-popup").forEach(node => node.remove());
|
|
4068
4076
|
}
|
|
4069
|
-
this.popup = utils$1.createCovetPicsPopup(this.loader, this.items);
|
|
4077
|
+
this.popup = utils$1.createCovetPicsPopup(this.loader, this.items, this.appStore);
|
|
4070
4078
|
document.body.appendChild(this.popup);
|
|
4071
4079
|
}
|
|
4072
4080
|
initUploadWidget() {
|
|
@@ -4074,7 +4082,7 @@ const CovetPicsGallerySlider = class {
|
|
|
4074
4082
|
document.querySelectorAll("covet-pics-upload").forEach(uploadWidget => uploadWidget.remove());
|
|
4075
4083
|
}
|
|
4076
4084
|
if (this.loader.data.settings["customer_photo_item_position"] || this.loader.data.settings["customer_photo_upload_button_selector"]) {
|
|
4077
|
-
this.upload = utils$1.createUploadPopup(this.loader);
|
|
4085
|
+
this.upload = utils$1.createUploadPopup(this.loader, this.appStore);
|
|
4078
4086
|
document.body.appendChild(this.upload);
|
|
4079
4087
|
}
|
|
4080
4088
|
}
|
|
@@ -4152,6 +4160,7 @@ const CovetPicsGallerySlider = class {
|
|
|
4152
4160
|
componentWillLoad() {
|
|
4153
4161
|
this.initPopup();
|
|
4154
4162
|
this.initUploadWidget();
|
|
4163
|
+
this.initStore();
|
|
4155
4164
|
}
|
|
4156
4165
|
componentDidLoad() {
|
|
4157
4166
|
this.initSwiper();
|
|
@@ -4164,6 +4173,14 @@ const CovetPicsGallerySlider = class {
|
|
|
4164
4173
|
this.swiper.update();
|
|
4165
4174
|
this.unFixSliderheight();
|
|
4166
4175
|
}
|
|
4176
|
+
initStore() {
|
|
4177
|
+
this.appState = this.appStore.getState();
|
|
4178
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
4179
|
+
this.appStore.subscribe(() => {
|
|
4180
|
+
this.appState = this.appStore.getState();
|
|
4181
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4167
4184
|
checkAndOpenPopup() {
|
|
4168
4185
|
if (this.sharedItemId === "none")
|
|
4169
4186
|
return false;
|
|
@@ -4183,16 +4200,16 @@ const CovetPicsGallerySlider = class {
|
|
|
4183
4200
|
return (index.h("covet-pics-gallery-item", { class: "swiper-slide slide", "item-source": item.source, "image-url": item.imageUrl, "item-style": item.itemStyle, "label-caption": item.labelCaption, "item-index": idx }));
|
|
4184
4201
|
}
|
|
4185
4202
|
renderStandardItem(item, idx, itemsLength) {
|
|
4186
|
-
const itemWidth =
|
|
4203
|
+
const itemWidth = this.isDesktopScreen
|
|
4187
4204
|
? (100 - (this.desktopItemPadding * (this.desktopPhotosPerRow - 1))) / this.desktopPhotosPerRow
|
|
4188
4205
|
: (100 - (this.mobileItemPadding * (this.mobilePhotosPerRow - 1))) / this.mobilePhotosPerRow;
|
|
4189
4206
|
return (index.h("covet-pics-gallery-item", { class: "swiper-slide", "animation-duration": this.loader.data.settings.item_animation_duration, "image-url": utils$1.getCoverImage(item.cover_images.medium_resolution, item.images.medium_resolution), "image-high-resolution-url": utils$1.getCoverImage(item.cover_images.high_resolution, item.images.high_resolution), "image-responsive-sizes": utils$1.getSizesForResponsiveImage(this.desktopPhotosPerRow, this.mobilePhotosPerRow), "item-id": item.id, "item-source": item.source, "hover-animation-style": this.loader.data.settings.item_animation_type, "hover-background-opacity": this.loader.data.settings.item_hover_background_opacity, "hover-border-color": this.loader.data.settings.item_hover_border_color, "hover-color-from": this.loader.data.settings.item_hover_color_from, "hover-color-to": this.loader.data.settings.item_hover_color_to, "hover-disabled": this.loader.data.settings.item_hover_disabled, "hover-preview": this.loader.previewHoverMode, "label-caption": this.loader.data.settings.item_without_product_label_text, "label-caption-with-links": this.loader.data.settings.item_label_text, "label-color": this.loader.data.settings.item_label_color, "label-font-size": this.loader.data.settings.item_label_font_size, "label-font-style": this.loader.data.settings.item_label_font_style, "lazy-load": true, links: item.links, "popup-disabled": this.loader.data.settings.popup_disable_modal, "popup-redirect-mode": this.loader.data.settings.item_open_link, "show-hover-icon": this.loader.data.settings.item_hover_icon, url: item.url, "alt-tag": this.itemImgAltTag(item.caption, idx, itemsLength, item.created_time), "aria-label": `slide ${idx + 1} of ${itemsLength} in covet-widget slider`, rating: item.rating !== null ? item.rating : 0, "user-name": item.username, "created-time": item.created_time, "item-type": item.data_type, caption: item.caption, "item-width": itemWidth, "item-index": idx }));
|
|
4190
4207
|
}
|
|
4191
4208
|
renderDetailItem(item, idx, itemsLength) {
|
|
4192
|
-
const itemWidth =
|
|
4209
|
+
const itemWidth = this.isDesktopScreen
|
|
4193
4210
|
? (100 - (this.desktopItemPadding * (this.desktopPhotosPerRow - 1))) / this.desktopPhotosPerRow
|
|
4194
4211
|
: (100 - (this.mobileItemPadding * (this.mobilePhotosPerRow - 1))) / this.mobilePhotosPerRow;
|
|
4195
|
-
return (index.h("covet-pics-gallery-item-detail", { class: "swiper-slide", "image-url": utils$1.getCoverImage(item.cover_images.medium_resolution, item.images.medium_resolution), "image-high-resolution-url": utils$1.getCoverImage(item.cover_images.high_resolution, item.images.high_resolution), "image-responsive-sizes": utils$1.getSizesForResponsiveImage(this.desktopPhotosPerRow, this.mobilePhotosPerRow), "item-id": item.id, "item-source": item.source, "item-style": this.itemStyle, "item-type": item.data_type, "item-width": itemWidth, "lazy-load": true, links: item.links, "popup-disabled": this.loader.data.settings.popup_disable_modal, "popup-redirect-mode": this.loader.data.settings.item_open_link, url: item.url, "background-color": this.loader.data.settings.background_color, "primary-color": this.loader.data.settings.primary_color, "star-color": this.loader.data.settings.star_color, layout: "slider", "user-name": item.username, caption: item.caption, "created-time": item.created_time, rating: item.rating !== null ? item.rating : 0, verified: item.verified, altTag: this.itemImgAltTag(item.caption, idx, itemsLength, item.created_time), "aria-label": `slide ${idx + 1} of ${itemsLength} in covet-widget slider`, "item-index": idx }));
|
|
4212
|
+
return (index.h("covet-pics-gallery-item-detail", { class: "swiper-slide", "image-url": utils$1.getCoverImage(item.cover_images.medium_resolution, item.images.medium_resolution), "image-high-resolution-url": utils$1.getCoverImage(item.cover_images.high_resolution, item.images.high_resolution), "image-responsive-sizes": utils$1.getSizesForResponsiveImage(this.desktopPhotosPerRow, this.mobilePhotosPerRow), "item-id": item.id, "item-source": item.source, "item-style": this.itemStyle, "item-type": item.data_type, "item-width": itemWidth, "lazy-load": true, links: item.links, "popup-disabled": this.loader.data.settings.popup_disable_modal, "popup-redirect-mode": this.loader.data.settings.item_open_link, url: item.url, "background-color": this.loader.data.settings.background_color, "primary-color": this.loader.data.settings.primary_color, "star-color": this.loader.data.settings.star_color, layout: "slider", "user-name": item.username, caption: item.caption, "created-time": item.created_time, rating: item.rating !== null ? item.rating : 0, verified: item.verified, altTag: this.itemImgAltTag(item.caption, idx, itemsLength, item.created_time), "aria-label": `slide ${idx + 1} of ${itemsLength} in covet-widget slider`, appStore: this.appStore, "item-index": idx }));
|
|
4196
4213
|
}
|
|
4197
4214
|
render() {
|
|
4198
4215
|
if (this.items !== undefined) {
|
|
@@ -4311,6 +4328,9 @@ const CovetPicsHighlighted = class {
|
|
|
4311
4328
|
return this.mainSliderIndex;
|
|
4312
4329
|
};
|
|
4313
4330
|
}
|
|
4331
|
+
componentWillLoad() {
|
|
4332
|
+
this.initStore();
|
|
4333
|
+
}
|
|
4314
4334
|
componentDidLoad() {
|
|
4315
4335
|
if (this.layout === "slider" || this.layout === "spotlight")
|
|
4316
4336
|
this.initMainSlider();
|
|
@@ -4318,6 +4338,16 @@ const CovetPicsHighlighted = class {
|
|
|
4318
4338
|
componentDidRender() {
|
|
4319
4339
|
document.onkeydown = (e) => this.onSliderClickHandler(e);
|
|
4320
4340
|
}
|
|
4341
|
+
initStore() {
|
|
4342
|
+
this.appState = this.appStore.getState();
|
|
4343
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
4344
|
+
this.windowHeight = this.appState.size.windowHeight;
|
|
4345
|
+
this.appStore.subscribe(() => {
|
|
4346
|
+
this.appState = this.appStore.getState();
|
|
4347
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
4348
|
+
this.windowHeight = this.appState.size.windowHeight;
|
|
4349
|
+
});
|
|
4350
|
+
}
|
|
4321
4351
|
isClickOutsideHotspot(e) {
|
|
4322
4352
|
const activeHotspots = Array.from(this.el.querySelectorAll(".hotspot.active.show-content"));
|
|
4323
4353
|
if (activeHotspots.length > 1)
|
|
@@ -4334,7 +4364,7 @@ const CovetPicsHighlighted = class {
|
|
|
4334
4364
|
"--covet-pics-highlighted-padding-px": utils$1.getSize(this.el, "width") * this.padding / 100 + "px",
|
|
4335
4365
|
"--covet-pics-highlighted-primary-color": this.primaryColor.toString(),
|
|
4336
4366
|
"--covet-pics-highlighted-secondary-color": this.secondaryColor.toString(),
|
|
4337
|
-
"--covet-pics-highlighted-window-height": `${
|
|
4367
|
+
"--covet-pics-highlighted-window-height": `${this.windowHeight * 0.01}px`
|
|
4338
4368
|
};
|
|
4339
4369
|
}
|
|
4340
4370
|
renderControlIcon(direction) {
|
|
@@ -4430,10 +4460,10 @@ const CovetPicsHighlighted = class {
|
|
|
4430
4460
|
return `page ${index + 1} of ${itemsLength} pages, with thumbnail img preview ${sideLabel} in page slider layout`;
|
|
4431
4461
|
}
|
|
4432
4462
|
renderSlider() {
|
|
4433
|
-
return (index.h("section", { id: "covet-pics-highlighted-page-slider", class: `main-slider ${this.layout}`, role: "region", "aria-label": "page slider" }, this.items.map((item, index$1) => index.h("covet-pics-highlighted-page", { class: `${this.layout} slide-noactive`, thumbnailUrl: item.data_type === "image" ? item.images.high_resolution : null, thumbnailAlt: this.thumbnailAltTag(item.caption, index$1, this.items.length, item.created_time), ariaLabel: this.pageAriaLabel(item, index$1, this.items.length, this.layout, !
|
|
4463
|
+
return (index.h("section", { id: "covet-pics-highlighted-page-slider", class: `main-slider ${this.layout}`, role: "region", "aria-label": "page slider" }, this.items.map((item, index$1) => index.h("covet-pics-highlighted-page", { class: `${this.layout} slide-noactive`, thumbnailUrl: item.data_type === "image" ? item.images.high_resolution : null, thumbnailAlt: this.thumbnailAltTag(item.caption, index$1, this.items.length, item.created_time), ariaLabel: this.pageAriaLabel(item, index$1, this.items.length, this.layout, !this.isDesktopScreen), thumbnailLayout: item.data_type, thumbnailCarouselImages: item.data_type === "carousel" ? item.carousel_media : null, videoUrl: item.video ? item.video : null, videoPoster: item.cover_images && item.cover_images.high_resolution ? item.cover_images.high_resolution : null, productLinks: item.links, productBaseImgAlt: `page ${index$1 + 1}/${this.items.length}`, productsLayout: this.productsLayout, layout: this.layout, showHotspots: this.showHotspots, hotspotsLayout: this.hotspotsLayout, hotspotsBackgoundColor: this.hotspotsBackgoundColor, isMobile: !this.isDesktopScreen, showPrice: this.showPrice, hideProductTitle: this.hideProductTitle, productsTitle: this.productsTitle, btnBuyLabel: this.btnBuyLabel, pageIndex: index$1, mainSliderIndex: this.mainSliderIndex, hideBranding: this.hideBranding, caption: item.caption, "user-name": item.username, "created-time": item.created_time, rating: item.rating !== null ? item.rating : 0, showReview: this.showReview, "page-id": item.id, appStore: this.appStore })), index.h("button", { disabled: this.mainSliderIndex === 0, onClick: (e) => this.mainSliderChangeSlide(e, "prev"), class: `slider-control main next ${this.layout === "spotlight" ? "main-spotlight" : ""}`, "aria-label": "slider-control prev", "aria-controls": "covet-pics-highlighted-page-slider", type: "button" }, this.renderControlIcon("next")), index.h("button", { disabled: this.mainSliderIndex === this.numberOfPages - 1, onClick: (e) => this.mainSliderChangeSlide(e, "next"), class: `slider-control main prev ${this.layout === "spotlight" ? "main-spotlight" : ""}`, "aria-label": "slider-control next", "aria-controls": "covet-pics-highlighted-page-slider", type: "button" }, this.renderControlIcon("prev"))));
|
|
4434
4464
|
}
|
|
4435
4465
|
renderVertical() {
|
|
4436
|
-
return (this.items.map((item, index$1) => index.h("covet-pics-highlighted-page", { class: this.layout, thumbnailUrl: item.data_type === "image" ? item.images.high_resolution : null, thumbnailAlt: this.thumbnailAltTag(item.caption, index$1, this.items.length, item.created_time), ariaLabel: this.pageAriaLabel(item, index$1, this.items.length, this.layout, !
|
|
4466
|
+
return (this.items.map((item, index$1) => index.h("covet-pics-highlighted-page", { class: this.layout, thumbnailUrl: item.data_type === "image" ? item.images.high_resolution : null, thumbnailAlt: this.thumbnailAltTag(item.caption, index$1, this.items.length, item.created_time), ariaLabel: this.pageAriaLabel(item, index$1, this.items.length, this.layout, !this.isDesktopScreen), thumbnailLayout: item.data_type, thumbnailCarouselImages: item.data_type === "carousel" ? item.carousel_media : null, videoUrl: item.video ? item.video : null, videoPoster: item.cover_images && item.cover_images.high_resolution ? item.cover_images.high_resolution : null, productsLayout: this.productsLayout, productLinks: item.links, productBaseImgAlt: `page ${index$1 + 1}/${this.items.length}`, layout: this.layout, showHotspots: this.renderHotspots(), hotspotsLayout: this.hotspotsLayout, hotspotsBackgoundColor: this.hotspotsBackgoundColor, isMobile: !this.isDesktopScreen, showPrice: this.showPrice, hideProductTitle: this.hideProductTitle, productsTitle: this.productsTitle, reverseClass: index$1 % 2 !== 0 && this.isDesktopScreen && this.layout === "zigzag" ? "reverse" : "", btnBuyLabel: this.btnBuyLabel, hideBranding: this.hideBranding, caption: item.caption, "user-name": item.username, "created-time": item.created_time, rating: item.rating !== null ? item.rating : 0, "item-type": item.data_type, showReview: this.showReview, "page-id": item.id, appStore: this.appStore })));
|
|
4437
4467
|
}
|
|
4438
4468
|
async mainSliderAnimationLoop() {
|
|
4439
4469
|
if (this.mainSliderAnimatingSlides.length !== 0) {
|
|
@@ -4498,9 +4528,9 @@ const CovetPicsHighlighted = class {
|
|
|
4498
4528
|
return null;
|
|
4499
4529
|
}
|
|
4500
4530
|
render() {
|
|
4501
|
-
const showPagination = ((this.layout === "slider" && !
|
|
4531
|
+
const showPagination = ((this.layout === "slider" && !this.isDesktopScreen) || this.layout === "spotlight")
|
|
4502
4532
|
&& this.items && this.items.length > 1;
|
|
4503
|
-
return (index.h(index.Host, { class: this.layout, style: this.setCSSVariables(), onClick: (e) => !
|
|
4533
|
+
return (index.h(index.Host, { class: this.layout, style: this.setCSSVariables(), onClick: (e) => !this.isDesktopScreen && this.layout === "row" ? this.isClickOutsideHotspot(e) : null, role: this.layout === "zigzag" || this.layout === "row" ? "grid" : "region", "aria-label": this.highlightedAriaLabel() }, this.renderMainLayout(), showPagination &&
|
|
4504
4534
|
index.h("span", { class: "page-pagination" }, `${this.mainSliderIndex + 1}/${this.items.length}`)));
|
|
4505
4535
|
}
|
|
4506
4536
|
get el() { return index.getElement(this); }
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const
|
|
10
|
-
const utils = require('./utils-
|
|
8
|
+
const index = require('./index-7e3816c8.js');
|
|
9
|
+
const sort = require('./sort-ecd4fc1f.js');
|
|
10
|
+
const utils = require('./utils-85481438.js');
|
|
11
11
|
const fragment = require('./fragment-29c21ac8.js');
|
|
12
12
|
|
|
13
13
|
const covetPicsGalleryHeaderCss = ".header.header1{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:25px 20px 25px 20px}.header.header2{padding:25px 63px 0px 63px}@media only screen and (max-width: 799.98px){.header.header2{padding:25px 30px 0px 30px}}.header.header3{padding:25px 63px 25px 63px}@media only screen and (max-width: 799.98px){.header.header3{padding:25px 25px 25px 25px}}.header.header4{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0px 63px 35px 63px}@media only screen and (max-width: 799.98px){.header.header4{padding:0px 25px 35px 25px}}.rated-wrap{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between}@media only screen and (max-width: 799.98px){.rated-wrap.header2{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.rated-wrap.header2:after{display:none}}.rated-wrap.header2.show-separation:after{content:\"\";position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#ECECEC;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media only screen and (max-width: 799.98px){.rated-wrap.header2.show-separation:after:after{display:none}}.rated-wrap.header4{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-wrap.header1{position:relative}.rating-wrap.header2{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-wrap.header3{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border:none;background-color:transparent;cursor:pointer;position:relative;padding:0}.rating-text{font-size:14px;font-weight:400;color:#919EAB}.top-title{text-transform:uppercase;font-size:11px;font-weight:700;letter-spacing:2px;color:#919EAB;margin-bottom:25px}.star-title{width:9px;height:9px;margin-right:9px}.rating-title{margin:0}.rating-title.header4{font-size:18px;font-weight:500;color:#000000}.rated{margin-left:20px;font-size:14px;font-weight:700;color:#919EAB}.rating-breakdown.header1{position:absolute;display:block;top:0;left:0;color:#919EAB;font-size:14px;background-color:white;-webkit-transform:translateY(40px);transform:translateY(40px);max-height:0;overflow:hidden;opacity:0;padding:0;margin:0;-webkit-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:4px;border:1px solid transparent;-ms-flex:none;flex:none}.rating-breakdown.header1.show-breakdown{-webkit-box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:1px solid #ECECEC;opacity:1;z-index:1000;max-height:1000px;min-width:326px;padding-bottom:23px}.rating-breakdown.header2{display:-ms-flexbox;display:flex}.rating-breakdown-title{font-size:14px;font-weight:700;margin-left:30px;color:#1F273D}.rating-breakdown-score{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:7px 30px 7px 30px}.rating-breakdown-text{margin:0px 0px 0px 20px;font-size:12px}.score.header1{margin-left:auto}.score.header2{margin-top:auto;font-size:14px;color:#1F273D;margin-bottom:0}@media only screen and (max-width: 799.98px){.score.header2{margin-bottom:20px}}.score.header3{color:#000000;padding-top:17px;margin:0}.score.header4{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:14px;font-weight:400;color:#919EAB;margin:19px 0px 0px 0px}.score-number.header2{font-size:62px;line-height:62px}.score-number.header3{font-size:18px;font-weight:600;color:#000000}.score-number.header4{font-size:14px;font-weight:700;color:#919EAB;margin-left:17px}.score-slash{position:relative;width:1px;height:14px;display:block;background-color:#C7C7C7;margin-left:12px;margin-right:12px}.score-total.header2{color:#919EAB;font-size:14px;margin-left:13px;padding-left:10px;position:relative}.score-total.header2:after{content:\"\";position:absolute;top:50%;left:0;width:1px;height:14px;background-color:#C7C7C7;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.score-total.header3{color:#919EAB;font-size:14px;padding-top:12px;margin:0}.score-total.header4{color:#919EAB;font-size:14px;font-weight:700;margin:0;position:relative}.score-total.header4.space-left{margin-left:17px}.sort-wrap.header2{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;margin-top:15px;margin-bottom:15px}@media only screen and (max-width: 799.98px){.sort-wrap.header2{-ms-flex-pack:center;justify-content:center}}.sort-wrap.header3{margin-top:30px}.sort-wrap.header4{margin-top:auto}.sorting{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;-ms-flex:none;flex:none}.sorting.header4{border-radius:4px;margin-top:auto}.sort-title{font-size:14px;font-weight:700;color:#919EAB}.sort-title.header2{font-size:12px;font-weight:700;color:#000000}.sort-title.header3{font-size:12px;font-weight:700;color:#000000}.sort-title.header4{font-size:14px;font-weight:700;color:#007ACE}.sort-btn{background-color:transparent;border:none;color:#919EAB;font-size:14px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:all 0.3s ease-out;transition:all 0.3s ease-out;cursor:pointer}.sort-btn.header2{color:#000000}.sort-btn.header3{border:1px solid #ECECEC;border-radius:4px;padding:8px 14px 8px 14px;margin-left:10px}.sort-btn.header4{color:#007ACE}.sort-select{position:absolute;display:block;top:0;right:0;color:#919EAB;font-size:14px;background-color:white;-webkit-transform:translateY(30px);transform:translateY(30px);max-height:0;overflow:hidden;cursor:pointer;opacity:0;padding:0;margin:0;-webkit-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:4px;border:1px solid transparent;-ms-flex:none;flex:none}@media only screen and (max-width: 799.98px){.sort-select.header2{right:50%;-webkit-transform:translate(50%, 30px);transform:translate(50%, 30px)}}.sort-select.show-sort{-webkit-box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:1px solid #ECECEC;opacity:1;z-index:1000;max-height:1000px;min-width:186px}.sort-select.header3{left:0;right:auto;-webkit-transform:translateY(40px);transform:translateY(40px)}.sort-check{width:12px;height:9px;margin-right:12px}.sort-check path{-webkit-transition:all 0.3s ease-in;transition:all 0.3s ease-in;stroke:transparent}.sort__dropdown-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;list-style:none;padding:12px 35px 0px 23px;-webkit-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.sort__dropdown-item:first-of-type{padding-top:23px}.sort__dropdown-item:last-of-type{padding-bottom:23px}.sort__dropdown-item.active{color:#626C75}.sort__dropdown-item.active .sort-check{-webkit-transition:all 0.4s ease-out;transition:all 0.4s ease-out}.sort__dropdown-item.active .sort-check path{stroke:#919EAB}.sort__dropdown-item:hover,.sort__dropdown-item:active,.sort__dropdown-item:focus{color:#626C75}.sort-arrow{margin-left:7px;width:9px;height:6px}@media only screen and (max-width: 799.98px){.sort-arrow.header1{margin-left:0}}.sort-arrow.header2{width:8px;height:6px;margin-left:15px}.sort-arrow.header4{width:10px;height:6px;margin-left:15px}@media only screen and (max-width: 799.98px){.sort-arrow.header4{margin-left:0}}.sort-arrow-down{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}.rating-row{display:-ms-flexbox;display:flex}.star-score{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.star-score-count{width:57px;margin-bottom:6px;margin-top:0;color:#C7C7C7;font-size:12px}.progress-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.progress{width:180px;height:15px;border-radius:4px;background-color:#F7F8FC;margin:0px 10px 14px 10px}.progress-bar{position:absolute;top:0;left:0;height:15px;width:10%;border-radius:4px;background-color:#5C6AC4}.percent{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.percent-count{color:#5C6AC4;font-size:10px}.review-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border:none;background-color:#5C6AC4;border-radius:4px;cursor:pointer;padding:10px 14px;color:#FFFFFF;font-size:14px}.icon-pen{width:12px;height:12px;margin-right:10px}@media only screen and (max-width: 799.98px){.icon-pen{margin-right:0}}";
|
|
@@ -82,10 +82,21 @@ const CovetPicsGalleryHeader = class {
|
|
|
82
82
|
this.showSortDropdown = !this.showSortDropdown;
|
|
83
83
|
if (event.target.getAttribute("aria-selected") === undefined)
|
|
84
84
|
return false;
|
|
85
|
-
|
|
86
|
-
this.sortUpdated.emit(event.target.getAttribute("aria-selected"));
|
|
85
|
+
this.appStore.dispatch(sort.sortUpdated(event.target.getAttribute("aria-selected")));
|
|
86
|
+
this.sortUpdated.emit(event.target.getAttribute("aria-selected")); //TODO remove this (call this in component use sibscribe)
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
+
componentWillLoad() {
|
|
90
|
+
this.initStore();
|
|
91
|
+
}
|
|
92
|
+
initStore() {
|
|
93
|
+
this.appState = this.appStore.getState();
|
|
94
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
95
|
+
this.appStore.subscribe(() => {
|
|
96
|
+
this.appState = this.appStore.getState();
|
|
97
|
+
this.isDesktopScreen = this.appState.size.isDesktopScreen;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
89
100
|
getBreakdown() {
|
|
90
101
|
const newBreakdown = [];
|
|
91
102
|
const starsScore = ["one", "two", "three", "four", "five"];
|
|
@@ -112,28 +123,28 @@ const CovetPicsGalleryHeader = class {
|
|
|
112
123
|
}
|
|
113
124
|
renderSort() {
|
|
114
125
|
var _a;
|
|
115
|
-
const mobileSort = !
|
|
126
|
+
const mobileSort = !this.isDesktopScreen && (this.headerType === "header1" || this.headerType === "header4");
|
|
116
127
|
const iconActiveClass = this.showSortDropdown ? "sort-arrow-down" : "";
|
|
117
|
-
const mobileSortSelected = mobileSort ? "" : (_a =
|
|
128
|
+
const mobileSortSelected = mobileSort ? "" : (_a = this.appState.sort.options.find(el => el.value === this.appState.sort.selected)) === null || _a === void 0 ? void 0 : _a.name;
|
|
118
129
|
return (index.h("div", { class: `sorting ${this.headerType}` }, index.h("span", { class: `sort-title ${this.headerType}` }, "Sort ", mobileSort ? "" : "by", " :"), index.h("button", { class: `sort-btn ${this.headerType}`, onClick: () => this.showSortDropdown = !this.showSortDropdown }, index.h("span", { class: "sort-btn-text" }, mobileSortSelected), this.headerType === "header2" &&
|
|
119
130
|
index.h("svg", { class: `sort-arrow ${this.headerType} ${iconActiveClass}`, viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4.5791 5.50671C4.37892 5.75887 3.99608 5.75887 3.79589 5.50671L0.663473 1.56088C0.403343 1.2332 0.636699 0.75 1.05508 0.75L7.31992 0.75C7.7383 0.75 7.97166 1.2332 7.71153 1.56088L4.5791 5.50671Z", fill: "#1F273D" })), (this.headerType === "header1" || this.headerType === "header3") &&
|
|
120
131
|
index.h("svg", { class: `sort-arrow ${this.headerType} ${iconActiveClass}`, viewBox: "0 0 9 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4.8916 5.50671C4.69142 5.75887 4.30858 5.75887 4.10839 5.50671L0.380581 0.810878C0.120451 0.483199 0.353806 0 0.772186 0L8.22781 0C8.64619 0 8.87955 0.483199 8.61942 0.810878L4.8916 5.50671Z", fill: "#919EAB" })), this.headerType === "header4" &&
|
|
121
|
-
index.h("svg", { class: `sort-arrow ${this.headerType} ${iconActiveClass}`, viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M1 1L5 5L9 1", stroke: "#007ACE", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("ul", { class: `sort-select ${this.headerType} ${this.showSortDropdown ? "show-sort" : ""}` },
|
|
132
|
+
index.h("svg", { class: `sort-arrow ${this.headerType} ${iconActiveClass}`, viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M1 1L5 5L9 1", stroke: "#007ACE", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("ul", { class: `sort-select ${this.headerType} ${this.showSortDropdown ? "show-sort" : ""}` }, this.appState.sort.options.map(el => index.h("li", { class: `sort__dropdown-item ${el.value === this.appState.sort.selected ? "active" : ""}`, "aria-selected": el.value, onClick: this.onSelectUpdate }, index.h("svg", { class: "sort-check", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M10.7273 1.5L4.72727 7.5L2 4.77273", stroke: "#919EAB", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), el.name)))));
|
|
122
133
|
}
|
|
123
134
|
renderHeaderOne() {
|
|
124
|
-
const mobileRating = !
|
|
135
|
+
const mobileRating = !this.isDesktopScreen && (this.headerType === "header1" || this.headerType === "header4");
|
|
125
136
|
return (index.h("div", { class: `header ${this.headerType}` }, index.h("div", { class: `rated-wrap ${this.headerType}` }, index.h("button", { class: "rating-btn", onClick: this.onClickRatingHendler, onMouseEnter: this.mouseEnterRatingHandler, onMouseLeave: this.mouseLeaveRatingHandler }, index.h("covet-pics-star-rating", { rating: this.rating, showLabel: false, starSize: 15, spaceStars: 11, emptyStarColor: "transpotent", starBorderColor: "#fec500", starBorderWidth: 10 }), this.showAverageStarRating && index.h("p", { class: "rating-text" }, index.h("span", { class: "rated" }, "Rated ", this.rating, "/5 "), mobileRating ? `(${this.ratingCount})` : `based on ${this.ratingCount} customer reviews.`)), this.showAverageStarRating && this.renderBreakdown()), this.showSort && this.renderSort()));
|
|
126
137
|
}
|
|
127
138
|
renderHeaderTwo() {
|
|
128
139
|
return (index.h("div", { class: `header ${this.headerType}` }, this.showAverageStarRating &&
|
|
129
|
-
index.h("div", { class: `rated-wrap ${this.headerType} ${this.showBreakdown ? "show-separation" : ""}` }, index.h("div", { class: `rating-wrap ${this.headerType}` },
|
|
140
|
+
index.h("div", { class: `rated-wrap ${this.headerType} ${this.showBreakdown ? "show-separation" : ""}` }, index.h("div", { class: `rating-wrap ${this.headerType}` }, this.isDesktopScreen && index.h("h3", { class: "rating-title" }, "Customers rated this:"), index.h("p", { class: `score ${this.headerType}` }, index.h("span", { class: `score-number ${this.headerType}` }, this.rating), " out of 5", index.h("span", { class: `score-total ${this.headerType}` }, " from ", this.ratingCount, " ratings"))), index.h("div", { class: "rating-breakdown" }, this.getBreakdown().map(el => index.h("div", { class: "rating-row" }, index.h("div", { class: "star-score" }, index.h("p", { class: "star-score-count" }, el.rating, " ", el.rating > 1 ? "stars" : "star")), index.h("div", { class: "progress-wrap" }, index.h("span", { class: "progress" }), index.h("span", { class: "progress-bar", style: { "width": `${el.rating_percentage}%` } })), index.h("div", { class: "percent" }, index.h("span", { class: "percent-count" }, el.rating_percentage)))))), index.h("div", { class: `sort-wrap ${this.headerType}` }, this.showSort && this.renderSort())));
|
|
130
141
|
}
|
|
131
142
|
renderHeaderThree() {
|
|
132
|
-
return (index.h("div", { class: `header ${this.headerType}` }, index.h("div", { class: `rated-wrap ${this.headerType}` }, index.h("div", { class: "rating-wrap" }, index.h("covet-pics-star-rating", { rating: 4, showLabel: false, starSize: 18, spaceStars: 11, emptyStarColor: "transpotent", starBorderColor: "#fec500", starBorderWidth: 10 }), this.showAverageStarRating && index.h("p", { class: `score ${this.headerType}` }, index.h("span", { class: `score-number ${this.headerType}` }, this.rating), " out of 5 stars"), index.h("p", { class: `score-total ${this.headerType}` }, this.ratingCount, " reviews")), index.h("div", { class: "review-wrap" }, index.h("button", { class: "review-btn", onClick: this.onClickAddReviewHendler }, index.h("svg", { class: "icon-pen", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M5.94629 10.4102H10.8928", stroke: "white", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M8.4197 1.34148C8.63834 1.12283 8.93489 1 9.24411 1C9.39721 1 9.54882 1.03016 9.69027 1.08875C9.83173 1.14734 9.96025 1.23322 10.0685 1.34148C10.1768 1.44975 10.2627 1.57827 10.3213 1.71972C10.3798 1.86118 10.41 2.01279 10.41 2.16589C10.41 2.319 10.3798 2.47061 10.3213 2.61206C10.2627 2.75351 10.1768 2.88204 10.0685 2.9903L3.19843 9.86039L1 10.41L1.54961 8.21157L8.4197 1.34148Z", stroke: "white", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })),
|
|
143
|
+
return (index.h("div", { class: `header ${this.headerType}` }, index.h("div", { class: `rated-wrap ${this.headerType}` }, index.h("div", { class: "rating-wrap" }, index.h("covet-pics-star-rating", { rating: 4, showLabel: false, starSize: 18, spaceStars: 11, emptyStarColor: "transpotent", starBorderColor: "#fec500", starBorderWidth: 10 }), this.showAverageStarRating && index.h("p", { class: `score ${this.headerType}` }, index.h("span", { class: `score-number ${this.headerType}` }, this.rating), " out of 5 stars"), index.h("p", { class: `score-total ${this.headerType}` }, this.ratingCount, " reviews")), index.h("div", { class: "review-wrap" }, index.h("button", { class: "review-btn", onClick: this.onClickAddReviewHendler }, index.h("svg", { class: "icon-pen", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M5.94629 10.4102H10.8928", stroke: "white", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M8.4197 1.34148C8.63834 1.12283 8.93489 1 9.24411 1C9.39721 1 9.54882 1.03016 9.69027 1.08875C9.83173 1.14734 9.96025 1.23322 10.0685 1.34148C10.1768 1.44975 10.2627 1.57827 10.3213 1.71972C10.3798 1.86118 10.41 2.01279 10.41 2.16589C10.41 2.319 10.3798 2.47061 10.3213 2.61206C10.2627 2.75351 10.1768 2.88204 10.0685 2.9903L3.19843 9.86039L1 10.41L1.54961 8.21157L8.4197 1.34148Z", stroke: "white", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })), this.isDesktopScreen && "Write a review", " "))), index.h("div", { class: `sort-wrap ${this.headerType}` }, this.showSort && this.renderSort())));
|
|
133
144
|
}
|
|
134
145
|
renderHeaderFour() {
|
|
135
146
|
return (index.h("div", { class: `header ${this.headerType}` }, index.h("div", { class: `rated-wrap ${this.headerType}` }, index.h("p", { class: "top-title" }, index.h("svg", { class: "star-title", viewBox: "0 0 9 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4.5 0.75L5.65875 3.0975L8.25 3.47625L6.375 5.3025L6.8175 7.8825L4.5 6.66375L2.1825 7.8825L2.625 5.3025L0.75 3.47625L3.34125 3.0975L4.5 0.75Z", fill: "#929EAB", stroke: "#929EAB", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })), "costomer reviews for"), index.h("h3", { class: `rating-title ${this.headerType}` }, this.productTitle), index.h("div", { class: `score ${this.headerType}` }, index.h("covet-pics-star-rating", { rating: this.rating, showLabel: false, starSize: 12, spaceStars: 11, emptyStarColor: "transpotent", starBorderColor: "#fec500", starBorderWidth: 10 }), this.showAverageStarRating &&
|
|
136
|
-
index.h("span", null, index.h("span", { class: `score-number ${this.headerType}` }, this.rating), " ",
|
|
147
|
+
index.h("span", null, index.h("span", { class: `score-number ${this.headerType}` }, this.rating), " ", this.isDesktopScreen && "average rating"), this.showAverageStarRating && index.h("span", { class: "score-slash" }), index.h("span", null, index.h("span", { class: `score-total ${this.headerType} ${!this.showAverageStarRating ? "space-left" : 0}` }, this.ratingCount), " reviews"))), index.h("div", { class: `sort-wrap ${this.headerType}` }, this.showSort && this.renderSort())));
|
|
137
148
|
}
|
|
138
149
|
render() {
|
|
139
150
|
if (this.headerType === "header1")
|
|
@@ -538,6 +549,10 @@ const CovetPicsGalleryItemDetail = class {
|
|
|
538
549
|
this.reviewClass = this.caption !== null && this.itemType === "text" ? "text-review" : "";
|
|
539
550
|
this.starOnlyClass = this.caption === null && this.itemType === "text" ? "star-only" : "";
|
|
540
551
|
this.highlightedClass = this.highlighted ? "highlighted" : "";
|
|
552
|
+
this.appState = this.appStore.getState();
|
|
553
|
+
this.appStore.subscribe(() => {
|
|
554
|
+
this.appState = this.appStore.getState();
|
|
555
|
+
});
|
|
541
556
|
}
|
|
542
557
|
componentDidLoad() {
|
|
543
558
|
window.addEventListener("scroll", this.scrollHandler, { passive: true });
|
|
@@ -552,7 +567,7 @@ const CovetPicsGalleryItemDetail = class {
|
|
|
552
567
|
// return isElInViewport
|
|
553
568
|
// ? this.el.classList.add("in-viewport")
|
|
554
569
|
// : this.el.classList.remove("in-viewport");
|
|
555
|
-
const screenHeight = (
|
|
570
|
+
const screenHeight = (this.appState.size.windowHeight || document.documentElement.clientHeight);
|
|
556
571
|
const isElInViewport = utils.getSize(this.el, "top") >= 0 && utils.getSize(this.el, "top") <= screenHeight / 2;
|
|
557
572
|
const items = Array.from(this.el.parentNode.querySelectorAll(".grid-item"));
|
|
558
573
|
const isLastHighlighted = items.length > 1
|