@opengeoweb/sigmet-airmet 12.10.0 → 12.11.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
@@ -7,7 +7,7 @@ import React__default, { useRef, useEffect, useCallback } from 'react';
7
7
  import { FormControlLabel, Radio, Grid, Typography, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
8
8
  import { useFormContext } from 'react-hook-form';
9
9
  import { FORM_FIELDS_NAMESPACE, useDraftFormHelpers, ReactHookFormRadioGroup, hasValidGeometry, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMin, isValidMax, isEmpty, ReactHookFormDateTime, countIntersectionPoints, hasMulitpleIntersections, ReactHookFormHiddenInput, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isMaximumOneDrawing, isXHoursBefore, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
10
- import { defaultIntersectionStyleProperties, defaultGeoJSONStyleProperties, addSelectionTypeToGeoJSON, DRAWMODE, defaultPoint, addGeoJSONProperties, defaultBox, defaultPolygon, defaultDelete, getIcon, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, OpenLayersMapDraw, useMapDrawTool, addFeatureProperties, rewindGeometry } from '@opengeoweb/webmap-react';
10
+ import { defaultIntersectionStyleProperties, defaultGeoJSONStyleProperties, addSelectionTypeToGeoJSON, DRAWMODE, defaultPoint, addGeoJSONProperties, defaultBox, defaultPolygon, defaultDelete, getIcon, addFeatureProperties, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, OpenLayersMapDraw, useMapDrawTool, rewindGeometry } from '@opengeoweb/webmap-react';
11
11
  import i18n from 'i18next';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { LegendConnect, OlMapViewConnect, TimeSliderConnect } from '@opengeoweb/core';
@@ -701,6 +701,9 @@ var StartOrEndDrawing;
701
701
  StartOrEndDrawing["end"] = "end";
702
702
  })(StartOrEndDrawing || (StartOrEndDrawing = {}));
703
703
 
704
+ function _OverloadYield(e, d) {
705
+ this.v = e, this.k = d;
706
+ }
704
707
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
705
708
  try {
706
709
  var i = n[a](c),
@@ -738,306 +741,248 @@ function _objectWithoutPropertiesLoose(r, e) {
738
741
  }
739
742
  return t;
740
743
  }
