@content-blocks/js 0.7.6 → 0.8.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/LICENSE +1 -1
- package/README.md +111 -3
- package/THIRD-PARTY-NOTICES.md +21 -0
- package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -2
- package/dist/cjs/content-accordion.cjs.entry.js +87 -0
- package/dist/cjs/content-blocks.cjs.js +35 -11
- package/dist/cjs/content-button.cjs.entry.js +113 -0
- package/dist/cjs/content-carousel.cjs.entry.js +153 -47
- package/dist/cjs/content-grid-formatter.cjs.entry.js +102 -0
- package/dist/cjs/content-hero-block.cjs.entry.js +45 -0
- package/dist/cjs/content-image.cjs.entry.js +153 -0
- package/dist/cjs/content-line.cjs.entry.js +61 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js +51 -34
- package/dist/cjs/content-overlay.cjs.entry.js +641 -0
- package/dist/cjs/content-spacer.cjs.entry.js +75 -0
- package/dist/cjs/content-split-block.cjs.entry.js +22 -19
- package/dist/cjs/content-tabs.cjs.entry.js +38 -21
- package/dist/cjs/content-text-block.cjs.entry.js +63 -0
- package/dist/cjs/content-tout-block.cjs.entry.js +34 -0
- package/dist/cjs/{content-accordion_11.cjs.entry.js → content-video.cjs.entry.js} +14560 -12927
- package/dist/cjs/{focus-trap.esm-7bc384a0.js → focus-trap.esm-ZwN-anf1.js} +484 -190
- package/dist/cjs/{index-2e0ce692.js → index-B1U6Gweq.js} +348 -246
- package/dist/cjs/index-ClnpH9XB.js +2170 -0
- package/dist/cjs/index-CyalvZJn.js +1719 -0
- package/dist/cjs/index-DUvWvBDN.js +290 -0
- package/dist/cjs/index-voGY4Tkl.js +4705 -0
- package/dist/cjs/index.cjs.js +2 -5
- package/dist/cjs/loader.cjs.js +3 -8
- package/dist/cjs/responsive-component-C5eJS82z.js +171 -0
- package/dist/cjs/responsive-component-DMdnQIPV.js +171 -0
- package/dist/cjs/swiper-KLYbvU1K.js +3931 -0
- package/dist/cjs/{swiper-8221f4e8.js → swiper-_Z8Y4IJI.js} +269 -236
- package/dist/cjs/utils-BCHaRGm_.js +462 -0
- package/dist/cjs/{utils-df044337.js → utils-C3gXIS2t.js} +51 -49
- package/dist/cjs/utils-DUvWvBDN.js +290 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +33 -48
- package/dist/collection/blocks/content-split-block/content-split-block.css +16 -5
- package/dist/collection/blocks/content-split-block/content-split-block.js +29 -48
- package/dist/collection/blocks/content-text-block/content-text-block.js +65 -59
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +3 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +22 -47
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/content-accordion/content-accordion.css +20 -1
- package/dist/collection/components/content-accordion/content-accordion.js +67 -33
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +0 -1
- package/dist/collection/components/content-carousel/content-carousel.css +60 -4
- package/dist/collection/components/content-carousel/content-carousel.js +294 -44
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +15 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +86 -42
- package/dist/collection/components/content-overlay/content-overlay.css +36 -5
- package/dist/collection/components/content-overlay/content-overlay.js +181 -120
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js +7 -49
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js +0 -1
- package/dist/collection/elements/content-button/content-button.css +8 -7
- package/dist/collection/elements/content-button/content-button.js +103 -84
- package/dist/collection/elements/content-image/content-image.css +3 -1
- package/dist/collection/elements/content-image/content-image.js +176 -95
- package/dist/collection/elements/content-line/content-line.js +63 -54
- package/dist/collection/elements/content-video/content-video.css +1 -1
- package/dist/collection/elements/content-video/content-video.js +165 -92
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +8 -2
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +167 -89
- package/dist/collection/formatters/content-spacer/content-spacer.js +86 -209
- package/dist/collection/global/content-blocks-reset.css +77 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/sass/_mixins.scss +21 -5
- package/dist/collection/sass/_variables.scss +15 -15
- package/dist/collection/setupFiles.js +0 -1
- package/dist/collection/site/site.js +67 -0
- package/dist/collection/utils/breakpoints.js +162 -0
- package/dist/collection/utils/responsive-component.js +249 -0
- package/dist/collection/utils/utils.js +32 -42
- package/dist/components/content-accordion.js +65 -44
- package/dist/components/content-button.js +89 -43
- package/dist/components/content-carousel.js +172 -55
- package/dist/components/content-grid-formatter.js +127 -3
- package/dist/components/content-hero-block.js +33 -26
- package/dist/components/content-image.js +127 -71
- package/dist/components/content-line.js +56 -35
- package/dist/components/content-navigation-block.js +62 -39
- package/dist/components/content-overlay.js +128 -67
- package/dist/components/content-spacer.js +70 -54
- package/dist/components/content-split-block.js +33 -32
- package/dist/components/content-tabs.js +46 -25
- package/dist/components/content-text-block.js +55 -35
- package/dist/components/content-tout-block.js +29 -27
- package/dist/components/content-video.js +14624 -11972
- package/dist/{esm/focus-trap.esm-8fb54175.js → components/focus-trap.esm.js} +484 -190
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -3
- package/dist/components/{p-5a91aa1b.js → index2.js} +348 -246
- package/dist/components/p-BWRCeMvO.js +1 -0
- package/dist/components/p-CYF5GU_q.js +1 -0
- package/dist/components/p-DXUoPIwl.js +10 -0
- package/dist/components/p-D_Ll4QNj.js +1 -0
- package/dist/components/p-DhIoW7H3.js +1 -0
- package/dist/components/responsive-component.js +168 -0
- package/dist/components/{p-e5dc4ea4.js → swiper.js} +268 -235
- package/dist/components/utils.js +4969 -0
- package/dist/{esm/utils-1c9f0ec1.js → components/utils2.js} +51 -50
- package/dist/content-blocks/content-accordion.entry.js +85 -0
- package/dist/content-blocks/content-blocks.esm.js +47 -2
- package/dist/content-blocks/content-button.entry.js +111 -0
- package/dist/content-blocks/content-carousel.entry.js +188 -0
- package/dist/content-blocks/content-grid-formatter.entry.js +100 -0
- package/dist/content-blocks/content-hero-block.entry.js +43 -0
- package/dist/content-blocks/content-image.entry.js +151 -0
- package/dist/content-blocks/content-line.entry.js +59 -0
- package/dist/content-blocks/content-navigation-block.entry.js +105 -0
- package/dist/content-blocks/content-overlay.entry.js +639 -0
- package/dist/content-blocks/content-spacer.entry.js +73 -0
- package/dist/content-blocks/content-split-block.entry.js +34 -0
- package/dist/content-blocks/content-tabs.entry.js +245 -0
- package/dist/content-blocks/content-text-block.entry.js +61 -0
- package/dist/content-blocks/content-tout-block.entry.js +32 -0
- package/dist/{esm/content-accordion_11.entry.js → content-blocks/content-video.entry.js} +14535 -12890
- package/dist/{components/p-a2fedf8a.js → content-blocks/focus-trap.esm-DXUoPIwl.js} +484 -190
- package/dist/content-blocks/global/content-blocks-reset.css +77 -0
- package/dist/content-blocks/index-BFDJMblF.js +4690 -0
- package/dist/{esm/index-f45a9c45.js → content-blocks/index-P1YnSd-O.js} +348 -246
- package/dist/content-blocks/index.esm.js +1 -2
- package/dist/content-blocks/p-008457f0.entry.js +1 -0
- package/dist/content-blocks/p-052692f1.entry.js +1 -0
- package/dist/content-blocks/p-0f71bd32.entry.js +1 -0
- package/dist/content-blocks/p-1f154617.entry.js +1 -0
- package/dist/content-blocks/p-2554ebd8.entry.js +1 -0
- package/dist/content-blocks/p-4afd6511.entry.js +1 -0
- package/dist/content-blocks/p-78d5de9f.entry.js +1 -0
- package/dist/content-blocks/p-7bcf7e7e.entry.js +1 -0
- package/dist/content-blocks/p-9058031c.entry.js +1 -0
- package/dist/content-blocks/p-9c41ac23.entry.js +17 -0
- package/dist/content-blocks/p-CLwOzPEO.js +3 -0
- package/dist/content-blocks/p-CYF5GU_q.js +1 -0
- package/dist/content-blocks/p-CjR_4mPu.js +1 -0
- package/dist/content-blocks/p-DQuL1Twl.js +1 -0
- package/dist/content-blocks/p-DXUoPIwl.js +10 -0
- package/dist/content-blocks/p-D_Ll4QNj.js +1 -0
- package/dist/content-blocks/p-DhIoW7H3.js +1 -0
- package/dist/content-blocks/p-DzYwy_62.js +1 -0
- package/dist/content-blocks/p-b2e6358a.entry.js +1 -0
- package/dist/content-blocks/p-c783bc68.entry.js +1 -0
- package/dist/content-blocks/p-e3d81e15.entry.js +1 -0
- package/dist/content-blocks/p-f23b4aae.entry.js +1 -0
- package/dist/content-blocks/p-f75c9094.entry.js +1 -0
- package/dist/content-blocks/responsive-component-BsLrcKbS.js +169 -0
- package/dist/content-blocks/sass/_mixins.scss +21 -5
- package/dist/content-blocks/sass/_variables.scss +15 -15
- package/dist/{esm/swiper-e9621adb.js → content-blocks/swiper-nBv069TB.js} +268 -235
- package/dist/{components/p-b85cfa86.js → content-blocks/utils--SDsQnWS.js} +51 -50
- package/dist/content-blocks/utils-Bak__24s.js +280 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +5312 -0
- package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -2
- package/dist/esm/content-accordion.entry.js +85 -0
- package/dist/esm/content-blocks.js +33 -8
- package/dist/esm/content-button.entry.js +111 -0
- package/dist/esm/content-carousel.entry.js +153 -45
- package/dist/esm/content-grid-formatter.entry.js +100 -0
- package/dist/esm/content-hero-block.entry.js +43 -0
- package/dist/esm/content-image.entry.js +151 -0
- package/dist/esm/content-line.entry.js +59 -0
- package/dist/esm/content-navigation-block.entry.js +51 -32
- package/dist/esm/content-overlay.entry.js +639 -0
- package/dist/esm/content-spacer.entry.js +73 -0
- package/dist/esm/content-split-block.entry.js +22 -17
- package/dist/esm/content-tabs.entry.js +38 -19
- package/dist/esm/content-text-block.entry.js +61 -0
- package/dist/esm/content-tout-block.entry.js +32 -0
- package/dist/esm/content-video.entry.js +72033 -0
- package/dist/esm/focus-trap.esm-DXUoPIwl.js +1801 -0
- package/dist/esm/index-BASCLGuP.js +1713 -0
- package/dist/esm/index-BFDJMblF.js +4690 -0
- package/dist/esm/index-CLwOzPEO.js +2161 -0
- package/dist/esm/index-CjR_4mPu.js +280 -0
- package/dist/esm/index-P1YnSd-O.js +5397 -0
- package/dist/esm/index.js +1 -3
- package/dist/esm/loader.js +3 -6
- package/dist/esm/responsive-component-BsLrcKbS.js +169 -0
- package/dist/esm/responsive-component-D7dJHMp0.js +169 -0
- package/dist/esm/swiper-CtypHPwF.js +3928 -0
- package/dist/esm/swiper-nBv069TB.js +3941 -0
- package/dist/esm/utils--SDsQnWS.js +460 -0
- package/dist/esm/utils-Bak__24s.js +280 -0
- package/dist/esm/utils-CYF5GU_q.js +438 -0
- package/dist/node_modules/video.js/dist/video-js.min.css +1 -0
- package/dist/test/axe.js +60 -0
- package/dist/types/Users/shahrukceo/Developer/content-blocks/packages/js/.stencil/test/axe.d.ts +16 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +7 -11
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +5 -9
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +4 -9
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +5 -10
- package/dist/types/components/content-accordion/content-accordion.d.ts +4 -3
- package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +0 -1
- package/dist/types/components/content-carousel/content-carousel.d.ts +44 -7
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +14 -8
- package/dist/types/components/content-overlay/content-overlay.d.ts +15 -16
- package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +0 -1
- package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +0 -1
- package/dist/types/components/content-tabs/content-tabs.d.ts +4 -10
- package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +0 -1
- package/dist/types/components.d.ts +900 -196
- package/dist/types/elements/content-button/content-button.d.ts +8 -13
- package/dist/types/elements/content-image/content-image.d.ts +15 -9
- package/dist/types/elements/content-line/content-line.d.ts +5 -12
- package/dist/types/elements/content-video/content-video.d.ts +12 -11
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +14 -9
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +4 -36
- package/dist/types/index.d.ts +3 -1
- package/dist/types/setupFiles.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +265 -60
- package/dist/types/typings.d.ts +10 -0
- package/dist/types/utils/breakpoints.d.ts +57 -0
- package/dist/types/utils/responsive-component.d.ts +49 -0
- package/dist/types/utils/utils.d.ts +11 -8
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +75 -65
- package/dist/cjs/BehaviorSubject-12116537.js +0 -655
- package/dist/cjs/BehaviorSubject-12116537.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +0 -1
- package/dist/cjs/content-blocks.cjs.js.map +0 -1
- package/dist/cjs/content-carousel.cjs.entry.js.map +0 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-split-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/focus-trap.esm-7bc384a0.js.map +0 -1
- package/dist/cjs/index-2e0ce692.js.map +0 -1
- package/dist/cjs/index-8af2820a.js +0 -1650
- package/dist/cjs/index-8af2820a.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/swiper-8221f4e8.js.map +0 -1
- package/dist/cjs/utils-df044337.js.map +0 -1
- package/dist/cjs/utils-f8ccab0a.js +0 -126
- package/dist/cjs/utils-f8ccab0a.js.map +0 -1
- package/dist/cjs/window-resize-service-65a5a370.js +0 -37
- package/dist/cjs/window-resize-service-65a5a370.js.map +0 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +0 -1
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +0 -1
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +0 -1
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +0 -1
- package/dist/collection/components/content-accordion/content-accordion.js.map +0 -1
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +0 -1
- package/dist/collection/components/content-carousel/content-carousel.js.map +0 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +0 -1
- package/dist/collection/components/content-overlay/content-overlay.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js.map +0 -1
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +0 -1
- package/dist/collection/elements/content-button/content-button.js.map +0 -1
- package/dist/collection/elements/content-image/content-image.js.map +0 -1
- package/dist/collection/elements/content-line/content-line.js.map +0 -1
- package/dist/collection/elements/content-video/content-video.js.map +0 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +0 -1
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +0 -1
- package/dist/collection/globalScript.js +0 -15
- package/dist/collection/globalScript.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/services/content-events-service.js +0 -23
- package/dist/collection/services/content-events-service.js.map +0 -1
- package/dist/collection/services/window-resize-service.js +0 -31
- package/dist/collection/services/window-resize-service.js.map +0 -1
- package/dist/collection/setupFiles.js.map +0 -1
- package/dist/collection/stories/ContentHeroBlock.stories.js +0 -51
- package/dist/collection/stories/ContentHeroBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentNavigationBlock.stories.js +0 -33
- package/dist/collection/stories/ContentNavigationBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentSpacer.stories.js +0 -20
- package/dist/collection/stories/ContentSpacer.stories.js.map +0 -1
- package/dist/collection/stories/ContentTextBlock.stories.js +0 -17
- package/dist/collection/stories/ContentTextBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentToutBlock.stories.js +0 -17
- package/dist/collection/stories/ContentToutBlock.stories.js.map +0 -1
- package/dist/collection/stories/FullPageExample.stories.js +0 -432
- package/dist/collection/stories/FullPageExample.stories.js.map +0 -1
- package/dist/collection/stories/assets/accessibility.svg +0 -5
- package/dist/collection/stories/assets/discord.svg +0 -15
- package/dist/collection/stories/assets/github.svg +0 -3
- package/dist/collection/stories/assets/tutorials.svg +0 -12
- package/dist/collection/stories/assets/youtube.svg +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/content-accordion.js.map +0 -1
- package/dist/components/content-button.js.map +0 -1
- package/dist/components/content-carousel.js.map +0 -1
- package/dist/components/content-grid-formatter.js.map +0 -1
- package/dist/components/content-hero-block.js.map +0 -1
- package/dist/components/content-image.js.map +0 -1
- package/dist/components/content-line.js.map +0 -1
- package/dist/components/content-navigation-block.js.map +0 -1
- package/dist/components/content-overlay.js.map +0 -1
- package/dist/components/content-spacer.js.map +0 -1
- package/dist/components/content-split-block.js.map +0 -1
- package/dist/components/content-tabs.js.map +0 -1
- package/dist/components/content-text-block.js.map +0 -1
- package/dist/components/content-tout-block.js.map +0 -1
- package/dist/components/content-video.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-26483b46.js +0 -35
- package/dist/components/p-26483b46.js.map +0 -1
- package/dist/components/p-5a91aa1b.js.map +0 -1
- package/dist/components/p-74be971f.js +0 -652
- package/dist/components/p-74be971f.js.map +0 -1
- package/dist/components/p-7a436263.js +0 -122
- package/dist/components/p-7a436263.js.map +0 -1
- package/dist/components/p-a2fedf8a.js.map +0 -1
- package/dist/components/p-b85cfa86.js.map +0 -1
- package/dist/components/p-e28db040.js +0 -1452
- package/dist/components/p-e28db040.js.map +0 -1
- package/dist/components/p-e5dc4ea4.js.map +0 -1
- package/dist/components/p-e9bce2ab.js +0 -88
- package/dist/components/p-e9bce2ab.js.map +0 -1
- package/dist/content-blocks/content-blocks.esm.js.map +0 -1
- package/dist/content-blocks/index.esm.js.map +0 -1
- package/dist/content-blocks/p-13c3cc4f.js +0 -3
- package/dist/content-blocks/p-13c3cc4f.js.map +0 -1
- package/dist/content-blocks/p-5422c25b.entry.js +0 -2
- package/dist/content-blocks/p-5422c25b.entry.js.map +0 -1
- package/dist/content-blocks/p-5a91aa1b.js +0 -2
- package/dist/content-blocks/p-5a91aa1b.js.map +0 -1
- package/dist/content-blocks/p-650d1757.js +0 -2
- package/dist/content-blocks/p-650d1757.js.map +0 -1
- package/dist/content-blocks/p-74be971f.js +0 -2
- package/dist/content-blocks/p-74be971f.js.map +0 -1
- package/dist/content-blocks/p-8deb755c.entry.js +0 -26
- package/dist/content-blocks/p-8deb755c.entry.js.map +0 -1
- package/dist/content-blocks/p-a2fedf8a.js +0 -10
- package/dist/content-blocks/p-a2fedf8a.js.map +0 -1
- package/dist/content-blocks/p-b305392e.entry.js +0 -2
- package/dist/content-blocks/p-b305392e.entry.js.map +0 -1
- package/dist/content-blocks/p-b85cfa86.js +0 -2
- package/dist/content-blocks/p-b85cfa86.js.map +0 -1
- package/dist/content-blocks/p-cc7397cf.js +0 -2
- package/dist/content-blocks/p-cc7397cf.js.map +0 -1
- package/dist/content-blocks/p-d62775d7.entry.js +0 -2
- package/dist/content-blocks/p-d62775d7.entry.js.map +0 -1
- package/dist/content-blocks/p-e1255160.js +0 -2
- package/dist/content-blocks/p-e1255160.js.map +0 -1
- package/dist/content-blocks/p-e5dc4ea4.js +0 -2
- package/dist/content-blocks/p-e5dc4ea4.js.map +0 -1
- package/dist/content-blocks/p-f73f934a.entry.js +0 -2
- package/dist/content-blocks/p-f73f934a.entry.js.map +0 -1
- package/dist/esm/BehaviorSubject-f7a12fd8.js +0 -652
- package/dist/esm/BehaviorSubject-f7a12fd8.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/content-accordion_11.entry.js.map +0 -1
- package/dist/esm/content-blocks.js.map +0 -1
- package/dist/esm/content-carousel.entry.js.map +0 -1
- package/dist/esm/content-navigation-block.entry.js.map +0 -1
- package/dist/esm/content-split-block.entry.js.map +0 -1
- package/dist/esm/content-tabs.entry.js.map +0 -1
- package/dist/esm/focus-trap.esm-8fb54175.js.map +0 -1
- package/dist/esm/index-ec24af7a.js +0 -1621
- package/dist/esm/index-ec24af7a.js.map +0 -1
- package/dist/esm/index-f45a9c45.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/swiper-e9621adb.js.map +0 -1
- package/dist/esm/utils-1c9f0ec1.js.map +0 -1
- package/dist/esm/utils-9a901aa9.js +0 -122
- package/dist/esm/utils-9a901aa9.js.map +0 -1
- package/dist/esm/window-resize-service-354f2ac5.js +0 -35
- package/dist/esm/window-resize-service-354f2ac5.js.map +0 -1
- package/dist/types/globalScript.d.ts +0 -1
- package/dist/types/old-components.d.ts +0 -1239
- package/dist/types/services/content-events-service.d.ts +0 -11
- package/dist/types/services/window-resize-service.d.ts +0 -11
- package/dist/types/stories/ContentHeroBlock.stories.d.ts +0 -11
- package/dist/types/stories/ContentNavigationBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentSpacer.stories.d.ts +0 -15
- package/dist/types/stories/ContentTextBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentToutBlock.stories.d.ts +0 -9
- package/dist/types/stories/FullPageExample.stories.d.ts +0 -10
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var utils = require('./utils-C3gXIS2t.js');
|
|
4
4
|
|
|
5
|
-
function Virtual(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
5
|
+
function Virtual({
|
|
6
|
+
swiper,
|
|
7
|
+
extendParams,
|
|
8
|
+
on,
|
|
9
|
+
emit
|
|
10
|
+
}) {
|
|
12
11
|
extendParams({
|
|
13
12
|
virtual: {
|
|
14
13
|
enabled: false,
|
|
15
14
|
slides: [],
|
|
16
15
|
cache: true,
|
|
16
|
+
slidesPerViewAutoSlideSize: 320,
|
|
17
17
|
renderSlide: null,
|
|
18
18
|
renderExternal: null,
|
|
19
19
|
renderExternalUpdate: true,
|
|
@@ -42,7 +42,7 @@ function Virtual(_ref) {
|
|
|
42
42
|
if (params.renderSlide) {
|
|
43
43
|
slideEl = params.renderSlide.call(swiper, slide, index);
|
|
44
44
|
if (typeof slideEl === 'string') {
|
|
45
|
-
tempDOM
|
|
45
|
+
utils.setInnerHTML(tempDOM, slideEl);
|
|
46
46
|
slideEl = tempDOM.children[0];
|
|
47
47
|
}
|
|
48
48
|
} else if (swiper.isElement) {
|
|
@@ -52,18 +52,18 @@ function Virtual(_ref) {
|
|
|
52
52
|
}
|
|
53
53
|
slideEl.setAttribute('data-swiper-slide-index', index);
|
|
54
54
|
if (!params.renderSlide) {
|
|
55
|
-
slideEl
|
|
55
|
+
utils.setInnerHTML(slideEl, slide);
|
|
56
56
|
}
|
|
57
57
|
if (params.cache) {
|
|
58
58
|
swiper.virtual.cache[index] = slideEl;
|
|
59
59
|
}
|
|
60
60
|
return slideEl;
|
|
61
61
|
}
|
|
62
|
-
function update(force, beforeInit) {
|
|
62
|
+
function update(force, beforeInit, forceActiveIndex) {
|
|
63
63
|
const {
|
|
64
|
-
slidesPerView,
|
|
65
64
|
slidesPerGroup,
|
|
66
65
|
centeredSlides,
|
|
66
|
+
slidesPerView,
|
|
67
67
|
loop: isLoop,
|
|
68
68
|
initialSlide
|
|
69
69
|
} = swiper.params;
|
|
@@ -72,7 +72,8 @@ function Virtual(_ref) {
|
|
|
72
72
|
}
|
|
73
73
|
const {
|
|
74
74
|
addSlidesBefore,
|
|
75
|
-
addSlidesAfter
|
|
75
|
+
addSlidesAfter,
|
|
76
|
+
slidesPerViewAutoSlideSize
|
|
76
77
|
} = swiper.params.virtual;
|
|
77
78
|
const {
|
|
78
79
|
from: previousFrom,
|
|
@@ -84,17 +85,31 @@ function Virtual(_ref) {
|
|
|
84
85
|
if (!swiper.params.cssMode) {
|
|
85
86
|
swiper.updateActiveIndex();
|
|
86
87
|
}
|
|
87
|
-
const activeIndex = swiper.activeIndex || 0;
|
|
88
|
+
const activeIndex = typeof forceActiveIndex === 'undefined' ? swiper.activeIndex || 0 : forceActiveIndex;
|
|
88
89
|
let offsetProp;
|
|
89
90
|
if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
|
|
91
|
+
let slidesPerViewNumeric;
|
|
92
|
+
if (slidesPerView === 'auto') {
|
|
93
|
+
if (slidesPerViewAutoSlideSize) {
|
|
94
|
+
let swiperSize = swiper.size;
|
|
95
|
+
if (!swiperSize) {
|
|
96
|
+
swiperSize = swiper.isHorizontal() ? swiper.el.getBoundingClientRect().width : swiper.el.getBoundingClientRect().height;
|
|
97
|
+
}
|
|
98
|
+
slidesPerViewNumeric = Math.max(1, Math.ceil(swiperSize / slidesPerViewAutoSlideSize));
|
|
99
|
+
} else {
|
|
100
|
+
slidesPerViewNumeric = 1;
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
slidesPerViewNumeric = slidesPerView;
|
|
104
|
+
}
|
|
90
105
|
let slidesAfter;
|
|
91
106
|
let slidesBefore;
|
|
92
107
|
if (centeredSlides) {
|
|
93
|
-
slidesAfter = Math.floor(
|
|
94
|
-
slidesBefore = Math.floor(
|
|
108
|
+
slidesAfter = Math.floor(slidesPerViewNumeric / 2) + slidesPerGroup + addSlidesAfter;
|
|
109
|
+
slidesBefore = Math.floor(slidesPerViewNumeric / 2) + slidesPerGroup + addSlidesBefore;
|
|
95
110
|
} else {
|
|
96
|
-
slidesAfter =
|
|
97
|
-
slidesBefore = (isLoop ?
|
|
111
|
+
slidesAfter = slidesPerViewNumeric + (slidesPerGroup - 1) + addSlidesAfter;
|
|
112
|
+
slidesBefore = (isLoop ? slidesPerViewNumeric : slidesPerGroup) + addSlidesBefore;
|
|
98
113
|
}
|
|
99
114
|
let from = activeIndex - slidesBefore;
|
|
100
115
|
let to = activeIndex + slidesAfter;
|
|
@@ -348,13 +363,12 @@ function Virtual(_ref) {
|
|
|
348
363
|
}
|
|
349
364
|
|
|
350
365
|
/* eslint-disable consistent-return */
|
|
351
|
-
function Keyboard(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
} = _ref;
|
|
366
|
+
function Keyboard({
|
|
367
|
+
swiper,
|
|
368
|
+
extendParams,
|
|
369
|
+
on,
|
|
370
|
+
emit
|
|
371
|
+
}) {
|
|
358
372
|
const document = utils.getDocument();
|
|
359
373
|
const window = utils.getWindow();
|
|
360
374
|
swiper.keyboard = {
|
|
@@ -364,7 +378,8 @@ function Keyboard(_ref) {
|
|
|
364
378
|
keyboard: {
|
|
365
379
|
enabled: false,
|
|
366
380
|
onlyInViewport: true,
|
|
367
|
-
pageUpDown: true
|
|
381
|
+
pageUpDown: true,
|
|
382
|
+
speed: undefined
|
|
368
383
|
}
|
|
369
384
|
});
|
|
370
385
|
function handle(event) {
|
|
@@ -392,7 +407,7 @@ function Keyboard(_ref) {
|
|
|
392
407
|
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
|
393
408
|
return undefined;
|
|
394
409
|
}
|
|
395
|
-
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
|
410
|
+
if (document.activeElement && (document.activeElement.isContentEditable || document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea'))) {
|
|
396
411
|
return undefined;
|
|
397
412
|
}
|
|
398
413
|
if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {
|
|
@@ -418,18 +433,19 @@ function Keyboard(_ref) {
|
|
|
418
433
|
}
|
|
419
434
|
if (!inView) return undefined;
|
|
420
435
|
}
|
|
436
|
+
const speed = swiper.params.keyboard.speed;
|
|
421
437
|
if (swiper.isHorizontal()) {
|
|
422
438
|
if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {
|
|
423
439
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
424
440
|
}
|
|
425
|
-
if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();
|
|
426
|
-
if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();
|
|
441
|
+
if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(speed);
|
|
442
|
+
if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(speed);
|
|
427
443
|
} else {
|
|
428
444
|
if (isPageUp || isPageDown || isArrowUp || isArrowDown) {
|
|
429
445
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
430
446
|
}
|
|
431
|
-
if (isPageDown || isArrowDown) swiper.slideNext();
|
|
432
|
-
if (isPageUp || isArrowUp) swiper.slidePrev();
|
|
447
|
+
if (isPageDown || isArrowDown) swiper.slideNext(speed);
|
|
448
|
+
if (isPageUp || isArrowUp) swiper.slidePrev(speed);
|
|
433
449
|
}
|
|
434
450
|
emit('keyPress', kc);
|
|
435
451
|
return undefined;
|
|
@@ -461,13 +477,12 @@ function Keyboard(_ref) {
|
|
|
461
477
|
}
|
|
462
478
|
|
|
463
479
|
/* eslint-disable consistent-return */
|
|
464
|
-
function Mousewheel(
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
} = _ref;
|
|
480
|
+
function Mousewheel({
|
|
481
|
+
swiper,
|
|
482
|
+
extendParams,
|
|
483
|
+
on,
|
|
484
|
+
emit
|
|
485
|
+
}) {
|
|
471
486
|
const window = utils.getWindow();
|
|
472
487
|
extendParams({
|
|
473
488
|
mousewheel: {
|
|
@@ -794,7 +809,7 @@ function Mousewheel(_ref) {
|
|
|
794
809
|
if (!ignoreWheelEvents) emit('scroll', e);
|
|
795
810
|
|
|
796
811
|
// Stop autoplay
|
|
797
|
-
if (swiper.params.autoplay && swiper.params.
|
|
812
|
+
if (swiper.params.autoplay && swiper.params.autoplay.disableOnInteraction) swiper.autoplay.stop();
|
|
798
813
|
// Return page scroll on edge positions
|
|
799
814
|
if (params.releaseOnEdges && (position === swiper.minTranslate() || position === swiper.maxTranslate())) {
|
|
800
815
|
return true;
|
|
@@ -869,17 +884,18 @@ function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
|
|
|
869
884
|
return params;
|
|
870
885
|
}
|
|
871
886
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
887
|
+
const arrowSvg = `<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>`;
|
|
888
|
+
function Navigation({
|
|
889
|
+
swiper,
|
|
890
|
+
extendParams,
|
|
891
|
+
on,
|
|
892
|
+
emit
|
|
893
|
+
}) {
|
|
879
894
|
extendParams({
|
|
880
895
|
navigation: {
|
|
881
896
|
nextEl: null,
|
|
882
897
|
prevEl: null,
|
|
898
|
+
addIcons: true,
|
|
883
899
|
hideOnClick: false,
|
|
884
900
|
disabledClass: 'swiper-button-disabled',
|
|
885
901
|
hiddenClass: 'swiper-button-hidden',
|
|
@@ -889,12 +905,13 @@ function Navigation(_ref) {
|
|
|
889
905
|
});
|
|
890
906
|
swiper.navigation = {
|
|
891
907
|
nextEl: null,
|
|
892
|
-
prevEl: null
|
|
908
|
+
prevEl: null,
|
|
909
|
+
arrowSvg
|
|
893
910
|
};
|
|
894
911
|
function getEl(el) {
|
|
895
912
|
let res;
|
|
896
913
|
if (el && typeof el === 'string' && swiper.isElement) {
|
|
897
|
-
res = swiper.el.querySelector(el);
|
|
914
|
+
res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el);
|
|
898
915
|
if (res) return res;
|
|
899
916
|
}
|
|
900
917
|
if (el) {
|
|
@@ -965,6 +982,12 @@ function Navigation(_ref) {
|
|
|
965
982
|
prevEl = utils.makeElementsArray(prevEl);
|
|
966
983
|
const initButton = (el, dir) => {
|
|
967
984
|
if (el) {
|
|
985
|
+
if (params.addIcons && el.matches('.swiper-button-next,.swiper-button-prev') && !el.querySelector('svg')) {
|
|
986
|
+
const tempEl = document.createElement('div');
|
|
987
|
+
utils.setInnerHTML(tempEl, arrowSvg);
|
|
988
|
+
el.appendChild(tempEl.querySelector('svg'));
|
|
989
|
+
tempEl.remove();
|
|
990
|
+
}
|
|
968
991
|
el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
969
992
|
}
|
|
970
993
|
if (!swiper.enabled && el) {
|
|
@@ -1065,21 +1088,18 @@ function Navigation(_ref) {
|
|
|
1065
1088
|
});
|
|
1066
1089
|
}
|
|
1067
1090
|
|
|
1068
|
-
function classesToSelector(classes) {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
}
|
|
1072
|
-
return `.${classes.trim().replace(/([\.:!+\/])/g, '\\$1') // eslint-disable-line
|
|
1091
|
+
function classesToSelector(classes = '') {
|
|
1092
|
+
// Escape all CSS selector special characters
|
|
1093
|
+
return `.${classes.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g, '\\$1') // eslint-disable-line
|
|
1073
1094
|
.replace(/ /g, '.')}`;
|
|
1074
1095
|
}
|
|
1075
1096
|
|
|
1076
|
-
function Pagination(
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
} = _ref;
|
|
1097
|
+
function Pagination({
|
|
1098
|
+
swiper,
|
|
1099
|
+
extendParams,
|
|
1100
|
+
on,
|
|
1101
|
+
emit
|
|
1102
|
+
}) {
|
|
1083
1103
|
const pfx = 'swiper-pagination';
|
|
1084
1104
|
extendParams({
|
|
1085
1105
|
pagination: {
|
|
@@ -1297,7 +1317,7 @@ function Pagination(_ref) {
|
|
|
1297
1317
|
});
|
|
1298
1318
|
}
|
|
1299
1319
|
if (params.type === 'custom' && params.renderCustom) {
|
|
1300
|
-
subEl
|
|
1320
|
+
utils.setInnerHTML(subEl, params.renderCustom(swiper, current + 1, total));
|
|
1301
1321
|
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
1302
1322
|
} else {
|
|
1303
1323
|
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
@@ -1347,7 +1367,7 @@ function Pagination(_ref) {
|
|
|
1347
1367
|
swiper.pagination.bullets = [];
|
|
1348
1368
|
el.forEach(subEl => {
|
|
1349
1369
|
if (params.type !== 'custom') {
|
|
1350
|
-
subEl
|
|
1370
|
+
utils.setInnerHTML(subEl, paginationHTML || '');
|
|
1351
1371
|
}
|
|
1352
1372
|
if (params.type === 'bullets') {
|
|
1353
1373
|
swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));
|
|
@@ -1378,10 +1398,10 @@ function Pagination(_ref) {
|
|
|
1378
1398
|
el = [...swiper.el.querySelectorAll(params.el)];
|
|
1379
1399
|
// check if it belongs to another nested Swiper
|
|
1380
1400
|
if (el.length > 1) {
|
|
1381
|
-
el = el.
|
|
1401
|
+
el = el.find(subEl => {
|
|
1382
1402
|
if (utils.elementParents(subEl, '.swiper')[0] !== swiper.el) return false;
|
|
1383
1403
|
return true;
|
|
1384
|
-
})
|
|
1404
|
+
});
|
|
1385
1405
|
}
|
|
1386
1406
|
}
|
|
1387
1407
|
if (Array.isArray(el) && el.length === 1) el = el[0];
|
|
@@ -1528,13 +1548,12 @@ function Pagination(_ref) {
|
|
|
1528
1548
|
});
|
|
1529
1549
|
}
|
|
1530
1550
|
|
|
1531
|
-
function Scrollbar(
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
} = _ref;
|
|
1551
|
+
function Scrollbar({
|
|
1552
|
+
swiper,
|
|
1553
|
+
extendParams,
|
|
1554
|
+
on,
|
|
1555
|
+
emit
|
|
1556
|
+
}) {
|
|
1538
1557
|
const document = utils.getDocument();
|
|
1539
1558
|
let isTouched = false;
|
|
1540
1559
|
let timeout = null;
|
|
@@ -1888,12 +1907,11 @@ function Scrollbar(_ref) {
|
|
|
1888
1907
|
});
|
|
1889
1908
|
}
|
|
1890
1909
|
|
|
1891
|
-
function Parallax(
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
} = _ref;
|
|
1910
|
+
function Parallax({
|
|
1911
|
+
swiper,
|
|
1912
|
+
extendParams,
|
|
1913
|
+
on
|
|
1914
|
+
}) {
|
|
1897
1915
|
extendParams({
|
|
1898
1916
|
parallax: {
|
|
1899
1917
|
enabled: false
|
|
@@ -1972,10 +1990,7 @@ function Parallax(_ref) {
|
|
|
1972
1990
|
});
|
|
1973
1991
|
});
|
|
1974
1992
|
};
|
|
1975
|
-
const setTransition =
|
|
1976
|
-
if (duration === void 0) {
|
|
1977
|
-
duration = swiper.params.speed;
|
|
1978
|
-
}
|
|
1993
|
+
const setTransition = (duration = swiper.params.speed) => {
|
|
1979
1994
|
const {
|
|
1980
1995
|
el,
|
|
1981
1996
|
hostEl
|
|
@@ -2009,13 +2024,12 @@ function Parallax(_ref) {
|
|
|
2009
2024
|
});
|
|
2010
2025
|
}
|
|
2011
2026
|
|
|
2012
|
-
function Zoom(
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
} = _ref;
|
|
2027
|
+
function Zoom({
|
|
2028
|
+
swiper,
|
|
2029
|
+
extendParams,
|
|
2030
|
+
on,
|
|
2031
|
+
emit
|
|
2032
|
+
}) {
|
|
2019
2033
|
const window = utils.getWindow();
|
|
2020
2034
|
extendParams({
|
|
2021
2035
|
zoom: {
|
|
@@ -2023,6 +2037,7 @@ function Zoom(_ref) {
|
|
|
2023
2037
|
limitToOriginalSize: false,
|
|
2024
2038
|
maxRatio: 3,
|
|
2025
2039
|
minRatio: 1,
|
|
2040
|
+
panOnMouseMove: false,
|
|
2026
2041
|
toggle: true,
|
|
2027
2042
|
containerClass: 'swiper-zoom-container',
|
|
2028
2043
|
zoomedSlideClass: 'swiper-slide-zoomed'
|
|
@@ -2033,6 +2048,12 @@ function Zoom(_ref) {
|
|
|
2033
2048
|
};
|
|
2034
2049
|
let currentScale = 1;
|
|
2035
2050
|
let isScaling = false;
|
|
2051
|
+
let isPanningWithMouse = false;
|
|
2052
|
+
let mousePanStart = {
|
|
2053
|
+
x: 0,
|
|
2054
|
+
y: 0
|
|
2055
|
+
};
|
|
2056
|
+
const mousePanSensitivity = -3; // Negative to invert pan direction
|
|
2036
2057
|
let fakeGestureTouched;
|
|
2037
2058
|
let fakeGestureMoved;
|
|
2038
2059
|
const evCache = [];
|
|
@@ -2227,6 +2248,7 @@ function Zoom(_ref) {
|
|
|
2227
2248
|
clearTimeout(allowTouchMoveTimeout);
|
|
2228
2249
|
swiper.touchEventsData.preventTouchMoveFromPointerMove = true;
|
|
2229
2250
|
allowTouchMoveTimeout = setTimeout(() => {
|
|
2251
|
+
if (swiper.destroyed) return;
|
|
2230
2252
|
allowTouchMove();
|
|
2231
2253
|
});
|
|
2232
2254
|
}
|
|
@@ -2241,6 +2263,8 @@ function Zoom(_ref) {
|
|
|
2241
2263
|
image.touchesStart.y = event.pageY;
|
|
2242
2264
|
}
|
|
2243
2265
|
function onTouchMove(e) {
|
|
2266
|
+
const isMouseEvent = e.pointerType === 'mouse';
|
|
2267
|
+
const isMousePan = isMouseEvent && swiper.params.zoom.panOnMouseMove;
|
|
2244
2268
|
if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) {
|
|
2245
2269
|
return;
|
|
2246
2270
|
}
|
|
@@ -2249,6 +2273,11 @@ function Zoom(_ref) {
|
|
|
2249
2273
|
return;
|
|
2250
2274
|
}
|
|
2251
2275
|
if (!image.isTouched || !gesture.slideEl) {
|
|
2276
|
+
if (isMousePan) onMouseMove(e);
|
|
2277
|
+
return;
|
|
2278
|
+
}
|
|
2279
|
+
if (isMousePan) {
|
|
2280
|
+
onMouseMove(e);
|
|
2252
2281
|
return;
|
|
2253
2282
|
}
|
|
2254
2283
|
if (!image.isMoved) {
|
|
@@ -2326,6 +2355,7 @@ function Zoom(_ref) {
|
|
|
2326
2355
|
}
|
|
2327
2356
|
function onTouchEnd() {
|
|
2328
2357
|
const zoom = swiper.zoom;
|
|
2358
|
+
evCache.length = 0;
|
|
2329
2359
|
if (!gesture.imageEl) return;
|
|
2330
2360
|
if (!image.isTouched || !image.isMoved) {
|
|
2331
2361
|
image.isTouched = false;
|
|
@@ -2378,6 +2408,45 @@ function Zoom(_ref) {
|
|
|
2378
2408
|
gesture.originY = 0;
|
|
2379
2409
|
}
|
|
2380
2410
|
}
|
|
2411
|
+
function onMouseMove(e) {
|
|
2412
|
+
// Only pan if zoomed in and mouse panning is enabled
|
|
2413
|
+
if (currentScale <= 1 || !gesture.imageWrapEl) return;
|
|
2414
|
+
if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) return;
|
|
2415
|
+
const currentTransform = window.getComputedStyle(gesture.imageWrapEl).transform;
|
|
2416
|
+
const matrix = new window.DOMMatrix(currentTransform);
|
|
2417
|
+
if (!isPanningWithMouse) {
|
|
2418
|
+
isPanningWithMouse = true;
|
|
2419
|
+
mousePanStart.x = e.clientX;
|
|
2420
|
+
mousePanStart.y = e.clientY;
|
|
2421
|
+
image.startX = matrix.e;
|
|
2422
|
+
image.startY = matrix.f;
|
|
2423
|
+
image.width = gesture.imageEl.offsetWidth || gesture.imageEl.clientWidth;
|
|
2424
|
+
image.height = gesture.imageEl.offsetHeight || gesture.imageEl.clientHeight;
|
|
2425
|
+
gesture.slideWidth = gesture.slideEl.offsetWidth;
|
|
2426
|
+
gesture.slideHeight = gesture.slideEl.offsetHeight;
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
const deltaX = (e.clientX - mousePanStart.x) * mousePanSensitivity;
|
|
2430
|
+
const deltaY = (e.clientY - mousePanStart.y) * mousePanSensitivity;
|
|
2431
|
+
const scaledWidth = image.width * currentScale;
|
|
2432
|
+
const scaledHeight = image.height * currentScale;
|
|
2433
|
+
const slideWidth = gesture.slideWidth;
|
|
2434
|
+
const slideHeight = gesture.slideHeight;
|
|
2435
|
+
const minX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);
|
|
2436
|
+
const maxX = -minX;
|
|
2437
|
+
const minY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);
|
|
2438
|
+
const maxY = -minY;
|
|
2439
|
+
const newX = Math.max(Math.min(image.startX + deltaX, maxX), minX);
|
|
2440
|
+
const newY = Math.max(Math.min(image.startY + deltaY, maxY), minY);
|
|
2441
|
+
gesture.imageWrapEl.style.transitionDuration = '0ms';
|
|
2442
|
+
gesture.imageWrapEl.style.transform = `translate3d(${newX}px, ${newY}px, 0)`;
|
|
2443
|
+
mousePanStart.x = e.clientX;
|
|
2444
|
+
mousePanStart.y = e.clientY;
|
|
2445
|
+
image.startX = newX;
|
|
2446
|
+
image.startY = newY;
|
|
2447
|
+
image.currentX = newX;
|
|
2448
|
+
image.currentY = newY;
|
|
2449
|
+
}
|
|
2381
2450
|
function zoomIn(e) {
|
|
2382
2451
|
const zoom = swiper.zoom;
|
|
2383
2452
|
const params = swiper.params.zoom;
|
|
@@ -2404,6 +2473,7 @@ function Zoom(_ref) {
|
|
|
2404
2473
|
}
|
|
2405
2474
|
}
|
|
2406
2475
|
if (!gesture.imageEl || !gesture.imageWrapEl) return;
|
|
2476
|
+
gesture.maxRatio = getMaxRatio();
|
|
2407
2477
|
if (swiper.params.cssMode) {
|
|
2408
2478
|
swiper.wrapperEl.style.overflow = 'hidden';
|
|
2409
2479
|
swiper.wrapperEl.style.touchAction = 'none';
|
|
@@ -2434,6 +2504,7 @@ function Zoom(_ref) {
|
|
|
2434
2504
|
touchX = image.touchesStart.x;
|
|
2435
2505
|
touchY = image.touchesStart.y;
|
|
2436
2506
|
}
|
|
2507
|
+
const prevScale = currentScale;
|
|
2437
2508
|
const forceZoomRatio = typeof e === 'number' ? e : null;
|
|
2438
2509
|
if (currentScale === 1 && forceZoomRatio) {
|
|
2439
2510
|
touchX = undefined;
|
|
@@ -2459,8 +2530,13 @@ function Zoom(_ref) {
|
|
|
2459
2530
|
translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);
|
|
2460
2531
|
translateMaxX = -translateMinX;
|
|
2461
2532
|
translateMaxY = -translateMinY;
|
|
2462
|
-
|
|
2463
|
-
|
|
2533
|
+
if (prevScale > 0 && forceZoomRatio && typeof image.currentX === 'number' && typeof image.currentY === 'number') {
|
|
2534
|
+
translateX = image.currentX * zoom.scale / prevScale;
|
|
2535
|
+
translateY = image.currentY * zoom.scale / prevScale;
|
|
2536
|
+
} else {
|
|
2537
|
+
translateX = diffX * zoom.scale;
|
|
2538
|
+
translateY = diffY * zoom.scale;
|
|
2539
|
+
}
|
|
2464
2540
|
if (translateX < translateMinX) {
|
|
2465
2541
|
translateX = translateMinX;
|
|
2466
2542
|
}
|
|
@@ -2481,6 +2557,8 @@ function Zoom(_ref) {
|
|
|
2481
2557
|
gesture.originX = 0;
|
|
2482
2558
|
gesture.originY = 0;
|
|
2483
2559
|
}
|
|
2560
|
+
image.currentX = translateX;
|
|
2561
|
+
image.currentY = translateY;
|
|
2484
2562
|
gesture.imageWrapEl.style.transitionDuration = '300ms';
|
|
2485
2563
|
gesture.imageWrapEl.style.transform = `translate3d(${translateX}px, ${translateY}px,0)`;
|
|
2486
2564
|
gesture.imageEl.style.transitionDuration = '300ms';
|
|
@@ -2507,12 +2585,15 @@ function Zoom(_ref) {
|
|
|
2507
2585
|
}
|
|
2508
2586
|
}
|
|
2509
2587
|
if (!gesture.imageEl || !gesture.imageWrapEl) return;
|
|
2588
|
+
gesture.maxRatio = getMaxRatio();
|
|
2510
2589
|
if (swiper.params.cssMode) {
|
|
2511
2590
|
swiper.wrapperEl.style.overflow = '';
|
|
2512
2591
|
swiper.wrapperEl.style.touchAction = '';
|
|
2513
2592
|
}
|
|
2514
2593
|
zoom.scale = 1;
|
|
2515
2594
|
currentScale = 1;
|
|
2595
|
+
image.currentX = undefined;
|
|
2596
|
+
image.currentY = undefined;
|
|
2516
2597
|
image.touchesStart.x = undefined;
|
|
2517
2598
|
image.touchesStart.y = undefined;
|
|
2518
2599
|
gesture.imageWrapEl.style.transitionDuration = '300ms';
|
|
@@ -2523,6 +2604,17 @@ function Zoom(_ref) {
|
|
|
2523
2604
|
gesture.slideEl = undefined;
|
|
2524
2605
|
gesture.originX = 0;
|
|
2525
2606
|
gesture.originY = 0;
|
|
2607
|
+
if (swiper.params.zoom.panOnMouseMove) {
|
|
2608
|
+
mousePanStart = {
|
|
2609
|
+
x: 0,
|
|
2610
|
+
y: 0
|
|
2611
|
+
};
|
|
2612
|
+
if (isPanningWithMouse) {
|
|
2613
|
+
isPanningWithMouse = false;
|
|
2614
|
+
image.startX = 0;
|
|
2615
|
+
image.startY = 0;
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2526
2618
|
}
|
|
2527
2619
|
|
|
2528
2620
|
// Toggle Zoom
|
|
@@ -2631,12 +2723,11 @@ function Zoom(_ref) {
|
|
|
2631
2723
|
}
|
|
2632
2724
|
|
|
2633
2725
|
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
|
2634
|
-
function Controller(
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
} = _ref;
|
|
2726
|
+
function Controller({
|
|
2727
|
+
swiper,
|
|
2728
|
+
extendParams,
|
|
2729
|
+
on
|
|
2730
|
+
}) {
|
|
2640
2731
|
extendParams({
|
|
2641
2732
|
controller: {
|
|
2642
2733
|
control: undefined,
|
|
@@ -2818,12 +2909,11 @@ function Controller(_ref) {
|
|
|
2818
2909
|
});
|
|
2819
2910
|
}
|
|
2820
2911
|
|
|
2821
|
-
function A11y(
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
} = _ref;
|
|
2912
|
+
function A11y({
|
|
2913
|
+
swiper,
|
|
2914
|
+
extendParams,
|
|
2915
|
+
on
|
|
2916
|
+
}) {
|
|
2827
2917
|
extendParams({
|
|
2828
2918
|
a11y: {
|
|
2829
2919
|
enabled: true,
|
|
@@ -2836,10 +2926,12 @@ function A11y(_ref) {
|
|
|
2836
2926
|
slideLabelMessage: '{{index}} / {{slidesLength}}',
|
|
2837
2927
|
containerMessage: null,
|
|
2838
2928
|
containerRoleDescriptionMessage: null,
|
|
2929
|
+
containerRole: null,
|
|
2839
2930
|
itemRoleDescriptionMessage: null,
|
|
2840
2931
|
slideRole: 'group',
|
|
2841
2932
|
id: null,
|
|
2842
|
-
scrollOnFocus: true
|
|
2933
|
+
scrollOnFocus: true,
|
|
2934
|
+
wrapperLiveRegion: true
|
|
2843
2935
|
}
|
|
2844
2936
|
});
|
|
2845
2937
|
swiper.a11y = {
|
|
@@ -2852,13 +2944,9 @@ function A11y(_ref) {
|
|
|
2852
2944
|
function notify(message) {
|
|
2853
2945
|
const notification = liveRegion;
|
|
2854
2946
|
if (notification.length === 0) return;
|
|
2855
|
-
notification
|
|
2856
|
-
notification.innerHTML = message;
|
|
2947
|
+
utils.setInnerHTML(notification, message);
|
|
2857
2948
|
}
|
|
2858
|
-
function getRandomNumber(size) {
|
|
2859
|
-
if (size === void 0) {
|
|
2860
|
-
size = 16;
|
|
2861
|
-
}
|
|
2949
|
+
function getRandomNumber(size = 16) {
|
|
2862
2950
|
const randomChar = () => Math.round(16 * Math.random()).toString(16);
|
|
2863
2951
|
return 'x'.repeat(size).replace(/x/g, randomChar);
|
|
2864
2952
|
}
|
|
@@ -2886,12 +2974,6 @@ function A11y(_ref) {
|
|
|
2886
2974
|
subEl.setAttribute('aria-roledescription', description);
|
|
2887
2975
|
});
|
|
2888
2976
|
}
|
|
2889
|
-
function addElControls(el, controls) {
|
|
2890
|
-
el = utils.makeElementsArray(el);
|
|
2891
|
-
el.forEach(subEl => {
|
|
2892
|
-
subEl.setAttribute('aria-controls', controls);
|
|
2893
|
-
});
|
|
2894
|
-
}
|
|
2895
2977
|
function addElLabel(el, label) {
|
|
2896
2978
|
el = utils.makeElementsArray(el);
|
|
2897
2979
|
el.forEach(subEl => {
|
|
@@ -2919,7 +3001,7 @@ function A11y(_ref) {
|
|
|
2919
3001
|
function enableEl(el) {
|
|
2920
3002
|
el = utils.makeElementsArray(el);
|
|
2921
3003
|
el.forEach(subEl => {
|
|
2922
|
-
subEl.
|
|
3004
|
+
subEl.removeAttribute('aria-disabled');
|
|
2923
3005
|
});
|
|
2924
3006
|
}
|
|
2925
3007
|
function onEnterOrSpaceKey(e) {
|
|
@@ -3013,7 +3095,6 @@ function A11y(_ref) {
|
|
|
3013
3095
|
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
3014
3096
|
}
|
|
3015
3097
|
addElLabel(el, message);
|
|
3016
|
-
addElControls(el, wrapperId);
|
|
3017
3098
|
};
|
|
3018
3099
|
const handlePointerDown = e => {
|
|
3019
3100
|
if (focusTargetSlideEl && focusTargetSlideEl !== e.target && !focusTargetSlideEl.contains(e.target)) {
|
|
@@ -3040,7 +3121,8 @@ function A11y(_ref) {
|
|
|
3040
3121
|
const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
|
|
3041
3122
|
if (!slideEl || !swiper.slides.includes(slideEl)) return;
|
|
3042
3123
|
focusTargetSlideEl = slideEl;
|
|
3043
|
-
const
|
|
3124
|
+
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
3125
|
+
const isActive = (isVirtual ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : swiper.slides.indexOf(slideEl)) === swiper.activeIndex;
|
|
3044
3126
|
const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
|
|
3045
3127
|
if (isActive || isVisible) return;
|
|
3046
3128
|
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
|
|
@@ -3052,9 +3134,11 @@ function A11y(_ref) {
|
|
|
3052
3134
|
requestAnimationFrame(() => {
|
|
3053
3135
|
if (preventFocusHandler) return;
|
|
3054
3136
|
if (swiper.params.loop) {
|
|
3055
|
-
swiper.slideToLoop(parseInt(slideEl.getAttribute('data-swiper-slide-index')), 0);
|
|
3137
|
+
swiper.slideToLoop(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'))), 0);
|
|
3138
|
+
} else if (isVirtual) {
|
|
3139
|
+
swiper.slideTo(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10)), 0);
|
|
3056
3140
|
} else {
|
|
3057
|
-
swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
|
|
3141
|
+
swiper.slideTo(swiper.getSlideIndexWhenGrid(swiper.slides.indexOf(slideEl)), 0);
|
|
3058
3142
|
}
|
|
3059
3143
|
preventFocusHandler = false;
|
|
3060
3144
|
});
|
|
@@ -3088,13 +3172,18 @@ function A11y(_ref) {
|
|
|
3088
3172
|
if (params.containerMessage) {
|
|
3089
3173
|
addElLabel(containerEl, params.containerMessage);
|
|
3090
3174
|
}
|
|
3175
|
+
if (params.containerRole) {
|
|
3176
|
+
addElRole(containerEl, params.containerRole);
|
|
3177
|
+
}
|
|
3091
3178
|
|
|
3092
3179
|
// Wrapper
|
|
3093
3180
|
const wrapperEl = swiper.wrapperEl;
|
|
3094
3181
|
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
|
3095
|
-
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
3096
3182
|
addElId(wrapperEl, wrapperId);
|
|
3097
|
-
|
|
3183
|
+
if (params.wrapperLiveRegion) {
|
|
3184
|
+
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
3185
|
+
addElLive(wrapperEl, live);
|
|
3186
|
+
}
|
|
3098
3187
|
|
|
3099
3188
|
// Slide
|
|
3100
3189
|
initSlides();
|
|
@@ -3125,7 +3214,6 @@ function A11y(_ref) {
|
|
|
3125
3214
|
const document = utils.getDocument();
|
|
3126
3215
|
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
3127
3216
|
swiper.el.addEventListener('focus', handleFocus, true);
|
|
3128
|
-
swiper.el.addEventListener('focus', handleFocus, true);
|
|
3129
3217
|
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
|
3130
3218
|
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
|
3131
3219
|
};
|
|
@@ -3187,12 +3275,11 @@ function A11y(_ref) {
|
|
|
3187
3275
|
});
|
|
3188
3276
|
}
|
|
3189
3277
|
|
|
3190
|
-
function History(
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
} = _ref;
|
|
3278
|
+
function History({
|
|
3279
|
+
swiper,
|
|
3280
|
+
extendParams,
|
|
3281
|
+
on
|
|
3282
|
+
}) {
|
|
3196
3283
|
extendParams({
|
|
3197
3284
|
history: {
|
|
3198
3285
|
enabled: false,
|
|
@@ -3326,13 +3413,12 @@ function History(_ref) {
|
|
|
3326
3413
|
});
|
|
3327
3414
|
}
|
|
3328
3415
|
|
|
3329
|
-
function HashNavigation(
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
} = _ref;
|
|
3416
|
+
function HashNavigation({
|
|
3417
|
+
swiper,
|
|
3418
|
+
extendParams,
|
|
3419
|
+
emit,
|
|
3420
|
+
on
|
|
3421
|
+
}) {
|
|
3336
3422
|
let initialized = false;
|
|
3337
3423
|
const document = utils.getDocument();
|
|
3338
3424
|
const window = utils.getWindow();
|
|
@@ -3343,7 +3429,7 @@ function HashNavigation(_ref) {
|
|
|
3343
3429
|
watchState: false,
|
|
3344
3430
|
getSlideIndex(_s, hash) {
|
|
3345
3431
|
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
3346
|
-
const slideWithHash = swiper.slides.
|
|
3432
|
+
const slideWithHash = swiper.slides.find(slideEl => slideEl.getAttribute('data-hash') === hash);
|
|
3347
3433
|
if (!slideWithHash) return 0;
|
|
3348
3434
|
const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10);
|
|
3349
3435
|
return index;
|
|
@@ -3417,14 +3503,13 @@ function HashNavigation(_ref) {
|
|
|
3417
3503
|
|
|
3418
3504
|
/* eslint no-underscore-dangle: "off" */
|
|
3419
3505
|
/* eslint no-use-before-define: "off" */
|
|
3420
|
-
function Autoplay(
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
} = _ref;
|
|
3506
|
+
function Autoplay({
|
|
3507
|
+
swiper,
|
|
3508
|
+
extendParams,
|
|
3509
|
+
on,
|
|
3510
|
+
emit,
|
|
3511
|
+
params
|
|
3512
|
+
}) {
|
|
3428
3513
|
swiper.autoplay = {
|
|
3429
3514
|
running: false,
|
|
3430
3515
|
paused: false,
|
|
@@ -3451,7 +3536,6 @@ function Autoplay(_ref) {
|
|
|
3451
3536
|
let isTouched;
|
|
3452
3537
|
let pausedByTouch;
|
|
3453
3538
|
let touchStartTimeout;
|
|
3454
|
-
let slideChanged;
|
|
3455
3539
|
let pausedByInteraction;
|
|
3456
3540
|
let pausedByPointerEnter;
|
|
3457
3541
|
function onTransitionEnd(e) {
|
|
@@ -3481,7 +3565,7 @@ function Autoplay(_ref) {
|
|
|
3481
3565
|
const getSlideDelay = () => {
|
|
3482
3566
|
let activeSlideEl;
|
|
3483
3567
|
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
3484
|
-
activeSlideEl = swiper.slides.
|
|
3568
|
+
activeSlideEl = swiper.slides.find(slideEl => slideEl.classList.contains('swiper-slide-active'));
|
|
3485
3569
|
} else {
|
|
3486
3570
|
activeSlideEl = swiper.slides[swiper.activeIndex];
|
|
3487
3571
|
}
|
|
@@ -3489,18 +3573,23 @@ function Autoplay(_ref) {
|
|
|
3489
3573
|
const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);
|
|
3490
3574
|
return currentSlideDelay;
|
|
3491
3575
|
};
|
|
3576
|
+
const getTotalDelay = () => {
|
|
3577
|
+
let totalDelay = swiper.params.autoplay.delay;
|
|
3578
|
+
const currentSlideDelay = getSlideDelay();
|
|
3579
|
+
if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0) {
|
|
3580
|
+
totalDelay = currentSlideDelay;
|
|
3581
|
+
}
|
|
3582
|
+
return totalDelay;
|
|
3583
|
+
};
|
|
3492
3584
|
const run = delayForce => {
|
|
3493
3585
|
if (swiper.destroyed || !swiper.autoplay.running) return;
|
|
3494
3586
|
cancelAnimationFrame(raf);
|
|
3495
3587
|
calcTimeLeft();
|
|
3496
|
-
let delay =
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
delay = currentSlideDelay;
|
|
3502
|
-
autoplayDelayTotal = currentSlideDelay;
|
|
3503
|
-
autoplayDelayCurrent = currentSlideDelay;
|
|
3588
|
+
let delay = delayForce;
|
|
3589
|
+
if (typeof delay === 'undefined') {
|
|
3590
|
+
delay = getTotalDelay();
|
|
3591
|
+
autoplayDelayTotal = delay;
|
|
3592
|
+
autoplayDelayCurrent = delay;
|
|
3504
3593
|
}
|
|
3505
3594
|
autoplayTimeLeft = delay;
|
|
3506
3595
|
const speed = swiper.params.speed;
|
|
@@ -3572,10 +3661,6 @@ function Autoplay(_ref) {
|
|
|
3572
3661
|
};
|
|
3573
3662
|
swiper.autoplay.paused = true;
|
|
3574
3663
|
if (reset) {
|
|
3575
|
-
if (slideChanged) {
|
|
3576
|
-
autoplayTimeLeft = swiper.params.autoplay.delay;
|
|
3577
|
-
}
|
|
3578
|
-
slideChanged = false;
|
|
3579
3664
|
proceed();
|
|
3580
3665
|
return;
|
|
3581
3666
|
}
|
|
@@ -3706,7 +3791,10 @@ function Autoplay(_ref) {
|
|
|
3706
3791
|
});
|
|
3707
3792
|
on('slideChange', () => {
|
|
3708
3793
|
if (swiper.destroyed || !swiper.autoplay.running) return;
|
|
3709
|
-
|
|
3794
|
+
if (swiper.autoplay.paused) {
|
|
3795
|
+
autoplayTimeLeft = getTotalDelay();
|
|
3796
|
+
autoplayDelayTotal = getTotalDelay();
|
|
3797
|
+
}
|
|
3710
3798
|
});
|
|
3711
3799
|
Object.assign(swiper.autoplay, {
|
|
3712
3800
|
start,
|
|
@@ -3716,12 +3804,11 @@ function Autoplay(_ref) {
|
|
|
3716
3804
|
});
|
|
3717
3805
|
}
|
|
3718
3806
|
|
|
3719
|
-
function Thumb(
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
} = _ref;
|
|
3807
|
+
function Thumb({
|
|
3808
|
+
swiper,
|
|
3809
|
+
extendParams,
|
|
3810
|
+
on
|
|
3811
|
+
}) {
|
|
3725
3812
|
extendParams({
|
|
3726
3813
|
thumbs: {
|
|
3727
3814
|
swiper: null,
|
|
@@ -3736,6 +3823,11 @@ function Thumb(_ref) {
|
|
|
3736
3823
|
swiper.thumbs = {
|
|
3737
3824
|
swiper: null
|
|
3738
3825
|
};
|
|
3826
|
+
function isVirtualEnabled() {
|
|
3827
|
+
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3828
|
+
if (!thumbsSwiper || thumbsSwiper.destroyed) return false;
|
|
3829
|
+
return thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled;
|
|
3830
|
+
}
|
|
3739
3831
|
function onThumbClick() {
|
|
3740
3832
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3741
3833
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
@@ -3763,6 +3855,10 @@ function Thumb(_ref) {
|
|
|
3763
3855
|
initialized = true;
|
|
3764
3856
|
const SwiperClass = swiper.constructor;
|
|
3765
3857
|
if (thumbsParams.swiper instanceof SwiperClass) {
|
|
3858
|
+
if (thumbsParams.swiper.destroyed) {
|
|
3859
|
+
initialized = false;
|
|
3860
|
+
return false;
|
|
3861
|
+
}
|
|
3766
3862
|
swiper.thumbs.swiper = thumbsParams.swiper;
|
|
3767
3863
|
Object.assign(swiper.thumbs.swiper.originalParams, {
|
|
3768
3864
|
watchSlidesProgress: true,
|
|
@@ -3784,12 +3880,18 @@ function Thumb(_ref) {
|
|
|
3784
3880
|
}
|
|
3785
3881
|
swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass);
|
|
3786
3882
|
swiper.thumbs.swiper.on('tap', onThumbClick);
|
|
3883
|
+
if (isVirtualEnabled()) {
|
|
3884
|
+
swiper.thumbs.swiper.on('virtualUpdate', () => {
|
|
3885
|
+
update(false, {
|
|
3886
|
+
autoScroll: false
|
|
3887
|
+
});
|
|
3888
|
+
});
|
|
3889
|
+
}
|
|
3787
3890
|
return true;
|
|
3788
3891
|
}
|
|
3789
|
-
function update(initial) {
|
|
3892
|
+
function update(initial, p) {
|
|
3790
3893
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3791
3894
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
3792
|
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
3793
3895
|
|
|
3794
3896
|
// Activate thumbs
|
|
3795
3897
|
let thumbsToActivate = 1;
|
|
@@ -3802,7 +3904,7 @@ function Thumb(_ref) {
|
|
|
3802
3904
|
}
|
|
3803
3905
|
thumbsToActivate = Math.floor(thumbsToActivate);
|
|
3804
3906
|
thumbsSwiper.slides.forEach(slideEl => slideEl.classList.remove(thumbActiveClass));
|
|
3805
|
-
if (thumbsSwiper.params.loop ||
|
|
3907
|
+
if (thumbsSwiper.params.loop || isVirtualEnabled()) {
|
|
3806
3908
|
for (let i = 0; i < thumbsToActivate; i += 1) {
|
|
3807
3909
|
utils.elementChildren(thumbsSwiper.slidesEl, `[data-swiper-slide-index="${swiper.realIndex + i}"]`).forEach(slideEl => {
|
|
3808
3910
|
slideEl.classList.add(thumbActiveClass);
|
|
@@ -3815,6 +3917,14 @@ function Thumb(_ref) {
|
|
|
3815
3917
|
}
|
|
3816
3918
|
}
|
|
3817
3919
|
}
|
|
3920
|
+
if (p?.autoScroll ?? true) {
|
|
3921
|
+
autoScroll(initial ? 0 : undefined);
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
function autoScroll(slideSpeed) {
|
|
3925
|
+
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3926
|
+
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
3927
|
+
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
3818
3928
|
const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
|
|
3819
3929
|
const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;
|
|
3820
3930
|
if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {
|
|
@@ -3822,7 +3932,7 @@ function Thumb(_ref) {
|
|
|
3822
3932
|
let newThumbsIndex;
|
|
3823
3933
|
let direction;
|
|
3824
3934
|
if (thumbsSwiper.params.loop) {
|
|
3825
|
-
const newThumbsSlide = thumbsSwiper.slides.
|
|
3935
|
+
const newThumbsSlide = thumbsSwiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`);
|
|
3826
3936
|
newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
|
|
3827
3937
|
direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
|
|
3828
3938
|
} else {
|
|
@@ -3839,8 +3949,8 @@ function Thumb(_ref) {
|
|
|
3839
3949
|
} else {
|
|
3840
3950
|
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
|
3841
3951
|
}
|
|
3842
|
-
}
|
|
3843
|
-
thumbsSwiper.slideTo(newThumbsIndex,
|
|
3952
|
+
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ;
|
|
3953
|
+
thumbsSwiper.slideTo(newThumbsIndex, slideSpeed);
|
|
3844
3954
|
}
|
|
3845
3955
|
}
|
|
3846
3956
|
}
|
|
@@ -3905,13 +4015,12 @@ function Thumb(_ref) {
|
|
|
3905
4015
|
});
|
|
3906
4016
|
}
|
|
3907
4017
|
|
|
3908
|
-
function freeMode(
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
} = _ref;
|
|
4018
|
+
function freeMode({
|
|
4019
|
+
swiper,
|
|
4020
|
+
extendParams,
|
|
4021
|
+
emit,
|
|
4022
|
+
once
|
|
4023
|
+
}) {
|
|
3915
4024
|
extendParams({
|
|
3916
4025
|
freeMode: {
|
|
3917
4026
|
enabled: false,
|
|
@@ -3952,10 +4061,9 @@ function freeMode(_ref) {
|
|
|
3952
4061
|
time: utils.now()
|
|
3953
4062
|
});
|
|
3954
4063
|
}
|
|
3955
|
-
function onTouchEnd(
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
} = _ref2;
|
|
4064
|
+
function onTouchEnd({
|
|
4065
|
+
currentPos
|
|
4066
|
+
}) {
|
|
3959
4067
|
if (swiper.params.cssMode) return;
|
|
3960
4068
|
const {
|
|
3961
4069
|
params,
|
|
@@ -4139,12 +4247,11 @@ function freeMode(_ref) {
|
|
|
4139
4247
|
});
|
|
4140
4248
|
}
|
|
4141
4249
|
|
|
4142
|
-
function Grid(
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
} = _ref;
|
|
4250
|
+
function Grid({
|
|
4251
|
+
swiper,
|
|
4252
|
+
extendParams,
|
|
4253
|
+
on
|
|
4254
|
+
}) {
|
|
4148
4255
|
extendParams({
|
|
4149
4256
|
grid: {
|
|
4150
4257
|
rows: 1,
|
|
@@ -4180,7 +4287,7 @@ function Grid(_ref) {
|
|
|
4180
4287
|
slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;
|
|
4181
4288
|
}
|
|
4182
4289
|
if (slidesPerView !== 'auto' && fill === 'row') {
|
|
4183
|
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);
|
|
4290
|
+
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, Math.floor(slidesPerView) * rows);
|
|
4184
4291
|
}
|
|
4185
4292
|
slidesPerRow = slidesNumberEvenToRows / rows;
|
|
4186
4293
|
};
|
|
@@ -4305,9 +4412,9 @@ function appendSlide(slides) {
|
|
|
4305
4412
|
const appendElement = slideEl => {
|
|
4306
4413
|
if (typeof slideEl === 'string') {
|
|
4307
4414
|
const tempDOM = document.createElement('div');
|
|
4308
|
-
tempDOM
|
|
4415
|
+
utils.setInnerHTML(tempDOM, slideEl);
|
|
4309
4416
|
slidesEl.append(tempDOM.children[0]);
|
|
4310
|
-
tempDOM
|
|
4417
|
+
utils.setInnerHTML(tempDOM, '');
|
|
4311
4418
|
} else {
|
|
4312
4419
|
slidesEl.append(slideEl);
|
|
4313
4420
|
}
|
|
@@ -4342,9 +4449,9 @@ function prependSlide(slides) {
|
|
|
4342
4449
|
const prependElement = slideEl => {
|
|
4343
4450
|
if (typeof slideEl === 'string') {
|
|
4344
4451
|
const tempDOM = document.createElement('div');
|
|
4345
|
-
tempDOM
|
|
4452
|
+
utils.setInnerHTML(tempDOM, slideEl);
|
|
4346
4453
|
slidesEl.prepend(tempDOM.children[0]);
|
|
4347
|
-
tempDOM
|
|
4454
|
+
utils.setInnerHTML(tempDOM, '');
|
|
4348
4455
|
} else {
|
|
4349
4456
|
slidesEl.prepend(slideEl);
|
|
4350
4457
|
}
|
|
@@ -4470,10 +4577,9 @@ function removeAllSlides() {
|
|
|
4470
4577
|
swiper.removeSlide(slidesIndexes);
|
|
4471
4578
|
}
|
|
4472
4579
|
|
|
4473
|
-
function Manipulation(
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
} = _ref;
|
|
4580
|
+
function Manipulation({
|
|
4581
|
+
swiper
|
|
4582
|
+
}) {
|
|
4477
4583
|
Object.assign(swiper, {
|
|
4478
4584
|
appendSlide: appendSlide.bind(swiper),
|
|
4479
4585
|
prependSlide: prependSlide.bind(swiper),
|
|
@@ -4505,7 +4611,7 @@ function effectInit(params) {
|
|
|
4505
4611
|
Object.assign(swiper.params, overwriteParamsResult);
|
|
4506
4612
|
Object.assign(swiper.originalParams, overwriteParamsResult);
|
|
4507
4613
|
});
|
|
4508
|
-
on('setTranslate', () => {
|
|
4614
|
+
on('setTranslate _virtualUpdated', () => {
|
|
4509
4615
|
if (swiper.params.effect !== effect) return;
|
|
4510
4616
|
setTranslate();
|
|
4511
4617
|
});
|
|
@@ -4549,20 +4655,19 @@ function effectTarget(effectParams, slideEl) {
|
|
|
4549
4655
|
return transformEl;
|
|
4550
4656
|
}
|
|
4551
4657
|
|
|
4552
|
-
function effectVirtualTransitionEnd(
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
} = _ref;
|
|
4658
|
+
function effectVirtualTransitionEnd({
|
|
4659
|
+
swiper,
|
|
4660
|
+
duration,
|
|
4661
|
+
transformElements,
|
|
4662
|
+
allSlides
|
|
4663
|
+
}) {
|
|
4559
4664
|
const {
|
|
4560
4665
|
activeIndex
|
|
4561
4666
|
} = swiper;
|
|
4562
4667
|
const getSlide = el => {
|
|
4563
4668
|
if (!el.parentElement) {
|
|
4564
4669
|
// assume shadow root
|
|
4565
|
-
const slide = swiper.slides.
|
|
4670
|
+
const slide = swiper.slides.find(slideEl => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode);
|
|
4566
4671
|
return slide;
|
|
4567
4672
|
}
|
|
4568
4673
|
return el.parentElement;
|
|
@@ -4594,12 +4699,11 @@ function effectVirtualTransitionEnd(_ref) {
|
|
|
4594
4699
|
}
|
|
4595
4700
|
}
|
|
4596
4701
|
|
|
4597
|
-
function EffectFade(
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
} = _ref;
|
|
4702
|
+
function EffectFade({
|
|
4703
|
+
swiper,
|
|
4704
|
+
extendParams,
|
|
4705
|
+
on
|
|
4706
|
+
}) {
|
|
4603
4707
|
extendParams({
|
|
4604
4708
|
fadeEffect: {
|
|
4605
4709
|
crossFade: false
|
|
@@ -4654,12 +4758,11 @@ function EffectFade(_ref) {
|
|
|
4654
4758
|
});
|
|
4655
4759
|
}
|
|
4656
4760
|
|
|
4657
|
-
function EffectCube(
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
} = _ref;
|
|
4761
|
+
function EffectCube({
|
|
4762
|
+
swiper,
|
|
4763
|
+
extendParams,
|
|
4764
|
+
on
|
|
4765
|
+
}) {
|
|
4663
4766
|
extendParams({
|
|
4664
4767
|
cubeEffect: {
|
|
4665
4768
|
slideShadows: true,
|
|
@@ -4835,12 +4938,11 @@ function createShadow(suffix, slideEl, side) {
|
|
|
4835
4938
|
return shadowEl;
|
|
4836
4939
|
}
|
|
4837
4940
|
|
|
4838
|
-
function EffectFlip(
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
} = _ref;
|
|
4941
|
+
function EffectFlip({
|
|
4942
|
+
swiper,
|
|
4943
|
+
extendParams,
|
|
4944
|
+
on
|
|
4945
|
+
}) {
|
|
4844
4946
|
extendParams({
|
|
4845
4947
|
flipEffect: {
|
|
4846
4948
|
slideShadows: true,
|
|
@@ -4860,6 +4962,8 @@ function EffectFlip(_ref) {
|
|
|
4860
4962
|
if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
|
|
4861
4963
|
};
|
|
4862
4964
|
const recreateShadows = () => {
|
|
4965
|
+
// Set shadows
|
|
4966
|
+
swiper.params.flipEffect;
|
|
4863
4967
|
swiper.slides.forEach(slideEl => {
|
|
4864
4968
|
let progress = slideEl.progress;
|
|
4865
4969
|
if (swiper.params.flipEffect.limitRotation) {
|
|
@@ -4937,12 +5041,11 @@ function EffectFlip(_ref) {
|
|
|
4937
5041
|
});
|
|
4938
5042
|
}
|
|
4939
5043
|
|
|
4940
|
-
function EffectCoverflow(
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
} = _ref;
|
|
5044
|
+
function EffectCoverflow({
|
|
5045
|
+
swiper,
|
|
5046
|
+
extendParams,
|
|
5047
|
+
on
|
|
5048
|
+
}) {
|
|
4946
5049
|
extendParams({
|
|
4947
5050
|
coverflowEffect: {
|
|
4948
5051
|
rotate: 50,
|
|
@@ -5035,12 +5138,11 @@ function EffectCoverflow(_ref) {
|
|
|
5035
5138
|
});
|
|
5036
5139
|
}
|
|
5037
5140
|
|
|
5038
|
-
function EffectCreative(
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
} = _ref;
|
|
5141
|
+
function EffectCreative({
|
|
5142
|
+
swiper,
|
|
5143
|
+
extendParams,
|
|
5144
|
+
on
|
|
5145
|
+
}) {
|
|
5044
5146
|
extendParams({
|
|
5045
5147
|
creativeEffect: {
|
|
5046
5148
|
limitProgress: 1,
|
|
@@ -5174,12 +5276,11 @@ function EffectCreative(_ref) {
|
|
|
5174
5276
|
});
|
|
5175
5277
|
}
|
|
5176
5278
|
|
|
5177
|
-
function EffectCards(
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
} = _ref;
|
|
5279
|
+
function EffectCards({
|
|
5280
|
+
swiper,
|
|
5281
|
+
extendParams,
|
|
5282
|
+
on
|
|
5283
|
+
}) {
|
|
5183
5284
|
extendParams({
|
|
5184
5285
|
cardsEffect: {
|
|
5185
5286
|
slideShadows: true,
|
|
@@ -5225,7 +5326,7 @@ function EffectCards(_ref) {
|
|
|
5225
5326
|
rotate += -28 * progress * subProgress;
|
|
5226
5327
|
scale += -0.5 * subProgress;
|
|
5227
5328
|
tXAdd += 96 * subProgress;
|
|
5228
|
-
tY = `${-25 * subProgress * Math.abs(progress)}%`;
|
|
5329
|
+
tY = `${(params.rotate || swiper.isHorizontal() ? -25 : 0) * subProgress * Math.abs(progress)}%`;
|
|
5229
5330
|
}
|
|
5230
5331
|
if (progress < 0) {
|
|
5231
5332
|
// next
|
|
@@ -5286,7 +5387,10 @@ function EffectCards(_ref) {
|
|
|
5286
5387
|
setTransition,
|
|
5287
5388
|
perspective: () => true,
|
|
5288
5389
|
overwriteParams: () => ({
|
|
5390
|
+
_loopSwapReset: false,
|
|
5289
5391
|
watchSlidesProgress: true,
|
|
5392
|
+
loopAdditionalSlides: swiper.params.cardsEffect.rotate ? 3 : 2,
|
|
5393
|
+
centeredSlides: true,
|
|
5290
5394
|
virtualTranslate: !swiper.params.cssMode
|
|
5291
5395
|
})
|
|
5292
5396
|
});
|
|
@@ -5315,5 +5419,3 @@ exports.Scrollbar = Scrollbar;
|
|
|
5315
5419
|
exports.Thumbs = Thumb;
|
|
5316
5420
|
exports.Virtual = Virtual;
|
|
5317
5421
|
exports.Zoom = Zoom;
|
|
5318
|
-
|
|
5319
|
-
//# sourceMappingURL=index-2e0ce692.js.map
|