@janiscommerce/ui-web 1.2.0 → 1.3.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/CHANGELOG.md +6 -0
- package/dist/index.esm.js +16 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +16 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.0] - 2025-10-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Map/InfoWindow: support `markerOptions.infoWindowOptions.position { x, y }` to set pixelOffset
|
|
15
|
+
|
|
10
16
|
## [1.2.0] - 2025-10-16
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/dist/index.esm.js
CHANGED
|
@@ -15926,11 +15926,21 @@ var styled$2 = {
|
|
|
15926
15926
|
};
|
|
15927
15927
|
|
|
15928
15928
|
var InfoWindow = function InfoWindow(_ref) {
|
|
15929
|
-
var
|
|
15930
|
-
|
|
15929
|
+
var data = _ref.data,
|
|
15930
|
+
_ref$infoWindowOption = _ref.infoWindowOptions,
|
|
15931
|
+
infoWindowOptions = _ref$infoWindowOption === void 0 ? {} : _ref$infoWindowOption,
|
|
15932
|
+
infoWindowHandles = _ref.infoWindowHandles,
|
|
15931
15933
|
children = _ref.children;
|
|
15934
|
+
var _infoWindowOptions$in = infoWindowOptions.infoWindowPosition,
|
|
15935
|
+
infoWindowPosition = _infoWindowOptions$in === void 0 ? {} : _infoWindowOptions$in;
|
|
15936
|
+
var pixelOffset = useMemo(function () {
|
|
15937
|
+
return new window.google.maps.Size(isNumber(infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x) ? infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x : 0, isNumber(infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y) ? infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y : -35);
|
|
15938
|
+
}, [infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x, infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y]);
|
|
15932
15939
|
return /*#__PURE__*/React__default.createElement(InfoWindow$1, {
|
|
15933
|
-
position: data
|
|
15940
|
+
position: data,
|
|
15941
|
+
options: {
|
|
15942
|
+
pixelOffset: pixelOffset
|
|
15943
|
+
}
|
|
15934
15944
|
}, /*#__PURE__*/React__default.createElement(styled$2.Content, _extends$1({
|
|
15935
15945
|
className: "google-map-component__info-window--content"
|
|
15936
15946
|
}, infoWindowHandles), children));
|
|
@@ -15989,6 +15999,8 @@ var Marker = function Marker(_ref) {
|
|
|
15989
15999
|
infoWindowOpen = _ref2.infoWindowOpen;
|
|
15990
16000
|
|
|
15991
16001
|
var infoWindowContent = markerOptions.infoWindowContent,
|
|
16002
|
+
_markerOptions$infoWi = markerOptions.infoWindowOptions,
|
|
16003
|
+
infoWindowOptions = _markerOptions$infoWi === void 0 ? {} : _markerOptions$infoWi,
|
|
15992
16004
|
_markerOptions$onLoad = markerOptions.onLoad,
|
|
15993
16005
|
_onLoad = _markerOptions$onLoad === void 0 ? function () {} : _markerOptions$onLoad,
|
|
15994
16006
|
_markerOptions$onClic = markerOptions.onClick,
|
|
@@ -16117,6 +16129,7 @@ var Marker = function Marker(_ref) {
|
|
|
16117
16129
|
}, overlay()), infoWindowOpen && infoWindowContent && /*#__PURE__*/React__default.createElement(InfoWindow, {
|
|
16118
16130
|
className: "google-map-component__info-window",
|
|
16119
16131
|
data: position,
|
|
16132
|
+
infoWindowOptions: infoWindowOptions,
|
|
16120
16133
|
infoWindowHandles: infoWindowHandles
|
|
16121
16134
|
}, infoWindowContent(markerData)));
|
|
16122
16135
|
};
|