@entur-partner/micro-frontend 2.6.2-alpha.0 → 2.6.2-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/AppProvider.d.ts +24 -24
- package/dist/Payload.d.ts +43 -43
- package/dist/User.d.ts +19 -19
- package/dist/events.d.ts +27 -27
- package/dist/index.d.ts +5 -5
- package/dist/micro-frontend.cjs.development.js +188 -408
- 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 +186 -402
- package/dist/micro-frontend.esm.js.map +1 -1
- package/dist/registerMicroFrontend.d.ts +8 -8
- package/package.json +4 -4
|
@@ -5,10 +5,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var util = require('@entur-partner/util');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
8
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
9
|
+
try {
|
|
10
|
+
var i = n[a](c),
|
|
11
|
+
u = i.value;
|
|
12
|
+
} catch (n) {
|
|
13
|
+
return void e(n);
|
|
14
|
+
}
|
|
15
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
16
|
+
}
|
|
17
|
+
function _asyncToGenerator(n) {
|
|
18
|
+
return function () {
|
|
19
|
+
var t = this,
|
|
20
|
+
e = arguments;
|
|
21
|
+
return new Promise(function (r, o) {
|
|
22
|
+
var a = n.apply(t, e);
|
|
23
|
+
function _next(n) {
|
|
24
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
25
|
+
}
|
|
26
|
+
function _throw(n) {
|
|
27
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
28
|
+
}
|
|
29
|
+
_next(void 0);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
}
|
|
12
33
|
function _construct(t, e, r) {
|
|
13
34
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
14
35
|
var o = [null];
|
|
@@ -16,6 +37,30 @@ function _construct(t, e, r) {
|
|
|
16
37
|
var p = new (t.bind.apply(t, o))();
|
|
17
38
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
18
39
|
}
|
|
40
|
+
function _extends() {
|
|
41
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
42
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
43
|
+
var t = arguments[e];
|
|
44
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
45
|
+
}
|
|
46
|
+
return n;
|
|
47
|
+
}, _extends.apply(null, arguments);
|
|
48
|
+
}
|
|
49
|
+
function _getPrototypeOf(t) {
|
|
50
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
51
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
52
|
+
}, _getPrototypeOf(t);
|
|
53
|
+
}
|
|
54
|
+
function _inheritsLoose(t, o) {
|
|
55
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
56
|
+
}
|
|
57
|
+
function _isNativeFunction(t) {
|
|
58
|
+
try {
|
|
59
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
60
|
+
} catch (n) {
|
|
61
|
+
return "function" == typeof t;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
19
64
|
function _isNativeReflectConstruct() {
|
|
20
65
|
try {
|
|
21
66
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -24,417 +69,153 @@ function _isNativeReflectConstruct() {
|
|
|
24
69
|
return !!t;
|
|
25
70
|
})();
|
|
26
71
|
}
|
|
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
|
-
}
|
|
72
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
73
|
+
if (null == r) return {};
|
|
74
|
+
var t = {};
|
|
75
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
76
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
77
|
+
t[n] = r[n];
|
|
77
78
|
}
|
|
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
|
-
});
|
|
79
|
+
return t;
|
|
80
|
+
}
|
|
81
|
+
function _regenerator() {
|
|
82
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
83
|
+
var e,
|
|
84
|
+
t,
|
|
85
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
86
|
+
n = r.iterator || "@@iterator",
|
|
87
|
+
o = r.toStringTag || "@@toStringTag";
|
|
88
|
+
function i(r, n, o, i) {
|
|
89
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
90
|
+
u = Object.create(c.prototype);
|
|
91
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
92
|
+
var i,
|
|
93
|
+
c,
|
|
94
|
+
u,
|
|
95
|
+
f = 0,
|
|
96
|
+
p = o || [],
|
|
97
|
+
y = !1,
|
|
98
|
+
G = {
|
|
99
|
+
p: 0,
|
|
100
|
+
n: 0,
|
|
101
|
+
v: e,
|
|
102
|
+
a: d,
|
|
103
|
+
f: d.bind(e, 4),
|
|
104
|
+
d: function (t, r) {
|
|
105
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
function d(r, n) {
|
|
109
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
110
|
+
var o,
|
|
111
|
+
i = p[t],
|
|
112
|
+
d = G.p,
|
|
113
|
+
l = i[2];
|
|
114
|
+
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
115
|
}
|
|
128
|
-
|
|
116
|
+
if (o || r > 1) return a;
|
|
117
|
+
throw y = !0, n;
|
|
129
118
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
119
|
+
return function (o, p, l) {
|
|
120
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
121
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
122
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
123
|
+
try {
|
|
124
|
+
if (f = 2, i) {
|
|
125
|
+
if (c || (o = "next"), t = i[o]) {
|
|
126
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
127
|
+
if (!t.done) return t;
|
|
128
|
+
u = t.value, c < 2 && (c = 0);
|
|
129
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
130
|
+
i = e;
|
|
131
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
132
|
+
} catch (t) {
|
|
133
|
+
i = e, c = 1, u = t;
|
|
134
|
+
} finally {
|
|
135
|
+
f = 1;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
138
|
return {
|
|
139
139
|
value: t,
|
|
140
|
-
done:
|
|
140
|
+
done: y
|
|
141
141
|
};
|
|
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);
|
|
142
|
+
};
|
|
143
|
+
}(r, o, i), !0), u;
|
|
192
144
|
}
|
|
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");
|
|
145
|
+
var a = {};
|
|
146
|
+
function Generator() {}
|
|
147
|
+
function GeneratorFunction() {}
|
|
148
|
+
function GeneratorFunctionPrototype() {}
|
|
149
|
+
t = Object.getPrototypeOf;
|
|
150
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
151
|
+
return this;
|
|
152
|
+
}), t),
|
|
153
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
154
|
+
function f(e) {
|
|
155
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
208
156
|
}
|
|
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 () {
|
|
225
|
-
return this;
|
|
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();
|
|
231
|
-
});
|
|
232
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
157
|
+
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 () {
|
|
233
158
|
return this;
|
|
234
|
-
}),
|
|
159
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
235
160
|
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;
|
|
161
|
+
}), (_regenerator = function () {
|
|
162
|
+
return {
|
|
163
|
+
w: i,
|
|
164
|
+
m: f
|
|
246
165
|
};
|
|
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;
|
|
166
|
+
})();
|
|
327
167
|
}
|
|
328
|
-
function
|
|
168
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
169
|
+
var i = Object.defineProperty;
|
|
329
170
|
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);
|
|
171
|
+
i({}, "", {});
|
|
172
|
+
} catch (e) {
|
|
173
|
+
i = 0;
|
|
340
174
|
}
|
|
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
|
-
}
|
|
175
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
176
|
+
function o(r, n) {
|
|
177
|
+
_regeneratorDefine(e, r, function (e) {
|
|
178
|
+
return this._invoke(r, n, e);
|
|
179
|
+
});
|
|
367
180
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
_setPrototypeOf(subClass, superClass);
|
|
181
|
+
r ? i ? i(e, r, {
|
|
182
|
+
value: n,
|
|
183
|
+
enumerable: !t,
|
|
184
|
+
configurable: !t,
|
|
185
|
+
writable: !t
|
|
186
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
187
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
376
188
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
return
|
|
380
|
-
};
|
|
381
|
-
return _getPrototypeOf(o);
|
|
189
|
+
function _setPrototypeOf(t, e) {
|
|
190
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
191
|
+
return t.__proto__ = e, t;
|
|
192
|
+
}, _setPrototypeOf(t, e);
|
|
382
193
|
}
|
|
383
|
-
function
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
return
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
try {
|
|
392
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
393
|
-
} catch (e) {
|
|
394
|
-
return typeof fn === "function";
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function _wrapNativeSuper(Class) {
|
|
398
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
399
|
-
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
400
|
-
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
401
|
-
if (typeof Class !== "function") {
|
|
402
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
403
|
-
}
|
|
404
|
-
if (typeof _cache !== "undefined") {
|
|
405
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
406
|
-
_cache.set(Class, Wrapper);
|
|
194
|
+
function _wrapNativeSuper(t) {
|
|
195
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
196
|
+
return _wrapNativeSuper = function (t) {
|
|
197
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
198
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
199
|
+
if (void 0 !== r) {
|
|
200
|
+
if (r.has(t)) return r.get(t);
|
|
201
|
+
r.set(t, Wrapper);
|
|
407
202
|
}
|
|
408
203
|
function Wrapper() {
|
|
409
|
-
return _construct(
|
|
204
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
410
205
|
}
|
|
411
|
-
Wrapper.prototype = Object.create(
|
|
206
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
412
207
|
constructor: {
|
|
413
208
|
value: Wrapper,
|
|
414
|
-
enumerable:
|
|
415
|
-
writable:
|
|
416
|
-
configurable:
|
|
209
|
+
enumerable: !1,
|
|
210
|
+
writable: !0,
|
|
211
|
+
configurable: !0
|
|
417
212
|
}
|
|
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;
|
|
213
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
214
|
+
}, _wrapNativeSuper(t);
|
|
434
215
|
}
|
|
435
216
|
|
|
436
217
|
var _excluded = ["children", "organisationId", "getPermissions"];
|
|
437
|
-
var AppContext = /*#__PURE__*/
|
|
218
|
+
var AppContext = /*#__PURE__*/React.createContext(undefined);
|
|
438
219
|
var useUser = function useUser() {
|
|
439
220
|
var context = React.useContext(AppContext);
|
|
440
221
|
util.assertIsDefined(context);
|
|
@@ -463,34 +244,33 @@ var AppProvider = function AppProvider(_ref) {
|
|
|
463
244
|
return _fetchData.apply(this, arguments);
|
|
464
245
|
}
|
|
465
246
|
function _fetchData() {
|
|
466
|
-
_fetchData = _asyncToGenerator(
|
|
467
|
-
var fetchedPermissions;
|
|
468
|
-
return
|
|
469
|
-
while (1) switch (_context.
|
|
247
|
+
_fetchData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
248
|
+
var fetchedPermissions, _t;
|
|
249
|
+
return _regenerator().w(function (_context) {
|
|
250
|
+
while (1) switch (_context.p = _context.n) {
|
|
470
251
|
case 0:
|
|
471
|
-
_context.
|
|
472
|
-
_context.
|
|
252
|
+
_context.p = 0;
|
|
253
|
+
_context.n = 1;
|
|
473
254
|
return getPermissions();
|
|
474
|
-
case
|
|
475
|
-
fetchedPermissions = _context.
|
|
255
|
+
case 1:
|
|
256
|
+
fetchedPermissions = _context.v;
|
|
476
257
|
setPermissions(fetchedPermissions);
|
|
477
|
-
_context.
|
|
258
|
+
_context.n = 3;
|
|
478
259
|
break;
|
|
479
|
-
case
|
|
480
|
-
_context.
|
|
481
|
-
|
|
482
|
-
console.error("Fetching permissions with the provided getPermissions function failed in AppProvider with the following error:",
|
|
483
|
-
case
|
|
484
|
-
|
|
485
|
-
return _context.stop();
|
|
260
|
+
case 2:
|
|
261
|
+
_context.p = 2;
|
|
262
|
+
_t = _context.v;
|
|
263
|
+
console.error("Fetching permissions with the provided getPermissions function failed in AppProvider with the following error:", _t);
|
|
264
|
+
case 3:
|
|
265
|
+
return _context.a(2);
|
|
486
266
|
}
|
|
487
|
-
}, _callee, null, [[0,
|
|
267
|
+
}, _callee, null, [[0, 2]]);
|
|
488
268
|
}));
|
|
489
269
|
return _fetchData.apply(this, arguments);
|
|
490
270
|
}
|
|
491
271
|
fetchData();
|
|
492
272
|
}, [getPermissions]);
|
|
493
|
-
return
|
|
273
|
+
return React.createElement(AppContext.Provider, {
|
|
494
274
|
value: _extends({}, rest, {
|
|
495
275
|
user: _extends({}, rest.user, {
|
|
496
276
|
permissions: permissions
|
|
@@ -519,7 +299,7 @@ var RouteChangeEvent = /*#__PURE__*/function (_CustomEvent) {
|
|
|
519
299
|
}
|
|
520
300
|
_inheritsLoose(RouteChangeEvent, _CustomEvent);
|
|
521
301
|
return RouteChangeEvent;
|
|
522
|
-
}(
|
|
302
|
+
}(/*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
523
303
|
|
|
524
304
|
/*global EventListener*/
|
|
525
305
|
function registerMicroFrontend(config) {
|