packages
2 months ago
00f53f1b378f6c98c043.bundle.min.js
5 months ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
0982f37bec0944fbcb10.bundle.js
5 months ago
0bc41c4656ca54cf2aca.bundle.min.js
5 months ago
137ba3baf43f287996c2.bundle.min.js
5 months ago
1564d2bfa4591bf857f3.bundle.min.js
5 months ago
197583acd246fea0e25d.bundle.js
6 months ago
1f7fa1d64dd4cef4a3c0.bundle.js
5 months ago
2140afa714e988f1069e.bundle.js
2 months 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
3c18b6eb4e735ca7e8bf.bundle.js
5 months ago
3c838288a9b7ddd2aea4.bundle.min.js
5 months ago
3d1613aca86991103452.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
4246c56134ca9ba65163.bundle.js
5 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4812775bcbc0ff8a9043.bundle.min.js
5 months ago
4886b33c17731474e197.bundle.min.js
5 months ago
4927500be197e062162e.bundle.min.js
2 months ago
52ff17c2f566e528dc72.bundle.js
2 months ago
5b13d0f77c0ac139c979.bundle.js
5 months ago
5b74c81f4d425912a202.bundle.min.js
3 months ago
6117d083decd13b6ed73.bundle.js
2 months ago
64b3c0850f66b46478fb.bundle.min.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
6a19e86dd8c1f9165dbe.bundle.js
6 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6cb9e42b9b73a76315e0.bundle.js
5 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
72459a35b6570acc77f3.bundle.js
5 months ago
7745b82dc4a05385ef1f.bundle.js
5 months ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
5 months ago
7f2c78456ab3f406f3df.bundle.js
5 months ago
8277989eebcfba278cb0.bundle.min.js
8 months ago
84288e5699f5d8b8b23e.bundle.min.js
5 months ago
877227b9d759b63096a9.bundle.js
5 months ago
8ac2c6e532225b54dba2.bundle.js
5 months ago
8b4f35f99eb521b37d0c.bundle.js
5 months 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
9832c866a8fe9b51f9d2.bundle.min.js
5 months 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
a2ea929f439e819b924b.bundle.min.js
5 months ago
a9f41949787209626737.bundle.min.js
5 months ago
ac53273f887639e3c6ea.bundle.min.js
5 months 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
3 months 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
2 months 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
3 months ago
admin-top-bar.min.js
3 months ago
admin-top-bar.strings.js
6 months ago
admin.js
3 months ago
admin.min.js
3 months ago
admin.min.js.LICENSE.txt
10 months ago
admin.strings.js
6 months ago
aee13673e923469c3275.bundle.min.js
5 months 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
3 months 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
2 months ago
alert.42cc1d522ef5c60bf874.bundle.min.js
8 months ago
alert.fd509aa768e7b35a8e32.bundle.js
6 months ago
announcements-app.js
3 months ago
announcements-app.min.js
3 months 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
2 months 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
2 months ago
app.js
3 months ago
app.min.js
3 months ago
app.min.js.LICENSE.txt
10 months ago
app.strings.js
2 months ago
atomic-widgets-editor.js
2 months ago
atomic-widgets-editor.min.js
2 months ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
3 months ago
atomic-widgets-frontend-handler.js
2 months ago
atomic-widgets-frontend-handler.min.js
2 months ago
b09b262748a4be8417ce.bundle.js
5 months ago
b668f6906820570e60b5.bundle.min.js
5 months ago
b96d70044d0d67c2df19.bundle.min.js
8 months ago
b97ced1683f62f5686fa.bundle.min.js
5 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
bff204c1ab0d15e0a69b.bundle.min.js
5 months ago
c13d205fa26f8af1ce7c.bundle.js
6 months 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
3 months ago
common-modules.min.js
3 months ago
common-modules.strings.js
6 months ago
common.js
2 months ago
common.min.js
2 months 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
d245aa80c28d9ec3617d.bundle.js
3 months 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
daedc6797eaad5c82711.bundle.min.js
8 months ago
db27207322ef9be952ee.bundle.js
5 months ago
design-system-sync.js
2 months ago
design-system-sync.min.js
2 months ago
design-system-sync.strings.js
3 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
e-home-screen.js
3 months ago
e-home-screen.min.js
3 months ago
e-home-screen.strings.js
3 months 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
e3b540e2c02813e75f38.bundle.min.js
5 months ago
e459c6c89c0c0899c850.bundle.js
6 months ago
e7d71f4e1d39edbc1fb6.bundle.js
5 months ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
editor-document.js
6 months ago
editor-document.min.js
8 months ago
editor-document.strings.js
2 months 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
3 months ago
editor-interactions.min.js
3 months 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
3 months ago
editor-modules.min.js
3 months ago
editor-modules.min.js.LICENSE.txt
10 months ago
editor-modules.strings.js
2 months 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
3 months ago
editor-one-sidebar-navigation.min.js
3 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
2 months ago
editor-one-top-bar.min.js
2 months 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
3 months ago
editor-v4-opt-in-alphachip.min.js
3 months ago
editor-v4-opt-in-alphachip.strings.js
3 months ago
editor-v4-opt-in.js
3 months ago
editor-v4-opt-in.min.js
3 months ago
editor-v4-opt-in.min.js.LICENSE.txt
6 months ago
editor-v4-opt-in.strings.js
3 months ago
editor.js
2 months ago
editor.min.js
2 months ago
editor.min.js.LICENSE.txt
6 months ago
editor.strings.js
6 months ago
ef2100ac3eda1a957819.bundle.min.js
8 months ago
ef35c83e4628f0a5c328.bundle.js
5 months ago
element-manager-admin.js
3 months ago
element-manager-admin.min.js
3 months ago
element-manager-admin.min.js.LICENSE.txt
10 months ago
element-manager-admin.strings.js
3 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
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
3 months ago
floating-elements-modal.min.js
3 months ago
floating-elements-modal.strings.js
6 months ago
frontend-modules.js
3 months ago
frontend-modules.min.js
3 months ago
frontend.js
3 months ago
frontend.min.js
3 months 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
2 months ago
import-export-customization-admin.js
3 months ago
import-export-customization-admin.min.js
3 months ago
import-export-customization-admin.min.js.LICENSE.txt
8 months ago
import-export-customization-admin.strings.js
2 months ago
interactions-shared-utils.js
3 months ago
interactions-shared-utils.min.js
3 months ago
interactions-shared-utils.strings.js
3 months ago
interactions.js
2 months ago
interactions.min.js
2 months 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
3 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
3 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
3 months ago
tabs-handler.min.js
3 months ago
tabs-preview-handler.js
6 months ago
tabs-preview-handler.min.js
6 months 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
3 months ago
webpack.runtime.min.js
3 months 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
contact-buttons.086261d3e9c4d8037686.bundle.js
399 lines
| 1 | "use strict"; |
| 2 | (self["webpackChunkelementorFrontend"] = self["webpackChunkelementorFrontend"] || []).push([["contact-buttons"],{ |
| 3 | |
| 4 | /***/ "../modules/floating-buttons/assets/js/floating-buttons/frontend/handlers/contact-buttons.js": |
| 5 | /*!***************************************************************************************************!*\ |
| 6 | !*** ../modules/floating-buttons/assets/js/floating-buttons/frontend/handlers/contact-buttons.js ***! |
| 7 | \***************************************************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | |
| 10 | |
| 11 | |
| 12 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 13 | Object.defineProperty(exports, "__esModule", ({ |
| 14 | value: true |
| 15 | })); |
| 16 | exports["default"] = void 0; |
| 17 | var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../assets/dev/js/frontend/handlers/base.js")); |
| 18 | var _clickTracking = _interopRequireDefault(__webpack_require__(/*! ../../../shared/frontend/handlers/click-tracking */ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js")); |
| 19 | class ContactButtonsHandler extends _base.default { |
| 20 | getDefaultSettings() { |
| 21 | return { |
| 22 | selectors: { |
| 23 | main: '.e-contact-buttons', |
| 24 | content: '.e-contact-buttons__content', |
| 25 | contentWrapper: '.e-contact-buttons__content-wrapper', |
| 26 | chatButton: '.e-contact-buttons__chat-button', |
| 27 | closeButton: '.e-contact-buttons__close-button', |
| 28 | messageBubbleTime: '.e-contact-buttons__message-bubble-time' |
| 29 | }, |
| 30 | constants: { |
| 31 | entranceAnimation: 'style_chat_box_entrance_animation', |
| 32 | exitAnimation: 'style_chat_box_exit_animation', |
| 33 | chatButtonAnimation: 'style_chat_button_animation', |
| 34 | animated: 'animated', |
| 35 | animatedWrapper: 'animated-wrapper', |
| 36 | visible: 'visible', |
| 37 | reverse: 'reverse', |
| 38 | hidden: 'hidden', |
| 39 | hasAnimations: 'has-animations', |
| 40 | hasEntranceAnimation: 'has-entrance-animation', |
| 41 | none: 'none' |
| 42 | } |
| 43 | }; |
| 44 | } |
| 45 | getDefaultElements() { |
| 46 | const selectors = this.getSettings('selectors'); |
| 47 | return { |
| 48 | main: this.$element[0].querySelector(selectors.main), |
| 49 | content: this.$element[0].querySelector(selectors.content), |
| 50 | contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), |
| 51 | chatButton: this.$element[0].querySelector(selectors.chatButton), |
| 52 | closeButton: this.$element[0].querySelector(selectors.closeButton), |
| 53 | messageBubbleTime: this.$element[0].querySelector(selectors.messageBubbleTime) |
| 54 | }; |
| 55 | } |
| 56 | getResponsiveSetting(controlName) { |
| 57 | const currentDevice = elementorFrontend.getCurrentDeviceMode(); |
| 58 | return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(), controlName, '', currentDevice); |
| 59 | } |
| 60 | bindEvents() { |
| 61 | if (this.elements.closeButton) { |
| 62 | this.elements.closeButton.addEventListener('click', this.closeChatBox.bind(this)); |
| 63 | } |
| 64 | if (this.elements.chatButton) { |
| 65 | this.elements.chatButton.addEventListener('click', this.onChatButtonClick.bind(this)); |
| 66 | this.elements.chatButton.addEventListener('animationend', this.removeChatButtonAnimationClasses.bind(this)); |
| 67 | } |
| 68 | if (this.elements.content) { |
| 69 | this.elements.content.addEventListener('animationend', this.removeAnimationClasses.bind(this)); |
| 70 | } |
| 71 | if (this.elements.contentWrapper) { |
| 72 | window.addEventListener('keyup', this.onDocumentKeyup.bind(this)); |
| 73 | } |
| 74 | } |
| 75 | contentWrapperIsHidden(hide) { |
| 76 | if (!this.elements.contentWrapper) { |
| 77 | return false; |
| 78 | } |
| 79 | const { |
| 80 | hidden |
| 81 | } = this.getSettings('constants'); |
| 82 | |
| 83 | // Set current state |
| 84 | if (true === hide) { |
| 85 | this.elements.contentWrapper.classList.add(hidden); |
| 86 | this.elements.contentWrapper.setAttribute('aria-hidden', 'true'); |
| 87 | return; |
| 88 | } |
| 89 | if (false === hide) { |
| 90 | this.elements.contentWrapper.classList.remove(hidden); |
| 91 | this.elements.contentWrapper.setAttribute('aria-hidden', 'false'); |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | // Get current state |
| 96 | return this.elements.contentWrapper.classList.contains(hidden); |
| 97 | } |
| 98 | onDocumentKeyup(event) { |
| 99 | // Bail if not ESC key |
| 100 | if (event.keyCode !== 27 || !this.elements.main) { |
| 101 | return; |
| 102 | } |
| 103 | |
| 104 | /* eslint-disable @wordpress/no-global-active-element */ |
| 105 | if (!this.contentWrapperIsHidden() && this.elements.main.contains(document.activeElement)) { |
| 106 | this.closeChatBox(); |
| 107 | } |
| 108 | /* eslint-enable @wordpress/no-global-active-element */ |
| 109 | } |
| 110 | removeAnimationClasses() { |
| 111 | if (!this.elements.content) { |
| 112 | return; |
| 113 | } |
| 114 | const { |
| 115 | reverse, |
| 116 | entranceAnimation, |
| 117 | exitAnimation, |
| 118 | animated, |
| 119 | visible |
| 120 | } = this.getSettings('constants'); |
| 121 | const isExitAnimation = this.elements.content.classList.contains(reverse), |
| 122 | openAnimationClass = this.getResponsiveSetting(entranceAnimation), |
| 123 | exitAnimationClass = this.getResponsiveSetting(exitAnimation); |
| 124 | if (isExitAnimation) { |
| 125 | this.elements.content.classList.remove(animated); |
| 126 | this.elements.content.classList.remove(reverse); |
| 127 | if (exitAnimationClass) { |
| 128 | this.elements.content.classList.remove(exitAnimationClass); |
| 129 | } |
| 130 | this.elements.content.classList.remove(visible); |
| 131 | } else { |
| 132 | this.elements.content.classList.remove(animated); |
| 133 | if (openAnimationClass) { |
| 134 | this.elements.content.classList.remove(openAnimationClass); |
| 135 | } |
| 136 | this.elements.content.classList.add(visible); |
| 137 | } |
| 138 | } |
| 139 | chatBoxEntranceAnimation() { |
| 140 | const { |
| 141 | entranceAnimation, |
| 142 | animated, |
| 143 | animatedWrapper, |
| 144 | none |
| 145 | } = this.getSettings('constants'); |
| 146 | const entranceAnimationControl = this.getResponsiveSetting(entranceAnimation); |
| 147 | if (!entranceAnimationControl || none === entranceAnimationControl) { |
| 148 | return; |
| 149 | } |
| 150 | if (this.elements.content) { |
| 151 | this.elements.content.classList.add(animated); |
| 152 | this.elements.content.classList.add(entranceAnimationControl); |
| 153 | } |
| 154 | if (this.elements.contentWrapper) { |
| 155 | this.elements.contentWrapper.classList.remove(animatedWrapper); |
| 156 | } |
| 157 | } |
| 158 | chatBoxExitAnimation() { |
| 159 | const { |
| 160 | reverse, |
| 161 | exitAnimation, |
| 162 | animated, |
| 163 | animatedWrapper, |
| 164 | none |
| 165 | } = this.getSettings('constants'); |
| 166 | const exitAnimationControl = this.getResponsiveSetting(exitAnimation); |
| 167 | if (!exitAnimationControl || none === exitAnimationControl) { |
| 168 | return; |
| 169 | } |
| 170 | if (this.elements.content) { |
| 171 | this.elements.content.classList.add(animated); |
| 172 | this.elements.content.classList.add(reverse); |
| 173 | this.elements.content.classList.add(exitAnimationControl); |
| 174 | } |
| 175 | if (this.elements.contentWrapper) { |
| 176 | this.elements.contentWrapper.classList.add(animatedWrapper); |
| 177 | } |
| 178 | } |
| 179 | openChatBox() { |
| 180 | const { |
| 181 | hasAnimations, |
| 182 | visible |
| 183 | } = this.getSettings('constants'); |
| 184 | if (this.elements.main && this.elements.main.classList.contains(hasAnimations)) { |
| 185 | this.chatBoxEntranceAnimation(); |
| 186 | } else if (this.elements.content) { |
| 187 | this.elements.content.classList.add(visible); |
| 188 | } |
| 189 | if (this.elements.contentWrapper) { |
| 190 | this.contentWrapperIsHidden(false); |
| 191 | if (!elementorFrontend.isEditMode()) { |
| 192 | this.elements.contentWrapper.setAttribute('tabindex', '0'); |
| 193 | this.elements.contentWrapper.focus({ |
| 194 | focusVisible: true |
| 195 | }); |
| 196 | } |
| 197 | } |
| 198 | if (this.elements.chatButton) { |
| 199 | this.elements.chatButton.setAttribute('aria-expanded', 'true'); |
| 200 | } |
| 201 | if (this.elements.closeButton) { |
| 202 | this.elements.closeButton.setAttribute('aria-expanded', 'true'); |
| 203 | } |
| 204 | } |
| 205 | closeChatBox() { |
| 206 | const { |
| 207 | hasAnimations, |
| 208 | visible |
| 209 | } = this.getSettings('constants'); |
| 210 | if (this.elements.main && this.elements.main.classList.contains(hasAnimations)) { |
| 211 | this.chatBoxExitAnimation(); |
| 212 | } else if (this.elements.content) { |
| 213 | this.elements.content.classList.remove(visible); |
| 214 | } |
| 215 | if (this.elements.contentWrapper) { |
| 216 | this.contentWrapperIsHidden(true); |
| 217 | } |
| 218 | if (this.elements.chatButton) { |
| 219 | this.elements.chatButton.setAttribute('aria-expanded', 'false'); |
| 220 | this.elements.chatButton.focus({ |
| 221 | focusVisible: true |
| 222 | }); |
| 223 | } |
| 224 | if (this.elements.closeButton) { |
| 225 | this.elements.closeButton.setAttribute('aria-expanded', 'false'); |
| 226 | } |
| 227 | } |
| 228 | onChatButtonClick() { |
| 229 | if (this.elements.contentWrapper && this.contentWrapperIsHidden()) { |
| 230 | this.openChatBox(); |
| 231 | } else { |
| 232 | this.closeChatBox(); |
| 233 | } |
| 234 | } |
| 235 | initMessageBubbleTime() { |
| 236 | if (!this.elements.messageBubbleTime) { |
| 237 | return; |
| 238 | } |
| 239 | const messageBubbleTimeFormat = this.elements.messageBubbleTime.dataset.timeFormat; |
| 240 | const is12hFormat = '12h' === messageBubbleTimeFormat; |
| 241 | this.elements.messageBubbleTime.innerHTML = new Intl.DateTimeFormat('default', { |
| 242 | hour12: is12hFormat, |
| 243 | hour: 'numeric', |
| 244 | minute: 'numeric' |
| 245 | }).format(new Date()); |
| 246 | } |
| 247 | removeChatButtonAnimationClasses() { |
| 248 | if (!this.elements.chatButton) { |
| 249 | return; |
| 250 | } |
| 251 | const { |
| 252 | chatButtonAnimation, |
| 253 | visible |
| 254 | } = this.getSettings('constants'); |
| 255 | this.elements.chatButton.classList.remove(chatButtonAnimation); |
| 256 | this.elements.chatButton.classList.add(visible); |
| 257 | } |
| 258 | initChatButtonEntranceAnimation() { |
| 259 | const { |
| 260 | none, |
| 261 | chatButtonAnimation |
| 262 | } = this.getSettings('constants'); |
| 263 | const entranceAnimationControl = this.getResponsiveSetting(chatButtonAnimation); |
| 264 | if (!entranceAnimationControl || none === entranceAnimationControl) { |
| 265 | return; |
| 266 | } |
| 267 | this.elements.chatButton.classList.add(entranceAnimationControl); |
| 268 | } |
| 269 | initDefaultState() { |
| 270 | // Manage accessibility |
| 271 | if (this.elements.contentWrapper) { |
| 272 | const isHidden = this.contentWrapperIsHidden(); |
| 273 | if (this.elements.chatButton) { |
| 274 | this.elements.chatButton.setAttribute('aria-expanded', !isHidden); |
| 275 | } |
| 276 | if (this.elements.closeButton) { |
| 277 | this.elements.closeButton.setAttribute('aria-expanded', !isHidden); |
| 278 | } |
| 279 | } |
| 280 | if (elementorFrontend.isEditMode() && 'floating-buttons' === elementor?.config?.document?.type) { |
| 281 | this.openChatBox(); |
| 282 | } |
| 283 | } |
| 284 | setupInnerContainer() { |
| 285 | this.elements.main.closest('.e-con-inner').classList.add('e-con-inner--floating-buttons'); |
| 286 | } |
| 287 | onInit(...args) { |
| 288 | const { |
| 289 | hasEntranceAnimation |
| 290 | } = this.getSettings('constants'); |
| 291 | super.onInit(...args); |
| 292 | this.clickTrackingHandler = new _clickTracking.default({ |
| 293 | $element: this.$element |
| 294 | }); |
| 295 | if (this.elements.messageBubbleTime) { |
| 296 | this.initMessageBubbleTime(); |
| 297 | } |
| 298 | this.initDefaultState(); |
| 299 | if (this.elements.chatButton) { |
| 300 | if (this.elements.chatButton.classList.contains(hasEntranceAnimation)) { |
| 301 | this.initChatButtonEntranceAnimation(); |
| 302 | } |
| 303 | } |
| 304 | this.setupInnerContainer(); |
| 305 | } |
| 306 | } |
| 307 | exports["default"] = ContactButtonsHandler; |
| 308 | |
| 309 | /***/ }), |
| 310 | |
| 311 | /***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js": |
| 312 | /*!****************************************************************************************!*\ |
| 313 | !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! |
| 314 | \****************************************************************************************/ |
| 315 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 316 | |
| 317 | |
| 318 | |
| 319 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 320 | Object.defineProperty(exports, "__esModule", ({ |
| 321 | value: true |
| 322 | })); |
| 323 | exports["default"] = void 0; |
| 324 | __webpack_require__(/*! core-js/modules/es.array.push.js */ "../node_modules/core-js/modules/es.array.push.js"); |
| 325 | __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 326 | __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ "../node_modules/core-js/modules/esnext.iterator.for-each.js"); |
| 327 | var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../assets/dev/js/frontend/handlers/base.js")); |
| 328 | class ClickTrackingHandler extends _base.default { |
| 329 | clicks = []; |
| 330 | getDefaultSettings() { |
| 331 | return { |
| 332 | selectors: { |
| 333 | contentWrapper: '.e-contact-buttons__content-wrapper', |
| 334 | contactButtonCore: '.e-contact-buttons__send-button', |
| 335 | contentWrapperFloatingBars: '.e-floating-bars', |
| 336 | floatingBarCTAButton: '.e-floating-bars__cta-button', |
| 337 | elementorWrapper: '[data-elementor-type="floating-buttons"]' |
| 338 | } |
| 339 | }; |
| 340 | } |
| 341 | getDefaultElements() { |
| 342 | const selectors = this.getSettings('selectors'); |
| 343 | return { |
| 344 | contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), |
| 345 | contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars) |
| 346 | }; |
| 347 | } |
| 348 | bindEvents() { |
| 349 | if (this.elements.contentWrapper) { |
| 350 | this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); |
| 351 | } |
| 352 | if (this.elements.contentWrapperFloatingBars) { |
| 353 | this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); |
| 354 | } |
| 355 | window.addEventListener('beforeunload', () => { |
| 356 | if (this.clicks.length > 0) { |
| 357 | this.sendClicks(); |
| 358 | } |
| 359 | }); |
| 360 | } |
| 361 | onChatButtonTrackClick(event) { |
| 362 | const targetElement = event.target || event.srcElement; |
| 363 | const selectors = this.getSettings('selectors'); |
| 364 | if (targetElement.matches(selectors.contactButtonCore) || targetElement.closest(selectors.contactButtonCore) || targetElement.matches(selectors.floatingBarCTAButton) || targetElement.closest(selectors.floatingBarCTAButton)) { |
| 365 | this.getDocumentIdAndTrack(targetElement, selectors); |
| 366 | } |
| 367 | } |
| 368 | getDocumentIdAndTrack(targetElement, selectors) { |
| 369 | const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; |
| 370 | this.trackClick(documentId); |
| 371 | } |
| 372 | trackClick(documentId) { |
| 373 | if (!documentId) { |
| 374 | return; |
| 375 | } |
| 376 | this.clicks.push(documentId); |
| 377 | if (this.clicks.length >= 10) { |
| 378 | this.sendClicks(); |
| 379 | } |
| 380 | } |
| 381 | sendClicks() { |
| 382 | const formData = new FormData(); |
| 383 | formData.append('action', 'elementor_send_clicks'); |
| 384 | formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); |
| 385 | this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); |
| 386 | fetch(elementorFrontendConfig?.urls?.ajaxurl, { |
| 387 | method: 'POST', |
| 388 | body: formData |
| 389 | }).then(() => { |
| 390 | this.clicks = []; |
| 391 | }); |
| 392 | } |
| 393 | } |
| 394 | exports["default"] = ClickTrackingHandler; |
| 395 | |
| 396 | /***/ }) |
| 397 | |
| 398 | }]); |
| 399 | //# sourceMappingURL=contact-buttons.086261d3e9c4d8037686.bundle.js.map |