@entur-partner/micro-frontend 2.4.3 → 2.4.5
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/Payload.d.ts +1 -1
- package/dist/events.d.ts +4 -4
- package/dist/micro-frontend.cjs.development.js +265 -357
- package/dist/micro-frontend.cjs.development.js.map +1 -1
- package/dist/micro-frontend.cjs.production.min.js +1 -1
- package/dist/micro-frontend.cjs.production.min.js.map +1 -1
- package/dist/micro-frontend.esm.js +265 -357
- package/dist/micro-frontend.esm.js.map +1 -1
- package/package.json +5 -5
|
@@ -9,351 +9,322 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
|
+
function _construct(t, e, r) {
|
|
13
|
+
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
14
|
+
var o = [null];
|
|
15
|
+
o.push.apply(o, e);
|
|
16
|
+
var p = new (t.bind.apply(t, o))();
|
|
17
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
|
18
|
+
}
|
|
19
|
+
function _isNativeReflectConstruct() {
|
|
20
|
+
try {
|
|
21
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
22
|
+
} catch (t) {}
|
|
23
|
+
return (_isNativeReflectConstruct = function () {
|
|
24
|
+
return !!t;
|
|
25
|
+
})();
|
|
26
|
+
}
|
|
12
27
|
function _regeneratorRuntime() {
|
|
13
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
14
|
-
|
|
15
28
|
_regeneratorRuntime = function () {
|
|
16
|
-
return
|
|
29
|
+
return e;
|
|
17
30
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
var t,
|
|
32
|
+
e = {},
|
|
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,
|
|
30
45
|
enumerable: !0,
|
|
31
46
|
configurable: !0,
|
|
32
47
|
writable: !0
|
|
33
|
-
}),
|
|
48
|
+
}), t[e];
|
|
34
49
|
}
|
|
35
|
-
|
|
36
50
|
try {
|
|
37
51
|
define({}, "");
|
|
38
|
-
} catch (
|
|
39
|
-
define = function (
|
|
40
|
-
return
|
|
52
|
+
} catch (t) {
|
|
53
|
+
define = function (t, e, r) {
|
|
54
|
+
return t[e] = r;
|
|
41
55
|
};
|
|
42
56
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return function (method, arg) {
|
|
51
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
52
|
-
|
|
53
|
-
if ("completed" === state) {
|
|
54
|
-
if ("throw" === method) throw arg;
|
|
55
|
-
return doneResult();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
for (context.method = method, context.arg = arg;;) {
|
|
59
|
-
var delegate = context.delegate;
|
|
60
|
-
|
|
61
|
-
if (delegate) {
|
|
62
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
63
|
-
|
|
64
|
-
if (delegateResult) {
|
|
65
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
66
|
-
return delegateResult;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
71
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
72
|
-
context.dispatchException(context.arg);
|
|
73
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
74
|
-
state = "executing";
|
|
75
|
-
var record = tryCatch(innerFn, self, context);
|
|
76
|
-
|
|
77
|
-
if ("normal" === record.type) {
|
|
78
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
79
|
-
return {
|
|
80
|
-
value: record.arg,
|
|
81
|
-
done: context.done
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}(innerFn, self, context), generator;
|
|
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;
|
|
89
64
|
}
|
|
90
|
-
|
|
91
|
-
function tryCatch(fn, obj, arg) {
|
|
65
|
+
function tryCatch(t, e, r) {
|
|
92
66
|
try {
|
|
93
67
|
return {
|
|
94
68
|
type: "normal",
|
|
95
|
-
arg:
|
|
69
|
+
arg: t.call(e, r)
|
|
96
70
|
};
|
|
97
|
-
} catch (
|
|
71
|
+
} catch (t) {
|
|
98
72
|
return {
|
|
99
73
|
type: "throw",
|
|
100
|
-
arg:
|
|
74
|
+
arg: t
|
|
101
75
|
};
|
|
102
76
|
}
|
|
103
77
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
78
|
+
e.wrap = wrap;
|
|
79
|
+
var h = "suspendedStart",
|
|
80
|
+
l = "suspendedYield",
|
|
81
|
+
f = "executing",
|
|
82
|
+
s = "completed",
|
|
83
|
+
y = {};
|
|
108
84
|
function Generator() {}
|
|
109
|
-
|
|
110
85
|
function GeneratorFunction() {}
|
|
111
|
-
|
|
112
86
|
function GeneratorFunctionPrototype() {}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
87
|
+
var p = {};
|
|
88
|
+
define(p, a, function () {
|
|
116
89
|
return this;
|
|
117
90
|
});
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return this._invoke(method, arg);
|
|
91
|
+
var d = Object.getPrototypeOf,
|
|
92
|
+
v = d && d(d(values([])));
|
|
93
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
94
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
95
|
+
function defineIteratorMethods(t) {
|
|
96
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
97
|
+
define(t, e, function (t) {
|
|
98
|
+
return this._invoke(e, t);
|
|
127
99
|
});
|
|
128
100
|
});
|
|
129
101
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
invoke("
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}, function (error) {
|
|
145
|
-
return invoke("throw", error, resolve, reject);
|
|
102
|
+
function AsyncIterator(t, e) {
|
|
103
|
+
function invoke(r, o, i, a) {
|
|
104
|
+
var c = tryCatch(t[r], t, o);
|
|
105
|
+
if ("throw" !== c.type) {
|
|
106
|
+
var u = c.arg,
|
|
107
|
+
h = u.value;
|
|
108
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
109
|
+
invoke("next", t, i, a);
|
|
110
|
+
}, function (t) {
|
|
111
|
+
invoke("throw", t, i, a);
|
|
112
|
+
}) : e.resolve(h).then(function (t) {
|
|
113
|
+
u.value = t, i(u);
|
|
114
|
+
}, function (t) {
|
|
115
|
+
return invoke("throw", t, i, a);
|
|
146
116
|
});
|
|
147
117
|
}
|
|
148
|
-
|
|
149
|
-
reject(record.arg);
|
|
118
|
+
a(c.arg);
|
|
150
119
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
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
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
159
129
|
}
|
|
160
|
-
|
|
161
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
162
|
-
};
|
|
130
|
+
});
|
|
163
131
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
132
|
+
function makeInvokeMethod(e, r, n) {
|
|
133
|
+
var o = h;
|
|
134
|
+
return function (i, a) {
|
|
135
|
+
if (o === f) throw Error("Generator is already running");
|
|
136
|
+
if (o === s) {
|
|
137
|
+
if ("throw" === i) throw a;
|
|
138
|
+
return {
|
|
139
|
+
value: t,
|
|
140
|
+
done: !0
|
|
141
|
+
};
|
|
172
142
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
143
|
+
for (n.method = i, n.arg = a;;) {
|
|
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
|
+
};
|
|
181
168
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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]
|
|
186
181
|
};
|
|
187
|
-
1 in
|
|
182
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
188
183
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
184
|
+
function resetTryEntry(t) {
|
|
185
|
+
var e = t.completion || {};
|
|
186
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
193
187
|
}
|
|
194
|
-
|
|
195
|
-
function Context(tryLocsList) {
|
|
188
|
+
function Context(t) {
|
|
196
189
|
this.tryEntries = [{
|
|
197
190
|
tryLoc: "root"
|
|
198
|
-
}],
|
|
191
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
199
192
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
next =
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return next.value = undefined, next.done = !0, next;
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
return next.next = next;
|
|
193
|
+
function values(e) {
|
|
194
|
+
if (e || "" === e) {
|
|
195
|
+
var r = e[a];
|
|
196
|
+
if (r) return r.call(e);
|
|
197
|
+
if ("function" == typeof e.next) return e;
|
|
198
|
+
if (!isNaN(e.length)) {
|
|
199
|
+
var o = -1,
|
|
200
|
+
i = function next() {
|
|
201
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
202
|
+
return next.value = t, next.done = !0, next;
|
|
203
|
+
};
|
|
204
|
+
return i.next = i;
|
|
216
205
|
}
|
|
217
206
|
}
|
|
218
|
-
|
|
219
|
-
return {
|
|
220
|
-
next: doneResult
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function doneResult() {
|
|
225
|
-
return {
|
|
226
|
-
value: undefined,
|
|
227
|
-
done: !0
|
|
228
|
-
};
|
|
207
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
229
208
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
},
|
|
209
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
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) {
|
|
237
221
|
return {
|
|
238
|
-
__await:
|
|
222
|
+
__await: t
|
|
239
223
|
};
|
|
240
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
224
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
241
225
|
return this;
|
|
242
|
-
}),
|
|
243
|
-
void 0 ===
|
|
244
|
-
var
|
|
245
|
-
return
|
|
246
|
-
return
|
|
226
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
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();
|
|
247
231
|
});
|
|
248
|
-
}, defineIteratorMethods(
|
|
232
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
249
233
|
return this;
|
|
250
|
-
}), define(
|
|
234
|
+
}), define(g, "toString", function () {
|
|
251
235
|
return "[object Generator]";
|
|
252
|
-
}),
|
|
253
|
-
var
|
|
254
|
-
|
|
255
|
-
for (var
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
236
|
+
}), e.keys = function (t) {
|
|
237
|
+
var e = Object(t),
|
|
238
|
+
r = [];
|
|
239
|
+
for (var n in e) r.push(n);
|
|
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;
|
|
261
244
|
}
|
|
262
|
-
|
|
263
245
|
return next.done = !0, next;
|
|
264
246
|
};
|
|
265
|
-
},
|
|
247
|
+
}, e.values = values, Context.prototype = {
|
|
266
248
|
constructor: Context,
|
|
267
|
-
reset: function (
|
|
268
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
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);
|
|
269
251
|
},
|
|
270
252
|
stop: function () {
|
|
271
253
|
this.done = !0;
|
|
272
|
-
var
|
|
273
|
-
if ("throw" ===
|
|
254
|
+
var t = this.tryEntries[0].completion;
|
|
255
|
+
if ("throw" === t.type) throw t.arg;
|
|
274
256
|
return this.rval;
|
|
275
257
|
},
|
|
276
|
-
dispatchException: function (
|
|
277
|
-
if (this.done) throw
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
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;
|
|
282
263
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (
|
|
294
|
-
if (this.prev <
|
|
295
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
296
|
-
} else if (hasCatch) {
|
|
297
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
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);
|
|
298
276
|
} else {
|
|
299
|
-
if (!
|
|
300
|
-
if (this.prev <
|
|
277
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
278
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
301
279
|
}
|
|
302
280
|
}
|
|
303
281
|
}
|
|
304
282
|
},
|
|
305
|
-
abrupt: function (
|
|
306
|
-
for (var
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
var finallyEntry = entry;
|
|
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;
|
|
311
288
|
break;
|
|
312
289
|
}
|
|
313
290
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
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);
|
|
318
294
|
},
|
|
319
|
-
complete: function (
|
|
320
|
-
if ("throw" ===
|
|
321
|
-
return "break" ===
|
|
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;
|
|
322
298
|
},
|
|
323
|
-
finish: function (
|
|
324
|
-
for (var
|
|
325
|
-
var
|
|
326
|
-
if (
|
|
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;
|
|
327
303
|
}
|
|
328
304
|
},
|
|
329
|
-
catch: function (
|
|
330
|
-
for (var
|
|
331
|
-
var
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
var thrown = record.arg;
|
|
338
|
-
resetTryEntry(entry);
|
|
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);
|
|
339
313
|
}
|
|
340
|
-
|
|
341
|
-
return thrown;
|
|
314
|
+
return o;
|
|
342
315
|
}
|
|
343
316
|
}
|
|
344
|
-
|
|
345
|
-
throw new Error("illegal catch attempt");
|
|
317
|
+
throw Error("illegal catch attempt");
|
|
346
318
|
},
|
|
347
|
-
delegateYield: function (
|
|
319
|
+
delegateYield: function (e, r, n) {
|
|
348
320
|
return this.delegate = {
|
|
349
|
-
iterator: values(
|
|
350
|
-
resultName:
|
|
351
|
-
nextLoc:
|
|
352
|
-
}, "next" === this.method && (this.arg =
|
|
321
|
+
iterator: values(e),
|
|
322
|
+
resultName: r,
|
|
323
|
+
nextLoc: n
|
|
324
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
353
325
|
}
|
|
354
|
-
},
|
|
326
|
+
}, e;
|
|
355
327
|
}
|
|
356
|
-
|
|
357
328
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
358
329
|
try {
|
|
359
330
|
var info = gen[key](arg);
|
|
@@ -362,65 +333,53 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
362
333
|
reject(error);
|
|
363
334
|
return;
|
|
364
335
|
}
|
|
365
|
-
|
|
366
336
|
if (info.done) {
|
|
367
337
|
resolve(value);
|
|
368
338
|
} else {
|
|
369
339
|
Promise.resolve(value).then(_next, _throw);
|
|
370
340
|
}
|
|
371
341
|
}
|
|
372
|
-
|
|
373
342
|
function _asyncToGenerator(fn) {
|
|
374
343
|
return function () {
|
|
375
344
|
var self = this,
|
|
376
|
-
|
|
345
|
+
args = arguments;
|
|
377
346
|
return new Promise(function (resolve, reject) {
|
|
378
347
|
var gen = fn.apply(self, args);
|
|
379
|
-
|
|
380
348
|
function _next(value) {
|
|
381
349
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
382
350
|
}
|
|
383
|
-
|
|
384
351
|
function _throw(err) {
|
|
385
352
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
386
353
|
}
|
|
387
|
-
|
|
388
354
|
_next(undefined);
|
|
389
355
|
});
|
|
390
356
|
};
|
|
391
357
|
}
|
|
392
|
-
|
|
393
358
|
function _extends() {
|
|
394
359
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
395
360
|
for (var i = 1; i < arguments.length; i++) {
|
|
396
361
|
var source = arguments[i];
|
|
397
|
-
|
|
398
362
|
for (var key in source) {
|
|
399
363
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
400
364
|
target[key] = source[key];
|
|
401
365
|
}
|
|
402
366
|
}
|
|
403
367
|
}
|
|
404
|
-
|
|
405
368
|
return target;
|
|
406
369
|
};
|
|
407
370
|
return _extends.apply(this, arguments);
|
|
408
371
|
}
|
|
409
|
-
|
|
410
372
|
function _inheritsLoose(subClass, superClass) {
|
|
411
373
|
subClass.prototype = Object.create(superClass.prototype);
|
|
412
374
|
subClass.prototype.constructor = subClass;
|
|
413
|
-
|
|
414
375
|
_setPrototypeOf(subClass, superClass);
|
|
415
376
|
}
|
|
416
|
-
|
|
417
377
|
function _getPrototypeOf(o) {
|
|
418
378
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
419
379
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
420
380
|
};
|
|
421
381
|
return _getPrototypeOf(o);
|
|
422
382
|
}
|
|
423
|
-
|
|
424
383
|
function _setPrototypeOf(o, p) {
|
|
425
384
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
426
385
|
o.__proto__ = p;
|
|
@@ -428,61 +387,27 @@ function _setPrototypeOf(o, p) {
|
|
|
428
387
|
};
|
|
429
388
|
return _setPrototypeOf(o, p);
|
|
430
389
|
}
|
|
431
|
-
|
|
432
|
-
function _isNativeReflectConstruct() {
|
|
433
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
434
|
-
if (Reflect.construct.sham) return false;
|
|
435
|
-
if (typeof Proxy === "function") return true;
|
|
436
|
-
|
|
390
|
+
function _isNativeFunction(fn) {
|
|
437
391
|
try {
|
|
438
|
-
|
|
439
|
-
return true;
|
|
392
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
440
393
|
} catch (e) {
|
|
441
|
-
return
|
|
394
|
+
return typeof fn === "function";
|
|
442
395
|
}
|
|
443
396
|
}
|
|
444
|
-
|
|
445
|
-
function _construct(Parent, args, Class) {
|
|
446
|
-
if (_isNativeReflectConstruct()) {
|
|
447
|
-
_construct = Reflect.construct.bind();
|
|
448
|
-
} else {
|
|
449
|
-
_construct = function _construct(Parent, args, Class) {
|
|
450
|
-
var a = [null];
|
|
451
|
-
a.push.apply(a, args);
|
|
452
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
453
|
-
var instance = new Constructor();
|
|
454
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
455
|
-
return instance;
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
return _construct.apply(null, arguments);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
function _isNativeFunction(fn) {
|
|
463
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
397
|
function _wrapNativeSuper(Class) {
|
|
467
398
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
468
|
-
|
|
469
399
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
470
400
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
471
|
-
|
|
472
401
|
if (typeof Class !== "function") {
|
|
473
402
|
throw new TypeError("Super expression must either be null or a function");
|
|
474
403
|
}
|
|
475
|
-
|
|
476
404
|
if (typeof _cache !== "undefined") {
|
|
477
405
|
if (_cache.has(Class)) return _cache.get(Class);
|
|
478
|
-
|
|
479
406
|
_cache.set(Class, Wrapper);
|
|
480
407
|
}
|
|
481
|
-
|
|
482
408
|
function Wrapper() {
|
|
483
409
|
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
484
410
|
}
|
|
485
|
-
|
|
486
411
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
487
412
|
constructor: {
|
|
488
413
|
value: Wrapper,
|
|
@@ -493,22 +418,18 @@ function _wrapNativeSuper(Class) {
|
|
|
493
418
|
});
|
|
494
419
|
return _setPrototypeOf(Wrapper, Class);
|
|
495
420
|
};
|
|
496
|
-
|
|
497
421
|
return _wrapNativeSuper(Class);
|
|
498
422
|
}
|
|
499
|
-
|
|
500
423
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
501
424
|
if (source == null) return {};
|
|
502
425
|
var target = {};
|
|
503
426
|
var sourceKeys = Object.keys(source);
|
|
504
427
|
var key, i;
|
|
505
|
-
|
|
506
428
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
507
429
|
key = sourceKeys[i];
|
|
508
430
|
if (excluded.indexOf(key) >= 0) continue;
|
|
509
431
|
target[key] = source[key];
|
|
510
432
|
}
|
|
511
|
-
|
|
512
433
|
return target;
|
|
513
434
|
}
|
|
514
435
|
|
|
@@ -526,31 +447,27 @@ function createUnmountEvent(detail) {
|
|
|
526
447
|
}
|
|
527
448
|
var ROUTE_CHANGE_EVENT_TYPE = '@entur-partner:after-route-change';
|
|
528
449
|
var RouteChangeEvent = /*#__PURE__*/function (_CustomEvent) {
|
|
529
|
-
_inheritsLoose(RouteChangeEvent, _CustomEvent);
|
|
530
|
-
|
|
531
450
|
function RouteChangeEvent() {
|
|
532
451
|
return _CustomEvent.apply(this, arguments) || this;
|
|
533
452
|
}
|
|
534
|
-
|
|
453
|
+
_inheritsLoose(RouteChangeEvent, _CustomEvent);
|
|
535
454
|
return RouteChangeEvent;
|
|
536
455
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
537
456
|
|
|
538
457
|
function registerMicroFrontend(config) {
|
|
539
458
|
var unmount = config.unmount,
|
|
540
|
-
|
|
541
|
-
|
|
459
|
+
microFrontendId = config.microFrontendId,
|
|
460
|
+
mount = config.mount;
|
|
542
461
|
window.addEventListener(MOUNT_EVENT_TYPE, function (event) {
|
|
543
462
|
if (!event.detail.id.startsWith(microFrontendId)) {
|
|
544
463
|
return;
|
|
545
464
|
}
|
|
546
|
-
|
|
547
465
|
mount(event.detail.mountPoint, event.detail.payload, event.detail.mountPoint);
|
|
548
466
|
});
|
|
549
467
|
window.addEventListener(UNMOUNT_EVENT_TYPE, function (event) {
|
|
550
468
|
if (!event.detail.id.startsWith(microFrontendId)) {
|
|
551
469
|
return;
|
|
552
470
|
}
|
|
553
|
-
|
|
554
471
|
unmount(event.detail.mountPoint);
|
|
555
472
|
});
|
|
556
473
|
}
|
|
@@ -574,51 +491,42 @@ var useNavigate = function useNavigate() {
|
|
|
574
491
|
};
|
|
575
492
|
var AppProvider = function AppProvider(_ref) {
|
|
576
493
|
var children = _ref.children,
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
494
|
+
organisationId = _ref.organisationId,
|
|
495
|
+
getPermissions = _ref.getPermissions,
|
|
496
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
581
497
|
var _useState = React.useState([]),
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
498
|
+
permissions = _useState[0],
|
|
499
|
+
setPermissions = _useState[1];
|
|
585
500
|
React.useEffect(function () {
|
|
586
501
|
function fetchData() {
|
|
587
502
|
return _fetchData.apply(this, arguments);
|
|
588
503
|
}
|
|
589
|
-
|
|
590
504
|
function _fetchData() {
|
|
591
505
|
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
592
506
|
var fetchedPermissions;
|
|
593
507
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
594
|
-
while (1) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
case 10:
|
|
613
|
-
case "end":
|
|
614
|
-
return _context.stop();
|
|
615
|
-
}
|
|
508
|
+
while (1) switch (_context.prev = _context.next) {
|
|
509
|
+
case 0:
|
|
510
|
+
_context.prev = 0;
|
|
511
|
+
_context.next = 3;
|
|
512
|
+
return getPermissions();
|
|
513
|
+
case 3:
|
|
514
|
+
fetchedPermissions = _context.sent;
|
|
515
|
+
setPermissions(fetchedPermissions);
|
|
516
|
+
_context.next = 10;
|
|
517
|
+
break;
|
|
518
|
+
case 7:
|
|
519
|
+
_context.prev = 7;
|
|
520
|
+
_context.t0 = _context["catch"](0);
|
|
521
|
+
console.error('Fetching permissions with the provided getPermissions function failed in AppProvider with the following error:', _context.t0);
|
|
522
|
+
case 10:
|
|
523
|
+
case "end":
|
|
524
|
+
return _context.stop();
|
|
616
525
|
}
|
|
617
526
|
}, _callee, null, [[0, 7]]);
|
|
618
527
|
}));
|
|
619
528
|
return _fetchData.apply(this, arguments);
|
|
620
529
|
}
|
|
621
|
-
|
|
622
530
|
fetchData();
|
|
623
531
|
}, [getPermissions]);
|
|
624
532
|
return React__default["default"].createElement(AppContext.Provider, {
|