@opengeoweb/webmap 4.12.0 → 4.13.1

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.
Files changed (60) hide show
  1. package/README.md +0 -0
  2. package/index.d.ts +0 -0
  3. package/index.esm.js +22 -7
  4. package/index.umd.js +22 -7
  5. package/lib/components/WMAnimate.d.ts +0 -0
  6. package/lib/components/WMBBOX.d.ts +0 -0
  7. package/lib/components/WMBBOX.spec.d.ts +0 -0
  8. package/lib/components/WMCanvasBuffer.d.ts +0 -0
  9. package/lib/components/WMCanvasBuffer.spec.d.ts +0 -0
  10. package/lib/components/WMConstants.d.ts +0 -0
  11. package/lib/components/WMDrawMarker.d.ts +0 -0
  12. package/lib/components/WMDrawMarker.spec.d.ts +0 -0
  13. package/lib/components/WMFlyToBBox.d.ts +0 -0
  14. package/lib/components/WMFlyToBBox.spec.d.ts +0 -0
  15. package/lib/components/WMGetServiceFromStore.d.ts +0 -0
  16. package/lib/components/WMGlobals.d.ts +0 -0
  17. package/lib/components/WMImage.d.ts +0 -0
  18. package/lib/components/WMImage.spec.d.ts +0 -0
  19. package/lib/components/WMImageStore.d.ts +0 -0
  20. package/lib/components/WMImageStore.spec.d.ts +0 -0
  21. package/lib/components/WMJSDimension.d.ts +0 -0
  22. package/lib/components/WMJSDimension.spec.d.ts +0 -0
  23. package/lib/components/WMJSExternalDependencies.d.ts +0 -0
  24. package/lib/components/WMJSMap.d.ts +0 -0
  25. package/lib/components/WMJSMap.spec.d.ts +0 -0
  26. package/lib/components/WMJSMapHelpers.d.ts +0 -0
  27. package/lib/components/WMJSMapHelpers.spec.d.ts +0 -0
  28. package/lib/components/WMJSService.d.ts +0 -0
  29. package/lib/components/WMJSService.spec.d.ts +0 -0
  30. package/lib/components/WMJSTools.d.ts +0 -0
  31. package/lib/components/WMJSTools.spec.d.ts +0 -0
  32. package/lib/components/WMLayer.d.ts +0 -0
  33. package/lib/components/WMLayer.spec.d.ts +0 -0
  34. package/lib/components/WMLegend.d.ts +0 -0
  35. package/lib/components/WMLegend.spec.d.ts +0 -0
  36. package/lib/components/WMListener.d.ts +0 -0
  37. package/lib/components/WMMapPin.d.ts +0 -0
  38. package/lib/components/WMProjection.d.ts +0 -0
  39. package/lib/components/WMTileRenderer.d.ts +0 -0
  40. package/lib/components/WMTileRenderer.spec.d.ts +0 -0
  41. package/lib/components/WMTime.d.ts +1 -1
  42. package/lib/components/WMTime.spec.d.ts +0 -0
  43. package/lib/components/WMTimeTypes.d.ts +0 -0
  44. package/lib/components/WMTimer.d.ts +0 -0
  45. package/lib/components/WMTimer.spec.d.ts +0 -0
  46. package/lib/components/WMXMLParser.d.ts +0 -0
  47. package/lib/components/WMXMLParser.spec.d.ts +0 -0
  48. package/lib/components/index.d.ts +0 -0
  49. package/lib/components/types.d.ts +0 -0
  50. package/lib/utils/I18n/lang.en.d.ts +0 -0
  51. package/lib/utils/I18n/lang.nl.d.ts +0 -0
  52. package/lib/utils/specs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +0 -0
  53. package/lib/utils/specs/WMS130GetCapabilitiesHarmN25.d.ts +0 -0
  54. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +0 -0
  55. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +0 -0
  56. package/lib/utils/specs/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +0 -0
  57. package/lib/utils/specs/WMSSmartMet.d.ts +0 -0
  58. package/lib/utils/testUtils.d.ts +0 -0
  59. package/lib/utils/tilesettings.d.ts +0 -0
  60. package/package.json +1 -1
