@opengeoweb/form-fields 9.36.0 → 10.0.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
|
@@ -296,7 +296,7 @@ var countIntersectionPoints = function countIntersectionPoints(geojson, intersec
|
|
|
296
296
|
return collisionPoints.length;
|
|
297
297
|
};
|
|
298
298
|
var isGeometryDirty = function isGeometryDirty(geoJSON, formGeoJSON) {
|
|
299
|
-
if (geoJSON
|
|
299
|
+
if (!geoJSON || !formGeoJSON || !hasValidGeometry(geoJSON) || !hasValidGeometry(formGeoJSON)) {
|
|
300
300
|
return false;
|
|
301
301
|
}
|
|
302
302
|
return !isEqual(
|
|
@@ -765,21 +765,21 @@ var localToUTC = function localToUTC(dateTime) {
|
|
|
765
765
|
return new Date(dateTime.getTime() - getTimezoneOffset(dateTime));
|
|
766
766
|
};
|
|
767
767
|
/**
|
|
768
|
-
* Should return an isostring in the form "YYYY-MM-DDThh:
|
|
768
|
+
* Should return an isostring in the form "YYYY-MM-DDThh:mmZ";
|
|
769
769
|
* The milli seconds section should not be included, strictly YYYY-MM-DDThh:mm:ssZ is important
|
|
770
770
|
* @param value input Date
|
|
771
|
-
* @returns iso string in YYYY-MM-DDThh:mm
|
|
771
|
+
* @returns iso string in YYYY-MM-DDThh:mm format.
|
|
772
772
|
*/
|
|
773
773
|
var getFormattedValueForDatePicker = function getFormattedValueForDatePicker(value) {
|
|
774
774
|
var _dateUtils$dateToStri;
|
|
775
|
-
return (_dateUtils$dateToStri = dateUtils.dateToString(value, "yyyy-MM-dd'T'HH:mm:
|
|
775
|
+
return (_dateUtils$dateToStri = dateUtils.dateToString(value, "yyyy-MM-dd'T'HH:mm:00'Z'", true)) != null ? _dateUtils$dateToStri : null;
|
|
776
776
|
};
|
|
777
777
|
var getDateValue = function getDateValue(value) {
|
|
778
778
|
if (value) {
|
|
779
779
|
var _ref, _dateUtils$stringToDa;
|
|
780
780
|
var dateValue = (_ref = (_dateUtils$stringToDa = dateUtils.stringToDate(value, 'yyyy/MM/dd HH:mm', false)) != null ? _dateUtils$stringToDa : dateUtils.isoStringToDate(value, false)) != null ? _ref : null;
|
|
781
781
|
if (dateValue) {
|
|
782
|
-
return makeLocalAppearUTC(dateValue);
|
|
782
|
+
return makeLocalAppearUTC(dateUtils.setSeconds(dateValue, 0));
|
|
783
783
|
}
|
|
784
784
|
return null;
|
|
785
785
|
}
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
3
3
|
import { DateTimePickerProps, DateTimePickerSlotProps } from '@mui/x-date-pickers';
|
|
4
4
|
import { ReactHookFormInput } from './types';
|
|
5
5
|
/**
|
|
6
|
-
* Should return an isostring in the form "YYYY-MM-DDThh:
|
|
6
|
+
* Should return an isostring in the form "YYYY-MM-DDThh:mmZ";
|
|
7
7
|
* The milli seconds section should not be included, strictly YYYY-MM-DDThh:mm:ssZ is important
|
|
8
8
|
* @param value input Date
|
|
9
|
-
* @returns iso string in YYYY-MM-DDThh:mm
|
|
9
|
+
* @returns iso string in YYYY-MM-DDThh:mm format.
|
|
10
10
|
*/
|
|
11
11
|
export declare const getFormattedValueForDatePicker: (value: Date) => string | null;
|
|
12
12
|
export declare const getDateValue: (value: string) => Date | null;
|