@wix/editor-react-components 1.2395.0 → 1.2397.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.
@@ -91,6 +91,7 @@ type GoogleMapEventHandlers = {
91
91
  onMarkerClicked?: (event: any) => void;
92
92
  onMapClicked?: (event: any) => void;
93
93
  onMapMount?: () => void;
94
+ onMapTilesLoaded?: () => void;
94
95
  };
95
96
  export type GoogleMapBaseProps = GoogleMapEventHandlers & {
96
97
  id: string;
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
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";
3
+ import React__default, { forwardRef, useState, useCallback, useMemo, useImperativeHandle, Children, useEffect, useContext, useRef, useLayoutEffect, useReducer, memo, Suspense } from "react";
4
4
  import { c as clsx } from "../chunks/clsx.js";
5
5
  import { f as formatClassNames } from "../chunks/classNames.js";
6
6
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
@@ -28,6 +28,8 @@ const GoogleMapReact = forwardRef((props, forwardedRef) => {
28
28
  onMouseLeave,
29
29
  MapContent: MapContent2
30
30
  } = props;
31
+ const [isMapReady, setIsMapReady] = useState(false);
32
+ const handleMapTilesLoaded = useCallback(() => setIsMapReady(true), []);
31
33
  const domSafeProps = {
32
34
  id,
33
35
  className: clsx(
@@ -49,8 +51,16 @@ const GoogleMapReact = forwardRef((props, forwardedRef) => {
49
51
  {
50
52
  className: style.mapContainer,
51
53
  "aria-label": translations.title,
54
+ "data-map-ready": isMapReady,
52
55
  role: "region",
53
- children: /* @__PURE__ */ jsx(MapContent2, { ...props, ref: forwardedRef })
56
+ children: /* @__PURE__ */ jsx(
57
+ MapContent2,
58
+ {
59
+ ...props,
60
+ ref: forwardedRef,
61
+ onMapTilesLoaded: handleMapTilesLoaded
62
+ }
63
+ )
54
64
  }
55
65
  )
56
66
  }
@@ -1596,7 +1606,8 @@ const GoogleMapReactInner = forwardRef((props, forwardedRef) => {
1596
1606
  onUpdateZoom,
1597
1607
  onMarkerClicked,
1598
1608
  onMapClicked,
1599
- onMapMount
1609
+ onMapMount,
1610
+ onMapTilesLoaded
1600
1611
  } = props;
1601
1612
  const map = useMap();
1602
1613
  const mapRef = useRef(map);
@@ -1717,6 +1728,7 @@ const GoogleMapReactInner = forwardRef((props, forwardedRef) => {
1717
1728
  {
1718
1729
  onCenterChanged: (e) => handleCenterChanged(e.detail.center),
1719
1730
  onZoomChanged: (e) => handleZoomChange(e.detail.zoom),
1731
+ onTilesLoaded: onMapTilesLoaded,
1720
1732
  onClick: handleMapClick,
1721
1733
  style: { width: "100%", height: "100%" },
1722
1734
  defaultCenter,
@@ -11,6 +11,7 @@ declare const GoogleMapReact: React.ForwardRefExoticComponent<{
11
11
  onMarkerClicked?: (event: any) => void;
12
12
  onMapClicked?: (event: any) => void;
13
13
  onMapMount?: () => void;
14
+ onMapTilesLoaded?: () => void;
14
15
  } & {
15
16
  id: string;
16
17
  className?: string;
@@ -11,6 +11,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
11
11
  onMarkerClicked?: (event: any) => void;
12
12
  onMapClicked?: (event: any) => void;
13
13
  onMapMount?: () => void;
14
+ onMapTilesLoaded?: () => void;
14
15
  } & {
15
16
  id: string;
16
17
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2395.0",
3
+ "version": "1.2397.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,8 +49,8 @@
49
49
  "test": "yarn prepare:manifest-tests && vitest",
50
50
  "test:watch": "yarn prepare:manifest-tests && vitest watch",
51
51
  "test:manifest": "yarn prepare:manifest-tests && vitest src/**/*manifest.spec.ts",
52
- "test:e2e": "echo 'Package must be built before running e2e tests, running build:' && yarn build:lite && sled-playwright test --config=playwright.livesite.config.ts",
53
- "test:e2e:ci": "sled-playwright test --config=playwright.livesite.config.ts",
52
+ "test:e2e": "echo 'Package must be built before running e2e tests, running build:' && yarn build:lite && sled-playwright test --remote --config=playwright.livesite.config.ts",
53
+ "test:e2e:ci": "tsx scripts/wait-for-preview-readiness.ts && sled-playwright test --config=playwright.livesite.config.ts",
54
54
  "test:detect-flakiness": "yarn build:lite && sled-playwright detect-flakiness --config=playwright.livesite.config.ts --path e2e/livesites/tests --repeat-count 20",
55
55
  "check-a11y-coverage": "a11y-check-coverage --warn-only",
56
56
  "tsc": "npx tsc -b ./tsconfig.json --force",
@@ -136,6 +136,7 @@
136
136
  "@wix/sled-playwright": "^1.328.0",
137
137
  "@wix/thunderbolt-components-native": "^1.0.0",
138
138
  "@wix/unidriver-core": "^1.5.5",
139
+ "@wix/viewer-playwright-app": "^1.0.719",
139
140
  "@wix/viewer-service-anchors": "^1.0.40",
140
141
  "@wix/viewer-service-environment": "^1.0.47",
141
142
  "@wix/viewer-service-link-utils": "^1.0.62",
@@ -195,5 +196,5 @@
195
196
  "registry": "https://registry.npmjs.org/",
196
197
  "access": "public"
197
198
  },
198
- "falconPackageHash": "34ec871685d34e0fe47abf49f3c6329480f4e28d6aa7fb84b92c081c"
199
+ "falconPackageHash": "33d6ee554420a8a376e21ec3878fe97d2f2886f8c8696a809fccc050"
199
200
  }