@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 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(arr, i) {
17
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
18
- if (null != _i) {
19
- var _s,
20
- _e,
21
- _x,
22
- _r,
23
- _arr = [],
24
- _n = !0,
25
- _d = !1;
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 (_x = (_i = _i.call(arr)).next, 0 === i) {
28
- if (Object(_i) !== _i) return;
29
- _n = !1;
30
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
31
- } catch (err) {
32
- _d = !0, _e = err;
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 (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
35
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
36
36
  } finally {
37
- if (_d) throw _e;
37
+ if (o) throw n;
38
38
  }
39
39
  }
40
- return _arr;
40
+ return a;
41
41
  }
42
42
  }
43
43
  function _regeneratorRuntime() {
44
44
  _regeneratorRuntime = function () {
45
- return exports;
45
+ return e;
46
46
  };
47
- var exports = {},
48
- Op = Object.prototype,
49
- hasOwn = Op.hasOwnProperty,
50
- defineProperty = Object.defineProperty || function (obj, key, desc) {
51
- obj[key] = desc.value;
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
- $Symbol = "function" == typeof Symbol ? Symbol : {},
54
- iteratorSymbol = $Symbol.iterator || "@@iterator",
55
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
56
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
57
- function define(obj, key, value) {
58
- return Object.defineProperty(obj, key, {
59
- value: 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
- }), obj[key];
64
+ }), t[e];
64
65
  }
