@opengeoweb/form-fields 4.16.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)
|
|
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)
|
|
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)
|
|
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)
|
|
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
|
|
|
@@ -8,7 +8,7 @@ export declare const getFormattedValue: (value: Moment | string) => string | Mom
|
|
|
8
8
|
declare type ReactHookKeyboardDateTimePickerProps = Partial<Partial<DateTimePickerProps<DateTimePickerSlotsComponent, Moment>>> & ReactHookFormInput<{
|
|
9
9
|
defaultNullValue?: string | null;
|
|
10
10
|
value?: string;
|
|
11
|
-
onChange?: (value:
|
|
11
|
+
onChange?: (value: string | Moment) => void;
|
|
12
12
|
format?: string;
|
|
13
13
|
sx?: SxProps<Theme>;
|
|
14
14
|
}>;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SelectProps } from '@mui/material';
|
|
3
3
|
import { ReactHookFormInput } from './types';
|
|
4
4
|
declare type ReactHookFormSelectProps = Partial<SelectProps> & ReactHookFormInput<{
|
|
5
|
-
onChange?: (value:
|
|
5
|
+
onChange?: (value: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
6
|
}>;
|
|
7
7
|
declare const ReactHookFormSelect: React.FC<ReactHookFormSelectProps>;
|
|
8
8
|
export default ReactHookFormSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/form-fields",
|
|
3
|
-
"version": "4.
|
|
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.
|
|
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",
|