@opengeoweb/taf 6.1.0 → 7.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 +238 -239
- package/package.json +10 -10
- package/src/lib/components/IssuesPane/utils.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/TafFormTextField.d.ts +2 -2
- package/src/lib/components/TafForm/TafFormRow/validations/clouds.d.ts +2 -2
- package/src/lib/components/TafForm/TafFormRow/validations/weather.d.ts +2 -2
- package/src/lib/components/TafLayout/TafPanel/TafPanel.d.ts +1 -1
- package/src/lib/types.d.ts +20 -12
package/index.esm.js
CHANGED
|
@@ -13,337 +13,342 @@ import { useApiContext, createApiInstance, createFakeApiInstance, ApiProvider }
|
|
|
13
13
|
import LinearProgress from '@mui/material/LinearProgress';
|
|
14
14
|
import Box$1 from '@mui/material/Box';
|
|
15
15
|
|
|
16
|
-
function _iterableToArrayLimit(
|
|
17
|
-
var
|
|
18
|
-
if (null !=
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
function _iterableToArrayLimit(r, l) {
|
|
17
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
18
|
+
if (null != t) {
|
|
19
|
+
var e,
|
|
20
|
+
n,
|
|
21
|
+
i,
|
|
22
|
+
u,
|
|
23
|
+
a = [],
|
|
24
|
+
f = !0,
|
|
25
|
+
o = !1;
|
|
26
26
|
try {
|
|
27
|
-
if (
|
|
28
|
-
if (Object(
|
|
29
|
-
|
|
30
|
-
} else for (; !(
|
|
31
|
-
} catch (
|
|
32
|
-
|
|
27
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
28
|
+
if (Object(t) !== t) return;
|
|
29
|
+
f = !1;
|
|
30
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
31
|
+
} catch (r) {
|
|
32
|
+
o = !0, n = r;
|
|
33
33
|
} finally {
|
|
34
34
|
try {
|
|
35
|
-
if (!
|
|
35
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
36
36
|
} finally {
|
|
37
|
-
if (
|
|
37
|
+
if (o) throw n;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return a;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
function _regeneratorRuntime() {
|
|
44
44
|
_regeneratorRuntime = function () {
|
|
45
|
-
return
|
|
45
|
+
return e;
|
|
46
46
|
};
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
var t,
|
|
48
|
+
e = {},
|
|
49
|
+
r = Object.prototype,
|
|
50
|
+
n = r.hasOwnProperty,
|
|
51
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
52
|
+
t[e] = r.value;
|
|
52
53
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
function define(
|
|
58
|
-
return Object.defineProperty(
|
|
59
|
-
value:
|
|
54
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
55
|
+
a = i.iterator || "@@iterator",
|
|
56
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
57
|
+
u = i.toStringTag || "@@toStringTag";
|
|
58
|
+
function define(t, e, r) {
|
|
59
|
+
return Object.defineProperty(t, e, {
|
|
60
|
+
value: r,
|
|
60
61
|
enumerable: !0,
|
|
61
62
|
configurable: !0,
|
|
62
63
|
writable: !0
|
|
63
|
-
}),
|
|
64
|
+
}), t[e];
|
|
64
65
|
}
|
|
65
66
|
try {
|
|
66
67
|
define({}, "");
|
|
67
|
-
} catch (
|
|
68
|
-
define = function (
|
|
69
|
-
return
|
|
68
|
+
} catch (t) {
|
|
69
|
+
define = function (t, e, r) {
|
|
70
|
+
return t[e] = r;
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
function wrap(
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
value: makeInvokeMethod(
|
|
78
|
-
}),
|
|
73
|
+
function wrap(t, e, r, n) {
|
|
74
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
75
|
+
a = Object.create(i.prototype),
|
|
76
|
+
c = new Context(n || []);
|
|
77
|
+
return o(a, "_invoke", {
|
|
78
|
+
value: makeInvokeMethod(t, r, c)
|
|
79
|
+
}), a;
|
|
79
80
|
}
|
|
80
|
-
function tryCatch(
|
|
81
|
+
function tryCatch(t, e, r) {
|
|
81
82
|
try {
|
|
82
83
|
return {
|
|
83
84
|
type: "normal",
|
|
84
|
-
arg:
|
|
85
|
+
arg: t.call(e, r)
|
|
85
86
|
};
|
|
86
|
-
} catch (
|
|
87
|
+
} catch (t) {
|
|
87
88
|
return {
|
|
88
89
|
type: "throw",
|
|
89
|
-
arg:
|
|
90
|
+
arg: t
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
var
|
|
94
|
+
e.wrap = wrap;
|
|
95
|
+
var h = "suspendedStart",
|
|
96
|
+
l = "suspendedYield",
|
|
97
|
+
f = "executing",
|
|
98
|
+
s = "completed",
|
|
99
|
+
y = {};
|
|
95
100
|
function Generator() {}
|
|
96
101
|
function GeneratorFunction() {}
|
|
97
102
|
function GeneratorFunctionPrototype() {}
|
|
98
|
-
var
|
|
99
|
-
define(
|
|
103
|
+
var p = {};
|
|
104
|
+
define(p, a, function () {
|
|
100
105
|
return this;
|
|
101
106
|
});
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
function defineIteratorMethods(
|
|
107
|
-
["next", "throw", "return"].forEach(function (
|
|
108
|
-
define(
|
|
109
|
-
return this._invoke(
|
|
107
|
+
var d = Object.getPrototypeOf,
|
|
108
|
+
v = d && d(d(values([])));
|
|
109
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
110
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
111
|
+
function defineIteratorMethods(t) {
|
|
112
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
113
|
+
define(t, e, function (t) {
|
|
114
|
+
return this._invoke(e, t);
|
|
110
115
|
});
|
|
111
116
|
});
|
|
112
117
|
}
|
|
113
|
-
function AsyncIterator(
|
|
114
|
-
function invoke(
|
|
115
|
-
var
|
|
116
|
-
if ("throw" !==
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
return
|
|
120
|
-
invoke("next",
|
|
121
|
-
}, function (
|
|
122
|
-
invoke("throw",
|
|
123
|
-
}) :
|
|
124
|
-
|
|
125
|
-
}, function (
|
|
126
|
-
return invoke("throw",
|
|
118
|
+
function AsyncIterator(t, e) {
|
|
119
|
+
function invoke(r, o, i, a) {
|
|
120
|
+
var c = tryCatch(t[r], t, o);
|
|
121
|
+
if ("throw" !== c.type) {
|
|
122
|
+
var u = c.arg,
|
|
123
|
+
h = u.value;
|
|
124
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
125
|
+
invoke("next", t, i, a);
|
|
126
|
+
}, function (t) {
|
|
127
|
+
invoke("throw", t, i, a);
|
|
128
|
+
}) : e.resolve(h).then(function (t) {
|
|
129
|
+
u.value = t, i(u);
|
|
130
|
+
}, function (t) {
|
|
131
|
+
return invoke("throw", t, i, a);
|
|
127
132
|
});
|
|
128
133
|
}
|
|
129
|
-
|
|
134
|
+
a(c.arg);
|
|
130
135
|
}
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
value: function (
|
|
136
|
+
var r;
|
|
137
|
+
o(this, "_invoke", {
|
|
138
|
+
value: function (t, n) {
|
|
134
139
|
function callInvokeWithMethodAndArg() {
|
|
135
|
-
return new
|
|
136
|
-
invoke(
|
|
140
|
+
return new e(function (e, r) {
|
|
141
|
+
invoke(t, n, e, r);
|
|
137
142
|
});
|
|
138
143
|
}
|
|
139
|
-
return
|
|
144
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
140
145
|
}
|
|
141
146
|
});
|
|
142
147
|
}
|
|
143
|
-
function makeInvokeMethod(
|
|
144
|
-
var
|
|
145
|
-
return function (
|
|
146
|
-
if (
|
|
147
|
-
if (
|
|
148
|
-
if ("throw" ===
|
|
148
|
+
function makeInvokeMethod(e, r, n) {
|
|
149
|
+
var o = h;
|
|
150
|
+
return function (i, a) {
|
|
151
|
+
if (o === f) throw new Error("Generator is already running");
|
|
152
|
+
if (o === s) {
|
|
153
|
+
if ("throw" === i) throw a;
|
|
149
154
|
return {
|
|
150
|
-
value:
|
|
155
|
+
value: t,
|
|
151
156
|
done: !0
|
|
152
157
|
};
|
|
153
158
|
}
|
|
154
|
-
for (
|
|
155
|
-
var
|
|
156
|
-
if (
|
|
157
|
-
var
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
160
|
-
return
|
|
159
|
+
for (n.method = i, n.arg = a;;) {
|
|
160
|
+
var c = n.delegate;
|
|
161
|
+
if (c) {
|
|
162
|
+
var u = maybeInvokeDelegate(c, n);
|
|
163
|
+
if (u) {
|
|
164
|
+
if (u === y) continue;
|
|
165
|
+
return u;
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
|
-
if ("next" ===
|
|
164
|
-
if (
|
|
165
|
-
|
|
166
|
-
} else "return" ===
|
|
167
|
-
|
|
168
|
-
var
|
|
169
|
-
if ("normal" ===
|
|
170
|
-
if (
|
|
168
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
169
|
+
if (o === h) throw o = s, n.arg;
|
|
170
|
+
n.dispatchException(n.arg);
|
|
171
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
172
|
+
o = f;
|
|
173
|
+
var p = tryCatch(e, r, n);
|
|
174
|
+
if ("normal" === p.type) {
|
|
175
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
171
176
|
return {
|
|
172
|
-
value:
|
|
173
|
-
done:
|
|
177
|
+
value: p.arg,
|
|
178
|
+
done: n.done
|
|
174
179
|
};
|
|
175
180
|
}
|
|
176
|
-
"throw" ===
|
|
181
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
177
182
|
}
|
|
178
183
|
};
|
|
179
184
|
}
|
|
180
|
-
function maybeInvokeDelegate(
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
if (
|
|
184
|
-
var
|
|
185
|
-
if ("throw" ===
|
|
186
|
-
var
|
|
187
|
-
return
|
|
188
|
-
}
|
|
189
|
-
function pushTryEntry(
|
|
190
|
-
var
|
|
191
|
-
tryLoc:
|
|
185
|
+
function maybeInvokeDelegate(e, r) {
|
|
186
|
+
var n = r.method,
|
|
187
|
+
o = e.iterator[n];
|
|
188
|
+
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;
|
|
189
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
190
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
191
|
+
var a = i.arg;
|
|
192
|
+
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);
|
|
193
|
+
}
|
|
194
|
+
function pushTryEntry(t) {
|
|
195
|
+
var e = {
|
|
196
|
+
tryLoc: t[0]
|
|
192
197
|
};
|
|
193
|
-
1 in
|
|
198
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
194
199
|
}
|
|
195
|
-
function resetTryEntry(
|
|
196
|
-
var
|
|
197
|
-
|
|
200
|
+
function resetTryEntry(t) {
|
|
201
|
+
var e = t.completion || {};
|
|
202
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
198
203
|
}
|
|
199
|
-
function Context(
|
|
204
|
+
function Context(t) {
|
|
200
205
|
this.tryEntries = [{
|
|
201
206
|
tryLoc: "root"
|
|
202
|
-
}],
|
|
203
|
-
}
|
|
204
|
-
function values(
|
|
205
|
-
if (
|
|
206
|
-
var
|
|
207
|
-
if (
|
|
208
|
-
if ("function" == typeof
|
|
209
|
-
if (!isNaN(
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
for (; ++
|
|
213
|
-
return next.value =
|
|
207
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
208
|
+
}
|
|
209
|
+
function values(e) {
|
|
210
|
+
if (e || "" === e) {
|
|
211
|
+
var r = e[a];
|
|
212
|
+
if (r) return r.call(e);
|
|
213
|
+
if ("function" == typeof e.next) return e;
|
|
214
|
+
if (!isNaN(e.length)) {
|
|
215
|
+
var o = -1,
|
|
216
|
+
i = function next() {
|
|
217
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
218
|
+
return next.value = t, next.done = !0, next;
|
|
214
219
|
};
|
|
215
|
-
return
|
|
220
|
+
return i.next = i;
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
|
-
throw new TypeError(typeof
|
|
223
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
219
224
|
}
|
|
220
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
225
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
221
226
|
value: GeneratorFunctionPrototype,
|
|
222
227
|
configurable: !0
|
|
223
|
-
}),
|
|
228
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
224
229
|
value: GeneratorFunction,
|
|
225
230
|
configurable: !0
|
|
226
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
227
|
-
var
|
|
228
|
-
return !!
|
|
229
|
-
},
|
|
230
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
231
|
-
},
|
|
231
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
232
|
+
var e = "function" == typeof t && t.constructor;
|
|
233
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
234
|
+
}, e.mark = function (t) {
|
|
235
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
236
|
+
}, e.awrap = function (t) {
|
|
232
237
|
return {
|
|
233
|
-
__await:
|
|
238
|
+
__await: t
|
|
234
239
|
};
|
|
235
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
240
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
236
241
|
return this;
|
|
237
|
-
}),
|
|
238
|
-
void 0 ===
|
|
239
|
-
var
|
|
240
|
-
return
|
|
241
|
-
return
|
|
242
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
243
|
+
void 0 === i && (i = Promise);
|
|
244
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
245
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
246
|
+
return t.done ? t.value : a.next();
|
|
242
247
|
});
|
|
243
|
-
}, defineIteratorMethods(
|
|
248
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
244
249
|
return this;
|
|
245
|
-
}), define(
|
|
250
|
+
}), define(g, "toString", function () {
|
|
246
251
|
return "[object Generator]";
|
|
247
|
-
}),
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
for (var
|
|
251
|
-
return
|
|
252
|
-
for (;
|
|
253
|
-
var
|
|
254
|
-
if (
|
|
252
|
+
}), e.keys = function (t) {
|
|
253
|
+
var e = Object(t),
|
|
254
|
+
r = [];
|
|
255
|
+
for (var n in e) r.push(n);
|
|
256
|
+
return r.reverse(), function next() {
|
|
257
|
+
for (; r.length;) {
|
|
258
|
+
var t = r.pop();
|
|
259
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
255
260
|
}
|
|
256
261
|
return next.done = !0, next;
|
|
257
262
|
};
|
|
258
|
-
},
|
|
263
|
+
}, e.values = values, Context.prototype = {
|
|
259
264
|
constructor: Context,
|
|
260
|
-
reset: function (
|
|
261
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
265
|
+
reset: function (e) {
|
|
266
|
+
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);
|
|
262
267
|
},
|
|
263
268
|
stop: function () {
|
|
264
269
|
this.done = !0;
|
|
265
|
-
var
|
|
266
|
-
if ("throw" ===
|
|
270
|
+
var t = this.tryEntries[0].completion;
|
|
271
|
+
if ("throw" === t.type) throw t.arg;
|
|
267
272
|
return this.rval;
|
|
268
273
|
},
|
|
269
|
-
dispatchException: function (
|
|
270
|
-
if (this.done) throw
|
|
271
|
-
var
|
|
272
|
-
function handle(
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
|
-
for (var
|
|
276
|
-
var
|
|
277
|
-
|
|
278
|
-
if ("root" ===
|
|
279
|
-
if (
|
|
280
|
-
var
|
|
281
|
-
|
|
282
|
-
if (
|
|
283
|
-
if (this.prev <
|
|
284
|
-
if (this.prev <
|
|
285
|
-
} else if (
|
|
286
|
-
if (this.prev <
|
|
274
|
+
dispatchException: function (e) {
|
|
275
|
+
if (this.done) throw e;
|
|
276
|
+
var r = this;
|
|
277
|
+
function handle(n, o) {
|
|
278
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
279
|
+
}
|
|
280
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
281
|
+
var i = this.tryEntries[o],
|
|
282
|
+
a = i.completion;
|
|
283
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
284
|
+
if (i.tryLoc <= this.prev) {
|
|
285
|
+
var c = n.call(i, "catchLoc"),
|
|
286
|
+
u = n.call(i, "finallyLoc");
|
|
287
|
+
if (c && u) {
|
|
288
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
289
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
290
|
+
} else if (c) {
|
|
291
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
287
292
|
} else {
|
|
288
|
-
if (!
|
|
289
|
-
if (this.prev <
|
|
293
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
294
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
290
295
|
}
|
|
291
296
|
}
|
|
292
297
|
}
|
|
293
298
|
},
|
|
294
|
-
abrupt: function (
|
|
295
|
-
for (var
|
|
296
|
-
var
|
|
297
|
-
if (
|
|
298
|
-
var
|
|
299
|
+
abrupt: function (t, e) {
|
|
300
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
301
|
+
var o = this.tryEntries[r];
|
|
302
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
303
|
+
var i = o;
|
|
299
304
|
break;
|
|
300
305
|
}
|
|
301
306
|
}
|
|
302
|
-
|
|
303
|
-
var
|
|
304
|
-
return
|
|
307
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
308
|
+
var a = i ? i.completion : {};
|
|
309
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
305
310
|
},
|
|
306
|
-
complete: function (
|
|
307
|
-
if ("throw" ===
|
|
308
|
-
return "break" ===
|
|
311
|
+
complete: function (t, e) {
|
|
312
|
+
if ("throw" === t.type) throw t.arg;
|
|
313
|
+
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;
|
|
309
314
|
},
|
|
310
|
-
finish: function (
|
|
311
|
-
for (var
|
|
312
|
-
var
|
|
313
|
-
if (
|
|
315
|
+
finish: function (t) {
|
|
316
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
317
|
+
var r = this.tryEntries[e];
|
|
318
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
314
319
|
}
|
|
315
320
|
},
|
|
316
|
-
catch: function (
|
|
317
|
-
for (var
|
|
318
|
-
var
|
|
319
|
-
if (
|
|
320
|
-
var
|
|
321
|
-
if ("throw" ===
|
|
322
|
-
var
|
|
323
|
-
resetTryEntry(
|
|
321
|
+
catch: function (t) {
|
|
322
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
323
|
+
var r = this.tryEntries[e];
|
|
324
|
+
if (r.tryLoc === t) {
|
|
325
|
+
var n = r.completion;
|
|
326
|
+
if ("throw" === n.type) {
|
|
327
|
+
var o = n.arg;
|
|
328
|
+
resetTryEntry(r);
|
|
324
329
|
}
|
|
325
|
-
return
|
|
330
|
+
return o;
|
|
326
331
|
}
|
|
327
332
|
}
|
|
328
333
|
throw new Error("illegal catch attempt");
|
|
329
334
|
},
|
|
330
|
-
delegateYield: function (
|
|
335
|
+
delegateYield: function (e, r, n) {
|
|
331
336
|
return this.delegate = {
|
|
332
|
-
iterator: values(
|
|
333
|
-
resultName:
|
|
334
|
-
nextLoc:
|
|
335
|
-
}, "next" === this.method && (this.arg =
|
|
337
|
+
iterator: values(e),
|
|
338
|
+
resultName: r,
|
|
339
|
+
nextLoc: n
|
|
340
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
336
341
|
}
|
|
337
|
-
},
|
|
342
|
+
}, e;
|
|
338
343
|
}
|
|
339
|
-
function _typeof$1(
|
|
344
|
+
function _typeof$1(o) {
|
|
340
345
|
"@babel/helpers - typeof";
|
|
341
346
|
|
|
342
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
343
|
-
return typeof
|
|
344
|
-
} : function (
|
|
345
|
-
return
|
|
346
|
-
}, _typeof$1(
|
|
347
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
348
|
+
return typeof o;
|
|
349
|
+
} : function (o) {
|
|
350
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
351
|
+
}, _typeof$1(o);
|
|
347
352
|
}
|
|
348
353
|
function _defineProperty$1(obj, key, value) {
|
|
349
354
|
key = _toPropertyKey(key);
|
|
@@ -28467,14 +28472,11 @@ var validateThirdWeatherField = function validateThirdWeatherField(weather1Value
|
|
|
28467
28472
|
}
|
|
28468
28473
|
return validateWeatherField(weather3Value, visibilityValue, false);
|
|
28469
28474
|
};
|
|
28470
|
-
// parser
|
|
28471
|
-
// TODO: value type = Weather, but couldn't get it to work properly https://gitlab.com/opengeoweb/opengeoweb/-/issues/119
|
|
28472
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
28473
28475
|
function parseWeatherToObject(value) {
|
|
28474
28476
|
var trimmedWeather = Object.keys(value).reduce(function (obj, key) {
|
|
28475
28477
|
// only parse it if it has a value
|
|
28476
|
-
if (value[key] && value[key].trim()) {
|
|
28477
|
-
return Object.assign(Object.assign({}, obj), _defineProperty$1({}, key, obj[key].trim()));
|
|
28478
|
+
if (value[key] && String(value[key]).trim()) {
|
|
28479
|
+
return Object.assign(Object.assign({}, obj), _defineProperty$1({}, key, String(obj[key]).trim()));
|
|
28478
28480
|
}
|
|
28479
28481
|
// if it doesn't have a value, remove it from the list
|
|
28480
28482
|
var _a = obj,
|
|
@@ -28793,8 +28795,6 @@ var formatSingleCloud = function formatSingleCloud(value) {
|
|
|
28793
28795
|
var height = !value.height ? '000' : prependZeroes(value.height, 3);
|
|
28794
28796
|
return value.type ? "".concat(value.coverage).concat(height).concat(value.type) : "".concat(value.coverage).concat(height);
|
|
28795
28797
|
};
|
|
28796
|
-
// TODO: clouds type = Clouds, but couldn't get it to work properly https://gitlab.com/opengeoweb/opengeoweb/-/issues/119
|
|
28797
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
28798
28798
|
var formatCloudsToString = function formatCloudsToString(clouds) {
|
|
28799
28799
|
if (!clouds) {
|
|
28800
28800
|
return null;
|
|
@@ -28840,19 +28840,17 @@ var parseSingleCloud = function parseSingleCloud(value) {
|
|
|
28840
28840
|
type: cloudType
|
|
28841
28841
|
});
|
|
28842
28842
|
};
|
|
28843
|
-
// TODO: clouds type = CloudStrings, but couldn't get it to work properly https://gitlab.com/opengeoweb/opengeoweb/-/issues/119
|
|
28844
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
28845
28843
|
var parseCloudsToObject = function parseCloudsToObject(clouds) {
|
|
28846
28844
|
if (!clouds) {
|
|
28847
28845
|
return null;
|
|
28848
28846
|
}
|
|
28849
28847
|
return Object.keys(clouds).reduce(function (list, key) {
|
|
28850
28848
|
// only parse it if it has a value
|
|
28851
|
-
if (clouds[key] && clouds[key].trim()) {
|
|
28849
|
+
if (clouds[key] && String(clouds[key]).trim()) {
|
|
28852
28850
|
switch (key) {
|
|
28853
28851
|
case 'cloud1':
|
|
28854
28852
|
{
|
|
28855
|
-
var trimmedValue = clouds[key].trim();
|
|
28853
|
+
var trimmedValue = String(clouds[key]).trim();
|
|
28856
28854
|
if (isVerticalVisibility(trimmedValue)) {
|
|
28857
28855
|
// Parse Vertical Visibility
|
|
28858
28856
|
return Object.assign(Object.assign({}, list), _defineProperty$1({}, key, {
|
|
@@ -28869,7 +28867,7 @@ var parseCloudsToObject = function parseCloudsToObject(clouds) {
|
|
|
28869
28867
|
default:
|
|
28870
28868
|
{
|
|
28871
28869
|
// Other cloud keys can only contain a cloud
|
|
28872
|
-
return Object.assign(Object.assign({}, list), _defineProperty$1({}, key, parseSingleCloud(clouds[key])));
|
|
28870
|
+
return Object.assign(Object.assign({}, list), _defineProperty$1({}, key, parseSingleCloud(String(clouds[key]))));
|
|
28873
28871
|
}
|
|
28874
28872
|
}
|
|
28875
28873
|
}
|
|
@@ -29300,7 +29298,6 @@ function formatFormValues(row) {
|
|
|
29300
29298
|
// parsers
|
|
29301
29299
|
function reduceRowValues(row, tafStart, tafEnd) {
|
|
29302
29300
|
return Object.keys(row).reduce(function (list, key) {
|
|
29303
|
-
var _a;
|
|
29304
29301
|
switch (key) {
|
|
29305
29302
|
case 'valid':
|
|
29306
29303
|
{
|
|
@@ -29334,7 +29331,7 @@ function reduceRowValues(row, tafStart, tafEnd) {
|
|
|
29334
29331
|
case 'change':
|
|
29335
29332
|
case 'probability':
|
|
29336
29333
|
{
|
|
29337
|
-
return Object.assign(Object.assign({}, list), _defineProperty$1({}, key, (
|
|
29334
|
+
return Object.assign(Object.assign({}, list), _defineProperty$1({}, key, String(list[key]).trim()));
|
|
29338
29335
|
}
|
|
29339
29336
|
default:
|
|
29340
29337
|
{
|
|
@@ -32366,7 +32363,9 @@ var getTafErrors = function getTafErrors(name, errors) {
|
|
|
32366
32363
|
if (errors.changeGroups) {
|
|
32367
32364
|
var changeGroupNum = nameAsArray[0].slice(13, nameAsArray[0].length - 1);
|
|
32368
32365
|
var restArray = nameAsArray.slice(1);
|
|
32369
|
-
return getDeepProperty(restArray,
|
|
32366
|
+
return getDeepProperty(restArray,
|
|
32367
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32368
|
+
errors.changeGroups[changeGroupNum]);
|
|
32370
32369
|
}
|
|
32371
32370
|
// No changegroup errors
|
|
32372
32371
|
return null;
|
|
@@ -32623,7 +32622,7 @@ var getDefaultValue = function getDefaultValue(fieldName, data) {
|
|
|
32623
32622
|
if (!data) {
|
|
32624
32623
|
return '';
|
|
32625
32624
|
}
|
|
32626
|
-
return getDeepProperty(fieldName.split('.'), data) || '';
|
|
32625
|
+
return String(getDeepProperty(fieldName.split('.'), data) || '');
|
|
32627
32626
|
};
|
|
32628
32627
|
var getRequiredCrossFields = function getRequiredCrossFields(fieldNames) {
|
|
32629
32628
|
return [[fieldNames.valid], [fieldNames.change, fieldNames.probability], [fieldNames.wind, fieldNames.visibility, fieldNames.weather1, fieldNames.cloud1] // sub fields
|
|
@@ -32662,7 +32661,7 @@ var TafFormRow = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
|
|
|
32662
32661
|
mainOptionalFields = _getRequiredCrossFiel2[1],
|
|
32663
32662
|
subFields = _getRequiredCrossFiel2[2];
|
|
32664
32663
|
var hasFieldsValue = function hasFieldsValue(fields) {
|
|
32665
|
-
return fields.map(getValues).find(function (field) {
|
|
32664
|
+
return !!fields.map(getValues).find(function (field) {
|
|
32666
32665
|
return !!field;
|
|
32667
32666
|
});
|
|
32668
32667
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@emotion/react": "11.11.1",
|
|
16
16
|
"@mui/material": "5.12.0",
|
|
17
|
-
"@opengeoweb/api": "
|
|
18
|
-
"@opengeoweb/authentication": "
|
|
19
|
-
"@opengeoweb/core": "
|
|
20
|
-
"@opengeoweb/form-fields": "
|
|
21
|
-
"@opengeoweb/shared": "
|
|
22
|
-
"@opengeoweb/store": "
|
|
23
|
-
"@opengeoweb/theme": "
|
|
17
|
+
"@opengeoweb/api": "7.0.0",
|
|
18
|
+
"@opengeoweb/authentication": "7.0.0",
|
|
19
|
+
"@opengeoweb/core": "7.0.0",
|
|
20
|
+
"@opengeoweb/form-fields": "7.0.0",
|
|
21
|
+
"@opengeoweb/shared": "7.0.0",
|
|
22
|
+
"@opengeoweb/store": "7.0.0",
|
|
23
|
+
"@opengeoweb/theme": "7.0.0",
|
|
24
24
|
"@reduxjs/toolkit": "1.9.5",
|
|
25
|
-
"axios": "1.
|
|
25
|
+
"axios": "1.5.0",
|
|
26
26
|
"lodash": "4.17.21",
|
|
27
27
|
"moment": "2.29.4",
|
|
28
28
|
"react": "18.2.0",
|
|
29
29
|
"react-dom": "18.2.0",
|
|
30
|
-
"react-hook-form": "7.
|
|
30
|
+
"react-hook-form": "7.46.1",
|
|
31
31
|
"react-redux": "8.1.2",
|
|
32
32
|
"react-sortablejs": "6.1.4",
|
|
33
33
|
"sortablejs": "1.15.0"
|
|
@@ -2,6 +2,6 @@ import { FieldError, FieldErrors } from 'react-hook-form';
|
|
|
2
2
|
import { CustomErrorField } from './types';
|
|
3
3
|
export declare const getCustomError: (error: FieldError, isChangeGroup: boolean, rowIndex: number) => CustomErrorField;
|
|
4
4
|
export declare const getIssuesLabel: (sumOfErrors: number) => string;
|
|
5
|
-
export declare const getErrorValues: (fieldErrors:
|
|
5
|
+
export declare const getErrorValues: (fieldErrors: FieldErrors, isChangeGroup?: boolean, rowIndex?: number) => FieldError[];
|
|
6
6
|
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
7
7
|
export declare const getErrors: (errors: FieldErrors) => CustomErrorField[];
|
|
@@ -10,9 +10,9 @@ interface TafFormTextFieldProps {
|
|
|
10
10
|
label: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
name: string;
|
|
13
|
-
onChange?: (e:
|
|
13
|
+
onChange?: (e: string) => void;
|
|
14
14
|
defaultValue?: string;
|
|
15
|
-
formatter?: (value:
|
|
15
|
+
formatter?: (value: string) => string;
|
|
16
16
|
rules?: RegisterOptions;
|
|
17
17
|
autoComplete?: {
|
|
18
18
|
key: string;
|
|
@@ -5,8 +5,8 @@ type CloudStrings = {
|
|
|
5
5
|
cloud3?: string;
|
|
6
6
|
cloud4?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const formatCloudsToString: (clouds:
|
|
9
|
-
export declare const parseCloudsToObject: (clouds:
|
|
8
|
+
export declare const formatCloudsToString: (clouds: Clouds) => CloudStrings;
|
|
9
|
+
export declare const parseCloudsToObject: (clouds: CloudStrings) => Clouds;
|
|
10
10
|
export declare const invalidCloud1Message = "Invalid cloud input, expected either <coverage><height><type(optional)> with coverage FEW, SCT, BKN or OVC and height consisting of 3 digits or NSC";
|
|
11
11
|
export declare const invalidCloudMessage = "Invalid cloud input, expected <coverage><height><type(optional)> with coverage FEW, SCT, BKN or OVC and height consisting of 3 digits";
|
|
12
12
|
export declare const invalidCloudCoverageMessage = "Invalid cloud coverage, expected FEW, SCT, BKN or OVC";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Weather } from '../../../../types';
|
|
1
|
+
import { Weather, WeatherStrings } from '../../../../types';
|
|
2
2
|
export declare const invalidWeatherMessage = "Invalid weather input, expected NSW or a valid weather code";
|
|
3
3
|
export declare const invalidWeatherCodeMessage = "Invalid weather input, invalid weather code";
|
|
4
4
|
export declare const invalidWeatherNSWMessage = "Invalid weather input, NSW is not allowed in the baseforecast and can only be used in the first weather group";
|
|
@@ -12,4 +12,4 @@ export declare const invalidWeatherFGVisibility = "Invalid weather input, weathe
|
|
|
12
12
|
export declare const validateWeatherField: (value: string, visibilityFieldValue: string, NSWAllowed?: boolean) => boolean | string;
|
|
13
13
|
export declare const validateSecondWeatherField: (weather1Value: string, weather2Value: string, visibilityFieldValue: string) => boolean | string;
|
|
14
14
|
export declare const validateThirdWeatherField: (weather1Value: string, weather2Value: string, weather3Value: string, visibilityFieldValue: string) => boolean | string;
|
|
15
|
-
export declare function parseWeatherToObject(value:
|
|
15
|
+
export declare function parseWeatherToObject(value: WeatherStrings): Weather;
|
|
@@ -30,7 +30,7 @@ export declare const usePostTafRequest: (request: (params?: unknown) => Promise<
|
|
|
30
30
|
isLoading: boolean;
|
|
31
31
|
error: TafError | undefined;
|
|
32
32
|
setError: (newError: TafError) => void;
|
|
33
|
-
doRequest: (params?:
|
|
33
|
+
doRequest: (params?: TafFromFrontEnd) => Promise<void>;
|
|
34
34
|
};
|
|
35
35
|
declare const TafPanel: React.FC<TafPanelProps>;
|
|
36
36
|
export default TafPanel;
|
package/src/lib/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type CloudCoverage = 'FEW' | 'SCT' | 'BKN' | 'OVC';
|
|
|
19
19
|
export type CloudType = 'CB' | 'TCU';
|
|
20
20
|
export interface Cloud {
|
|
21
21
|
coverage: CloudCoverage;
|
|
22
|
-
height: number;
|
|
22
|
+
height: number | null;
|
|
23
23
|
type?: CloudType;
|
|
24
24
|
}
|
|
25
25
|
export type NSC = 'NSC';
|
|
@@ -76,17 +76,8 @@ export interface BaseForecastFormData {
|
|
|
76
76
|
valid: string;
|
|
77
77
|
visibility?: string;
|
|
78
78
|
wind?: string;
|
|
79
|
-
weather?:
|
|
80
|
-
|
|
81
|
-
weather2?: string;
|
|
82
|
-
weather3?: string;
|
|
83
|
-
};
|
|
84
|
-
cloud?: {
|
|
85
|
-
cloud1: string;
|
|
86
|
-
cloud2?: string;
|
|
87
|
-
cloud3?: string;
|
|
88
|
-
cloud4?: string;
|
|
89
|
-
};
|
|
79
|
+
weather?: WeatherStrings;
|
|
80
|
+
cloud?: CloudStrings;
|
|
90
81
|
cavOK?: boolean;
|
|
91
82
|
}
|
|
92
83
|
export interface ChangeGroupFormData extends BaseForecastFormData {
|
|
@@ -148,3 +139,20 @@ export type AdverseWeatherTAC = {
|
|
|
148
139
|
}[][];
|
|
149
140
|
};
|
|
150
141
|
export type TAC = string | AdverseWeatherTAC;
|
|
142
|
+
export type CloudStrings = {
|
|
143
|
+
cloud1: string;
|
|
144
|
+
cloud2?: string;
|
|
145
|
+
cloud3?: string;
|
|
146
|
+
cloud4?: string;
|
|
147
|
+
};
|
|
148
|
+
export type WeatherStrings = {
|
|
149
|
+
weather1: string;
|
|
150
|
+
weather2?: string;
|
|
151
|
+
weather3?: string;
|
|
152
|
+
};
|
|
153
|
+
export interface ConfigKey {
|
|
154
|
+
key: string;
|
|
155
|
+
size: number;
|
|
156
|
+
minSize?: number;
|
|
157
|
+
maxSize?: number;
|
|
158
|
+
}
|