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