@qualified-salesforce/web 0.0.1-oidc-bootstrap
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/41842993ec71d6628e4949e9a22b146b.svg +3 -0
- package/7271f3433ed82fc7f56adcd9e30275f4.svg +17 -0
- package/LICENSE.txt +82 -0
- package/components/helpers/entriesStringValidations.js +69 -0
- package/components/helpers/languages.js +32 -0
- package/components/shared/assertUnreachable.js +5 -0
- package/components/shared/controls/imageCropperHelpers.js +43 -0
- package/components/shared/meetingLoadingProgressSpec.js +116 -0
- package/constants.generated.js +9883 -0
- package/css/widget/multimodal_v2/host.split-css.css +162 -0
- package/css/widget/multimodal_v2/index.split-css.panda.css +5240 -0
- package/css/widget/widget.split-css.css +100 -0
- package/fonts/inter/Inter-Black.woff +0 -0
- package/fonts/inter/Inter-Black.woff2 +0 -0
- package/fonts/inter/Inter-BlackItalic.woff +0 -0
- package/fonts/inter/Inter-BlackItalic.woff2 +0 -0
- package/fonts/inter/Inter-Bold.woff +0 -0
- package/fonts/inter/Inter-Bold.woff2 +0 -0
- package/fonts/inter/Inter-BoldItalic.woff +0 -0
- package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBold.woff +0 -0
- package/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLight.woff +0 -0
- package/fonts/inter/Inter-ExtraLight.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Italic.woff +0 -0
- package/fonts/inter/Inter-Italic.woff2 +0 -0
- package/fonts/inter/Inter-Light.woff +0 -0
- package/fonts/inter/Inter-Light.woff2 +0 -0
- package/fonts/inter/Inter-LightItalic.woff +0 -0
- package/fonts/inter/Inter-LightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Medium.woff +0 -0
- package/fonts/inter/Inter-Medium.woff2 +0 -0
- package/fonts/inter/Inter-MediumItalic.woff +0 -0
- package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/fonts/inter/Inter-Regular.woff +0 -0
- package/fonts/inter/Inter-Regular.woff2 +0 -0
- package/fonts/inter/Inter-SemiBold.woff +0 -0
- package/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-Thin.woff +0 -0
- package/fonts/inter/Inter-Thin.woff2 +0 -0
- package/fonts/inter/Inter-ThinItalic.woff +0 -0
- package/fonts/inter/Inter-ThinItalic.woff2 +0 -0
- package/fonts/inter/Inter-italic.var.woff2 +0 -0
- package/fonts/inter/Inter-roman.var.woff2 +0 -0
- package/images/close.js +63 -0
- package/images/logo.js +22 -0
- package/js/4101.js +19721 -0
- package/js/daily-esm.js +9948 -0
- package/js/date-fns.js +427 -0
- package/js/multimodal_v2.js +1653 -0
- package/js/runtime.js +109 -0
- package/media/Inter-Black.796be8d8bf.woff2 +0 -0
- package/media/Inter-Black.b254104c56.woff +0 -0
- package/media/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/media/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/media/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/media/Inter-Bold.b1234477a5.woff +0 -0
- package/media/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/media/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/media/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/media/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/media/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/media/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/media/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/media/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/media/Inter-Italic.9beab78452.woff +0 -0
- package/media/Inter-Italic.d593a8df79.woff2 +0 -0
- package/media/Inter-Light.27083fa637.woff2 +0 -0
- package/media/Inter-Light.91dfddd842.woff +0 -0
- package/media/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/media/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/media/Inter-Medium.dc792b508e.woff2 +0 -0
- package/media/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/media/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/media/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/media/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/media/Inter-Regular.f356e84aa0.woff +0 -0
- package/media/Inter-SemiBold.55027e4724.woff +0 -0
- package/media/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/media/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/media/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/media/Inter-Thin.16325d9b0f.woff +0 -0
- package/media/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/media/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/media/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/media/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/media/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/package.json +20 -0
- package/packs/widget/api/docking/docking_host.js +97 -0
- package/packs/widget/api/docking/index.js +294 -0
- package/packs/widget/api/docking/shared.js +164 -0
- package/packs/widget/api/docking/viewport_lock.js +488 -0
- package/packs/widget/api/docking/viewport_resize.js +1203 -0
- package/packs/widget/esm/fonts/Inter-Black.796be8d8bf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Black.b254104c56.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.b1234477a5.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.9beab78452.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.d593a8df79.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.27083fa637.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.91dfddd842.woff +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.dc792b508e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f356e84aa0.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.55027e4724.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.16325d9b0f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/packs/widget/esm/fonts/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/packs/widget/esm/index.js +183 -0
- package/packs/widget/esm/qualified.css +5502 -0
- package/routes/app/offers/scripts/OfferMainScript.js +154 -0
- package/routes/app/offers/scripts/constants.js +71 -0
- package/routes/app/offers/scripts/main/ButtonManager.js +65 -0
- package/routes/app/offers/scripts/main/FormManager.js +325 -0
- package/routes/app/offers/scripts/main/MainContext.js +19 -0
- package/routes/app/offers/scripts/main/OfferManager.js +91 -0
- package/routes/app/offers/scripts/main/TriggerManager.js +125 -0
- package/routes/app/offers/scripts/rendering/ContentManager.js +53 -0
- package/routes/app/offers/scripts/rendering/LocationManager.js +83 -0
- package/routes/app/offers/scripts/rendering/RenderedOffer.js +188 -0
- package/routes/app/offers/scripts/rendering/Renderer.js +69 -0
- package/routes/app/offers/scripts/rendering/RenderingInitializer.js +62 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManager.js +31 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerFooter.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerHeader.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerModal.js +117 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerSidebar.js +75 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationResult.js +43 -0
- package/routes/app/offers/scripts/rendering/animations/Animator.js +78 -0
- package/routes/app/offers/scripts/rendering/animations/BaseAnimationManager.js +25 -0
- package/routes/app/offers/scripts/rendering/lib/BaseComponent.js +106 -0
- package/routes/app/offers/scripts/rendering/lib/FormComponent.js +134 -0
- package/routes/app/offers/scripts/rendering/lib/OfferComponent.js +144 -0
- package/routes/app/offers/scripts/rendering/lib/ScrollbarWidth.js +27 -0
- package/routes/app/offers/scripts/rendering/lib/decorators.js +20 -0
- package/routes/app/offers/scripts/rendering/locations/CSSVarsManager.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/ElementResizeObserver.js +49 -0
- package/routes/app/offers/scripts/rendering/locations/footer.js +53 -0
- package/routes/app/offers/scripts/rendering/locations/header/AsyncBatchProcessor.js +70 -0
- package/routes/app/offers/scripts/rendering/locations/header/CSSTransitionObserver.js +182 -0
- package/routes/app/offers/scripts/rendering/locations/header/ElementStyleChangeObserver.js +138 -0
- package/routes/app/offers/scripts/rendering/locations/header/ExternalStyleManager.js +110 -0
- package/routes/app/offers/scripts/rendering/locations/header/Header.js +353 -0
- package/routes/app/offers/scripts/rendering/locations/header/InlineStyleManager.js +105 -0
- package/routes/app/offers/scripts/rendering/locations/header/MatchingElementsObserver.js +107 -0
- package/routes/app/offers/scripts/rendering/locations/header/NewElementsObserver.js +129 -0
- package/routes/app/offers/scripts/rendering/locations/header/RuleWrapper.js +46 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObservable.js +23 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObserver.js +61 -0
- package/routes/app/offers/scripts/rendering/locations/header/ShiftedElementsManager.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementManager.js +37 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementWrapper.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectorValue.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectors.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/StyleSelectorObserver.js +294 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/constants.js +21 -0
- package/routes/app/offers/scripts/rendering/locations/header/WindowResizeObserver.js +43 -0
- package/routes/app/offers/scripts/rendering/locations/header/utils.js +25 -0
- package/routes/app/offers/scripts/rendering/locations/popup.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/sidebar.js +21 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonModal.js +114 -0
- package/routes/app/offers/scripts/rendering/variations/FormBanner.js +214 -0
- package/routes/app/offers/scripts/rendering/variations/FormModal.js +325 -0
- package/routes/app/offers/scripts/rendering/variations/LinkBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/components/Body.js +29 -0
- package/routes/app/offers/scripts/rendering/variations/components/Button.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/DismissButton.js +39 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageBanner.js +110 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageModal.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/Headline.js +94 -0
- package/routes/app/offers/scripts/rendering/variations/components/MultiFieldForm.js +302 -0
- package/routes/app/offers/scripts/rendering/variations/components/Tooltip.js +74 -0
- package/routes/app/offers/scripts/rendering/variations/icons.js +15 -0
- package/routes/app/offers/scripts/utils.js +115 -0
- package/routes/app/offers/utils/HTMLUtils.js +10 -0
- package/routes/app/offers/utils/createTypeGuard.js +32 -0
- package/routes/app/offers/utils/promise-utils.js +22 -0
- package/routes/app/websiteBuilder/stores/storeHelpers.js +18 -0
- package/sounds/message-initial.mp3 +0 -0
- package/sounds/message-received.mp3 +0 -0
- package/sounds/message-sent.mp3 +0 -0
- package/src/arrays.js +15 -0
- package/src/audio.js +106 -0
- package/src/bounded-set.js +16 -0
- package/src/bounding_box_observer.js +129 -0
- package/src/decorators.js +29 -0
- package/src/dom.js +128 -0
- package/src/dom_roots.js +26 -0
- package/src/embedded_forms/EmbeddedForm.js +638 -0
- package/src/embedded_forms/QualifiedEmbeddedForm.js +51 -0
- package/src/embedded_forms/QualifiedFormField.js +137 -0
- package/src/embedded_forms/utils.js +17 -0
- package/src/graphql-types.js +1686 -0
- package/src/iframes.js +86 -0
- package/src/localstorage.js +43 -0
- package/src/mirror/Shipper.js +133 -0
- package/src/mirror/constants.generated.js +13 -0
- package/src/mirror/constants.js +238 -0
- package/src/mirror/shipper/ChangeQueue.js +155 -0
- package/src/mirror/shipper/DOMSerializer.js +392 -0
- package/src/mirror/shipper/observers.js +441 -0
- package/src/mirror/shipper/utils.js +98 -0
- package/src/mixins/disposable.js +125 -0
- package/src/mixins/injectable.js +37 -0
- package/src/personalizations/personalization-manager.js +110 -0
- package/src/personalizations/strategies/node-freezing-strategy.js +174 -0
- package/src/personalizations/utils.js +187 -0
- package/src/promises.js +107 -0
- package/src/proxy.js +144 -0
- package/src/qualified_root.js +35 -0
- package/src/query_params.js +55 -0
- package/src/shadow-dom-helper.js +63 -0
- package/src/singleton_host.js +39 -0
- package/src/smart_website/trigger.js +49 -0
- package/src/smart_website/utils.js +149 -0
- package/src/string.js +53 -0
- package/src/timezone.js +57 -0
- package/src/timing.js +49 -0
- package/src/type-utils.js +76 -0
- package/src/url-utils.js +102 -0
- package/src/url.js +50 -0
- package/src/utils.js +72 -0
- package/src/validation.js.js +29 -0
- package/src/validation_ts.js +6 -0
- package/vendor/actioncable/adapters.js +6 -0
- package/vendor/actioncable/connection.js +204 -0
- package/vendor/actioncable/connection_monitor.js +129 -0
- package/vendor/actioncable/consumer.js +91 -0
- package/vendor/actioncable/index.js +34 -0
- package/vendor/actioncable/internal.js +22 -0
- package/vendor/actioncable/logger.js +28 -0
- package/vendor/actioncable/subscription.js +93 -0
- package/vendor/actioncable/subscriptions.js +89 -0
- package/vendor/open-telemetry-idgenerator.js +43 -0
- package/widget/analytics/facebook_tracker.js +8 -0
- package/widget/analytics/google_analytics_tracker.js +83 -0
- package/widget/analytics/google_tag_manager_tracker.js +22 -0
- package/widget/analytics.js +58 -0
- package/widget/api_handler/api_handler.js +730 -0
- package/widget/api_handler/base_api_handler.js +249 -0
- package/widget/booker_intent_tracker.js +391 -0
- package/widget/booker_outcome_tracker.js +329 -0
- package/widget/capture_widget_exceptions.js +150 -0
- package/widget/channel.js +282 -0
- package/widget/composite_experience_adapter.js +101 -0
- package/widget/constants.generated.js +350 -0
- package/widget/constants.js +21 -0
- package/widget/container.js +193 -0
- package/widget/content_activity_emitter.js +36 -0
- package/widget/data360_visitor.js +67 -0
- package/widget/date_provider.js +11 -0
- package/widget/debug_mode_state.js +175 -0
- package/widget/dummy_module.js +9 -0
- package/widget/eloqua_visitor.js +17 -0
- package/widget/form_cta_booker_intent.js +246 -0
- package/widget/hubspot_visitor.js +39 -0
- package/widget/inline_meeting_booker_page.js +90 -0
- package/widget/local_state/abstract_local_state.js +38 -0
- package/widget/local_state/debug_state/abstract_debug_flow.js +29 -0
- package/widget/local_state/debug_state/custom_form_flow.js +14 -0
- package/widget/local_state/debug_state/hubspot_form_flow.js +19 -0
- package/widget/local_state/debug_state/hubspot_v4_form_flow.js +19 -0
- package/widget/local_state/debug_state/marketo_form_flow.js +20 -0
- package/widget/local_state/debug_state/pardot_form_flow.js +18 -0
- package/widget/local_state/debug_state.js +362 -0
- package/widget/local_state/trace_state.js +20 -0
- package/widget/location_provider.js +9 -0
- package/widget/marketo_visitor.js +39 -0
- package/widget/meetings/tracing/buttons_forms_triggering_tracer.js +124 -0
- package/widget/meetings/tracing/spans/button_spans.js +18 -0
- package/widget/meetings/tracing/spans/form_spans.js +11 -0
- package/widget/multimodal_v2/assets_preloader.js +97 -0
- package/widget/multimodal_v2/components/AppLayout.js +93 -0
- package/widget/multimodal_v2/components/CursorOverlay.js +93 -0
- package/widget/multimodal_v2/components/PointerRectOverlay.js +74 -0
- package/widget/multimodal_v2/components/app/Artifact.js +109 -0
- package/widget/multimodal_v2/components/app/Background.js +27 -0
- package/widget/multimodal_v2/components/app/CalendarLoadingContent.js +255 -0
- package/widget/multimodal_v2/components/app/Chat.js +39 -0
- package/widget/multimodal_v2/components/app/CookieConsentModal.js +149 -0
- package/widget/multimodal_v2/components/app/Foreground.js +48 -0
- package/widget/multimodal_v2/components/app/HiddenInput.js +41 -0
- package/widget/multimodal_v2/components/app/Input.js +72 -0
- package/widget/multimodal_v2/components/app/LightboxExperience.js +769 -0
- package/widget/multimodal_v2/components/app/LoadingOverlay.js +97 -0
- package/widget/multimodal_v2/components/app/Main.js +985 -0
- package/widget/multimodal_v2/components/app/MessengerButton.js +160 -0
- package/widget/multimodal_v2/components/app/Multimodal.js +17 -0
- package/widget/multimodal_v2/components/app/OverlayControls.js +79 -0
- package/widget/multimodal_v2/components/app/Preview.js +32 -0
- package/widget/multimodal_v2/components/app/PrivacyDisclosure.js +57 -0
- package/widget/multimodal_v2/components/app/RotateDeviceOverlay.js +70 -0
- package/widget/multimodal_v2/components/app/Toolbar.js +156 -0
- package/widget/multimodal_v2/components/chat/ChatComposer.js +129 -0
- package/widget/multimodal_v2/components/chat/ChatInputForm.js +398 -0
- package/widget/multimodal_v2/components/chat/ColdStartQuestions.js +354 -0
- package/widget/multimodal_v2/components/chat/ComposerErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/chat/PostCallSurvey.js +359 -0
- package/widget/multimodal_v2/components/chat/preview/FieldRequestRenderer.js +41 -0
- package/widget/multimodal_v2/components/chat/preview/PreviewMessageRenderer.js +60 -0
- package/widget/multimodal_v2/components/chat/preview/SharedOfferRenderer.js +143 -0
- package/widget/multimodal_v2/components/chat/preview/TextRenderer.js +27 -0
- package/widget/multimodal_v2/components/chat/preview/TimelinePreview.js +254 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventOfferRenderer.js +103 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventPickRenderer.js +148 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldEntryRenderer.js +84 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldRequestRenderer.js +56 -0
- package/widget/multimodal_v2/components/chat/timeline/InlinePrivacyDisclosure.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/LinkPreviewCard.js +70 -0
- package/widget/multimodal_v2/components/chat/timeline/MessageEntry.js +88 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentContentRenderer.js +30 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentDeckRenderer.js +279 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentVideoRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/ShareContentRenderer.js +59 -0
- package/widget/multimodal_v2/components/chat/timeline/SharedOfferRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/SystemRenderer.js +82 -0
- package/widget/multimodal_v2/components/chat/timeline/TextRenderer.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/Timeline.js +158 -0
- package/widget/multimodal_v2/components/debug/DebugMultimodalPanel.js +327 -0
- package/widget/multimodal_v2/components/decks/index.js +160 -0
- package/widget/multimodal_v2/components/field_request/BooleanField.js +77 -0
- package/widget/multimodal_v2/components/field_request/FieldComponents.js +69 -0
- package/widget/multimodal_v2/components/field_request/Form.js +87 -0
- package/widget/multimodal_v2/components/field_request/MultiPicklistField.js +240 -0
- package/widget/multimodal_v2/components/field_request/PicklistField.js +166 -0
- package/widget/multimodal_v2/components/field_request/SingleLineInputField.js +69 -0
- package/widget/multimodal_v2/components/field_request/TextField.js +37 -0
- package/widget/multimodal_v2/components/field_request/index.js +170 -0
- package/widget/multimodal_v2/components/helpers/AutoScroll.js +37 -0
- package/widget/multimodal_v2/components/helpers/ErrorBoundary.js +53 -0
- package/widget/multimodal_v2/components/helpers/FocusTrapDialog.js +26 -0
- package/widget/multimodal_v2/components/helpers/ImpressionTracker.js +94 -0
- package/widget/multimodal_v2/components/helpers/ListRenderer.js +37 -0
- package/widget/multimodal_v2/components/helpers/Localization.js +76 -0
- package/widget/multimodal_v2/components/helpers/Persisted.js +166 -0
- package/widget/multimodal_v2/components/helpers/RichText.js +358 -0
- package/widget/multimodal_v2/components/helpers/ScreenReaderHeading.js +17 -0
- package/widget/multimodal_v2/components/helpers/Thumbnail.js +190 -0
- package/widget/multimodal_v2/components/helpers/VisuallyHidden.js +41 -0
- package/widget/multimodal_v2/components/helpers/content_click_payloads.js +58 -0
- package/widget/multimodal_v2/components/helpers/useDraggable.js +103 -0
- package/widget/multimodal_v2/components/helpers/useTextOverflow.js +44 -0
- package/widget/multimodal_v2/components/lightbox_gather/index.js +741 -0
- package/widget/multimodal_v2/components/meetings/ArtifactEntryPoint.js +252 -0
- package/widget/multimodal_v2/components/meetings/MeetingAdditionalAttendees.js +325 -0
- package/widget/multimodal_v2/components/meetings/MeetingBookerEntry.js +100 -0
- package/widget/multimodal_v2/components/meetings/MeetingDetailsCard.js +99 -0
- package/widget/multimodal_v2/components/meetings/MeetingErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferEmailStep.js +239 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferFooter.js +104 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferSelectionStep.js +60 -0
- package/widget/multimodal_v2/components/meetings/MeetingRepHeader.js +222 -0
- package/widget/multimodal_v2/components/meetings/MeetingStepShell.js +92 -0
- package/widget/multimodal_v2/components/meetings/MeetingSummaryRail.js +515 -0
- package/widget/multimodal_v2/components/meetings/MeetingTimeSelector.js +603 -0
- package/widget/multimodal_v2/components/meetings/MonthDatePicker.js +422 -0
- package/widget/multimodal_v2/components/meetings/NavigationButtons.js +76 -0
- package/widget/multimodal_v2/components/meetings/TimeSlotHeader.js +357 -0
- package/widget/multimodal_v2/components/meetings/WeekViewHeader.js +20 -0
- package/widget/multimodal_v2/components/meetings/constants.js +7 -0
- package/widget/multimodal_v2/components/meetings/index.js +47 -0
- package/widget/multimodal_v2/components/meetings/utils.js +328 -0
- package/widget/multimodal_v2/components/multimodal/Audio.js +28 -0
- package/widget/multimodal_v2/components/multimodal/Controls.js +188 -0
- package/widget/multimodal_v2/components/multimodal/LiveVideo.js +63 -0
- package/widget/multimodal_v2/components/multimodal/MultiModalComponent.js +424 -0
- package/widget/multimodal_v2/components/multimodal/MultimodalAvatar.js +36 -0
- package/widget/multimodal_v2/components/multimodal/OrbAvatar.js +326 -0
- package/widget/multimodal_v2/components/multimodal/Status.js +220 -0
- package/widget/multimodal_v2/components/multimodal/VideoAvatar.js +24 -0
- package/widget/multimodal_v2/components/multimodal/VideoPreview.js +114 -0
- package/widget/multimodal_v2/components/multimodal/useAudioLevelMonitoring.js +96 -0
- package/widget/multimodal_v2/components/multimodal/useMultimodal.js +434 -0
- package/widget/multimodal_v2/components/presentations/index.js +372 -0
- package/widget/multimodal_v2/components/shared/Avatar.js +92 -0
- package/widget/multimodal_v2/components/shared/AvatarGroup.js +135 -0
- package/widget/multimodal_v2/components/shared/Button.js +245 -0
- package/widget/multimodal_v2/components/shared/ButtonGroup.js +133 -0
- package/widget/multimodal_v2/components/shared/ComposerForm.js +98 -0
- package/widget/multimodal_v2/components/shared/SpeakingIndicator.js +239 -0
- package/widget/multimodal_v2/components/shared/ThinkingAnimation.js +165 -0
- package/widget/multimodal_v2/components/shared/Tooltip.js +266 -0
- package/widget/multimodal_v2/components/shared/controls/Dropdown.js +79 -0
- package/widget/multimodal_v2/components/shared/controls/PillToggle.js +142 -0
- package/widget/multimodal_v2/components/shared/controls/TextArea.js +114 -0
- package/widget/multimodal_v2/components/shared/toolCallLabels.js +12 -0
- package/widget/multimodal_v2/components/slides/SlidesThumbnail.js +47 -0
- package/widget/multimodal_v2/components/slides/index.js +61 -0
- package/widget/multimodal_v2/constants.js +88 -0
- package/widget/multimodal_v2/host.split-css.js +2 -0
- package/widget/multimodal_v2/host.string.js +96 -0
- package/widget/multimodal_v2/images/icons.js +582 -0
- package/widget/multimodal_v2/images/posters/piper_low_res.jpg +0 -0
- package/widget/multimodal_v2/index.js +23 -0
- package/widget/multimodal_v2/index.panda.js +28 -0
- package/widget/multimodal_v2/index.split-css.panda.js +2 -0
- package/widget/multimodal_v2/inline_meeting_booker.js +182 -0
- package/widget/multimodal_v2/locales/cs.js +196 -0
- package/widget/multimodal_v2/locales/da.js +196 -0
- package/widget/multimodal_v2/locales/de.js +196 -0
- package/widget/multimodal_v2/locales/en.js +196 -0
- package/widget/multimodal_v2/locales/en_AU.js +197 -0
- package/widget/multimodal_v2/locales/en_GB.js +197 -0
- package/widget/multimodal_v2/locales/es.js +197 -0
- package/widget/multimodal_v2/locales/es_LA.js +196 -0
- package/widget/multimodal_v2/locales/fi.js +196 -0
- package/widget/multimodal_v2/locales/fr.js +197 -0
- package/widget/multimodal_v2/locales/fr_CA.js +196 -0
- package/widget/multimodal_v2/locales/id.js +196 -0
- package/widget/multimodal_v2/locales/index.js +48 -0
- package/widget/multimodal_v2/locales/it.js +196 -0
- package/widget/multimodal_v2/locales/ja.js +196 -0
- package/widget/multimodal_v2/locales/ko.js +196 -0
- package/widget/multimodal_v2/locales/nb.js +196 -0
- package/widget/multimodal_v2/locales/nl.js +196 -0
- package/widget/multimodal_v2/locales/pl.js +196 -0
- package/widget/multimodal_v2/locales/pt_BR.js +196 -0
- package/widget/multimodal_v2/locales/ru.js +196 -0
- package/widget/multimodal_v2/locales/sv.js +196 -0
- package/widget/multimodal_v2/locales/th.js +196 -0
- package/widget/multimodal_v2/locales/tr.js +196 -0
- package/widget/multimodal_v2/locales/vi.js +196 -0
- package/widget/multimodal_v2/locales/zh_CN.js +196 -0
- package/widget/multimodal_v2/locales/zh_TW.js +196 -0
- package/widget/multimodal_v2/multimodal.js +633 -0
- package/widget/multimodal_v2/multimodal_channel.js +195 -0
- package/widget/multimodal_v2/signals/active_conversation_signal.js +33 -0
- package/widget/multimodal_v2/signals/allowed_conversation_mode_signal.js +38 -0
- package/widget/multimodal_v2/signals/artifact_signal.js +22 -0
- package/widget/multimodal_v2/signals/layout_signal.js +98 -0
- package/widget/multimodal_v2/signals/messages_signal.js +207 -0
- package/widget/multimodal_v2/signals/ui_state_signal.js +128 -0
- package/widget/multimodal_v2/stable_bundle_src.js +44 -0
- package/widget/multimodal_v2/stores/ai_conversation_store.js +221 -0
- package/widget/multimodal_v2/stores/artifact_store.js +205 -0
- package/widget/multimodal_v2/stores/base_store.js +16 -0
- package/widget/multimodal_v2/stores/call_store.js +770 -0
- package/widget/multimodal_v2/stores/call_ui_adapter.js +225 -0
- package/widget/multimodal_v2/stores/debug_multimodal_scenario_store.js +471 -0
- package/widget/multimodal_v2/stores/decks_store.js +285 -0
- package/widget/multimodal_v2/stores/device_store.js +63 -0
- package/widget/multimodal_v2/stores/docking_store.js +62 -0
- package/widget/multimodal_v2/stores/field_request_store.js +326 -0
- package/widget/multimodal_v2/stores/meeting_store.js +477 -0
- package/widget/multimodal_v2/stores/participant_store.js +73 -0
- package/widget/multimodal_v2/stores/post_call_survey_store.js +160 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store.js +163 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store_v2.js +511 -0
- package/widget/multimodal_v2/stores/presentations_store.js +111 -0
- package/widget/multimodal_v2/stores/root_store.js +1919 -0
- package/widget/multimodal_v2/stores/screen_share_store.js +217 -0
- package/widget/multimodal_v2/stores/slides_store.js +21 -0
- package/widget/multimodal_v2/stores/translation_store.js +185 -0
- package/widget/multimodal_v2/stores/ui_store.js +496 -0
- package/widget/multimodal_v2/stores/waiting_store.js +159 -0
- package/widget/multimodal_v2/stores/website_navigation_store.js +767 -0
- package/widget/multimodal_v2/styled-system/css/conditions.js +34 -0
- package/widget/multimodal_v2/styled-system/css/css.js +48 -0
- package/widget/multimodal_v2/styled-system/css/cva.js +96 -0
- package/widget/multimodal_v2/styled-system/css/cx.js +13 -0
- package/widget/multimodal_v2/styled-system/css/index.js +15 -0
- package/widget/multimodal_v2/styled-system/css/sva.js +69 -0
- package/widget/multimodal_v2/styled-system/helpers.js +384 -0
- package/widget/multimodal_v2/styled-system/jsx/create-style-context.js +96 -0
- package/widget/multimodal_v2/styled-system/jsx/factory-helper.js +19 -0
- package/widget/multimodal_v2/styled-system/jsx/factory.js +111 -0
- package/widget/multimodal_v2/styled-system/jsx/index.js +12 -0
- package/widget/multimodal_v2/styled-system/jsx/is-valid-prop.js +22 -0
- package/widget/multimodal_v2/types.js +105 -0
- package/widget/multimodal_v2/utils/auto_scroller.js +157 -0
- package/widget/multimodal_v2/utils/flip_animation.js +124 -0
- package/widget/multimodal_v2/utils/focus_gate.js +237 -0
- package/widget/multimodal_v2/utils/locale.js +16 -0
- package/widget/multimodal_v2/utils/media_queries.js +30 -0
- package/widget/multimodal_v2/utils/multimodal_cache.js +19 -0
- package/widget/multimodal_v2/utils/mutation_effect.js +14 -0
- package/widget/multimodal_v2/utils/navigation_interceptor.js +205 -0
- package/widget/multimodal_v2/utils/navigation_strategies/dom_swap.js +393 -0
- package/widget/multimodal_v2/utils/navigation_strategies/index.js +12 -0
- package/widget/multimodal_v2/utils/navigation_strategies/lwr.js +61 -0
- package/widget/multimodal_v2/utils/navigation_strategies/navigation_utils.js +46 -0
- package/widget/multimodal_v2/utils/navigation_strategies/next_js.js +24 -0
- package/widget/multimodal_v2/utils/navigation_strategies/wouter_v3.js +15 -0
- package/widget/multimodal_v2/utils/objects_map.js +38 -0
- package/widget/multimodal_v2/utils/perceived_voice_turn_tracker.js +345 -0
- package/widget/multimodal_v2/utils/sanitize_html.js +132 -0
- package/widget/multimodal_v2/utils/signals.js +97 -0
- package/widget/multimodal_v2/utils/slide_zoom.js +114 -0
- package/widget/multimodal_v2/utils/theme_styles.js +137 -0
- package/widget/multimodal_v2/utils/url_observer.js +52 -0
- package/widget/multimodal_v2/utils/voice_onset_detector.js +127 -0
- package/widget/page_mirror.js +89 -0
- package/widget/page_view_activity_emitter.js +71 -0
- package/widget/pardot_visitor.js +137 -0
- package/widget/personalization_observer.js +96 -0
- package/widget/personalizations_config.js +160 -0
- package/widget/qualified_form/constants.js +23 -0
- package/widget/qualified_form/phone_utils.js +38 -0
- package/widget/qualified_form/qualified_form_action.js +91 -0
- package/widget/qualified_form/qualified_form_action_orchestrator.js +21 -0
- package/widget/qualified_form/qualified_form_api.js +471 -0
- package/widget/scroll_disabler.js +109 -0
- package/widget/server-logger.js +156 -0
- package/widget/smart_website_config.js +112 -0
- package/widget/telemetry/context.js +75 -0
- package/widget/telemetry/index.js +16 -0
- package/widget/telemetry/messenger_uptime.js +80 -0
- package/widget/telemetry/metrics.js +120 -0
- package/widget/telemetry/span.js +82 -0
- package/widget/telemetry/telemetry.js +180 -0
- package/widget/telemetry/tracer.js +41 -0
- package/widget/telemetry/tracing_store.js +310 -0
- package/widget/tracker.js +916 -0
- package/widget/utils/native_globals.js +129 -0
- package/widget/v1_adapter.js +50 -0
- package/widget/v2_adapter.js +368 -0
- package/widget/visitor/base_visitor_state.js +11 -0
- package/widget/visitor/cookie_visitor_state.js +128 -0
- package/widget/visitor/in_memory_visitor_state.js +29 -0
- package/widget/visitor/visitor_state.js +384 -0
- package/widget/visitor.js +356 -0
- package/widget/widget/linked_widget_v2.js +227 -0
- package/widget/widget/page_mirror_factory.js +22 -0
- package/widget/widget/sentry.js +130 -0
- package/widget/widget/widget.js +1698 -0
- package/widget/widget.split-css.js +2 -0
- package/widget/widget_bootstrap.js +97 -0
- package/widget/widget_object.js +73 -0
package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/constants.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const PROPERTIES = [
|
|
2
|
+
[
|
|
3
|
+
"position",
|
|
4
|
+
"fixed"
|
|
5
|
+
],
|
|
6
|
+
[
|
|
7
|
+
"position",
|
|
8
|
+
"sticky"
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"top",
|
|
12
|
+
"*"
|
|
13
|
+
]
|
|
14
|
+
];
|
|
15
|
+
const OBSERVED_PROPERTIES = [
|
|
16
|
+
"position:fixed",
|
|
17
|
+
"position:sticky",
|
|
18
|
+
"top:*"
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export { OBSERVED_PROPERTIES, PROPERTIES };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../../../../../../../js/runtime.js";
|
|
2
|
+
import { throttle } from "./utils.js";
|
|
3
|
+
import "../../../../../../../widget/utils/native_globals.js";
|
|
4
|
+
|
|
5
|
+
/* provided dependency */ var __nativeWindowAddEventListener = __webpack_require__(68034).zh;
|
|
6
|
+
/* provided dependency */ var __nativeWindowRemoveEventListener = __webpack_require__(68034).kZ;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Window resize observer used to observe the resize events of the window with a throttle mecanism to avoid over computing
|
|
10
|
+
*/ class WindowResizeObserver {
|
|
11
|
+
init() {
|
|
12
|
+
this.isDisposed = false;
|
|
13
|
+
__nativeWindowAddEventListener("resize", this.onResize);
|
|
14
|
+
}
|
|
15
|
+
dispose() {
|
|
16
|
+
__nativeWindowRemoveEventListener("resize", this.onResize);
|
|
17
|
+
this.isDisposed = true;
|
|
18
|
+
}
|
|
19
|
+
_callback() {
|
|
20
|
+
if (this.isDisposed) return;
|
|
21
|
+
this.callback();
|
|
22
|
+
}
|
|
23
|
+
constructor(callback, watch = "both", throttleLimit = 0){
|
|
24
|
+
this.callback = callback;
|
|
25
|
+
this.watch = watch;
|
|
26
|
+
this.lastWidth = window.innerWidth;
|
|
27
|
+
this.lastHeight = window.innerHeight;
|
|
28
|
+
this.isDisposed = true;
|
|
29
|
+
this._onResize = ()=>{
|
|
30
|
+
const widthChanged = window.innerWidth !== this.lastWidth;
|
|
31
|
+
if (this.watch === "width" && !widthChanged) return;
|
|
32
|
+
const heightChanged = window.innerHeight !== this.lastHeight;
|
|
33
|
+
if (this.watch === "height" && !heightChanged) return;
|
|
34
|
+
if (!widthChanged && !heightChanged) return;
|
|
35
|
+
this.lastWidth = window.innerWidth;
|
|
36
|
+
this.lastHeight = window.innerHeight;
|
|
37
|
+
this._callback();
|
|
38
|
+
};
|
|
39
|
+
this.onResize = throttleLimit > 0 ? throttle(this._onResize, throttleLimit) : this._onResize;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { WindowResizeObserver };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../../../../../../../js/runtime.js";
|
|
2
|
+
import "../../../../../../../widget/utils/native_globals.js";
|
|
3
|
+
|
|
4
|
+
/* provided dependency */ var utils_setTimeout = __webpack_require__(68034).pS;
|
|
5
|
+
// Throttle a function to run at most once per limit milliseconds
|
|
6
|
+
function throttle(fn, limit) {
|
|
7
|
+
let waiting = false;
|
|
8
|
+
let pendingArgs = null;
|
|
9
|
+
return function() {
|
|
10
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
11
|
+
args[_key] = arguments[_key];
|
|
12
|
+
}
|
|
13
|
+
pendingArgs = args;
|
|
14
|
+
if (!waiting) {
|
|
15
|
+
utils_setTimeout(()=>{
|
|
16
|
+
fn.apply(this, pendingArgs);
|
|
17
|
+
waiting = false;
|
|
18
|
+
pendingArgs = null;
|
|
19
|
+
}, limit);
|
|
20
|
+
waiting = true;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { throttle };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ScrollDisabler } from "../../../../../../widget/scroll_disabler.js";
|
|
2
|
+
import { POPUP_OFFERS_Z_INDEX } from "../../constants.js";
|
|
3
|
+
import { getHostId, getHeadlineId, toHTMLElement } from "../../utils.js";
|
|
4
|
+
|
|
5
|
+
/* eslint-disable rulesdir/enforce-comment */ /* eslint-disable rulesdir/css-units */
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const BODY_OVERFLOW_STYLE_DATA_ATTRIBUTE = "data-qualified-offer-body-overflow-style";
|
|
9
|
+
const BODY_HEIGHT_STYLE_DATA_ATTRIBUTE = "data-qualified-offer-body-height-style";
|
|
10
|
+
class Popup {
|
|
11
|
+
createHost(id) {
|
|
12
|
+
// Style is inline because the host is directly inserted into the DOM. (no shadow root)
|
|
13
|
+
const hostId = getHostId(id);
|
|
14
|
+
const html = /* html */ '\n <dialog\n id="' + hostId + '"\n aria-labelledby="' + getHeadlineId(id) + '"\n style="\n display:flex;\n justify-content:center;\n align-items:center;\n position:fixed;\n left:0;\n bottom:0;\n width:100%;\n height:100dvh;\n z-index:' + POPUP_OFFERS_Z_INDEX + ';\n background: rgba(0, 0, 0, 0.70);\n max-width: 100%;\n max-height: 100vh;\n border: none;\n padding: 0;\n "\n >\n </dialog>\n ';
|
|
15
|
+
return toHTMLElement(html);
|
|
16
|
+
}
|
|
17
|
+
insertHost(host) {
|
|
18
|
+
// New behavior behind feature flag
|
|
19
|
+
if (this.flags.hasOffersPopupWithScrollDisabler) {
|
|
20
|
+
this.insertHostNext(host);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
document.body.appendChild(host);
|
|
24
|
+
document.body.setAttribute(BODY_OVERFLOW_STYLE_DATA_ATTRIBUTE, document.body.style.overflow);
|
|
25
|
+
document.body.setAttribute(BODY_HEIGHT_STYLE_DATA_ATTRIBUTE, document.body.style.height);
|
|
26
|
+
document.body.style.overflow = "hidden";
|
|
27
|
+
document.body.style.height = "100dvh";
|
|
28
|
+
if (host instanceof HTMLDialogElement) {
|
|
29
|
+
host.showModal();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
removeHost(host) {
|
|
33
|
+
var _document_body_getAttribute, _document_body_getAttribute1;
|
|
34
|
+
// New behavior behind feature flag
|
|
35
|
+
if (this.flags.hasOffersPopupWithScrollDisabler) {
|
|
36
|
+
this.removeHostNext(host);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
host.remove();
|
|
40
|
+
const overflow = (_document_body_getAttribute = document.body.getAttribute(BODY_OVERFLOW_STYLE_DATA_ATTRIBUTE)) != null ? _document_body_getAttribute : "";
|
|
41
|
+
document.body.style.overflow = overflow;
|
|
42
|
+
const height = (_document_body_getAttribute1 = document.body.getAttribute(BODY_HEIGHT_STYLE_DATA_ATTRIBUTE)) != null ? _document_body_getAttribute1 : "";
|
|
43
|
+
document.body.style.height = height;
|
|
44
|
+
document.body.removeAttribute(BODY_OVERFLOW_STYLE_DATA_ATTRIBUTE);
|
|
45
|
+
document.body.removeAttribute(BODY_HEIGHT_STYLE_DATA_ATTRIBUTE);
|
|
46
|
+
}
|
|
47
|
+
insertHostNext(host) {
|
|
48
|
+
document.body.appendChild(host);
|
|
49
|
+
ScrollDisabler.disableScroll("offers", {
|
|
50
|
+
overlayElement: host
|
|
51
|
+
});
|
|
52
|
+
if (host instanceof HTMLDialogElement) {
|
|
53
|
+
host.showModal();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
removeHostNext(host) {
|
|
57
|
+
host.remove();
|
|
58
|
+
ScrollDisabler.restoreScroll("offers");
|
|
59
|
+
}
|
|
60
|
+
// eslint-disable-next-line no-useless-constructor
|
|
61
|
+
constructor(flags = {}){
|
|
62
|
+
this.flags = flags;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { Popup };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FOOTER_HEIGHT_CSS_VARIABLE, DEFAULT_OFFERS_Z_INDEX } from "../../constants.js";
|
|
2
|
+
import { getHostId, getHeadlineId, toHTMLElement } from "../../utils.js";
|
|
3
|
+
|
|
4
|
+
/* eslint-disable rulesdir/enforce-comment */ /* eslint-disable rulesdir/css-units */
|
|
5
|
+
|
|
6
|
+
class Sidebar {
|
|
7
|
+
createHost(id) {
|
|
8
|
+
// Style is inline because the host is directly inserted into the DOM. (no shadow root)
|
|
9
|
+
const hostId = getHostId(id);
|
|
10
|
+
const html = /* html */ '\n <div\n id="' + hostId + '"\n aria-labelledby="' + getHeadlineId(id) + '"\n style="\n position:fixed;\n left:15px;\n bottom:calc(15px + var(' + FOOTER_HEIGHT_CSS_VARIABLE + ", 0px));\n width:fit-content;\n height:fit-content;\n z-index:" + DEFAULT_OFFERS_Z_INDEX + ';\n "\n ></div>\n ';
|
|
11
|
+
return toHTMLElement(html);
|
|
12
|
+
}
|
|
13
|
+
insertHost(host) {
|
|
14
|
+
document.body.appendChild(host);
|
|
15
|
+
}
|
|
16
|
+
removeHost(host) {
|
|
17
|
+
host.remove();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Sidebar };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import "../../constants.js";
|
|
2
|
+
import { OfferComponent } from "../lib/OfferComponent.js";
|
|
3
|
+
import { Button } from "./components/Button.js";
|
|
4
|
+
import { DismissButton } from "./components/DismissButton.js";
|
|
5
|
+
import { ForegroundImageBanner } from "./components/ForegroundImageBanner.js";
|
|
6
|
+
import { Headline } from "./components/Headline.js";
|
|
7
|
+
import { __metadata, _tagged_template_literal_loose, _extends, __decorate } from "../../../../../../js/4101.js";
|
|
8
|
+
import { CtaTypeEnum, ContentVariationTypeEnum } from "../../../../../../src/graphql-types.js";
|
|
9
|
+
import { autoRender } from "../lib/decorators.js";
|
|
10
|
+
|
|
11
|
+
/* eslint-disable rulesdir/css-units */
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
function ButtonBanner_templateObject() {
|
|
16
|
+
const data = _tagged_template_literal_loose([
|
|
17
|
+
'\n <div class="container ',
|
|
18
|
+
'">\n <div class="headline-cta">\n ',
|
|
19
|
+
"\n ",
|
|
20
|
+
"\n ",
|
|
21
|
+
"\n ",
|
|
22
|
+
"\n </div>\n ",
|
|
23
|
+
"\n </div>\n "
|
|
24
|
+
]);
|
|
25
|
+
ButtonBanner_templateObject = function _templateObject() {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ButtonBanner extends OfferComponent {
|
|
39
|
+
get style() {
|
|
40
|
+
var _variation_headlineStyle_backgroundColor;
|
|
41
|
+
const { variation } = this.props;
|
|
42
|
+
let mobileStyle = "";
|
|
43
|
+
if (this.isMobile) {
|
|
44
|
+
mobileStyle = /* css */ "\n .container {\n padding: 15px 32px;\n\n .headline-cta {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n width: auto;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .headline {\n padding: 0;\n }\n }\n }\n ";
|
|
45
|
+
}
|
|
46
|
+
return /* css */ "\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n gap: 32px;\n align-items: center;\n background: " + ((_variation_headlineStyle_backgroundColor = variation.headlineStyle.backgroundColor) != null ? _variation_headlineStyle_backgroundColor : "#000") + ";\n box-shadow: 0px -1px 28px 0px rgba(0, 0, 0, 0.00);\n margin: 0;\n padding: 0 36px;\n height: auto;\n max-height: " + (/* inlined export .MAX_BANNER_HEIGHT */"200px") + ";\n\n .headline-cta {\n display: flex;\n gap: 32px;\n align-items: center;\n justify-content: center;\n text-align: left;\n width: 100%;\n\n .headline {\n padding: 14px 0;\n }\n }\n\n p {\n margin: 0;\n }\n }\n\n .background-image-wrapper {\n " + (this.backgroundImageUrl ? "\n background-image: url(" + this.backgroundImageUrl + ");\n background-position: center;\n background-size: cover;\n " : "") + "\n }\n\n " + mobileStyle + "\n ";
|
|
47
|
+
}
|
|
48
|
+
get content() {
|
|
49
|
+
return this.html /* html */ (ButtonBanner_templateObject(), this.backgroundImageUrl ? "background-image-wrapper" : "", this.foregroundImage.prependedContent, this.headline, this.cta, this.foregroundImage.appendedContent, this.dismissButton);
|
|
50
|
+
}
|
|
51
|
+
get cta() {
|
|
52
|
+
const { buttonStyle, buttonText, buttonUrl, assetDeliveryType, headlineStyle } = this.props.variation;
|
|
53
|
+
return new Button(_extends({}, buttonStyle, {
|
|
54
|
+
id: this.id,
|
|
55
|
+
text: buttonText,
|
|
56
|
+
href: buttonUrl,
|
|
57
|
+
deliveryType: assetDeliveryType,
|
|
58
|
+
type: "banner-button",
|
|
59
|
+
focusRingColor: headlineStyle.color
|
|
60
|
+
}), this.hasOffersFontEnhancements);
|
|
61
|
+
}
|
|
62
|
+
get headline() {
|
|
63
|
+
const { headlineStyle, headlineText } = this.props.variation;
|
|
64
|
+
return new Headline(_extends({}, headlineStyle, {
|
|
65
|
+
text: headlineText,
|
|
66
|
+
type: "banner"
|
|
67
|
+
}), this.hasOffersFontEnhancements);
|
|
68
|
+
}
|
|
69
|
+
get dismissButton() {
|
|
70
|
+
var _ref, _ref1;
|
|
71
|
+
if (!this.props.allowDismiss) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const { headlineStyle, buttonStyle } = this.props.variation;
|
|
75
|
+
return new DismissButton({
|
|
76
|
+
id: this.id,
|
|
77
|
+
color: this.props.variation.headlineStyle.color,
|
|
78
|
+
focusRingColor: (_ref = headlineStyle == null ? void 0 : headlineStyle.color) != null ? _ref : null,
|
|
79
|
+
borderRadius: (_ref1 = buttonStyle == null ? void 0 : buttonStyle.borderRadius) != null ? _ref1 : "0px",
|
|
80
|
+
hasDismissButtonAccessibilityEnabled: this.hasDismissButtonAccessibilityEnabled
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
get location() {
|
|
84
|
+
return this.props.location;
|
|
85
|
+
}
|
|
86
|
+
constructor(props, host, hasOffersFontEnhancements, hasDismissButtonAccessibilityEnabled){
|
|
87
|
+
super(props, null, host, hasOffersFontEnhancements, hasDismissButtonAccessibilityEnabled), this.displayName = "ButtonBanner", this.type = ContentVariationTypeEnum.HeadlineButton, this.ctaType = CtaTypeEnum.Button, this.foregroundImage = new ForegroundImageBanner({
|
|
88
|
+
location: this.location,
|
|
89
|
+
foregroundImageConfig: this.props.foregroundImageConfig,
|
|
90
|
+
foregroundImageUrl: this.props.foregroundImageUrl
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
ButtonBanner = __decorate([
|
|
95
|
+
autoRender,
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [
|
|
98
|
+
typeof ButtonBannerProps === "undefined" ? Object : ButtonBannerProps,
|
|
99
|
+
typeof HTMLElement === "undefined" ? Object : HTMLElement,
|
|
100
|
+
Boolean,
|
|
101
|
+
Boolean
|
|
102
|
+
])
|
|
103
|
+
], ButtonBanner);
|
|
104
|
+
|
|
105
|
+
export { ButtonBanner };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { MODAL_PADDING, MODAL_WIDTHS } from "../../constants.js";
|
|
2
|
+
import { OfferComponent } from "../lib/OfferComponent.js";
|
|
3
|
+
import { Body } from "./components/Body.js";
|
|
4
|
+
import { Button } from "./components/Button.js";
|
|
5
|
+
import { DismissButton } from "./components/DismissButton.js";
|
|
6
|
+
import { ForegroundImageModal } from "./components/ForegroundImageModal.js";
|
|
7
|
+
import { Headline } from "./components/Headline.js";
|
|
8
|
+
import { __metadata, _tagged_template_literal_loose, _extends, __decorate } from "../../../../../../js/4101.js";
|
|
9
|
+
import { CtaTypeEnum, LocationEnum, ContentVariationTypeEnum } from "../../../../../../src/graphql-types.js";
|
|
10
|
+
import { autoRender } from "../lib/decorators.js";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
function ButtonModal_templateObject() {
|
|
17
|
+
const data = _tagged_template_literal_loose([
|
|
18
|
+
'\n <div\n class="container"\n role="dialog"\n aria-modal="true"\n >\n <div class="image-container">\n ',
|
|
19
|
+
"\n ",
|
|
20
|
+
'\n <div class="content-container">\n ',
|
|
21
|
+
"\n ",
|
|
22
|
+
"\n ",
|
|
23
|
+
"\n </div>\n ",
|
|
24
|
+
"\n ",
|
|
25
|
+
"\n </div>\n ",
|
|
26
|
+
"\n </div>\n "
|
|
27
|
+
]);
|
|
28
|
+
ButtonModal_templateObject = function _templateObject() {
|
|
29
|
+
return data;
|
|
30
|
+
};
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
/* eslint-disable rulesdir/css-units */
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ButtonModal extends OfferComponent {
|
|
43
|
+
get style() {
|
|
44
|
+
var _variation_headlineStyle_backgroundColor;
|
|
45
|
+
const { variation } = this.props;
|
|
46
|
+
return /* css */ "\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n background: " + ((_variation_headlineStyle_backgroundColor = variation.headlineStyle.backgroundColor) != null ? _variation_headlineStyle_backgroundColor : "#FFF") + ";\n margin: 0;\n overflow: hidden;\n box-shadow: 0px 2px 8px 1px #00000033;\n p {\n margin: 0;\n }\n max-width: 90vw;\n max-height: 90dvh;\n }\n\n .content-container {\n display: flex;\n width: " + MODAL_WIDTHS[this.device][this.location] + "px;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: " + MODAL_PADDING[this.device][this.location] + ";\n gap: 24px;\n box-sizing: border-box;\n align-self: center;\n }\n\n .image-container {\n width: 100%;\n height: 100%;\n max-height: 90dvh;\n max-width: 90vw;\n display: flex;\n flex-direction: " + (this.foregroundImage.isPlacementHorizontal ? "row" : "column") + ";\n align-items: stretch;\n }\n\n .background-image-wrapper {\n " + (this.backgroundImageUrl ? "\n background-image: url(" + this.backgroundImageUrl + ");\n background-size: cover;\n background-position: center;\n display: flex;\n align-items: center;\n " : "") + "\n }\n ";
|
|
47
|
+
}
|
|
48
|
+
get content() {
|
|
49
|
+
return this.html /* html */ (ButtonModal_templateObject(), this.foregroundImage.prependedContent, this.backgroundImageUrl ? '<div class="background-image-wrapper">' : "", this.headline, this.body, this.cta, this.backgroundImageUrl ? "</div>" : "", this.foregroundImage.appendedContent, this.dismissButton);
|
|
50
|
+
}
|
|
51
|
+
get headline() {
|
|
52
|
+
const { headlineStyle, headlineText } = this.props.variation;
|
|
53
|
+
const type = this.props.location === LocationEnum.Sidebar ? "sidebar-modal" : "modal";
|
|
54
|
+
return new Headline(_extends({}, headlineStyle, {
|
|
55
|
+
text: headlineText,
|
|
56
|
+
type,
|
|
57
|
+
offerId: this.id
|
|
58
|
+
}), this.hasOffersFontEnhancements);
|
|
59
|
+
}
|
|
60
|
+
get body() {
|
|
61
|
+
const { bodyStyle, bodyText } = this.props.variation;
|
|
62
|
+
return new Body(_extends({}, bodyStyle, {
|
|
63
|
+
text: bodyText
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
get cta() {
|
|
67
|
+
const { buttonStyle, buttonText, buttonUrl, assetDeliveryType, headlineStyle } = this.props.variation;
|
|
68
|
+
return new Button(_extends({}, buttonStyle, {
|
|
69
|
+
type: "modal-button",
|
|
70
|
+
id: this.id,
|
|
71
|
+
text: buttonText,
|
|
72
|
+
href: buttonUrl,
|
|
73
|
+
deliveryType: assetDeliveryType,
|
|
74
|
+
focusRingColor: headlineStyle.color
|
|
75
|
+
}), this.hasOffersFontEnhancements);
|
|
76
|
+
}
|
|
77
|
+
get dismissButton() {
|
|
78
|
+
var _this_props_variation_headlineStyle_color, _ref, _ref1;
|
|
79
|
+
if (!this.props.allowDismiss) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const { buttonStyle, headlineStyle } = this.props.variation;
|
|
83
|
+
return new DismissButton({
|
|
84
|
+
id: this.id,
|
|
85
|
+
isModal: true,
|
|
86
|
+
color: (_this_props_variation_headlineStyle_color = this.props.variation.headlineStyle.color) != null ? _this_props_variation_headlineStyle_color : "#1B1B1B",
|
|
87
|
+
focusRingColor: (_ref = headlineStyle == null ? void 0 : headlineStyle.color) != null ? _ref : null,
|
|
88
|
+
borderRadius: (_ref1 = buttonStyle == null ? void 0 : buttonStyle.borderRadius) != null ? _ref1 : "0px",
|
|
89
|
+
hasDismissButtonAccessibilityEnabled: this.hasDismissButtonAccessibilityEnabled
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
get location() {
|
|
93
|
+
return this.props.location;
|
|
94
|
+
}
|
|
95
|
+
constructor(props, host, hasOffersFontEnhancements, hasDismissButtonAccessibilityEnabled){
|
|
96
|
+
super(props, null, host, hasOffersFontEnhancements, hasDismissButtonAccessibilityEnabled), this.displayName = "ButtonModal", this.type = ContentVariationTypeEnum.HeadlineBodyButton, this.ctaType = CtaTypeEnum.Button, this.foregroundImage = new ForegroundImageModal({
|
|
97
|
+
location: this.location,
|
|
98
|
+
foregroundImageConfig: this.props.foregroundImageConfig,
|
|
99
|
+
foregroundImageUrl: this.props.foregroundImageUrl
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
ButtonModal = __decorate([
|
|
104
|
+
autoRender,
|
|
105
|
+
__metadata("design:type", Function),
|
|
106
|
+
__metadata("design:paramtypes", [
|
|
107
|
+
typeof ButtonModalProps === "undefined" ? Object : ButtonModalProps,
|
|
108
|
+
typeof HTMLElement === "undefined" ? Object : HTMLElement,
|
|
109
|
+
Boolean,
|
|
110
|
+
Boolean
|
|
111
|
+
])
|
|
112
|
+
], ButtonModal);
|
|
113
|
+
|
|
114
|
+
export { ButtonModal };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import "../../constants.js";
|
|
2
|
+
import { getPrivacyDisclosureTooltipId, getFormId, getPrivacyDisclosureTooltipTargetId } from "../../utils.js";
|
|
3
|
+
import { FormComponent } from "../lib/FormComponent.js";
|
|
4
|
+
import { Button } from "./components/Button.js";
|
|
5
|
+
import { DismissButton } from "./components/DismissButton.js";
|
|
6
|
+
import { ForegroundImageBanner } from "./components/ForegroundImageBanner.js";
|
|
7
|
+
import { Headline } from "./components/Headline.js";
|
|
8
|
+
import { Tooltip } from "./components/Tooltip.js";
|
|
9
|
+
import { _tagged_template_literal_loose, _extends, __decorate } from "../../../../../../js/4101.js";
|
|
10
|
+
import { LOADING_SVG_STRING_SPINNER } from "../../../../../../src/personalizations/utils.js";
|
|
11
|
+
import { AlertIcon, CHECKBOX_SVG_STRING } from "./icons.js";
|
|
12
|
+
import { escapeHtml } from "../../../../../../src/embedded_forms/utils.js";
|
|
13
|
+
import { LocationEnum, ContentVariationTypeEnum } from "../../../../../../src/graphql-types.js";
|
|
14
|
+
import { autoRender } from "../lib/decorators.js";
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
function FormBanner_templateObject() {
|
|
20
|
+
const data = _tagged_template_literal_loose([
|
|
21
|
+
'\n <div class="container ',
|
|
22
|
+
'">\n <div class="headline-cta">\n ',
|
|
23
|
+
"\n ",
|
|
24
|
+
'\n <form id="',
|
|
25
|
+
'" class="form">\n ',
|
|
26
|
+
"\n ",
|
|
27
|
+
"\n </form>\n ",
|
|
28
|
+
"\n </div>\n ",
|
|
29
|
+
"\n </div>\n "
|
|
30
|
+
]);
|
|
31
|
+
FormBanner_templateObject = function _templateObject() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
return data;
|
|
35
|
+
}
|
|
36
|
+
function _templateObject1() {
|
|
37
|
+
const data = _tagged_template_literal_loose([
|
|
38
|
+
"",
|
|
39
|
+
""
|
|
40
|
+
]);
|
|
41
|
+
_templateObject1 = function _templateObject() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
function _templateObject2() {
|
|
47
|
+
const data = _tagged_template_literal_loose([
|
|
48
|
+
'\n <div class="',
|
|
49
|
+
'">\n <input\n class="',
|
|
50
|
+
'"\n type="email"\n name="email"\n placeholder="',
|
|
51
|
+
'"\n value="',
|
|
52
|
+
'"\n aria-invalid="true"\n />\n <div class="',
|
|
53
|
+
'">\n ',
|
|
54
|
+
"\n </div>\n </div>\n "
|
|
55
|
+
]);
|
|
56
|
+
_templateObject2 = function _templateObject() {
|
|
57
|
+
return data;
|
|
58
|
+
};
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
function _templateObject3() {
|
|
62
|
+
const data = _tagged_template_literal_loose([
|
|
63
|
+
'\n <input\n class="',
|
|
64
|
+
'"\n name="email"\n type="email"\n placeholder="',
|
|
65
|
+
'"\n required\n ',
|
|
66
|
+
"\n ",
|
|
67
|
+
"\n />\n "
|
|
68
|
+
]);
|
|
69
|
+
_templateObject3 = function _templateObject() {
|
|
70
|
+
return data;
|
|
71
|
+
};
|
|
72
|
+
return data;
|
|
73
|
+
}
|
|
74
|
+
function _templateObject4() {
|
|
75
|
+
const data = _tagged_template_literal_loose([
|
|
76
|
+
"",
|
|
77
|
+
""
|
|
78
|
+
]);
|
|
79
|
+
_templateObject4 = function _templateObject() {
|
|
80
|
+
return data;
|
|
81
|
+
};
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
84
|
+
/* eslint-disable rulesdir/css-units */
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
const MAX_INPUT_RADIUS = 4;
|
|
98
|
+
// Prevent password managers from covering privacy disclosure tooltip
|
|
99
|
+
const IGNORE_1_PASSWORD_AUTOFILL = 'data-1p-ignore="true"';
|
|
100
|
+
const IGNORE_LAST_PASS_AUTOFILL = 'data-lpignore="true"';
|
|
101
|
+
class FormBanner extends FormComponent {
|
|
102
|
+
get style() {
|
|
103
|
+
var _buttonStyle_borderRadius, _headlineStyle_backgroundColor, _headlineStyle_fontFamily, _headlineStyle_fontFamily1;
|
|
104
|
+
const { headlineStyle, buttonStyle } = this.props.variation;
|
|
105
|
+
const inputRadius = Math.min(parseInt((_buttonStyle_borderRadius = buttonStyle.borderRadius) != null ? _buttonStyle_borderRadius : "0", 10), MAX_INPUT_RADIUS);
|
|
106
|
+
let mobileStyle = "";
|
|
107
|
+
if (this.isMobile) {
|
|
108
|
+
if (this.hasOffersFormBannerMobileImprovements) {
|
|
109
|
+
mobileStyle = /* css */ "\n .container {\n padding: 16px 32px;\n\n .headline-cta {\n display: flex;\n flex-direction: column;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .form {\n flex-wrap: wrap;\n width: 100%;\n }\n\n ." + this.cx.input + " {\n flex-grow: 1;\n width: auto;\n }\n\n .cta.banner-button.submit{\n padding-top: 4.5px;\n padding-bottom: 4.5px;\n line-height: 1.5;\n flex-grow: 1;\n min-width: 0;\n height: unset;\n max-width: unset;\n }\n\n .cta.banner-button.submit div:first-child {\n min-width: 0;\n word-wrap: break-word;\n }\n\n .headline {\n padding: 0;\n }\n\n #" + getPrivacyDisclosureTooltipId(this.props.id) + " {\n word-break: break-word;\n overflow-wrap: break-word;\n }\n }\n }\n ";
|
|
110
|
+
} else {
|
|
111
|
+
mobileStyle = /* css */ "\n .container {\n padding: 16px 32px;\n\n .headline-cta {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: space-between;\n text-align: left;\n width: auto;\n\n .banner {\n margin-right: 4px;\n max-width: 100%;\n }\n\n .headline {\n padding: 0;\n }\n }\n }\n ";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return /* css */ "\n .container {\n display: flex;\n position: relative;\n justify-content: center;\n gap: 32px;\n align-items: center;\n background: " + ((_headlineStyle_backgroundColor = headlineStyle.backgroundColor) != null ? _headlineStyle_backgroundColor : "#000") + ";\n box-shadow: 0px -1px 28px 0px rgba(0, 0, 0, 0.00);\n margin: 0;\n padding: 0 36px;\n max-height: " + (/* inlined export .MAX_BANNER_HEIGHT */"200px") + ";\n\n p {\n margin: 0;\n }\n\n .headline-cta {\n display: flex;\n gap: 32px;\n align-items: center;\n justify-content: center;\n text-align: left;\n width: 100%;\n\n .headline {\n padding: 14px 0;\n }\n }\n }\n\n .background-image-wrapper {\n " + (this.backgroundImageUrl ? "\n background-image: url(" + this.backgroundImageUrl + ");\n background-position: center;\n background-size: cover;\n " : "") + "\n }\n\n .form {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n ." + this.cx.input + " {\n font-family: " + ((_headlineStyle_fontFamily = headlineStyle.fontFamily) != null ? _headlineStyle_fontFamily : "inherit") + ";\n font-size: 14px;\n height: 32px;\n width: 230px;\n box-sizing: border-box;\n border: 1px solid rgba(200, 206, 208, 0.93);\n border-radius: " + inputRadius + 'px;\n padding: 8px 16px;\n color: #1B1B1B;\n outline: none;\n background-color: white;\n &:is(:focus, :focus-visible):not(&[readonly]):not(&[aria-invalid="true"]) {\n border-color: ' + (buttonStyle.backgroundColor || headlineStyle.color) + ";\n outline: 2px solid " + (buttonStyle.backgroundColor || headlineStyle.color) + ";\n outline-offset: 2px;\n }\n &::placeholder {\n color: #6E7879;\n }\n }\n\n ." + this.cx.input + '[aria-invalid="true"] {\n border-color: #E4251B;\n outline: 2px solid #E4251B;\n padding-right: 32px;\n }\n\n .' + this.cx.inputErrorContainer + " {\n position: relative;\n }\n\n ." + this.cx.inputErrorIcon + " {\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n\n & svg {\n fill: #E4251B;\n }\n }\n\n #" + getPrivacyDisclosureTooltipId(this.props.id) + " {\n font-family: " + ((_headlineStyle_fontFamily1 = headlineStyle.fontFamily) != null ? _headlineStyle_fontFamily1 : "inherit") + ";\n justify-content: center;\n min-width: 100%;\n text-align: left;\n white-space: normal;\n }\n\n " + mobileStyle + "\n ";
|
|
115
|
+
}
|
|
116
|
+
get content() {
|
|
117
|
+
return this.html /* html */ (FormBanner_templateObject(), this.backgroundImageUrl ? "background-image-wrapper" : "", this.foregroundImage.prependedContent, this.headline, getFormId(this.id), this.input, this.button, this.foregroundImage.appendedContent, this.dismissButton);
|
|
118
|
+
}
|
|
119
|
+
get headline() {
|
|
120
|
+
const { headlineStyle, headlineText } = this.props.variation;
|
|
121
|
+
return new Headline(_extends({}, headlineStyle, {
|
|
122
|
+
text: headlineText,
|
|
123
|
+
type: "banner"
|
|
124
|
+
}), this.hasOffersFontEnhancements);
|
|
125
|
+
}
|
|
126
|
+
get buttonText() {
|
|
127
|
+
if (this.state.loading || this.state.current === (/* inlined export .FormState.FollowupQuestions */"followupQuestions")) {
|
|
128
|
+
var _this_props_variation_buttonStyle_color;
|
|
129
|
+
return LOADING_SVG_STRING_SPINNER((_this_props_variation_buttonStyle_color = this.props.variation.buttonStyle.color) != null ? _this_props_variation_buttonStyle_color : "#FFF", 11);
|
|
130
|
+
}
|
|
131
|
+
switch(this.state.current){
|
|
132
|
+
case (/* inlined export .FormState.EmailCapture */"emailCapture"):
|
|
133
|
+
var _this_props_variation_buttonText;
|
|
134
|
+
return (_this_props_variation_buttonText = this.props.variation.buttonText) != null ? _this_props_variation_buttonText : "Submit";
|
|
135
|
+
case (/* inlined export .FormState.End */"end"):
|
|
136
|
+
var _this_props_variation_buttonStyle_color1;
|
|
137
|
+
return CHECKBOX_SVG_STRING((_this_props_variation_buttonStyle_color1 = this.props.variation.buttonStyle.color) != null ? _this_props_variation_buttonStyle_color1 : "#FFF");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
get button() {
|
|
141
|
+
const { buttonStyle, headlineStyle } = this.props.variation;
|
|
142
|
+
return new Button(_extends({}, buttonStyle, {
|
|
143
|
+
id: this.id,
|
|
144
|
+
text: this.buttonText,
|
|
145
|
+
type: "banner-submit",
|
|
146
|
+
focusRingColor: headlineStyle.color
|
|
147
|
+
}), this.hasOffersFontEnhancements);
|
|
148
|
+
}
|
|
149
|
+
get dismissButton() {
|
|
150
|
+
var _ref, _ref1;
|
|
151
|
+
if (!this.props.allowDismiss) {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
const { headlineStyle, buttonStyle } = this.props.variation;
|
|
155
|
+
return new DismissButton({
|
|
156
|
+
id: this.id,
|
|
157
|
+
color: this.props.variation.headlineStyle.color,
|
|
158
|
+
focusRingColor: (_ref = headlineStyle == null ? void 0 : headlineStyle.color) != null ? _ref : null,
|
|
159
|
+
borderRadius: (_ref1 = buttonStyle == null ? void 0 : buttonStyle.borderRadius) != null ? _ref1 : "0px",
|
|
160
|
+
hasDismissButtonAccessibilityEnabled: this.hasDismissButtonAccessibilityEnabled
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
get location() {
|
|
164
|
+
return this.props.location;
|
|
165
|
+
}
|
|
166
|
+
get input() {
|
|
167
|
+
var _this_props_variation_emailField;
|
|
168
|
+
if (this.state.current === (/* inlined export .FormState.EmailCapture */"emailCapture") && this.state.error) {
|
|
169
|
+
var _this_props_variation_emailField1;
|
|
170
|
+
return this.html /* html */ (_templateObject2(), this.cx.inputErrorContainer, this.cx.input, escapeHtml(((_this_props_variation_emailField1 = this.props.variation.emailField) == null ? void 0 : _this_props_variation_emailField1.placeholder) || "name@business.com"), this.state.email, this.cx.inputErrorIcon, this.errorTooltip(_templateObject1(), AlertIcon));
|
|
171
|
+
}
|
|
172
|
+
const input = this.html /* html */ (_templateObject3(), this.cx.input, escapeHtml(((_this_props_variation_emailField = this.props.variation.emailField) == null ? void 0 : _this_props_variation_emailField.placeholder) || "name@business.com"), this.state.email && "value=" + this.state.email, this.privacyDisclosureTooltip && ' id="' + getPrivacyDisclosureTooltipTargetId(this.props.id) + '"\n aria-describedby="' + getPrivacyDisclosureTooltipId(this.props.id) + '"\n ' + IGNORE_1_PASSWORD_AUTOFILL + "\n " + IGNORE_LAST_PASS_AUTOFILL + "\n ");
|
|
173
|
+
return this.privacyDisclosureTooltip ? this.privacyDisclosureTooltip(_templateObject4(), input) : input;
|
|
174
|
+
}
|
|
175
|
+
get errorTooltip() {
|
|
176
|
+
return new Tooltip({
|
|
177
|
+
text: this.state.current === (/* inlined export .FormState.EmailCapture */"emailCapture") && this.state.error || "",
|
|
178
|
+
placement: this.location === LocationEnum.Header ? "bottom" : "top",
|
|
179
|
+
target: {
|
|
180
|
+
event: "always"
|
|
181
|
+
},
|
|
182
|
+
fontFamily: this.props.variation.headlineStyle.fontFamily,
|
|
183
|
+
offsetY: 9
|
|
184
|
+
}).wrapper;
|
|
185
|
+
}
|
|
186
|
+
get privacyDisclosureTooltip() {
|
|
187
|
+
if (!this.props.privacyDisclosureText || this.state.current !== (/* inlined export .FormState.EmailCapture */"emailCapture")) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
return new Tooltip({
|
|
191
|
+
text: this.props.privacyDisclosureText,
|
|
192
|
+
placement: this.props.location === LocationEnum.Footer ? "top" : "bottom",
|
|
193
|
+
target: {
|
|
194
|
+
selector: "." + this.cx.input,
|
|
195
|
+
event: "focus"
|
|
196
|
+
},
|
|
197
|
+
tooltipId: getPrivacyDisclosureTooltipId(this.props.id),
|
|
198
|
+
ariaLabel: "" + FormBanner.privacyDisclosureAriaLabel(this.props.privacyDisclosureText),
|
|
199
|
+
hasOffersFormBannerMobileImprovements: this.hasOffersFontEnhancements && this.isMobile
|
|
200
|
+
}).wrapper;
|
|
201
|
+
}
|
|
202
|
+
constructor(...args){
|
|
203
|
+
super(...args), this.displayName = "FormBanner", this.type = ContentVariationTypeEnum.HeadlineForm, this.foregroundImage = new ForegroundImageBanner({
|
|
204
|
+
location: this.location,
|
|
205
|
+
foregroundImageConfig: this.props.foregroundImageConfig,
|
|
206
|
+
foregroundImageUrl: this.props.foregroundImageUrl
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
FormBanner = __decorate([
|
|
211
|
+
autoRender
|
|
212
|
+
], FormBanner);
|
|
213
|
+
|
|
214
|
+
export { FormBanner };
|