@opengeoweb/form-fields 4.17.0 → 4.18.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/index.esm.js CHANGED
@@ -115,11 +115,17 @@ var isXHoursAfter = function isXHoursAfter(ownDate, otherDate) {
115
115
  return inHours <= hours;
116
116
  };
117
117
  var isLatitude = function isLatitude(lat) {
118
- if (!lat) return true;
118
+ if (!lat) {
119
+ return true;
120
+ }
121
+
119
122
  return isFinite(lat) && Math.abs(lat) <= 90 && regexMaxTwoDecimals.test(lat.toString());
120
123
  };
121
124
  var isLongitude = function isLongitude(lng) {
122
- if (!lng) return true;
125
+ if (!lng) {
126
+ return true;
127
+ }
128
+
123
129
  return isFinite(lng) && Math.abs(lng) <= 180 && lng >= -180 && regexMaxTwoDecimals.test(lng.toString());
124
130
  }; // Pass null if no maxValue
125
131
 
package/index.umd.js CHANGED
@@ -177,11 +177,17 @@
177
177
  return inHours <= hours;
178
178
  };
179
179
  var isLatitude = function isLatitude(lat) {
180
- if (!lat) return true;
180
+ if (!lat) {
181
+ return true;
182
+ }
183
+
181
184
  return isFinite(lat) && Math.abs(lat) <= 90 && regexMaxTwoDecimals.test(lat.toString());
182
185
  };
183
186
  var isLongitude = function isLongitude(lng) {
184
- if (!lng) return true;
187
+ if (!lng) {
188
+ return true;
189
+ }
190
+
185
191
  return isFinite(lng) && Math.abs(lng) <= 180 && lng >= -180 && regexMaxTwoDecimals.test(lng.toString());
186
192
  }; // Pass null if no maxValue
187
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/form-fields",
3
- "version": "4.17.0",
3
+ "version": "4.18.0",
4
4
  "description": "GeoWeb form-fields library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "react-hook-form": "^7.41.5",
16
16
  "react": "^18.2.0",
17
17
  "@mui/material": "^5.10.8",
18
- "@opengeoweb/theme": "4.17.0",
18
+ "@opengeoweb/theme": "4.18.0",
19
19
  "moment": "^2.29.0",
20
20
  "moment-timezone": "^0.5.31",
21
21
  "@mui/x-date-pickers": "^5.0.4",