@opengeoweb/api 12.10.0 → 12.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +226 -281
- package/package.json +3 -3
- package/src/fakeApi.d.ts +0 -1
- package/src/utils.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -4,6 +4,9 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
4
4
|
import { omit } from 'lodash';
|
|
5
5
|
import { HttpResponse, delay } from 'msw';
|
|
6
6
|
|
|
7
|
+
function _OverloadYield(e, d) {
|
|
8
|
+
this.v = e, this.k = d;
|
|
9
|
+
}
|
|
7
10
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
8
11
|
try {
|
|
9
12
|
var i = n[a](c),
|
|
@@ -29,306 +32,248 @@ function _asyncToGenerator(n) {
|
|
|
29
32
|
});
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
35
|
+
function _regenerator() {
|
|
36
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
37
|
+
var e,
|
|
38
|
+
t,
|
|
39
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
40
|
+
n = r.iterator || "@@iterator",
|
|
41
|
+
o = r.toStringTag || "@@toStringTag";
|
|
42
|
+
function i(r, n, o, i) {
|
|
43
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
44
|
+
u = Object.create(c.prototype);
|
|
45
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
46
|
+
var i,
|
|
47
|
+
c,
|
|
48
|
+
u,
|
|
49
|
+
f = 0,
|
|
50
|
+
p = o || [],
|
|
51
|
+
y = false,
|
|
52
|
+
G = {
|
|
53
|
+
p: 0,
|
|
54
|
+
n: 0,
|
|
55
|
+
v: e,
|
|
56
|
+
a: d,
|
|
57
|
+
f: d.bind(e, 4),
|
|
58
|
+
d: function (t, r) {
|
|
59
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function d(r, n) {
|
|
63
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
64
|
+
var o,
|
|
65
|
+
i = p[t],
|
|
66
|
+
d = G.p,
|
|
67
|
+
l = i[2];
|
|
68
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
69
|
+
}
|
|
70
|
+
if (o || r > 1) return a;
|
|
71
|
+
throw y = true, n;
|
|
72
|
+
}
|
|
73
|
+
return function (o, p, l) {
|
|
74
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
75
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
76
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
77
|
+
try {
|
|
78
|
+
if (f = 2, i) {
|
|
79
|
+
if (c || (o = "next"), t = i[o]) {
|
|
80
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
81
|
+
if (!t.done) return t;
|
|
82
|
+
u = t.value, c < 2 && (c = 0);
|
|
83
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
84
|
+
i = e;
|
|
85
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
86
|
+
} catch (t) {
|
|
87
|
+
i = e, c = 1, u = t;
|
|
88
|
+
} finally {
|
|
89
|
+
f = 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
value: t,
|
|
94
|
+
done: y
|
|
95
|
+
};
|
|
80
96
|
};
|
|
81
|
-
}
|
|
97
|
+
}(r, o, i), true), u;
|
|
82
98
|
}
|
|
83
|
-
|
|
84
|
-
var h = "suspendedStart",
|
|
85
|
-
l = "suspendedYield",
|
|
86
|
-
f = "executing",
|
|
87
|
-
s = "completed",
|
|
88
|
-
y = {};
|
|
99
|
+
var a = {};
|
|
89
100
|
function Generator() {}
|
|
90
101
|
function GeneratorFunction() {}
|
|
91
102
|
function GeneratorFunctionPrototype() {}
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
t = Object.getPrototypeOf;
|
|
104
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
105
|
+
return this;
|
|
106
|
+
}), t),
|
|
107
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
108
|
+
function f(e) {
|
|
109
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
110
|
+
}
|
|
111
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
94
112
|
return this;
|
|
113
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
114
|
+
return "[object Generator]";
|
|
115
|
+
}), (_regenerator = function () {
|
|
116
|
+
return {
|
|
117
|
+
w: i,
|
|
118
|
+
m: f
|
|
119
|
+
};
|
|
120
|
+
})();
|
|
121
|
+
}
|
|
122
|
+
function _regeneratorAsync(n, e, r, t, o) {
|
|
123
|
+
var a = _regeneratorAsyncGen(n, e, r, t, o);
|
|
124
|
+
return a.next().then(function (n) {
|
|
125
|
+
return n.done ? n.value : a.next();
|
|
95
126
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
}
|
|
128
|
+
function _regeneratorAsyncGen(r, e, t, o, n) {
|
|
129
|
+
return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
|
|
130
|
+
}
|
|
131
|
+
function _regeneratorAsyncIterator(t, e) {
|
|
132
|
+
function n(r, o, i, f) {
|
|
133
|
+
try {
|
|
134
|
+
var c = t[r](o),
|
|
135
|
+
u = c.value;
|
|
136
|
+
return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
|
|
137
|
+
n("next", t, i, f);
|
|
138
|
+
}, function (t) {
|
|
139
|
+
n("throw", t, i, f);
|
|
140
|
+
}) : e.resolve(u).then(function (t) {
|
|
141
|
+
c.value = t, i(c);
|
|
142
|
+
}, function (t) {
|
|
143
|
+
return n("throw", t, i, f);
|
|
104
144
|
});
|
|
105
|
-
})
|
|
145
|
+
} catch (t) {
|
|
146
|
+
f(t);
|
|
147
|
+
}
|
|
106
148
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
149
|
+
var r;
|
|
150
|
+
this.next || (_regeneratorDefine(_regeneratorAsyncIterator.prototype), _regeneratorDefine(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
|
|
151
|
+
return this;
|
|
152
|
+
})), _regeneratorDefine(this, "_invoke", function (t, o, i) {
|
|
153
|
+
function f() {
|
|
154
|
+
return new e(function (e, r) {
|
|
155
|
+
n(t, i, e, r);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return r = r ? r.then(f, f) : f();
|
|
159
|
+
}, true);
|
|
160
|
+
}
|
|
161
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
162
|
+
var i = Object.defineProperty;
|
|
163
|
+
try {
|
|
164
|
+
i({}, "", {});
|
|
165
|
+
} catch (e) {
|
|
166
|
+
i = 0;
|
|
167
|
+
}
|
|
168
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
169
|
+
if (r) i ? i(e, r, {
|
|
170
|
+
value: n,
|
|
171
|
+
enumerable: !t,
|
|
172
|
+
configurable: !t,
|
|
173
|
+
writable: !t
|
|
174
|
+
}) : e[r] = n;else {
|
|
175
|
+
function o(r, n) {
|
|
176
|
+
_regeneratorDefine(e, r, function (e) {
|
|
177
|
+
return this._invoke(r, n, e);
|
|
121
178
|
});
|
|
122
179
|
}
|
|
123
|
-
|
|
180
|
+
o("next", 0), o("throw", 1), o("return", 2);
|
|
124
181
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
182
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
183
|
+
}
|
|
184
|
+
function _regeneratorKeys(e) {
|
|
185
|
+
var n = Object(e),
|
|
186
|
+
r = [];
|
|
187
|
+
for (var t in n) r.unshift(t);
|
|
188
|
+
return function e() {
|
|
189
|
+
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e;
|
|
190
|
+
return e.done = true, e;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function _regeneratorValues(e) {
|
|
194
|
+
if (null != e) {
|
|
195
|
+
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
|
|
196
|
+
r = 0;
|
|
197
|
+
if (t) return t.call(e);
|
|
198
|
+
if ("function" == typeof e.next) return e;
|
|
199
|
+
if (!isNaN(e.length)) return {
|
|
200
|
+
next: function () {
|
|
201
|
+
return e && r >= e.length && (e = void 0), {
|
|
202
|
+
value: e && e[r++],
|
|
203
|
+
done: !e
|
|
146
204
|
};
|
|
147
205
|
}
|
|
148
|
-
for (n.method = i, n.arg = a;;) {
|
|
149
|
-
var c = n.delegate;
|
|
150
|
-
if (c) {
|
|
151
|
-
var u = maybeInvokeDelegate(c, n);
|
|
152
|
-
if (u) {
|
|
153
|
-
if (u === y) continue;
|
|
154
|
-
return u;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
158
|
-
if (o === h) throw o = s, n.arg;
|
|
159
|
-
n.dispatchException(n.arg);
|
|
160
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
161
|
-
o = f;
|
|
162
|
-
var p = tryCatch(e, r, n);
|
|
163
|
-
if ("normal" === p.type) {
|
|
164
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
165
|
-
return {
|
|
166
|
-
value: p.arg,
|
|
167
|
-
done: n.done
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
function maybeInvokeDelegate(e, r) {
|
|
175
|
-
var n = r.method,
|
|
176
|
-
o = e.iterator[n];
|
|
177
|
-
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;
|
|
178
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
179
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
180
|
-
var a = i.arg;
|
|
181
|
-
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);
|
|
182
|
-
}
|
|
183
|
-
function pushTryEntry(t) {
|
|
184
|
-
var e = {
|
|
185
|
-
tryLoc: t[0]
|
|
186
206
|
};
|
|
187
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
188
207
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
208
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
209
|
+
}
|
|
210
|
+
function _regeneratorRuntime() {
|
|
211
|
+
|
|
212
|
+
var r = _regenerator(),
|
|
213
|
+
e = r.m(_regeneratorRuntime),
|
|
214
|
+
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
|
|
215
|
+
function n(r) {
|
|
216
|
+
var e = "function" == typeof r && r.constructor;
|
|
217
|
+
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
|
|
197
218
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
var o = {
|
|
220
|
+
throw: 1,
|
|
221
|
+
return: 2,
|
|
222
|
+
break: 3,
|
|
223
|
+
continue: 3
|
|
224
|
+
};
|
|
225
|
+
function a(r) {
|
|
226
|
+
var e, t;
|
|
227
|
+
return function (n) {
|
|
228
|
+
e || (e = {
|
|
229
|
+
stop: function () {
|
|
230
|
+
return t(n.a, 2);
|
|
231
|
+
},
|
|
232
|
+
catch: function () {
|
|
233
|
+
return n.v;
|
|
234
|
+
},
|
|
235
|
+
abrupt: function (r, e) {
|
|
236
|
+
return t(n.a, o[r], e);
|
|
237
|
+
},
|
|
238
|
+
delegateYield: function (r, o, a) {
|
|
239
|
+
return e.resultName = o, t(n.d, _regeneratorValues(r), a);
|
|
240
|
+
},
|
|
241
|
+
finish: function (r) {
|
|
242
|
+
return t(n.f, r);
|
|
243
|
+
}
|
|
244
|
+
}, t = function (r, t, o) {
|
|
245
|
+
n.p = e.prev, n.n = e.next;
|
|
246
|
+
try {
|
|
247
|
+
return r(t, o);
|
|
248
|
+
} finally {
|
|
249
|
+
e.next = n.n;
|
|
250
|
+
}
|
|
251
|
+
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
|
|
252
|
+
try {
|
|
253
|
+
return r.call(this, e);
|
|
254
|
+
} finally {
|
|
255
|
+
n.p = e.prev, n.n = e.next;
|
|
210
256
|
}
|
|
211
|
-
}
|
|
212
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
257
|
+
};
|
|
213
258
|
}
|
|
214
|
-
return
|
|
215
|
-
value: GeneratorFunctionPrototype,
|
|
216
|
-
configurable: true
|
|
217
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
218
|
-
value: GeneratorFunction,
|
|
219
|
-
configurable: true
|
|
220
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
221
|
-
var e = "function" == typeof t && t.constructor;
|
|
222
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
223
|
-
}, e.mark = function (t) {
|
|
224
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
225
|
-
}, e.awrap = function (t) {
|
|
259
|
+
return (_regeneratorRuntime = function () {
|
|
226
260
|
return {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}), e.keys = function (t) {
|
|
242
|
-
var e = Object(t),
|
|
243
|
-
r = [];
|
|
244
|
-
for (var n in e) r.push(n);
|
|
245
|
-
return r.reverse(), function next() {
|
|
246
|
-
for (; r.length;) {
|
|
247
|
-
var t = r.pop();
|
|
248
|
-
if (t in e) return next.value = t, next.done = false, next;
|
|
249
|
-
}
|
|
250
|
-
return next.done = true, next;
|
|
261
|
+
wrap: function (e, t, n, o) {
|
|
262
|
+
return r.w(a(e), t, n, o && o.reverse());
|
|
263
|
+
},
|
|
264
|
+
isGeneratorFunction: n,
|
|
265
|
+
mark: r.m,
|
|
266
|
+
awrap: function (r, e) {
|
|
267
|
+
return new _OverloadYield(r, e);
|
|
268
|
+
},
|
|
269
|
+
AsyncIterator: _regeneratorAsyncIterator,
|
|
270
|
+
async: function (r, e, t, o, u) {
|
|
271
|
+
return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
|
|
272
|
+
},
|
|
273
|
+
keys: _regeneratorKeys,
|
|
274
|
+
values: _regeneratorValues
|
|
251
275
|
};
|
|
252
|
-
}
|
|
253
|
-
constructor: Context,
|
|
254
|
-
reset: function (e) {
|
|
255
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
256
|
-
},
|
|
257
|
-
stop: function () {
|
|
258
|
-
this.done = true;
|
|
259
|
-
var t = this.tryEntries[0].completion;
|
|
260
|
-
if ("throw" === t.type) throw t.arg;
|
|
261
|
-
return this.rval;
|
|
262
|
-
},
|
|
263
|
-
dispatchException: function (e) {
|
|
264
|
-
if (this.done) throw e;
|
|
265
|
-
var r = this;
|
|
266
|
-
function handle(n, o) {
|
|
267
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
268
|
-
}
|
|
269
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
270
|
-
var i = this.tryEntries[o],
|
|
271
|
-
a = i.completion;
|
|
272
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
273
|
-
if (i.tryLoc <= this.prev) {
|
|
274
|
-
var c = n.call(i, "catchLoc"),
|
|
275
|
-
u = n.call(i, "finallyLoc");
|
|
276
|
-
if (c && u) {
|
|
277
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
278
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
279
|
-
} else if (c) {
|
|
280
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
281
|
-
} else {
|
|
282
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
283
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
abrupt: function (t, e) {
|
|
289
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
290
|
-
var o = this.tryEntries[r];
|
|
291
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
292
|
-
var i = o;
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
297
|
-
var a = i ? i.completion : {};
|
|
298
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
299
|
-
},
|
|
300
|
-
complete: function (t, e) {
|
|
301
|
-
if ("throw" === t.type) throw t.arg;
|
|
302
|
-
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;
|
|
303
|
-
},
|
|
304
|
-
finish: function (t) {
|
|
305
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
306
|
-
var r = this.tryEntries[e];
|
|
307
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
catch: function (t) {
|
|
311
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
312
|
-
var r = this.tryEntries[e];
|
|
313
|
-
if (r.tryLoc === t) {
|
|
314
|
-
var n = r.completion;
|
|
315
|
-
if ("throw" === n.type) {
|
|
316
|
-
var o = n.arg;
|
|
317
|
-
resetTryEntry(r);
|
|
318
|
-
}
|
|
319
|
-
return o;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
throw Error("illegal catch attempt");
|
|
323
|
-
},
|
|
324
|
-
delegateYield: function (e, r, n) {
|
|
325
|
-
return this.delegate = {
|
|
326
|
-
iterator: values(e),
|
|
327
|
-
resultName: r,
|
|
328
|
-
nextLoc: n
|
|
329
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
330
|
-
}
|
|
331
|
-
}, e;
|
|
276
|
+
})();
|
|
332
277
|
}
|
|
333
278
|
|
|
334
279
|
var getHeaders = function getHeaders(auth) {
|
|
@@ -387,7 +332,7 @@ var useAuthQuery = function useAuthQuery(queryKey, _queryFn, disabled, refetchIn
|
|
|
387
332
|
var optimisticUpdate = function optimisticUpdate(updatedQueryKey, queryClient, _optimisticUpdate, errorCallback) {
|
|
388
333
|
return {
|
|
389
334
|
onMutate: function () {
|
|
390
|
-
var _onMutate = _asyncToGenerator(
|
|
335
|
+
var _onMutate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(variables) {
|
|
391
336
|
var oldData;
|
|
392
337
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
393
338
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -433,7 +378,7 @@ var makeMockApiCall = function makeMockApiCall(response, responseInit, delayDura
|
|
|
433
378
|
delayDuration = 0;
|
|
434
379
|
}
|
|
435
380
|
if (delayDuration) {
|
|
436
|
-
return jest.fn().mockImplementation(
|
|
381
|
+
return jest.fn().mockImplementation(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
437
382
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
438
383
|
while (1) switch (_context.prev = _context.next) {
|
|
439
384
|
case 0:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/api",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.11.0",
|
|
4
4
|
"description": "GeoWeb API library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/authentication": "12.
|
|
12
|
-
"@opengeoweb/store": "12.
|
|
11
|
+
"@opengeoweb/authentication": "12.11.0",
|
|
12
|
+
"@opengeoweb/store": "12.11.0",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
14
|
"@tanstack/react-query": "^5.69.2"
|
|
15
15
|
},
|
package/src/fakeApi.d.ts
CHANGED
package/src/utils.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export declare const getHeaders: (auth?: Credentials) => HeadersInit;
|
|
|
4
4
|
export declare const handleResponse: (response: Response) => Promise<any>;
|
|
5
5
|
export declare const useAuthQuery: <T>(queryKey: string[], queryFn: (auth: Credentials) => Promise<T>, disabled?: boolean, refetchInterval?: number | false) => UseQueryResult<T>;
|
|
6
6
|
export declare const optimisticUpdate: <U extends {
|
|
7
|
-
id?: string
|
|
7
|
+
id?: string;
|
|
8
8
|
}, T extends {
|
|
9
|
-
id?: string
|
|
9
|
+
id?: string;
|
|
10
10
|
}>(updatedQueryKey: string[], queryClient: QueryClient, optimisticUpdate: (oldValue: U, variables: T) => U, errorCallback?: (err: Error) => void) => MutationOptions<Headers | null, Error, T, {
|
|
11
11
|
oldData: U[] | undefined;
|
|
12
12
|
}>;
|