@wix/editor-react-components 1.2153.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -0
- package/dist/site/components/AccordionComponent/AccordionContainer.d.ts +4 -0
- package/dist/site/components/AccordionComponent/AccordionItem.d.ts +12 -0
- package/dist/site/components/AccordionComponent/component.d.ts +3 -0
- package/dist/site/components/AccordionComponent/component.js +2530 -0
- package/dist/site/components/AccordionComponent/component.preview.d.ts +4 -0
- package/dist/site/components/AccordionComponent/constants.d.ts +72 -0
- package/dist/site/components/AccordionComponent/css.css +47 -0
- package/dist/site/components/AccordionComponent/hooks.d.ts +5 -0
- package/dist/site/components/AccordionComponent/index.d.ts +2 -0
- package/dist/site/components/AccordionComponent/index.js +6 -0
- package/dist/site/components/AccordionComponent/manifest.d.ts +5 -0
- package/dist/site/components/AccordionComponent/manifest.js +361 -0
- package/dist/site/components/AccordionComponent/manifestConfigs/iconPositionConfig.d.ts +16 -0
- package/dist/site/components/AccordionComponent/types.d.ts +49 -0
- package/dist/site/components/AccordionComponent/utils.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/AnimatedIcon.d.ts +5 -0
- package/dist/site/components/AnimatedIcon/AnimatedIcon.semanticClassNames.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/component.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/component.js +13 -0
- package/dist/site/components/AnimatedIcon/components/AnimatedSvg.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/constants.d.ts +84 -0
- package/dist/site/components/AnimatedIcon/css.css +19 -0
- package/dist/site/components/AnimatedIcon/index.d.ts +2 -0
- package/dist/site/components/AnimatedIcon/index.js +6 -0
- package/dist/site/components/AnimatedIcon/manifest.d.ts +5 -0
- package/dist/site/components/AnimatedIcon/manifest.js +157 -0
- package/dist/site/components/AnimatedIcon/panels/AnimatedIconPanelWrapper.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/BackButton.d.ts +7 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/Footer.d.ts +7 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/IconCreationPanel.d.ts +8 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/IconSelector.d.ts +11 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/PreviewSection.d.ts +13 -0
- package/dist/site/components/AnimatedIcon/panels/IconCreationPanel/Title.d.ts +7 -0
- package/dist/site/components/AnimatedIcon/panels/components/AnimatedIconCreationSection.d.ts +10 -0
- package/dist/site/components/AnimatedIcon/panels/components/DurationSection.d.ts +11 -0
- package/dist/site/components/AnimatedIcon/panels/components/IconTypeSection.d.ts +10 -0
- package/dist/site/components/AnimatedIcon/panels/components/SvgDisplaySection.d.ts +12 -0
- package/dist/site/components/AnimatedIcon/panels/constants.d.ts +15 -0
- package/dist/site/components/AnimatedIcon/panels/dataHooks.d.ts +16 -0
- package/dist/site/components/AnimatedIcon/panels/extension.d.ts +4 -0
- package/dist/site/components/AnimatedIcon/panels/panel.d.ts +3 -0
- package/dist/site/components/AnimatedIcon/panels/translations/consts.d.ts +20 -0
- package/dist/site/components/AnimatedIcon/panels/utils.d.ts +32 -0
- package/dist/site/components/AnimatedIcon/types.d.ts +27 -0
- package/dist/site/components/AnimatedIcon/useDefaultHoverBehavior.d.ts +7 -0
- package/dist/site/components/AnimatedIcon/utils.d.ts +1 -0
- package/dist/site/components/AudioPlayer/AudioPlayer.d.ts +4 -0
- package/dist/site/components/AudioPlayer/component.d.ts +4 -0
- package/dist/site/components/AudioPlayer/component.js +4757 -0
- package/dist/site/components/AudioPlayer/component.preview.d.ts +3 -0
- package/dist/site/components/AudioPlayer/components/PlayButton.d.ts +3 -0
- package/dist/site/components/AudioPlayer/components/ProgressSlider.d.ts +3 -0
- package/dist/site/components/AudioPlayer/components/VolumeControls.d.ts +3 -0
- package/dist/site/components/AudioPlayer/constants.d.ts +87 -0
- package/dist/site/components/AudioPlayer/css.css +217 -0
- package/dist/site/components/AudioPlayer/hooks/useAudioPlayer.d.ts +13 -0
- package/dist/site/components/AudioPlayer/icons/SoundOff.d.ts +2 -0
- package/dist/site/components/AudioPlayer/icons/SoundOn.d.ts +2 -0
- package/dist/site/components/AudioPlayer/index.d.ts +2 -0
- package/dist/site/components/AudioPlayer/index.js +6 -0
- package/dist/site/components/AudioPlayer/manifest.d.ts +5 -0
- package/dist/site/components/AudioPlayer/manifest.js +314 -0
- package/dist/site/components/AudioPlayer/manifestConfigs/controlsConfig.d.ts +63 -0
- package/dist/site/components/AudioPlayer/manifestConfigs/coverMediaConfig.d.ts +25 -0
- package/dist/site/components/AudioPlayer/types.d.ts +46 -0
- package/dist/site/components/AudioPlayer/utils/getAudioLoadUrlForPlayerInstance.d.ts +1 -0
- package/dist/site/components/AudioPlayer/utils.d.ts +1 -0
- package/dist/site/components/BoxContainer/component.d.ts +3 -0
- package/dist/site/components/BoxContainer/component.js +44 -0
- package/dist/site/components/BoxContainer/constants.d.ts +13 -0
- package/dist/site/components/BoxContainer/css.css +3 -0
- package/dist/site/components/BoxContainer/index.d.ts +2 -0
- package/dist/site/components/BoxContainer/index.js +6 -0
- package/dist/site/components/BoxContainer/manifest.d.ts +5 -0
- package/dist/site/components/BoxContainer/manifest.js +121 -0
- package/dist/site/components/BoxContainer/types.d.ts +34 -0
- package/dist/site/components/Breadcrumbs/BreadcrumbItem.d.ts +3 -0
- package/dist/site/components/Breadcrumbs/EllipsisItem.d.ts +3 -0
- package/dist/site/components/Breadcrumbs/Separator.d.ts +2 -0
- package/dist/site/components/Breadcrumbs/component.d.ts +5 -0
- package/dist/site/components/Breadcrumbs/component.js +1672 -0
- package/dist/site/components/Breadcrumbs/component.preview.d.ts +3 -0
- package/dist/site/components/Breadcrumbs/constants.d.ts +95 -0
- package/dist/site/components/Breadcrumbs/css.css +170 -0
- package/dist/site/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/site/components/Breadcrumbs/index.js +6 -0
- package/dist/site/components/Breadcrumbs/manifest.d.ts +5 -0
- package/dist/site/components/Breadcrumbs/manifest.js +380 -0
- package/dist/site/components/Breadcrumbs/types.d.ts +40 -0
- package/dist/site/components/Breadcrumbs/useBreadcrumbItems.d.ts +4 -0
- package/dist/site/components/Breadcrumbs/useCollapsedRange.d.ts +3 -0
- package/dist/site/components/Breadcrumbs/useSeoService.d.ts +2 -0
- package/dist/site/components/Breadcrumbs/utils.d.ts +3 -0
- package/dist/site/components/Button/Button.corvid.types.d.ts +34 -0
- package/dist/site/components/Button/Button.d.ts +5 -0
- package/dist/site/components/Button/Button.types.d.ts +76 -0
- package/dist/site/components/Button/component.d.ts +4 -0
- package/dist/site/components/Button/component.js +5 -0
- package/dist/site/components/Button/component.preview.d.ts +3 -0
- package/dist/site/components/Button/components/AnimatedButtonIcon.d.ts +4 -0
- package/dist/site/components/Button/constants.d.ts +66 -0
- package/dist/site/components/Button/css.css +150 -0
- package/dist/site/components/Button/hooks/index.d.ts +4 -0
- package/dist/site/components/Button/hooks/useButtonA11y.d.ts +71 -0
- package/dist/site/components/Button/hooks/useButtonEventHandlers.d.ts +27 -0
- package/dist/site/components/Button/hooks/useHoverState.d.ts +7 -0
- package/dist/site/components/Button/hooks/useIconAnimation.d.ts +6 -0
- package/dist/site/components/Button/index.d.ts +2 -0
- package/dist/site/components/Button/index.js +6 -0
- package/dist/site/components/Button/manifest.d.ts +5 -0
- package/dist/site/components/Button/manifest.js +340 -0
- package/dist/site/components/Button/sdk.d.ts +10 -0
- package/dist/site/components/Button/sdk.js +417 -0
- package/dist/site/components/CollapsibleText/CollapsibleText.d.ts +3 -0
- package/dist/site/components/CollapsibleText/ExpandControl.d.ts +13 -0
- package/dist/site/components/CollapsibleText/component.d.ts +2 -0
- package/dist/site/components/CollapsibleText/component.js +227 -0
- package/dist/site/components/CollapsibleText/component.preview.d.ts +4 -0
- package/dist/site/components/CollapsibleText/constants.d.ts +65 -0
- package/dist/site/components/CollapsibleText/css.css +273 -0
- package/dist/site/components/CollapsibleText/index.d.ts +2 -0
- package/dist/site/components/CollapsibleText/index.js +6 -0
- package/dist/site/components/CollapsibleText/manifest/manifestClasses.d.ts +5 -0
- package/dist/site/components/CollapsibleText/manifest.d.ts +5 -0
- package/dist/site/components/CollapsibleText/manifest.js +243 -0
- package/dist/site/components/CollapsibleText/sdk.d.ts +14 -0
- package/dist/site/components/CollapsibleText/sdk.js +80 -0
- package/dist/site/components/CollapsibleText/types.d.ts +37 -0
- package/dist/site/components/CollapsibleText/useReinitializeState.d.ts +2 -0
- package/dist/site/components/CollapsibleText/utils.d.ts +5 -0
- package/dist/site/components/GoogleMap/GoogleMap.d.ts +8 -0
- package/dist/site/components/GoogleMap/GoogleMap.types.d.ts +131 -0
- package/dist/site/components/GoogleMap/component.d.ts +2 -0
- package/dist/site/components/GoogleMap/component.js +1925 -0
- package/dist/site/components/GoogleMap/components/GoogleMapMarker.d.ts +4 -0
- package/dist/site/components/GoogleMap/components/GoogleMapReact.d.ts +66 -0
- package/dist/site/components/GoogleMap/components/GoogleMapReactInteractiveMap.d.ts +34 -0
- package/dist/site/components/GoogleMap/consts.d.ts +171 -0
- package/dist/site/components/GoogleMap/css.css +372 -0
- package/dist/site/components/GoogleMap/hooks/useGoogleMapProps.d.ts +13 -0
- package/dist/site/components/GoogleMap/index.d.ts +2 -0
- package/dist/site/components/GoogleMap/index.js +6 -0
- package/dist/site/components/GoogleMap/manifest.d.ts +5 -0
- package/dist/site/components/GoogleMap/manifest.js +240 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/components/LocationForm.d.ts +2 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/components/LocationsList.d.ts +2 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/context/ManageLocationsContext.d.ts +8 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/extension.d.ts +4 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/hooks/useLocationForm.d.ts +25 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/hooks/useSuccessAnimation.d.ts +6 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/panel.d.ts +3 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/translations/consts.d.ts +18 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/types.d.ts +22 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/utils/address-utils.d.ts +7 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/utils/component-props-utils.d.ts +26 -0
- package/dist/site/components/GoogleMap/panels/ManageLocations/utils/form-utils.d.ts +21 -0
- package/dist/site/components/GoogleMap/utils/imperativeMethods.d.ts +2 -0
- package/dist/site/components/GoogleMap/utils/mapUtils.d.ts +11 -0
- package/dist/site/components/GoogleMap/utils/sdkMethods.d.ts +27 -0
- package/dist/site/components/HTMLComponent/HTMLComponent.types.d.ts +52 -0
- package/dist/site/components/HTMLComponent/component.d.ts +6 -0
- package/dist/site/components/HTMLComponent/component.js +295 -0
- package/dist/site/components/HTMLComponent/component.preview.d.ts +5 -0
- package/dist/site/components/HTMLComponent/components/EmptyState.d.ts +3 -0
- package/dist/site/components/HTMLComponent/components/HTMLComponent.d.ts +17 -0
- package/dist/site/components/HTMLComponent/constants.d.ts +6 -0
- package/dist/site/components/HTMLComponent/css.css +348 -0
- package/dist/site/components/HTMLComponent/hooks/index.d.ts +2 -0
- package/dist/site/components/HTMLComponent/hooks/useHTMLComponentProps.d.ts +20 -0
- package/dist/site/components/HTMLComponent/index.d.ts +2 -0
- package/dist/site/components/HTMLComponent/index.js +6 -0
- package/dist/site/components/HTMLComponent/manifest.d.ts +5 -0
- package/dist/site/components/HTMLComponent/manifest.js +217 -0
- package/dist/site/components/HTMLComponent/panels/components/CookieConsentField.d.ts +14 -0
- package/dist/site/components/HTMLComponent/panels/components/ExternalUrlContent.d.ts +14 -0
- package/dist/site/components/HTMLComponent/panels/components/HtmlCodeContent.d.ts +13 -0
- package/dist/site/components/HTMLComponent/panels/components/SourceTypeContent.d.ts +18 -0
- package/dist/site/components/HTMLComponent/panels/components/SourceTypeSelector.d.ts +14 -0
- package/dist/site/components/HTMLComponent/panels/components/TitleField.d.ts +15 -0
- package/dist/site/components/HTMLComponent/panels/components/index.d.ts +6 -0
- package/dist/site/components/HTMLComponent/panels/constants.d.ts +91 -0
- package/dist/site/components/HTMLComponent/panels/extension.d.ts +4 -0
- package/dist/site/components/HTMLComponent/panels/hooks.d.ts +24 -0
- package/dist/site/components/HTMLComponent/panels/panel.d.ts +3 -0
- package/dist/site/components/HTMLComponent/panels/test-utils.d.ts +18 -0
- package/dist/site/components/HTMLComponent/panels/translations/consts.d.ts +21 -0
- package/dist/site/components/HTMLComponent/panels/utils.d.ts +7 -0
- package/dist/site/components/HTMLComponent/sdk.d.ts +5 -0
- package/dist/site/components/HTMLComponent/sdk.js +69 -0
- package/dist/site/components/HTMLComponent/utils.d.ts +1 -0
- package/dist/site/components/HipaaIcon/HipaaBadgeSvg.d.ts +3 -0
- package/dist/site/components/HipaaIcon/HipaaIcon.types.d.ts +9 -0
- package/dist/site/components/HipaaIcon/component.d.ts +4 -0
- package/dist/site/components/HipaaIcon/component.js +165 -0
- package/dist/site/components/HipaaIcon/component.preview.d.ts +5 -0
- package/dist/site/components/HipaaIcon/constants.d.ts +26 -0
- package/dist/site/components/HipaaIcon/css.css +44 -0
- package/dist/site/components/HipaaIcon/index.d.ts +2 -0
- package/dist/site/components/HipaaIcon/index.js +6 -0
- package/dist/site/components/HipaaIcon/manifest.d.ts +5 -0
- package/dist/site/components/HipaaIcon/manifest.js +89 -0
- package/dist/site/components/HipaaIcon/panels/hipaaSettings/extension.d.ts +4 -0
- package/dist/site/components/HipaaIcon/panels/hipaaSettings/panel.d.ts +3 -0
- package/dist/site/components/HipaaIcon/panels/hipaaSettings/translations/consts.d.ts +6 -0
- package/dist/site/components/HipaaIcon/sdk.d.ts +3 -0
- package/dist/site/components/HipaaIcon/sdk.js +12 -0
- package/dist/site/components/HipaaIcon/utils.d.ts +2 -0
- package/dist/site/components/Image3/Image3.types.d.ts +29 -0
- package/dist/site/components/Image3/component.d.ts +5 -0
- package/dist/site/components/Image3/component.js +197 -0
- package/dist/site/components/Image3/component.preview.d.ts +5 -0
- package/dist/site/components/Image3/css.css +63 -0
- package/dist/site/components/Image3/index.d.ts +2 -0
- package/dist/site/components/Image3/index.js +6 -0
- package/dist/site/components/Image3/manifest.d.ts +5 -0
- package/dist/site/components/Image3/manifest.js +197 -0
- package/dist/site/components/Image3/previewManifestOverrides.d.ts +4 -0
- package/dist/site/components/Image3/sdk.d.ts +5 -0
- package/dist/site/components/Image3/sdk.js +105 -0
- package/dist/site/components/LegacyAppWidget/component.d.ts +10 -0
- package/dist/site/components/LegacyAppWidget/component.js +46 -0
- package/dist/site/components/LegacyAppWidget/components/AppWidget.types.d.ts +11 -0
- package/dist/site/components/LegacyAppWidget/components/ResponsiveAppWidget.d.ts +4 -0
- package/dist/site/components/LegacyAppWidget/css.css +3 -0
- package/dist/site/components/LegacyAppWidget/index.d.ts +2 -0
- package/dist/site/components/LegacyAppWidget/index.js +6 -0
- package/dist/site/components/LegacyAppWidget/manifest.d.ts +5 -0
- package/dist/site/components/LegacyAppWidget/manifest.js +42 -0
- package/dist/site/components/LegacyContainer/Container.corvid.d.ts +5 -0
- package/dist/site/components/LegacyContainer/component.d.ts +13 -0
- package/dist/site/components/LegacyContainer/component.js +40 -0
- package/dist/site/components/LegacyContainer/components/Container.semanticClassNames.d.ts +4 -0
- package/dist/site/components/LegacyContainer/components/Container.shared.constants.d.ts +6 -0
- package/dist/site/components/LegacyContainer/components/Container.types.d.ts +77 -0
- package/dist/site/components/LegacyContainer/components/Repeater.semanticClassNames.d.ts +5 -0
- package/dist/site/components/LegacyContainer/components/ResponsiveBox.d.ts +4 -0
- package/dist/site/components/LegacyContainer/components/ResponsiveBoxSkin.d.ts +4 -0
- package/dist/site/components/LegacyContainer/css.css +53 -0
- package/dist/site/components/LegacyContainer/index.d.ts +2 -0
- package/dist/site/components/LegacyContainer/index.js +6 -0
- package/dist/site/components/LegacyContainer/manifest.d.ts +5 -0
- package/dist/site/components/LegacyContainer/manifest.js +45 -0
- package/dist/site/components/LegacyContainer/sdk.d.ts +3 -0
- package/dist/site/components/LegacyContainer/sdk.js +85 -0
- package/dist/site/components/LegacyMultiStateBox/LegacyMultiStateBox.types.d.ts +15 -0
- package/dist/site/components/LegacyMultiStateBox/component.d.ts +4 -0
- package/dist/site/components/LegacyMultiStateBox/component.js +131 -0
- package/dist/site/components/LegacyMultiStateBox/components/MultiStateBox.d.ts +4 -0
- package/dist/site/components/LegacyMultiStateBox/css.css +53 -0
- package/dist/site/components/LegacyMultiStateBox/hooks/index.d.ts +2 -0
- package/dist/site/components/LegacyMultiStateBox/hooks/useDidUpdate.d.ts +1 -0
- package/dist/site/components/LegacyMultiStateBox/hooks/useMSBStates.d.ts +10 -0
- package/dist/site/components/LegacyMultiStateBox/index.d.ts +2 -0
- package/dist/site/components/LegacyMultiStateBox/index.js +6 -0
- package/dist/site/components/LegacyMultiStateBox/manifest.d.ts +5 -0
- package/dist/site/components/LegacyMultiStateBox/manifest.js +48 -0
- package/dist/site/components/LegacyMultiStateBox/sdk.d.ts +6 -0
- package/dist/site/components/LegacyMultiStateBox/sdk.js +164 -0
- package/dist/site/components/Line/Line.semanticClassNames.d.ts +4 -0
- package/dist/site/components/Line/component.d.ts +24 -0
- package/dist/site/components/Line/component.js +60 -0
- package/dist/site/components/Line/component.preview.d.ts +3 -0
- package/dist/site/components/Line/constants.d.ts +102 -0
- package/dist/site/components/Line/css.css +60 -0
- package/dist/site/components/Line/index.d.ts +2 -0
- package/dist/site/components/Line/index.js +6 -0
- package/dist/site/components/Line/manifest.d.ts +5 -0
- package/dist/site/components/Line/manifest.js +799 -0
- package/dist/site/components/Line/manifestConfigs/shapeConfig.d.ts +17 -0
- package/dist/site/components/Line/manifestConfigs/typeConfig.d.ts +16 -0
- package/dist/site/components/Line/panels/format/extension.d.ts +4 -0
- package/dist/site/components/Line/panels/format/panel.d.ts +3 -0
- package/dist/site/components/Line/panels/format/translations/consts.d.ts +7 -0
- package/dist/site/components/LinkBar/LinkBar.d.ts +5 -0
- package/dist/site/components/LinkBar/component.d.ts +2 -0
- package/dist/site/components/LinkBar/component.js +93 -0
- package/dist/site/components/LinkBar/constants.d.ts +57 -0
- package/dist/site/components/LinkBar/css.css +46 -0
- package/dist/site/components/LinkBar/index.d.ts +2 -0
- package/dist/site/components/LinkBar/index.js +6 -0
- package/dist/site/components/LinkBar/manifest.d.ts +5 -0
- package/dist/site/components/LinkBar/manifest.js +230 -0
- package/dist/site/components/LinkBar/panels/orientation/constants.d.ts +5 -0
- package/dist/site/components/LinkBar/panels/orientation/extension.d.ts +4 -0
- package/dist/site/components/LinkBar/panels/orientation/panel.d.ts +3 -0
- package/dist/site/components/LinkBar/panels/orientation/test-utils.d.ts +5 -0
- package/dist/site/components/LinkBar/panels/orientation/translations/consts.d.ts +7 -0
- package/dist/site/components/LinkBar/types.d.ts +23 -0
- package/dist/site/components/Logo/Logo.d.ts +5 -0
- package/dist/site/components/Logo/Logo.semanticClassNames.d.ts +3 -0
- package/dist/site/components/Logo/Logo.types.d.ts +12 -0
- package/dist/site/components/Logo/component.d.ts +2 -0
- package/dist/site/components/Logo/component.js +155 -0
- package/dist/site/components/Logo/constants.d.ts +38 -0
- package/dist/site/components/Logo/css.css +46 -0
- package/dist/site/components/Logo/hooks/index.d.ts +1 -0
- package/dist/site/components/Logo/hooks/useSiteColors.d.ts +5 -0
- package/dist/site/components/Logo/index.d.ts +2 -0
- package/dist/site/components/Logo/index.js +6 -0
- package/dist/site/components/Logo/manifest.d.ts +5 -0
- package/dist/site/components/Logo/manifest.js +103 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/EmptyPanelState.d.ts +15 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/LogoActions.d.ts +18 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/LogoBackgroundRemovalActions.d.ts +17 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/LogoBackgroundRemovalButton.d.ts +8 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/LogoPreview.d.ts +12 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/StatusComponents.d.ts +27 -0
- package/dist/site/components/Logo/panels/customizeLogo/components/index.d.ts +5 -0
- package/dist/site/components/Logo/panels/customizeLogo/extension.d.ts +4 -0
- package/dist/site/components/Logo/panels/customizeLogo/handlers.d.ts +12 -0
- package/dist/site/components/Logo/panels/customizeLogo/hooks.d.ts +2 -0
- package/dist/site/components/Logo/panels/customizeLogo/panel.d.ts +3 -0
- package/dist/site/components/Logo/panels/customizeLogo/translations/consts.d.ts +39 -0
- package/dist/site/components/Logo/panels/customizeLogo/types.d.ts +32 -0
- package/dist/site/components/Logo/panels/customizeLogo/utils.d.ts +105 -0
- package/dist/site/components/Logo/sdk.d.ts +5 -0
- package/dist/site/components/Logo/sdk.js +122 -0
- package/dist/site/components/Lottie/component.d.ts +4 -0
- package/dist/site/components/Lottie/component.js +17219 -0
- package/dist/site/components/Lottie/component.preview.d.ts +5 -0
- package/dist/site/components/Lottie/components/LottieAnimation.d.ts +5 -0
- package/dist/site/components/Lottie/constants.d.ts +78 -0
- package/dist/site/components/Lottie/css.css +187 -0
- package/dist/site/components/Lottie/hooks/useLottie.d.ts +19 -0
- package/dist/site/components/Lottie/index.d.ts +2 -0
- package/dist/site/components/Lottie/index.js +6 -0
- package/dist/site/components/Lottie/manifest.d.ts +5 -0
- package/dist/site/components/Lottie/manifest.js +192 -0
- package/dist/site/components/Lottie/types.d.ts +37 -0
- package/dist/site/components/Menu/Menu.types.d.ts +141 -0
- package/dist/site/components/Menu/animations.d.ts +132 -0
- package/dist/site/components/Menu/component.d.ts +5 -0
- package/dist/site/components/Menu/component.js +2285 -0
- package/dist/site/components/Menu/component.preview.d.ts +11 -0
- package/dist/site/components/Menu/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/site/components/Menu/components/Dropdown/DropdownWrapper.d.ts +11 -0
- package/dist/site/components/Menu/components/Dropdown/index.d.ts +1 -0
- package/dist/site/components/Menu/components/Hamburger/Hamburger.d.ts +3 -0
- package/dist/site/components/Menu/components/Hamburger/index.d.ts +1 -0
- package/dist/site/components/Menu/components/MenuContent/MenuContent.d.ts +4 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/MenuItem.d.ts +3 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/MenuItemDropdownIcon.d.ts +15 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/MenuItemLabel.d.ts +14 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/updateDropdownDomStyles.d.ts +4 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/useAnimationState.d.ts +24 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/useDropdown.d.ts +16 -0
- package/dist/site/components/Menu/components/MenuContent/MenuItem/utils.d.ts +26 -0
- package/dist/site/components/Menu/components/MenuContent/Scroll/scrollTo.d.ts +1 -0
- package/dist/site/components/Menu/components/MenuContent/Scroll/useScroll.d.ts +9 -0
- package/dist/site/components/Menu/components/MenuContent/Scroll/utils.d.ts +7 -0
- package/dist/site/components/Menu/components/MenuContent/ScrollButton/ScrollButton.d.ts +4 -0
- package/dist/site/components/Menu/components/MenuContent/ScrollControls/ScrollControls.d.ts +3 -0
- package/dist/site/components/Menu/components/MenuContent/assets/DropdownIcon.d.ts +2 -0
- package/dist/site/components/Menu/components/Navbar/Navbar.d.ts +3 -0
- package/dist/site/components/Menu/components/Navbar/index.d.ts +1 -0
- package/dist/site/components/Menu/components/Submenu/Submenu.d.ts +4 -0
- package/dist/site/components/Menu/components/Submenu/constants.d.ts +9 -0
- package/dist/site/components/Menu/components/Submenu/types.d.ts +22 -0
- package/dist/site/components/Menu/constants.d.ts +330 -0
- package/dist/site/components/Menu/contexts/DropdownContext.d.ts +7 -0
- package/dist/site/components/Menu/contexts/MenuContext.d.ts +24 -0
- package/dist/site/components/Menu/contexts/MenuItemContext.d.ts +16 -0
- package/dist/site/components/Menu/css.css +1077 -0
- package/dist/site/components/Menu/index.d.ts +2 -0
- package/dist/site/components/Menu/index.js +6 -0
- package/dist/site/components/Menu/manifest.d.ts +5 -0
- package/dist/site/components/Menu/manifest.js +1395 -0
- package/dist/site/components/Menu/manifestConfigs/dropdownConfig.d.ts +250 -0
- package/dist/site/components/Menu/manifestConfigs/dropdownItemConfig.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/dropdownSubItemConfig.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/hamburgerButtonConfig.d.ts +3 -0
- package/dist/site/components/Menu/manifestConfigs/hamburgerMenuConfig.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/index.d.ts +5 -0
- package/dist/site/components/Menu/manifestConfigs/itemConfig.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/navbarConfig.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/overrides/hamburgerMenuConfig.d.ts +7 -0
- package/dist/site/components/Menu/manifestConfigs/overrides/horizontalHugNavbarConfig.d.ts +13 -0
- package/dist/site/components/Menu/manifestConfigs/overrides/horizontalScrollNavbarConfig.d.ts +14 -0
- package/dist/site/components/Menu/manifestConfigs/overrides/verticalNavbarConfig.d.ts +12 -0
- package/dist/site/components/Menu/manifestConfigs/scrollButtonConfig.d.ts +2 -0
- package/dist/site/components/Menu/menuItems.d.ts +4 -0
- package/dist/site/components/Menu/panels/format/constants.d.ts +20 -0
- package/dist/site/components/Menu/panels/format/extension.d.ts +4 -0
- package/dist/site/components/Menu/panels/format/formatPanelTypes.d.ts +11 -0
- package/dist/site/components/Menu/panels/format/options.d.ts +50 -0
- package/dist/site/components/Menu/panels/format/panel.d.ts +3 -0
- package/dist/site/components/Menu/panels/format/presets.d.ts +2 -0
- package/dist/site/components/Menu/panels/format/test-utils.d.ts +5 -0
- package/dist/site/components/Menu/panels/format/translations/consts.d.ts +15 -0
- package/dist/site/components/Menu/sdk.d.ts +3 -0
- package/dist/site/components/Menu/sdk.js +886 -0
- package/dist/site/components/Menu/sdkUtils/errors.d.ts +36 -0
- package/dist/site/components/Menu/sdkUtils/menuUtils.d.ts +17 -0
- package/dist/site/components/Menu/sdkUtils/transformers.d.ts +3 -0
- package/dist/site/components/Menu/sdkUtils/validators/validateMenuItemsDepth.d.ts +2 -0
- package/dist/site/components/Menu/sdkUtils/validators/validateMenuItemsId.d.ts +2 -0
- package/dist/site/components/Menu/sdkUtils/validators/validateMenuItemsTarget.d.ts +2 -0
- package/dist/site/components/Menu/semanticClassNames.d.ts +20 -0
- package/dist/site/components/Menu/utils.d.ts +21 -0
- package/dist/site/components/MultiStateBox/component.d.ts +4 -0
- package/dist/site/components/MultiStateBox/component.js +103 -0
- package/dist/site/components/MultiStateBox/component.preview.d.ts +3 -0
- package/dist/site/components/MultiStateBox/constants.d.ts +17 -0
- package/dist/site/components/MultiStateBox/css.css +13 -0
- package/dist/site/components/MultiStateBox/index.d.ts +2 -0
- package/dist/site/components/MultiStateBox/index.js +6 -0
- package/dist/site/components/MultiStateBox/manifest.d.ts +5 -0
- package/dist/site/components/MultiStateBox/manifest.js +123 -0
- package/dist/site/components/MultiStateBox/types.d.ts +13 -0
- package/dist/site/components/MultiStateBox/utils.d.ts +3 -0
- package/dist/site/components/ProgressBar/ProgressBar.d.ts +20 -0
- package/dist/site/components/ProgressBar/component.d.ts +2 -0
- package/dist/site/components/ProgressBar/component.js +103 -0
- package/dist/site/components/ProgressBar/constants.d.ts +30 -0
- package/dist/site/components/ProgressBar/css.css +43 -0
- package/dist/site/components/ProgressBar/index.d.ts +2 -0
- package/dist/site/components/ProgressBar/index.js +6 -0
- package/dist/site/components/ProgressBar/manifest.d.ts +5 -0
- package/dist/site/components/ProgressBar/manifest.js +149 -0
- package/dist/site/components/ProgressBar/sdk.d.ts +5 -0
- package/dist/site/components/ProgressBar/sdk.js +54 -0
- package/dist/site/components/ProgressBar/utils.d.ts +1 -0
- package/dist/site/components/Repeater/ItemSkeleton.d.ts +2 -0
- package/dist/site/components/Repeater/LiveAnnouncer.d.ts +11 -0
- package/dist/site/components/Repeater/LoadMoreButton.d.ts +8 -0
- package/dist/site/components/Repeater/component.d.ts +5 -0
- package/dist/site/components/Repeater/component.js +498 -0
- package/dist/site/components/Repeater/component.preview.d.ts +5 -0
- package/dist/site/components/Repeater/constants.d.ts +83 -0
- package/dist/site/components/Repeater/css.css +166 -0
- package/dist/site/components/Repeater/hooks/useItemsPerRow.d.ts +2 -0
- package/dist/site/components/Repeater/hooks/useLoadMoreObserver.d.ts +7 -0
- package/dist/site/components/Repeater/index.d.ts +2 -0
- package/dist/site/components/Repeater/index.js +6 -0
- package/dist/site/components/Repeater/manifest.d.ts +5 -0
- package/dist/site/components/Repeater/manifest.js +522 -0
- package/dist/site/components/Repeater/panels/format/extension.d.ts +4 -0
- package/dist/site/components/Repeater/panels/format/panel.d.ts +3 -0
- package/dist/site/components/Repeater/panels/format/translations/consts.d.ts +13 -0
- package/dist/site/components/Repeater/types.d.ts +20 -0
- package/dist/site/components/ShareButtons/Checkmark.d.ts +3 -0
- package/dist/site/components/ShareButtons/CopyButtonIcon.d.ts +4 -0
- package/dist/site/components/ShareButtons/CopyButtonWrapper.d.ts +4 -0
- package/dist/site/components/ShareButtons/ShareButton.d.ts +4 -0
- package/dist/site/components/ShareButtons/ShareButtonIcon.d.ts +4 -0
- package/dist/site/components/ShareButtons/ShareButtons.d.ts +5 -0
- package/dist/site/components/ShareButtons/ShareButtons.types.d.ts +42 -0
- package/dist/site/components/ShareButtons/component.d.ts +4 -0
- package/dist/site/components/ShareButtons/component.js +485 -0
- package/dist/site/components/ShareButtons/component.preview.d.ts +4 -0
- package/dist/site/components/ShareButtons/constants.d.ts +156 -0
- package/dist/site/components/ShareButtons/css.css +150 -0
- package/dist/site/components/ShareButtons/index.d.ts +2 -0
- package/dist/site/components/ShareButtons/index.js +6 -0
- package/dist/site/components/ShareButtons/manifest.d.ts +5 -0
- package/dist/site/components/ShareButtons/manifest.js +356 -0
- package/dist/site/components/ShareButtons/panels/format/constants.d.ts +12 -0
- package/dist/site/components/ShareButtons/panels/format/extension.d.ts +4 -0
- package/dist/site/components/ShareButtons/panels/format/panel.d.ts +3 -0
- package/dist/site/components/ShareButtons/panels/manage/ButtonActions.d.ts +9 -0
- package/dist/site/components/ShareButtons/panels/manage/ButtonItem.d.ts +8 -0
- package/dist/site/components/ShareButtons/panels/manage/ButtonManagementContext.d.ts +27 -0
- package/dist/site/components/ShareButtons/panels/manage/EditModeControls.d.ts +9 -0
- package/dist/site/components/ShareButtons/panels/manage/constants.d.ts +61 -0
- package/dist/site/components/ShareButtons/panels/manage/extension.d.ts +4 -0
- package/dist/site/components/ShareButtons/panels/manage/hooks/useNavigationMode.d.ts +5 -0
- package/dist/site/components/ShareButtons/panels/manage/panel.d.ts +3 -0
- package/dist/site/components/ShareButtons/panels/manage/test-utils.d.ts +7 -0
- package/dist/site/components/ShareButtons/panels/manage/types.d.ts +10 -0
- package/dist/site/components/ShareButtons/panels/translations/consts.d.ts +26 -0
- package/dist/site/components/ShareButtons/utils.d.ts +106 -0
- package/dist/site/components/SiteLogo/SiteLogo.semanticClassNames.d.ts +3 -0
- package/dist/site/components/SiteLogo/SiteLogo.types.d.ts +24 -0
- package/dist/site/components/SiteLogo/component.d.ts +3 -0
- package/dist/site/components/SiteLogo/component.js +68 -0
- package/dist/site/components/SiteLogo/component.preview.d.ts +10 -0
- package/dist/site/components/SiteLogo/css.css +137 -0
- package/dist/site/components/SiteLogo/index.d.ts +2 -0
- package/dist/site/components/SiteLogo/index.js +6 -0
- package/dist/site/components/SiteLogo/manifest.d.ts +5 -0
- package/dist/site/components/SiteLogo/manifest.js +199 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/LogoColorPanel.d.ts +9 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/ResetLogoColorsButton.d.ts +10 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/bi.d.ts +13 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/extension.d.ts +4 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/panel.d.ts +3 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/translations.d.ts +11 -0
- package/dist/site/components/SiteLogo/panels/customizeLogo/utils.d.ts +6 -0
- package/dist/site/components/Slideshow/NavigationButtons.d.ts +14 -0
- package/dist/site/components/Slideshow/PauseButton.d.ts +14 -0
- package/dist/site/components/Slideshow/SlideIndicators.d.ts +16 -0
- package/dist/site/components/Slideshow/Slideshow.d.ts +46 -0
- package/dist/site/components/Slideshow/Slideshow.semanticClassNames.d.ts +8 -0
- package/dist/site/components/Slideshow/assets/PauseIcon.d.ts +2 -0
- package/dist/site/components/Slideshow/assets/PlayIcon.d.ts +2 -0
- package/dist/site/components/Slideshow/component.d.ts +2 -0
- package/dist/site/components/Slideshow/component.js +740 -0
- package/dist/site/components/Slideshow/component.preview.d.ts +5 -0
- package/dist/site/components/Slideshow/constants.d.ts +136 -0
- package/dist/site/components/Slideshow/css.css +587 -0
- package/dist/site/components/Slideshow/index.d.ts +2 -0
- package/dist/site/components/Slideshow/index.js +6 -0
- package/dist/site/components/Slideshow/manifest.d.ts +5 -0
- package/dist/site/components/Slideshow/manifest.js +898 -0
- package/dist/site/components/Slideshow/manifestConfigs/navigationButtons.d.ts +2 -0
- package/dist/site/components/Slideshow/manifestConfigs/slideIndicators.d.ts +2 -0
- package/dist/site/components/Slideshow/sdk.d.ts +2 -0
- package/dist/site/components/Slideshow/sdk.js +5 -0
- package/dist/site/components/Slideshow/types.d.ts +4 -0
- package/dist/site/components/Slideshow/useActiveSlideTracker.d.ts +17 -0
- package/dist/site/components/Slideshow/useSlideIndicators.d.ts +17 -0
- package/dist/site/components/SlotsPlaceholder/SlotsPlaceholder.types.d.ts +7 -0
- package/dist/site/components/SlotsPlaceholder/component.d.ts +4 -0
- package/dist/site/components/SlotsPlaceholder/component.js +32 -0
- package/dist/site/components/SlotsPlaceholder/css.css +9 -0
- package/dist/site/components/SlotsPlaceholder/index.d.ts +2 -0
- package/dist/site/components/SlotsPlaceholder/index.js +6 -0
- package/dist/site/components/SlotsPlaceholder/manifest.d.ts +5 -0
- package/dist/site/components/SlotsPlaceholder/manifest.js +69 -0
- package/dist/site/components/SlotsPlaceholder/sdk.d.ts +2 -0
- package/dist/site/components/SlotsPlaceholder/sdk.js +87 -0
- package/dist/site/components/SlotsPlaceholder/slotsPlaceholderCompFactory.d.ts +2 -0
- package/dist/site/components/SocialPlayerFacebook/SocialPlayerFacebook.semanticClassNames.d.ts +5 -0
- package/dist/site/components/SocialPlayerFacebook/SocialPlayerFacebook.types.d.ts +3 -0
- package/dist/site/components/SocialPlayerFacebook/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerFacebook/component.js +83 -0
- package/dist/site/components/SocialPlayerFacebook/component.preview.d.ts +5 -0
- package/dist/site/components/SocialPlayerFacebook/components/SocialPlayerFacebook.d.ts +4 -0
- package/dist/site/components/SocialPlayerFacebook/components/SocialPlayerFacebook.utils.d.ts +6 -0
- package/dist/site/components/SocialPlayerFacebook/constants.d.ts +1 -0
- package/dist/site/components/SocialPlayerFacebook/css.css +40 -0
- package/dist/site/components/SocialPlayerFacebook/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerFacebook/index.js +6 -0
- package/dist/site/components/SocialPlayerFacebook/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerFacebook/manifest.js +147 -0
- package/dist/site/components/SocialPlayerFacebook/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerFacebook/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerFacebook/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerFacebook/sdk.js +45 -0
- package/dist/site/components/SocialPlayerInstagram/SocialPlayerInstagram.semanticClassNames.d.ts +5 -0
- package/dist/site/components/SocialPlayerInstagram/SocialPlayerInstagram.types.d.ts +3 -0
- package/dist/site/components/SocialPlayerInstagram/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerInstagram/component.js +80 -0
- package/dist/site/components/SocialPlayerInstagram/component.preview.d.ts +5 -0
- package/dist/site/components/SocialPlayerInstagram/components/SocialPlayerInstagram.d.ts +4 -0
- package/dist/site/components/SocialPlayerInstagram/components/SocialPlayerInstagram.utils.d.ts +1 -0
- package/dist/site/components/SocialPlayerInstagram/constants.d.ts +6 -0
- package/dist/site/components/SocialPlayerInstagram/css.css +33 -0
- package/dist/site/components/SocialPlayerInstagram/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerInstagram/index.js +6 -0
- package/dist/site/components/SocialPlayerInstagram/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerInstagram/manifest.js +149 -0
- package/dist/site/components/SocialPlayerInstagram/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerInstagram/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerInstagram/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerInstagram/sdk.js +33 -0
- package/dist/site/components/SocialPlayerShared/SocialPlayersShared.types.d.ts +22 -0
- package/dist/site/components/SocialPlayerShared/panels/settings/SocialPlayerSettingsPanel.d.ts +9 -0
- package/dist/site/components/SocialPlayerShared/panels/settings/translations.d.ts +5 -0
- package/dist/site/components/SocialPlayerShared/previewManifestOverrides.d.ts +4 -0
- package/dist/site/components/SocialPlayerShared/utils.d.ts +2 -0
- package/dist/site/components/SocialPlayerSnapchat/SocialPlayerSnapchat.semanticClassNames.d.ts +4 -0
- package/dist/site/components/SocialPlayerSnapchat/SocialPlayerSnapchat.types.d.ts +3 -0
- package/dist/site/components/SocialPlayerSnapchat/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerSnapchat/component.js +115 -0
- package/dist/site/components/SocialPlayerSnapchat/component.preview.d.ts +5 -0
- package/dist/site/components/SocialPlayerSnapchat/components/SocialPlayerSnapchat.d.ts +4 -0
- package/dist/site/components/SocialPlayerSnapchat/components/getEmbedUrl.d.ts +1 -0
- package/dist/site/components/SocialPlayerSnapchat/constants.d.ts +7 -0
- package/dist/site/components/SocialPlayerSnapchat/css.css +33 -0
- package/dist/site/components/SocialPlayerSnapchat/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerSnapchat/index.js +6 -0
- package/dist/site/components/SocialPlayerSnapchat/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerSnapchat/manifest.js +149 -0
- package/dist/site/components/SocialPlayerSnapchat/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerSnapchat/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerSnapchat/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerSnapchat/sdk.js +39 -0
- package/dist/site/components/SocialPlayerTikTok/SocialPlayerTikTok.semanticClassNames.d.ts +4 -0
- package/dist/site/components/SocialPlayerTikTok/SocialPlayerTikTok.types.d.ts +3 -0
- package/dist/site/components/SocialPlayerTikTok/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerTikTok/component.js +214 -0
- package/dist/site/components/SocialPlayerTikTok/component.preview.d.ts +9 -0
- package/dist/site/components/SocialPlayerTikTok/components/SocialPlayerTikTok.d.ts +4 -0
- package/dist/site/components/SocialPlayerTikTok/components/SocialPlayerTikTok.utils.d.ts +12 -0
- package/dist/site/components/SocialPlayerTikTok/components/hooks/useTikTokPlayerApi.d.ts +11 -0
- package/dist/site/components/SocialPlayerTikTok/components/hooks/useTikTokPlayerApi.types.d.ts +17 -0
- package/dist/site/components/SocialPlayerTikTok/components/hooks/useTikTokPlayerApi.utils.d.ts +2 -0
- package/dist/site/components/SocialPlayerTikTok/constants.d.ts +6 -0
- package/dist/site/components/SocialPlayerTikTok/css.css +32 -0
- package/dist/site/components/SocialPlayerTikTok/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerTikTok/index.js +6 -0
- package/dist/site/components/SocialPlayerTikTok/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerTikTok/manifest.js +181 -0
- package/dist/site/components/SocialPlayerTikTok/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerTikTok/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerTikTok/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerTikTok/sdk.js +75 -0
- package/dist/site/components/SocialPlayerVimeo/SocialPlayerVimeo.semanticClassNames.d.ts +4 -0
- package/dist/site/components/SocialPlayerVimeo/SocialPlayerVimeo.types.d.ts +3 -0
- package/dist/site/components/SocialPlayerVimeo/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerVimeo/component.js +3224 -0
- package/dist/site/components/SocialPlayerVimeo/component.preview.d.ts +9 -0
- package/dist/site/components/SocialPlayerVimeo/components/SocialPlayerVimeo.d.ts +4 -0
- package/dist/site/components/SocialPlayerVimeo/components/hooks/useVimeoPlayer.d.ts +11 -0
- package/dist/site/components/SocialPlayerVimeo/constants.d.ts +2 -0
- package/dist/site/components/SocialPlayerVimeo/css.css +43 -0
- package/dist/site/components/SocialPlayerVimeo/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerVimeo/index.js +6 -0
- package/dist/site/components/SocialPlayerVimeo/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerVimeo/manifest.js +184 -0
- package/dist/site/components/SocialPlayerVimeo/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerVimeo/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerVimeo/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerVimeo/sdk.js +69 -0
- package/dist/site/components/SocialPlayerYoutube/SocialPlayerYoutube.semanticClassNames.d.ts +4 -0
- package/dist/site/components/SocialPlayerYoutube/component.d.ts +3 -0
- package/dist/site/components/SocialPlayerYoutube/component.js +211 -0
- package/dist/site/components/SocialPlayerYoutube/component.preview.d.ts +9 -0
- package/dist/site/components/SocialPlayerYoutube/components/SocialPlayerYoutube.d.ts +5 -0
- package/dist/site/components/SocialPlayerYoutube/components/hooks/useYoutubeIframe.d.ts +14 -0
- package/dist/site/components/SocialPlayerYoutube/components/utils/getIframeUrl.d.ts +2 -0
- package/dist/site/components/SocialPlayerYoutube/components/utils/parseYoutubeUrl.d.ts +5 -0
- package/dist/site/components/SocialPlayerYoutube/constants.d.ts +23 -0
- package/dist/site/components/SocialPlayerYoutube/css.css +39 -0
- package/dist/site/components/SocialPlayerYoutube/index.d.ts +2 -0
- package/dist/site/components/SocialPlayerYoutube/index.js +6 -0
- package/dist/site/components/SocialPlayerYoutube/manifest.d.ts +5 -0
- package/dist/site/components/SocialPlayerYoutube/manifest.js +180 -0
- package/dist/site/components/SocialPlayerYoutube/panels/settings/extension.d.ts +4 -0
- package/dist/site/components/SocialPlayerYoutube/panels/settings/panel.d.ts +3 -0
- package/dist/site/components/SocialPlayerYoutube/sdk.d.ts +5 -0
- package/dist/site/components/SocialPlayerYoutube/sdk.js +75 -0
- package/dist/site/components/SvgImage/SvgImage.types.d.ts +50 -0
- package/dist/site/components/SvgImage/component.d.ts +3 -0
- package/dist/site/components/SvgImage/component.js +43 -0
- package/dist/site/components/SvgImage/component.preview.d.ts +10 -0
- package/dist/site/components/SvgImage/components/SvgImageBase.d.ts +4 -0
- package/dist/site/components/SvgImage/components/SvgImageTint.d.ts +6 -0
- package/dist/site/components/SvgImage/components/semanticClassNames.d.ts +4 -0
- package/dist/site/components/SvgImage/css.css +74 -0
- package/dist/site/components/SvgImage/index.d.ts +2 -0
- package/dist/site/components/SvgImage/index.js +6 -0
- package/dist/site/components/SvgImage/manifest.d.ts +5 -0
- package/dist/site/components/SvgImage/manifest.js +219 -0
- package/dist/site/components/SvgImage/panels/svgColors/Shape/index.d.ts +8 -0
- package/dist/site/components/SvgImage/panels/svgColors/Ugc/index.d.ts +7 -0
- package/dist/site/components/SvgImage/panels/svgColors/VectorArt/index.d.ts +9 -0
- package/dist/site/components/SvgImage/panels/svgColors/common/OpacitySlider.d.ts +7 -0
- package/dist/site/components/SvgImage/panels/svgColors/common/ResetColorsButton.d.ts +7 -0
- package/dist/site/components/SvgImage/panels/svgColors/extension.d.ts +4 -0
- package/dist/site/components/SvgImage/panels/svgColors/panel.d.ts +3 -0
- package/dist/site/components/SvgImage/panels/svgColors/translations/consts.d.ts +8 -0
- package/dist/site/components/SvgImage/panels/svgColors/utils.d.ts +9 -0
- package/dist/site/components/SvgImage/sdk.d.ts +6 -0
- package/dist/site/components/SvgImage/sdk.js +47 -0
- package/dist/site/components/SvgImage/utils.d.ts +13 -0
- package/dist/site/components/Tabs/Tabs.d.ts +34 -0
- package/dist/site/components/Tabs/component.d.ts +1 -0
- package/dist/site/components/Tabs/component.js +532 -0
- package/dist/site/components/Tabs/component.preview.d.ts +5 -0
- package/dist/site/components/Tabs/components/ScrollControls/ScrollControls.d.ts +11 -0
- package/dist/site/components/Tabs/constants.d.ts +28 -0
- package/dist/site/components/Tabs/css.css +286 -0
- package/dist/site/components/Tabs/hooks/useOverflowBehavior.d.ts +1 -0
- package/dist/site/components/Tabs/hooks/useResolvedDirection.d.ts +2 -0
- package/dist/site/components/Tabs/hooks/useTabsKeyboardNavigation.d.ts +16 -0
- package/dist/site/components/Tabs/hooks/useTabsScroll.d.ts +16 -0
- package/dist/site/components/Tabs/hooks/useTabsTransition.d.ts +10 -0
- package/dist/site/components/Tabs/index.d.ts +2 -0
- package/dist/site/components/Tabs/index.js +6 -0
- package/dist/site/components/Tabs/manifest.d.ts +5 -0
- package/dist/site/components/Tabs/manifest.js +668 -0
- package/dist/site/components/Tabs/utils/createTabsA11yIds.d.ts +8 -0
- package/dist/site/components/Tabs/utils/scrollTabs.d.ts +4 -0
- package/dist/site/components/TestComp/TestComp.d.ts +59 -0
- package/dist/site/components/TestComp/TestComp.semanticClassNames.d.ts +7 -0
- package/dist/site/components/TestComp/component.d.ts +3 -0
- package/dist/site/components/TestComp/component.js +205 -0
- package/dist/site/components/TestComp/constants.d.ts +20 -0
- package/dist/site/components/TestComp/css.css +208 -0
- package/dist/site/components/TestComp/index.d.ts +2 -0
- package/dist/site/components/TestComp/index.js +6 -0
- package/dist/site/components/TestComp/manifest.d.ts +5 -0
- package/dist/site/components/TestComp/manifest.js +606 -0
- package/dist/site/components/TextEffects3d/component.d.ts +5 -0
- package/dist/site/components/TextEffects3d/component.js +76 -0
- package/dist/site/components/TextEffects3d/components/TextEffects3d.d.ts +5 -0
- package/dist/site/components/TextEffects3d/constants.d.ts +56 -0
- package/dist/site/components/TextEffects3d/css.css +2393 -0
- package/dist/site/components/TextEffects3d/index.d.ts +2 -0
- package/dist/site/components/TextEffects3d/index.js +6 -0
- package/dist/site/components/TextEffects3d/manifest.d.ts +5 -0
- package/dist/site/components/TextEffects3d/manifest.js +115 -0
- package/dist/site/components/TextEffects3d/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffects3d/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsBauhaus/component.d.ts +5 -0
- package/dist/site/components/TextEffectsBauhaus/component.js +78 -0
- package/dist/site/components/TextEffectsBauhaus/components/TextEffectsBauhaus.d.ts +5 -0
- package/dist/site/components/TextEffectsBauhaus/constants.d.ts +52 -0
- package/dist/site/components/TextEffectsBauhaus/css.css +2416 -0
- package/dist/site/components/TextEffectsBauhaus/index.d.ts +2 -0
- package/dist/site/components/TextEffectsBauhaus/index.js +6 -0
- package/dist/site/components/TextEffectsBauhaus/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsBauhaus/manifest.js +114 -0
- package/dist/site/components/TextEffectsBauhaus/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsBauhaus/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsGlass/TextEffectsGlass.types.d.ts +1 -0
- package/dist/site/components/TextEffectsGlass/component.d.ts +5 -0
- package/dist/site/components/TextEffectsGlass/component.js +119 -0
- package/dist/site/components/TextEffectsGlass/components/TextEffectsGlass.d.ts +5 -0
- package/dist/site/components/TextEffectsGlass/constants.d.ts +58 -0
- package/dist/site/components/TextEffectsGlass/css.css +2414 -0
- package/dist/site/components/TextEffectsGlass/index.d.ts +2 -0
- package/dist/site/components/TextEffectsGlass/index.js +6 -0
- package/dist/site/components/TextEffectsGlass/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsGlass/manifest.js +117 -0
- package/dist/site/components/TextEffectsGlass/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsGlass/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsGlitch/component.d.ts +5 -0
- package/dist/site/components/TextEffectsGlitch/component.js +72 -0
- package/dist/site/components/TextEffectsGlitch/components/TextEffectsGlitch.d.ts +5 -0
- package/dist/site/components/TextEffectsGlitch/constants.d.ts +54 -0
- package/dist/site/components/TextEffectsGlitch/css.css +2476 -0
- package/dist/site/components/TextEffectsGlitch/index.d.ts +2 -0
- package/dist/site/components/TextEffectsGlitch/index.js +6 -0
- package/dist/site/components/TextEffectsGlitch/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsGlitch/manifest.js +149 -0
- package/dist/site/components/TextEffectsGlitch/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsGlitch/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsLetterPress/component.d.ts +5 -0
- package/dist/site/components/TextEffectsLetterPress/component.js +86 -0
- package/dist/site/components/TextEffectsLetterPress/components/TextEffectsLetterPress.d.ts +5 -0
- package/dist/site/components/TextEffectsLetterPress/constants.d.ts +50 -0
- package/dist/site/components/TextEffectsLetterPress/css.css +2415 -0
- package/dist/site/components/TextEffectsLetterPress/index.d.ts +2 -0
- package/dist/site/components/TextEffectsLetterPress/index.js +6 -0
- package/dist/site/components/TextEffectsLetterPress/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsLetterPress/manifest.js +104 -0
- package/dist/site/components/TextEffectsLetterPress/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsLetterPress/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsMatrix/component.d.ts +5 -0
- package/dist/site/components/TextEffectsMatrix/component.js +83 -0
- package/dist/site/components/TextEffectsMatrix/components/TextEffectsMatrix.d.ts +5 -0
- package/dist/site/components/TextEffectsMatrix/constants.d.ts +52 -0
- package/dist/site/components/TextEffectsMatrix/css.css +2428 -0
- package/dist/site/components/TextEffectsMatrix/index.d.ts +2 -0
- package/dist/site/components/TextEffectsMatrix/index.js +6 -0
- package/dist/site/components/TextEffectsMatrix/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsMatrix/manifest.js +140 -0
- package/dist/site/components/TextEffectsMatrix/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsMatrix/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsNeonSign/component.d.ts +5 -0
- package/dist/site/components/TextEffectsNeonSign/component.js +69 -0
- package/dist/site/components/TextEffectsNeonSign/components/TextEffectsNeonSign.d.ts +5 -0
- package/dist/site/components/TextEffectsNeonSign/constants.d.ts +52 -0
- package/dist/site/components/TextEffectsNeonSign/css.css +2453 -0
- package/dist/site/components/TextEffectsNeonSign/index.d.ts +2 -0
- package/dist/site/components/TextEffectsNeonSign/index.js +6 -0
- package/dist/site/components/TextEffectsNeonSign/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsNeonSign/manifest.js +133 -0
- package/dist/site/components/TextEffectsNeonSign/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsNeonSign/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsNoisy/component.d.ts +5 -0
- package/dist/site/components/TextEffectsNoisy/component.js +92 -0
- package/dist/site/components/TextEffectsNoisy/components/TextEffectsNoisy.d.ts +5 -0
- package/dist/site/components/TextEffectsNoisy/constants.d.ts +53 -0
- package/dist/site/components/TextEffectsNoisy/css.css +2381 -0
- package/dist/site/components/TextEffectsNoisy/index.d.ts +2 -0
- package/dist/site/components/TextEffectsNoisy/index.js +6 -0
- package/dist/site/components/TextEffectsNoisy/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsNoisy/manifest.js +90 -0
- package/dist/site/components/TextEffectsNoisy/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsNoisy/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsOutlineOut/component.d.ts +5 -0
- package/dist/site/components/TextEffectsOutlineOut/component.js +141 -0
- package/dist/site/components/TextEffectsOutlineOut/components/TextEffectsOutlineOut.d.ts +5 -0
- package/dist/site/components/TextEffectsOutlineOut/constants.d.ts +55 -0
- package/dist/site/components/TextEffectsOutlineOut/css.css +2409 -0
- package/dist/site/components/TextEffectsOutlineOut/index.d.ts +2 -0
- package/dist/site/components/TextEffectsOutlineOut/index.js +6 -0
- package/dist/site/components/TextEffectsOutlineOut/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsOutlineOut/manifest.js +195 -0
- package/dist/site/components/TextEffectsOutlineOut/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsOutlineOut/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsRetro/component.d.ts +5 -0
- package/dist/site/components/TextEffectsRetro/component.js +107 -0
- package/dist/site/components/TextEffectsRetro/components/TextEffectsRetro.d.ts +5 -0
- package/dist/site/components/TextEffectsRetro/constants.d.ts +56 -0
- package/dist/site/components/TextEffectsRetro/css.css +2514 -0
- package/dist/site/components/TextEffectsRetro/index.d.ts +2 -0
- package/dist/site/components/TextEffectsRetro/index.js +6 -0
- package/dist/site/components/TextEffectsRetro/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsRetro/manifest.js +156 -0
- package/dist/site/components/TextEffectsRetro/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsRetro/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsShared/Link.d.ts +1 -0
- package/dist/site/components/TextEffectsShared/TextEffectsShared.semanticClassNames.d.ts +4 -0
- package/dist/site/components/TextEffectsShared/TextEffectsShared.types.d.ts +52 -0
- package/dist/site/components/TextEffectsShared/components/TextEffectsShared.d.ts +4 -0
- package/dist/site/components/TextEffectsShared/components/patterns/PatternLine.d.ts +7 -0
- package/dist/site/components/TextEffectsShared/components/patterns/PatternUnit.d.ts +11 -0
- package/dist/site/components/TextEffectsShared/components/patterns/Patterns.d.ts +14 -0
- package/dist/site/components/TextEffectsShared/components/patterns/index.d.ts +4 -0
- package/dist/site/components/TextEffectsShared/components/patterns/usePatterns.d.ts +14 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/index.d.ts +2 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/index.d.ts +2 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/parseGrapheme.d.ts +58 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/parseWord.d.ts +77 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/types.d.ts +22 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/utils/constants.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/utils/isVisibleSegment.d.ts +1 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/utils/level-utils.d.ts +2 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/utils/text-splitting.d.ts +1 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/character-analysis.d.ts +11 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/character-mirroring.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/flattening.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/neutral-resolution.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/run-grouping.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/run-reordering.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/word-directionality.d.ts +8 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/parsers/word-parsing-phases/word-segmentation.d.ts +12 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/stringParser.d.ts +7 -0
- package/dist/site/components/TextEffectsShared/components/stringParser/types.d.ts +18 -0
- package/dist/site/components/TextEffectsShared/components/useUniqueSvg.d.ts +5 -0
- package/dist/site/components/TextEffectsShared/constants.d.ts +211 -0
- package/dist/site/components/TextEffectsShared/manifestBase.d.ts +107 -0
- package/dist/site/components/TextEffectsShared/patterns/PatternsPanel.d.ts +3 -0
- package/dist/site/components/TextEffectsShared/patterns/PatternsSection.d.ts +4 -0
- package/dist/site/components/TextEffectsShared/patterns/patterns.config.d.ts +17 -0
- package/dist/site/components/TextEffectsShared/patterns/patterns.constants.d.ts +58 -0
- package/dist/site/components/TextEffectsShared/patterns/patterns.types.d.ts +96 -0
- package/dist/site/components/TextEffectsShared/patterns/translations/consts.d.ts +25 -0
- package/dist/site/components/TextEffectsShared/patterns/usePatternsDataService.d.ts +33 -0
- package/dist/site/components/TextEffectsShared/utils.d.ts +4 -0
- package/dist/site/components/TextEffectsShook/component.d.ts +5 -0
- package/dist/site/components/TextEffectsShook/component.js +135 -0
- package/dist/site/components/TextEffectsShook/components/TextEffectsShook.d.ts +5 -0
- package/dist/site/components/TextEffectsShook/constants.d.ts +68 -0
- package/dist/site/components/TextEffectsShook/css.css +2489 -0
- package/dist/site/components/TextEffectsShook/index.d.ts +2 -0
- package/dist/site/components/TextEffectsShook/index.js +6 -0
- package/dist/site/components/TextEffectsShook/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsShook/manifest.js +140 -0
- package/dist/site/components/TextEffectsShook/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsShook/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsSticker/component.d.ts +5 -0
- package/dist/site/components/TextEffectsSticker/component.js +86 -0
- package/dist/site/components/TextEffectsSticker/components/TextEffectsSticker.d.ts +5 -0
- package/dist/site/components/TextEffectsSticker/constants.d.ts +57 -0
- package/dist/site/components/TextEffectsSticker/css.css +2429 -0
- package/dist/site/components/TextEffectsSticker/index.d.ts +2 -0
- package/dist/site/components/TextEffectsSticker/index.js +6 -0
- package/dist/site/components/TextEffectsSticker/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsSticker/manifest.js +169 -0
- package/dist/site/components/TextEffectsSticker/panels/patterns/extension.d.ts +4 -0
- package/dist/site/components/TextEffectsSticker/panels/patterns/panel.d.ts +2 -0
- package/dist/site/components/TextEffectsStriped/component.d.ts +5 -0
- package/dist/site/components/TextEffectsStriped/component.js +58 -0
- package/dist/site/components/TextEffectsStriped/components/TextEffectsStriped.d.ts +5 -0
- package/dist/site/components/TextEffectsStriped/constants.d.ts +55 -0
- package/dist/site/components/TextEffectsStriped/css.css +117 -0
- package/dist/site/components/TextEffectsStriped/index.d.ts +2 -0
- package/dist/site/components/TextEffectsStriped/index.js +6 -0
- package/dist/site/components/TextEffectsStriped/manifest.d.ts +5 -0
- package/dist/site/components/TextEffectsStriped/manifest.js +125 -0
- package/dist/site/components/TextInput/TextInput.d.ts +8 -0
- package/dist/site/components/TextInput/TextInput.types.d.ts +108 -0
- package/dist/site/components/TextInput/TextInput.viewer.constants.d.ts +24 -0
- package/dist/site/components/TextInput/component.d.ts +1 -0
- package/dist/site/components/TextInput/component.js +1164 -0
- package/dist/site/components/TextInput/constants.d.ts +52 -0
- package/dist/site/components/TextInput/css.css +168 -0
- package/dist/site/components/TextInput/index.d.ts +2 -0
- package/dist/site/components/TextInput/index.js +6 -0
- package/dist/site/components/TextInput/manifest.d.ts +5 -0
- package/dist/site/components/TextInput/manifest.js +503 -0
- package/dist/site/components/TextInput/sdk.d.ts +4 -0
- package/dist/site/components/TextInput/sdk.js +92 -0
- package/dist/site/components/TextInput/utils.d.ts +9 -0
- package/dist/site/components/TextMarquee/TextMarquee.semanticClassNames.d.ts +5 -0
- package/dist/site/components/TextMarquee/TextMarquee.types.d.ts +53 -0
- package/dist/site/components/TextMarquee/component.d.ts +5 -0
- package/dist/site/components/TextMarquee/component.js +410 -0
- package/dist/site/components/TextMarquee/component.preview.d.ts +5 -0
- package/dist/site/components/TextMarquee/components/DomStoreSvg.d.ts +5 -0
- package/dist/site/components/TextMarquee/components/PlayPauseButton.d.ts +11 -0
- package/dist/site/components/TextMarquee/components/TextMarquee.d.ts +4 -0
- package/dist/site/components/TextMarquee/components/constants.d.ts +6 -0
- package/dist/site/components/TextMarquee/consts.d.ts +24 -0
- package/dist/site/components/TextMarquee/css.css +171 -0
- package/dist/site/components/TextMarquee/index.d.ts +2 -0
- package/dist/site/components/TextMarquee/index.js +6 -0
- package/dist/site/components/TextMarquee/manifest.d.ts +5 -0
- package/dist/site/components/TextMarquee/manifest.js +181 -0
- package/dist/site/components/TextMarquee/panels/SeparatorPanel/index.d.ts +11 -0
- package/dist/site/components/TextMarquee/panels/SeparatorPanel/translations/consts.d.ts +12 -0
- package/dist/site/components/TextMarquee/panels/bi/events.d.ts +4 -0
- package/dist/site/components/TextMarquee/panels/bi/utils.d.ts +7 -0
- package/dist/site/components/TextMarquee/panels/common/ColorAndOpacityPicker.d.ts +11 -0
- package/dist/site/components/TextMarquee/panels/common/ShapeSizeSlider.d.ts +10 -0
- package/dist/site/components/TextMarquee/panels/common/SvgMediaPicker.d.ts +12 -0
- package/dist/site/components/TextMarquee/panels/common/types.d.ts +23 -0
- package/dist/site/components/TextMarquee/panels/extension.d.ts +4 -0
- package/dist/site/components/TextMarquee/panels/panel.d.ts +3 -0
- package/dist/site/components/TextMarquee/sdk.d.ts +30 -0
- package/dist/site/components/TextMarquee/sdk.js +87 -0
- package/dist/site/components/TextMarquee/utils.d.ts +1 -0
- package/dist/site/components/TransparentVideo/TransparentVideo.types.d.ts +49 -0
- package/dist/site/components/TransparentVideo/assets/MutedIcon.d.ts +2 -0
- package/dist/site/components/TransparentVideo/assets/NoneThumbnailIcon.d.ts +2 -0
- package/dist/site/components/TransparentVideo/assets/PauseIcon.d.ts +2 -0
- package/dist/site/components/TransparentVideo/assets/PlayIcon.d.ts +2 -0
- package/dist/site/components/TransparentVideo/assets/UnMutedIcon.d.ts +2 -0
- package/dist/site/components/TransparentVideo/component.d.ts +4 -0
- package/dist/site/components/TransparentVideo/component.js +3613 -0
- package/dist/site/components/TransparentVideo/component.preview.d.ts +5 -0
- package/dist/site/components/TransparentVideo/css.css +112 -0
- package/dist/site/components/TransparentVideo/index.d.ts +2 -0
- package/dist/site/components/TransparentVideo/index.js +6 -0
- package/dist/site/components/TransparentVideo/kampos/transparent-video.d.ts +29 -0
- package/dist/site/components/TransparentVideo/kampos/transparentVideoUtils.d.ts +29 -0
- package/dist/site/components/TransparentVideo/manifest.d.ts +5 -0
- package/dist/site/components/TransparentVideo/manifest.js +204 -0
- package/dist/site/components/TransparentVideo/panels/PanelViewCustom.d.ts +12 -0
- package/dist/site/components/TransparentVideo/panels/PanelViewPresets.d.ts +17 -0
- package/dist/site/components/TransparentVideo/panels/RangeInput.d.ts +13 -0
- package/dist/site/components/TransparentVideo/panels/bi/utils.d.ts +2 -0
- package/dist/site/components/TransparentVideo/panels/extension.d.ts +4 -0
- package/dist/site/components/TransparentVideo/panels/panel.d.ts +3 -0
- package/dist/site/components/TransparentVideo/panels/presets.d.ts +3 -0
- package/dist/site/components/TransparentVideo/panels/translation.d.ts +22 -0
- package/dist/site/components/TransparentVideo/svgFilters/svgFilters.d.ts +8 -0
- package/dist/site/components/TransparentVideo/svgFilters/svgFiltersParts.d.ts +16 -0
- package/dist/site/components/TransparentVideo/svgFilters/svgFiltersTemplates.d.ts +6 -0
- package/dist/site/components/TransparentVideo/svgFilters/svgPresets.d.ts +6 -0
- package/dist/site/components/TransparentVideo/svgFilters/typing.d.ts +67 -0
- package/dist/site/components/TransparentVideo/transparentVideoPoster.d.ts +9 -0
- package/dist/site/components/TransparentVideo/useTransparentVideo.d.ts +25 -0
- package/dist/site/components/TransparentVideo/utils.d.ts +8 -0
- package/dist/site/components/VideoUpload/VideoUpload.semanticClassNames.d.ts +5 -0
- package/dist/site/components/VideoUpload/VideoUpload.types.d.ts +38 -0
- package/dist/site/components/VideoUpload/VideoUpload.utils.d.ts +17 -0
- package/dist/site/components/VideoUpload/component.d.ts +3 -0
- package/dist/site/components/VideoUpload/component.js +2274 -0
- package/dist/site/components/VideoUpload/component.preview.d.ts +9 -0
- package/dist/site/components/VideoUpload/components/VideoUpload.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/CheckmarkIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/FullscreenIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/PauseIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/PictureInPictureIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/PlayButtonIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/PlayIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/PlaybackIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/VolumeLoudIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/VolumeMutedIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/assets/VolumeQuiteIcon.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/components/FullscreenToggle/FullscreenToggle.d.ts +9 -0
- package/dist/site/components/VideoUpload/components/components/PictureInPictureToggle/PictureInPictureToggle.d.ts +8 -0
- package/dist/site/components/VideoUpload/components/components/PlayToggle/PlayToggle.d.ts +9 -0
- package/dist/site/components/VideoUpload/components/components/PlaybackControls/PlaybackControls.d.ts +27 -0
- package/dist/site/components/VideoUpload/components/components/PlaybackRate/PlaybackRate.d.ts +8 -0
- package/dist/site/components/VideoUpload/components/components/Popover/Popover.d.ts +13 -0
- package/dist/site/components/VideoUpload/components/components/ProgressBar/ProgressBar.d.ts +11 -0
- package/dist/site/components/VideoUpload/components/components/ProgressBar/ProgressBar.utils.d.ts +13 -0
- package/dist/site/components/VideoUpload/components/components/ProgressBar/index.d.ts +1 -0
- package/dist/site/components/VideoUpload/components/components/Slider/Slider.d.ts +24 -0
- package/dist/site/components/VideoUpload/components/components/Spinner/Spinner.d.ts +4 -0
- package/dist/site/components/VideoUpload/components/components/TimeDisplay/TimeDisplay.d.ts +7 -0
- package/dist/site/components/VideoUpload/components/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/site/components/VideoUpload/components/components/VolumeControl/VolumeControl.d.ts +10 -0
- package/dist/site/components/VideoUpload/components/components/VolumeSlider/VolumeSlider.d.ts +7 -0
- package/dist/site/components/VideoUpload/components/hooks/index.d.ts +1 -0
- package/dist/site/components/VideoUpload/components/hooks/useBuffer.d.ts +10 -0
- package/dist/site/components/VideoUpload/components/hooks/useElementsVisibility.d.ts +14 -0
- package/dist/site/components/VideoUpload/components/hooks/useFullscreen.d.ts +8 -0
- package/dist/site/components/VideoUpload/components/hooks/useKeyboardShortcuts.d.ts +17 -0
- package/dist/site/components/VideoUpload/components/hooks/usePictureInPicture.d.ts +8 -0
- package/dist/site/components/VideoUpload/components/hooks/usePlayback.d.ts +12 -0
- package/dist/site/components/VideoUpload/components/hooks/usePlaybackSettings.d.ts +5 -0
- package/dist/site/components/VideoUpload/components/hooks/useTimingTrap.d.ts +11 -0
- package/dist/site/components/VideoUpload/components/hooks/useVideoPlayer.d.ts +78 -0
- package/dist/site/components/VideoUpload/components/hooks/useVolume.d.ts +11 -0
- package/dist/site/components/VideoUpload/constants.d.ts +9 -0
- package/dist/site/components/VideoUpload/css.css +492 -0
- package/dist/site/components/VideoUpload/index.d.ts +2 -0
- package/dist/site/components/VideoUpload/index.js +6 -0
- package/dist/site/components/VideoUpload/manifest.d.ts +5 -0
- package/dist/site/components/VideoUpload/manifest.js +204 -0
- package/dist/site/components/VideoUpload/panels/CoverImagePanel/index.d.ts +3 -0
- package/dist/site/components/VideoUpload/panels/CoverImagePanel/translations/consts.d.ts +6 -0
- package/dist/site/components/VideoUpload/panels/common/PosterGrid.d.ts +12 -0
- package/dist/site/components/VideoUpload/panels/common/PosterSlot.d.ts +11 -0
- package/dist/site/components/VideoUpload/panels/common/posterHandlers.d.ts +9 -0
- package/dist/site/components/VideoUpload/panels/common/test-utils.d.ts +15 -0
- package/dist/site/components/VideoUpload/panels/common/types.d.ts +30 -0
- package/dist/site/components/VideoUpload/panels/common/usePosterData.d.ts +5 -0
- package/dist/site/components/VideoUpload/panels/common/utils.d.ts +46 -0
- package/dist/site/components/VideoUpload/panels/extension.d.ts +4 -0
- package/dist/site/components/VideoUpload/panels/panel.d.ts +2 -0
- package/dist/site/components/VideoUpload/sdk.d.ts +4 -0
- package/dist/site/components/VideoUpload/sdk.js +761 -0
- package/dist/site/components/WRichText/WRichText.semanticClassNames.d.ts +5 -0
- package/dist/site/components/WRichText/WRichText.types.d.ts +48 -0
- package/dist/site/components/WRichText/component.d.ts +4 -0
- package/dist/site/components/WRichText/component.js +224 -0
- package/dist/site/components/WRichText/components/WRichText.d.ts +4 -0
- package/dist/site/components/WRichText/components/providers/usePopupLinkEvents/index.d.ts +6 -0
- package/dist/site/components/WRichText/constants.d.ts +11 -0
- package/dist/site/components/WRichText/css.css +407 -0
- package/dist/site/components/WRichText/index.d.ts +2 -0
- package/dist/site/components/WRichText/index.js +6 -0
- package/dist/site/components/WRichText/manifest.d.ts +5 -0
- package/dist/site/components/WRichText/manifest.js +165 -0
- package/dist/site/components/WRichText/sdk.d.ts +5 -0
- package/dist/site/components/WRichText/sdk.js +581 -0
- package/dist/site/components/WRichText/utils/applyTransformationForGetHtml.d.ts +8 -0
- package/dist/site/components/WRichText/utils/convertLinkProperties.d.ts +2 -0
- package/dist/site/components/WRichText/utils/decodeHtmlEntities.d.ts +2 -0
- package/dist/site/components/WRichText/utils/escape.d.ts +28 -0
- package/dist/site/components/WRichText/utils/flow.d.ts +1 -0
- package/dist/site/components/WRichText/utils/htmlEntitiesMap.d.ts +29 -0
- package/dist/site/components/WRichText/utils/htmlParser.d.ts +15 -0
- package/dist/site/components/WRichText/utils/index.d.ts +9 -0
- package/dist/site/components/WRichText/utils/insertIntoDOMNode.d.ts +11 -0
- package/dist/site/components/WRichText/utils/namedReferenceRegex.d.ts +2 -0
- package/dist/site/components/WRichText/utils/numericEntitiesMap.d.ts +31 -0
- package/dist/site/components/WRichText/utils/removeWixGuard.d.ts +1 -0
- package/dist/site/components/WRichText/utils/stripImpliedLinks.d.ts +1 -0
- package/dist/site/components/WRichText/utils/unescape.d.ts +19 -0
- package/dist/site/components/chunks/AnimatedIcon.js +155 -0
- package/dist/site/components/chunks/Button.js +328 -0
- package/dist/site/components/chunks/Button.types.js +7 -0
- package/dist/site/components/chunks/Group.js +1317 -0
- package/dist/site/components/chunks/I18nProvider.js +95 -0
- package/dist/site/components/chunks/Image.js +159 -0
- package/dist/site/components/chunks/Link.js +127 -0
- package/dist/site/components/chunks/LinkSdk.js +31 -0
- package/dist/site/components/chunks/Patterns.js +1243 -0
- package/dist/site/components/chunks/ResponsiveBox.js +150 -0
- package/dist/site/components/chunks/ResponsiveContainer.js +77 -0
- package/dist/site/components/chunks/Slideshow.semanticClassNames.js +144 -0
- package/dist/site/components/chunks/SvgImageTint.js +201 -0
- package/dist/site/components/chunks/TextEffectsShared.js +112 -0
- package/dist/site/components/chunks/TransparentVideo.types.js +32 -0
- package/dist/site/components/chunks/Video.js +477 -0
- package/dist/site/components/chunks/_commonjsHelpers.js +8 -0
- package/dist/site/components/chunks/a11y.js +120 -0
- package/dist/site/components/chunks/a11ySdk.js +18 -0
- package/dist/site/components/chunks/assert.js +73 -0
- package/dist/site/components/chunks/basePropsSDKFactory.js +41 -0
- package/dist/site/components/chunks/childrenPropsSDKFactory.js +10 -0
- package/dist/site/components/chunks/chunk-JPMZBG44.js +5592 -0
- package/dist/site/components/chunks/classNames.js +17 -0
- package/dist/site/components/chunks/clsx.js +14 -0
- package/dist/site/components/chunks/composeSDKFactories.js +29 -0
- package/dist/site/components/chunks/constants.js +19 -0
- package/dist/site/components/chunks/constants10.js +26 -0
- package/dist/site/components/chunks/constants11.js +24 -0
- package/dist/site/components/chunks/constants12.js +28 -0
- package/dist/site/components/chunks/constants13.js +31 -0
- package/dist/site/components/chunks/constants14.js +26 -0
- package/dist/site/components/chunks/constants15.js +28 -0
- package/dist/site/components/chunks/constants16.js +24 -0
- package/dist/site/components/chunks/constants17.js +59 -0
- package/dist/site/components/chunks/constants18.js +61 -0
- package/dist/site/components/chunks/constants19.js +310 -0
- package/dist/site/components/chunks/constants2.js +22 -0
- package/dist/site/components/chunks/constants20.js +48 -0
- package/dist/site/components/chunks/constants21.js +37 -0
- package/dist/site/components/chunks/constants22.js +22 -0
- package/dist/site/components/chunks/constants23.js +408 -0
- package/dist/site/components/chunks/constants24.js +88 -0
- package/dist/site/components/chunks/constants25.js +23 -0
- package/dist/site/components/chunks/constants26.js +54 -0
- package/dist/site/components/chunks/constants27.js +33 -0
- package/dist/site/components/chunks/constants28.js +15 -0
- package/dist/site/components/chunks/constants29.js +69 -0
- package/dist/site/components/chunks/constants3.js +31 -0
- package/dist/site/components/chunks/constants30.js +87 -0
- package/dist/site/components/chunks/constants31.js +91 -0
- package/dist/site/components/chunks/constants32.js +72 -0
- package/dist/site/components/chunks/constants4.js +31 -0
- package/dist/site/components/chunks/constants5.js +30 -0
- package/dist/site/components/chunks/constants6.js +30 -0
- package/dist/site/components/chunks/constants7.js +73 -0
- package/dist/site/components/chunks/constants8.js +28 -0
- package/dist/site/components/chunks/constants9.js +26 -0
- package/dist/site/components/chunks/consts.js +98 -0
- package/dist/site/components/chunks/corvidEvents.js +666 -0
- package/dist/site/components/chunks/createCorvidModel.js +767 -0
- package/dist/site/components/chunks/customElementInit.js +644 -0
- package/dist/site/components/chunks/dataUtils.js +39 -0
- package/dist/site/components/chunks/direction.module.js +7 -0
- package/dist/site/components/chunks/elementPropsSDKFactory.js +984 -0
- package/dist/site/components/chunks/elementSdk.js +29 -0
- package/dist/site/components/chunks/filterDOMProps.js +479 -0
- package/dist/site/components/chunks/hls.js +31861 -0
- package/dist/site/components/chunks/index.js +54 -0
- package/dist/site/components/chunks/index10.js +54 -0
- package/dist/site/components/chunks/index11.js +16 -0
- package/dist/site/components/chunks/index12.js +6 -0
- package/dist/site/components/chunks/index2.js +5 -0
- package/dist/site/components/chunks/index3.js +1465 -0
- package/dist/site/components/chunks/index4.js +2372 -0
- package/dist/site/components/chunks/index5.js +16 -0
- package/dist/site/components/chunks/index6.js +15 -0
- package/dist/site/components/chunks/index7.js +24 -0
- package/dist/site/components/chunks/index8.js +69 -0
- package/dist/site/components/chunks/index9.js +2023 -0
- package/dist/site/components/chunks/isObjectLike.js +119 -0
- package/dist/site/components/chunks/manifest.js +8 -0
- package/dist/site/components/chunks/manifestBase.js +152 -0
- package/dist/site/components/chunks/manifestSdkMixins.js +80 -0
- package/dist/site/components/chunks/mediaSrcHandler.js +324 -0
- package/dist/site/components/chunks/messages.js +419 -0
- package/dist/site/components/chunks/parseHtml.js +11 -0
- package/dist/site/components/chunks/parseSvg.js +12 -0
- package/dist/site/components/chunks/performanceUtils.js +33 -0
- package/dist/site/components/chunks/presetWrapper.module.js +7 -0
- package/dist/site/components/chunks/reporters.js +12 -0
- package/dist/site/components/chunks/sanitizeHTML.js +1381 -0
- package/dist/site/components/chunks/specs.js +4 -0
- package/dist/site/components/chunks/stylePropsSDKFactory.js +828 -0
- package/dist/site/components/chunks/svg.js +98 -0
- package/dist/site/components/chunks/types.impl.js +2934 -0
- package/dist/site/components/chunks/useConsentPolicyProps.js +2356 -0
- package/dist/site/components/chunks/useResizeObserver.js +22 -0
- package/dist/site/components/chunks/useUniqueSvg.js +48 -0
- package/dist/site/components/chunks/utils.js +11 -0
- package/dist/site/components/chunks/utils2.js +302 -0
- package/dist/site/components/extensions.d.ts +6 -0
- package/dist/site/components/extensions.js +587 -0
- package/package.json +187 -0
|
@@ -0,0 +1,1925 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import React__default, { forwardRef, useMemo, useImperativeHandle, useState, Children, useEffect, useContext, useRef, useLayoutEffect, useReducer, useCallback, memo, Suspense } from "react";
|
|
4
|
+
import { c as clsx } from "../chunks/clsx.js";
|
|
5
|
+
import { f as formatClassNames } from "../chunks/classNames.js";
|
|
6
|
+
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
7
|
+
import { createPortal } from "react-dom";
|
|
8
|
+
import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
|
|
9
|
+
import { G as GOOGLE_MAPS_DIRECTIONS_BASE_URL, M as MIN_ZOOM, a as MAX_ZOOM, T as TestIds, D as DEFAULT_ZOOM, b as MAP_IDS, c as MAP_TYPES, A as API_KEY, d as DEFAULT_LOCATION, C as COMPANY_NAME_DEFAULT, e as COMPANY_NAME_KEY, f as COMPONENT_NAME_DEFAULT, g as COMPONENT_NAME_KEY } from "../chunks/consts.js";
|
|
10
|
+
import { p as parse } from "../chunks/index4.js";
|
|
11
|
+
import { useService } from "@wix/services-manager-react";
|
|
12
|
+
import { d as definitionExports } from "../chunks/index2.js";
|
|
13
|
+
import { u as useConsentPolicyProps, C as ConsentPolicyWrapper } from "../chunks/useConsentPolicyProps.js";
|
|
14
|
+
const mapContainer = "mapContainer__E0LTn";
|
|
15
|
+
const style = {
|
|
16
|
+
mapContainer
|
|
17
|
+
};
|
|
18
|
+
const semanticClassNames = { root: "google-map" };
|
|
19
|
+
const GoogleMapReact = forwardRef((props, forwardedRef) => {
|
|
20
|
+
const {
|
|
21
|
+
id,
|
|
22
|
+
className,
|
|
23
|
+
skin,
|
|
24
|
+
customClassNames = [],
|
|
25
|
+
translations,
|
|
26
|
+
lang,
|
|
27
|
+
onMouseEnter,
|
|
28
|
+
onMouseLeave,
|
|
29
|
+
MapContent: MapContent2
|
|
30
|
+
} = props;
|
|
31
|
+
const domSafeProps = {
|
|
32
|
+
id,
|
|
33
|
+
className: clsx(
|
|
34
|
+
skin && style[skin],
|
|
35
|
+
className,
|
|
36
|
+
formatClassNames(semanticClassNames.root, ...customClassNames)
|
|
37
|
+
),
|
|
38
|
+
...getDataAttributes(props),
|
|
39
|
+
lang
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
...domSafeProps,
|
|
45
|
+
onMouseEnter,
|
|
46
|
+
onMouseLeave,
|
|
47
|
+
children: /* @__PURE__ */ jsx(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: style.mapContainer,
|
|
51
|
+
"aria-label": translations.title,
|
|
52
|
+
role: "region",
|
|
53
|
+
children: /* @__PURE__ */ jsx(MapContent2, { ...props, ref: forwardedRef })
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
var fastDeepEqual;
|
|
60
|
+
var hasRequiredFastDeepEqual;
|
|
61
|
+
function requireFastDeepEqual() {
|
|
62
|
+
if (hasRequiredFastDeepEqual) return fastDeepEqual;
|
|
63
|
+
hasRequiredFastDeepEqual = 1;
|
|
64
|
+
fastDeepEqual = function equal(a, b) {
|
|
65
|
+
if (a === b) return true;
|
|
66
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
67
|
+
if (a.constructor !== b.constructor) return false;
|
|
68
|
+
var length, i, keys;
|
|
69
|
+
if (Array.isArray(a)) {
|
|
70
|
+
length = a.length;
|
|
71
|
+
if (length != b.length) return false;
|
|
72
|
+
for (i = length; i-- !== 0; )
|
|
73
|
+
if (!equal(a[i], b[i])) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
77
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
78
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
79
|
+
keys = Object.keys(a);
|
|
80
|
+
length = keys.length;
|
|
81
|
+
if (length !== Object.keys(b).length) return false;
|
|
82
|
+
for (i = length; i-- !== 0; )
|
|
83
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
84
|
+
for (i = length; i-- !== 0; ) {
|
|
85
|
+
var key = keys[i];
|
|
86
|
+
if (!equal(a[key], b[key])) return false;
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return a !== a && b !== b;
|
|
91
|
+
};
|
|
92
|
+
return fastDeepEqual;
|
|
93
|
+
}
|
|
94
|
+
var fastDeepEqualExports = requireFastDeepEqual();
|
|
95
|
+
const isDeepEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
|
|
96
|
+
function _extends() {
|
|
97
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
98
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
99
|
+
var t = arguments[e];
|
|
100
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
101
|
+
}
|
|
102
|
+
return n;
|
|
103
|
+
}, _extends.apply(null, arguments);
|
|
104
|
+
}
|
|
105
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
106
|
+
if (null == r) return {};
|
|
107
|
+
var t = {};
|
|
108
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
109
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
110
|
+
t[n] = r[n];
|
|
111
|
+
}
|
|
112
|
+
return t;
|
|
113
|
+
}
|
|
114
|
+
function _toPrimitive(t, r) {
|
|
115
|
+
if ("object" != typeof t || !t) return t;
|
|
116
|
+
var e = t[Symbol.toPrimitive];
|
|
117
|
+
if (void 0 !== e) {
|
|
118
|
+
var i = e.call(t, r);
|
|
119
|
+
if ("object" != typeof i) return i;
|
|
120
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
121
|
+
}
|
|
122
|
+
return String(t);
|
|
123
|
+
}
|
|
124
|
+
function _toPropertyKey(t) {
|
|
125
|
+
var i = _toPrimitive(t, "string");
|
|
126
|
+
return "symbol" == typeof i ? i : i + "";
|
|
127
|
+
}
|
|
128
|
+
const APILoadingStatus = {
|
|
129
|
+
NOT_LOADED: "NOT_LOADED",
|
|
130
|
+
LOADING: "LOADING",
|
|
131
|
+
LOADED: "LOADED",
|
|
132
|
+
FAILED: "FAILED",
|
|
133
|
+
AUTH_FAILURE: "AUTH_FAILURE"
|
|
134
|
+
};
|
|
135
|
+
const MAPS_API_BASE_URL = "https://maps.googleapis.com/maps/api/js";
|
|
136
|
+
class GoogleMapsApiLoader {
|
|
137
|
+
/**
|
|
138
|
+
* Loads the Maps JavaScript API with the specified parameters.
|
|
139
|
+
* Since the Maps library can only be loaded once per page, this will
|
|
140
|
+
* produce a warning when called multiple times with different
|
|
141
|
+
* parameters.
|
|
142
|
+
*
|
|
143
|
+
* The returned promise resolves when loading completes
|
|
144
|
+
* and rejects in case of an error or when the loading was aborted.
|
|
145
|
+
*/
|
|
146
|
+
static async load(params, onLoadingStatusChange) {
|
|
147
|
+
var _window$google;
|
|
148
|
+
const libraries = params.libraries ? params.libraries.split(",") : [];
|
|
149
|
+
const serializedParams = this.serializeParams(params);
|
|
150
|
+
this.listeners.push(onLoadingStatusChange);
|
|
151
|
+
if ((_window$google = window.google) != null && (_window$google = _window$google.maps) != null && _window$google.importLibrary) {
|
|
152
|
+
if (!this.serializedApiParams) {
|
|
153
|
+
this.loadingStatus = APILoadingStatus.LOADED;
|
|
154
|
+
}
|
|
155
|
+
this.notifyLoadingStatusListeners();
|
|
156
|
+
} else {
|
|
157
|
+
this.serializedApiParams = serializedParams;
|
|
158
|
+
this.initImportLibrary(params);
|
|
159
|
+
}
|
|
160
|
+
if (this.serializedApiParams && this.serializedApiParams !== serializedParams) {
|
|
161
|
+
console.warn(`[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.`);
|
|
162
|
+
}
|
|
163
|
+
const librariesToLoad = ["maps", ...libraries];
|
|
164
|
+
await Promise.all(librariesToLoad.map((name) => google.maps.importLibrary(name)));
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Serialize the parameters used to load the library for easier comparison.
|
|
168
|
+
*/
|
|
169
|
+
static serializeParams(params) {
|
|
170
|
+
return [params.v, params.key, params.language, params.region, params.authReferrerPolicy, params.solutionChannel].join("/");
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Creates the global `google.maps.importLibrary` function for bootstrapping.
|
|
174
|
+
* This is essentially a formatted version of the dynamic loading script
|
|
175
|
+
* from the official documentation with some minor adjustments.
|
|
176
|
+
*
|
|
177
|
+
* The created importLibrary function will load the Google Maps JavaScript API,
|
|
178
|
+
* which will then replace the `google.maps.importLibrary` function with the full
|
|
179
|
+
* implementation.
|
|
180
|
+
*
|
|
181
|
+
* @see https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import
|
|
182
|
+
*/
|
|
183
|
+
static initImportLibrary(params) {
|
|
184
|
+
if (!window.google) window.google = {};
|
|
185
|
+
if (!window.google.maps) window.google.maps = {};
|
|
186
|
+
if (window.google.maps["importLibrary"]) {
|
|
187
|
+
console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
let apiPromise = null;
|
|
191
|
+
const loadApi = () => {
|
|
192
|
+
if (apiPromise) return apiPromise;
|
|
193
|
+
apiPromise = new Promise((resolve, reject) => {
|
|
194
|
+
var _document$querySelect;
|
|
195
|
+
const scriptElement = document.createElement("script");
|
|
196
|
+
const urlParams = new URLSearchParams();
|
|
197
|
+
for (const [key, value] of Object.entries(params)) {
|
|
198
|
+
const urlParamName = key.replace(/[A-Z]/g, (t) => "_" + t[0].toLowerCase());
|
|
199
|
+
urlParams.set(urlParamName, String(value));
|
|
200
|
+
}
|
|
201
|
+
urlParams.set("loading", "async");
|
|
202
|
+
urlParams.set("callback", "__googleMapsCallback__");
|
|
203
|
+
scriptElement.async = true;
|
|
204
|
+
scriptElement.src = MAPS_API_BASE_URL + `?` + urlParams.toString();
|
|
205
|
+
scriptElement.nonce = ((_document$querySelect = document.querySelector("script[nonce]")) == null ? void 0 : _document$querySelect.nonce) || "";
|
|
206
|
+
scriptElement.onerror = () => {
|
|
207
|
+
this.loadingStatus = APILoadingStatus.FAILED;
|
|
208
|
+
this.notifyLoadingStatusListeners();
|
|
209
|
+
reject(new Error("The Google Maps JavaScript API could not load."));
|
|
210
|
+
};
|
|
211
|
+
window.__googleMapsCallback__ = () => {
|
|
212
|
+
this.loadingStatus = APILoadingStatus.LOADED;
|
|
213
|
+
this.notifyLoadingStatusListeners();
|
|
214
|
+
resolve();
|
|
215
|
+
};
|
|
216
|
+
window.gm_authFailure = () => {
|
|
217
|
+
this.loadingStatus = APILoadingStatus.AUTH_FAILURE;
|
|
218
|
+
this.notifyLoadingStatusListeners();
|
|
219
|
+
};
|
|
220
|
+
this.loadingStatus = APILoadingStatus.LOADING;
|
|
221
|
+
this.notifyLoadingStatusListeners();
|
|
222
|
+
document.head.append(scriptElement);
|
|
223
|
+
});
|
|
224
|
+
return apiPromise;
|
|
225
|
+
};
|
|
226
|
+
google.maps.importLibrary = (libraryName) => loadApi().then(() => google.maps.importLibrary(libraryName));
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Calls all registered loadingStatusListeners after a status update.
|
|
230
|
+
*/
|
|
231
|
+
static notifyLoadingStatusListeners() {
|
|
232
|
+
for (const fn of this.listeners) {
|
|
233
|
+
fn(this.loadingStatus);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
GoogleMapsApiLoader.loadingStatus = APILoadingStatus.NOT_LOADED;
|
|
238
|
+
GoogleMapsApiLoader.serializedApiParams = void 0;
|
|
239
|
+
GoogleMapsApiLoader.listeners = [];
|
|
240
|
+
const _excluded$3 = ["onLoad", "onError", "apiKey", "version", "libraries"], _excluded2$1 = ["children"];
|
|
241
|
+
const DEFAULT_SOLUTION_CHANNEL = "GMP_visgl_rgmlibrary_v1_default";
|
|
242
|
+
const APIProviderContext = React__default.createContext(null);
|
|
243
|
+
function useMapInstances() {
|
|
244
|
+
const [mapInstances, setMapInstances] = useState({});
|
|
245
|
+
const addMapInstance = (mapInstance, id = "default") => {
|
|
246
|
+
setMapInstances((instances) => _extends({}, instances, {
|
|
247
|
+
[id]: mapInstance
|
|
248
|
+
}));
|
|
249
|
+
};
|
|
250
|
+
const removeMapInstance = (id = "default") => {
|
|
251
|
+
setMapInstances((_ref) => {
|
|
252
|
+
let remaining = _objectWithoutPropertiesLoose(_ref, [id].map(_toPropertyKey));
|
|
253
|
+
return remaining;
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
const clearMapInstances = () => {
|
|
257
|
+
setMapInstances({});
|
|
258
|
+
};
|
|
259
|
+
return {
|
|
260
|
+
mapInstances,
|
|
261
|
+
addMapInstance,
|
|
262
|
+
removeMapInstance,
|
|
263
|
+
clearMapInstances
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function useGoogleMapsApiLoader(props) {
|
|
267
|
+
const {
|
|
268
|
+
onLoad,
|
|
269
|
+
onError,
|
|
270
|
+
apiKey,
|
|
271
|
+
version,
|
|
272
|
+
libraries = []
|
|
273
|
+
} = props, otherApiParams = _objectWithoutPropertiesLoose(props, _excluded$3);
|
|
274
|
+
const [status, setStatus] = useState(GoogleMapsApiLoader.loadingStatus);
|
|
275
|
+
const [loadedLibraries, addLoadedLibrary] = useReducer((loadedLibraries2, action) => {
|
|
276
|
+
return loadedLibraries2[action.name] ? loadedLibraries2 : _extends({}, loadedLibraries2, {
|
|
277
|
+
[action.name]: action.value
|
|
278
|
+
});
|
|
279
|
+
}, {});
|
|
280
|
+
const librariesString = useMemo(() => libraries == null ? void 0 : libraries.join(","), [libraries]);
|
|
281
|
+
const serializedParams = useMemo(() => JSON.stringify(_extends({
|
|
282
|
+
apiKey,
|
|
283
|
+
version
|
|
284
|
+
}, otherApiParams)), [apiKey, version, otherApiParams]);
|
|
285
|
+
const importLibrary = useCallback(async (name) => {
|
|
286
|
+
var _google;
|
|
287
|
+
if (loadedLibraries[name]) {
|
|
288
|
+
return loadedLibraries[name];
|
|
289
|
+
}
|
|
290
|
+
if (!((_google = google) != null && (_google = _google.maps) != null && _google.importLibrary)) {
|
|
291
|
+
throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");
|
|
292
|
+
}
|
|
293
|
+
const res = await window.google.maps.importLibrary(name);
|
|
294
|
+
addLoadedLibrary({
|
|
295
|
+
name,
|
|
296
|
+
value: res
|
|
297
|
+
});
|
|
298
|
+
return res;
|
|
299
|
+
}, [loadedLibraries]);
|
|
300
|
+
useEffect(
|
|
301
|
+
() => {
|
|
302
|
+
(async () => {
|
|
303
|
+
try {
|
|
304
|
+
const params = _extends({
|
|
305
|
+
key: apiKey
|
|
306
|
+
}, otherApiParams);
|
|
307
|
+
if (version) params.v = version;
|
|
308
|
+
if ((librariesString == null ? void 0 : librariesString.length) > 0) params.libraries = librariesString;
|
|
309
|
+
if (params.channel === void 0 || params.channel < 0 || params.channel > 999) delete params.channel;
|
|
310
|
+
if (params.solutionChannel === void 0) params.solutionChannel = DEFAULT_SOLUTION_CHANNEL;
|
|
311
|
+
else if (params.solutionChannel === "") delete params.solutionChannel;
|
|
312
|
+
await GoogleMapsApiLoader.load(params, (status2) => setStatus(status2));
|
|
313
|
+
for (const name of ["core", "maps", ...libraries]) {
|
|
314
|
+
await importLibrary(name);
|
|
315
|
+
}
|
|
316
|
+
if (onLoad) {
|
|
317
|
+
onLoad();
|
|
318
|
+
}
|
|
319
|
+
} catch (error) {
|
|
320
|
+
if (onError) {
|
|
321
|
+
onError(error);
|
|
322
|
+
} else {
|
|
323
|
+
console.error("<ApiProvider> failed to load the Google Maps JavaScript API", error);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
})();
|
|
327
|
+
},
|
|
328
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
329
|
+
[apiKey, librariesString, serializedParams]
|
|
330
|
+
);
|
|
331
|
+
return {
|
|
332
|
+
status,
|
|
333
|
+
loadedLibraries,
|
|
334
|
+
importLibrary
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
const APIProvider = (props) => {
|
|
338
|
+
const {
|
|
339
|
+
children
|
|
340
|
+
} = props, loaderProps = _objectWithoutPropertiesLoose(props, _excluded2$1);
|
|
341
|
+
const {
|
|
342
|
+
mapInstances,
|
|
343
|
+
addMapInstance,
|
|
344
|
+
removeMapInstance,
|
|
345
|
+
clearMapInstances
|
|
346
|
+
} = useMapInstances();
|
|
347
|
+
const {
|
|
348
|
+
status,
|
|
349
|
+
loadedLibraries,
|
|
350
|
+
importLibrary
|
|
351
|
+
} = useGoogleMapsApiLoader(loaderProps);
|
|
352
|
+
const contextValue = useMemo(() => ({
|
|
353
|
+
mapInstances,
|
|
354
|
+
addMapInstance,
|
|
355
|
+
removeMapInstance,
|
|
356
|
+
clearMapInstances,
|
|
357
|
+
status,
|
|
358
|
+
loadedLibraries,
|
|
359
|
+
importLibrary
|
|
360
|
+
}), [mapInstances, addMapInstance, removeMapInstance, clearMapInstances, status, loadedLibraries, importLibrary]);
|
|
361
|
+
return /* @__PURE__ */ React__default.createElement(APIProviderContext.Provider, {
|
|
362
|
+
value: contextValue
|
|
363
|
+
}, children);
|
|
364
|
+
};
|
|
365
|
+
function useMapEvents(map, props) {
|
|
366
|
+
for (const propName of eventPropNames) {
|
|
367
|
+
const handler = props[propName];
|
|
368
|
+
const eventType = propNameToEventType[propName];
|
|
369
|
+
useEffect(() => {
|
|
370
|
+
if (!map) return;
|
|
371
|
+
if (!handler) return;
|
|
372
|
+
const listener = google.maps.event.addListener(map, eventType, (ev) => {
|
|
373
|
+
handler(createMapEvent(eventType, map, ev));
|
|
374
|
+
});
|
|
375
|
+
return () => listener.remove();
|
|
376
|
+
}, [map, eventType, handler]);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function createMapEvent(type, map, srcEvent) {
|
|
380
|
+
const ev = {
|
|
381
|
+
type,
|
|
382
|
+
map,
|
|
383
|
+
detail: {},
|
|
384
|
+
stoppable: false,
|
|
385
|
+
stop: () => {
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
if (cameraEventTypes.includes(type)) {
|
|
389
|
+
const camEvent = ev;
|
|
390
|
+
const center = map.getCenter();
|
|
391
|
+
const zoom = map.getZoom();
|
|
392
|
+
const heading = map.getHeading() || 0;
|
|
393
|
+
const tilt = map.getTilt() || 0;
|
|
394
|
+
const bounds = map.getBounds();
|
|
395
|
+
if (!center || !bounds || !Number.isFinite(zoom)) {
|
|
396
|
+
console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new");
|
|
397
|
+
}
|
|
398
|
+
camEvent.detail = {
|
|
399
|
+
center: (center == null ? void 0 : center.toJSON()) || {
|
|
400
|
+
lat: 0,
|
|
401
|
+
lng: 0
|
|
402
|
+
},
|
|
403
|
+
zoom: zoom || 0,
|
|
404
|
+
heading,
|
|
405
|
+
tilt,
|
|
406
|
+
bounds: (bounds == null ? void 0 : bounds.toJSON()) || {
|
|
407
|
+
north: 90,
|
|
408
|
+
east: 180,
|
|
409
|
+
south: -90,
|
|
410
|
+
west: -180
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
return camEvent;
|
|
414
|
+
} else if (mouseEventTypes.includes(type)) {
|
|
415
|
+
var _srcEvent$latLng;
|
|
416
|
+
if (!srcEvent) throw new Error("[createEvent] mouse events must provide a srcEvent");
|
|
417
|
+
const mouseEvent = ev;
|
|
418
|
+
mouseEvent.domEvent = srcEvent.domEvent;
|
|
419
|
+
mouseEvent.stoppable = true;
|
|
420
|
+
mouseEvent.stop = () => srcEvent.stop();
|
|
421
|
+
mouseEvent.detail = {
|
|
422
|
+
latLng: ((_srcEvent$latLng = srcEvent.latLng) == null ? void 0 : _srcEvent$latLng.toJSON()) || null,
|
|
423
|
+
placeId: srcEvent.placeId
|
|
424
|
+
};
|
|
425
|
+
return mouseEvent;
|
|
426
|
+
}
|
|
427
|
+
return ev;
|
|
428
|
+
}
|
|
429
|
+
const propNameToEventType = {
|
|
430
|
+
onBoundsChanged: "bounds_changed",
|
|
431
|
+
onCenterChanged: "center_changed",
|
|
432
|
+
onClick: "click",
|
|
433
|
+
onContextmenu: "contextmenu",
|
|
434
|
+
onDblclick: "dblclick",
|
|
435
|
+
onDrag: "drag",
|
|
436
|
+
onDragend: "dragend",
|
|
437
|
+
onDragstart: "dragstart",
|
|
438
|
+
onHeadingChanged: "heading_changed",
|
|
439
|
+
onIdle: "idle",
|
|
440
|
+
onIsFractionalZoomEnabledChanged: "isfractionalzoomenabled_changed",
|
|
441
|
+
onMapCapabilitiesChanged: "mapcapabilities_changed",
|
|
442
|
+
onMapTypeIdChanged: "maptypeid_changed",
|
|
443
|
+
onMousemove: "mousemove",
|
|
444
|
+
onMouseout: "mouseout",
|
|
445
|
+
onMouseover: "mouseover",
|
|
446
|
+
onProjectionChanged: "projection_changed",
|
|
447
|
+
onRenderingTypeChanged: "renderingtype_changed",
|
|
448
|
+
onTilesLoaded: "tilesloaded",
|
|
449
|
+
onTiltChanged: "tilt_changed",
|
|
450
|
+
onZoomChanged: "zoom_changed",
|
|
451
|
+
// note: onCameraChanged is an alias for the bounds_changed event,
|
|
452
|
+
// since that is going to be fired in every situation where the camera is
|
|
453
|
+
// updated.
|
|
454
|
+
onCameraChanged: "bounds_changed"
|
|
455
|
+
};
|
|
456
|
+
const cameraEventTypes = ["bounds_changed", "center_changed", "heading_changed", "tilt_changed", "zoom_changed"];
|
|
457
|
+
const mouseEventTypes = ["click", "contextmenu", "dblclick", "mousemove", "mouseout", "mouseover"];
|
|
458
|
+
const eventPropNames = Object.keys(propNameToEventType);
|
|
459
|
+
function useDeepCompareEffect(effect, deps) {
|
|
460
|
+
const ref = useRef(void 0);
|
|
461
|
+
if (!ref.current || !isDeepEqual(deps, ref.current)) {
|
|
462
|
+
ref.current = deps;
|
|
463
|
+
}
|
|
464
|
+
useEffect(effect, ref.current);
|
|
465
|
+
}
|
|
466
|
+
const mapOptionKeys = /* @__PURE__ */ new Set(["backgroundColor", "clickableIcons", "controlSize", "disableDefaultUI", "disableDoubleClickZoom", "draggable", "draggableCursor", "draggingCursor", "fullscreenControl", "fullscreenControlOptions", "gestureHandling", "headingInteractionEnabled", "isFractionalZoomEnabled", "keyboardShortcuts", "mapTypeControl", "mapTypeControlOptions", "mapTypeId", "maxZoom", "minZoom", "noClear", "panControl", "panControlOptions", "restriction", "rotateControl", "rotateControlOptions", "scaleControl", "scaleControlOptions", "scrollwheel", "streetView", "streetViewControl", "streetViewControlOptions", "styles", "tiltInteractionEnabled", "zoomControl", "zoomControlOptions"]);
|
|
467
|
+
function useMapOptions(map, mapProps) {
|
|
468
|
+
const mapOptions = {};
|
|
469
|
+
const keys = Object.keys(mapProps);
|
|
470
|
+
for (const key of keys) {
|
|
471
|
+
if (!mapOptionKeys.has(key)) continue;
|
|
472
|
+
mapOptions[key] = mapProps[key];
|
|
473
|
+
}
|
|
474
|
+
useDeepCompareEffect(() => {
|
|
475
|
+
if (!map) return;
|
|
476
|
+
map.setOptions(mapOptions);
|
|
477
|
+
}, [mapOptions]);
|
|
478
|
+
}
|
|
479
|
+
function useApiLoadingStatus() {
|
|
480
|
+
var _useContext;
|
|
481
|
+
return ((_useContext = useContext(APIProviderContext)) == null ? void 0 : _useContext.status) || APILoadingStatus.NOT_LOADED;
|
|
482
|
+
}
|
|
483
|
+
function useDeckGLCameraUpdate(map, props) {
|
|
484
|
+
const {
|
|
485
|
+
viewport,
|
|
486
|
+
viewState
|
|
487
|
+
} = props;
|
|
488
|
+
const isDeckGlControlled = !!viewport;
|
|
489
|
+
useLayoutEffect(() => {
|
|
490
|
+
if (!map || !viewState) return;
|
|
491
|
+
const {
|
|
492
|
+
latitude,
|
|
493
|
+
longitude,
|
|
494
|
+
bearing: heading,
|
|
495
|
+
pitch: tilt,
|
|
496
|
+
zoom
|
|
497
|
+
} = viewState;
|
|
498
|
+
map.moveCamera({
|
|
499
|
+
center: {
|
|
500
|
+
lat: latitude,
|
|
501
|
+
lng: longitude
|
|
502
|
+
},
|
|
503
|
+
heading,
|
|
504
|
+
tilt,
|
|
505
|
+
zoom: zoom + 1
|
|
506
|
+
});
|
|
507
|
+
}, [map, viewState]);
|
|
508
|
+
return isDeckGlControlled;
|
|
509
|
+
}
|
|
510
|
+
function isLatLngLiteral(obj) {
|
|
511
|
+
if (!obj || typeof obj !== "object") return false;
|
|
512
|
+
if (!("lat" in obj && "lng" in obj)) return false;
|
|
513
|
+
return Number.isFinite(obj.lat) && Number.isFinite(obj.lng);
|
|
514
|
+
}
|
|
515
|
+
function toLatLngLiteral(obj) {
|
|
516
|
+
if (isLatLngLiteral(obj)) return obj;
|
|
517
|
+
return obj.toJSON();
|
|
518
|
+
}
|
|
519
|
+
function useMapCameraParams(map, cameraStateRef, mapProps) {
|
|
520
|
+
const center = mapProps.center ? toLatLngLiteral(mapProps.center) : null;
|
|
521
|
+
let lat = null;
|
|
522
|
+
let lng = null;
|
|
523
|
+
if (center && Number.isFinite(center.lat) && Number.isFinite(center.lng)) {
|
|
524
|
+
lat = center.lat;
|
|
525
|
+
lng = center.lng;
|
|
526
|
+
}
|
|
527
|
+
const zoom = Number.isFinite(mapProps.zoom) ? mapProps.zoom : null;
|
|
528
|
+
const heading = Number.isFinite(mapProps.heading) ? mapProps.heading : null;
|
|
529
|
+
const tilt = Number.isFinite(mapProps.tilt) ? mapProps.tilt : null;
|
|
530
|
+
useLayoutEffect(() => {
|
|
531
|
+
if (!map) return;
|
|
532
|
+
const nextCamera = {};
|
|
533
|
+
let needsUpdate = false;
|
|
534
|
+
if (lat !== null && lng !== null && (cameraStateRef.current.center.lat !== lat || cameraStateRef.current.center.lng !== lng)) {
|
|
535
|
+
nextCamera.center = {
|
|
536
|
+
lat,
|
|
537
|
+
lng
|
|
538
|
+
};
|
|
539
|
+
needsUpdate = true;
|
|
540
|
+
}
|
|
541
|
+
if (zoom !== null && cameraStateRef.current.zoom !== zoom) {
|
|
542
|
+
nextCamera.zoom = zoom;
|
|
543
|
+
needsUpdate = true;
|
|
544
|
+
}
|
|
545
|
+
if (heading !== null && cameraStateRef.current.heading !== heading) {
|
|
546
|
+
nextCamera.heading = heading;
|
|
547
|
+
needsUpdate = true;
|
|
548
|
+
}
|
|
549
|
+
if (tilt !== null && cameraStateRef.current.tilt !== tilt) {
|
|
550
|
+
nextCamera.tilt = tilt;
|
|
551
|
+
needsUpdate = true;
|
|
552
|
+
}
|
|
553
|
+
if (needsUpdate) {
|
|
554
|
+
map.moveCamera(nextCamera);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
const AuthFailureMessage = () => {
|
|
559
|
+
const style2 = {
|
|
560
|
+
position: "absolute",
|
|
561
|
+
top: 0,
|
|
562
|
+
left: 0,
|
|
563
|
+
bottom: 0,
|
|
564
|
+
right: 0,
|
|
565
|
+
zIndex: 999,
|
|
566
|
+
display: "flex",
|
|
567
|
+
flexFlow: "column nowrap",
|
|
568
|
+
textAlign: "center",
|
|
569
|
+
justifyContent: "center",
|
|
570
|
+
fontSize: ".8rem",
|
|
571
|
+
color: "rgba(0,0,0,0.6)",
|
|
572
|
+
background: "#dddddd",
|
|
573
|
+
padding: "1rem 1.5rem"
|
|
574
|
+
};
|
|
575
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
576
|
+
style: style2
|
|
577
|
+
}, /* @__PURE__ */ React__default.createElement("h2", null, "Error: AuthFailure"), /* @__PURE__ */ React__default.createElement("p", null, "A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ", /* @__PURE__ */ React__default.createElement("code", null, "APIProvider.apiKey"), " prop is correct. Check the error-message in the console for further details."));
|
|
578
|
+
};
|
|
579
|
+
function useCallbackRef() {
|
|
580
|
+
const [el, setEl] = useState(null);
|
|
581
|
+
const ref = useCallback((value) => setEl(value), [setEl]);
|
|
582
|
+
return [el, ref];
|
|
583
|
+
}
|
|
584
|
+
function useApiIsLoaded() {
|
|
585
|
+
const status = useApiLoadingStatus();
|
|
586
|
+
return status === APILoadingStatus.LOADED;
|
|
587
|
+
}
|
|
588
|
+
function useForceUpdate() {
|
|
589
|
+
const [, forceUpdate] = useReducer((x) => x + 1, 0);
|
|
590
|
+
return forceUpdate;
|
|
591
|
+
}
|
|
592
|
+
function handleBoundsChange(map, ref) {
|
|
593
|
+
const center = map.getCenter();
|
|
594
|
+
const zoom = map.getZoom();
|
|
595
|
+
const heading = map.getHeading() || 0;
|
|
596
|
+
const tilt = map.getTilt() || 0;
|
|
597
|
+
const bounds = map.getBounds();
|
|
598
|
+
if (!center || !bounds || !Number.isFinite(zoom)) {
|
|
599
|
+
console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new");
|
|
600
|
+
}
|
|
601
|
+
Object.assign(ref.current, {
|
|
602
|
+
center: (center == null ? void 0 : center.toJSON()) || {
|
|
603
|
+
lat: 0,
|
|
604
|
+
lng: 0
|
|
605
|
+
},
|
|
606
|
+
zoom: zoom || 0,
|
|
607
|
+
heading,
|
|
608
|
+
tilt
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
function useTrackedCameraStateRef(map) {
|
|
612
|
+
const forceUpdate = useForceUpdate();
|
|
613
|
+
const ref = useRef({
|
|
614
|
+
center: {
|
|
615
|
+
lat: 0,
|
|
616
|
+
lng: 0
|
|
617
|
+
},
|
|
618
|
+
heading: 0,
|
|
619
|
+
tilt: 0,
|
|
620
|
+
zoom: 0
|
|
621
|
+
});
|
|
622
|
+
useEffect(() => {
|
|
623
|
+
if (!map) return;
|
|
624
|
+
const listener = google.maps.event.addListener(map, "bounds_changed", () => {
|
|
625
|
+
handleBoundsChange(map, ref);
|
|
626
|
+
forceUpdate();
|
|
627
|
+
});
|
|
628
|
+
return () => listener.remove();
|
|
629
|
+
}, [map, forceUpdate]);
|
|
630
|
+
return ref;
|
|
631
|
+
}
|
|
632
|
+
const _excluded$2 = ["id", "defaultBounds", "defaultCenter", "defaultZoom", "defaultHeading", "defaultTilt", "reuseMaps", "renderingType", "colorScheme"], _excluded2 = ["padding"];
|
|
633
|
+
class CachedMapStack {
|
|
634
|
+
static has(key) {
|
|
635
|
+
return this.entries[key] && this.entries[key].length > 0;
|
|
636
|
+
}
|
|
637
|
+
static pop(key) {
|
|
638
|
+
if (!this.entries[key]) return null;
|
|
639
|
+
return this.entries[key].pop() || null;
|
|
640
|
+
}
|
|
641
|
+
static push(key, value) {
|
|
642
|
+
if (!this.entries[key]) this.entries[key] = [];
|
|
643
|
+
this.entries[key].push(value);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
CachedMapStack.entries = {};
|
|
647
|
+
function useMapInstance(props, context) {
|
|
648
|
+
const apiIsLoaded = useApiIsLoaded();
|
|
649
|
+
const [map, setMap] = useState(null);
|
|
650
|
+
const [container, containerRef] = useCallbackRef();
|
|
651
|
+
const cameraStateRef = useTrackedCameraStateRef(map);
|
|
652
|
+
const {
|
|
653
|
+
id,
|
|
654
|
+
defaultBounds,
|
|
655
|
+
defaultCenter,
|
|
656
|
+
defaultZoom,
|
|
657
|
+
defaultHeading,
|
|
658
|
+
defaultTilt,
|
|
659
|
+
reuseMaps,
|
|
660
|
+
renderingType,
|
|
661
|
+
colorScheme
|
|
662
|
+
} = props, mapOptions = _objectWithoutPropertiesLoose(props, _excluded$2);
|
|
663
|
+
const hasZoom = props.zoom !== void 0 || props.defaultZoom !== void 0;
|
|
664
|
+
const hasCenter = props.center !== void 0 || props.defaultCenter !== void 0;
|
|
665
|
+
if (!defaultBounds && (!hasZoom || !hasCenter)) {
|
|
666
|
+
console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required");
|
|
667
|
+
}
|
|
668
|
+
if (!mapOptions.center && defaultCenter) mapOptions.center = defaultCenter;
|
|
669
|
+
if (!mapOptions.zoom && Number.isFinite(defaultZoom)) mapOptions.zoom = defaultZoom;
|
|
670
|
+
if (!mapOptions.heading && Number.isFinite(defaultHeading)) mapOptions.heading = defaultHeading;
|
|
671
|
+
if (!mapOptions.tilt && Number.isFinite(defaultTilt)) mapOptions.tilt = defaultTilt;
|
|
672
|
+
for (const key of Object.keys(mapOptions)) if (mapOptions[key] === void 0) delete mapOptions[key];
|
|
673
|
+
const savedMapStateRef = useRef(void 0);
|
|
674
|
+
useEffect(
|
|
675
|
+
() => {
|
|
676
|
+
if (!container || !apiIsLoaded) return;
|
|
677
|
+
const {
|
|
678
|
+
addMapInstance,
|
|
679
|
+
removeMapInstance
|
|
680
|
+
} = context;
|
|
681
|
+
const {
|
|
682
|
+
mapId
|
|
683
|
+
} = props;
|
|
684
|
+
const cacheKey = `${mapId || "default"}:${renderingType || "default"}:${colorScheme || "LIGHT"}`;
|
|
685
|
+
let mapDiv;
|
|
686
|
+
let map2;
|
|
687
|
+
if (reuseMaps && CachedMapStack.has(cacheKey)) {
|
|
688
|
+
map2 = CachedMapStack.pop(cacheKey);
|
|
689
|
+
mapDiv = map2.getDiv();
|
|
690
|
+
container.appendChild(mapDiv);
|
|
691
|
+
map2.setOptions(mapOptions);
|
|
692
|
+
setTimeout(() => map2.setCenter(map2.getCenter()), 0);
|
|
693
|
+
} else {
|
|
694
|
+
mapDiv = document.createElement("div");
|
|
695
|
+
mapDiv.style.height = "100%";
|
|
696
|
+
container.appendChild(mapDiv);
|
|
697
|
+
map2 = new google.maps.Map(mapDiv, _extends({}, mapOptions, renderingType ? {
|
|
698
|
+
renderingType
|
|
699
|
+
} : {}, colorScheme ? {
|
|
700
|
+
colorScheme
|
|
701
|
+
} : {}));
|
|
702
|
+
}
|
|
703
|
+
setMap(map2);
|
|
704
|
+
addMapInstance(map2, id);
|
|
705
|
+
if (defaultBounds) {
|
|
706
|
+
const {
|
|
707
|
+
padding
|
|
708
|
+
} = defaultBounds, defBounds = _objectWithoutPropertiesLoose(defaultBounds, _excluded2);
|
|
709
|
+
map2.fitBounds(defBounds, padding);
|
|
710
|
+
} else if (!hasZoom || !hasCenter) {
|
|
711
|
+
map2.fitBounds({
|
|
712
|
+
east: 180,
|
|
713
|
+
west: -180,
|
|
714
|
+
south: -90,
|
|
715
|
+
north: 90
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
if (savedMapStateRef.current) {
|
|
719
|
+
const {
|
|
720
|
+
mapId: savedMapId,
|
|
721
|
+
cameraState: savedCameraState
|
|
722
|
+
} = savedMapStateRef.current;
|
|
723
|
+
if (savedMapId !== mapId) {
|
|
724
|
+
map2.setOptions(savedCameraState);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return () => {
|
|
728
|
+
savedMapStateRef.current = {
|
|
729
|
+
mapId,
|
|
730
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
731
|
+
cameraState: cameraStateRef.current
|
|
732
|
+
};
|
|
733
|
+
mapDiv.remove();
|
|
734
|
+
if (reuseMaps) {
|
|
735
|
+
CachedMapStack.push(cacheKey, map2);
|
|
736
|
+
} else {
|
|
737
|
+
google.maps.event.clearInstanceListeners(map2);
|
|
738
|
+
}
|
|
739
|
+
setMap(null);
|
|
740
|
+
removeMapInstance(id);
|
|
741
|
+
};
|
|
742
|
+
},
|
|
743
|
+
// some dependencies are ignored in the list below:
|
|
744
|
+
// - defaultBounds and the default* camera props will only be used once, and
|
|
745
|
+
// changes should be ignored
|
|
746
|
+
// - mapOptions has special hooks that take care of updating the options
|
|
747
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
748
|
+
[
|
|
749
|
+
container,
|
|
750
|
+
apiIsLoaded,
|
|
751
|
+
id,
|
|
752
|
+
// these props can't be changed after initialization and require a new
|
|
753
|
+
// instance to be created
|
|
754
|
+
props.mapId,
|
|
755
|
+
props.renderingType,
|
|
756
|
+
props.colorScheme
|
|
757
|
+
]
|
|
758
|
+
);
|
|
759
|
+
return [map, containerRef, cameraStateRef];
|
|
760
|
+
}
|
|
761
|
+
const GoogleMapsContext = React__default.createContext(null);
|
|
762
|
+
const Map = (props) => {
|
|
763
|
+
const {
|
|
764
|
+
children,
|
|
765
|
+
id,
|
|
766
|
+
className,
|
|
767
|
+
style: style2
|
|
768
|
+
} = props;
|
|
769
|
+
const context = useContext(APIProviderContext);
|
|
770
|
+
const loadingStatus = useApiLoadingStatus();
|
|
771
|
+
if (!context) {
|
|
772
|
+
throw new Error("<Map> can only be used inside an <ApiProvider> component.");
|
|
773
|
+
}
|
|
774
|
+
const [map, mapRef, cameraStateRef] = useMapInstance(props, context);
|
|
775
|
+
useMapCameraParams(map, cameraStateRef, props);
|
|
776
|
+
useMapEvents(map, props);
|
|
777
|
+
useMapOptions(map, props);
|
|
778
|
+
const isDeckGlControlled = useDeckGLCameraUpdate(map, props);
|
|
779
|
+
const isControlledExternally = !!props.controlled;
|
|
780
|
+
useEffect(() => {
|
|
781
|
+
if (!map) return;
|
|
782
|
+
if (isDeckGlControlled) {
|
|
783
|
+
map.setOptions({
|
|
784
|
+
disableDefaultUI: true
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
if (isDeckGlControlled || isControlledExternally) {
|
|
788
|
+
map.setOptions({
|
|
789
|
+
gestureHandling: "none",
|
|
790
|
+
keyboardShortcuts: false
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
return () => {
|
|
794
|
+
map.setOptions({
|
|
795
|
+
gestureHandling: props.gestureHandling,
|
|
796
|
+
keyboardShortcuts: props.keyboardShortcuts
|
|
797
|
+
});
|
|
798
|
+
};
|
|
799
|
+
}, [map, isDeckGlControlled, isControlledExternally, props.gestureHandling, props.keyboardShortcuts]);
|
|
800
|
+
const center = props.center ? toLatLngLiteral(props.center) : null;
|
|
801
|
+
let lat = null;
|
|
802
|
+
let lng = null;
|
|
803
|
+
if (center && Number.isFinite(center.lat) && Number.isFinite(center.lng)) {
|
|
804
|
+
lat = center.lat;
|
|
805
|
+
lng = center.lng;
|
|
806
|
+
}
|
|
807
|
+
const cameraOptions = useMemo(() => {
|
|
808
|
+
var _lat, _lng, _props$zoom, _props$heading, _props$tilt;
|
|
809
|
+
return {
|
|
810
|
+
center: {
|
|
811
|
+
lat: (_lat = lat) != null ? _lat : 0,
|
|
812
|
+
lng: (_lng = lng) != null ? _lng : 0
|
|
813
|
+
},
|
|
814
|
+
zoom: (_props$zoom = props.zoom) != null ? _props$zoom : 0,
|
|
815
|
+
heading: (_props$heading = props.heading) != null ? _props$heading : 0,
|
|
816
|
+
tilt: (_props$tilt = props.tilt) != null ? _props$tilt : 0
|
|
817
|
+
};
|
|
818
|
+
}, [lat, lng, props.zoom, props.heading, props.tilt]);
|
|
819
|
+
useLayoutEffect(() => {
|
|
820
|
+
if (!map || !isControlledExternally) return;
|
|
821
|
+
map.moveCamera(cameraOptions);
|
|
822
|
+
const listener = map.addListener("bounds_changed", () => {
|
|
823
|
+
map.moveCamera(cameraOptions);
|
|
824
|
+
});
|
|
825
|
+
return () => listener.remove();
|
|
826
|
+
}, [map, isControlledExternally, cameraOptions]);
|
|
827
|
+
const combinedStyle = useMemo(() => _extends({
|
|
828
|
+
width: "100%",
|
|
829
|
+
height: "100%",
|
|
830
|
+
position: "relative",
|
|
831
|
+
// when using deckgl, the map should be sent to the back
|
|
832
|
+
zIndex: isDeckGlControlled ? -1 : 0
|
|
833
|
+
}, style2), [style2, isDeckGlControlled]);
|
|
834
|
+
const contextValue = useMemo(() => ({
|
|
835
|
+
map
|
|
836
|
+
}), [map]);
|
|
837
|
+
if (loadingStatus === APILoadingStatus.AUTH_FAILURE) {
|
|
838
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
839
|
+
style: _extends({
|
|
840
|
+
position: "relative"
|
|
841
|
+
}, className ? {} : combinedStyle),
|
|
842
|
+
className
|
|
843
|
+
}, /* @__PURE__ */ React__default.createElement(AuthFailureMessage, null));
|
|
844
|
+
}
|
|
845
|
+
return /* @__PURE__ */ React__default.createElement("div", _extends({
|
|
846
|
+
ref: mapRef,
|
|
847
|
+
"data-testid": "map",
|
|
848
|
+
style: className ? void 0 : combinedStyle,
|
|
849
|
+
className
|
|
850
|
+
}, id ? {
|
|
851
|
+
id
|
|
852
|
+
} : {}), map ? /* @__PURE__ */ React__default.createElement(GoogleMapsContext.Provider, {
|
|
853
|
+
value: contextValue
|
|
854
|
+
}, children) : null);
|
|
855
|
+
};
|
|
856
|
+
Map.deckGLViewProps = true;
|
|
857
|
+
const shownMessages = /* @__PURE__ */ new Set();
|
|
858
|
+
function logErrorOnce(...args) {
|
|
859
|
+
const key = JSON.stringify(args);
|
|
860
|
+
if (!shownMessages.has(key)) {
|
|
861
|
+
shownMessages.add(key);
|
|
862
|
+
console.error(...args);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
const useMap = (id = null) => {
|
|
866
|
+
const ctx = useContext(APIProviderContext);
|
|
867
|
+
const {
|
|
868
|
+
map
|
|
869
|
+
} = useContext(GoogleMapsContext) || {};
|
|
870
|
+
if (ctx === null) {
|
|
871
|
+
logErrorOnce("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>.");
|
|
872
|
+
return null;
|
|
873
|
+
}
|
|
874
|
+
const {
|
|
875
|
+
mapInstances
|
|
876
|
+
} = ctx;
|
|
877
|
+
if (id !== null) return mapInstances[id] || null;
|
|
878
|
+
if (map) return map;
|
|
879
|
+
return mapInstances["default"] || null;
|
|
880
|
+
};
|
|
881
|
+
function useMapsLibrary(name) {
|
|
882
|
+
const apiIsLoaded = useApiIsLoaded();
|
|
883
|
+
const ctx = useContext(APIProviderContext);
|
|
884
|
+
useEffect(() => {
|
|
885
|
+
if (!apiIsLoaded || !ctx) return;
|
|
886
|
+
void ctx.importLibrary(name);
|
|
887
|
+
}, [apiIsLoaded, ctx, name]);
|
|
888
|
+
return (ctx == null ? void 0 : ctx.loadedLibraries[name]) || null;
|
|
889
|
+
}
|
|
890
|
+
function useMapsEventListener(target, name, callback) {
|
|
891
|
+
useEffect(() => {
|
|
892
|
+
if (!target || !name || !callback) return;
|
|
893
|
+
const listener = google.maps.event.addListener(target, name, callback);
|
|
894
|
+
return () => listener.remove();
|
|
895
|
+
}, [target, name, callback]);
|
|
896
|
+
}
|
|
897
|
+
function usePropBinding(object, prop, value) {
|
|
898
|
+
useEffect(() => {
|
|
899
|
+
if (!object) return;
|
|
900
|
+
object[prop] = value;
|
|
901
|
+
}, [object, prop, value]);
|
|
902
|
+
}
|
|
903
|
+
function useDomEventListener(target, name, callback) {
|
|
904
|
+
useEffect(() => {
|
|
905
|
+
if (!target || !name || !callback) return;
|
|
906
|
+
target.addEventListener(name, callback);
|
|
907
|
+
return () => target.removeEventListener(name, callback);
|
|
908
|
+
}, [target, name, callback]);
|
|
909
|
+
}
|
|
910
|
+
function isAdvancedMarker(marker) {
|
|
911
|
+
return marker.content !== void 0;
|
|
912
|
+
}
|
|
913
|
+
function isElementNode(node) {
|
|
914
|
+
return node.nodeType === Node.ELEMENT_NODE;
|
|
915
|
+
}
|
|
916
|
+
const AdvancedMarkerContext = React__default.createContext(null);
|
|
917
|
+
const AdvancedMarkerAnchorPoint = {
|
|
918
|
+
BOTTOM: ["50%", "100%"]
|
|
919
|
+
};
|
|
920
|
+
const MarkerContent = ({
|
|
921
|
+
children,
|
|
922
|
+
styles: styles2,
|
|
923
|
+
className,
|
|
924
|
+
anchorPoint
|
|
925
|
+
}) => {
|
|
926
|
+
const [xTranslation, yTranslation] = anchorPoint != null ? anchorPoint : AdvancedMarkerAnchorPoint["BOTTOM"];
|
|
927
|
+
let xTranslationFlipped = `-${xTranslation}`;
|
|
928
|
+
let yTranslationFlipped = `-${yTranslation}`;
|
|
929
|
+
if (xTranslation.trimStart().startsWith("-")) {
|
|
930
|
+
xTranslationFlipped = xTranslation.substring(1);
|
|
931
|
+
}
|
|
932
|
+
if (yTranslation.trimStart().startsWith("-")) {
|
|
933
|
+
yTranslationFlipped = yTranslation.substring(1);
|
|
934
|
+
}
|
|
935
|
+
const transformStyle = `translate(50%, 100%) translate(${xTranslationFlipped}, ${yTranslationFlipped})`;
|
|
936
|
+
return (
|
|
937
|
+
// anchoring container
|
|
938
|
+
/* @__PURE__ */ React__default.createElement("div", {
|
|
939
|
+
style: {
|
|
940
|
+
transform: transformStyle
|
|
941
|
+
}
|
|
942
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
943
|
+
className,
|
|
944
|
+
style: styles2
|
|
945
|
+
}, children))
|
|
946
|
+
);
|
|
947
|
+
};
|
|
948
|
+
function useAdvancedMarker(props) {
|
|
949
|
+
const [marker, setMarker] = useState(null);
|
|
950
|
+
const [contentContainer, setContentContainer] = useState(null);
|
|
951
|
+
const map = useMap();
|
|
952
|
+
const markerLibrary = useMapsLibrary("marker");
|
|
953
|
+
const {
|
|
954
|
+
children,
|
|
955
|
+
onClick,
|
|
956
|
+
className,
|
|
957
|
+
onMouseEnter,
|
|
958
|
+
onMouseLeave,
|
|
959
|
+
onDrag,
|
|
960
|
+
onDragStart,
|
|
961
|
+
onDragEnd,
|
|
962
|
+
collisionBehavior,
|
|
963
|
+
clickable,
|
|
964
|
+
draggable,
|
|
965
|
+
position,
|
|
966
|
+
title: title2,
|
|
967
|
+
zIndex
|
|
968
|
+
} = props;
|
|
969
|
+
const numChildren = Children.count(children);
|
|
970
|
+
useEffect(() => {
|
|
971
|
+
if (!map || !markerLibrary) return;
|
|
972
|
+
const newMarker = new markerLibrary.AdvancedMarkerElement();
|
|
973
|
+
newMarker.map = map;
|
|
974
|
+
setMarker(newMarker);
|
|
975
|
+
let contentElement = null;
|
|
976
|
+
if (numChildren > 0) {
|
|
977
|
+
contentElement = document.createElement("div");
|
|
978
|
+
contentElement.isCustomMarker = true;
|
|
979
|
+
newMarker.content = contentElement;
|
|
980
|
+
setContentContainer(contentElement);
|
|
981
|
+
}
|
|
982
|
+
return () => {
|
|
983
|
+
var _contentElement;
|
|
984
|
+
newMarker.map = null;
|
|
985
|
+
(_contentElement = contentElement) == null || _contentElement.remove();
|
|
986
|
+
setMarker(null);
|
|
987
|
+
setContentContainer(null);
|
|
988
|
+
};
|
|
989
|
+
}, [map, markerLibrary, numChildren]);
|
|
990
|
+
useEffect(() => {
|
|
991
|
+
if (!marker || !marker.content || numChildren > 0) return;
|
|
992
|
+
marker.content.className = className || "";
|
|
993
|
+
}, [marker, className, numChildren]);
|
|
994
|
+
usePropBinding(marker, "position", position);
|
|
995
|
+
usePropBinding(marker, "title", title2 != null ? title2 : "");
|
|
996
|
+
usePropBinding(marker, "zIndex", zIndex);
|
|
997
|
+
usePropBinding(marker, "collisionBehavior", collisionBehavior);
|
|
998
|
+
useEffect(() => {
|
|
999
|
+
if (!marker) return;
|
|
1000
|
+
if (draggable !== void 0) marker.gmpDraggable = draggable;
|
|
1001
|
+
else if (onDrag || onDragStart || onDragEnd) marker.gmpDraggable = true;
|
|
1002
|
+
else marker.gmpDraggable = false;
|
|
1003
|
+
}, [marker, draggable, onDrag, onDragEnd, onDragStart]);
|
|
1004
|
+
useEffect(() => {
|
|
1005
|
+
if (!marker) return;
|
|
1006
|
+
const gmpClickable = clickable !== void 0 || Boolean(onClick) || Boolean(onMouseEnter) || Boolean(onMouseLeave);
|
|
1007
|
+
marker.gmpClickable = gmpClickable;
|
|
1008
|
+
if (gmpClickable && marker != null && marker.content && isElementNode(marker.content)) {
|
|
1009
|
+
marker.content.style.pointerEvents = "none";
|
|
1010
|
+
if (marker.content.firstElementChild) {
|
|
1011
|
+
marker.content.firstElementChild.style.pointerEvents = "all";
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}, [marker, clickable, onClick, onMouseEnter, onMouseLeave]);
|
|
1015
|
+
useMapsEventListener(marker, "click", onClick);
|
|
1016
|
+
useMapsEventListener(marker, "drag", onDrag);
|
|
1017
|
+
useMapsEventListener(marker, "dragstart", onDragStart);
|
|
1018
|
+
useMapsEventListener(marker, "dragend", onDragEnd);
|
|
1019
|
+
useDomEventListener(marker == null ? void 0 : marker.element, "mouseenter", onMouseEnter);
|
|
1020
|
+
useDomEventListener(marker == null ? void 0 : marker.element, "mouseleave", onMouseLeave);
|
|
1021
|
+
return [marker, contentContainer];
|
|
1022
|
+
}
|
|
1023
|
+
const AdvancedMarker = forwardRef((props, ref) => {
|
|
1024
|
+
const {
|
|
1025
|
+
children,
|
|
1026
|
+
style: style2,
|
|
1027
|
+
className,
|
|
1028
|
+
anchorPoint
|
|
1029
|
+
} = props;
|
|
1030
|
+
const [marker, contentContainer] = useAdvancedMarker(props);
|
|
1031
|
+
const advancedMarkerContextValue = useMemo(() => marker ? {
|
|
1032
|
+
marker
|
|
1033
|
+
} : null, [marker]);
|
|
1034
|
+
useImperativeHandle(ref, () => marker, [marker]);
|
|
1035
|
+
if (!contentContainer) return null;
|
|
1036
|
+
return /* @__PURE__ */ React__default.createElement(AdvancedMarkerContext.Provider, {
|
|
1037
|
+
value: advancedMarkerContextValue
|
|
1038
|
+
}, createPortal(/* @__PURE__ */ React__default.createElement(MarkerContent, {
|
|
1039
|
+
anchorPoint,
|
|
1040
|
+
styles: style2,
|
|
1041
|
+
className
|
|
1042
|
+
}, children), contentContainer));
|
|
1043
|
+
});
|
|
1044
|
+
function setValueForStyles(element, styles2, prevStyles) {
|
|
1045
|
+
if (styles2 != null && typeof styles2 !== "object") {
|
|
1046
|
+
throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
|
|
1047
|
+
}
|
|
1048
|
+
const elementStyle = element.style;
|
|
1049
|
+
if (prevStyles == null) {
|
|
1050
|
+
if (styles2 == null) return;
|
|
1051
|
+
for (const styleName in styles2) {
|
|
1052
|
+
if (!styles2.hasOwnProperty(styleName)) continue;
|
|
1053
|
+
setValueForStyle(elementStyle, styleName, styles2[styleName]);
|
|
1054
|
+
}
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
for (const styleName in prevStyles) {
|
|
1058
|
+
if (prevStyles.hasOwnProperty(styleName) && (styles2 == null || !styles2.hasOwnProperty(styleName))) {
|
|
1059
|
+
const isCustomProperty = styleName.indexOf("--") === 0;
|
|
1060
|
+
if (isCustomProperty) {
|
|
1061
|
+
elementStyle.setProperty(styleName, "");
|
|
1062
|
+
} else if (styleName === "float") {
|
|
1063
|
+
elementStyle.cssFloat = "";
|
|
1064
|
+
} else {
|
|
1065
|
+
elementStyle[styleName] = "";
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
if (styles2 == null) return;
|
|
1070
|
+
for (const styleName in styles2) {
|
|
1071
|
+
const value = styles2[styleName];
|
|
1072
|
+
if (styles2.hasOwnProperty(styleName) && prevStyles[styleName] !== value) {
|
|
1073
|
+
setValueForStyle(elementStyle, styleName, value);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
function setValueForStyle(elementStyle, styleName, value) {
|
|
1078
|
+
const isCustomProperty = styleName.indexOf("--") === 0;
|
|
1079
|
+
if (value == null || typeof value === "boolean" || value === "") {
|
|
1080
|
+
if (isCustomProperty) {
|
|
1081
|
+
elementStyle.setProperty(styleName, "");
|
|
1082
|
+
} else if (styleName === "float") {
|
|
1083
|
+
elementStyle.cssFloat = "";
|
|
1084
|
+
} else {
|
|
1085
|
+
elementStyle[styleName] = "";
|
|
1086
|
+
}
|
|
1087
|
+
} else if (isCustomProperty) {
|
|
1088
|
+
elementStyle.setProperty(styleName, value);
|
|
1089
|
+
} else if (typeof value === "number" && value !== 0 && !isUnitlessNumber(styleName)) {
|
|
1090
|
+
elementStyle[styleName] = value + "px";
|
|
1091
|
+
} else {
|
|
1092
|
+
if (styleName === "float") {
|
|
1093
|
+
elementStyle.cssFloat = value;
|
|
1094
|
+
} else {
|
|
1095
|
+
elementStyle[styleName] = ("" + value).trim();
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
const unitlessNumbers = /* @__PURE__ */ new Set([
|
|
1100
|
+
"animationIterationCount",
|
|
1101
|
+
"aspectRatio",
|
|
1102
|
+
"borderImageOutset",
|
|
1103
|
+
"borderImageSlice",
|
|
1104
|
+
"borderImageWidth",
|
|
1105
|
+
"boxFlex",
|
|
1106
|
+
"boxFlexGroup",
|
|
1107
|
+
"boxOrdinalGroup",
|
|
1108
|
+
"columnCount",
|
|
1109
|
+
"columns",
|
|
1110
|
+
"flex",
|
|
1111
|
+
"flexGrow",
|
|
1112
|
+
"flexPositive",
|
|
1113
|
+
"flexShrink",
|
|
1114
|
+
"flexNegative",
|
|
1115
|
+
"flexOrder",
|
|
1116
|
+
"gridArea",
|
|
1117
|
+
"gridRow",
|
|
1118
|
+
"gridRowEnd",
|
|
1119
|
+
"gridRowSpan",
|
|
1120
|
+
"gridRowStart",
|
|
1121
|
+
"gridColumn",
|
|
1122
|
+
"gridColumnEnd",
|
|
1123
|
+
"gridColumnSpan",
|
|
1124
|
+
"gridColumnStart",
|
|
1125
|
+
"fontWeight",
|
|
1126
|
+
"lineClamp",
|
|
1127
|
+
"lineHeight",
|
|
1128
|
+
"opacity",
|
|
1129
|
+
"order",
|
|
1130
|
+
"orphans",
|
|
1131
|
+
"scale",
|
|
1132
|
+
"tabSize",
|
|
1133
|
+
"widows",
|
|
1134
|
+
"zIndex",
|
|
1135
|
+
"zoom",
|
|
1136
|
+
"fillOpacity",
|
|
1137
|
+
// SVG-related properties
|
|
1138
|
+
"floodOpacity",
|
|
1139
|
+
"stopOpacity",
|
|
1140
|
+
"strokeDasharray",
|
|
1141
|
+
"strokeDashoffset",
|
|
1142
|
+
"strokeMiterlimit",
|
|
1143
|
+
"strokeOpacity",
|
|
1144
|
+
"strokeWidth"
|
|
1145
|
+
]);
|
|
1146
|
+
function isUnitlessNumber(name) {
|
|
1147
|
+
return unitlessNumbers.has(name);
|
|
1148
|
+
}
|
|
1149
|
+
const _excluded$1 = ["children", "headerContent", "style", "className", "pixelOffset", "anchor", "shouldFocus", "onClose", "onCloseClick"];
|
|
1150
|
+
const InfoWindow = (props) => {
|
|
1151
|
+
const {
|
|
1152
|
+
// content options
|
|
1153
|
+
children,
|
|
1154
|
+
headerContent,
|
|
1155
|
+
style: style2,
|
|
1156
|
+
className,
|
|
1157
|
+
pixelOffset,
|
|
1158
|
+
// open options
|
|
1159
|
+
anchor,
|
|
1160
|
+
shouldFocus,
|
|
1161
|
+
// events
|
|
1162
|
+
onClose,
|
|
1163
|
+
onCloseClick
|
|
1164
|
+
// other options
|
|
1165
|
+
} = props, infoWindowOptions = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
1166
|
+
const mapsLibrary = useMapsLibrary("maps");
|
|
1167
|
+
const [infoWindow, setInfoWindow] = useState(null);
|
|
1168
|
+
const contentContainerRef = useRef(null);
|
|
1169
|
+
const headerContainerRef = useRef(null);
|
|
1170
|
+
useEffect(
|
|
1171
|
+
() => {
|
|
1172
|
+
if (!mapsLibrary) return;
|
|
1173
|
+
contentContainerRef.current = document.createElement("div");
|
|
1174
|
+
headerContainerRef.current = document.createElement("div");
|
|
1175
|
+
const opts = infoWindowOptions;
|
|
1176
|
+
if (pixelOffset) {
|
|
1177
|
+
opts.pixelOffset = new google.maps.Size(pixelOffset[0], pixelOffset[1]);
|
|
1178
|
+
}
|
|
1179
|
+
if (headerContent) {
|
|
1180
|
+
opts.headerContent = typeof headerContent === "string" ? headerContent : headerContainerRef.current;
|
|
1181
|
+
}
|
|
1182
|
+
const infoWindow2 = new google.maps.InfoWindow(infoWindowOptions);
|
|
1183
|
+
infoWindow2.setContent(contentContainerRef.current);
|
|
1184
|
+
setInfoWindow(infoWindow2);
|
|
1185
|
+
return () => {
|
|
1186
|
+
var _contentContainerRef$, _headerContainerRef$c;
|
|
1187
|
+
infoWindow2.setContent(null);
|
|
1188
|
+
(_contentContainerRef$ = contentContainerRef.current) == null || _contentContainerRef$.remove();
|
|
1189
|
+
(_headerContainerRef$c = headerContainerRef.current) == null || _headerContainerRef$c.remove();
|
|
1190
|
+
contentContainerRef.current = null;
|
|
1191
|
+
headerContainerRef.current = null;
|
|
1192
|
+
setInfoWindow(null);
|
|
1193
|
+
};
|
|
1194
|
+
},
|
|
1195
|
+
// `infoWindowOptions` and other props are missing from dependencies:
|
|
1196
|
+
//
|
|
1197
|
+
// We don't want to re-create the infowindow instance
|
|
1198
|
+
// when the options change.
|
|
1199
|
+
// Updating the options is handled in the useEffect below.
|
|
1200
|
+
//
|
|
1201
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1202
|
+
[mapsLibrary]
|
|
1203
|
+
);
|
|
1204
|
+
const prevStyleRef = useRef(null);
|
|
1205
|
+
useEffect(() => {
|
|
1206
|
+
if (!infoWindow || !contentContainerRef.current) return;
|
|
1207
|
+
setValueForStyles(contentContainerRef.current, style2 || null, prevStyleRef.current);
|
|
1208
|
+
prevStyleRef.current = style2 || null;
|
|
1209
|
+
if (className !== contentContainerRef.current.className) contentContainerRef.current.className = className || "";
|
|
1210
|
+
}, [infoWindow, className, style2]);
|
|
1211
|
+
useDeepCompareEffect(
|
|
1212
|
+
() => {
|
|
1213
|
+
if (!infoWindow) return;
|
|
1214
|
+
const opts = infoWindowOptions;
|
|
1215
|
+
if (!pixelOffset) {
|
|
1216
|
+
opts.pixelOffset = null;
|
|
1217
|
+
} else {
|
|
1218
|
+
opts.pixelOffset = new google.maps.Size(pixelOffset[0], pixelOffset[1]);
|
|
1219
|
+
}
|
|
1220
|
+
if (!headerContent) {
|
|
1221
|
+
opts.headerContent = null;
|
|
1222
|
+
} else {
|
|
1223
|
+
opts.headerContent = typeof headerContent === "string" ? headerContent : headerContainerRef.current;
|
|
1224
|
+
}
|
|
1225
|
+
infoWindow.setOptions(infoWindowOptions);
|
|
1226
|
+
},
|
|
1227
|
+
// dependency `infoWindow` isn't needed since options are also passed
|
|
1228
|
+
// to the constructor when a new infoWindow is created.
|
|
1229
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1230
|
+
[infoWindowOptions, pixelOffset, headerContent]
|
|
1231
|
+
);
|
|
1232
|
+
useMapsEventListener(infoWindow, "close", onClose);
|
|
1233
|
+
useMapsEventListener(infoWindow, "closeclick", onCloseClick);
|
|
1234
|
+
const map = useMap();
|
|
1235
|
+
useDeepCompareEffect(() => {
|
|
1236
|
+
if (!map || !infoWindow || anchor === null) return;
|
|
1237
|
+
const isOpenedWithAnchor = !!anchor;
|
|
1238
|
+
const openOptions = {
|
|
1239
|
+
map
|
|
1240
|
+
};
|
|
1241
|
+
if (anchor) {
|
|
1242
|
+
openOptions.anchor = anchor;
|
|
1243
|
+
if (isAdvancedMarker(anchor) && anchor.content instanceof Element) {
|
|
1244
|
+
const wrapper = anchor.content;
|
|
1245
|
+
const wrapperBcr = wrapper == null ? void 0 : wrapper.getBoundingClientRect();
|
|
1246
|
+
if (wrapperBcr && wrapper != null && wrapper.isCustomMarker) {
|
|
1247
|
+
var _anchor$content$first;
|
|
1248
|
+
const anchorDomContent = (_anchor$content$first = anchor.content.firstElementChild) == null ? void 0 : _anchor$content$first.firstElementChild;
|
|
1249
|
+
const contentBcr = anchorDomContent == null ? void 0 : anchorDomContent.getBoundingClientRect();
|
|
1250
|
+
const anchorOffsetX = contentBcr.x - wrapperBcr.x + (contentBcr.width - wrapperBcr.width) / 2;
|
|
1251
|
+
const anchorOffsetY = contentBcr.y - wrapperBcr.y;
|
|
1252
|
+
const opts = infoWindowOptions;
|
|
1253
|
+
opts.pixelOffset = new google.maps.Size(pixelOffset ? pixelOffset[0] + anchorOffsetX : anchorOffsetX, pixelOffset ? pixelOffset[1] + anchorOffsetY : anchorOffsetY);
|
|
1254
|
+
infoWindow.setOptions(opts);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
if (shouldFocus !== void 0) {
|
|
1259
|
+
openOptions.shouldFocus = shouldFocus;
|
|
1260
|
+
}
|
|
1261
|
+
infoWindow.open(openOptions);
|
|
1262
|
+
return () => {
|
|
1263
|
+
if (isOpenedWithAnchor) infoWindow.set("anchor", null);
|
|
1264
|
+
infoWindow.close();
|
|
1265
|
+
};
|
|
1266
|
+
}, [infoWindow, anchor, map, shouldFocus, infoWindowOptions, pixelOffset]);
|
|
1267
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, contentContainerRef.current && createPortal(children, contentContainerRef.current), headerContainerRef.current !== null && createPortal(headerContent, headerContainerRef.current));
|
|
1268
|
+
};
|
|
1269
|
+
const _excluded = ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut"];
|
|
1270
|
+
function useMarker(props) {
|
|
1271
|
+
const [marker, setMarker] = useState(null);
|
|
1272
|
+
const map = useMap();
|
|
1273
|
+
const {
|
|
1274
|
+
onClick,
|
|
1275
|
+
onDrag,
|
|
1276
|
+
onDragStart,
|
|
1277
|
+
onDragEnd,
|
|
1278
|
+
onMouseOver,
|
|
1279
|
+
onMouseOut
|
|
1280
|
+
} = props, markerOptions = _objectWithoutPropertiesLoose(props, _excluded);
|
|
1281
|
+
const {
|
|
1282
|
+
position,
|
|
1283
|
+
draggable
|
|
1284
|
+
} = markerOptions;
|
|
1285
|
+
useEffect(() => {
|
|
1286
|
+
if (!map) {
|
|
1287
|
+
if (map === void 0) console.error("<Marker> has to be inside a Map component.");
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
const newMarker = new google.maps.Marker(markerOptions);
|
|
1291
|
+
newMarker.setMap(map);
|
|
1292
|
+
setMarker(newMarker);
|
|
1293
|
+
return () => {
|
|
1294
|
+
newMarker.setMap(null);
|
|
1295
|
+
setMarker(null);
|
|
1296
|
+
};
|
|
1297
|
+
}, [map]);
|
|
1298
|
+
useEffect(() => {
|
|
1299
|
+
if (!marker) return;
|
|
1300
|
+
const m = marker;
|
|
1301
|
+
const gme = google.maps.event;
|
|
1302
|
+
if (onClick) gme.addListener(m, "click", onClick);
|
|
1303
|
+
if (onDrag) gme.addListener(m, "drag", onDrag);
|
|
1304
|
+
if (onDragStart) gme.addListener(m, "dragstart", onDragStart);
|
|
1305
|
+
if (onDragEnd) gme.addListener(m, "dragend", onDragEnd);
|
|
1306
|
+
if (onMouseOver) gme.addListener(m, "mouseover", onMouseOver);
|
|
1307
|
+
if (onMouseOut) gme.addListener(m, "mouseout", onMouseOut);
|
|
1308
|
+
marker.setDraggable(Boolean(draggable));
|
|
1309
|
+
return () => {
|
|
1310
|
+
gme.clearInstanceListeners(m);
|
|
1311
|
+
};
|
|
1312
|
+
}, [marker, draggable, onClick, onDrag, onDragStart, onDragEnd, onMouseOver, onMouseOut]);
|
|
1313
|
+
useEffect(() => {
|
|
1314
|
+
if (!marker) return;
|
|
1315
|
+
if (markerOptions) marker.setOptions(markerOptions);
|
|
1316
|
+
}, [marker, markerOptions]);
|
|
1317
|
+
useEffect(() => {
|
|
1318
|
+
if (draggable || !position || !marker) return;
|
|
1319
|
+
marker.setPosition(position);
|
|
1320
|
+
}, [draggable, position, marker]);
|
|
1321
|
+
return marker;
|
|
1322
|
+
}
|
|
1323
|
+
forwardRef((props, ref) => {
|
|
1324
|
+
const marker = useMarker(props);
|
|
1325
|
+
useImperativeHandle(ref, () => marker, [marker]);
|
|
1326
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
|
1327
|
+
});
|
|
1328
|
+
const title = "title__jE00O";
|
|
1329
|
+
const description = "description__bjRoW";
|
|
1330
|
+
const link = "link__AM1ap";
|
|
1331
|
+
const pinIcon = "pinIcon__PgsnW";
|
|
1332
|
+
const srOnly = "srOnly__BD6KL";
|
|
1333
|
+
const styles = {
|
|
1334
|
+
title,
|
|
1335
|
+
description,
|
|
1336
|
+
link,
|
|
1337
|
+
pinIcon,
|
|
1338
|
+
srOnly
|
|
1339
|
+
};
|
|
1340
|
+
const getGoogleMapsDirectionsUrl = (location) => {
|
|
1341
|
+
if (!location || !location.address) {
|
|
1342
|
+
return void 0;
|
|
1343
|
+
}
|
|
1344
|
+
const url = new URL(GOOGLE_MAPS_DIRECTIONS_BASE_URL);
|
|
1345
|
+
url.searchParams.set("api", "1");
|
|
1346
|
+
url.searchParams.set("destination", location.address);
|
|
1347
|
+
return url.toString();
|
|
1348
|
+
};
|
|
1349
|
+
const getLinkInfo = (location) => {
|
|
1350
|
+
const link2 = location == null ? void 0 : location.locationLinkAttributes;
|
|
1351
|
+
const isLinkValid = link2 && typeof link2 === "object" && "href" in link2 && typeof link2.href === "string" && link2.href;
|
|
1352
|
+
const anchorProps = isLinkValid ? {
|
|
1353
|
+
href: link2.href,
|
|
1354
|
+
..."target" in link2 && typeof link2.target === "string" && link2.target ? { target: link2.target } : {},
|
|
1355
|
+
..."rel" in link2 && typeof link2.rel === "string" && link2.rel ? { rel: link2.rel } : {}
|
|
1356
|
+
} : {};
|
|
1357
|
+
return {
|
|
1358
|
+
isLinkValid: Boolean(isLinkValid),
|
|
1359
|
+
anchorProps
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
const isValidLocationParam = (loc) => {
|
|
1363
|
+
if (loc === 0) {
|
|
1364
|
+
return true;
|
|
1365
|
+
}
|
|
1366
|
+
return !!loc;
|
|
1367
|
+
};
|
|
1368
|
+
const isValidZoom = (zoom) => {
|
|
1369
|
+
return zoom !== void 0 && zoom !== null && zoom >= MIN_ZOOM && zoom <= MAX_ZOOM;
|
|
1370
|
+
};
|
|
1371
|
+
function hasMarkerInfoWindowFields(location, mapData) {
|
|
1372
|
+
return Boolean(
|
|
1373
|
+
location.title || location.description || location.linkTitle || location.locationLinkAttributes || mapData.showDirectionsLink
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
const GoogleMapMarker = ({
|
|
1377
|
+
location,
|
|
1378
|
+
infoWindowOpen,
|
|
1379
|
+
onMarkerClick,
|
|
1380
|
+
onInfoWindowClose,
|
|
1381
|
+
showDirectionLink,
|
|
1382
|
+
allyTargetBlankDescription
|
|
1383
|
+
}) => {
|
|
1384
|
+
var _a;
|
|
1385
|
+
const directionsUrl = getGoogleMapsDirectionsUrl(location);
|
|
1386
|
+
const { isLinkValid, anchorProps } = getLinkInfo(location);
|
|
1387
|
+
const handleMarkerClick = () => {
|
|
1388
|
+
var _a2;
|
|
1389
|
+
onMarkerClick == null ? void 0 : onMarkerClick({
|
|
1390
|
+
type: "markerClicked",
|
|
1391
|
+
address: location.address,
|
|
1392
|
+
location: {
|
|
1393
|
+
latitude: location.latitude || 0,
|
|
1394
|
+
longitude: location.longitude || 0
|
|
1395
|
+
},
|
|
1396
|
+
icon: location.pinIcon || "",
|
|
1397
|
+
link: (_a2 = location.locationLinkAttributes) == null ? void 0 : _a2.href,
|
|
1398
|
+
title: location.title,
|
|
1399
|
+
linkTitle: location.linkTitle,
|
|
1400
|
+
description: location.description
|
|
1401
|
+
});
|
|
1402
|
+
};
|
|
1403
|
+
if (!location || !isValidLocationParam(location.longitude) || !isValidLocationParam(location.latitude)) {
|
|
1404
|
+
return null;
|
|
1405
|
+
}
|
|
1406
|
+
const position = {
|
|
1407
|
+
lat: Number(location.latitude),
|
|
1408
|
+
lng: Number(location.longitude)
|
|
1409
|
+
};
|
|
1410
|
+
const iconSvg = location.pinIcon && /* @__PURE__ */ jsx(
|
|
1411
|
+
"div",
|
|
1412
|
+
{
|
|
1413
|
+
"aria-hidden": true,
|
|
1414
|
+
"data-testid": TestIds.markerSvg,
|
|
1415
|
+
className: styles.pinIcon,
|
|
1416
|
+
children: parse(location.pinIcon)
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
const infoWindowContent = /* @__PURE__ */ jsxs("div", { children: [
|
|
1420
|
+
location.description && /* @__PURE__ */ jsx("p", { className: styles.description, children: location.description }),
|
|
1421
|
+
location.linkTitle && isLinkValid && /* @__PURE__ */ jsxs(
|
|
1422
|
+
"a",
|
|
1423
|
+
{
|
|
1424
|
+
className: styles.link,
|
|
1425
|
+
...anchorProps,
|
|
1426
|
+
"data-testid": TestIds.markerLink,
|
|
1427
|
+
children: [
|
|
1428
|
+
location.linkTitle,
|
|
1429
|
+
((_a = location.locationLinkAttributes) == null ? void 0 : _a.target) === "_blank" && allyTargetBlankDescription && /* @__PURE__ */ jsx("span", { className: styles.srOnly, children: allyTargetBlankDescription })
|
|
1430
|
+
]
|
|
1431
|
+
}
|
|
1432
|
+
),
|
|
1433
|
+
showDirectionLink && directionsUrl && /* @__PURE__ */ jsx(
|
|
1434
|
+
"a",
|
|
1435
|
+
{
|
|
1436
|
+
href: directionsUrl,
|
|
1437
|
+
target: "_blank",
|
|
1438
|
+
rel: "noopener noreferrer",
|
|
1439
|
+
className: styles.link,
|
|
1440
|
+
"data-testid": TestIds.markerDirectionsLink,
|
|
1441
|
+
"aria-label": `${location.directionTitle}. ${allyTargetBlankDescription}`,
|
|
1442
|
+
children: location.directionTitle
|
|
1443
|
+
}
|
|
1444
|
+
)
|
|
1445
|
+
] });
|
|
1446
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1447
|
+
/* @__PURE__ */ jsx(
|
|
1448
|
+
AdvancedMarker,
|
|
1449
|
+
{
|
|
1450
|
+
position,
|
|
1451
|
+
title: location.title,
|
|
1452
|
+
onClick: handleMarkerClick,
|
|
1453
|
+
children: iconSvg
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
infoWindowOpen && /* @__PURE__ */ jsx(
|
|
1457
|
+
InfoWindow,
|
|
1458
|
+
{
|
|
1459
|
+
position,
|
|
1460
|
+
pixelOffset: [0, -32],
|
|
1461
|
+
shouldFocus: false,
|
|
1462
|
+
maxWidth: 300,
|
|
1463
|
+
minWidth: 228,
|
|
1464
|
+
headerContent: location.title && /* @__PURE__ */ jsx("h2", { className: styles.title, children: location.title }),
|
|
1465
|
+
onCloseClick: onInfoWindowClose,
|
|
1466
|
+
disableAutoPan: true,
|
|
1467
|
+
children: infoWindowContent
|
|
1468
|
+
}
|
|
1469
|
+
)
|
|
1470
|
+
] });
|
|
1471
|
+
};
|
|
1472
|
+
const GoogleMapMarker$1 = React.memo(GoogleMapMarker);
|
|
1473
|
+
const createSdkMethods = (mapRef, updateZoom, updateCenter) => {
|
|
1474
|
+
return {
|
|
1475
|
+
setMapCenter: (longitude, latitude) => {
|
|
1476
|
+
const center = { lat: latitude, lng: longitude };
|
|
1477
|
+
if (mapRef.current && center) {
|
|
1478
|
+
mapRef.current.setCenter(center);
|
|
1479
|
+
updateCenter(center);
|
|
1480
|
+
}
|
|
1481
|
+
return Promise.resolve();
|
|
1482
|
+
},
|
|
1483
|
+
setMapZoom: (zoom) => {
|
|
1484
|
+
if (mapRef.current && isValidZoom(zoom)) {
|
|
1485
|
+
mapRef.current.setZoom(zoom);
|
|
1486
|
+
updateZoom(zoom);
|
|
1487
|
+
}
|
|
1488
|
+
return Promise.resolve();
|
|
1489
|
+
},
|
|
1490
|
+
fitBounds: (bounds) => {
|
|
1491
|
+
if (mapRef.current) {
|
|
1492
|
+
const googleBounds = new google.maps.LatLngBounds(
|
|
1493
|
+
{ lat: bounds.south, lng: bounds.west },
|
|
1494
|
+
{ lat: bounds.north, lng: bounds.east }
|
|
1495
|
+
);
|
|
1496
|
+
mapRef.current.fitBounds(googleBounds);
|
|
1497
|
+
const center = mapRef.current.getCenter();
|
|
1498
|
+
const zoom = mapRef.current.getZoom();
|
|
1499
|
+
if (center && isValidZoom(zoom)) {
|
|
1500
|
+
updateZoom(zoom);
|
|
1501
|
+
updateCenter({ lat: center.lat(), lng: center.lng() });
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
return Promise.resolve();
|
|
1505
|
+
},
|
|
1506
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1507
|
+
setMarkers: (_locations) => {
|
|
1508
|
+
return Promise.resolve();
|
|
1509
|
+
},
|
|
1510
|
+
getVisibleMarkers: (locations) => {
|
|
1511
|
+
if (mapRef.current) {
|
|
1512
|
+
const bounds = mapRef.current.getBounds();
|
|
1513
|
+
if (bounds) {
|
|
1514
|
+
const visibleMarkers = locations.filter((marker) => {
|
|
1515
|
+
const position = new google.maps.LatLng(
|
|
1516
|
+
marker.latitude,
|
|
1517
|
+
marker.longitude
|
|
1518
|
+
);
|
|
1519
|
+
return bounds.contains(position);
|
|
1520
|
+
}).map((marker) => ({
|
|
1521
|
+
title: marker.title,
|
|
1522
|
+
location: {
|
|
1523
|
+
latitude: marker.latitude,
|
|
1524
|
+
longitude: marker.longitude
|
|
1525
|
+
}
|
|
1526
|
+
}));
|
|
1527
|
+
return Promise.resolve(visibleMarkers);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
return Promise.resolve(
|
|
1531
|
+
locations.map((loc) => ({
|
|
1532
|
+
title: loc.title,
|
|
1533
|
+
location: {
|
|
1534
|
+
latitude: loc.latitude,
|
|
1535
|
+
longitude: loc.longitude
|
|
1536
|
+
}
|
|
1537
|
+
}))
|
|
1538
|
+
);
|
|
1539
|
+
},
|
|
1540
|
+
setMarkerIcon: (_updateData) => {
|
|
1541
|
+
return Promise.resolve();
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1544
|
+
};
|
|
1545
|
+
const createImperativeMethods = (mapRef, updateZoom, updateCenter, locations) => {
|
|
1546
|
+
const sdkMethods = createSdkMethods(mapRef, updateZoom, updateCenter);
|
|
1547
|
+
return {
|
|
1548
|
+
setMapCenter: (longitude, latitude) => {
|
|
1549
|
+
return sdkMethods.setMapCenter(longitude, latitude);
|
|
1550
|
+
},
|
|
1551
|
+
setMapZoom: (zoom) => {
|
|
1552
|
+
return sdkMethods.setMapZoom(zoom);
|
|
1553
|
+
},
|
|
1554
|
+
fitBounds: (bounds) => {
|
|
1555
|
+
return sdkMethods.fitBounds(bounds);
|
|
1556
|
+
},
|
|
1557
|
+
setMarkers: (newLocations) => {
|
|
1558
|
+
return sdkMethods.setMarkers(newLocations);
|
|
1559
|
+
},
|
|
1560
|
+
setMarkerIcon: (updateData) => {
|
|
1561
|
+
return sdkMethods.setMarkerIcon(updateData);
|
|
1562
|
+
},
|
|
1563
|
+
getVisibleMarkers: () => {
|
|
1564
|
+
return sdkMethods.getVisibleMarkers(locations);
|
|
1565
|
+
},
|
|
1566
|
+
getCenter: () => {
|
|
1567
|
+
if (mapRef.current && mapRef.current.getCenter) {
|
|
1568
|
+
const center = mapRef.current.getCenter();
|
|
1569
|
+
if (center) {
|
|
1570
|
+
return {
|
|
1571
|
+
lat: () => center.lat(),
|
|
1572
|
+
lng: () => center.lng()
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
return {
|
|
1577
|
+
lat: () => 0,
|
|
1578
|
+
lng: () => 0
|
|
1579
|
+
};
|
|
1580
|
+
},
|
|
1581
|
+
getZoom: () => {
|
|
1582
|
+
if (mapRef.current && mapRef.current.getZoom) {
|
|
1583
|
+
const zoom = mapRef.current.getZoom();
|
|
1584
|
+
return zoom !== void 0 ? zoom : DEFAULT_ZOOM;
|
|
1585
|
+
}
|
|
1586
|
+
return DEFAULT_ZOOM;
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
const GoogleMapReactInner = forwardRef((props, forwardedRef) => {
|
|
1591
|
+
const {
|
|
1592
|
+
id,
|
|
1593
|
+
mapData,
|
|
1594
|
+
translations,
|
|
1595
|
+
onUpdateCenter,
|
|
1596
|
+
onUpdateZoom,
|
|
1597
|
+
onMarkerClicked,
|
|
1598
|
+
onMapClicked,
|
|
1599
|
+
onMapMount
|
|
1600
|
+
} = props;
|
|
1601
|
+
const map = useMap();
|
|
1602
|
+
const mapRef = useRef(map);
|
|
1603
|
+
useEffect(() => {
|
|
1604
|
+
mapRef.current = map;
|
|
1605
|
+
}, [map]);
|
|
1606
|
+
const defaultZoom = useMemo(() => {
|
|
1607
|
+
return isValidZoom(mapData.zoom) && mapData.zoom || DEFAULT_ZOOM;
|
|
1608
|
+
}, [mapData.zoom]);
|
|
1609
|
+
useEffect(() => map == null ? void 0 : map.setZoom(defaultZoom), [defaultZoom, map]);
|
|
1610
|
+
const defaultLocationIndex = useMemo(() => {
|
|
1611
|
+
if (mapData.defaultLocation >= 0 && mapData.locations && mapData.defaultLocation < mapData.locations.length) {
|
|
1612
|
+
return mapData.defaultLocation;
|
|
1613
|
+
}
|
|
1614
|
+
return 0;
|
|
1615
|
+
}, [mapData.locations, mapData.defaultLocation]);
|
|
1616
|
+
const defaultCenter = useMemo(() => {
|
|
1617
|
+
if (!mapData.locations || mapData.locations.length === 0) {
|
|
1618
|
+
return { lat: 0, lng: 0 };
|
|
1619
|
+
}
|
|
1620
|
+
const location = mapData.locations[defaultLocationIndex];
|
|
1621
|
+
return {
|
|
1622
|
+
lat: (location == null ? void 0 : location.latitude) ?? 0,
|
|
1623
|
+
lng: (location == null ? void 0 : location.longitude) ?? 0
|
|
1624
|
+
};
|
|
1625
|
+
}, [mapData.locations, defaultLocationIndex]);
|
|
1626
|
+
useEffect(() => map == null ? void 0 : map.setCenter(defaultCenter), [defaultCenter, map]);
|
|
1627
|
+
const [openInfoWindowIndex, setOpenInfoWindowIndex] = useState(
|
|
1628
|
+
defaultLocationIndex
|
|
1629
|
+
);
|
|
1630
|
+
useEffect(
|
|
1631
|
+
() => setOpenInfoWindowIndex(defaultLocationIndex),
|
|
1632
|
+
[defaultLocationIndex]
|
|
1633
|
+
);
|
|
1634
|
+
const handleZoomChange = useCallback(
|
|
1635
|
+
(zoom) => {
|
|
1636
|
+
if (isValidZoom(zoom)) {
|
|
1637
|
+
onUpdateZoom == null ? void 0 : onUpdateZoom({ zoom });
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
[onUpdateZoom]
|
|
1641
|
+
);
|
|
1642
|
+
const handleCenterChanged = useCallback(
|
|
1643
|
+
(center) => {
|
|
1644
|
+
if (center) {
|
|
1645
|
+
onUpdateCenter == null ? void 0 : onUpdateCenter({ latitude: center.lat, longitude: center.lng });
|
|
1646
|
+
}
|
|
1647
|
+
},
|
|
1648
|
+
[onUpdateCenter]
|
|
1649
|
+
);
|
|
1650
|
+
const handleMapClick = useCallback(
|
|
1651
|
+
(event) => {
|
|
1652
|
+
try {
|
|
1653
|
+
if (onMapClicked && event.detail.latLng) {
|
|
1654
|
+
onMapClicked({
|
|
1655
|
+
type: "mapClicked",
|
|
1656
|
+
location: {
|
|
1657
|
+
latitude: event.detail.latLng.lat,
|
|
1658
|
+
longitude: event.detail.latLng.lng
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
} catch (error) {
|
|
1663
|
+
console.error("GoogleMap: Click handler error", {
|
|
1664
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1665
|
+
componentId: id
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
[onMapClicked, id]
|
|
1670
|
+
);
|
|
1671
|
+
const handleMarkerClicked = (index) => (data) => {
|
|
1672
|
+
setOpenInfoWindowIndex(openInfoWindowIndex === index ? null : index);
|
|
1673
|
+
onMarkerClicked == null ? void 0 : onMarkerClicked(data);
|
|
1674
|
+
};
|
|
1675
|
+
useImperativeHandle(
|
|
1676
|
+
forwardedRef,
|
|
1677
|
+
() => createImperativeMethods(
|
|
1678
|
+
mapRef,
|
|
1679
|
+
handleZoomChange,
|
|
1680
|
+
handleCenterChanged,
|
|
1681
|
+
mapData.locations
|
|
1682
|
+
),
|
|
1683
|
+
[handleZoomChange, handleCenterChanged, mapData.locations]
|
|
1684
|
+
);
|
|
1685
|
+
useEffect(() => {
|
|
1686
|
+
onMapMount == null ? void 0 : onMapMount();
|
|
1687
|
+
}, [onMapMount]);
|
|
1688
|
+
const mapStyleConfig = useMemo(() => {
|
|
1689
|
+
const styleKey = mapData.mapStyleKey;
|
|
1690
|
+
return {
|
|
1691
|
+
mapId: MAP_IDS[styleKey] || MAP_IDS.CLASSIC,
|
|
1692
|
+
mapTypeId: (MAP_TYPES[styleKey] || MAP_TYPES.CLASSIC).toLowerCase()
|
|
1693
|
+
};
|
|
1694
|
+
}, [mapData.mapStyleKey]);
|
|
1695
|
+
const mapProps = useMemo(
|
|
1696
|
+
() => ({
|
|
1697
|
+
fullscreenControl: false,
|
|
1698
|
+
clickableIcons: true,
|
|
1699
|
+
keyboardShortcuts: true,
|
|
1700
|
+
disableDoubleClickZoom: false,
|
|
1701
|
+
disableDefaultUI: true,
|
|
1702
|
+
gestureHandling: mapData.mapInteractive ? "auto" : "none",
|
|
1703
|
+
mapTypeControl: mapData.showMapType,
|
|
1704
|
+
zoomControl: mapData.showZoom,
|
|
1705
|
+
streetViewControl: mapData.showStreetView,
|
|
1706
|
+
rotateControl: false
|
|
1707
|
+
}),
|
|
1708
|
+
[
|
|
1709
|
+
mapData.mapInteractive,
|
|
1710
|
+
mapData.showMapType,
|
|
1711
|
+
mapData.showZoom,
|
|
1712
|
+
mapData.showStreetView
|
|
1713
|
+
]
|
|
1714
|
+
);
|
|
1715
|
+
return /* @__PURE__ */ jsx(
|
|
1716
|
+
Map,
|
|
1717
|
+
{
|
|
1718
|
+
onCenterChanged: (e) => handleCenterChanged(e.detail.center),
|
|
1719
|
+
onZoomChanged: (e) => handleZoomChange(e.detail.zoom),
|
|
1720
|
+
onClick: handleMapClick,
|
|
1721
|
+
style: { width: "100%", height: "100%" },
|
|
1722
|
+
defaultCenter,
|
|
1723
|
+
defaultZoom,
|
|
1724
|
+
reuseMaps: true,
|
|
1725
|
+
...mapProps,
|
|
1726
|
+
...mapStyleConfig,
|
|
1727
|
+
children: mapData.locations.map((location, index) => /* @__PURE__ */ jsx(
|
|
1728
|
+
GoogleMapMarker$1,
|
|
1729
|
+
{
|
|
1730
|
+
location,
|
|
1731
|
+
infoWindowOpen: openInfoWindowIndex === index && hasMarkerInfoWindowFields(location, mapData),
|
|
1732
|
+
onMarkerClick: handleMarkerClicked(index),
|
|
1733
|
+
onInfoWindowClose: () => setOpenInfoWindowIndex(null),
|
|
1734
|
+
showDirectionLink: mapData.showDirectionsLink,
|
|
1735
|
+
allyTargetBlankDescription: translations.allyTargetBlankDescription
|
|
1736
|
+
},
|
|
1737
|
+
`${index}-${location.latitude}-${location.longitude}`
|
|
1738
|
+
))
|
|
1739
|
+
}
|
|
1740
|
+
);
|
|
1741
|
+
});
|
|
1742
|
+
const GoogleMapReactInteractiveMap = forwardRef((props, forwardedRef) => {
|
|
1743
|
+
return /* @__PURE__ */ jsx(APIProvider, { apiKey: API_KEY, language: props.language, children: /* @__PURE__ */ jsx(GoogleMapReactInner, { ...props, ref: forwardedRef }) });
|
|
1744
|
+
});
|
|
1745
|
+
const GoogleMapReactInteractiveMap$1 = memo(GoogleMapReactInteractiveMap);
|
|
1746
|
+
const DEFAULT_TRANSLATIONS = {};
|
|
1747
|
+
const useCookieConsent = (options) => {
|
|
1748
|
+
const {
|
|
1749
|
+
config,
|
|
1750
|
+
isConsentPolicyActive = false,
|
|
1751
|
+
isMobile = false,
|
|
1752
|
+
consentPolicy,
|
|
1753
|
+
openSettingModal,
|
|
1754
|
+
translations = DEFAULT_TRANSLATIONS
|
|
1755
|
+
} = options;
|
|
1756
|
+
return useMemo(() => {
|
|
1757
|
+
const requiredConsentTypes = Object.keys(config.requiredConsent || {});
|
|
1758
|
+
const hasRequiredConsent = (() => {
|
|
1759
|
+
if (!isConsentPolicyActive) {
|
|
1760
|
+
return true;
|
|
1761
|
+
}
|
|
1762
|
+
if (requiredConsentTypes.length === 0) {
|
|
1763
|
+
return true;
|
|
1764
|
+
}
|
|
1765
|
+
if (!(consentPolicy == null ? void 0 : consentPolicy.policy)) {
|
|
1766
|
+
return false;
|
|
1767
|
+
}
|
|
1768
|
+
return requiredConsentTypes.every((consentType) => {
|
|
1769
|
+
const policyKey = consentType;
|
|
1770
|
+
return consentPolicy.policy[policyKey] === true;
|
|
1771
|
+
});
|
|
1772
|
+
})();
|
|
1773
|
+
return {
|
|
1774
|
+
isConsentPolicyActive,
|
|
1775
|
+
isMobile,
|
|
1776
|
+
consentPolicy,
|
|
1777
|
+
openSettingModal,
|
|
1778
|
+
translations,
|
|
1779
|
+
hasRequiredConsent,
|
|
1780
|
+
requiredConsentTypes,
|
|
1781
|
+
componentConsentPolicy: config.requiredConsent ?? {}
|
|
1782
|
+
};
|
|
1783
|
+
}, [
|
|
1784
|
+
config,
|
|
1785
|
+
isConsentPolicyActive,
|
|
1786
|
+
isMobile,
|
|
1787
|
+
consentPolicy,
|
|
1788
|
+
openSettingModal,
|
|
1789
|
+
translations
|
|
1790
|
+
]);
|
|
1791
|
+
};
|
|
1792
|
+
const defaultManifestProps = {
|
|
1793
|
+
locations: [DEFAULT_LOCATION],
|
|
1794
|
+
defaultLocation: 0,
|
|
1795
|
+
showDirectionsLink: true,
|
|
1796
|
+
showMapType: false,
|
|
1797
|
+
showZoom: true,
|
|
1798
|
+
showStreetView: false,
|
|
1799
|
+
mapInteractive: true,
|
|
1800
|
+
zoom: 14,
|
|
1801
|
+
mapStyleKey: "CLASSIC"
|
|
1802
|
+
};
|
|
1803
|
+
const defaultPinIcon = '<!--?xml version="1.0" encoding="UTF-8"?--><svg data-bbox="1.6 0 20.7 34" viewBox="0 0 24 34" height="34" width="24" xmlns="http://www.w3.org/2000/svg" data-type="color"><g><path d="M11.9 33.4c-.2 0-.5 0-.6-.2l-.2-.2c-.5-.4-.6-.9-.9-2.2-1-4.2-2.1-6.7-3.1-9-.7-1.4-1.4-2.6-2.1-3.7-1.7-2.8-2.8-4.7-2.8-8 0-2.3.9-4.7 2.5-6.5 1.9-1.8 4.6-3 7.2-3h.2c2.7 0 5.4 1.3 7.3 3.3 1.6 1.7 2.6 4.2 2.5 6.5 0 3.3-1.1 5.1-2.8 7.9-.6 1.1-1.3 2.3-2.1 3.8-.9 2.2-2 4.7-3 8.9-.3 1.3-.4 2-1.3 2.3h-.3c-.1.1-.2.2-.3.2Z" fill="#ff4646" data-color="1"></path><path d="M11.9 1.1h.2c2.5 0 5.1 1.2 6.9 3.2 1.5 1.6 2.4 3.9 2.4 6.1 0 3.1-1.1 4.9-2.7 7.7-.6 1.1-1.4 2.3-2.2 3.8-1 2.2-2 4.8-3.1 9-.3 1.2-.4 1.7-1 1.9h-.3c0 .1-.1.1-.2.1s-.2 0-.3-.1l-.2-.2c-.4-.3-.4-.6-.7-1.9-1-4.2-2.1-6.8-3.1-9.1-.8-1.5-1.5-2.7-2.1-3.7-1.6-2.8-2.7-4.6-2.7-7.7 0-2.2.9-4.5 2.4-6.1C7 2.2 9.5 1 12 1m-.1-1C9.1 0 6.3 1.4 4.3 3.5c-1.7 1.8-2.7 4.4-2.7 6.8 0 3.4 1.2 5.4 2.9 8.2.6 1 1.3 2.2 2.1 3.7 1 2.2 2 4.7 3 8.9.3 1.3.4 1.9 1.1 2.4l.2.2q.45.3.9.3h.8c1.1-.5 1.4-1.4 1.7-2.7 1-4.1 2.1-6.6 3-8.8.8-1.5 1.5-2.7 2.1-3.8 1.6-2.8 2.8-4.8 2.9-8.2 0-2.4-1-5-2.7-6.8C17.7 1.5 14.8.1 12 0h-.2Z" fill="#ffffff" data-color="2"></path><path fill="#590000" d="M15.2 10.4a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0" data-color="3"></path></g></svg>';
|
|
1804
|
+
const directionTitle = "Directions";
|
|
1805
|
+
const useGoogleMapProps = (props) => {
|
|
1806
|
+
const consentPolicyProps = useConsentPolicyProps();
|
|
1807
|
+
const cookieConsent = useCookieConsent({
|
|
1808
|
+
config: {
|
|
1809
|
+
componentNameKey: COMPONENT_NAME_KEY,
|
|
1810
|
+
componentNameDefault: COMPONENT_NAME_DEFAULT,
|
|
1811
|
+
companyNameKey: COMPANY_NAME_KEY,
|
|
1812
|
+
companyNameDefault: COMPANY_NAME_DEFAULT,
|
|
1813
|
+
requiredConsent: { analytics: true, functional: true }
|
|
1814
|
+
},
|
|
1815
|
+
isConsentPolicyActive: consentPolicyProps.isConsentPolicyActive,
|
|
1816
|
+
consentPolicy: consentPolicyProps.consentPolicy,
|
|
1817
|
+
isMobile: consentPolicyProps.isMobile,
|
|
1818
|
+
openSettingModal: consentPolicyProps.openSettingModal,
|
|
1819
|
+
translations: consentPolicyProps.translations
|
|
1820
|
+
});
|
|
1821
|
+
const mapData = useMemo(() => {
|
|
1822
|
+
const locations = [
|
|
1823
|
+
...props.locations && props.locations.length ? props.locations : defaultManifestProps.locations
|
|
1824
|
+
].map((location) => {
|
|
1825
|
+
var _a;
|
|
1826
|
+
return {
|
|
1827
|
+
...location,
|
|
1828
|
+
pinIcon: ((_a = props.pinIcon) == null ? void 0 : _a.svgContent) || defaultPinIcon,
|
|
1829
|
+
directionTitle
|
|
1830
|
+
};
|
|
1831
|
+
});
|
|
1832
|
+
return {
|
|
1833
|
+
locations,
|
|
1834
|
+
showDirectionsLink: props.showDirectionsLink ?? defaultManifestProps.showDirectionsLink,
|
|
1835
|
+
showMapType: props.showMapType ?? defaultManifestProps.showMapType,
|
|
1836
|
+
showZoom: props.showZoom ?? defaultManifestProps.showZoom,
|
|
1837
|
+
showStreetView: props.showStreetView ?? defaultManifestProps.showStreetView,
|
|
1838
|
+
mapInteractive: props.mapInteractive ?? defaultManifestProps.mapInteractive,
|
|
1839
|
+
zoom: props.zoom ?? defaultManifestProps.zoom,
|
|
1840
|
+
mapStyleKey: props.mapStyleKey ?? defaultManifestProps.mapStyleKey,
|
|
1841
|
+
defaultLocation: props.defaultLocation ?? defaultManifestProps.defaultLocation
|
|
1842
|
+
};
|
|
1843
|
+
}, [
|
|
1844
|
+
props.locations,
|
|
1845
|
+
props.showDirectionsLink,
|
|
1846
|
+
props.showMapType,
|
|
1847
|
+
props.showZoom,
|
|
1848
|
+
props.showStreetView,
|
|
1849
|
+
props.mapInteractive,
|
|
1850
|
+
props.zoom,
|
|
1851
|
+
props.pinIcon,
|
|
1852
|
+
props.mapStyleKey,
|
|
1853
|
+
props.defaultLocation
|
|
1854
|
+
]);
|
|
1855
|
+
const componentProps = useMemo(() => {
|
|
1856
|
+
return {
|
|
1857
|
+
skin: "GoogleMapDefault",
|
|
1858
|
+
id: props.id,
|
|
1859
|
+
className: `${props.className || ""} google-map`,
|
|
1860
|
+
customClassNames: [],
|
|
1861
|
+
translations: {
|
|
1862
|
+
title: "Google Map",
|
|
1863
|
+
allyTargetBlankDescription: "Opens in a new tab",
|
|
1864
|
+
...cookieConsent.translations
|
|
1865
|
+
},
|
|
1866
|
+
language: "en",
|
|
1867
|
+
lang: "en",
|
|
1868
|
+
onMouseEnter: props.onMouseIn,
|
|
1869
|
+
onMouseLeave: props.onMouseOut,
|
|
1870
|
+
isConsentPolicyActive: cookieConsent.isConsentPolicyActive,
|
|
1871
|
+
isMobile: cookieConsent.isMobile,
|
|
1872
|
+
consentPolicy: cookieConsent.consentPolicy,
|
|
1873
|
+
openSettingModal: cookieConsent.openSettingModal,
|
|
1874
|
+
hasRequiredConsent: cookieConsent.hasRequiredConsent,
|
|
1875
|
+
componentConsentPolicy: cookieConsent.componentConsentPolicy
|
|
1876
|
+
};
|
|
1877
|
+
}, [
|
|
1878
|
+
props.id,
|
|
1879
|
+
props.className,
|
|
1880
|
+
props.onMouseIn,
|
|
1881
|
+
props.onMouseOut,
|
|
1882
|
+
cookieConsent.hasRequiredConsent,
|
|
1883
|
+
cookieConsent.isConsentPolicyActive,
|
|
1884
|
+
cookieConsent.consentPolicy,
|
|
1885
|
+
cookieConsent.componentConsentPolicy,
|
|
1886
|
+
cookieConsent.translations,
|
|
1887
|
+
cookieConsent.isMobile,
|
|
1888
|
+
cookieConsent.openSettingModal
|
|
1889
|
+
]);
|
|
1890
|
+
return { componentProps, mapData };
|
|
1891
|
+
};
|
|
1892
|
+
const MapContent = forwardRef((props, forwardedRef) => {
|
|
1893
|
+
var _a;
|
|
1894
|
+
const environment = useService(definitionExports.EnvironmentDefinition);
|
|
1895
|
+
const isSSR = ((_a = environment == null ? void 0 : environment.isSSR) == null ? void 0 : _a.call(environment)) ?? false;
|
|
1896
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fragment, {}), children: !isSSR && /* @__PURE__ */ jsx(GoogleMapReactInteractiveMap$1, { ...props, ref: forwardedRef }) });
|
|
1897
|
+
});
|
|
1898
|
+
function GoogleMapComponent(props) {
|
|
1899
|
+
const { componentProps, mapData } = useGoogleMapProps(props);
|
|
1900
|
+
const googleMapElement = /* @__PURE__ */ jsx(
|
|
1901
|
+
GoogleMapReact,
|
|
1902
|
+
{
|
|
1903
|
+
...componentProps,
|
|
1904
|
+
mapData,
|
|
1905
|
+
MapContent
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
if (componentProps.isConsentPolicyActive && !componentProps.hasRequiredConsent) {
|
|
1909
|
+
return /* @__PURE__ */ jsx(
|
|
1910
|
+
ConsentPolicyWrapper,
|
|
1911
|
+
{
|
|
1912
|
+
...componentProps,
|
|
1913
|
+
className: clsx(
|
|
1914
|
+
componentProps.className,
|
|
1915
|
+
"google-map-consent-wrapper"
|
|
1916
|
+
),
|
|
1917
|
+
children: googleMapElement
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1920
|
+
}
|
|
1921
|
+
return googleMapElement;
|
|
1922
|
+
}
|
|
1923
|
+
export {
|
|
1924
|
+
GoogleMapComponent as default
|
|
1925
|
+
};
|