@entur-partner/common 11.3.0 → 11.3.2
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/README.md +0 -1
- package/dist/ActionBar.d.ts +3 -3
- package/dist/Box.d.ts +1 -1
- package/dist/ErrorBoundary.d.ts +1 -1
- package/dist/ExpandableMultiLanguageInput.d.ts +1 -1
- package/dist/FeatureToggle.d.ts +1 -1
- package/dist/LinkButton.d.ts +1 -1
- package/dist/Stack.d.ts +1 -1
- package/dist/Text.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +102 -101
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/user-menu/components/CookieSettingsMenuItem.d.ts +1 -1
- package/dist/user-menu/components/LocaleSwitchMenuItem.d.ts +1 -1
- package/dist/user-menu/components/LogOutMenuItem.d.ts +1 -1
- package/dist/user-menu/components/UserMenuItem.d.ts +1 -1
- package/package.json +26 -26
package/dist/index.mjs
CHANGED
|
@@ -12,25 +12,25 @@ import { SegmentedChoice as P, SegmentedControl as F } from "@entur/form";
|
|
|
12
12
|
import { SearchableDropdown as I } from "@entur/dropdown";
|
|
13
13
|
import { ChannelsIcon as L, CookieIcon as ee, DownArrowIcon as te, LogOutIcon as ne, NorwayIcon as re, UKIcon as ie, UserIcon as R } from "@entur/icons";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
15
|
-
var ae = Object.create,
|
|
16
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
15
|
+
var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ce = Object.getOwnPropertyNames, le = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty, de = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), fe = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = ce(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ue.call(e, s) && s !== n && oe(e, s, {
|
|
17
17
|
get: ((e) => t[e]).bind(null, s),
|
|
18
|
-
enumerable: !(r =
|
|
18
|
+
enumerable: !(r = se(t, s)) || r.enumerable
|
|
19
19
|
});
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
21
|
+
}, pe = (e, t, n) => (n = e == null ? {} : ae(le(e)), fe(t || !e || !e.__esModule ? oe(n, "default", {
|
|
22
22
|
value: e,
|
|
23
23
|
enumerable: !0
|
|
24
|
-
}) : n, e)),
|
|
24
|
+
}) : n, e)), me = ({ children: e }) => /* @__PURE__ */ t("div", {
|
|
25
25
|
className: "eps-action-bar-left",
|
|
26
26
|
children: e
|
|
27
|
-
}),
|
|
27
|
+
}), he = ({ children: e }) => /* @__PURE__ */ t("div", {
|
|
28
28
|
className: "eps-action-bar-right",
|
|
29
29
|
children: e
|
|
30
|
-
}),
|
|
30
|
+
}), ge = ({ children: r }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", { className: "eps-action-bar-padding" }), /* @__PURE__ */ t("div", {
|
|
31
31
|
className: "eps-action-bar",
|
|
32
32
|
children: r
|
|
33
|
-
})] }),
|
|
33
|
+
})] }), z = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
34
34
|
(function() {
|
|
35
35
|
var e = {}.hasOwnProperty;
|
|
36
36
|
function n() {
|
|
@@ -56,49 +56,49 @@ var ae = Object.create, z = Object.defineProperty, oe = Object.getOwnPropertyDes
|
|
|
56
56
|
return n;
|
|
57
57
|
}) : window.classNames = n;
|
|
58
58
|
})();
|
|
59
|
-
})))(), 1),
|
|
59
|
+
})))(), 1), B = ({ date: e, locale: n, as: r = "main", hideTime: i, ...a }) => /* @__PURE__ */ t(r, {
|
|
60
60
|
...a,
|
|
61
61
|
children: i ? u(e, n) : d(e, n)
|
|
62
62
|
});
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/Box.tsx
|
|
65
|
-
function
|
|
65
|
+
function V(e, t) {
|
|
66
66
|
if (Array.isArray(t)) {
|
|
67
67
|
let n = [];
|
|
68
68
|
return t[0] && n.push(e + t[0]), t[1] && n.push(`${e}${t[1]}-lg`), t[2] && n.push(`${e}${t[2]}-xl`), n;
|
|
69
69
|
}
|
|
70
70
|
return [e + t];
|
|
71
71
|
}
|
|
72
|
-
var
|
|
72
|
+
var H = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight: a, paddingBottom: o, paddingLeft: s, paddingX: c, paddingY: l, padding: u, marginTop: d, marginRight: f, marginBottom: p, marginLeft: m, marginX: h, marginY: g, margin: _, display: v, justifyContent: y, alignItems: b, maxWidth: x, width: S, background: C, color: w, flexDirection: T, flexWrap: E, className: D, ...O }) => {
|
|
73
73
|
let k = [], A = i || l || u, j = o || l || u, M = s || c || u, N = a || c || u, P = d || g || _, F = p || g || _, I = m || h || _, L = f || h || _;
|
|
74
|
-
return r && k.push("eds-contrast"), A && k.push(...
|
|
75
|
-
className: (0,
|
|
74
|
+
return r && k.push("eds-contrast"), A && k.push(...V("eps-pt-", A)), j && k.push(...V("eps-pb-", j)), M && k.push(...V("eps-pl-", M)), N && k.push(...V("eps-pr-", N)), P && k.push(...V("eps-mt-", P)), F && k.push(...V("eps-mb-", F)), I && k.push(...V("eps-ml-", I)), L && k.push(...V("eps-mr-", L)), v && k.push(...V("eps-", v)), y && k.push(...V("eps-justify-", y)), b && k.push(...V("eps-items-", b)), x && k.push(...V("eps-max-w-", x)), S && k.push(...V("eps-w-", S)), w && k.push(`eps-color-${w}`), C && k.push(`eps-bg-${C}`), T && k.push(...V("eps-flex-", T)), E && k.push(...V("eps-flex-wrap-", E)), /* @__PURE__ */ t(e, {
|
|
75
|
+
className: (0, z.default)(k, D),
|
|
76
76
|
...O,
|
|
77
77
|
children: n
|
|
78
78
|
});
|
|
79
|
-
},
|
|
79
|
+
}, U = ({ children: n, space: r, className: i }) => {
|
|
80
80
|
let a = p.toArray(n);
|
|
81
81
|
return a.length <= 1 ? /* @__PURE__ */ t(e, { children: a }) : /* @__PURE__ */ t("div", {
|
|
82
82
|
className: i,
|
|
83
|
-
children: a.map((e, n) => n === a.length - 1 ? /* @__PURE__ */ t("div", { children: e }, n) : /* @__PURE__ */ t(
|
|
83
|
+
children: a.map((e, n) => n === a.length - 1 ? /* @__PURE__ */ t("div", { children: e }, n) : /* @__PURE__ */ t(H, {
|
|
84
84
|
paddingBottom: r,
|
|
85
85
|
children: e
|
|
86
86
|
}, n))
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
className: (0,
|
|
88
|
+
}, _e = ({ items: e, locale: r, className: i, ...a }) => /* @__PURE__ */ t("div", {
|
|
89
|
+
className: (0, z.default)("ep-audit-info", i),
|
|
90
90
|
...a,
|
|
91
|
-
children: e.map(({ label: e, value: i }) => /* @__PURE__ */ n(
|
|
91
|
+
children: e.map(({ label: e, value: i }) => /* @__PURE__ */ n(U, {
|
|
92
92
|
space: "small",
|
|
93
93
|
children: [/* @__PURE__ */ t("div", {
|
|
94
94
|
className: "ep-audit-info-label",
|
|
95
95
|
children: e
|
|
96
|
-
}), /* @__PURE__ */ t("div", { children: o(i) || s(i) ? /* @__PURE__ */ t(
|
|
96
|
+
}), /* @__PURE__ */ t("div", { children: o(i) || s(i) ? /* @__PURE__ */ t(B, {
|
|
97
97
|
date: i,
|
|
98
98
|
locale: r
|
|
99
99
|
}) : /* @__PURE__ */ t("span", { children: i }) })]
|
|
100
100
|
}, i.toString()))
|
|
101
|
-
}),
|
|
101
|
+
}), ve = ({ prependBreadcrumbItem: e, pathname: n, onBreadcrumbLookup: r }) => {
|
|
102
102
|
let i = f(n).map((e) => ({
|
|
103
103
|
title: r(e),
|
|
104
104
|
path: e
|
|
@@ -111,14 +111,14 @@ var U = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight:
|
|
|
111
111
|
children: e
|
|
112
112
|
}, n));
|
|
113
113
|
return e ? /* @__PURE__ */ t(y, { children: [e, ...a] }) : /* @__PURE__ */ t(y, { children: a });
|
|
114
|
-
},
|
|
114
|
+
}, W = ({ isOpen: r = !1, children: i, message: a, size: o = "medium", buttons: s, onConfirm: c, messages: u, onClose: d, onDismiss: f, ...p }) => {
|
|
115
115
|
let m = i || a, h = d || f;
|
|
116
116
|
return /* @__PURE__ */ n(O, {
|
|
117
117
|
size: o,
|
|
118
118
|
open: r,
|
|
119
119
|
onDismiss: h,
|
|
120
120
|
...p,
|
|
121
|
-
children: [l(m) ? /* @__PURE__ */ t(j, { children: m }) : /* @__PURE__ */ t(
|
|
121
|
+
children: [l(m) ? /* @__PURE__ */ t(j, { children: m }) : /* @__PURE__ */ t(H, {
|
|
122
122
|
paddingBottom: "medium",
|
|
123
123
|
children: m
|
|
124
124
|
}), /* @__PURE__ */ t(T, { children: c ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(D, {
|
|
@@ -131,21 +131,21 @@ var U = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight:
|
|
|
131
131
|
children: u.confirm
|
|
132
132
|
})] }) : s })]
|
|
133
133
|
});
|
|
134
|
-
},
|
|
135
|
-
className: (0,
|
|
134
|
+
}, ye = ({ as: e = "main", className: n, children: r }) => /* @__PURE__ */ t(e, {
|
|
135
|
+
className: (0, z.default)(["eps-content", n]),
|
|
136
136
|
children: r
|
|
137
|
-
}),
|
|
137
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
138
138
|
return e.Local = "local", e.Development = "dev", e.Staging = "staging", e.Production = "prod", e;
|
|
139
|
-
}({}),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
139
|
+
}({}), be = {
|
|
140
|
+
local: "#B482FB",
|
|
141
|
+
dev: "#5AC39A",
|
|
142
|
+
staging: "#FFCA28"
|
|
143
|
+
}, K = (e) => be[e], xe = {
|
|
144
|
+
local: "Local",
|
|
145
|
+
dev: "Dev",
|
|
146
|
+
staging: "Staging",
|
|
147
|
+
prod: "Prod"
|
|
148
|
+
}, q = (e) => xe[e], J = ({ title: e, accentColor: r = "#FF5959", ...i }) => /* @__PURE__ */ n("svg", {
|
|
149
149
|
width: 257,
|
|
150
150
|
height: 37,
|
|
151
151
|
viewBox: "0 0 257 37",
|
|
@@ -172,14 +172,14 @@ var U = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight:
|
|
|
172
172
|
})
|
|
173
173
|
]
|
|
174
174
|
})]
|
|
175
|
-
}),
|
|
176
|
-
className: (0,
|
|
177
|
-
children: /* @__PURE__ */ t(
|
|
175
|
+
}), Se = ({ as: e = "nav", className: n, altText: r, environment: i }) => /* @__PURE__ */ t(e, {
|
|
176
|
+
className: (0, z.default)(["eps-logo-wrapper", n]),
|
|
177
|
+
children: /* @__PURE__ */ t(J, {
|
|
178
178
|
title: r,
|
|
179
179
|
className: "logo",
|
|
180
|
-
accentColor: i !== void 0 && i !==
|
|
180
|
+
accentColor: i !== void 0 && i !== G.Production ? K(i) : void 0
|
|
181
181
|
})
|
|
182
|
-
}),
|
|
182
|
+
}), Ce = "Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.", we = class extends m {
|
|
183
183
|
constructor(e) {
|
|
184
184
|
super(e), this.state = { error: null };
|
|
185
185
|
}
|
|
@@ -194,17 +194,17 @@ var U = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight:
|
|
|
194
194
|
return e ? c(n) ? n({
|
|
195
195
|
retry: () => this.setState({ error: null }),
|
|
196
196
|
error: e
|
|
197
|
-
}) : e.name === "NotFoundError" && e.message ===
|
|
197
|
+
}) : e.name === "NotFoundError" && e.message === Ce ? /* @__PURE__ */ t(Ee, {}) : n : r;
|
|
198
198
|
}
|
|
199
|
-
},
|
|
200
|
-
function
|
|
201
|
-
let e = localStorage.getItem(
|
|
202
|
-
return /* @__PURE__ */ t(
|
|
199
|
+
}, Te = "EP::locale";
|
|
200
|
+
function Ee() {
|
|
201
|
+
let e = localStorage.getItem(Te), r = e === "nb" || e === "nb-NO";
|
|
202
|
+
return /* @__PURE__ */ t(H, {
|
|
203
203
|
maxWidth: "large",
|
|
204
204
|
children: /* @__PURE__ */ n(M, {
|
|
205
205
|
variant: "info",
|
|
206
206
|
title: r ? "En ny versjon av nettsiden er tilgjengelig." : "A new version of the website is available.",
|
|
207
|
-
children: [/* @__PURE__ */ t(
|
|
207
|
+
children: [/* @__PURE__ */ t(H, {
|
|
208
208
|
paddingBottom: "medium",
|
|
209
209
|
children: /* @__PURE__ */ t(j, {
|
|
210
210
|
margin: "none",
|
|
@@ -219,7 +219,7 @@ function Te() {
|
|
|
219
219
|
}
|
|
220
220
|
//#endregion
|
|
221
221
|
//#region src/ExpandableMultiLanguageInput.tsx
|
|
222
|
-
var
|
|
222
|
+
var De = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, name: o, variant: s, feedback: c, ...l }) => {
|
|
223
223
|
let u = (e, t) => {
|
|
224
224
|
let n = { ...i };
|
|
225
225
|
t === "" || !t ? delete n[e] : n[e] = t, a(n);
|
|
@@ -232,7 +232,7 @@ var Ee = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, n
|
|
|
232
232
|
marginTop: "16px",
|
|
233
233
|
marginBottom: "16px"
|
|
234
234
|
},
|
|
235
|
-
children: /* @__PURE__ */ t(
|
|
235
|
+
children: /* @__PURE__ */ t(U, {
|
|
236
236
|
space: "medium",
|
|
237
237
|
children: r.map(({ value: r, label: a, required: d }) => /* @__PURE__ */ t(n, {
|
|
238
238
|
"data-testid": `multi-lang-input-${o}-${r}`,
|
|
@@ -251,19 +251,19 @@ var Ee = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, n
|
|
|
251
251
|
};
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/FeatureToggle.tsx
|
|
254
|
-
function
|
|
254
|
+
function Y(e) {
|
|
255
255
|
return {
|
|
256
256
|
BASE_URL: "/",
|
|
257
257
|
DEV: !1,
|
|
258
258
|
MODE: "production",
|
|
259
259
|
PROD: !0,
|
|
260
260
|
SSR: !1
|
|
261
|
-
}
|
|
261
|
+
}[`VITE_APP_${e}`] === "true" || window.localStorage?.getItem(e) === "true" || window.localStorage?.getItem(`VITE_APP_${e}`) === "true";
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function Oe(e) {
|
|
264
|
+
return Y(e);
|
|
265
265
|
}
|
|
266
|
-
var
|
|
266
|
+
var ke = ({ children: n, flag: r }) => Y(r) ? /* @__PURE__ */ t(e, { children: n }) : null, Ae = ({ amount: e, as: n = "span", ...r }) => {
|
|
267
267
|
let i = Number(e) || 0, a = new Intl.NumberFormat("nb-NO", {
|
|
268
268
|
maximumFractionDigits: 2,
|
|
269
269
|
minimumFractionDigits: 2
|
|
@@ -272,8 +272,8 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
272
272
|
...r,
|
|
273
273
|
children: a
|
|
274
274
|
});
|
|
275
|
-
},
|
|
276
|
-
let c = (0,
|
|
275
|
+
}, X = ({ language: e, options: i, className: a, onChange: o, ...s }) => {
|
|
276
|
+
let c = (0, z.default)("eps-language-select", a);
|
|
277
277
|
return /* @__PURE__ */ t("div", {
|
|
278
278
|
...s,
|
|
279
279
|
className: c,
|
|
@@ -291,24 +291,24 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
291
291
|
}, e.value))
|
|
292
292
|
})
|
|
293
293
|
});
|
|
294
|
-
},
|
|
294
|
+
}, je = (e) => /* @__PURE__ */ t(A, {
|
|
295
295
|
...e,
|
|
296
296
|
as: x,
|
|
297
297
|
children: e.children
|
|
298
|
-
}),
|
|
298
|
+
}), Me = ({ children: e, className: n, ...r }) => /* @__PURE__ */ t(A, {
|
|
299
299
|
...r,
|
|
300
300
|
as: "button",
|
|
301
|
-
className: (0,
|
|
301
|
+
className: (0, z.default)("eps-link-button", n),
|
|
302
302
|
children: e
|
|
303
|
-
}),
|
|
304
|
-
className: (0,
|
|
303
|
+
}), Ne = ({ as: e = "nav", className: n, children: r }) => /* @__PURE__ */ t(e, {
|
|
304
|
+
className: (0, z.default)([
|
|
305
305
|
"eds-contrast",
|
|
306
306
|
"eps-menu",
|
|
307
307
|
n
|
|
308
308
|
]),
|
|
309
309
|
children: r
|
|
310
|
-
}),
|
|
311
|
-
let [m, h] = _(u), g = (0,
|
|
310
|
+
}), Pe = ({ className: e, inputComponent: r, alertLabel: i, alertLevel: a, name: o, languages: s, values: c, onChange: l, defaultLanguage: u = "nob", label: d = "", onBlur: f = () => {}, ...p }) => {
|
|
311
|
+
let [m, h] = _(u), g = (0, z.default)("multi-language-input", e), v = c[m], y = (e) => {
|
|
312
312
|
e.persist();
|
|
313
313
|
let t = e.currentTarget;
|
|
314
314
|
setTimeout(() => {
|
|
@@ -325,9 +325,9 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
325
325
|
tabIndex: 0,
|
|
326
326
|
onBlur: y,
|
|
327
327
|
"data-testid": `multi-lang-input-${o}`,
|
|
328
|
-
children: /* @__PURE__ */ n(
|
|
328
|
+
children: /* @__PURE__ */ n(U, {
|
|
329
329
|
space: "extraSmall",
|
|
330
|
-
children: [/* @__PURE__ */ t(
|
|
330
|
+
children: [/* @__PURE__ */ t(X, {
|
|
331
331
|
language: m,
|
|
332
332
|
options: s,
|
|
333
333
|
onChange: (e) => b(e)
|
|
@@ -343,7 +343,7 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
343
343
|
})]
|
|
344
344
|
})
|
|
345
345
|
});
|
|
346
|
-
},
|
|
346
|
+
}, Fe = ({ label: e, organisations: n, onChange: r, selectedOrganisationId: i, ...a }) => {
|
|
347
347
|
let [o, s] = _();
|
|
348
348
|
return h(() => {
|
|
349
349
|
s(n.find((e) => e.organisationId === i));
|
|
@@ -363,29 +363,29 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
363
363
|
clearable: !1,
|
|
364
364
|
...a
|
|
365
365
|
});
|
|
366
|
-
},
|
|
366
|
+
}, Ie = ({ collectionSize: e, pageSize: n, onPageChange: r, currentPage: i }) => /* @__PURE__ */ t(b, {
|
|
367
367
|
pageCount: Math.ceil(e / n),
|
|
368
368
|
currentPage: i,
|
|
369
369
|
onPageChange: (e) => {
|
|
370
370
|
r(e);
|
|
371
371
|
}
|
|
372
|
-
}),
|
|
372
|
+
}), Z = ({ title: e, suffix: t }) => {
|
|
373
373
|
h(() => {
|
|
374
374
|
t ? document.title = `${e}${t}` : document.title = e;
|
|
375
375
|
}, [e, t]);
|
|
376
|
-
},
|
|
376
|
+
}, Le = ({ pathname: e, onBreadcrumbLookup: t, appTitle: n = "Entur Partner" }) => {
|
|
377
377
|
let r = f(e).map((e) => ({
|
|
378
378
|
title: t(e),
|
|
379
379
|
path: e
|
|
380
380
|
})).filter(({ title: e }) => e !== void 0).map(({ title: e }) => e).reverse().join(" | ");
|
|
381
|
-
return
|
|
382
|
-
},
|
|
381
|
+
return Z({ title: r ? `${r} | ${n}` : n }), null;
|
|
382
|
+
}, Re = ({ children: n, fallback: r = null, permissions: o, oneOf: s = [], all: c = [] }) => {
|
|
383
383
|
let l = i(c, o), u = a(s, o);
|
|
384
384
|
return /* @__PURE__ */ t(e, { children: l && u ? n : r });
|
|
385
|
-
},
|
|
385
|
+
}, ze = ({ children: e, shouldBlockNavigation: n, ...i }) => {
|
|
386
386
|
r(C() ? !0 : void 0, "RouteLeavingGuard must be used within a data router.");
|
|
387
387
|
let a = S(({ currentLocation: e, nextLocation: t }) => e.pathname !== t.pathname && n(t));
|
|
388
|
-
return /* @__PURE__ */ t(
|
|
388
|
+
return /* @__PURE__ */ t(W, {
|
|
389
389
|
onDismiss: () => {
|
|
390
390
|
a.state === "blocked" && a.reset();
|
|
391
391
|
},
|
|
@@ -396,33 +396,33 @@ var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n
|
|
|
396
396
|
...i,
|
|
397
397
|
children: e
|
|
398
398
|
});
|
|
399
|
-
},
|
|
400
|
-
let s = (0,
|
|
399
|
+
}, Be = ({ active: e = !1, label: r = "", aggressiveInactive: i, showBullet: a, center: o }) => {
|
|
400
|
+
let s = (0, z.default)("eps-status-label__bullet", {
|
|
401
401
|
active: e,
|
|
402
402
|
aggressive: i
|
|
403
403
|
});
|
|
404
404
|
return /* @__PURE__ */ n("div", {
|
|
405
|
-
className: (0,
|
|
405
|
+
className: (0, z.default)("eps-status-label", { center: o }),
|
|
406
406
|
children: [a && /* @__PURE__ */ t("div", { className: s }), /* @__PURE__ */ t("div", { children: r })]
|
|
407
407
|
});
|
|
408
|
-
},
|
|
408
|
+
}, Ve = ({ as: e = "span", children: n, fontSize: r, color: i, lineHeight: a, fontWeight: o, className: s, ...c }) => {
|
|
409
409
|
let l = [];
|
|
410
|
-
return r && l.push(...
|
|
410
|
+
return r && l.push(...V("eps-font-size-", r)), a && l.push(...V("eps-line-height-", a)), o && l.push(`eps-font-weight-${o}`), /* @__PURE__ */ t(H, {
|
|
411
411
|
as: e,
|
|
412
412
|
color: i,
|
|
413
|
-
className: (0,
|
|
413
|
+
className: (0, z.default)(l, s),
|
|
414
414
|
...c,
|
|
415
415
|
children: n
|
|
416
416
|
});
|
|
417
|
-
},
|
|
417
|
+
}, He = ({ children: e, className: n, ...r }) => /* @__PURE__ */ t(w, {
|
|
418
418
|
variant: "primary",
|
|
419
419
|
...r,
|
|
420
|
-
className: (0,
|
|
420
|
+
className: (0, z.default)("eps-unbutton", n),
|
|
421
421
|
children: e
|
|
422
422
|
});
|
|
423
423
|
//#endregion
|
|
424
424
|
//#region src/useEventListener.ts
|
|
425
|
-
function
|
|
425
|
+
function Ue(e, t, n = window) {
|
|
426
426
|
let r = g(null);
|
|
427
427
|
h(() => {
|
|
428
428
|
r.current = t;
|
|
@@ -436,11 +436,11 @@ function He(e, t, n = window) {
|
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/user-menu/components/CustomOverflowMenuItem.tsx
|
|
439
|
-
var
|
|
440
|
-
className: (0,
|
|
439
|
+
var Q = (e) => /* @__PURE__ */ t("button", {
|
|
440
|
+
className: (0, z.default)(e.className, "eps-overflow-menu__item"),
|
|
441
441
|
role: "menuitem",
|
|
442
442
|
...e
|
|
443
|
-
}),
|
|
443
|
+
}), We = ({ locale: e, onClick: r }) => /* @__PURE__ */ n(Q, {
|
|
444
444
|
onClick: r,
|
|
445
445
|
className: "eps-overflow-menu__item",
|
|
446
446
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -453,10 +453,10 @@ var $ = (e) => /* @__PURE__ */ t("button", {
|
|
|
453
453
|
});
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/user-menu/components/useOutsideClick.ts
|
|
456
|
-
function
|
|
456
|
+
function Ge(e, t, n) {
|
|
457
457
|
h(() => {
|
|
458
458
|
let r = (r) => {
|
|
459
|
-
|
|
459
|
+
$(e.current, r) || $(t.current, r) || n();
|
|
460
460
|
};
|
|
461
461
|
return document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), () => {
|
|
462
462
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
@@ -467,15 +467,15 @@ function We(e, t, n) {
|
|
|
467
467
|
n
|
|
468
468
|
]);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function $(e, t) {
|
|
471
471
|
return e ? e.contains(t.target) ? !0 : t.composed && t.composedPath ? !!t.composedPath().find((t) => t === window ? !1 : e.contains(t)) : !1 : !1;
|
|
472
472
|
}
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region src/user-menu/components/CustomOverflowMenu.tsx
|
|
475
475
|
var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, environment: s, ...c }) => {
|
|
476
|
-
let l = (0,
|
|
477
|
-
return
|
|
478
|
-
className: (0,
|
|
476
|
+
let l = (0, z.default)("eps-overflow-menu__group", { "eps-overflow-menu__group--open": a }), u = g(null), d = g(null);
|
|
477
|
+
return Ge(u, d, () => o(!1)), /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t(D, {
|
|
478
|
+
className: (0, z.default)("eps-overflow-menu__button", e),
|
|
479
479
|
onClick: () => o(!a),
|
|
480
480
|
"aria-haspopup": !0,
|
|
481
481
|
"aria-expanded": a,
|
|
@@ -491,12 +491,13 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
491
491
|
/* @__PURE__ */ n(k, {
|
|
492
492
|
margin: "none",
|
|
493
493
|
as: "span",
|
|
494
|
-
|
|
495
|
-
|
|
494
|
+
className: "eps-overflow-menu__user-name",
|
|
495
|
+
children: [i, s !== void 0 && s !== G.Production && /* @__PURE__ */ n("span", {
|
|
496
|
+
style: { color: K(s) },
|
|
496
497
|
children: [
|
|
497
498
|
" ",
|
|
498
499
|
"(",
|
|
499
|
-
|
|
500
|
+
q(s),
|
|
500
501
|
")"
|
|
501
502
|
]
|
|
502
503
|
})]
|
|
@@ -513,7 +514,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
513
514
|
ref: u,
|
|
514
515
|
children: r
|
|
515
516
|
})] });
|
|
516
|
-
}, qe = ({ locale: r, onLocaleChange: i }) => /* @__PURE__ */ t(e, { children: r === "en-GB" ? /* @__PURE__ */ n(
|
|
517
|
+
}, qe = ({ locale: r, onLocaleChange: i }) => /* @__PURE__ */ t(e, { children: r === "en-GB" ? /* @__PURE__ */ n(Q, {
|
|
517
518
|
onClick: () => {
|
|
518
519
|
i("nb-NO");
|
|
519
520
|
},
|
|
@@ -526,7 +527,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
526
527
|
inline: !0
|
|
527
528
|
})
|
|
528
529
|
}), "Bytt til norsk"]
|
|
529
|
-
}) : /* @__PURE__ */ n(
|
|
530
|
+
}) : /* @__PURE__ */ n(Q, {
|
|
530
531
|
onClick: () => {
|
|
531
532
|
i("en-GB");
|
|
532
533
|
},
|
|
@@ -539,7 +540,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
539
540
|
inline: !0
|
|
540
541
|
})
|
|
541
542
|
}), "Switch to English"]
|
|
542
|
-
}) }), Je = ({ onClick: e, locale: r }) => /* @__PURE__ */ n(
|
|
543
|
+
}) }), Je = ({ onClick: e, locale: r }) => /* @__PURE__ */ n(Q, {
|
|
543
544
|
onClick: e,
|
|
544
545
|
"data-testid": "user-menu-logout",
|
|
545
546
|
className: "eps-overflow-menu__item",
|
|
@@ -550,7 +551,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
550
551
|
inline: !0
|
|
551
552
|
})
|
|
552
553
|
}), r === "en-GB" ? "Log out " : "Logg ut"]
|
|
553
|
-
}), Ye = ({ locale: e, onClick: r }) => /* @__PURE__ */ n(
|
|
554
|
+
}), Ye = ({ locale: e, onClick: r }) => /* @__PURE__ */ n(Q, {
|
|
554
555
|
onClick: r,
|
|
555
556
|
className: "eps-overflow-menu__item",
|
|
556
557
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -560,7 +561,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
560
561
|
inline: !0
|
|
561
562
|
})
|
|
562
563
|
}), e === "en-GB" ? "My profile" : "Min profil"]
|
|
563
|
-
}), Xe = ({ locale: e, onClick: r }) => /* @__PURE__ */ n(
|
|
564
|
+
}), Xe = ({ locale: e, onClick: r }) => /* @__PURE__ */ n(Q, {
|
|
564
565
|
onClick: r,
|
|
565
566
|
className: "eps-overflow-menu__item",
|
|
566
567
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -578,7 +579,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
578
579
|
children: /* @__PURE__ */ t(Ke, {
|
|
579
580
|
open: m,
|
|
580
581
|
onOpenChange: h,
|
|
581
|
-
className: (0,
|
|
582
|
+
className: (0, z.default)(["eps-user-menu__trigger-button", e]),
|
|
582
583
|
userName: a,
|
|
583
584
|
environment: s,
|
|
584
585
|
children: /* @__PURE__ */ n("div", {
|
|
@@ -602,7 +603,7 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
602
603
|
d(), h(!1);
|
|
603
604
|
}
|
|
604
605
|
}),
|
|
605
|
-
u && /* @__PURE__ */ t(
|
|
606
|
+
u && /* @__PURE__ */ t(We, {
|
|
606
607
|
locale: o,
|
|
607
608
|
onClick: () => {
|
|
608
609
|
f(), h(!1);
|
|
@@ -620,6 +621,6 @@ var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
620
621
|
});
|
|
621
622
|
};
|
|
622
623
|
//#endregion
|
|
623
|
-
export {
|
|
624
|
+
export { ge as ActionBar, me as ActionBarLeft, he as ActionBarRight, _e as AuditInfo, H as Box, ve as Breadcrumbs, W as ConfirmModal, ye as Content, Se as EnturPartnerLogo, J as EnturPartnerLogoSvg, G as Environment, we as ErrorBoundary, De as ExpandableMultiLanguageInput, ke as FeatureToggle, Ae as FormatCurrencyAmount, B as FormatDateTime, X as LanguageSelect, je as Link, Me as LinkButton, Ne as Menu, Pe as MultiLanguageInput, Fe as OrganisationDropDown, Le as PageTitle, Ie as Pager, Re as PermissionCheck, ze as RouteLeavingGuard, U as Stack, Be as StatusLabel, Ve as Text, He as Unbutton, Ze as UserMenu, Y as featureFlag, K as getColorForEnvironment, q as getHumanReadableEnvironment, V as responsiveProp, Z as useDocumentTitle, Ue as useEventListener, Oe as useFeatureToggle };
|
|
624
625
|
|
|
625
626
|
//# sourceMappingURL=index.mjs.map
|