package/README.md CHANGED
File without changes
package/index.d.ts CHANGED
File without changes
package/index.esm.js CHANGED
@@ -2700,7 +2700,7 @@ var getTimeValues = function getTimeValues(isotime) {
2700
2700
 
2701
2701
  /** ************************************************* */
2702
2702
 
2703
- var parseISO8601DateToDate = function parseISO8601DateToDate(_isotime) {
2703
+ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime) {
2704
2704
  /*
2705
2705
  The following functions are added to the standard Date object:
2706
2706
  - add(dateInterval) adds a DateInterval time to this time
@@ -2709,17 +2709,32 @@ var parseISO8601DateToDate = function parseISO8601DateToDate(_isotime) {
2709
2709
  - clone() creates a copy of this object
2710
2710
  */
2711
2711
 
2712
- /** TODO: Maarten Plieger, 2021-09-08
2713
- * https://gitlab.com/opengeoweb/opengeoweb/-/issues/1168
2714
- * This function now only works with strict iso strings in the form YYYY-MM-DDTHH:MM:SSZ.
2715
- * Some WMS's also provide it in different forms like 1981-01 and 2021-12. Make it work with this format too.
2712
+ /** Timeformats according to:
2713
+ * https://portal.ogc.org/files/?artifact_id=14416 / 06-042_OpenGIS_Web_Map_Service_WMS_Implementation_Specification.pdf,
2714
+ * chapter D2.1 are supported
2716
2715
  */
2717
- if (!isValidISOTime(_isotime)) {
2716
+ var makeISO8601StringFromFlexibleWMSDateString = function makeISO8601StringFromFlexibleWMSDateString(isoString) {
2717
+ // Datestring starting with a - token are not supported.
2718
+ if (!isoString || isoString.startsWith('-')) return isoString;
2719
+ if (isoString.length === 4) return "".concat(isoString, "-01-01T00:00:00Z"); // YYYY
2720
+
2721
+ if (isoString.length === 7) return "".concat(isoString, "-01T00:00:00Z"); // YYYY-MM
2722
+
2723
+ if (isoString.length === 10) return "".concat(isoString, "T00:00:00Z"); // YYYY-MM-DD
2724
+
2725
+ if (isoString.length === 14) return "".concat(isoString.slice(0, -1), ":00:00Z"); // YYYY-MM-DDTHHZ
2726
+
2727
+ return isoString;
2728
+ };
2729
+
2730
+ var isotime = makeISO8601StringFromFlexibleWMSDateString(unvalidatedIsotime);
2731
+
2732
+ if (!isValidISOTime(isotime)) {
2718
2733
  debug(DebugType.Warning);
2719
2734
  return undefined;
2720
2735
  }
2721
2736
 
2722
- var _getTimeValues = getTimeValues(_isotime),
2737
+ var _getTimeValues = getTimeValues(isotime),
2723
2738
  _getTimeValues2 = _slicedToArray(_getTimeValues, 6),
2724
2739
  year = _getTimeValues2[0],
2725
2740
  month = _getTimeValues2[1],
package/index.umd.js CHANGED
@@ -2699,7 +2699,7 @@
2699
2699
 
2700
2700
  /** ************************************************* */
2701
2701
 
2702
- var parseISO8601DateToDate = function parseISO8601DateToDate(_isotime) {
2702
+ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime) {
2703
2703
  /*
2704
2704
  The following functions are added to the standard Date object:
2705
2705
  - add(dateInterval) adds a DateInterval time to this time
@@ -2708,17 +2708,32 @@
2708
2708
  - clone() creates a copy of this object
2709
2709
  */
2710
2710
 
2711
- /** TODO: Maarten Plieger, 2021-09-08
2712
- * https://gitlab.com/opengeoweb/opengeoweb/-/issues/1168
2713
- * This function now only works with strict iso strings in the form YYYY-MM-DDTHH:MM:SSZ.
2714
- * Some WMS's also provide it in different forms like 1981-01 and 2021-12. Make it work with this format too.
2711
+ /** Timeformats according to:
2712
+ * https://portal.ogc.org/files/?artifact_id=14416 / 06-042_OpenGIS_Web_Map_Service_WMS_Implementation_Specification.pdf,
2713
+ * chapter D2.1 are supported
2715
2714
  */
2716
- if (!isValidISOTime(_isotime)) {
2715
+ var makeISO8601StringFromFlexibleWMSDateString = function makeISO8601StringFromFlexibleWMSDateString(isoString) {
2716
+ // Datestring starting with a - token are not supported.
2717
+ if (!isoString || isoString.startsWith('-')) return isoString;
2718
+ if (isoString.length === 4) return isoString + "-01-01T00:00:00Z"; // YYYY
2719
+
2720
+ if (isoString.length === 7) return isoString + "-01T00:00:00Z"; // YYYY-MM
2721
+
2722
+ if (isoString.length === 10) return isoString + "T00:00:00Z"; // YYYY-MM-DD
2723
+
2724
+ if (isoString.length === 14) return isoString.slice(0, -1) + ":00:00Z"; // YYYY-MM-DDTHHZ
2725
+
2726
+ return isoString;
2727
+ };
2728
+
2729
+ var isotime = makeISO8601StringFromFlexibleWMSDateString(unvalidatedIsotime);
2730
+
2731
+ if (!isValidISOTime(isotime)) {
2717
2732
  debug(exports.DebugType.Warning, 'No date given to parseISO8601DateToDate');
2718
2733
  return undefined;
2719
2734
  }
2720
2735
 
2721
- var _a = __read(getTimeValues(_isotime), 6),
2736
+ var _a = __read(getTimeValues(isotime), 6),
2722
2737
  year = _a[0],
2723
2738
  month = _a[1],
2724
2739
  day = _a[2],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -18,7 +18,7 @@ export declare const parseTimeValue: (value: string) => number;
18
18
  export declare const getTimeValues: (isotime: string) => number[];
19
19
  /** ************************************************* */
20
20
  /** ************************************************* */
21
- export declare const parseISO8601DateToDate: (_isotime: string) => CustomDate;
21
+ export declare const parseISO8601DateToDate: (unvalidatedIsotime: string) => CustomDate;
22
22
  /** ****************************************************** */
23
23
  /** ****************************************************** */
24
24
  export declare const parseISO8601IntervalToDateInterval: (isotime: string) => DateInterval;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "4.12.0",
3
+ "version": "4.13.1",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {