@entur-partner/app-shell 6.1.6-alpha.0 → 6.1.6-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -13,11 +13,31 @@ var React = require('react');
|
|
|
13
13
|
var postHog = require('posthog-js');
|
|
14
14
|
var react = require('posthog-js/react');
|
|
15
15
|
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
17
|
+
try {
|
|
18
|
+
var i = n[a](c),
|
|
19
|
+
u = i.value;
|
|
20
|
+
} catch (n) {
|
|
21
|
+
return void e(n);
|
|
22
|
+
}
|
|
23
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
24
|
+
}
|
|
25
|
+
function _asyncToGenerator(n) {
|
|
26
|
+
return function () {
|
|
27
|
+
var t = this,
|
|
28
|
+
e = arguments;
|
|
29
|
+
return new Promise(function (r, o) {
|
|
30
|
+
var a = n.apply(t, e);
|
|
31
|
+
function _next(n) {
|
|
32
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
33
|
+
}
|
|
34
|
+
function _throw(n) {
|
|
35
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
36
|
+
}
|
|
37
|
+
_next(void 0);
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
}
|
|
21
41
|
function _construct(t, e, r) {
|
|
22
42
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
23
43
|
var o = [null];
|
|
@@ -25,6 +45,30 @@ function _construct(t, e, r) {
|
|
|
25
45
|
var p = new (t.bind.apply(t, o))();
|
|
26
46
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
27
47
|
}
|
|
48
|
+
function _extends() {
|
|
49
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
50
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
51
|
+
var t = arguments[e];
|
|
52
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
53
|
+
}
|
|
54
|
+
return n;
|
|
55
|
+
}, _extends.apply(null, arguments);
|
|
56
|
+
}
|
|
57
|
+
function _getPrototypeOf(t) {
|
|
58
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
59
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
60
|
+
}, _getPrototypeOf(t);
|
|
61
|
+
}
|
|
62
|
+
function _inheritsLoose(t, o) {
|
|
63
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
64
|
+
}
|
|
65
|
+
function _isNativeFunction(t) {
|
|
66
|
+
try {
|
|
67
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
68
|
+
} catch (n) {
|
|
69
|
+
return "function" == typeof t;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
28
72
|
function _isNativeReflectConstruct() {
|
|
29
73
|
try {
|
|
30
74
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -33,418 +77,154 @@ function _isNativeReflectConstruct() {
|
|
|
33
77
|
return !!t;
|
|
34
78
|
})();
|
|
35
79
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
r = Object.prototype,
|
|
43
|
-
n = r.hasOwnProperty,
|
|
44
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
45
|
-
t[e] = r.value;
|
|
46
|
-
},
|
|
47
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
48
|
-
a = i.iterator || "@@iterator",
|
|
49
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
50
|
-
u = i.toStringTag || "@@toStringTag";
|
|
51
|
-
function define(t, e, r) {
|
|
52
|
-
return Object.defineProperty(t, e, {
|
|
53
|
-
value: r,
|
|
54
|
-
enumerable: !0,
|
|
55
|
-
configurable: !0,
|
|
56
|
-
writable: !0
|
|
57
|
-
}), t[e];
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
define({}, "");
|
|
61
|
-
} catch (t) {
|
|
62
|
-
define = function (t, e, r) {
|
|
63
|
-
return t[e] = r;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function wrap(t, e, r, n) {
|
|
67
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
68
|
-
a = Object.create(i.prototype),
|
|
69
|
-
c = new Context(n || []);
|
|
70
|
-
return o(a, "_invoke", {
|
|
71
|
-
value: makeInvokeMethod(t, r, c)
|
|
72
|
-
}), a;
|
|
73
|
-
}
|
|
74
|
-
function tryCatch(t, e, r) {
|
|
75
|
-
try {
|
|
76
|
-
return {
|
|
77
|
-
type: "normal",
|
|
78
|
-
arg: t.call(e, r)
|
|
79
|
-
};
|
|
80
|
-
} catch (t) {
|
|
81
|
-
return {
|
|
82
|
-
type: "throw",
|
|
83
|
-
arg: t
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
e.wrap = wrap;
|
|
88
|
-
var h = "suspendedStart",
|
|
89
|
-
l = "suspendedYield",
|
|
90
|
-
f = "executing",
|
|
91
|
-
s = "completed",
|
|
92
|
-
y = {};
|
|
93
|
-
function Generator() {}
|
|
94
|
-
function GeneratorFunction() {}
|
|
95
|
-
function GeneratorFunctionPrototype() {}
|
|
96
|
-
var p = {};
|
|
97
|
-
define(p, a, function () {
|
|
98
|
-
return this;
|
|
99
|
-
});
|
|
100
|
-
var d = Object.getPrototypeOf,
|
|
101
|
-
v = d && d(d(values([])));
|
|
102
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
103
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
104
|
-
function defineIteratorMethods(t) {
|
|
105
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
106
|
-
define(t, e, function (t) {
|
|
107
|
-
return this._invoke(e, t);
|
|
108
|
-
});
|
|
109
|
-
});
|
|
80
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
81
|
+
if (null == r) return {};
|
|
82
|
+
var t = {};
|
|
83
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
84
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
85
|
+
t[n] = r[n];
|
|
110
86
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
function _regenerator() {
|
|
90
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
91
|
+
var e,
|
|
92
|
+
t,
|
|
93
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
94
|
+
n = r.iterator || "@@iterator",
|
|
95
|
+
o = r.toStringTag || "@@toStringTag";
|
|
96
|
+
function i(r, n, o, i) {
|
|
97
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
98
|
+
u = Object.create(c.prototype);
|
|
99
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
100
|
+
var i,
|
|
101
|
+
c,
|
|
102
|
+
u,
|
|
103
|
+
f = 0,
|
|
104
|
+
p = o || [],
|
|
105
|
+
y = !1,
|
|
106
|
+
G = {
|
|
107
|
+
p: 0,
|
|
108
|
+
n: 0,
|
|
109
|
+
v: e,
|
|
110
|
+
a: d,
|
|
111
|
+
f: d.bind(e, 4),
|
|
112
|
+
d: function (t, r) {
|
|
113
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
function d(r, n) {
|
|
117
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
118
|
+
var o,
|
|
119
|
+
i = p[t],
|
|
120
|
+
d = G.p,
|
|
121
|
+
l = i[2];
|
|
122
|
+
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));
|
|
136
123
|
}
|
|
137
|
-
|
|
124
|
+
if (o || r > 1) return a;
|
|
125
|
+
throw y = !0, n;
|
|
138
126
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
127
|
+
return function (o, p, l) {
|
|
128
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
129
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
130
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
131
|
+
try {
|
|
132
|
+
if (f = 2, i) {
|
|
133
|
+
if (c || (o = "next"), t = i[o]) {
|
|
134
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
135
|
+
if (!t.done) return t;
|
|
136
|
+
u = t.value, c < 2 && (c = 0);
|
|
137
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
138
|
+
i = e;
|
|
139
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
140
|
+
} catch (t) {
|
|
141
|
+
i = e, c = 1, u = t;
|
|
142
|
+
} finally {
|
|
143
|
+
f = 1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
147
146
|
return {
|
|
148
147
|
value: t,
|
|
149
|
-
done:
|
|
148
|
+
done: y
|
|
150
149
|
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
var c = n.delegate;
|
|
154
|
-
if (c) {
|
|
155
|
-
var u = maybeInvokeDelegate(c, n);
|
|
156
|
-
if (u) {
|
|
157
|
-
if (u === y) continue;
|
|
158
|
-
return u;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
162
|
-
if (o === h) throw o = s, n.arg;
|
|
163
|
-
n.dispatchException(n.arg);
|
|
164
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
165
|
-
o = f;
|
|
166
|
-
var p = tryCatch(e, r, n);
|
|
167
|
-
if ("normal" === p.type) {
|
|
168
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
169
|
-
return {
|
|
170
|
-
value: p.arg,
|
|
171
|
-
done: n.done
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function maybeInvokeDelegate(e, r) {
|
|
179
|
-
var n = r.method,
|
|
180
|
-
o = e.iterator[n];
|
|
181
|
-
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;
|
|
182
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
183
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
184
|
-
var a = i.arg;
|
|
185
|
-
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);
|
|
186
|
-
}
|
|
187
|
-
function pushTryEntry(t) {
|
|
188
|
-
var e = {
|
|
189
|
-
tryLoc: t[0]
|
|
190
|
-
};
|
|
191
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
192
|
-
}
|
|
193
|
-
function resetTryEntry(t) {
|
|
194
|
-
var e = t.completion || {};
|
|
195
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
196
|
-
}
|
|
197
|
-
function Context(t) {
|
|
198
|
-
this.tryEntries = [{
|
|
199
|
-
tryLoc: "root"
|
|
200
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
150
|
+
};
|
|
151
|
+
}(r, o, i), !0), u;
|
|
201
152
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return i.next = i;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
153
|
+
var a = {};
|
|
154
|
+
function Generator() {}
|
|
155
|
+
function GeneratorFunction() {}
|
|
156
|
+
function GeneratorFunctionPrototype() {}
|
|
157
|
+
t = Object.getPrototypeOf;
|
|
158
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
159
|
+
return this;
|
|
160
|
+
}), t),
|
|
161
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
162
|
+
function f(e) {
|
|
163
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
217
164
|
}
|
|
218
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
219
|
-
value: GeneratorFunctionPrototype,
|
|
220
|
-
configurable: !0
|
|
221
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
222
|
-
value: GeneratorFunction,
|
|
223
|
-
configurable: !0
|
|
224
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
225
|
-
var e = "function" == typeof t && t.constructor;
|
|
226
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
227
|
-
}, e.mark = function (t) {
|
|
228
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
229
|
-
}, e.awrap = function (t) {
|
|
230
|
-
return {
|
|
231
|
-
__await: t
|
|
232
|
-
};
|
|
233
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
234
|
-
return this;
|
|
235
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
236
|
-
void 0 === i && (i = Promise);
|
|
237
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
238
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
239
|
-
return t.done ? t.value : a.next();
|
|
240
|
-
});
|
|
241
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
165
|
+
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 () {
|
|
242
166
|
return this;
|
|
243
|
-
}),
|
|
167
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
244
168
|
return "[object Generator]";
|
|
245
|
-
}),
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return r.reverse(), function next() {
|
|
250
|
-
for (; r.length;) {
|
|
251
|
-
var t = r.pop();
|
|
252
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
253
|
-
}
|
|
254
|
-
return next.done = !0, next;
|
|
169
|
+
}), (_regenerator = function () {
|
|
170
|
+
return {
|
|
171
|
+
w: i,
|
|
172
|
+
m: f
|
|
255
173
|
};
|
|
256
|
-
}
|
|
257
|
-
constructor: Context,
|
|
258
|
-
reset: function (e) {
|
|
259
|
-
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);
|
|
260
|
-
},
|
|
261
|
-
stop: function () {
|
|
262
|
-
this.done = !0;
|
|
263
|
-
var t = this.tryEntries[0].completion;
|
|
264
|
-
if ("throw" === t.type) throw t.arg;
|
|
265
|
-
return this.rval;
|
|
266
|
-
},
|
|
267
|
-
dispatchException: function (e) {
|
|
268
|
-
if (this.done) throw e;
|
|
269
|
-
var r = this;
|
|
270
|
-
function handle(n, o) {
|
|
271
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
272
|
-
}
|
|
273
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
274
|
-
var i = this.tryEntries[o],
|
|
275
|
-
a = i.completion;
|
|
276
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
277
|
-
if (i.tryLoc <= this.prev) {
|
|
278
|
-
var c = n.call(i, "catchLoc"),
|
|
279
|
-
u = n.call(i, "finallyLoc");
|
|
280
|
-
if (c && u) {
|
|
281
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
282
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
283
|
-
} else if (c) {
|
|
284
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
285
|
-
} else {
|
|
286
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
287
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
abrupt: function (t, e) {
|
|
293
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
294
|
-
var o = this.tryEntries[r];
|
|
295
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
296
|
-
var i = o;
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
301
|
-
var a = i ? i.completion : {};
|
|
302
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
303
|
-
},
|
|
304
|
-
complete: function (t, e) {
|
|
305
|
-
if ("throw" === t.type) throw t.arg;
|
|
306
|
-
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;
|
|
307
|
-
},
|
|
308
|
-
finish: function (t) {
|
|
309
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
310
|
-
var r = this.tryEntries[e];
|
|
311
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
catch: function (t) {
|
|
315
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
316
|
-
var r = this.tryEntries[e];
|
|
317
|
-
if (r.tryLoc === t) {
|
|
318
|
-
var n = r.completion;
|
|
319
|
-
if ("throw" === n.type) {
|
|
320
|
-
var o = n.arg;
|
|
321
|
-
resetTryEntry(r);
|
|
322
|
-
}
|
|
323
|
-
return o;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
throw Error("illegal catch attempt");
|
|
327
|
-
},
|
|
328
|
-
delegateYield: function (e, r, n) {
|
|
329
|
-
return this.delegate = {
|
|
330
|
-
iterator: values(e),
|
|
331
|
-
resultName: r,
|
|
332
|
-
nextLoc: n
|
|
333
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
334
|
-
}
|
|
335
|
-
}, e;
|
|
174
|
+
})();
|
|
336
175
|
}
|
|
337
|
-
function
|
|
176
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
177
|
+
var i = Object.defineProperty;
|
|
338
178
|
try {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
reject(error);
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
if (info.done) {
|
|
346
|
-
resolve(value);
|
|
347
|
-
} else {
|
|
348
|
-
Promise.resolve(value).then(_next, _throw);
|
|
179
|
+
i({}, "", {});
|
|
180
|
+
} catch (e) {
|
|
181
|
+
i = 0;
|
|
349
182
|
}
|
|
350
|
-
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
return new Promise(function (resolve, reject) {
|
|
356
|
-
var gen = fn.apply(self, args);
|
|
357
|
-
function _next(value) {
|
|
358
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
359
|
-
}
|
|
360
|
-
function _throw(err) {
|
|
361
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
362
|
-
}
|
|
363
|
-
_next(undefined);
|
|
364
|
-
});
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function _extends() {
|
|
368
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
369
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
370
|
-
var source = arguments[i];
|
|
371
|
-
for (var key in source) {
|
|
372
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
373
|
-
target[key] = source[key];
|
|
374
|
-
}
|
|
375
|
-
}
|
|
183
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
184
|
+
function o(r, n) {
|
|
185
|
+
_regeneratorDefine(e, r, function (e) {
|
|
186
|
+
return this._invoke(r, n, e);
|
|
187
|
+
});
|
|
376
188
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
_setPrototypeOf(subClass, superClass);
|
|
385
|
-
}
|
|
386
|
-
function _getPrototypeOf(o) {
|
|
387
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
388
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
389
|
-
};
|
|
390
|
-
return _getPrototypeOf(o);
|
|
391
|
-
}
|
|
392
|
-
function _setPrototypeOf(o, p) {
|
|
393
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
394
|
-
o.__proto__ = p;
|
|
395
|
-
return o;
|
|
396
|
-
};
|
|
397
|
-
return _setPrototypeOf(o, p);
|
|
189
|
+
r ? i ? i(e, r, {
|
|
190
|
+
value: n,
|
|
191
|
+
enumerable: !t,
|
|
192
|
+
configurable: !t,
|
|
193
|
+
writable: !t
|
|
194
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
195
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
398
196
|
}
|
|
399
|
-
function
|
|
400
|
-
|
|
401
|
-
return
|
|
402
|
-
}
|
|
403
|
-
return typeof fn === "function";
|
|
404
|
-
}
|
|
197
|
+
function _setPrototypeOf(t, e) {
|
|
198
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
199
|
+
return t.__proto__ = e, t;
|
|
200
|
+
}, _setPrototypeOf(t, e);
|
|
405
201
|
}
|
|
406
|
-
function _wrapNativeSuper(
|
|
407
|
-
var
|
|
408
|
-
_wrapNativeSuper = function
|
|
409
|
-
if (
|
|
410
|
-
if (typeof
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
415
|
-
_cache.set(Class, Wrapper);
|
|
202
|
+
function _wrapNativeSuper(t) {
|
|
203
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
204
|
+
return _wrapNativeSuper = function (t) {
|
|
205
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
206
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
207
|
+
if (void 0 !== r) {
|
|
208
|
+
if (r.has(t)) return r.get(t);
|
|
209
|
+
r.set(t, Wrapper);
|
|
416
210
|
}
|
|
417
211
|
function Wrapper() {
|
|
418
|
-
return _construct(
|
|
212
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
419
213
|
}
|
|
420
|
-
Wrapper.prototype = Object.create(
|
|
214
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
421
215
|
constructor: {
|
|
422
216
|
value: Wrapper,
|
|
423
|
-
enumerable:
|
|
424
|
-
writable:
|
|
425
|
-
configurable:
|
|
217
|
+
enumerable: !1,
|
|
218
|
+
writable: !0,
|
|
219
|
+
configurable: !0
|
|
426
220
|
}
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
};
|
|
430
|
-
return _wrapNativeSuper(Class);
|
|
431
|
-
}
|
|
432
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
433
|
-
if (source == null) return {};
|
|
434
|
-
var target = {};
|
|
435
|
-
var sourceKeys = Object.keys(source);
|
|
436
|
-
var key, i;
|
|
437
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
438
|
-
key = sourceKeys[i];
|
|
439
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
440
|
-
target[key] = source[key];
|
|
441
|
-
}
|
|
442
|
-
return target;
|
|
221
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
222
|
+
}, _wrapNativeSuper(t);
|
|
443
223
|
}
|
|
444
224
|
|
|
445
225
|
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
446
226
|
var environment = _ref.environment;
|
|
447
|
-
return
|
|
227
|
+
return React.createElement("div", {
|
|
448
228
|
className: "epp-environment-banner",
|
|
449
229
|
style: {
|
|
450
230
|
position: "fixed",
|
|
@@ -486,32 +266,31 @@ var Authenticate = function Authenticate(_ref) {
|
|
|
486
266
|
error = _useAuth.error;
|
|
487
267
|
React.useEffect(function () {
|
|
488
268
|
var fetchUserData = /*#__PURE__*/function () {
|
|
489
|
-
var _ref2 = _asyncToGenerator(
|
|
490
|
-
var token, decoratedUser;
|
|
491
|
-
return
|
|
492
|
-
while (1) switch (_context.
|
|
269
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
270
|
+
var token, decoratedUser, _t;
|
|
271
|
+
return _regenerator().w(function (_context) {
|
|
272
|
+
while (1) switch (_context.p = _context.n) {
|
|
493
273
|
case 0:
|
|
494
|
-
_context.
|
|
495
|
-
_context.
|
|
274
|
+
_context.p = 0;
|
|
275
|
+
_context.n = 1;
|
|
496
276
|
return getAccessTokenSilently();
|
|
497
|
-
case
|
|
498
|
-
token = _context.
|
|
499
|
-
_context.
|
|
277
|
+
case 1:
|
|
278
|
+
token = _context.v;
|
|
279
|
+
_context.n = 2;
|
|
500
280
|
return decorateUser(user, token);
|
|
501
|
-
case
|
|
502
|
-
decoratedUser = _context.
|
|
281
|
+
case 2:
|
|
282
|
+
decoratedUser = _context.v;
|
|
503
283
|
setUserWithPermission(decoratedUser);
|
|
504
|
-
_context.
|
|
284
|
+
_context.n = 4;
|
|
505
285
|
break;
|
|
506
|
-
case
|
|
507
|
-
_context.
|
|
508
|
-
|
|
509
|
-
console.error("Error fetching user data:",
|
|
510
|
-
case
|
|
511
|
-
|
|
512
|
-
return _context.stop();
|
|
286
|
+
case 3:
|
|
287
|
+
_context.p = 3;
|
|
288
|
+
_t = _context.v;
|
|
289
|
+
console.error("Error fetching user data:", _t);
|
|
290
|
+
case 4:
|
|
291
|
+
return _context.a(2);
|
|
513
292
|
}
|
|
514
|
-
}, _callee, null, [[0,
|
|
293
|
+
}, _callee, null, [[0, 3]]);
|
|
515
294
|
}));
|
|
516
295
|
return function fetchUserData() {
|
|
517
296
|
return _ref2.apply(this, arguments);
|
|
@@ -523,14 +302,14 @@ var Authenticate = function Authenticate(_ref) {
|
|
|
523
302
|
}, [decorateUser, getAccessTokenSilently, isAuthenticated, user]);
|
|
524
303
|
if (!isLoading && !isAuthenticated) {
|
|
525
304
|
loginWithRedirect();
|
|
526
|
-
return
|
|
305
|
+
return React.createElement(loader.Loader, {
|
|
527
306
|
style: {
|
|
528
307
|
marginTop: tokens.space.extraLarge9
|
|
529
308
|
}
|
|
530
309
|
}, "Redirecting to login page");
|
|
531
310
|
}
|
|
532
311
|
if (isLoading || !userWithPermission) {
|
|
533
|
-
return
|
|
312
|
+
return React.createElement(loader.Loader, {
|
|
534
313
|
style: {
|
|
535
314
|
marginTop: tokens.space.extraLarge9
|
|
536
315
|
}
|
|
@@ -538,19 +317,19 @@ var Authenticate = function Authenticate(_ref) {
|
|
|
538
317
|
}
|
|
539
318
|
if (error) {
|
|
540
319
|
console.error(error);
|
|
541
|
-
return
|
|
320
|
+
return React.createElement(alert.BannerAlertBox, {
|
|
542
321
|
variant: "error",
|
|
543
322
|
title: "Authentication failed",
|
|
544
323
|
style: {
|
|
545
324
|
maxWidth: "600px",
|
|
546
325
|
margin: "0 auto"
|
|
547
326
|
}
|
|
548
|
-
},
|
|
327
|
+
}, React.createElement(typography.Paragraph, null, "Something went wrong while trying to authenticate you. If the problem persists you should contact", " ", React.createElement(typography.Link, {
|
|
549
328
|
href: "mailto:support@entur.org"
|
|
550
|
-
}, "support@entur.org"), " to get it resolved."),
|
|
329
|
+
}, "support@entur.org"), " to get it resolved."), React.createElement(typography.Paragraph, null, "Authentication failed with: ", React.createElement(typography.CodeText, null, error == null ? void 0 : error.toString())));
|
|
551
330
|
}
|
|
552
331
|
util.assertIsDefined(userWithPermission);
|
|
553
|
-
return
|
|
332
|
+
return React.createElement(React.Fragment, null, children({
|
|
554
333
|
user: userWithPermission,
|
|
555
334
|
logout: function logout() {
|
|
556
335
|
return userLogout(_logout);
|
|
@@ -565,17 +344,17 @@ var AppShell = function AppShell(_ref3) {
|
|
|
565
344
|
clientId = _ref3.clientId,
|
|
566
345
|
decorateUser = _ref3.decorateUser,
|
|
567
346
|
environment = _ref3.environment;
|
|
568
|
-
return
|
|
347
|
+
return React.createElement(auth0React.Auth0Provider, {
|
|
569
348
|
domain: domain,
|
|
570
349
|
clientId: clientId,
|
|
571
350
|
authorizationParams: {
|
|
572
351
|
redirect_uri: window.location.origin,
|
|
573
352
|
audience: audience
|
|
574
353
|
}
|
|
575
|
-
},
|
|
354
|
+
}, React.createElement(Authenticate, {
|
|
576
355
|
decorateUser: decorateUser
|
|
577
356
|
}, function (params) {
|
|
578
|
-
return
|
|
357
|
+
return React.createElement(React.Fragment, null, environment && environment !== common.Environment.Production && React.createElement(EnvironmentBanner, {
|
|
579
358
|
environment: environment
|
|
580
359
|
}), children(params));
|
|
581
360
|
}));
|
|
@@ -677,24 +456,23 @@ var ConsentManagerProvider = function ConsentManagerProvider(_ref) {
|
|
|
677
456
|
// Listen for Usercentrics consent events and update consent manager state
|
|
678
457
|
React.useEffect(function () {
|
|
679
458
|
var handleConsentEvent = /*#__PURE__*/function () {
|
|
680
|
-
var _ref2 = _asyncToGenerator(
|
|
459
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(event) {
|
|
681
460
|
var customEvent, services, updatedConsentManager;
|
|
682
|
-
return
|
|
683
|
-
while (1) switch (_context.
|
|
461
|
+
return _regenerator().w(function (_context) {
|
|
462
|
+
while (1) switch (_context.n) {
|
|
684
463
|
case 0:
|
|
685
464
|
if (!(typeof window === "undefined")) {
|
|
686
|
-
_context.
|
|
465
|
+
_context.n = 1;
|
|
687
466
|
break;
|
|
688
467
|
}
|
|
689
|
-
return _context.
|
|
690
|
-
case
|
|
468
|
+
return _context.a(2);
|
|
469
|
+
case 1:
|
|
691
470
|
customEvent = event;
|
|
692
471
|
services = Object.values(customEvent.detail.services);
|
|
693
472
|
updatedConsentManager = convertUCServicesToConsents(services);
|
|
694
473
|
setConsentManager(updatedConsentManager);
|
|
695
|
-
case
|
|
696
|
-
|
|
697
|
-
return _context.stop();
|
|
474
|
+
case 2:
|
|
475
|
+
return _context.a(2);
|
|
698
476
|
}
|
|
699
477
|
}, _callee);
|
|
700
478
|
}));
|
|
@@ -707,12 +485,12 @@ var ConsentManagerProvider = function ConsentManagerProvider(_ref) {
|
|
|
707
485
|
return window.removeEventListener("UC_CONSENT", handleConsentEvent);
|
|
708
486
|
};
|
|
709
487
|
}, []);
|
|
710
|
-
return
|
|
488
|
+
return React.createElement(ConsentContext.Provider, {
|
|
711
489
|
value: consentManager
|
|
712
490
|
}, children);
|
|
713
491
|
};
|
|
714
492
|
|
|
715
|
-
var LanguageContext = /*#__PURE__*/
|
|
493
|
+
var LanguageContext = /*#__PURE__*/React.createContext(undefined);
|
|
716
494
|
var useLanguageState = function useLanguageState(language) {
|
|
717
495
|
var _useState = React.useState(language),
|
|
718
496
|
activeLanguage = _useState[0],
|
|
@@ -733,7 +511,7 @@ var LanguageProvider = function LanguageProvider(_ref) {
|
|
|
733
511
|
var _useLanguageState = useLanguageState(language),
|
|
734
512
|
activeLanguage = _useLanguageState[0],
|
|
735
513
|
setLanguage = _useLanguageState[1];
|
|
736
|
-
return
|
|
514
|
+
return React.createElement(LanguageContext.Provider, {
|
|
737
515
|
value: {
|
|
738
516
|
language: activeLanguage,
|
|
739
517
|
setLanguage: setLanguage
|
|
@@ -741,7 +519,7 @@ var LanguageProvider = function LanguageProvider(_ref) {
|
|
|
741
519
|
}, children);
|
|
742
520
|
};
|
|
743
521
|
|
|
744
|
-
var MenuContext = /*#__PURE__*/
|
|
522
|
+
var MenuContext = /*#__PURE__*/React.createContext({
|
|
745
523
|
addItems: function addItems() {},
|
|
746
524
|
getItemsForPath: function getItemsForPath() {
|
|
747
525
|
return [];
|
|
@@ -786,7 +564,7 @@ var MenuProvider = function MenuProvider(_ref) {
|
|
|
786
564
|
return _extends({}, prev, (_extends3 = {}, _extends3[path] = navigation, _extends3));
|
|
787
565
|
});
|
|
788
566
|
};
|
|
789
|
-
return
|
|
567
|
+
return React.createElement(MenuContext.Provider, {
|
|
790
568
|
value: {
|
|
791
569
|
addItems: addItems,
|
|
792
570
|
getItemsForPath: function getItemsForPath(path) {
|
|
@@ -811,7 +589,7 @@ var MicroFrontendLink = function MicroFrontendLink(_ref) {
|
|
|
811
589
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
812
590
|
return (
|
|
813
591
|
// biome-ignore lint/a11y/noStaticElementInteractions: Ignore lint rule for now. No changes in code.
|
|
814
|
-
|
|
592
|
+
React.createElement("a", _extends({
|
|
815
593
|
// biome-ignore lint/a11y/useValidAnchor: Ignore lint rule for now. No changes in code.
|
|
816
594
|
onClick: function onClick(event) {
|
|
817
595
|
try {
|
|
@@ -837,7 +615,7 @@ var MicroFrontendLink = function MicroFrontendLink(_ref) {
|
|
|
837
615
|
);
|
|
838
616
|
};
|
|
839
617
|
|
|
840
|
-
var OrganisationContext = /*#__PURE__*/
|
|
618
|
+
var OrganisationContext = /*#__PURE__*/React.createContext(undefined);
|
|
841
619
|
var useOrganisation = function useOrganisation() {
|
|
842
620
|
var context = React.useContext(OrganisationContext);
|
|
843
621
|
util.assertIsDefined(context);
|
|
@@ -863,7 +641,7 @@ var OrganisationProvider = function OrganisationProvider(_ref) {
|
|
|
863
641
|
var _useOrganisationState = useOrganisationState(organisationId),
|
|
864
642
|
orgId = _useOrganisationState[0],
|
|
865
643
|
setOrganisationId = _useOrganisationState[1];
|
|
866
|
-
return
|
|
644
|
+
return React.createElement(OrganisationContext.Provider, {
|
|
867
645
|
value: {
|
|
868
646
|
organisationId: orgId,
|
|
869
647
|
setOrganisationId: setOrganisationId
|
|
@@ -883,7 +661,7 @@ var OrganisationsError = /*#__PURE__*/function (_Error) {
|
|
|
883
661
|
}
|
|
884
662
|
_inheritsLoose(OrganisationsError, _Error);
|
|
885
663
|
return OrganisationsError;
|
|
886
|
-
}(
|
|
664
|
+
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
887
665
|
|
|
888
666
|
var _excluded = ["getToken", "getOrganisations", "selectedOrganisationId", "onChange"];
|
|
889
667
|
var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
@@ -902,20 +680,20 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
|
902
680
|
setStatus = _useState2[1];
|
|
903
681
|
React.useEffect(function () {
|
|
904
682
|
var fetchOrganisations = /*#__PURE__*/function () {
|
|
905
|
-
var _ref2 = _asyncToGenerator(
|
|
683
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
906
684
|
var token, organisations;
|
|
907
|
-
return
|
|
908
|
-
while (1) switch (_context.
|
|
685
|
+
return _regenerator().w(function (_context) {
|
|
686
|
+
while (1) switch (_context.n) {
|
|
909
687
|
case 0:
|
|
910
|
-
_context.
|
|
688
|
+
_context.n = 1;
|
|
911
689
|
return getToken();
|
|
912
|
-
case
|
|
913
|
-
token = _context.
|
|
690
|
+
case 1:
|
|
691
|
+
token = _context.v;
|
|
914
692
|
if (!(typeof getOrganisations === "string")) {
|
|
915
|
-
_context.
|
|
693
|
+
_context.n = 3;
|
|
916
694
|
break;
|
|
917
695
|
}
|
|
918
|
-
_context.
|
|
696
|
+
_context.n = 2;
|
|
919
697
|
return fetch(getOrganisations, {
|
|
920
698
|
headers: {
|
|
921
699
|
Authorization: "Bearer " + token,
|
|
@@ -924,21 +702,20 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
|
924
702
|
}).then(function (response) {
|
|
925
703
|
return response.json();
|
|
926
704
|
});
|
|
927
|
-
case
|
|
928
|
-
organisations = _context.
|
|
929
|
-
_context.
|
|
705
|
+
case 2:
|
|
706
|
+
organisations = _context.v;
|
|
707
|
+
_context.n = 5;
|
|
930
708
|
break;
|
|
931
|
-
case
|
|
932
|
-
_context.
|
|
709
|
+
case 3:
|
|
710
|
+
_context.n = 4;
|
|
933
711
|
return getOrganisations(token);
|
|
934
|
-
case
|
|
935
|
-
organisations = _context.
|
|
936
|
-
case
|
|
712
|
+
case 4:
|
|
713
|
+
organisations = _context.v;
|
|
714
|
+
case 5:
|
|
937
715
|
setOrganisations(organisations);
|
|
938
716
|
setStatus("SUCCESS");
|
|
939
|
-
case
|
|
940
|
-
|
|
941
|
-
return _context.stop();
|
|
717
|
+
case 6:
|
|
718
|
+
return _context.a(2);
|
|
942
719
|
}
|
|
943
720
|
}, _callee);
|
|
944
721
|
}));
|
|
@@ -955,15 +732,15 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
|
|
|
955
732
|
}, [getOrganisations, getToken]);
|
|
956
733
|
switch (status) {
|
|
957
734
|
case "LOADING":
|
|
958
|
-
return
|
|
735
|
+
return React.createElement("div", {
|
|
959
736
|
className: "eds-contrast"
|
|
960
|
-
},
|
|
737
|
+
}, React.createElement(loader.SkeletonRectangle, {
|
|
961
738
|
style: {
|
|
962
739
|
height: "2.4rem"
|
|
963
740
|
}
|
|
964
741
|
}));
|
|
965
742
|
case "SUCCESS":
|
|
966
|
-
return
|
|
743
|
+
return React.createElement(common.OrganisationDropDown, _extends({
|
|
967
744
|
label: language === "nb" || language === "nb-NO" ? "Organisasjon" : "Organisation",
|
|
968
745
|
selectedOrganisationId: selectedOrganisationId,
|
|
969
746
|
organisations: organisations,
|
|
@@ -991,9 +768,9 @@ var PostHogProviderWrapper = function PostHogProviderWrapper(_ref) {
|
|
|
991
768
|
return;
|
|
992
769
|
}
|
|
993
770
|
if (consents != null && consents.PostHog.consentGiven) {
|
|
994
|
-
|
|
771
|
+
postHog.opt_in_capturing();
|
|
995
772
|
} else {
|
|
996
|
-
|
|
773
|
+
postHog.opt_out_capturing();
|
|
997
774
|
}
|
|
998
775
|
}, [consents.PostHog.consentGiven, forceDisablePostHog, postHogApiKey]);
|
|
999
776
|
// If no API key is provided or PostHog is forced to be disabled, do not initialize PostHog
|
|
@@ -1003,17 +780,17 @@ var PostHogProviderWrapper = function PostHogProviderWrapper(_ref) {
|
|
|
1003
780
|
} else {
|
|
1004
781
|
console.warn("AppShellStandalone Warning: PostHog tracking is disabled by force. PostHog will not be initialized.");
|
|
1005
782
|
}
|
|
1006
|
-
return
|
|
783
|
+
return React.createElement(React.Fragment, null, children);
|
|
1007
784
|
}
|
|
1008
|
-
|
|
785
|
+
postHog.init(postHogApiKey, {
|
|
1009
786
|
debug: debug,
|
|
1010
787
|
api_host: isStandalone ? "https://eu.posthog.com" : "/ingest",
|
|
1011
788
|
ui_host: "https://eu.posthog.com",
|
|
1012
789
|
opt_out_capturing_by_default: true,
|
|
1013
790
|
autocapture: isStandalone
|
|
1014
791
|
}, project);
|
|
1015
|
-
return
|
|
1016
|
-
client:
|
|
792
|
+
return React.createElement(react.PostHogProvider, {
|
|
793
|
+
client: postHog
|
|
1017
794
|
}, children);
|
|
1018
795
|
};
|
|
1019
796
|
|