@opengeoweb/sigmet-airmet 6.0.4 → 6.1.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.
package/index.esm.js
CHANGED
|
@@ -4,348 +4,354 @@ import { FormControlLabel, Radio, Grid, Typography, Box as Box$2, Button, Checkb
|
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { useDraftFormHelpers, ReactHookFormRadioGroup, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMax, isValidMin, isEmpty, ReactHookFormDateTime, isValidDate, isBefore, isBetween, hasMaxFeaturePoints, hasMulitpleIntersections, ReactHookFormHiddenInput, isMaximumOneDrawing, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isXHoursBefore, isAfter, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
6
6
|
import { useApiContext, useApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider } from '@opengeoweb/api';
|
|
7
|
-
import {
|
|
7
|
+
import { defaultIntersectionStyleProperties, defaultPoint, defaultBox, defaultPolygon, defaultDelete, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, TimeSliderConnect, LegendConnect, LayerManagerConnect, useMapDrawTool } from '@opengeoweb/core';
|
|
8
|
+
import { defaultStyleProperties, DRAWMODE, addFeatureProperties, MapViewLayer } from '@opengeoweb/webmap-react';
|
|
8
9
|
import { CustomTooltip, ToggleMenu, useIsMounted, StatusTag, AlertBanner, ConfirmationServiceProvider, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, usePoller, ErrorBoundary } from '@opengeoweb/shared';
|
|
9
10
|
import moment from 'moment';
|
|
10
11
|
import { polygonToLineString, booleanClockwise, rewind } from '@turf/turf';
|
|
11
|
-
import { layerTypes, mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
12
12
|
import { DrawFIRLand, ChevronLeft, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
13
|
+
import { LayerType, webmapUtils } from '@opengeoweb/webmap';
|
|
13
14
|
import { debounce } from 'lodash';
|
|
14
15
|
import 'react-dom';
|
|
15
|
-
import {
|
|
16
|
+
import { mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
16
17
|
import { jsx } from 'react/jsx-runtime';
|
|
17
18
|
|
|
18
|
-
function _iterableToArrayLimit(
|
|
19
|
-
var
|
|
20
|
-
if (null !=
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
function _iterableToArrayLimit(r, l) {
|
|
20
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
21
|
+
if (null != t) {
|
|
22
|
+
var e,
|
|
23
|
+
n,
|
|
24
|
+
i,
|
|
25
|
+
u,
|
|
26
|
+
a = [],
|
|
27
|
+
f = !0,
|
|
28
|
+
o = !1;
|
|
28
29
|
try {
|
|
29
|
-
if (
|
|
30
|
-
if (Object(
|
|
31
|
-
|
|
32
|
-
} else for (; !(
|
|
33
|
-
} catch (
|
|
34
|
-
|
|
30
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
31
|
+
if (Object(t) !== t) return;
|
|
32
|
+
f = !1;
|
|
33
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
34
|
+
} catch (r) {
|
|
35
|
+
o = !0, n = r;
|
|
35
36
|
} finally {
|
|
36
37
|
try {
|
|
37
|
-
if (!
|
|
38
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
38
39
|
} finally {
|
|
39
|
-
if (
|
|
40
|
+
if (o) throw n;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
return
|
|
43
|
+
return a;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
function _regeneratorRuntime() {
|
|
46
47
|
_regeneratorRuntime = function () {
|
|
47
|
-
return
|
|
48
|
+
return e;
|
|
48
49
|
};
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
var t,
|
|
51
|
+
e = {},
|
|
52
|
+
r = Object.prototype,
|
|
53
|
+
n = r.hasOwnProperty,
|
|
54
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
55
|
+
t[e] = r.value;
|
|
54
56
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
function define(
|
|
60
|
-
return Object.defineProperty(
|
|
61
|
-
value:
|
|
57
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
58
|
+
a = i.iterator || "@@iterator",
|
|
59
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
60
|
+
u = i.toStringTag || "@@toStringTag";
|
|
61
|
+
function define(t, e, r) {
|
|
62
|
+
return Object.defineProperty(t, e, {
|
|
63
|
+
value: r,
|
|
62
64
|
enumerable: !0,
|
|
63
65
|
configurable: !0,
|
|
64
66
|
writable: !0
|
|
65
|
-
}),
|
|
67
|
+
}), t[e];
|
|
66
68
|
}
|
|
67
69
|
try {
|
|
68
70
|
define({}, "");
|
|
69
|
-
} catch (
|
|
70
|
-
define = function (
|
|
71
|
-
return
|
|
71
|
+
} catch (t) {
|
|
72
|
+
define = function (t, e, r) {
|
|
73
|
+
return t[e] = r;
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
|
-
function wrap(
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return
|
|
79
|
-
value: makeInvokeMethod(
|
|
80
|
-
}),
|
|
76
|
+
function wrap(t, e, r, n) {
|
|
77
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
78
|
+
a = Object.create(i.prototype),
|
|
79
|
+
c = new Context(n || []);
|
|
80
|
+
return o(a, "_invoke", {
|
|
81
|
+
value: makeInvokeMethod(t, r, c)
|
|
82
|
+
}), a;
|
|
81
83
|
}
|
|
82
|
-
function tryCatch(
|
|
84
|
+
function tryCatch(t, e, r) {
|
|
83
85
|
try {
|
|
84
86
|
return {
|
|
85
87
|
type: "normal",
|
|
86
|
-
arg:
|
|
88
|
+
arg: t.call(e, r)
|
|
87
89
|
};
|
|
88
|
-
} catch (
|
|
90
|
+
} catch (t) {
|
|
89
91
|
return {
|
|
90
92
|
type: "throw",
|
|
91
|
-
arg:
|
|
93
|
+
arg: t
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
var
|
|
97
|
+
e.wrap = wrap;
|
|
98
|
+
var h = "suspendedStart",
|
|
99
|
+
l = "suspendedYield",
|
|
100
|
+
f = "executing",
|
|
101
|
+
s = "completed",
|
|
102
|
+
y = {};
|
|
97
103
|
function Generator() {}
|
|
98
104
|
function GeneratorFunction() {}
|
|
99
105
|
function GeneratorFunctionPrototype() {}
|
|
100
|
-
var
|
|
101
|
-
define(
|
|
106
|
+
var p = {};
|
|
107
|
+
define(p, a, function () {
|
|
102
108
|
return this;
|
|
103
109
|
});
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
function defineIteratorMethods(
|
|
109
|
-
["next", "throw", "return"].forEach(function (
|
|
110
|
-
define(
|
|
111
|
-
return this._invoke(
|
|
110
|
+
var d = Object.getPrototypeOf,
|
|
111
|
+
v = d && d(d(values([])));
|
|
112
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
113
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
114
|
+
function defineIteratorMethods(t) {
|
|
115
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
116
|
+
define(t, e, function (t) {
|
|
117
|
+
return this._invoke(e, t);
|
|
112
118
|
});
|
|
113
119
|
});
|
|
114
120
|
}
|
|
115
|
-
function AsyncIterator(
|
|
116
|
-
function invoke(
|
|
117
|
-
var
|
|
118
|
-
if ("throw" !==
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
return
|
|
122
|
-
invoke("next",
|
|
123
|
-
}, function (
|
|
124
|
-
invoke("throw",
|
|
125
|
-
}) :
|
|
126
|
-
|
|
127
|
-
}, function (
|
|
128
|
-
return invoke("throw",
|
|
121
|
+
function AsyncIterator(t, e) {
|
|
122
|
+
function invoke(r, o, i, a) {
|
|
123
|
+
var c = tryCatch(t[r], t, o);
|
|
124
|
+
if ("throw" !== c.type) {
|
|
125
|
+
var u = c.arg,
|
|
126
|
+
h = u.value;
|
|
127
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
128
|
+
invoke("next", t, i, a);
|
|
129
|
+
}, function (t) {
|
|
130
|
+
invoke("throw", t, i, a);
|
|
131
|
+
}) : e.resolve(h).then(function (t) {
|
|
132
|
+
u.value = t, i(u);
|
|
133
|
+
}, function (t) {
|
|
134
|
+
return invoke("throw", t, i, a);
|
|
129
135
|
});
|
|
130
136
|
}
|
|
131
|
-
|
|
137
|
+
a(c.arg);
|
|
132
138
|
}
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
value: function (
|
|
139
|
+
var r;
|
|
140
|
+
o(this, "_invoke", {
|
|
141
|
+
value: function (t, n) {
|
|
136
142
|
function callInvokeWithMethodAndArg() {
|
|
137
|
-
return new
|
|
138
|
-
invoke(
|
|
143
|
+
return new e(function (e, r) {
|
|
144
|
+
invoke(t, n, e, r);
|
|
139
145
|
});
|
|
140
146
|
}
|
|
141
|
-
return
|
|
147
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
142
148
|
}
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
|
-
function makeInvokeMethod(
|
|
146
|
-
var
|
|
147
|
-
return function (
|
|
148
|
-
if (
|
|
149
|
-
if (
|
|
150
|
-
if ("throw" ===
|
|
151
|
+
function makeInvokeMethod(e, r, n) {
|
|
152
|
+
var o = h;
|
|
153
|
+
return function (i, a) {
|
|
154
|
+
if (o === f) throw new Error("Generator is already running");
|
|
155
|
+
if (o === s) {
|
|
156
|
+
if ("throw" === i) throw a;
|
|
151
157
|
return {
|
|
152
|
-
value:
|
|
158
|
+
value: t,
|
|
153
159
|
done: !0
|
|
154
160
|
};
|
|
155
161
|
}
|
|
156
|
-
for (
|
|
157
|
-
var
|
|
158
|
-
if (
|
|
159
|
-
var
|
|
160
|
-
if (
|
|
161
|
-
if (
|
|
162
|
-
return
|
|
162
|
+
for (n.method = i, n.arg = a;;) {
|
|
163
|
+
var c = n.delegate;
|
|
164
|
+
if (c) {
|
|
165
|
+
var u = maybeInvokeDelegate(c, n);
|
|
166
|
+
if (u) {
|
|
167
|
+
if (u === y) continue;
|
|
168
|
+
return u;
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
|
-
if ("next" ===
|
|
166
|
-
if (
|
|
167
|
-
|
|
168
|
-
} else "return" ===
|
|
169
|
-
|
|
170
|
-
var
|
|
171
|
-
if ("normal" ===
|
|
172
|
-
if (
|
|
171
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
172
|
+
if (o === h) throw o = s, n.arg;
|
|
173
|
+
n.dispatchException(n.arg);
|
|
174
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
175
|
+
o = f;
|
|
176
|
+
var p = tryCatch(e, r, n);
|
|
177
|
+
if ("normal" === p.type) {
|
|
178
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
173
179
|
return {
|
|
174
|
-
value:
|
|
175
|
-
done:
|
|
180
|
+
value: p.arg,
|
|
181
|
+
done: n.done
|
|
176
182
|
};
|
|
177
183
|
}
|
|
178
|
-
"throw" ===
|
|
184
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
179
185
|
}
|
|
180
186
|
};
|
|
181
187
|
}
|
|
182
|
-
function maybeInvokeDelegate(
|
|
183
|
-
var
|
|
184
|
-
|
|
185
|
-
if (
|
|
186
|
-
var
|
|
187
|
-
if ("throw" ===
|
|
188
|
-
var
|
|
189
|
-
return
|
|
188
|
+
function maybeInvokeDelegate(e, r) {
|
|
189
|
+
var n = r.method,
|
|
190
|
+
o = e.iterator[n];
|
|
191
|
+
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;
|
|
192
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
193
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
194
|
+
var a = i.arg;
|
|
195
|
+
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);
|
|
190
196
|
}
|
|
191
|
-
function pushTryEntry(
|
|
192
|
-
var
|
|
193
|
-
tryLoc:
|
|
197
|
+
function pushTryEntry(t) {
|
|
198
|
+
var e = {
|
|
199
|
+
tryLoc: t[0]
|
|
194
200
|
};
|
|
195
|
-
1 in
|
|
201
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
196
202
|
}
|
|
197
|
-
function resetTryEntry(
|
|
198
|
-
var
|
|
199
|
-
|
|
203
|
+
function resetTryEntry(t) {
|
|
204
|
+
var e = t.completion || {};
|
|
205
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
200
206
|
}
|
|
201
|
-
function Context(
|
|
207
|
+
function Context(t) {
|
|
202
208
|
this.tryEntries = [{
|
|
203
209
|
tryLoc: "root"
|
|
204
|
-
}],
|
|
210
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
205
211
|
}
|
|
206
|
-
function values(
|
|
207
|
-
if (
|
|
208
|
-
var
|
|
209
|
-
if (
|
|
210
|
-
if ("function" == typeof
|
|
211
|
-
if (!isNaN(
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
for (; ++
|
|
215
|
-
return next.value =
|
|
212
|
+
function values(e) {
|
|
213
|
+
if (e || "" === e) {
|
|
214
|
+
var r = e[a];
|
|
215
|
+
if (r) return r.call(e);
|
|
216
|
+
if ("function" == typeof e.next) return e;
|
|
217
|
+
if (!isNaN(e.length)) {
|
|
218
|
+
var o = -1,
|
|
219
|
+
i = function next() {
|
|
220
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
221
|
+
return next.value = t, next.done = !0, next;
|
|
216
222
|
};
|
|
217
|
-
return
|
|
223
|
+
return i.next = i;
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
|
-
throw new TypeError(typeof
|
|
226
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
221
227
|
}
|
|
222
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
228
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
223
229
|
value: GeneratorFunctionPrototype,
|
|
224
230
|
configurable: !0
|
|
225
|
-
}),
|
|
231
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
226
232
|
value: GeneratorFunction,
|
|
227
233
|
configurable: !0
|
|
228
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
229
|
-
var
|
|
230
|
-
return !!
|
|
231
|
-
},
|
|
232
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
233
|
-
},
|
|
234
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
235
|
+
var e = "function" == typeof t && t.constructor;
|
|
236
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
237
|
+
}, e.mark = function (t) {
|
|
238
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
239
|
+
}, e.awrap = function (t) {
|
|
234
240
|
return {
|
|
235
|
-
__await:
|
|
241
|
+
__await: t
|
|
236
242
|
};
|
|
237
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
243
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
238
244
|
return this;
|
|
239
|
-
}),
|
|
240
|
-
void 0 ===
|
|
241
|
-
var
|
|
242
|
-
return
|
|
243
|
-
return
|
|
245
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
246
|
+
void 0 === i && (i = Promise);
|
|
247
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
248
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
249
|
+
return t.done ? t.value : a.next();
|
|
244
250
|
});
|
|
245
|
-
}, defineIteratorMethods(
|
|
251
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
246
252
|
return this;
|
|
247
|
-
}), define(
|
|
253
|
+
}), define(g, "toString", function () {
|
|
248
254
|
return "[object Generator]";
|
|
249
|
-
}),
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
for (var
|
|
253
|
-
return
|
|
254
|
-
for (;
|
|
255
|
-
var
|
|
256
|
-
if (
|
|
255
|
+
}), e.keys = function (t) {
|
|
256
|
+
var e = Object(t),
|
|
257
|
+
r = [];
|
|
258
|
+
for (var n in e) r.push(n);
|
|
259
|
+
return r.reverse(), function next() {
|
|
260
|
+
for (; r.length;) {
|
|
261
|
+
var t = r.pop();
|
|
262
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
257
263
|
}
|
|
258
264
|
return next.done = !0, next;
|
|
259
265
|
};
|
|
260
|
-
},
|
|
266
|
+
}, e.values = values, Context.prototype = {
|
|
261
267
|
constructor: Context,
|
|
262
|
-
reset: function (
|
|
263
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
268
|
+
reset: function (e) {
|
|
269
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, 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);
|
|
264
270
|
},
|
|
265
271
|
stop: function () {
|
|
266
272
|
this.done = !0;
|
|
267
|
-
var
|
|
268
|
-
if ("throw" ===
|
|
273
|
+
var t = this.tryEntries[0].completion;
|
|
274
|
+
if ("throw" === t.type) throw t.arg;
|
|
269
275
|
return this.rval;
|
|
270
276
|
},
|
|
271
|
-
dispatchException: function (
|
|
272
|
-
if (this.done) throw
|
|
273
|
-
var
|
|
274
|
-
function handle(
|
|
275
|
-
return
|
|
277
|
+
dispatchException: function (e) {
|
|
278
|
+
if (this.done) throw e;
|
|
279
|
+
var r = this;
|
|
280
|
+
function handle(n, o) {
|
|
281
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
276
282
|
}
|
|
277
|
-
for (var
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
if ("root" ===
|
|
281
|
-
if (
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
if (
|
|
285
|
-
if (this.prev <
|
|
286
|
-
if (this.prev <
|
|
287
|
-
} else if (
|
|
288
|
-
if (this.prev <
|
|
283
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
284
|
+
var i = this.tryEntries[o],
|
|
285
|
+
a = i.completion;
|
|
286
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
287
|
+
if (i.tryLoc <= this.prev) {
|
|
288
|
+
var c = n.call(i, "catchLoc"),
|
|
289
|
+
u = n.call(i, "finallyLoc");
|
|
290
|
+
if (c && u) {
|
|
291
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
292
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
293
|
+
} else if (c) {
|
|
294
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
289
295
|
} else {
|
|
290
|
-
if (!
|
|
291
|
-
if (this.prev <
|
|
296
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
297
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
292
298
|
}
|
|
293
299
|
}
|
|
294
300
|
}
|
|
295
301
|
},
|
|
296
|
-
abrupt: function (
|
|
297
|
-
for (var
|
|
298
|
-
var
|
|
299
|
-
if (
|
|
300
|
-
var
|
|
302
|
+
abrupt: function (t, e) {
|
|
303
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
304
|
+
var o = this.tryEntries[r];
|
|
305
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
306
|
+
var i = o;
|
|
301
307
|
break;
|
|
302
308
|
}
|
|
303
309
|
}
|
|
304
|
-
|
|
305
|
-
var
|
|
306
|
-
return
|
|
310
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
311
|
+
var a = i ? i.completion : {};
|
|
312
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
307
313
|
},
|
|
308
|
-
complete: function (
|
|
309
|
-
if ("throw" ===
|
|
310
|
-
return "break" ===
|
|
314
|
+
complete: function (t, e) {
|
|
315
|
+
if ("throw" === t.type) throw t.arg;
|
|
316
|
+
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;
|
|
311
317
|
},
|
|
312
|
-
finish: function (
|
|
313
|
-
for (var
|
|
314
|
-
var
|
|
315
|
-
if (
|
|
318
|
+
finish: function (t) {
|
|
319
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
320
|
+
var r = this.tryEntries[e];
|
|
321
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
316
322
|
}
|
|
317
323
|
},
|
|
318
|
-
catch: function (
|
|
319
|
-
for (var
|
|
320
|
-
var
|
|
321
|
-
if (
|
|
322
|
-
var
|
|
323
|
-
if ("throw" ===
|
|
324
|
-
var
|
|
325
|
-
resetTryEntry(
|
|
324
|
+
catch: function (t) {
|
|
325
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
326
|
+
var r = this.tryEntries[e];
|
|
327
|
+
if (r.tryLoc === t) {
|
|
328
|
+
var n = r.completion;
|
|
329
|
+
if ("throw" === n.type) {
|
|
330
|
+
var o = n.arg;
|
|
331
|
+
resetTryEntry(r);
|
|
326
332
|
}
|
|
327
|
-
return
|
|
333
|
+
return o;
|
|
328
334
|
}
|
|
329
335
|
}
|
|
330
336
|
throw new Error("illegal catch attempt");
|
|
331
337
|
},
|
|
332
|
-
delegateYield: function (
|
|
338
|
+
delegateYield: function (e, r, n) {
|
|
333
339
|
return this.delegate = {
|
|
334
|
-
iterator: values(
|
|
335
|
-
resultName:
|
|
336
|
-
nextLoc:
|
|
337
|
-
}, "next" === this.method && (this.arg =
|
|
340
|
+
iterator: values(e),
|
|
341
|
+
resultName: r,
|
|
342
|
+
nextLoc: n
|
|
343
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
338
344
|
}
|
|
339
|
-
},
|
|
345
|
+
}, e;
|
|
340
346
|
}
|
|
341
|
-
function _typeof(
|
|
347
|
+
function _typeof(o) {
|
|
342
348
|
"@babel/helpers - typeof";
|
|
343
349
|
|
|
344
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
345
|
-
return typeof
|
|
346
|
-
} : function (
|
|
347
|
-
return
|
|
348
|
-
}, _typeof(
|
|
350
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
351
|
+
return typeof o;
|
|
352
|
+
} : function (o) {
|
|
353
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
354
|
+
}, _typeof(o);
|
|
349
355
|
}
|
|
350
356
|
function _defineProperty(obj, key, value) {
|
|
351
357
|
key = _toPropertyKey(key);
|
|
@@ -1291,7 +1297,7 @@ var getFieldLabel = function getFieldLabel(title, isDisabled) {
|
|
|
1291
1297
|
var getBaseLayers = function getBaseLayers(productConfig) {
|
|
1292
1298
|
var _a, _b;
|
|
1293
1299
|
return ((_b = (_a = productConfig.mapPreset) === null || _a === void 0 ? void 0 : _a.layers) === null || _b === void 0 ? void 0 : _b.filter(function (layer) {
|
|
1294
|
-
return layer.layerType ===
|
|
1300
|
+
return layer.layerType === LayerType.baseLayer || layer.layerType === LayerType.overLayer;
|
|
1295
1301
|
})) || [];
|
|
1296
1302
|
};
|
|
1297
1303
|
var getMaxMovementSpeedValue = function getMaxMovementSpeedValue(unit, selectedFIR, productConfig) {
|
|
@@ -3333,6 +3339,9 @@ var shouldRetrieveTAC = function shouldRetrieveTAC(product) {
|
|
|
3333
3339
|
return false;
|
|
3334
3340
|
};
|
|
3335
3341
|
var useTAC = function useTAC(initialProduct, getTAC) {
|
|
3342
|
+
var hasErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {
|
|
3343
|
+
return false;
|
|
3344
|
+
};
|
|
3336
3345
|
var _React$useState = React__default.useState(noTAC),
|
|
3337
3346
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3338
3347
|
TAC = _React$useState2[0],
|
|
@@ -3369,25 +3378,35 @@ var useTAC = function useTAC(initialProduct, getTAC) {
|
|
|
3369
3378
|
}));
|
|
3370
3379
|
};
|
|
3371
3380
|
React__default.useEffect(function () {
|
|
3372
|
-
if (shouldRetrieveTAC(initialProduct)) {
|
|
3381
|
+
if (shouldRetrieveTAC(initialProduct) && !hasErrors()) {
|
|
3373
3382
|
retrieveTAC(initialProduct);
|
|
3374
3383
|
}
|
|
3375
3384
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3376
3385
|
}, []);
|
|
3377
|
-
var update = function update(formValues) {
|
|
3378
|
-
if (shouldRetrieveTAC(formValues)) {
|
|
3386
|
+
var update = function update(formValues, hasFormErrors) {
|
|
3387
|
+
if (shouldRetrieveTAC(formValues) && !hasFormErrors) {
|
|
3379
3388
|
retrieveTAC(formValues);
|
|
3380
3389
|
} else if (isMounted.current) {
|
|
3381
3390
|
setTAC(noTAC);
|
|
3382
3391
|
}
|
|
3383
3392
|
};
|
|
3384
|
-
var
|
|
3385
|
-
return
|
|
3386
|
-
return
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3393
|
+
var debouncedSearch = React__default.useRef(debounce(function (formFn, hasFormErrors) {
|
|
3394
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3395
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3396
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
3397
|
+
case 0:
|
|
3398
|
+
update(formFn(), hasFormErrors());
|
|
3399
|
+
case 1:
|
|
3400
|
+
case "end":
|
|
3401
|
+
return _context2.stop();
|
|
3402
|
+
}
|
|
3403
|
+
}, _callee2);
|
|
3404
|
+
}));
|
|
3405
|
+
}, 1000)).current;
|
|
3406
|
+
var delayedQuery = function delayedQuery(formFn) {
|
|
3407
|
+
debouncedSearch.cancel();
|
|
3408
|
+
debouncedSearch(formFn, hasErrors);
|
|
3409
|
+
};
|
|
3391
3410
|
return [TAC, delayedQuery];
|
|
3392
3411
|
};
|
|
3393
3412
|
var ProductFormTAC = function ProductFormTAC(_ref) {
|
|
@@ -8130,14 +8149,18 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8130
8149
|
var _useFormContext2 = useFormContext(),
|
|
8131
8150
|
watch = _useFormContext2.watch,
|
|
8132
8151
|
setValue = _useFormContext2.setValue,
|
|
8133
|
-
handleSubmit = _useFormContext2.handleSubmit
|
|
8152
|
+
handleSubmit = _useFormContext2.handleSubmit,
|
|
8153
|
+
errors = _useFormContext2.formState.errors;
|
|
8154
|
+
var getHasFormErrors = function getHasFormErrors() {
|
|
8155
|
+
return Object.keys(errors).length > 0;
|
|
8156
|
+
};
|
|
8134
8157
|
var _React$useState = React__default.useState(mode === 'view'),
|
|
8135
8158
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
8136
8159
|
isDisabled = _React$useState2[0],
|
|
8137
8160
|
setIsDisabled = _React$useState2[1];
|
|
8138
8161
|
var isReadOnly = mode === 'view';
|
|
8139
8162
|
var helperText = isDisabled ? '' : 'Optional';
|
|
8140
|
-
var _useTAC = useTAC(initialSigmet !== null ? initialSigmet : initialCancelSigmet, api.getSigmetTAC),
|
|
8163
|
+
var _useTAC = useTAC(initialSigmet !== null ? initialSigmet : initialCancelSigmet, api.getSigmetTAC, getHasFormErrors),
|
|
8141
8164
|
_useTAC2 = _slicedToArray(_useTAC, 2),
|
|
8142
8165
|
tac = _useTAC2[0],
|
|
8143
8166
|
updateTac = _useTAC2[1];
|
|
@@ -8378,14 +8401,18 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8378
8401
|
setValue = _useFormContext2.setValue,
|
|
8379
8402
|
handleSubmit = _useFormContext2.handleSubmit,
|
|
8380
8403
|
getValues = _useFormContext2.getValues,
|
|
8381
|
-
trigger = _useFormContext2.trigger
|
|
8404
|
+
trigger = _useFormContext2.trigger,
|
|
8405
|
+
errors = _useFormContext2.formState.errors;
|
|
8406
|
+
var getHasFormErrors = function getHasFormErrors() {
|
|
8407
|
+
return Object.keys(errors).length > 0;
|
|
8408
|
+
};
|
|
8382
8409
|
var _React$useState = React__default.useState(mode === 'view'),
|
|
8383
8410
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
8384
8411
|
isDisabled = _React$useState2[0],
|
|
8385
8412
|
setIsDisabled = _React$useState2[1];
|
|
8386
8413
|
var isReadOnly = mode === 'view';
|
|
8387
8414
|
var helperText = isDisabled ? '' : 'Optional';
|
|
8388
|
-
var _useTAC = useTAC(initialAirmet !== null ? initialAirmet : initialCancelAirmet, api.getAirmetTAC),
|
|
8415
|
+
var _useTAC = useTAC(initialAirmet !== null ? initialAirmet : initialCancelAirmet, api.getAirmetTAC, getHasFormErrors),
|
|
8389
8416
|
_useTAC2 = _slicedToArray(_useTAC, 2),
|
|
8390
8417
|
tac = _useTAC2[0],
|
|
8391
8418
|
updateTac = _useTAC2[1];
|
|
@@ -12472,7 +12499,7 @@ tags.forEach(function (tagName) {
|
|
|
12472
12499
|
});
|
|
12473
12500
|
|
|
12474
12501
|
/**
|
|
12475
|
-
* @mui/styled-engine v5.
|
|
12502
|
+
* @mui/styled-engine v5.14.8
|
|
12476
12503
|
*
|
|
12477
12504
|
* @license MIT
|
|
12478
12505
|
* This source code is licensed under the MIT license found in the
|
|
@@ -13114,10 +13141,20 @@ const width = style$1({
|
|
|
13114
13141
|
const maxWidth = props => {
|
|
13115
13142
|
if (props.maxWidth !== undefined && props.maxWidth !== null) {
|
|
13116
13143
|
const styleFromPropValue = propValue => {
|
|
13117
|
-
var _props$theme;
|
|
13144
|
+
var _props$theme, _props$theme2;
|
|
13118
13145
|
const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || values[propValue];
|
|
13146
|
+
if (!breakpoint) {
|
|
13147
|
+
return {
|
|
13148
|
+
maxWidth: sizingTransform(propValue)
|
|
13149
|
+
};
|
|
13150
|
+
}
|
|
13151
|
+
if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
|
|
13152
|
+
return {
|
|
13153
|
+
maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
|
|
13154
|
+
};
|
|
13155
|
+
}
|
|
13119
13156
|
return {
|
|
13120
|
-
maxWidth: breakpoint
|
|
13157
|
+
maxWidth: breakpoint
|
|
13121
13158
|
};
|
|
13122
13159
|
};
|
|
13123
13160
|
return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
|
|
@@ -13748,7 +13785,7 @@ var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref)
|
|
|
13748
13785
|
key: "UNKNOWN",
|
|
13749
13786
|
value: "UNKNOWN",
|
|
13750
13787
|
control: /*#__PURE__*/React__default.createElement(Radio, null),
|
|
13751
|
-
label: "
|
|
13788
|
+
label: "Cancel VA SIGMET without VA MOV TO information"
|
|
13752
13789
|
})));
|
|
13753
13790
|
};
|
|
13754
13791
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,25 +12,26 @@
|
|
|
12
12
|
"main": "./index.esm.js",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@mui/material": "5.12.0",
|
|
15
|
-
"@mui/system": "5.14.
|
|
16
|
-
"@opengeoweb/api": "6.
|
|
17
|
-
"@opengeoweb/authentication": "6.
|
|
18
|
-
"@opengeoweb/core": "6.
|
|
19
|
-
"@opengeoweb/form-fields": "6.
|
|
20
|
-
"@opengeoweb/shared": "6.
|
|
21
|
-
"@opengeoweb/store": "6.
|
|
22
|
-
"@opengeoweb/theme": "6.
|
|
23
|
-
"@opengeoweb/webmap": "6.
|
|
15
|
+
"@mui/system": "5.14.8",
|
|
16
|
+
"@opengeoweb/api": "6.1.1",
|
|
17
|
+
"@opengeoweb/authentication": "6.1.1",
|
|
18
|
+
"@opengeoweb/core": "6.1.1",
|
|
19
|
+
"@opengeoweb/form-fields": "6.1.1",
|
|
20
|
+
"@opengeoweb/shared": "6.1.1",
|
|
21
|
+
"@opengeoweb/store": "6.1.1",
|
|
22
|
+
"@opengeoweb/theme": "6.1.1",
|
|
23
|
+
"@opengeoweb/webmap": "6.1.1",
|
|
24
|
+
"@opengeoweb/webmap-react": "6.1.1",
|
|
24
25
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
25
26
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
26
27
|
"@reduxjs/toolkit": "1.9.5",
|
|
27
28
|
"@turf/turf": "6.5.0",
|
|
28
|
-
"axios": "1.
|
|
29
|
+
"axios": "1.5.0",
|
|
29
30
|
"immer": "9.0.21",
|
|
30
31
|
"lodash": "4.17.21",
|
|
31
32
|
"moment": "2.29.4",
|
|
32
33
|
"react": "18.2.0",
|
|
33
|
-
"react-hook-form": "7.
|
|
34
|
+
"react-hook-form": "7.46.1",
|
|
34
35
|
"react-redux": "8.1.2"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { mapTypes, layerTypes } from '@opengeoweb/store';
|
|
3
|
-
import { MapViewLayerProps } from '@opengeoweb/
|
|
3
|
+
import { MapViewLayerProps } from '@opengeoweb/webmap-react';
|
|
4
4
|
export interface MapViewGeoJsonProps {
|
|
5
5
|
baseLayers?: layerTypes.Layer[];
|
|
6
6
|
projection?: mapTypes.MapPreset['proj'];
|
|
@@ -5,7 +5,7 @@ export declare const noTAC = "Missing data: no TAC can be generated";
|
|
|
5
5
|
export declare const shouldRetrieveTAC: (product: AviationProduct) => boolean;
|
|
6
6
|
export declare const useTAC: (initialProduct: AviationProduct, getTAC: (product: AviationProduct) => Promise<{
|
|
7
7
|
data: string;
|
|
8
|
-
}
|
|
8
|
+
}>, hasErrors?: () => boolean) => [string, any];
|
|
9
9
|
interface ProductFormTACProps {
|
|
10
10
|
tac: string;
|
|
11
11
|
}
|