@janiscommerce/ui-web 1.1.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 +12 -0
- package/dist/index.esm.js +22 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +22 -5
- 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,18 @@ 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
|
+
|
|
16
|
+
## [1.2.0] - 2025-10-16
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Validations for valid values in Progress bar
|
|
21
|
+
|
|
10
22
|
## [1.1.0] - 2025-10-08
|
|
11
23
|
|
|
12
24
|
### Added
|
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
|
};
|
|
@@ -35745,7 +35758,11 @@ var styled = {
|
|
|
35745
35758
|
};
|
|
35746
35759
|
|
|
35747
35760
|
var isValidValue = function isValidValue(value) {
|
|
35748
|
-
return
|
|
35761
|
+
return isNumber(value) && value >= 0;
|
|
35762
|
+
};
|
|
35763
|
+
|
|
35764
|
+
var isValidMaxValue = function isValidMaxValue(maxValue) {
|
|
35765
|
+
return isNumber(maxValue) && maxValue > 0;
|
|
35749
35766
|
};
|
|
35750
35767
|
|
|
35751
35768
|
var ProgressBar = function ProgressBar(_ref) {
|
|
@@ -35760,7 +35777,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35760
35777
|
height = _ref$height === void 0 ? 16 : _ref$height,
|
|
35761
35778
|
_ref$color = _ref.color,
|
|
35762
35779
|
color = _ref$color === void 0 ? 'blue' : _ref$color;
|
|
35763
|
-
if (!isValidValue(value) || !
|
|
35780
|
+
if (!isValidValue(value) || !isValidMaxValue(maxValue) || value > maxValue) return null;
|
|
35764
35781
|
var progress = Math.max(0, Math.min(maxValue, value));
|
|
35765
35782
|
return /*#__PURE__*/React__default.createElement(styled.Bar, {
|
|
35766
35783
|
height: height,
|