@entur-partner/app-shell 6.1.6-alpha.0 → 6.1.6-alpha.2
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/dist/AppShell.d.ts +20 -20
- package/dist/ConsentManagerProvider.d.ts +16 -16
- package/dist/EnvironmentBanner.d.ts +7 -7
- package/dist/LanguageProvider.d.ts +12 -12
- package/dist/MenuProvider.d.ts +17 -17
- package/dist/MicroFrontendLink.d.ts +8 -8
- package/dist/OrganisationProvider.d.ts +13 -13
- package/dist/OrganisationSelector.d.ts +15 -15
- package/dist/OrganisationsError.d.ts +3 -3
- package/dist/PostHogProviderWrapper.d.ts +32 -32
- package/dist/app-shell.cjs.development.js +242 -465
- package/dist/app-shell.cjs.development.js.map +1 -1
- package/dist/app-shell.cjs.production.min.js +1 -1
- package/dist/app-shell.cjs.production.min.js.map +1 -1
- package/dist/app-shell.esm.js +215 -433
- package/dist/app-shell.esm.js.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/storage.d.ts +14 -14
- package/dist/types/ConsentTypes.d.ts +33 -33
- package/dist/types/UserTypes.d.ts +3 -3
- package/dist/util/convertUCServicesToConsents.d.ts +13 -13
- package/package.json +7 -7
package/dist/app-shell.esm.js
CHANGED
|
@@ -9,6 +9,31 @@ import React, { useState, useEffect, useContext, createContext, useCallback } fr
|
|
|
9
9
|
import postHog from 'posthog-js';
|
|
10
10
|
import { PostHogProvider } from 'posthog-js/react';
|
|
11
11
|
|
|
12
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
13
|
+
try {
|
|
14
|
+
var i = n[a](c),
|
|
15
|
+
u = i.value;
|
|
16
|
+
} catch (n) {
|
|
17
|
+
return void e(n);
|
|
18
|
+
}
|
|
19
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
20
|
+
}
|
|
21
|
+
function _asyncToGenerator(n) {
|
|
22
|
+
return function () {
|
|
23
|
+
var t = this,
|
|
24
|
+
e = arguments;
|
|
25
|
+
return new Promise(function (r, o) {
|
|
26
|
+
var a = n.apply(t, e);
|
|
27
|
+
function _next(n) {
|
|
28
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
29
|
+
}
|
|
30
|
+
function _throw(n) {
|
|
31
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
32
|
+
}
|
|
33
|
+
_next(void 0);
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
12
37
|
function _construct(t, e, r) {
|
|
13
38
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
14
39
|
var o = [null];
|
|
@@ -16,6 +41,30 @@ function _construct(t, e, r) {
|
|
|
16
41
|
var p = new (t.bind.apply(t, o))();
|
|
17
42
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
18
43
|
}
|
|
44
|
+
function _extends() {
|
|
45
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
46
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
47
|
+
var t = arguments[e];
|
|
48
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
49
|
+
}
|
|
50
|
+
return n;
|
|
51
|
+
}, _extends.apply(null, arguments);
|
|
52
|
+
}
|
|
53
|
+
function _getPrototypeOf(t) {
|
|
54
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
55
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
56
|
+
}, _getPrototypeOf(t);
|
|
57
|
+
}
|
|
58
|
+
function _inheritsLoose(t, o) {
|
|
59
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
60
|
+
}
|
|
61
|
+
function _isNativeFunction(t) {
|
|
62
|
+
try {
|
|
63
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
64
|
+
} catch (n) {
|
|
65
|
+
return "function" == typeof t;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
19
68
|
function _isNativeReflectConstruct() {
|
|
20
69
|
try {
|
|
21
70
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -24,413 +73,149 @@ function _isNativeReflectConstruct() {
|
|
|
24
73
|
return !!t;
|
|
25
74
|
})();
|
|
26
75
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
r = Object.prototype,
|
|
34
|
-
n = r.hasOwnProperty,
|
|
35
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
36
|
-
t[e] = r.value;
|
|
37
|
-
},
|
|
38
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
39
|
-
a = i.iterator || "@@iterator",
|
|
40
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
41
|
-
u = i.toStringTag || "@@toStringTag";
|
|
42
|
-
function define(t, e, r) {
|
|
43
|
-
return Object.defineProperty(t, e, {
|
|
44
|
-
value: r,
|
|
45
|
-
enumerable: !0,
|
|
46
|
-
configurable: !0,
|
|
47
|
-
writable: !0
|
|
48
|
-
}), t[e];
|
|
49
|
-
}
|
|
50
|
-
try {
|
|
51
|
-
define({}, "");
|
|
52
|
-
} catch (t) {
|
|
53
|
-
define = function (t, e, r) {
|
|
54
|
-
return t[e] = r;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function wrap(t, e, r, n) {
|
|
58
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
59
|
-
a = Object.create(i.prototype),
|
|
60
|
-
c = new Context(n || []);
|
|
61
|
-
return o(a, "_invoke", {
|
|
62
|
-
value: makeInvokeMethod(t, r, c)
|
|
63
|
-
}), a;
|
|
64
|
-
}
|
|
65
|
-
function tryCatch(t, e, r) {
|
|
66
|
-
try {
|
|
67
|
-
return {
|
|
68
|
-
type: "normal",
|
|
69
|
-
arg: t.call(e, r)
|
|
70
|
-
};
|
|
71
|
-
} catch (t) {
|
|
72
|
-
return {
|
|
73
|
-
type: "throw",
|
|
74
|
-
arg: t
|
|
75
|
-
};
|
|
76
|
-
}
|
|
76
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
77
|
+
if (null == r) return {};
|
|
78
|
+
var t = {};
|
|
79
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
80
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
81
|
+
t[n] = r[n];
|
|
77
82
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
u.
|
|
114
|
-
}, function (t) {
|
|
115
|
-
return invoke("throw", t, i, a);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
a(c.arg);
|
|
119
|
-
}
|
|
120
|
-
var r;
|
|
121
|
-
o(this, "_invoke", {
|
|
122
|
-
value: function (t, n) {
|
|
123
|
-
function callInvokeWithMethodAndArg() {
|
|
124
|
-
return new e(function (e, r) {
|
|
125
|
-
invoke(t, n, e, r);
|
|
126
|
-
});
|
|
83
|
+
return t;
|
|
84
|
+
}
|
|
85
|
+
function _regenerator() {
|
|
86
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
87
|
+
var e,
|
|
88
|
+
t,
|
|
89
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
90
|
+
n = r.iterator || "@@iterator",
|
|
91
|
+
o = r.toStringTag || "@@toStringTag";
|
|
92
|
+
function i(r, n, o, i) {
|
|
93
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
94
|
+
u = Object.create(c.prototype);
|
|
95
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
96
|
+
var i,
|
|
97
|
+
c,
|
|
98
|
+
u,
|
|
99
|
+
f = 0,
|
|
100
|
+
p = o || [],
|
|
101
|
+
y = !1,
|
|
102
|
+
G = {
|
|
103
|
+
p: 0,
|
|
104
|
+
n: 0,
|
|
105
|
+
v: e,
|
|
106
|
+
a: d,
|
|
107
|
+
f: d.bind(e, 4),
|
|
108
|
+
d: function (t, r) {
|
|
109
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
function d(r, n) {
|
|
113
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
114
|
+
var o,
|
|
115
|
+
i = p[t],
|
|
116
|
+
d = G.p,
|
|
117
|
+
l = i[2];
|
|
118
|
+
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));
|
|
127
119
|
}
|
|
128
|
-
|
|
120
|
+
if (o || r > 1) return a;
|
|
121
|
+
throw y = !0, n;
|
|
129
122
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
123
|
+
return function (o, p, l) {
|
|
124
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
125
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
126
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
127
|
+
try {
|
|
128
|
+
if (f = 2, i) {
|
|
129
|
+
if (c || (o = "next"), t = i[o]) {
|
|
130
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
131
|
+
if (!t.done) return t;
|
|
132
|
+
u = t.value, c < 2 && (c = 0);
|
|
133
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
134
|
+
i = e;
|
|
135
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
136
|
+
} catch (t) {
|
|
137
|
+
i = e, c = 1, u = t;
|
|
138
|
+
} finally {
|
|
139
|
+
f = 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
138
142
|
return {
|
|
139
143
|
value: t,
|
|
140
|
-
done:
|
|
144
|
+
done: y
|
|
141
145
|
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
var c = n.delegate;
|
|
145
|
-
if (c) {
|
|
146
|
-
var u = maybeInvokeDelegate(c, n);
|
|
147
|
-
if (u) {
|
|
148
|
-
if (u === y) continue;
|
|
149
|
-
return u;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
153
|
-
if (o === h) throw o = s, n.arg;
|
|
154
|
-
n.dispatchException(n.arg);
|
|
155
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
156
|
-
o = f;
|
|
157
|
-
var p = tryCatch(e, r, n);
|
|
158
|
-
if ("normal" === p.type) {
|
|
159
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
160
|
-
return {
|
|
161
|
-
value: p.arg,
|
|
162
|
-
done: n.done
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function maybeInvokeDelegate(e, r) {
|
|
170
|
-
var n = r.method,
|
|
171
|
-
o = e.iterator[n];
|
|
172
|
-
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;
|
|
173
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
174
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
175
|
-
var a = i.arg;
|
|
176
|
-
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);
|
|
177
|
-
}
|
|
178
|
-
function pushTryEntry(t) {
|
|
179
|
-
var e = {
|
|
180
|
-
tryLoc: t[0]
|
|
181
|
-
};
|
|
182
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
183
|
-
}
|
|
184
|
-
function resetTryEntry(t) {
|
|
185
|
-
var e = t.completion || {};
|
|
186
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
187
|
-
}
|
|
188
|
-
function Context(t) {
|
|
189
|
-
this.tryEntries = [{
|
|
190
|
-
tryLoc: "root"
|
|
191
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
146
|
+
};
|
|
147
|
+
}(r, o, i), !0), u;
|
|
192
148
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return i.next = i;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
149
|
+
var a = {};
|
|
150
|
+
function Generator() {}
|
|
151
|
+
function GeneratorFunction() {}
|
|
152
|
+
function GeneratorFunctionPrototype() {}
|
|
153
|
+
t = Object.getPrototypeOf;
|
|
154
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
155
|
+
return this;
|
|
156
|
+
}), t),
|
|
157
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
158
|
+
function f(e) {
|
|
159
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
208
160
|
}
|
|
209
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
210
|
-
value: GeneratorFunctionPrototype,
|
|
211
|
-
configurable: !0
|
|
212
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
213
|
-
value: GeneratorFunction,
|
|
214
|
-
configurable: !0
|
|
215
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
216
|
-
var e = "function" == typeof t && t.constructor;
|
|
217
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
218
|
-
}, e.mark = function (t) {
|
|
219
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
220
|
-
}, e.awrap = function (t) {
|
|
221
|
-
return {
|
|
222
|
-
__await: t
|
|
223
|
-
};
|
|
224
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
161
|
+
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 () {
|
|
225
162
|
return this;
|
|
226
|
-
}),
|
|
227
|
-
void 0 === i && (i = Promise);
|
|
228
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
229
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
230
|
-
return t.done ? t.value : a.next();
|
|
231
|
-
});
|
|
232
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
233
|
-
return this;
|
|
234
|
-
}), define(g, "toString", function () {
|
|
163
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
235
164
|
return "[object Generator]";
|
|
236
|
-
}),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
return r.reverse(), function next() {
|
|
241
|
-
for (; r.length;) {
|
|
242
|
-
var t = r.pop();
|
|
243
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
244
|
-
}
|
|
245
|
-
return next.done = !0, next;
|
|
165
|
+
}), (_regenerator = function () {
|
|
166
|
+
return {
|
|
167
|
+
w: i,
|
|
168
|
+
m: f
|
|
246
169
|
};
|
|
247
|
-
}
|
|
248
|
-
constructor: Context,
|
|
249
|
-
reset: function (e) {
|
|
250
|
-
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);
|
|
251
|
-
},
|
|
252
|
-
stop: function () {
|
|
253
|
-
this.done = !0;
|
|
254
|
-
var t = this.tryEntries[0].completion;
|
|
255
|
-
if ("throw" === t.type) throw t.arg;
|
|
256
|
-
return this.rval;
|
|
257
|
-
},
|
|
258
|
-
dispatchException: function (e) {
|
|
259
|
-
if (this.done) throw e;
|
|
260
|
-
var r = this;
|
|
261
|
-
function handle(n, o) {
|
|
262
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
263
|
-
}
|
|
264
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
265
|
-
var i = this.tryEntries[o],
|
|
266
|
-
a = i.completion;
|
|
267
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
268
|
-
if (i.tryLoc <= this.prev) {
|
|
269
|
-
var c = n.call(i, "catchLoc"),
|
|
270
|
-
u = n.call(i, "finallyLoc");
|
|
271
|
-
if (c && u) {
|
|
272
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
273
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
274
|
-
} else if (c) {
|
|
275
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
276
|
-
} else {
|
|
277
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
278
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
abrupt: function (t, e) {
|
|
284
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
285
|
-
var o = this.tryEntries[r];
|
|
286
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
287
|
-
var i = o;
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
292
|
-
var a = i ? i.completion : {};
|
|
293
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
294
|
-
},
|
|
295
|
-
complete: function (t, e) {
|
|
296
|
-
if ("throw" === t.type) throw t.arg;
|
|
297
|
-
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;
|
|
298
|
-
},
|
|
299
|
-
finish: function (t) {
|
|
300
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
301
|
-
var r = this.tryEntries[e];
|
|
302
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
catch: function (t) {
|
|
306
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
307
|
-
var r = this.tryEntries[e];
|
|
308
|
-
if (r.tryLoc === t) {
|
|
309
|
-
var n = r.completion;
|
|
310
|
-
if ("throw" === n.type) {
|
|
311
|
-
var o = n.arg;
|
|
312
|
-
resetTryEntry(r);
|
|
313
|
-
}
|
|
314
|
-
return o;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
throw Error("illegal catch attempt");
|
|
318
|
-
},
|
|
319
|
-
delegateYield: function (e, r, n) {
|
|
320
|
-
return this.delegate = {
|
|
321
|
-
iterator: values(e),
|
|
322
|
-
resultName: r,
|
|
323
|
-
nextLoc: n
|
|
324
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
325
|
-
}
|
|
326
|
-
}, e;
|
|
170
|
+
})();
|
|
327
171
|
}
|
|
328
|
-
function
|
|
172
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
173
|
+
var i = Object.defineProperty;
|
|
329
174
|
try {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
reject(error);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
if (info.done) {
|
|
337
|
-
resolve(value);
|
|
338
|
-
} else {
|
|
339
|
-
Promise.resolve(value).then(_next, _throw);
|
|
175
|
+
i({}, "", {});
|
|
176
|
+
} catch (e) {
|
|
177
|
+
i = 0;
|
|
340
178
|
}
|
|
341
|
-
|
|
342
|
-
function
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return new Promise(function (resolve, reject) {
|
|
347
|
-
var gen = fn.apply(self, args);
|
|
348
|
-
function _next(value) {
|
|
349
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
350
|
-
}
|
|
351
|
-
function _throw(err) {
|
|
352
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
353
|
-
}
|
|
354
|
-
_next(undefined);
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
function _extends() {
|
|
359
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
360
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
361
|
-
var source = arguments[i];
|
|
362
|
-
for (var key in source) {
|
|
363
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
364
|
-
target[key] = source[key];
|
|
365
|
-
}
|
|
366
|
-
}
|
|
179
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
180
|
+
function o(r, n) {
|
|
181
|
+
_regeneratorDefine(e, r, function (e) {
|
|
182
|
+
return this._invoke(r, n, e);
|
|
183
|
+
});
|
|
367
184
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
_setPrototypeOf(subClass, superClass);
|
|
376
|
-
}
|
|
377
|
-
function _getPrototypeOf(o) {
|
|
378
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
379
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
380
|
-
};
|
|
381
|
-
return _getPrototypeOf(o);
|
|
382
|
-
}
|
|
383
|
-
function _setPrototypeOf(o, p) {
|
|
384
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
385
|
-
o.__proto__ = p;
|
|
386
|
-
return o;
|
|
387
|
-
};
|
|
388
|
-
return _setPrototypeOf(o, p);
|
|
185
|
+
r ? i ? i(e, r, {
|
|
186
|
+
value: n,
|
|
187
|
+
enumerable: !t,
|
|
188
|
+
configurable: !t,
|
|
189
|
+
writable: !t
|
|
190
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
191
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
389
192
|
}
|
|
390
|
-
function
|
|
391
|
-
|
|
392
|
-
return
|
|
393
|
-
}
|
|
394
|
-
return typeof fn === "function";
|
|
395
|
-
}
|
|
193
|
+
function _setPrototypeOf(t, e) {
|
|
194
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
195
|
+
return t.__proto__ = e, t;
|
|
196
|
+
}, _setPrototypeOf(t, e);
|
|
396
197
|
}
|
|
397
|
-
function _wrapNativeSuper(
|
|
398
|
-
var
|
|
399
|
-
_wrapNativeSuper = function
|
|
400
|
-
if (
|
|
401
|
-
if (typeof
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
406
|
-
_cache.set(Class, Wrapper);
|
|
198
|
+
function _wrapNativeSuper(t) {
|
|
199
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
200
|
+
return _wrapNativeSuper = function (t) {
|
|
201
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
202
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
203
|
+
if (void 0 !== r) {
|
|
204
|
+
if (r.has(t)) return r.get(t);
|
|
205
|
+
r.set(t, Wrapper);
|
|
407
206
|
}
|
|
408
207
|
function Wrapper() {
|
|
409
|
-
return _construct(
|
|
208
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
410
209
|
}
|
|
411
|
-
Wrapper.prototype = Object.create(
|
|
210
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
412
211
|
constructor: {
|
|
413
212
|
value: Wrapper,
|
|
414
|
-
enumerable:
|
|
415
|
-
writable:
|
|
416
|
-
configurable:
|
|
213
|
+
enumerable: !1,
|
|
214
|
+
writable: !0,
|
|
215
|
+
configurable: !0
|
|
417
216
|
}
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
};
|
|
421
|
-
return _wrapNativeSuper(Class);
|
|
422
|
-
}
|
|
423
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
424
|
-
if (source == null) return {};
|
|
425
|
-
var target = {};
|
|
426
|
-
var sourceKeys = Object.keys(source);
|
|
427
|
-
var key, i;
|
|
428
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
429
|
-
key = sourceKeys[i];
|
|
430
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
431
|
-
target[key] = source[key];
|
|
432
|
-
}
|
|
433
|
-
return target;
|
|
217
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
218
|
+
}, _wrapNativeSuper(t);
|
|
434
219
|
}
|
|
435
220
|
|
|
436
221
|
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
@@ -477,32 +262,31 @@ var Authenticate = function Authenticate(_ref) {
|
|
|
477
262
|
error = _useAuth.error;
|
|
478
263
|
useEffect(function () {
|
|
479
264
|
var fetchUserData = /*#__PURE__*/function () {
|
|
480
|
-
var _ref2 = _asyncToGenerator(
|
|
481
|
-
var token, decoratedUser;
|
|
482
|
-
return
|
|
483
|
-
while (1) switch (_context.
|
|
265
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
266
|
+
var token, decoratedUser, _t;
|
|
267
|
+
return _regenerator().w(function (_context) {
|
|
268
|
+
while (1) switch (_context.p = _context.n) {
|
|
484
269
|
case 0:
|
|
485
|
-
_context.
|
|
486
|
-
_context.
|
|
270
|
+
_context.p = 0;
|
|
271
|
+
_context.n = 1;
|
|
487
272
|
return getAccessTokenSilently();
|
|
488
|
-
case
|
|
489
|
-
token = _context.
|
|
490
|
-
_context.
|
|
273
|
+
case 1:
|
|
274
|
+
token = _context.v;
|
|
275
|
+
_context.n = 2;
|
|
491
276
|
return decorateUser(user, token);
|
|
492
|
-
case
|
|
493
|
-
decoratedUser = _context.
|
|
277
|
+
case 2:
|
|
278
|
+
decoratedUser = _context.v;
|
|
494
279
|
setUserWithPermission(decoratedUser);
|
|
495
|
-
_context.
|
|
280
|
+
_context.n = 4;
|
|
496
281
|
break;
|
|
497
|
-
case
|
|
498
|
-
_context.
|
|
499
|
-
|
|
500
|
-
console.error("Error fetching user data:",
|
|
501
|
-
case
|
|
502
|
-
|
|
503
|
-
return _context.stop();
|
|
282
|
+
case 3:
|
|
283
|
+
_context.p = 3;
|
|
284
|
+
_t = _context.v;
|
|
285
|
+
console.error("Error fetching user data:", _t);
|
|
286
|
+
case 4:
|
|
287
|
+
return _context.a(2);
|
|
504
288
|
}
|
|
505
|
-
}, _callee, null, [[0,
|
|
289
|
+
}, _callee, null, [[0, 3]]);
|
|
506
290
|
}));
|
|
507
291
|
return function fetchUserData() {
|
|
508
292
|
return _ref2.apply(this, arguments);
|
|
@@ -668,24 +452,23 @@ var ConsentManagerProvider = function ConsentManagerProvider(_ref) {
|
|
|
668
452
|
// Listen for Usercentrics consent events and update consent manager state
|
|
669
453
|
useEffect(function () {
|
|
670
454
|
var handleConsentEvent = /*#__PURE__*/function () {
|
|
671
|
-
var _ref2 = _asyncToGenerator(
|
|
455
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(event) {
|
|
672
456
|
var customEvent, services, updatedConsentManager;
|
|
673
|
-
return
|
|
674
|
-
while (1) switch (_context.
|
|
457
|
+
return _regenerator().w(function (_context) {
|
|
458
|
+
while (1) switch (_context.n) {
|
|
675
459
|
case 0:
|
|
676
460
|
if (!(typeof window === "undefined")) {
|
|
677
|
-
_context.
|
|
461
|
+
_context.n = 1;
|
|
678
462
|
break;
|
|
679
463
|
}
|
|
680
|
-
return _context.
|
|
681
|
-
case
|
|
464
|
+
return _context.a(2);
|
|
465
|
+
case 1:
|
|
682
466
|
customEvent = event;
|
|
683
467
|
services = Object.values(customEvent.detail.services);
|
|
684
468
|
updatedConsentManager = convertUCServicesToConsents(services);
|
|
685
469
|
setConsentManager(updatedConsentManager);
|
|
686
|
-
case
|
|
687
|
-
|
|
688
|
-
return _context.stop();
|
|
470
|
+
case 2:
|
|
471
|
+
return _context.a(2);
|
|
689
472
|
}
|
|
690
473
|
}, _callee);
|
|
691
474
|
}));
|
|
@@ -874,7 +657,7 @@ var OrganisationsError = /*#__PURE__*/function (_Error) {
|
|
|
874
657
|
}
|
|
875
658
|
_inheritsLoose(OrganisationsError, _Error);
|
|
876
659
|
return OrganisationsError;
|
|
877
|
-
}(
|
|
660
|
+
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
878
661
|
|
|
879
662
|
var _excluded = ["getToken", "getOrganisations", "selectedOrganisationId", "onChange"];
|
|
880
663
|
var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
@@ -893,20 +676,20 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
|
893
676
|
setStatus = _useState2[1];
|
|
894
677
|
useEffect(function () {
|
|
895
678
|
var fetchOrganisations = /*#__PURE__*/function () {
|
|
896
|
-
var _ref2 = _asyncToGenerator(
|
|
679
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
897
680
|
var token, organisations;
|
|
898
|
-
return
|
|
899
|
-
while (1) switch (_context.
|
|
681
|
+
return _regenerator().w(function (_context) {
|
|
682
|
+
while (1) switch (_context.n) {
|
|
900
683
|
case 0:
|
|
901
|
-
_context.
|
|
684
|
+
_context.n = 1;
|
|
902
685
|
return getToken();
|
|
903
|
-
case
|
|
904
|
-
token = _context.
|
|
686
|
+
case 1:
|
|
687
|
+
token = _context.v;
|
|
905
688
|
if (!(typeof getOrganisations === "string")) {
|
|
906
|
-
_context.
|
|
689
|
+
_context.n = 3;
|
|
907
690
|
break;
|
|
908
691
|
}
|
|
909
|
-
_context.
|
|
692
|
+
_context.n = 2;
|
|
910
693
|
return fetch(getOrganisations, {
|
|
911
694
|
headers: {
|
|
912
695
|
Authorization: "Bearer " + token,
|
|
@@ -915,21 +698,20 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
|
915
698
|
}).then(function (response) {
|
|
916
699
|
return response.json();
|
|
917
700
|
});
|
|
918
|
-
case
|
|
919
|
-
organisations = _context.
|
|
920
|
-
_context.
|
|
701
|
+
case 2:
|
|
702
|
+
organisations = _context.v;
|
|
703
|
+
_context.n = 5;
|
|
921
704
|
break;
|
|
922
|
-
case
|
|
923
|
-
_context.
|
|
705
|
+
case 3:
|
|
706
|
+
_context.n = 4;
|
|
924
707
|
return getOrganisations(token);
|
|
925
|
-
case
|
|
926
|
-
organisations = _context.
|
|
927
|
-
case
|
|
708
|
+
case 4:
|
|
709
|
+
organisations = _context.v;
|
|
710
|
+
case 5:
|
|
928
711
|
setOrganisations(organisations);
|
|
929
712
|
setStatus("SUCCESS");
|
|
930
|
-
case
|
|
931
|
-
|
|
932
|
-
return _context.stop();
|
|
713
|
+
case 6:
|
|
714
|
+
return _context.a(2);
|
|
933
715
|
}
|
|
934
716
|
}, _callee);
|
|
935
717
|
}));
|