741
- function _regeneratorRuntime() {
742
- _regeneratorRuntime = function () {
743
- return e;
744
- };
745
- var t,
746
- e = {},
747
- r = Object.prototype,
748
- n = r.hasOwnProperty,
749
- o = Object.defineProperty || function (t, e, r) {
750
- t[e] = r.value;
751
- },
752
- i = "function" == typeof Symbol ? Symbol : {},
753
- a = i.iterator || "@@iterator",
754
- c = i.asyncIterator || "@@asyncIterator",
755
- u = i.toStringTag || "@@toStringTag";
756
- function define(t, e, r) {
757
- return Object.defineProperty(t, e, {
758
- value: r,
759
- enumerable: true,
760
- configurable: true,
761
- writable: true
762
- }), t[e];
763
- }
764
- try {
765
- define({}, "");
766
- } catch (t) {
767
- define = function (t, e, r) {
768
- return t[e] = r;
769
- };
770
- }
771
- function wrap(t, e, r, n) {
772
- var i = e && e.prototype instanceof Generator ? e : Generator,
773
- a = Object.create(i.prototype),
774
- c = new Context(n || []);
775
- return o(a, "_invoke", {
776
- value: makeInvokeMethod(t, r, c)
777
- }), a;
778
- }
779
- function tryCatch(t, e, r) {
780
- try {
781
- return {
782
- type: "normal",
783
- arg: t.call(e, r)
784
- };
785
- } catch (t) {
786
- return {
787
- type: "throw",
788
- arg: t
744
+ function _regenerator() {
745
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
746
+ var e,
747
+ t,
748
+ r = "function" == typeof Symbol ? Symbol : {},
749
+ n = r.iterator || "@@iterator",
750
+ o = r.toStringTag || "@@toStringTag";
751
+ function i(r, n, o, i) {
752
+ var c = n && n.prototype instanceof Generator ? n : Generator,
753
+ u = Object.create(c.prototype);
754
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
755
+ var i,
756
+ c,
757
+ u,
758
+ f = 0,
759
+ p = o || [],
760
+ y = false,
761
+ G = {
762
+ p: 0,
763
+ n: 0,
764
+ v: e,
765
+ a: d,
766
+ f: d.bind(e, 4),
767
+ d: function (t, r) {
768
+ return i = t, c = 0, u = e, G.n = r, a;
769
+ }
770
+ };
771
+ function d(r, n) {
772
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
773
+ var o,
774
+ i = p[t],
775
+ d = G.p,
776
+ l = i[2];
777
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
778
+ }
779
+ if (o || r > 1) return a;
780
+ throw y = true, n;
781
+ }
782
+ return function (o, p, l) {
783
+ if (f > 1) throw TypeError("Generator is already running");
784
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
785
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
786
+ try {
787
+ if (f = 2, i) {
788
+ if (c || (o = "next"), t = i[o]) {
789
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
790
+ if (!t.done) return t;
791
+ u = t.value, c < 2 && (c = 0);
792
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
793
+ i = e;
794
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
795
+ } catch (t) {
796
+ i = e, c = 1, u = t;
797
+ } finally {
798
+ f = 1;
799
+ }
800
+ }
801
+ return {
802
+ value: t,
803
+ done: y
804
+ };
789
805
  };
790
- }
806
+ }(r, o, i), true), u;
791
807
  }
792
- e.wrap = wrap;
793
- var h = "suspendedStart",
794
- l = "suspendedYield",
795
- f = "executing",
796
- s = "completed",
797
- y = {};
808
+ var a = {};
798
809
  function Generator() {}
799
810
  function GeneratorFunction() {}
800
811
  function GeneratorFunctionPrototype() {}
801
- var p = {};
802
- define(p, a, function () {
812
+ t = Object.getPrototypeOf;
813
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
814
+ return this;
815
+ }), t),
816
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
817
+ function f(e) {
818
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
819
+ }
820
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
803
821
  return this;
822
+ }), _regeneratorDefine(u, "toString", function () {
823
+ return "[object Generator]";
824
+ }), (_regenerator = function () {
825
+ return {
826
+ w: i,
827
+ m: f
828
+ };
829
+ })();
830
+ }
831
+ function _regeneratorAsync(n, e, r, t, o) {
832
+ var a = _regeneratorAsyncGen(n, e, r, t, o);
833
+ return a.next().then(function (n) {
834
+ return n.done ? n.value : a.next();
804
835
  });
805
- var d = Object.getPrototypeOf,
806
- v = d && d(d(values([])));
807
- v && v !== r && n.call(v, a) && (p = v);
808
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
809
- function defineIteratorMethods(t) {
810
- ["next", "throw", "return"].forEach(function (e) {
811
- define(t, e, function (t) {
812
- return this._invoke(e, t);
836
+ }
837
+ function _regeneratorAsyncGen(r, e, t, o, n) {
838
+ return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
839
+ }
840
+ function _regeneratorAsyncIterator(t, e) {
841
+ function n(r, o, i, f) {
842
+ try {
843
+ var c = t[r](o),
844
+ u = c.value;
845
+ return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
846
+ n("next", t, i, f);
847
+ }, function (t) {
848
+ n("throw", t, i, f);
849
+ }) : e.resolve(u).then(function (t) {
850
+ c.value = t, i(c);
851
+ }, function (t) {
852
+ return n("throw", t, i, f);
813
853
  });
814
- });
854
+ } catch (t) {
855
+ f(t);
856
+ }
815
857
  }
816
- function AsyncIterator(t, e) {
817
- function invoke(r, o, i, a) {
818
- var c = tryCatch(t[r], t, o);
819
- if ("throw" !== c.type) {
820
- var u = c.arg,
821
- h = u.value;
822
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
823
- invoke("next", t, i, a);
824
- }, function (t) {
825
- invoke("throw", t, i, a);
826
- }) : e.resolve(h).then(function (t) {
827
- u.value = t, i(u);
828
- }, function (t) {
829
- return invoke("throw", t, i, a);
858
+ var r;
859
+ this.next || (_regeneratorDefine(_regeneratorAsyncIterator.prototype), _regeneratorDefine(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
860
+ return this;
861
+ })), _regeneratorDefine(this, "_invoke", function (t, o, i) {
862
+ function f() {
863
+ return new e(function (e, r) {
864
+ n(t, i, e, r);
865
+ });
866
+ }
867
+ return r = r ? r.then(f, f) : f();
868
+ }, true);
869
+ }
870
+ function _regeneratorDefine(e, r, n, t) {
871
+ var i = Object.defineProperty;
872
+ try {
873
+ i({}, "", {});
874
+ } catch (e) {
875
+ i = 0;
876
+ }
877
+ _regeneratorDefine = function (e, r, n, t) {
878
+ if (r) i ? i(e, r, {
879
+ value: n,
880
+ enumerable: !t,
881
+ configurable: !t,
882
+ writable: !t
883
+ }) : e[r] = n;else {
884
+ function o(r, n) {
885
+ _regeneratorDefine(e, r, function (e) {
886
+ return this._invoke(r, n, e);
830
887
  });
831
888
  }
832
- a(c.arg);
889
+ o("next", 0), o("throw", 1), o("return", 2);
833
890
  }
834
- var r;
835
- o(this, "_invoke", {
836
- value: function (t, n) {
837
- function callInvokeWithMethodAndArg() {
838
- return new e(function (e, r) {
839
- invoke(t, n, e, r);
840
- });
841
- }
842
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
843
- }
844
- });
845
- }
846
- function makeInvokeMethod(e, r, n) {
847
- var o = h;
848
- return function (i, a) {
849
- if (o === f) throw Error("Generator is already running");
850
- if (o === s) {
851
- if ("throw" === i) throw a;
852
- return {
853
- value: t,
854
- done: true
891
+ }, _regeneratorDefine(e, r, n, t);
892
+ }
893
+ function _regeneratorKeys(e) {
894
+ var n = Object(e),
895
+ r = [];
896
+ for (var t in n) r.unshift(t);
897
+ return function e() {
898
+ for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e;
899
+ return e.done = true, e;
900
+ };
901
+ }
902
+ function _regeneratorValues(e) {
903
+ if (null != e) {
904
+ var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
905
+ r = 0;
906
+ if (t) return t.call(e);
907
+ if ("function" == typeof e.next) return e;
908
+ if (!isNaN(e.length)) return {
909
+ next: function () {
910
+ return e && r >= e.length && (e = void 0), {
911
+ value: e && e[r++],
912
+ done: !e
855
913
  };
856
914
  }
857
- for (n.method = i, n.arg = a;;) {
858
- var c = n.delegate;
859
- if (c) {
860
- var u = maybeInvokeDelegate(c, n);
861
- if (u) {
862
- if (u === y) continue;
863
- return u;
864
- }
915
+ };
916
+ }
917
+ throw new TypeError(typeof e + " is not iterable");
918
+ }
919
+ function _regeneratorRuntime() {
920
+
921
+ var r = _regenerator(),
922
+ e = r.m(_regeneratorRuntime),
923
+ t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
924
+ function n(r) {
925
+ var e = "function" == typeof r && r.constructor;
926
+ return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
927
+ }
928
+ var o = {
929
+ throw: 1,
930
+ return: 2,
931
+ break: 3,
932
+ continue: 3
933
+ };
934
+ function a(r) {
935
+ var e, t;
936
+ return function (n) {
937
+ e || (e = {
938
+ stop: function () {
939
+ return t(n.a, 2);
940
+ },
941
+ catch: function () {
942
+ return n.v;
943
+ },
944
+ abrupt: function (r, e) {
945
+ return t(n.a, o[r], e);
946
+ },
947
+ delegateYield: function (r, o, a) {
948
+ return e.resultName = o, t(n.d, _regeneratorValues(r), a);
949
+ },
950
+ finish: function (r) {
951
+ return t(n.f, r);
865
952
  }
866
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
867
- if (o === h) throw o = s, n.arg;
868
- n.dispatchException(n.arg);
869
- } else "return" === n.method && n.abrupt("return", n.arg);
870
- o = f;
871
- var p = tryCatch(e, r, n);
872
- if ("normal" === p.type) {
873
- if (o = n.done ? s : l, p.arg === y) continue;
874
- return {
875
- value: p.arg,
876
- done: n.done
877
- };
953
+ }, t = function (r, t, o) {
954
+ n.p = e.prev, n.n = e.next;
955
+ try {
956
+ return r(t, o);
957
+ } finally {
958
+ e.next = n.n;
878
959
  }
879
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
960
+ }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
961
+ try {
962
+ return r.call(this, e);
963
+ } finally {
964
+ n.p = e.prev, n.n = e.next;
880
965
  }
881
966
  };
882
967
  }
883
- function maybeInvokeDelegate(e, r) {
884
- var n = r.method,
885
- o = e.iterator[n];
886
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
887
- var i = tryCatch(o, e.iterator, r.arg);
888
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
889
- var a = i.arg;
890
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
891
- }
892
- function pushTryEntry(t) {
893
- var e = {
894
- tryLoc: t[0]
895
- };
896
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
897
- }
898
- function resetTryEntry(t) {
899
- var e = t.completion || {};
900
- e.type = "normal", delete e.arg, t.completion = e;
901
- }
902
- function Context(t) {
903
- this.tryEntries = [{
904
- tryLoc: "root"
905
- }], t.forEach(pushTryEntry, this), this.reset(true);
906
- }
907
- function values(e) {
908
- if (e || "" === e) {
909
- var r = e[a];
910
- if (r) return r.call(e);
911
- if ("function" == typeof e.next) return e;
912
- if (!isNaN(e.length)) {
913
- var o = -1,
914
- i = function next() {
915
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
916
- return next.value = t, next.done = true, next;
917
- };
918
- return i.next = i;
919
- }
920
- }
921
- throw new TypeError(typeof e + " is not iterable");
922
- }
923
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
924
- value: GeneratorFunctionPrototype,
925
- configurable: true
926
- }), o(GeneratorFunctionPrototype, "constructor", {
927
- value: GeneratorFunction,
928
- configurable: true
929
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
930
- var e = "function" == typeof t && t.constructor;
931
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
932
- }, e.mark = function (t) {
933
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
934
- }, e.awrap = function (t) {
968
+ return (_regeneratorRuntime = function () {
935
969
  return {
936
- __await: t
937
- };
938
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
939
- return this;
940
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
941
- void 0 === i && (i = Promise);
942
- var a = new AsyncIterator(wrap(t, r, n, o), i);
943
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
944
- return t.done ? t.value : a.next();
945
- });
946
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
947
- return this;
948
- }), define(g, "toString", function () {
949
- return "[object Generator]";
950
- }), e.keys = function (t) {
951
- var e = Object(t),
952
- r = [];
953
- for (var n in e) r.push(n);
954
- return r.reverse(), function next() {
955
- for (; r.length;) {
956
- var t = r.pop();
957
- if (t in e) return next.value = t, next.done = false, next;
958
- }
959
- return next.done = true, next;
970
+ wrap: function (e, t, n, o) {
971
+ return r.w(a(e), t, n, o && o.reverse());
972
+ },
973
+ isGeneratorFunction: n,
974
+ mark: r.m,
975
+ awrap: function (r, e) {
976
+ return new _OverloadYield(r, e);
977
+ },
978
+ AsyncIterator: _regeneratorAsyncIterator,
979
+ async: function (r, e, t, o, u) {
980
+ return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
981
+ },
982
+ keys: _regeneratorKeys,
983
+ values: _regeneratorValues
960
984
  };
961
- }, e.values = values, Context.prototype = {
962
- constructor: Context,
963
- reset: function (e) {
964
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
965
- },
966
- stop: function () {
967
- this.done = true;
968
- var t = this.tryEntries[0].completion;
969
- if ("throw" === t.type) throw t.arg;
970
- return this.rval;
971
- },
972
- dispatchException: function (e) {
973
- if (this.done) throw e;
974
- var r = this;
975
- function handle(n, o) {
976
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
977
- }
978
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
979
- var i = this.tryEntries[o],
980
- a = i.completion;
981
- if ("root" === i.tryLoc) return handle("end");
982
- if (i.tryLoc <= this.prev) {
983
- var c = n.call(i, "catchLoc"),
984
- u = n.call(i, "finallyLoc");
985
- if (c && u) {
986
- if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
987
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
988
- } else if (c) {
989
- if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
990
- } else {
991
- if (!u) throw Error("try statement without catch or finally");
992
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
993
- }
994
- }
995
- }
996
- },
997
- abrupt: function (t, e) {
998
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
999
- var o = this.tryEntries[r];
1000
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
1001
- var i = o;
1002
- break;
1003
- }
1004
- }
1005
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
1006
- var a = i ? i.completion : {};
1007
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
1008
- },
1009
- complete: function (t, e) {
1010
- if ("throw" === t.type) throw t.arg;
1011
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
1012
- },
1013
- finish: function (t) {
1014
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
1015
- var r = this.tryEntries[e];
1016
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
1017
- }
1018
- },
1019
- catch: function (t) {
1020
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
1021
- var r = this.tryEntries[e];
1022
- if (r.tryLoc === t) {
1023
- var n = r.completion;
1024
- if ("throw" === n.type) {
1025
- var o = n.arg;
1026
- resetTryEntry(r);
1027
- }
1028
- return o;
1029
- }
1030
- }
1031
- throw Error("illegal catch attempt");
1032
- },
1033
- delegateYield: function (e, r, n) {
1034
- return this.delegate = {
1035
- iterator: values(e),
1036
- resultName: r,
1037
- nextLoc: n
1038
- }, "next" === this.method && (this.arg = t), y;
1039
- }
1040
- }, e;
985
+ })();
1041
986
  }
