@entur-partner/app-shell-standalone 6.1.5 → 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/AppShellStandalone.d.ts +15 -15
- package/dist/Menu.d.ts +47 -47
- package/dist/app-shell-standalone.cjs.development.js +165 -374
- package/dist/app-shell-standalone.cjs.development.js.map +1 -1
- package/dist/app-shell-standalone.cjs.production.min.js +1 -1
- package/dist/app-shell-standalone.cjs.production.min.js.map +1 -1
- package/dist/app-shell-standalone.esm.js +152 -357
- package/dist/app-shell-standalone.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +45 -45
|
@@ -1,374 +1,171 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Menu as Menu$1, EnturPartnerLogo, Stack, UserMenu, Content as Content$1 } from '@entur-partner/common';
|
|
3
1
|
import { useMenu, useLanguage, useOrganisation, OrganisationSelector, MicroFrontendLink, AppShell, LanguageProvider, languageStorage, OrganisationProvider, organisationStorage, MenuProvider, useOrganisationId } from '@entur-partner/app-shell';
|
|
2
|
+
import { Menu as Menu$1, EnturPartnerLogo, Stack, UserMenu, Content as Content$1 } from '@entur-partner/common';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { SideNavigation, SideNavigationItem } from '@entur/menu';
|
|
5
5
|
import { space } from '@entur/tokens';
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
_regeneratorRuntime = function () {
|
|
9
|
-
return e;
|
|
10
|
-
};
|
|
11
|
-
var t,
|
|
12
|
-
e = {},
|
|
13
|
-
r = Object.prototype,
|
|
14
|
-
n = r.hasOwnProperty,
|
|
15
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
16
|
-
t[e] = r.value;
|
|
17
|
-
},
|
|
18
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
19
|
-
a = i.iterator || "@@iterator",
|
|
20
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
21
|
-
u = i.toStringTag || "@@toStringTag";
|
|
22
|
-
function define(t, e, r) {
|
|
23
|
-
return Object.defineProperty(t, e, {
|
|
24
|
-
value: r,
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
configurable: !0,
|
|
27
|
-
writable: !0
|
|
28
|
-
}), t[e];
|
|
29
|
-
}
|
|
7
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
30
8
|
try {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function wrap(t, e, r, n) {
|
|
38
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
39
|
-
a = Object.create(i.prototype),
|
|
40
|
-
c = new Context(n || []);
|
|
41
|
-
return o(a, "_invoke", {
|
|
42
|
-
value: makeInvokeMethod(t, r, c)
|
|
43
|
-
}), a;
|
|
9
|
+
var i = n[a](c),
|
|
10
|
+
u = i.value;
|
|
11
|
+
} catch (n) {
|
|
12
|
+
return void e(n);
|
|
44
13
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
e.wrap = wrap;
|
|
59
|
-
var h = "suspendedStart",
|
|
60
|
-
l = "suspendedYield",
|
|
61
|
-
f = "executing",
|
|
62
|
-
s = "completed",
|
|
63
|
-
y = {};
|
|
64
|
-
function Generator() {}
|
|
65
|
-
function GeneratorFunction() {}
|
|
66
|
-
function GeneratorFunctionPrototype() {}
|
|
67
|
-
var p = {};
|
|
68
|
-
define(p, a, function () {
|
|
69
|
-
return this;
|
|
70
|
-
});
|
|
71
|
-
var d = Object.getPrototypeOf,
|
|
72
|
-
v = d && d(d(values([])));
|
|
73
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
74
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
75
|
-
function defineIteratorMethods(t) {
|
|
76
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
77
|
-
define(t, e, function (t) {
|
|
78
|
-
return this._invoke(e, t);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function AsyncIterator(t, e) {
|
|
83
|
-
function invoke(r, o, i, a) {
|
|
84
|
-
var c = tryCatch(t[r], t, o);
|
|
85
|
-
if ("throw" !== c.type) {
|
|
86
|
-
var u = c.arg,
|
|
87
|
-
h = u.value;
|
|
88
|
-
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
89
|
-
invoke("next", t, i, a);
|
|
90
|
-
}, function (t) {
|
|
91
|
-
invoke("throw", t, i, a);
|
|
92
|
-
}) : e.resolve(h).then(function (t) {
|
|
93
|
-
u.value = t, i(u);
|
|
94
|
-
}, function (t) {
|
|
95
|
-
return invoke("throw", t, i, a);
|
|
96
|
-
});
|
|
14
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
15
|
+
}
|
|
16
|
+
function _asyncToGenerator(n) {
|
|
17
|
+
return function () {
|
|
18
|
+
var t = this,
|
|
19
|
+
e = arguments;
|
|
20
|
+
return new Promise(function (r, o) {
|
|
21
|
+
var a = n.apply(t, e);
|
|
22
|
+
function _next(n) {
|
|
23
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
97
24
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var r;
|
|
101
|
-
o(this, "_invoke", {
|
|
102
|
-
value: function (t, n) {
|
|
103
|
-
function callInvokeWithMethodAndArg() {
|
|
104
|
-
return new e(function (e, r) {
|
|
105
|
-
invoke(t, n, e, r);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
25
|
+
function _throw(n) {
|
|
26
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
109
27
|
}
|
|
28
|
+
_next(void 0);
|
|
110
29
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _extends() {
|
|
33
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
34
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
35
|
+
var t = arguments[e];
|
|
36
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
37
|
+
}
|
|
38
|
+
return n;
|
|
39
|
+
}, _extends.apply(null, arguments);
|
|
40
|
+
}
|
|
41
|
+
function _regenerator() {
|
|
42
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
43
|
+
var e,
|
|
44
|
+
t,
|
|
45
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
46
|
+
n = r.iterator || "@@iterator",
|
|
47
|
+
o = r.toStringTag || "@@toStringTag";
|
|
48
|
+
function i(r, n, o, i) {
|
|
49
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
50
|
+
u = Object.create(c.prototype);
|
|
51
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
52
|
+
var i,
|
|
53
|
+
c,
|
|
54
|
+
u,
|
|
55
|
+
f = 0,
|
|
56
|
+
p = o || [],
|
|
57
|
+
y = !1,
|
|
58
|
+
G = {
|
|
59
|
+
p: 0,
|
|
60
|
+
n: 0,
|
|
61
|
+
v: e,
|
|
62
|
+
a: d,
|
|
63
|
+
f: d.bind(e, 4),
|
|
64
|
+
d: function (t, r) {
|
|
65
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
66
|
+
}
|
|
121
67
|
};
|
|
68
|
+
function d(r, n) {
|
|
69
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
70
|
+
var o,
|
|
71
|
+
i = p[t],
|
|
72
|
+
d = G.p,
|
|
73
|
+
l = i[2];
|
|
74
|
+
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));
|
|
75
|
+
}
|
|
76
|
+
if (o || r > 1) return a;
|
|
77
|
+
throw y = !0, n;
|
|
122
78
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
79
|
+
return function (o, p, l) {
|
|
80
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
81
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
82
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
83
|
+
try {
|
|
84
|
+
if (f = 2, i) {
|
|
85
|
+
if (c || (o = "next"), t = i[o]) {
|
|
86
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
87
|
+
if (!t.done) return t;
|
|
88
|
+
u = t.value, c < 2 && (c = 0);
|
|
89
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
90
|
+
i = e;
|
|
91
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
92
|
+
} catch (t) {
|
|
93
|
+
i = e, c = 1, u = t;
|
|
94
|
+
} finally {
|
|
95
|
+
f = 1;
|
|
130
96
|
}
|
|
131
97
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if ("normal" === p.type) {
|
|
139
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
140
|
-
return {
|
|
141
|
-
value: p.arg,
|
|
142
|
-
done: n.done
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function maybeInvokeDelegate(e, r) {
|
|
150
|
-
var n = r.method,
|
|
151
|
-
o = e.iterator[n];
|
|
152
|
-
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;
|
|
153
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
154
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
155
|
-
var a = i.arg;
|
|
156
|
-
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);
|
|
157
|
-
}
|
|
158
|
-
function pushTryEntry(t) {
|
|
159
|
-
var e = {
|
|
160
|
-
tryLoc: t[0]
|
|
161
|
-
};
|
|
162
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
163
|
-
}
|
|
164
|
-
function resetTryEntry(t) {
|
|
165
|
-
var e = t.completion || {};
|
|
166
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
167
|
-
}
|
|
168
|
-
function Context(t) {
|
|
169
|
-
this.tryEntries = [{
|
|
170
|
-
tryLoc: "root"
|
|
171
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
98
|
+
return {
|
|
99
|
+
value: t,
|
|
100
|
+
done: y
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}(r, o, i), !0), u;
|
|
172
104
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return i.next = i;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
105
|
+
var a = {};
|
|
106
|
+
function Generator() {}
|
|
107
|
+
function GeneratorFunction() {}
|
|
108
|
+
function GeneratorFunctionPrototype() {}
|
|
109
|
+
t = Object.getPrototypeOf;
|
|
110
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
111
|
+
return this;
|
|
112
|
+
}), t),
|
|
113
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
114
|
+
function f(e) {
|
|
115
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
188
116
|
}
|
|
189
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
190
|
-
value: GeneratorFunctionPrototype,
|
|
191
|
-
configurable: !0
|
|
192
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
193
|
-
value: GeneratorFunction,
|
|
194
|
-
configurable: !0
|
|
195
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
196
|
-
var e = "function" == typeof t && t.constructor;
|
|
197
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
198
|
-
}, e.mark = function (t) {
|
|
199
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
200
|
-
}, e.awrap = function (t) {
|
|
201
|
-
return {
|
|
202
|
-
__await: t
|
|
203
|
-
};
|
|
204
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
205
|
-
return this;
|
|
206
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
207
|
-
void 0 === i && (i = Promise);
|
|
208
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
209
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
210
|
-
return t.done ? t.value : a.next();
|
|
211
|
-
});
|
|
212
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
117
|
+
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 () {
|
|
213
118
|
return this;
|
|
214
|
-
}),
|
|
119
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
215
120
|
return "[object Generator]";
|
|
216
|
-
}),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return r.reverse(), function next() {
|
|
221
|
-
for (; r.length;) {
|
|
222
|
-
var t = r.pop();
|
|
223
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
224
|
-
}
|
|
225
|
-
return next.done = !0, next;
|
|
121
|
+
}), (_regenerator = function () {
|
|
122
|
+
return {
|
|
123
|
+
w: i,
|
|
124
|
+
m: f
|
|
226
125
|
};
|
|
227
|
-
}
|
|
228
|
-
constructor: Context,
|
|
229
|
-
reset: function (e) {
|
|
230
|
-
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);
|
|
231
|
-
},
|
|
232
|
-
stop: function () {
|
|
233
|
-
this.done = !0;
|
|
234
|
-
var t = this.tryEntries[0].completion;
|
|
235
|
-
if ("throw" === t.type) throw t.arg;
|
|
236
|
-
return this.rval;
|
|
237
|
-
},
|
|
238
|
-
dispatchException: function (e) {
|
|
239
|
-
if (this.done) throw e;
|
|
240
|
-
var r = this;
|
|
241
|
-
function handle(n, o) {
|
|
242
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
243
|
-
}
|
|
244
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
245
|
-
var i = this.tryEntries[o],
|
|
246
|
-
a = i.completion;
|
|
247
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
248
|
-
if (i.tryLoc <= this.prev) {
|
|
249
|
-
var c = n.call(i, "catchLoc"),
|
|
250
|
-
u = n.call(i, "finallyLoc");
|
|
251
|
-
if (c && u) {
|
|
252
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
253
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
254
|
-
} else if (c) {
|
|
255
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
256
|
-
} else {
|
|
257
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
258
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
abrupt: function (t, e) {
|
|
264
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
265
|
-
var o = this.tryEntries[r];
|
|
266
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
267
|
-
var i = o;
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
272
|
-
var a = i ? i.completion : {};
|
|
273
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
274
|
-
},
|
|
275
|
-
complete: function (t, e) {
|
|
276
|
-
if ("throw" === t.type) throw t.arg;
|
|
277
|
-
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;
|
|
278
|
-
},
|
|
279
|
-
finish: function (t) {
|
|
280
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
281
|
-
var r = this.tryEntries[e];
|
|
282
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
catch: function (t) {
|
|
286
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
287
|
-
var r = this.tryEntries[e];
|
|
288
|
-
if (r.tryLoc === t) {
|
|
289
|
-
var n = r.completion;
|
|
290
|
-
if ("throw" === n.type) {
|
|
291
|
-
var o = n.arg;
|
|
292
|
-
resetTryEntry(r);
|
|
293
|
-
}
|
|
294
|
-
return o;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
throw Error("illegal catch attempt");
|
|
298
|
-
},
|
|
299
|
-
delegateYield: function (e, r, n) {
|
|
300
|
-
return this.delegate = {
|
|
301
|
-
iterator: values(e),
|
|
302
|
-
resultName: r,
|
|
303
|
-
nextLoc: n
|
|
304
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
305
|
-
}
|
|
306
|
-
}, e;
|
|
126
|
+
})();
|
|
307
127
|
}
|
|
308
|
-
function
|
|
128
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
129
|
+
var i = Object.defineProperty;
|
|
309
130
|
try {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
reject(error);
|
|
314
|
-
return;
|
|
131
|
+
i({}, "", {});
|
|
132
|
+
} catch (e) {
|
|
133
|
+
i = 0;
|
|
315
134
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
function _asyncToGenerator(fn) {
|
|
323
|
-
return function () {
|
|
324
|
-
var self = this,
|
|
325
|
-
args = arguments;
|
|
326
|
-
return new Promise(function (resolve, reject) {
|
|
327
|
-
var gen = fn.apply(self, args);
|
|
328
|
-
function _next(value) {
|
|
329
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
330
|
-
}
|
|
331
|
-
function _throw(err) {
|
|
332
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
333
|
-
}
|
|
334
|
-
_next(undefined);
|
|
335
|
-
});
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
function _extends() {
|
|
339
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
340
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
341
|
-
var source = arguments[i];
|
|
342
|
-
for (var key in source) {
|
|
343
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
344
|
-
target[key] = source[key];
|
|
345
|
-
}
|
|
346
|
-
}
|
|
135
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
136
|
+
function o(r, n) {
|
|
137
|
+
_regeneratorDefine(e, r, function (e) {
|
|
138
|
+
return this._invoke(r, n, e);
|
|
139
|
+
});
|
|
347
140
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
141
|
+
r ? i ? i(e, r, {
|
|
142
|
+
value: n,
|
|
143
|
+
enumerable: !t,
|
|
144
|
+
configurable: !t,
|
|
145
|
+
writable: !t
|
|
146
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
147
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
351
148
|
}
|
|
352
149
|
|
|
353
150
|
var EN_GB = {
|
|
354
|
-
switchLanguage:
|
|
355
|
-
logout:
|
|
356
|
-
appVersion:
|
|
357
|
-
myProfile:
|
|
358
|
-
cookieSettings:
|
|
151
|
+
switchLanguage: "Bytt til norsk",
|
|
152
|
+
logout: "Sign out",
|
|
153
|
+
appVersion: "Versjon",
|
|
154
|
+
myProfile: "My profile",
|
|
155
|
+
cookieSettings: "Cookie settings"
|
|
359
156
|
};
|
|
360
157
|
var NO_NB = {
|
|
361
|
-
switchLanguage:
|
|
362
|
-
logout:
|
|
363
|
-
appVersion:
|
|
364
|
-
myProfile:
|
|
365
|
-
cookieSettings:
|
|
158
|
+
switchLanguage: "Switch to English",
|
|
159
|
+
logout: "Logg ut",
|
|
160
|
+
appVersion: "Version",
|
|
161
|
+
myProfile: "Min profil",
|
|
162
|
+
cookieSettings: "Cookieinstillinger"
|
|
366
163
|
};
|
|
367
164
|
var messages = {
|
|
368
165
|
nb: NO_NB,
|
|
369
166
|
en: EN_GB,
|
|
370
|
-
|
|
371
|
-
|
|
167
|
+
"nb-NO": NO_NB,
|
|
168
|
+
"en-GB": EN_GB
|
|
372
169
|
};
|
|
373
170
|
var Menu = function Menu(_ref) {
|
|
374
171
|
var getOrganisations = _ref.getOrganisations,
|
|
@@ -384,7 +181,7 @@ var Menu = function Menu(_ref) {
|
|
|
384
181
|
var _useOrganisation = useOrganisation(),
|
|
385
182
|
setOrganisationId = _useOrganisation.setOrganisationId,
|
|
386
183
|
organisationId = _useOrganisation.organisationId;
|
|
387
|
-
var items = getItemsForPath(
|
|
184
|
+
var items = getItemsForPath("app-shell");
|
|
388
185
|
return React.createElement(Menu$1, null, React.createElement("div", {
|
|
389
186
|
style: {
|
|
390
187
|
marginLeft: space.extraLarge2,
|
|
@@ -392,7 +189,7 @@ var Menu = function Menu(_ref) {
|
|
|
392
189
|
marginBottom: space.extraLarge
|
|
393
190
|
}
|
|
394
191
|
}, React.createElement(EnturPartnerLogo, {
|
|
395
|
-
altText:
|
|
192
|
+
altText: "Entur partner logo",
|
|
396
193
|
className: "menu-space menu-logo",
|
|
397
194
|
environment: environment
|
|
398
195
|
})), React.createElement("div", {
|
|
@@ -405,15 +202,14 @@ var Menu = function Menu(_ref) {
|
|
|
405
202
|
className: "ph-no-capture",
|
|
406
203
|
onLanguageChange: setLanguage,
|
|
407
204
|
onLogout: function () {
|
|
408
|
-
var _onLogout = _asyncToGenerator(
|
|
409
|
-
return
|
|
410
|
-
while (1) switch (_context.
|
|
205
|
+
var _onLogout = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
206
|
+
return _regenerator().w(function (_context) {
|
|
207
|
+
while (1) switch (_context.n) {
|
|
411
208
|
case 0:
|
|
412
|
-
_context.
|
|
209
|
+
_context.n = 1;
|
|
413
210
|
return logout();
|
|
414
|
-
case
|
|
415
|
-
|
|
416
|
-
return _context.stop();
|
|
211
|
+
case 1:
|
|
212
|
+
return _context.a(2);
|
|
417
213
|
}
|
|
418
214
|
}, _callee);
|
|
419
215
|
}));
|
|
@@ -469,19 +265,19 @@ var Content = function Content(_ref) {
|
|
|
469
265
|
var _useLanguage = useLanguage(),
|
|
470
266
|
language = _useLanguage.language;
|
|
471
267
|
var addMenuItems = function addMenuItems(items) {
|
|
472
|
-
return addItems(items,
|
|
268
|
+
return addItems(items, "app-shell");
|
|
473
269
|
};
|
|
474
270
|
return React.createElement(Content$1, null, children(_extends({}, values, {
|
|
475
271
|
language: language,
|
|
476
272
|
navigate: function navigate() {
|
|
477
|
-
if (process.env.NODE_ENV !==
|
|
478
|
-
console.warn(
|
|
273
|
+
if (process.env.NODE_ENV !== "production") {
|
|
274
|
+
console.warn("Calling navigate() from app shell has no effect. It is only provided so that the app shell values are equal to MicroFrontendPayload.");
|
|
479
275
|
}
|
|
480
276
|
},
|
|
481
277
|
addMenuItems: addMenuItems,
|
|
482
278
|
organisationId: organisationId.toString(),
|
|
483
279
|
setMFNavigate: function setMFNavigate(navigate) {
|
|
484
|
-
return _setMFNavigate(
|
|
280
|
+
return _setMFNavigate("app-shell", navigate);
|
|
485
281
|
}
|
|
486
282
|
})));
|
|
487
283
|
};
|
|
@@ -504,16 +300,15 @@ var AppShellStandalone = function AppShellStandalone(_ref2) {
|
|
|
504
300
|
}, function (values) {
|
|
505
301
|
var _languageStorage$get, _organisationStorage$;
|
|
506
302
|
return React.createElement(LanguageProvider, {
|
|
507
|
-
language: (_languageStorage$get = languageStorage.get()) != null ? _languageStorage$get :
|
|
303
|
+
language: (_languageStorage$get = languageStorage.get()) != null ? _languageStorage$get : "nb-NO"
|
|
508
304
|
}, React.createElement(OrganisationProvider, {
|
|
509
|
-
organisationId: (_organisationStorage$ = organisationStorage.get()) != null ? _organisationStorage$ : values.user[
|
|
305
|
+
organisationId: (_organisationStorage$ = organisationStorage.get()) != null ? _organisationStorage$ : values.user["https://entur.io/organisationID"].toString()
|
|
510
306
|
}, React.createElement(MenuProvider, null, React.createElement(Menu, _extends({}, values, {
|
|
511
307
|
getOrganisations: getOrganisations,
|
|
512
308
|
environment: environment
|
|
513
309
|
})), React.createElement(Content, {
|
|
514
|
-
children: children,
|
|
515
310
|
values: values
|
|
516
|
-
}))));
|
|
311
|
+
}, children))));
|
|
517
312
|
});
|
|
518
313
|
};
|
|
519
314
|
|