packages
1 month ago
012778ff5828d0d1739f.bundle.js
1 month ago
02ab54a3328c55e115ea.bundle.min.js
1 month ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
06dbd869189450c5db6c.bundle.js
1 month ago
0982f37bec0944fbcb10.bundle.js
5 months ago
0bc41c4656ca54cf2aca.bundle.min.js
5 months ago
14bcbc91620c14a7112c.bundle.min.js
1 month ago
1564d2bfa4591bf857f3.bundle.min.js
5 months ago
197583acd246fea0e25d.bundle.js
6 months ago
20866d9d9e34bf3cb0a7.bundle.min.js
1 month ago
2140afa714e988f1069e.bundle.js
2 months ago
220e9c3d1caa01726b1a.bundle.js
1 month ago
29c342e9c10e3f13f498.bundle.js
1 month ago
2bac2875cdf51a1f8140.bundle.min.js
1 month ago
32f7c5e8db4c8976b254.bundle.js
2 months ago
35423d812dc1d52fdb27.bundle.min.js
5 months ago
397f2d183c19202777d6.bundle.min.js
3 months ago
397f2d183c19202777d6.bundle.min.js.LICENSE.txt
3 months ago
3c838288a9b7ddd2aea4.bundle.min.js
5 months ago
3d410a099008411bb011.bundle.js
6 months ago
3df4dbb5d612dbdab477.bundle.min.js
2 months ago
40d841f4b4ce7b1928f5.bundle.js
5 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4927500be197e062162e.bundle.min.js
2 months ago
4c96eab5a48ee097dcb2.bundle.js
1 month ago
59845ab5a628d2b79f57.bundle.js
1 month ago
5b575dffd21b0cec15a5.bundle.js
1 month ago
6117d083decd13b6ed73.bundle.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
687979ffbcfd58352c29.bundle.min.js
1 month ago
6936b079b4e7c28cd901.bundle.min.js
1 month ago
6a19e86dd8c1f9165dbe.bundle.js
6 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
73f63f9507c306870586.bundle.min.js
1 month ago
7698e0d50a8ad7ecc822.bundle.js
1 month ago
77b60be7dc925a32f560.bundle.min.js
1 month ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
5 months ago
8277989eebcfba278cb0.bundle.min.js
8 months ago
831aea236b1ddda24f0c.bundle.js
1 month ago
845418a5488e9937fc99.bundle.min.js
1 month ago
8ad22e7ba800b096313c.bundle.min.js
1 month ago
8c20eb5e96967d3016b2.bundle.js
1 month ago
8e5b42844d27eada9b53.bundle.min.js
2 months ago
8e80438d29fc79b648e5.bundle.js
2 months ago
8e8b47ad5b4e4d038c80.bundle.js
5 months ago
8ecfd8495b7ec419862a.bundle.js
5 months ago
979a9c03fe10da23400d.bundle.js
2 months ago
9b0cc3aa93cf287cd0a2.bundle.min.js
1 month ago
9b97a73ee8fdc5fb7dc3.bundle.js
3 months ago
9bd390911e34b349d8cb.bundle.min.js
2 months ago
9dcd9e88237da6496816.bundle.min.js
5 months ago
9e7e356552c03a622b0f.bundle.js
2 months ago
9ffe53753902b9aca176.bundle.js
1 month ago
a0f667abb781daab8e48.bundle.js
1 month ago
a9c3d5b02d26399aebfb.bundle.js
1 month ago
accordion.8b0db5058afeb74622f5.bundle.min.js
8 months ago
accordion.b9a0ab19c7c872c405d7.bundle.js
6 months ago
admin-feedback.js
8 months ago
admin-feedback.min.js
8 months ago
admin-feedback.strings.js
1 month ago
admin-modules.js
6 months ago
admin-modules.min.js
6 months ago
admin-modules.min.js.LICENSE.txt
10 months ago
admin-modules.strings.js
1 month ago
admin-notifications.js
8 months ago
admin-notifications.min.js
8 months ago
admin-notifications.strings.js
6 months ago
admin-top-bar.js
2 months ago
admin-top-bar.min.js
2 months ago
admin-top-bar.strings.js
6 months ago
admin.js
1 month ago
admin.min.js
1 month ago
admin.min.js.LICENSE.txt
10 months ago
admin.strings.js
6 months ago
aee13673e923469c3275.bundle.min.js
5 months ago
af05aac2eb23e7438265.bundle.js
1 month ago
ai-admin.js
6 months ago
ai-admin.min.js
6 months ago
ai-admin.min.js.LICENSE.txt
10 months ago
ai-admin.strings.js
6 months ago
ai-gutenberg.js
6 months ago
ai-gutenberg.min.js
6 months ago
ai-gutenberg.min.js.LICENSE.txt
10 months ago
ai-gutenberg.strings.js
6 months ago
ai-layout.js
3 months ago
ai-layout.min.js
3 months ago
ai-layout.min.js.LICENSE.txt
10 months ago
ai-layout.strings.js
1 month ago
ai-media-library.js
6 months ago
ai-media-library.min.js
6 months ago
ai-media-library.min.js.LICENSE.txt
10 months ago
ai-media-library.strings.js
6 months ago
ai-unify-product-images.js
6 months ago
ai-unify-product-images.min.js
6 months ago
ai-unify-product-images.min.js.LICENSE.txt
10 months ago
ai-unify-product-images.strings.js
6 months ago
ai.js
6 months ago
ai.min.js
6 months ago
ai.min.js.LICENSE.txt
10 months ago
ai.strings.js
1 month ago
alert.b4336601ffdb6086d1b5.bundle.min.js
1 month ago
alert.fd509aa768e7b35a8e32.bundle.js
6 months ago
announcements-app.js
1 month ago
announcements-app.min.js
1 month ago
announcements-app.min.js.LICENSE.txt
10 months ago
announcements-app.strings.js
6 months ago
app-loader.js
6 months ago
app-loader.min.js
8 months ago
app-loader.strings.js
1 month ago
app-packages.js
5 months ago
app-packages.min.js
5 months ago
app-packages.min.js.LICENSE.txt
10 months ago
app-packages.strings.js
1 month ago
app.js
1 month ago
app.min.js
1 month ago
app.min.js.LICENSE.txt
10 months ago
app.strings.js
1 month ago
atomic-widgets-action-link-handler.js
1 month ago
atomic-widgets-action-link-handler.min.js
1 month ago
atomic-widgets-editor.js
1 month ago
atomic-widgets-editor.min.js
1 month ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
2 months ago
atomic-widgets-form-handler.js
1 month ago
atomic-widgets-form-handler.min.js
1 month ago
atomic-widgets-form-handler.min.js.LICENSE.txt
1 month ago
b4d39e5186d768f79598.bundle.js
1 month ago
b96d70044d0d67c2df19.bundle.min.js
8 months ago
bcb5135af6b817bc9708.bundle.min.js
2 months ago
beta-tester.js
8 months ago
beta-tester.min.js
8 months ago
beta-tester.strings.js
6 months ago
bf2fa9f81b3d78f5858f.bundle.min.js
1 month ago
c13d205fa26f8af1ce7c.bundle.js
6 months ago
c73a7d15e48e3305780a.bundle.min.js
1 month ago
cf6ec600fcf4e08ba6d3.bundle.js
5 months ago
checklist.js
6 months ago
checklist.min.js
6 months ago
checklist.min.js.LICENSE.txt
10 months ago
checklist.strings.js
6 months ago
cloud-library-screenshot.js
6 months ago
cloud-library-screenshot.min.js
6 months ago
cloud-library-screenshot.min.js.LICENSE.txt
8 months ago
cloud-library-screenshot.strings.js
6 months ago
common-modules.js
2 months ago
common-modules.min.js
2 months ago
common-modules.strings.js
6 months ago
common.js
1 month ago
common.min.js
1 month ago
common.min.js.LICENSE.txt
10 months ago
common.strings.js
6 months ago
contact-buttons.086261d3e9c4d8037686.bundle.js
6 months ago
contact-buttons.e98d0220ce8c38404e7e.bundle.min.js
8 months ago
container-converter.js
8 months ago
container-converter.min.js
8 months ago
container-converter.strings.js
6 months ago
container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js
4 months ago
container-editor-handlers.e7e069c4e656425c51f8.bundle.js
4 months ago
counter.12335f45aaa79d244f24.bundle.min.js
8 months ago
counter.7310c276bc7865a3d438.bundle.js
6 months ago
d39cd4cb3d5b09b11c14.bundle.min.js
1 month ago
d42de03ef4a0f50e39ca.bundle.min.js
5 months ago
d4c67aa71d8173f6201f.bundle.js
2 months ago
d52aa05c75af56327744.bundle.js
6 months ago
d67ddd6f08b08392c42f.bundle.js
6 months ago
d8a330693f9211e2166e.bundle.min.js
1 month ago
daedc6797eaad5c82711.bundle.min.js
8 months ago
de7511b88f9ec0968921.bundle.js
1 month ago
design-system-sync.js
2 months ago
design-system-sync.min.js
2 months ago
design-system-sync.strings.js
2 months ago
dev-tools.js
8 months ago
dev-tools.min.js
8 months ago
dev-tools.strings.js
6 months ago
df2f2a2ae20e0181ec2d.bundle.js
2 months ago
df4ff09f2b412abf0cd3.bundle.js
1 month ago
dff865a4d52c12bcf996.bundle.min.js
1 month ago
e-home-screen.js
1 month ago
e-home-screen.min.js
1 month ago
e-home-screen.min.js.LICENSE.txt
1 month ago
e-home-screen.strings.js
1 month ago
e-react-promotions.js
2 months ago
e-react-promotions.min.js
2 months ago
e-react-promotions.min.js.LICENSE.txt
2 months ago
e-react-promotions.strings.js
6 months ago
e-wc-product-editor.js
6 months ago
e-wc-product-editor.min.js
8 months ago
e-wc-product-editor.min.js.LICENSE.txt
1 year ago
e-wc-product-editor.strings.js
6 months ago
e1cb4d726bb59646c677.bundle.min.js
8 months ago
e459c6c89c0c0899c850.bundle.js
6 months ago
e9a764dcd37c06162942.bundle.js
1 month ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
ec1ee92b2a471389c7b9.bundle.min.js
1 month ago
editor-document.js
6 months ago
editor-document.min.js
8 months ago
editor-document.strings.js
1 month ago
editor-environment-v2.js
8 months ago
editor-environment-v2.min.js
8 months ago
editor-environment-v2.strings.js
6 months ago
editor-interactions.js
1 month ago
editor-interactions.min.js
1 month ago
editor-interactions.strings.js
6 months ago
editor-loader-v1.js
8 months ago
editor-loader-v1.min.js
8 months ago
editor-loader-v1.strings.js
6 months ago
editor-loader-v2.js
8 months ago
editor-loader-v2.min.js
8 months ago
editor-loader-v2.strings.js
6 months ago
editor-modules.js
2 months ago
editor-modules.min.js
2 months ago
editor-modules.min.js.LICENSE.txt
10 months ago
editor-modules.strings.js
1 month ago
editor-notifications.js
8 months ago
editor-notifications.min.js
8 months ago
editor-notifications.strings.js
6 months ago
editor-one-admin.js
6 months ago
editor-one-admin.min.js
6 months ago
editor-one-admin.strings.js
6 months ago
editor-one-menu.js
5 months ago
editor-one-menu.min.js
5 months ago
editor-one-menu.strings.js
6 months ago
editor-one-sidebar-navigation.js
2 months ago
editor-one-sidebar-navigation.min.js
2 months ago
editor-one-sidebar-navigation.min.js.LICENSE.txt
6 months ago
editor-one-sidebar-navigation.strings.js
6 months ago
editor-one-top-bar.js
1 month ago
editor-one-top-bar.min.js
1 month ago
editor-one-top-bar.min.js.LICENSE.txt
5 months ago
editor-one-top-bar.strings.js
5 months ago
editor-v4-opt-in-alphachip.js
2 months ago
editor-v4-opt-in-alphachip.min.js
2 months ago
editor-v4-opt-in-alphachip.strings.js
2 months ago
editor-v4-opt-in.js
2 months ago
editor-v4-opt-in.min.js
2 months ago
editor-v4-opt-in.min.js.LICENSE.txt
6 months ago
editor-v4-opt-in.strings.js
2 months ago
editor.js
1 month ago
editor.min.js
1 month ago
editor.min.js.LICENSE.txt
6 months ago
editor.strings.js
1 month ago
ef2100ac3eda1a957819.bundle.min.js
8 months ago
ef35c83e4628f0a5c328.bundle.js
5 months ago
element-manager-admin.js
2 months ago
element-manager-admin.min.js
2 months ago
element-manager-admin.min.js.LICENSE.txt
10 months ago
element-manager-admin.strings.js
2 months ago
elementor-admin-bar.js
8 months ago
elementor-admin-bar.min.js
8 months ago
elementor-admin-bar.strings.js
6 months ago
f3b4453f66034a6655a7.bundle.min.js
1 month ago
f56b0d1257a5346afe64.bundle.min.js
2 months ago
fdda4547e887fbda71b3.bundle.js
2 months ago
fdf69f4e1f300fb27472.bundle.min.js
2 months ago
floating-bars.740d06d17cea5cebdb61.bundle.min.js
8 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
6 months ago
floating-elements-modal.js
2 months ago
floating-elements-modal.min.js
2 months ago
floating-elements-modal.strings.js
6 months ago
frontend-modules.js
2 months ago
frontend-modules.min.js
2 months ago
frontend.js
1 month ago
frontend.min.js
1 month ago
gutenberg.js
8 months ago
gutenberg.min.js
8 months ago
gutenberg.strings.js
3 months ago
image-carousel.6167d20b95b33386757b.bundle.min.js
8 months ago
image-carousel.8b25f3674c29b829a867.bundle.js
6 months ago
import-export-admin.js
6 months ago
import-export-admin.min.js
6 months ago
import-export-admin.strings.js
1 month ago
import-export-customization-admin.js
1 month ago
import-export-customization-admin.min.js
1 month ago
import-export-customization-admin.min.js.LICENSE.txt
8 months ago
import-export-customization-admin.strings.js
1 month ago
interactions-shared-utils.js
1 month ago
interactions-shared-utils.min.js
1 month ago
interactions-shared-utils.strings.js
2 months ago
interactions.js
1 month ago
interactions.min.js
1 month ago
interactions.strings.js
6 months ago
kit-elements-defaults-editor.js
6 months ago
kit-elements-defaults-editor.min.js
6 months ago
kit-elements-defaults-editor.min.js.LICENSE.txt
10 months ago
kit-elements-defaults-editor.strings.js
6 months ago
kit-library.a394510096bc447f636d.bundle.min.js
2 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
2 months ago
lightbox.570c05c5a283cfb6b223.bundle.min.js
3 months ago
lightbox.d9ea72d232a14f514ee2.bundle.js
3 months ago
media-hints.js
8 months ago
media-hints.min.js
8 months ago
media-hints.strings.js
6 months ago
nested-accordion.294d40984397351fd0f5.bundle.min.js
4 months ago
nested-accordion.4340b64226322f36bcc0.bundle.js
4 months ago
nested-accordion.js
6 months ago
nested-accordion.min.js
6 months ago
nested-accordion.min.js.LICENSE.txt
10 months ago
nested-accordion.strings.js
6 months ago
nested-elements.js
3 months ago
nested-elements.min.js
3 months ago
nested-elements.strings.js
6 months ago
nested-tabs.7a338e6d7e060c473993.bundle.js
6 months ago
nested-tabs.a2401356d329f179475e.bundle.min.js
6 months ago
nested-tabs.js
6 months ago
nested-tabs.min.js
6 months ago
nested-tabs.min.js.LICENSE.txt
10 months ago
nested-tabs.strings.js
6 months ago
nested-title-keyboard-handler.0c2b498e3e0695a1dc19.bundle.js
6 months ago
nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js
6 months ago
new-template.js
5 months ago
new-template.min.js
5 months ago
new-template.strings.js
6 months ago
notes.js
8 months ago
notes.min.js
8 months ago
notes.strings.js
6 months ago
pro-free-trial-popup.js
8 months ago
pro-free-trial-popup.min.js
8 months ago
pro-free-trial-popup.strings.js
6 months ago
pro-install-events.js
8 months ago
pro-install-events.min.js
8 months ago
pro-install-events.strings.js
6 months ago
progress.0ea083b809812c0e3aa1.bundle.min.js
8 months ago
progress.b1057ba870016558bce1.bundle.js
6 months ago
responsive-bar.js
8 months ago
responsive-bar.min.js
8 months ago
responsive-bar.strings.js
6 months ago
section-editor-handlers.53ffedef32043348b99b.bundle.min.js
8 months ago
section-editor-handlers.d65899d232b5339510d7.bundle.js
6 months ago
section-frontend-handlers.c3950c6b190ca134bc8d.bundle.js
6 months ago
section-frontend-handlers.d85ab872da118940910d.bundle.min.js
8 months ago
shared-editor-handlers.3023894100138e442ab0.bundle.js
4 months ago
shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js
4 months ago
shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js
8 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
6 months ago
styleguide-app-initiator.js
6 months ago
styleguide-app-initiator.min.js
6 months ago
styleguide-app-initiator.min.js.LICENSE.txt
10 months ago
styleguide-app-initiator.strings.js
6 months ago
styleguide-app.04340244193733d78622.bundle.min.js
8 months ago
styleguide-app.36ecabae74d9b87fc5a8.bundle.js
6 months ago
styleguide.js
8 months ago
styleguide.min.js
8 months ago
styleguide.strings.js
4 months ago
tabs-handler.js
1 month ago
tabs-handler.min.js
1 month ago
tabs-preview-handler.js
1 month ago
tabs-preview-handler.min.js
1 month ago
tabs.18344b05d8d1ea0702bc.bundle.min.js
8 months ago
tabs.40498fa771d612162c53.bundle.js
6 months ago
text-editor.0c9960167105139d27c9.bundle.js
6 months ago
text-editor.45609661e409413f1cef.bundle.min.js
8 months ago
text-path.6db73cc0a10a70f128eb.bundle.js
3 months ago
text-path.a67c1f3a78d208bc7e1b.bundle.min.js
3 months ago
toggle.2a177a3ef4785d3dfbc5.bundle.min.js
8 months ago
toggle.b75e66d2aca6f6ee742e.bundle.js
6 months ago
video.6e96510afa701d1f2ebc.bundle.js
6 months ago
video.86d44e46e43d0807e708.bundle.min.js
8 months ago
web-cli.js
6 months ago
web-cli.min.js
6 months ago
web-cli.min.js.LICENSE.txt
10 months ago
web-cli.strings.js
6 months ago
webpack.runtime.js
1 month ago
webpack.runtime.min.js
1 month ago
wp-audio.0ba9114964acf4c37ca2.bundle.js
6 months ago
wp-audio.c9624cb6e5dc9de86abd.bundle.min.js
8 months ago
youtube-handler.js
6 months ago
youtube-handler.min.js
6 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
377 lines
| 1 | "use strict"; |
| 2 | (self["webpackChunkelementorFrontend"] = self["webpackChunkelementorFrontend"] || []).push([["floating-bars"],{ |
| 3 | |
| 4 | /***/ "../modules/floating-buttons/assets/js/floating-bars/frontend/classes/floatin-bar-dom.js": |
| 5 | /*!***********************************************************************************************!*\ |
| 6 | !*** ../modules/floating-buttons/assets/js/floating-bars/frontend/classes/floatin-bar-dom.js ***! |
| 7 | \***********************************************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports) => { |
| 9 | |
| 10 | |
| 11 | |
| 12 | Object.defineProperty(exports, "__esModule", ({ |
| 13 | value: true |
| 14 | })); |
| 15 | exports["default"] = void 0; |
| 16 | class FloatingBarDomHelper { |
| 17 | constructor($element) { |
| 18 | this.$element = $element; |
| 19 | } |
| 20 | maybeMoveToTop() { |
| 21 | const el = this.$element[0]; |
| 22 | const widget = el.querySelector('.e-floating-bars'); |
| 23 | if (elementorFrontend.isEditMode()) { |
| 24 | widget.classList.add('is-sticky'); |
| 25 | return; |
| 26 | } |
| 27 | if (el.dataset.widget_type.startsWith('floating-bars') && widget.classList.contains('has-vertical-position-top') && !widget.classList.contains('is-sticky')) { |
| 28 | const wpAdminBar = document.getElementById('wpadminbar'); |
| 29 | const elementToInsert = el.closest('.elementor'); |
| 30 | if (wpAdminBar) { |
| 31 | wpAdminBar.after(elementToInsert); |
| 32 | } else { |
| 33 | document.body.prepend(elementToInsert); |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | exports["default"] = FloatingBarDomHelper; |
| 39 | |
| 40 | /***/ }), |
| 41 | |
| 42 | /***/ "../modules/floating-buttons/assets/js/floating-bars/frontend/handlers/floating-bars.js": |
| 43 | /*!**********************************************************************************************!*\ |
| 44 | !*** ../modules/floating-buttons/assets/js/floating-bars/frontend/handlers/floating-bars.js ***! |
| 45 | \**********************************************************************************************/ |
| 46 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 47 | |
| 48 | |
| 49 | |
| 50 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 51 | Object.defineProperty(exports, "__esModule", ({ |
| 52 | value: true |
| 53 | })); |
| 54 | exports["default"] = void 0; |
| 55 | __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 56 | __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); |
| 57 | var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../assets/dev/js/frontend/handlers/base.js")); |
| 58 | var _floatinBarDom = _interopRequireDefault(__webpack_require__(/*! ../classes/floatin-bar-dom */ "../modules/floating-buttons/assets/js/floating-bars/frontend/classes/floatin-bar-dom.js")); |
| 59 | var _clickTracking = _interopRequireDefault(__webpack_require__(/*! ../../../shared/frontend/handlers/click-tracking */ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js")); |
| 60 | class FloatingBarsHandler extends _base.default { |
| 61 | getDefaultSettings() { |
| 62 | return { |
| 63 | selectors: { |
| 64 | main: '.e-floating-bars', |
| 65 | closeButton: '.e-floating-bars__close-button', |
| 66 | ctaButton: '.e-floating-bars__cta-button' |
| 67 | }, |
| 68 | constants: { |
| 69 | ctaEntranceAnimation: 'style_cta_button_animation', |
| 70 | ctaEntranceAnimationDelay: 'style_cta_button_animation_delay', |
| 71 | hasEntranceAnimation: 'has-entrance-animation', |
| 72 | visible: 'visible', |
| 73 | isSticky: 'is-sticky', |
| 74 | hasVerticalPositionTop: 'has-vertical-position-top', |
| 75 | hasVerticalPositionBottom: 'has-vertical-position-bottom', |
| 76 | isHidden: 'is-hidden', |
| 77 | animated: 'animated' |
| 78 | } |
| 79 | }; |
| 80 | } |
| 81 | getDefaultElements() { |
| 82 | const selectors = this.getSettings('selectors'); |
| 83 | return { |
| 84 | main: this.$element[0].querySelector(selectors.main), |
| 85 | mainAll: this.$element[0].querySelectorAll(selectors.main), |
| 86 | closeButton: this.$element[0].querySelector(selectors.closeButton), |
| 87 | ctaButton: this.$element[0].querySelector(selectors.ctaButton) |
| 88 | }; |
| 89 | } |
| 90 | onElementChange(property) { |
| 91 | const changedProperties = ['advanced_vertical_position']; |
| 92 | if (changedProperties.includes(property)) { |
| 93 | this.initDefaultState(); |
| 94 | } |
| 95 | } |
| 96 | getResponsiveSetting(controlName) { |
| 97 | const currentDevice = elementorFrontend.getCurrentDeviceMode(); |
| 98 | return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(), controlName, '', currentDevice); |
| 99 | } |
| 100 | bindEvents() { |
| 101 | if (this.elements.closeButton) { |
| 102 | this.elements.closeButton.addEventListener('click', this.closeFloatingBar.bind(this)); |
| 103 | } |
| 104 | if (this.elements.ctaButton) { |
| 105 | this.elements.ctaButton.addEventListener('animationend', this.handleAnimationEnd.bind(this)); |
| 106 | } |
| 107 | if (this.elements.main) { |
| 108 | window.addEventListener('keyup', this.onDocumentKeyup.bind(this)); |
| 109 | } |
| 110 | if (this.hasStickyElements()) { |
| 111 | window.addEventListener('resize', this.handleStickyElements.bind(this)); |
| 112 | } |
| 113 | } |
| 114 | isStickyTop() { |
| 115 | const { |
| 116 | isSticky, |
| 117 | hasVerticalPositionTop |
| 118 | } = this.getSettings('constants'); |
| 119 | return this.elements.main.classList.contains(isSticky) && this.elements.main.classList.contains(hasVerticalPositionTop); |
| 120 | } |
| 121 | isStickyBottom() { |
| 122 | const { |
| 123 | isSticky, |
| 124 | hasVerticalPositionBottom |
| 125 | } = this.getSettings('constants'); |
| 126 | return this.elements.main.classList.contains(isSticky) && this.elements.main.classList.contains(hasVerticalPositionBottom); |
| 127 | } |
| 128 | hasStickyElements() { |
| 129 | const stickyElements = document.querySelectorAll('.elementor-sticky'); |
| 130 | return stickyElements.length > 0; |
| 131 | } |
| 132 | focusOnLoad() { |
| 133 | this.elements.main.setAttribute('tabindex', '0'); |
| 134 | this.elements.main.focus({ |
| 135 | focusVisible: true |
| 136 | }); |
| 137 | } |
| 138 | applyBodyPadding() { |
| 139 | const mainHeight = this.elements.main.offsetHeight; |
| 140 | document.body.style.paddingTop = `${mainHeight}px`; |
| 141 | } |
| 142 | removeBodyPadding() { |
| 143 | document.body.style.paddingTop = '0'; |
| 144 | } |
| 145 | handleWPAdminBar() { |
| 146 | const wpAdminBar = elementorFrontend.elements.$wpAdminBar; |
| 147 | if (wpAdminBar.length) { |
| 148 | this.elements.main.style.top = `${wpAdminBar.height()}px`; |
| 149 | } |
| 150 | } |
| 151 | handleStickyElements() { |
| 152 | const mainHeight = this.elements.main.offsetHeight; |
| 153 | const wpAdminBar = elementorFrontend.elements.$wpAdminBar; |
| 154 | const stickyElements = document.querySelectorAll('.elementor-sticky:not(.elementor-sticky__spacer)'); |
| 155 | if (0 === stickyElements.length) { |
| 156 | return; |
| 157 | } |
| 158 | stickyElements.forEach(stickyElement => { |
| 159 | const dataSettings = stickyElement.getAttribute('data-settings'); |
| 160 | const stickyPosition = JSON.parse(dataSettings)?.sticky; |
| 161 | const isTop = '0px' === stickyElement.style.top || 'top' === stickyPosition; |
| 162 | const isBottom = '0px' === stickyElement.style.bottom || 'bottom' === stickyPosition; |
| 163 | if (this.isStickyTop() && isTop) { |
| 164 | if (wpAdminBar.length) { |
| 165 | stickyElement.style.top = `${mainHeight + wpAdminBar.height()}px`; |
| 166 | } else { |
| 167 | stickyElement.style.top = `${mainHeight}px`; |
| 168 | } |
| 169 | } else if (this.isStickyBottom() && isBottom) { |
| 170 | stickyElement.style.bottom = `${mainHeight}px`; |
| 171 | } |
| 172 | if (elementorFrontend.isEditMode()) { |
| 173 | if (isTop) { |
| 174 | stickyElement.style.top = this.isStickyTop() ? `${mainHeight}px` : '0px'; |
| 175 | } else if (isBottom) { |
| 176 | stickyElement.style.bottom = this.isStickyBottom() ? `${mainHeight}px` : '0px'; |
| 177 | } |
| 178 | } |
| 179 | }); |
| 180 | document.querySelectorAll('.elementor-sticky__spacer').forEach(stickySpacer => { |
| 181 | const dataSettings = stickySpacer.getAttribute('data-settings'); |
| 182 | const stickyPosition = JSON.parse(dataSettings)?.sticky; |
| 183 | const isTop = '0px' === stickySpacer.style.top || 'top' === stickyPosition; |
| 184 | if (this.isStickyTop() && isTop) { |
| 185 | stickySpacer.style.marginBottom = `${mainHeight}px`; |
| 186 | } |
| 187 | }); |
| 188 | } |
| 189 | closeFloatingBar() { |
| 190 | const { |
| 191 | isHidden |
| 192 | } = this.getSettings('constants'); |
| 193 | if (!elementorFrontend.isEditMode()) { |
| 194 | this.elements.main.classList.add(isHidden); |
| 195 | if (this.hasStickyElements()) { |
| 196 | this.handleStickyElements(); |
| 197 | } else if (this.isStickyTop()) { |
| 198 | this.removeBodyPadding(); |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | initEntranceAnimation() { |
| 203 | const { |
| 204 | animated, |
| 205 | ctaEntranceAnimation, |
| 206 | ctaEntranceAnimationDelay, |
| 207 | hasEntranceAnimation |
| 208 | } = this.getSettings('constants'); |
| 209 | const entranceAnimationClass = this.getResponsiveSetting(ctaEntranceAnimation); |
| 210 | const entranceAnimationDelay = this.getResponsiveSetting(ctaEntranceAnimationDelay) || 0; |
| 211 | const setTimeoutDelay = entranceAnimationDelay + 500; |
| 212 | this.elements.ctaButton.classList.add(animated); |
| 213 | this.elements.ctaButton.classList.add(entranceAnimationClass); |
| 214 | setTimeout(() => { |
| 215 | this.elements.ctaButton.classList.remove(hasEntranceAnimation); |
| 216 | }, setTimeoutDelay); |
| 217 | } |
| 218 | handleAnimationEnd() { |
| 219 | this.removeEntranceAnimationClasses(); |
| 220 | this.focusOnLoad(); |
| 221 | } |
| 222 | removeEntranceAnimationClasses() { |
| 223 | if (!this.elements.ctaButton) { |
| 224 | return; |
| 225 | } |
| 226 | const { |
| 227 | animated, |
| 228 | ctaEntranceAnimation, |
| 229 | visible |
| 230 | } = this.getSettings('constants'); |
| 231 | const entranceAnimationClass = this.getResponsiveSetting(ctaEntranceAnimation); |
| 232 | this.elements.ctaButton.classList.remove(animated); |
| 233 | this.elements.ctaButton.classList.remove(entranceAnimationClass); |
| 234 | this.elements.ctaButton.classList.add(visible); |
| 235 | } |
| 236 | onDocumentKeyup(event) { |
| 237 | // Bail if not ESC key |
| 238 | if (event.keyCode !== 27 || !this.elements.main) { |
| 239 | return; |
| 240 | } |
| 241 | |
| 242 | /* eslint-disable @wordpress/no-global-active-element */ |
| 243 | if (this.elements.main.contains(document.activeElement)) { |
| 244 | this.closeFloatingBar(); |
| 245 | } |
| 246 | /* eslint-enable @wordpress/no-global-active-element */ |
| 247 | } |
| 248 | initDefaultState() { |
| 249 | const { |
| 250 | hasEntranceAnimation |
| 251 | } = this.getSettings('constants'); |
| 252 | if (this.isStickyTop()) { |
| 253 | this.handleWPAdminBar(); |
| 254 | } |
| 255 | if (this.hasStickyElements()) { |
| 256 | this.handleStickyElements(); |
| 257 | } else if (this.isStickyTop()) { |
| 258 | this.applyBodyPadding(); |
| 259 | } |
| 260 | if (this.elements.main && !this.elements.ctaButton.classList.contains(hasEntranceAnimation) && !elementorFrontend.isEditMode()) { |
| 261 | this.focusOnLoad(); |
| 262 | } |
| 263 | } |
| 264 | setupInnerContainer() { |
| 265 | this.elements.main.closest('.e-con-inner').classList.add('e-con-inner--floating-bars'); |
| 266 | this.elements.main.closest('.e-con').classList.add('e-con--floating-bars'); |
| 267 | } |
| 268 | onInit(...args) { |
| 269 | const { |
| 270 | hasEntranceAnimation |
| 271 | } = this.getSettings('constants'); |
| 272 | super.onInit(...args); |
| 273 | this.clickTrackingHandler = new _clickTracking.default({ |
| 274 | $element: this.$element |
| 275 | }); |
| 276 | const domHelper = new _floatinBarDom.default(this.$element); |
| 277 | domHelper.maybeMoveToTop(); |
| 278 | if (this.elements.ctaButton && this.elements.ctaButton.classList.contains(hasEntranceAnimation)) { |
| 279 | this.initEntranceAnimation(); |
| 280 | } |
| 281 | this.initDefaultState(); |
| 282 | this.setupInnerContainer(); |
| 283 | } |
| 284 | } |
| 285 | exports["default"] = FloatingBarsHandler; |
| 286 | |
| 287 | /***/ }), |
| 288 | |
| 289 | /***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js": |
| 290 | /*!****************************************************************************************!*\ |
| 291 | !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! |
| 292 | \****************************************************************************************/ |
| 293 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 294 | |
| 295 | |
| 296 | |
| 297 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 298 | Object.defineProperty(exports, "__esModule", ({ |
| 299 | value: true |
| 300 | })); |
| 301 | exports["default"] = void 0; |
| 302 | __webpack_require__(/*! core-js/modules/es.array.push.js */ "../node_modules/core-js/modules/es.array.push.js"); |
| 303 | __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 304 | __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); |
| 305 | var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../assets/dev/js/frontend/handlers/base.js")); |
| 306 | class ClickTrackingHandler extends _base.default { |
| 307 | clicks = []; |
| 308 | getDefaultSettings() { |
| 309 | return { |
| 310 | selectors: { |
| 311 | contentWrapper: '.e-contact-buttons__content-wrapper', |
| 312 | contactButtonCore: '.e-contact-buttons__send-button', |
| 313 | contentWrapperFloatingBars: '.e-floating-bars', |
| 314 | floatingBarCTAButton: '.e-floating-bars__cta-button', |
| 315 | elementorWrapper: '[data-elementor-type="floating-buttons"]' |
| 316 | } |
| 317 | }; |
| 318 | } |
| 319 | getDefaultElements() { |
| 320 | const selectors = this.getSettings('selectors'); |
| 321 | return { |
| 322 | contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), |
| 323 | contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars) |
| 324 | }; |
| 325 | } |
| 326 | bindEvents() { |
| 327 | if (this.elements.contentWrapper) { |
| 328 | this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); |
| 329 | } |
| 330 | if (this.elements.contentWrapperFloatingBars) { |
| 331 | this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); |
| 332 | } |
| 333 | window.addEventListener('beforeunload', () => { |
| 334 | if (this.clicks.length > 0) { |
| 335 | this.sendClicks(); |
| 336 | } |
| 337 | }); |
| 338 | } |
| 339 | onChatButtonTrackClick(event) { |
| 340 | const targetElement = event.target || event.srcElement; |
| 341 | const selectors = this.getSettings('selectors'); |
| 342 | if (targetElement.matches(selectors.contactButtonCore) || targetElement.closest(selectors.contactButtonCore) || targetElement.matches(selectors.floatingBarCTAButton) || targetElement.closest(selectors.floatingBarCTAButton)) { |
| 343 | this.getDocumentIdAndTrack(targetElement, selectors); |
| 344 | } |
| 345 | } |
| 346 | getDocumentIdAndTrack(targetElement, selectors) { |
| 347 | const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; |
| 348 | this.trackClick(documentId); |
| 349 | } |
| 350 | trackClick(documentId) { |
| 351 | if (!documentId) { |
| 352 | return; |
| 353 | } |
| 354 | this.clicks.push(documentId); |
| 355 | if (this.clicks.length >= 10) { |
| 356 | this.sendClicks(); |
| 357 | } |
| 358 | } |
| 359 | sendClicks() { |
| 360 | const formData = new FormData(); |
| 361 | formData.append('action', 'elementor_send_clicks'); |
| 362 | formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); |
| 363 | this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); |
| 364 | fetch(elementorFrontendConfig?.urls?.ajaxurl, { |
| 365 | method: 'POST', |
| 366 | body: formData |
| 367 | }).then(() => { |
| 368 | this.clicks = []; |
| 369 | }); |
| 370 | } |
| 371 | } |
| 372 | exports["default"] = ClickTrackingHandler; |
| 373 | |
| 374 | /***/ }) |
| 375 | |
| 376 | }]); |
| 377 | //# sourceMappingURL=floating-bars.a6e6a043444b62f64f82.bundle.js.map |