1042
987
 
1043
988
  /* *
@@ -4923,16 +4868,16 @@ var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, prod
4923
4868
  };
4924
4869
  var getMaxVisibilityValue = function getMaxVisibilityValue(selectedFIR, productConfig) {
4925
4870
  // Use first FIR in list if no FIR selected
4926
- var _getActiveFIRArea10 = getActiveFIRArea(selectedFIR, productConfig),
4927
- visibility_max = _getActiveFIRArea10.visibility_max;
4871
+ var _getActiveFIRArea0 = getActiveFIRArea(selectedFIR, productConfig),
4872
+ visibility_max = _getActiveFIRArea0.visibility_max;
4928
4873
  // Return max value for selected unit - if not present in list, return null
4929
4874
  return visibility_max || null;
4930
4875
  };
4931
4876
  var DEFAULT_MIN_VISIBILITY = 0;
4932
4877
  var getMinVisibilityValue = function getMinVisibilityValue(selectedFIR, productConfig) {
4933
4878
  // Use first FIR in list if no FIR selected
4934
- var _getActiveFIRArea11 = getActiveFIRArea(selectedFIR, productConfig),
4935
- visibility_min = _getActiveFIRArea11.visibility_min;
4879
+ var _getActiveFIRArea1 = getActiveFIRArea(selectedFIR, productConfig),
4880
+ visibility_min = _getActiveFIRArea1.visibility_min;
4936
4881
  // Return min value for selected unit - if not present in list, return 0 as we have negative wind speed
4937
4882
  return visibility_min || DEFAULT_MIN_VISIBILITY;
4938
4883
  };
@@ -5280,15 +5225,15 @@ var getBaseLayers = function getBaseLayers(productConfig) {
5280
5225
  })) || [];
5281
5226
  };
5282
5227
  var getMaxMovementSpeedValue = function getMaxMovementSpeedValue(unit, selectedFIR, productConfig) {
5283
- var _getActiveFIRArea12 = getActiveFIRArea(selectedFIR, productConfig),
5284
- movement_max = _getActiveFIRArea12.movement_max;
5228
+ var _getActiveFIRArea10 = getActiveFIRArea(selectedFIR, productConfig),
5229
+ movement_max = _getActiveFIRArea10.movement_max;
5285
5230
  // Return max value for selected unit - if not present in list, return null
5286
5231
  return movement_max !== undefined && movement_max[unit] ? movement_max[unit] : null;
5287
5232
  };
5288
5233
  var DEFAULT_MIN_MOVEMENT_SPEED = 0;
5289
5234
  var getMinMovementSpeedValue = function getMinMovementSpeedValue(unit, selectedFIR, productConfig) {
5290
- var _getActiveFIRArea13 = getActiveFIRArea(selectedFIR, productConfig),
5291
- movement_min = _getActiveFIRArea13.movement_min;
5235
+ var _getActiveFIRArea11 = getActiveFIRArea(selectedFIR, productConfig),
5236
+ movement_min = _getActiveFIRArea11.movement_min;
5292
5237
  // Return min value for selected unit - if not present in list, return DEFAULT_MIN_MOVEMENT_SPEED (zero, no negative speeds)
5293
5238
  return movement_min !== undefined && movement_min[unit] ? movement_min[unit] : DEFAULT_MIN_MOVEMENT_SPEED;
5294
5239
  };
@@ -5359,6 +5304,15 @@ var getToolIcon = function getToolIcon(selectionType) {
5359
5304
  };
5360
5305
  var useFormLayers = function useFormLayers(layers) {
5361
5306
  var formLayers = layers.map(function (layer) {
5307
+ if (layer.isInEditMode) {
5308
+ var geojson = addFeatureProperties(layer.geojson, {
5309
+ inEditMode: true
5310
+ });
5311
+ return {
5312
+ id: layer.id,
5313
+ geoJSON: geojson
5314
+ };
5315
+ }
5362
5316
  return {
5363
5317
  id: layer.id,
5364
5318
  geoJSON: layer.geojson
@@ -7735,7 +7689,7 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7735
7689
  var _useIsMounted = useIsMounted(),
7736
7690
  isMounted = _useIsMounted.isMounted;
7737
7691
  var retrieveTAC = /*#__PURE__*/function () {
7738
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
7692
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
7739
7693
  var result;
7740
7694
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7741
7695
  while (1) switch (_context.prev = _context.next) {
@@ -7779,8 +7733,8 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7779
7733
  setTAC(noTAC(t));
7780
7734
  }
7781
7735
  };