65
66
  try {
66
67
  define({}, "");
67
- } catch (err) {
68
- define = function (obj, key, value) {
69
- return obj[key] = value;
68
+ } catch (t) {
69
+ define = function (t, e, r) {
70
+ return t[e] = r;
70
71
  };
71
72
  }
72
- function wrap(innerFn, outerFn, self, tryLocsList) {
73
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
74
- generator = Object.create(protoGenerator.prototype),
75
- context = new Context(tryLocsList || []);
76
- return defineProperty(generator, "_invoke", {
77
- value: makeInvokeMethod(innerFn, self, context)
78
- }), generator;
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(fn, obj, arg) {
81
+ function tryCatch(t, e, r) {
81
82
  try {
82
83
  return {
83
84
  type: "normal",
84
- arg: fn.call(obj, arg)
85
+ arg: t.call(e, r)
85
86
  };
86
- } catch (err) {
87
+ } catch (t) {
87
88
  return {
88
89
  type: "throw",
89
- arg: err
90
+ arg: t
90
91
  };
91
92
  }
92
93
  }
93
- exports.wrap = wrap;
94
- var ContinueSentinel = {};
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 IteratorPrototype = {};
99
- define(IteratorPrototype, iteratorSymbol, function () {
103
+ var p = {};
104
+ define(p, a, function () {
100
105
  return this;
101
106
  });
102
- var getProto = Object.getPrototypeOf,
103
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
104
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
105
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
106
- function defineIteratorMethods(prototype) {
107
- ["next", "throw", "return"].forEach(function (method) {
108
- define(prototype, method, function (arg) {
109
- return this._invoke(method, arg);
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(generator, PromiseImpl) {
114
- function invoke(method, arg, resolve, reject) {
115
- var record = tryCatch(generator[method], generator, arg);
116
- if ("throw" !== record.type) {
117
- var result = record.arg,
118
- value = result.value;
119
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
120
- invoke("next", value, resolve, reject);
121
- }, function (err) {
122
- invoke("throw", err, resolve, reject);
123
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
124
- result.value = unwrapped, resolve(result);
125
- }, function (error) {
126
- return invoke("throw", error, resolve, reject);
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
- reject(record.arg);
134
+ a(c.arg);
130
135
  }
131
- var previousPromise;
132
- defineProperty(this, "_invoke", {
133
- value: function (method, arg) {
136
+ var r;
137
+ o(this, "_invoke", {
138
+ value: function (t, n) {
134
139
  function callInvokeWithMethodAndArg() {
135
- return new PromiseImpl(function (resolve, reject) {
136
- invoke(method, arg, resolve, reject);
140
+ return new e(function (e, r) {
141
+ invoke(t, n, e, r);
137
142
  });
138
143
  }
139
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
144
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
140
145
  }
141
146
  });
142
147
  }
143
- function makeInvokeMethod(innerFn, self, context) {
144
- var state = "suspendedStart";
145
- return function (method, arg) {
146
- if ("executing" === state) throw new Error("Generator is already running");
147
- if ("completed" === state) {
148
- if ("throw" === method) throw arg;
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: void 0,
155
+ value: t,
151
156
  done: !0
152
157
  };
153
158
  }
154
- for (context.method = method, context.arg = arg;;) {
155
- var delegate = context.delegate;
156
- if (delegate) {
157
- var delegateResult = maybeInvokeDelegate(delegate, context);
158
- if (delegateResult) {
159
- if (delegateResult === ContinueSentinel) continue;
160
- return delegateResult;
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" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
164
- if ("suspendedStart" === state) throw state = "completed", context.arg;
165
- context.dispatchException(context.arg);
166
- } else "return" === context.method && context.abrupt("return", context.arg);
167
- state = "executing";
168
- var record = tryCatch(innerFn, self, context);
169
- if ("normal" === record.type) {
170
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
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: record.arg,
173
- done: context.done
177
+ value: p.arg,
178
+ done: n.done
174
179
  };
175
180
  }
176
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
181
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
177
182
  }
178
183
  };
179
184
  }
180
- function maybeInvokeDelegate(delegate, context) {
181
- var methodName = context.method,
182
- method = delegate.iterator[methodName];
183
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
184
- var record = tryCatch(method, delegate.iterator, context.arg);
185
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
186
- var info = record.arg;
187
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
188
- }
189
- function pushTryEntry(locs) {
190
- var entry = {
191
- tryLoc: locs[0]
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 locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
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(entry) {
196
- var record = entry.completion || {};
197
- record.type = "normal", delete record.arg, entry.completion = record;
200
+ function resetTryEntry(t) {
201
+ var e = t.completion || {};
202
+ e.type = "normal", delete e.arg, t.completion = e;
198
203
  }
199
- function Context(tryLocsList) {
204
+ function Context(t) {
200
205
  this.tryEntries = [{
201
206
  tryLoc: "root"
202
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
203
- }
204
- function values(iterable) {
205
- if (iterable || "" === iterable) {
206
- var iteratorMethod = iterable[iteratorSymbol];
207
- if (iteratorMethod) return iteratorMethod.call(iterable);
208
- if ("function" == typeof iterable.next) return iterable;
209
- if (!isNaN(iterable.length)) {
210
- var i = -1,
211
- next = function next() {
212
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
213
- return next.value = undefined, next.done = !0, next;
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 next.next = next;
220
+ return i.next = i;
216
221
  }
217
222
  }
218
- throw new TypeError(typeof iterable + " is not iterable");
223
+ throw new TypeError(typeof e + " is not iterable");
219
224
  }
220
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
225
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
221
226
  value: GeneratorFunctionPrototype,
222
227
  configurable: !0
223
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
228
+ }), o(GeneratorFunctionPrototype, "constructor", {
224
229
  value: GeneratorFunction,
225
230
  configurable: !0
226
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
227
- var ctor = "function" == typeof genFun && genFun.constructor;
228
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
229
- }, exports.mark = function (genFun) {
230
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
231
- }, exports.awrap = function (arg) {
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: arg
238
+ __await: t
234
239
  };
235
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
240
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
236
241
  return this;
237
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
238
- void 0 === PromiseImpl && (PromiseImpl = Promise);
239
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
240
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
241
- return result.done ? result.value : iter.next();
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(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
248
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
244
249
  return this;
245
- }), define(Gp, "toString", function () {
250
+ }), define(g, "toString", function () {
246
251
  return "[object Generator]";
247
- }), exports.keys = function (val) {
248
- var object = Object(val),
249
- keys = [];
250
- for (var key in object) keys.push(key);
251
- return keys.reverse(), function next() {
252
- for (; keys.length;) {
253
- var key = keys.pop();
254
- if (key in object) return next.value = key, next.done = !1, next;
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
- }, exports.values = values, Context.prototype = {
263
+ }, e.values = values, Context.prototype = {
259
264
  constructor: Context,
260
- reset: function (skipTempReset) {
261
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
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 rootRecord = this.tryEntries[0].completion;
266
- if ("throw" === rootRecord.type) throw rootRecord.arg;
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 (exception) {
270
- if (this.done) throw exception;
271
- var context = this;
272
- function handle(loc, caught) {
273
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
274
- }
275
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
276
- var entry = this.tryEntries[i],
277
- record = entry.completion;
278
- if ("root" === entry.tryLoc) return handle("end");
279
- if (entry.tryLoc <= this.prev) {
280
- var hasCatch = hasOwn.call(entry, "catchLoc"),
281
- hasFinally = hasOwn.call(entry, "finallyLoc");
282
- if (hasCatch && hasFinally) {
283
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
284
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
285
- } else if (hasCatch) {
286
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
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 (!hasFinally) throw new Error("try statement without catch or finally");
289
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
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 (type, arg) {
295
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
296
- var entry = this.tryEntries[i];
297
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
298
- var finallyEntry = entry;
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
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
303
- var record = finallyEntry ? finallyEntry.completion : {};
304
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
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 (record, afterLoc) {
307
- if ("throw" === record.type) throw record.arg;
308
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
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 (finallyLoc) {
311
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
312
- var entry = this.tryEntries[i];
313
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
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 (tryLoc) {
317
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
318
- var entry = this.tryEntries[i];
319
- if (entry.tryLoc === tryLoc) {
320
- var record = entry.completion;
321
- if ("throw" === record.type) {
322
- var thrown = record.arg;
323
- resetTryEntry(entry);
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 thrown;
330
+ return o;
326
331
  }
327
332
  }
328
333
  throw new Error("illegal catch attempt");
329
334
  },
330
- delegateYield: function (iterable, resultName, nextLoc) {
335
+ delegateYield: function (e, r, n) {
331
336
  return this.delegate = {
332
- iterator: values(iterable),
333
- resultName: resultName,
334
- nextLoc: nextLoc
335
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
337
+ iterator: values(e),
338
+ resultName: r,
339
+ nextLoc: n
340
+ }, "next" === this.method && (this.arg = t), y;
336
341
  }
337
- }, exports;
342
+ }, e;
338
343
  }
339
- function _typeof$1(obj) {
344
+ function _typeof$1(o) {
340
345
  "@babel/helpers - typeof";
341
346
 
342
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
343
- return typeof obj;
344
- } : function (obj) {
345
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
346
- }, _typeof$1(obj);
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, (_a = list[key]) === null || _a === void 0 ? void 0 : _a.trim()));
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, errors.changeGroups[changeGroupNum]);
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": "6.1.0",
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": "6.1.0",
18
- "@opengeoweb/authentication": "6.1.0",
19
- "@opengeoweb/core": "6.1.0",
20
- "@opengeoweb/form-fields": "6.1.0",
21
- "@opengeoweb/shared": "6.1.0",
22
- "@opengeoweb/store": "6.1.0",
23
- "@opengeoweb/theme": "6.1.0",
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.4.0",
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.45.4",
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: FieldError, isChangeGroup?: boolean, rowIndex?: number) => FieldError[];
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: any) => void;
13
+ onChange?: (e: string) => void;
14
14
  defaultValue?: string;
15
- formatter?: (value: any) => string;
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: any) => CloudStrings;
9
- export declare const parseCloudsToObject: (clouds: any) => 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: any): Weather;
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?: unknown) => Promise<void>;
33
+ doRequest: (params?: TafFromFrontEnd) => Promise<void>;
34
34
  };
35
35
  declare const TafPanel: React.FC<TafPanelProps>;
36
36
  export default TafPanel;
@@ -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
- weather1: string;
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
+ }