7782
- var debouncedSearch = React__default.useRef(debounce( /*#__PURE__*/function () {
7783
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(formFn, hasFormErrors) {
7736
+ var debouncedSearch = React__default.useRef(debounce(/*#__PURE__*/function () {
7737
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(formFn, hasFormErrors) {
7784
7738
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7785
7739
  while (1) switch (_context2.prev = _context2.next) {
7786
7740
  case 0:
@@ -8998,7 +8952,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
8998
8952
  });
8999
8953
  };
9000
8954
  var onProductButtonPress = /*#__PURE__*/function () {
9001
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(action) {
8955
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(action) {
9002
8956
  var isDraft, formValues;
9003
8957
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9004
8958
  while (1) switch (_context.prev = _context.next) {
@@ -9611,7 +9565,7 @@ var useProductApi = function useProductApi(productType) {
9611
9565
  }
9612
9566
  };
9613
9567
  var fetchNewData = /*#__PURE__*/function () {
9614
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9568
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9615
9569
  var _yield$requestList, data, newError;
9616
9570
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9617
9571
  while (1) switch (_context.prev = _context.next) {
@@ -11863,7 +11817,7 @@ var fakeAirmetTAC = 'EHAA AIRMET -1 VALID 310700/311100 EHDB- EHAA AMSTERDAM FIR
11863
11817
  var getApiRoutes = function getApiRoutes(axiosInstance) {
11864
11818
  return {
11865
11819
  getSigmetConfiguration: function () {
11866
- var _getSigmetConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11820
+ var _getSigmetConfiguration = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11867
11821
  return _regeneratorRuntime().wrap(function _callee$(_context) {
11868
11822
  while (1) switch (_context.prev = _context.next) {
11869
11823
  case 0:
@@ -11889,7 +11843,7 @@ var getApiRoutes = function getApiRoutes(axiosInstance) {
11889
11843
  return getSigmetConfiguration;
11890
11844
  }(),
11891
11845
  getAirmetConfiguration: function () {
11892
- var _getAirmetConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11846
+ var _getAirmetConfiguration = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11893
11847
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11894
11848
  while (1) switch (_context2.prev = _context2.next) {
11895
11849
  case 0:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "12.10.0",
3
+ "version": "12.11.0",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,17 +8,17 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/api": "12.10.0",
12
- "@opengeoweb/shared": "12.10.0",
13
- "@opengeoweb/theme": "12.10.0",
14
- "@opengeoweb/store": "12.10.0",
15
- "@opengeoweb/webmap": "12.10.0",
16
- "@opengeoweb/webmap-react": "12.10.0",
11
+ "@opengeoweb/api": "12.11.0",
12
+ "@opengeoweb/shared": "12.11.0",
13
+ "@opengeoweb/theme": "12.11.0",
14
+ "@opengeoweb/store": "12.11.0",
15
+ "@opengeoweb/webmap": "12.11.0",
16
+ "@opengeoweb/webmap-react": "12.11.0",
17
17
  "react-redux": "^9.2.0",
18
- "@opengeoweb/core": "12.10.0",
19
- "@opengeoweb/authentication": "12.10.0",
18
+ "@opengeoweb/core": "12.11.0",
19
+ "@opengeoweb/authentication": "12.11.0",
20
20
  "@mui/system": "^7.0.1",
21
- "@opengeoweb/form-fields": "12.10.0",
21
+ "@opengeoweb/form-fields": "12.11.0",
22
22
  "react-hook-form": "^7.50.1",
23
23
  "axios": "^1.7.7",
24
24
  "lodash": "^4.17.21",
@@ -34,6 +34,9 @@
34
34
  "@emotion/react": "*",
35
35
  "@emotion/styled": "*"
36
36
  },
37
+ "devDependencies": {
38
+ "eslint-plugin-storybook": "9.0.17"
39
+ },
37
40
  "module": "./index.esm.js",
38
41
  "type": "module",
39
42
  "main": "./index.esm.js",
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import MetInfoWrapper from './components/MetInfoWrapper/MetInfoWrapper';
3
3
  declare const meta: Meta<typeof MetInfoWrapper>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import MetInfoWrapper from './components/MetInfoWrapper/MetInfoWrapper';
3
3
  declare const meta: Meta<typeof MetInfoWrapper>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { ProductFormDialog } from './ProductFormDialog';
3
3
  declare const meta: Meta<typeof ProductFormDialog>;
4
4
  export default meta;
@@ -14,7 +14,7 @@ interface ProductFormTACProps {
14
14
  tac: string;
15
15
  product?: AviationProduct;
16
16
  }
17
- export declare const getSequenceStyling: (product?: ProductFormTACProps['product'], hasTac?: boolean) => {
17
+ export declare const getSequenceStyling: (product?: ProductFormTACProps["product"], hasTac?: boolean) => {
18
18
  fontWeight: string;
19
19
  color: string;
20
20
  } | {
@@ -81,7 +81,7 @@ export declare const DEFAULT_MIN_MOVEMENT_SPEED = 0;
81
81
  export declare const getMinMovementSpeedValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number;
82
82
  /** Trigger form validations for given list of field names if field has a value */
83
83
  export declare const triggerValidations: (fieldNames: string[], getValues: UseFormGetValues<FieldValues>, trigger: UseFormTrigger<FieldValues>) => void;
84
- export declare const getProjection: (productConfig: ProductConfig) => mapTypes.MapPreset['proj'];
84
+ export declare const getProjection: (productConfig: ProductConfig) => mapTypes.MapPreset["proj"];
85
85
  export declare const firSelectionType = "fir";
86
86
  export declare const getDrawTools: (t: TFunction, type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) => DrawMode[];
87
87
  export declare const updateDrawToolsWithFir: (drawTools: DrawMode[], newFirShape: GeoJSON.FeatureCollection) => DrawMode[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { mapTypes } from '@opengeoweb/store';
3
2
  export type ProductType = 'sigmet' | 'airmet';
4
3
  /**