1import { WsBadge as U, useQuasarPlugin as G } from "@mfl/common-components"; 2import { bootstrapMicrofrontend as F } from "@mfl/vue-common"; 3import { ExtensionPoint as S, routeChangedEvent as D, navigateTo as H, Priority as K } from "@mfl/framework"; 4import { ref as T, defineComponent as h, openBlock as n, createBlock as x, unref as W, createElementBlock as u, createElementVNode as s, normalizeStyle as $, Fragment as w, normalizeClass as A, createCommentVNode as y, computed as d, createVNode as I, toDisplayString as B, renderList as P, resolveDynamicComponent as L, Transition as Z, withCtx as Q, shallowRef as E, mergeProps as j, toHandlers as q } from "vue"; 5var f = /* @__PURE__ */ ((e) => (e[e.FullView = 1] = "FullView", e[e.MinimalView = 2] = "MinimalView", e[e.Hidden = 3] = "Hidden", e[e.Locked = 4] = "Locked", e))(f || {}); 6const O = new S(), J = new S(), X = new S(), _ = T( 7 f.FullView 8), M = T(location.pathname); 9D.subscribe(() => { 10 M.value = location.pathname; 11}); 12const Y = /* @__PURE__ */ h({ 13 __name: "beta-ornament", 14 setup(e) { 15 return (t, i) => (n(), x(W(U), { 16 label: "BETA", 17 aid: "BETA_BADGE" 18 })); 19 } 20}), b = (e, t) => { 21 const i = e.__vccOpts || e; 22 for (const [r, g] of t) 23 i[r] = g; 24 return i; 25}, ee = {}, te = { 26 xmlns: "http://www.w3.org/2000/svg", 27 width: "12", 28 height: "12", 29 viewBox: "0 0 12 12", 30 fill: "none" 31}; 32function ne(e, t) { 33 return n(), u("svg", te, [...t[0] || (t[0] = [ 34 s("g", { "clip-path": "url(#clip0_6854_502)" }, [ 35 s("path", { 36 d: "M6 1.125C7.29293 1.125 8.53291 1.63861 9.44715 2.55285C10.3614 3.46709 10.875 4.70707 10.875 6C10.875 7.29293 10.3614 8.53291 9.44715 9.44715C8.53291 10.3614 7.29293 10.875 6 10.875C4.70707 10.875 3.46709 10.3614 2.55285 9.44715C1.63861 8.53291 1.125 7.29293 1.125 6C1.125 4.70707 1.63861 3.46709 2.55285 2.55285C3.46709 1.63861 4.70707 1.125 6 1.125ZM6 12C7.5913 12 9.11742 11.3679 10.2426 10.2426C11.3679 9.11742 12 7.5913 12 6C12 4.4087 11.3679 2.88258 10.2426 1.75736C9.11742 0.632141 7.5913 0 6 0C4.4087 0 2.88258 0.632141 1.75736 1.75736C0.632141 2.88258 0 4.4087 0 6C0 7.5913 0.632141 9.11742 1.75736 10.2426C2.88258 11.3679 4.4087 12 6 12ZM8.46094 4.85156L6.39844 2.78906C6.17812 2.56875 5.82188 2.56875 5.60391 2.78906L3.54141 4.85156C3.32109 5.07188 3.32109 5.42812 3.54141 5.64609C3.76172 5.86406 4.11797 5.86641 4.33594 5.64609L5.4375 4.54453V8.8125C5.4375 9.12422 5.68828 9.375 6 9.375C6.31172 9.375 6.5625 9.12422 6.5625 8.8125V4.54453L7.66406 5.64609C7.88438 5.86641 8.24062 5.86641 8.45859 5.64609C8.67656 5.42578 8.67891 5.06953 8.45859 4.85156H8.46094Z", 37 fill: "#1E90FA" 38 }) 39 ], -1), 40 s("defs", null, [ 41 s("clipPath", { id: "clip0_6854_502" }, [ 42 s("rect", { 43 width: "12", 44 height: "12", 45 fill: "white" 46 }) 47 ]) 48 ], -1) 49 ])]); 50} 51const oe = /* @__PURE__ */ b(ee, [["render", ne]]); 52function ie(e) { 53 return e.ornaments ? e.ornaments.map((t) => t.type === "beta" ? { 54 key: "BETA", 55 component: Y 56 } : t.type === "pro" ? { 57 key: "PRO", 58 component: oe 59 } : t.options) : []; 60} 61const se = ["src"], re = ["src"], ae = /* @__PURE__ */ h({ 62 __name: "navigation-item-icon", 63 props: { 64 fontAwesomeIcon: {}, 65 fontAwesomeIconSize: { default: 16 }, 66 iconUrl: {}, 67 iconUrlActive: {}, 68 indentPixels: {} 69 }, 70 setup(e) { 71 const t = e; 72 return (i, r) => (n(), u("div", { 73 class: "navigation-item-icon-container", 74 style: $({ 75 "margin-left": `${t.indentPixels}px` 76 }) 77 }, [ 78 t.fontAwesomeIcon ? (n(), u(w, { key: 0 }, [ 79 s("span", { 80 class: A(["fa-light", `fa-${t.fontAwesomeIcon}`]), 81 style: $({ 82 "font-size": `${t.fontAwesomeIconSize}px` 83 }) 84 }, null, 6), 85 s("span", { 86 class: A(["fa-regular", `fa-${t.fontAwesomeIcon}`]), 87 style: $({ 88 "font-size": `${t.fontAwesomeIconSize}px` 89 }) 90 }, null, 6) 91 ], 64)) : t.iconUrl ? (n(), u(w, { key: 1 }, [ 92 s("img", { 93 src: t.iconUrl, 94 style: {} 95 }, null, 8, se), 96 s("img", { 97 src: t.iconUrlActive || t.iconUrl, 98 style: {} 99 }, null, 8, re) 100 ], 64)) : y("", !0) 101 ], 4)); 102 } 103}), ue = ["aid"], ce = ["href"], le = { class: "item-text" }, me = { class: "ornaments" }, de = { 104 key: 0, 105 class: "expand-collapse fa-regular fa-chevron-down" 106}, ve = { key: 0 }, pe = /* @__PURE__ */ h({ 107 __name: "navigation-item", 108 props: { 109 item: {}, 110 groups: {}, 111 level: {} 112 }, 113 setup(e) { 114 const t = e, i = d( 115 () => _.value === f.MinimalView 116 ), r = d(() => t.level * (i.value ? 5 : 15)), g = d(() => ie(t.item)), a = d(() => { 117 const l = t.item.route; 118 return l ? M.value.endsWith(l) : !1; 119 }), c = d(() => { 120 if (a.value) return !0; 121 function l(v) { 122 const m = t.groups.get(v); 123 return m?.length ? m.find( 124 (C) => C.route && M.value.endsWith(C.route) 125 ) ? !0 : m.find((C) => l(C.key)) !== void 0 : !1; 126 } 127 return l(t.item.key); 128 }), p = d( 129 () => t.groups.has(t.item.key) 130 ), o = d(() => t.item.route ? t.item.route : t.groups.get(t.item.key)?.find((m) => m.route)?.route); 131 async function k(l) { 132 l.preventDefault(); 133 const v = t.item; 134 if (!(v.handler ? await v.handler(v) : !0)) return; 135 const V = o.value; 136 if (!V) { 137 console.warn( 138 `No route defined for navigation item "${v.key}" (or its subitems)` 139 ); 140 return; 141 } 142 H(V); 143 } 144 return (l, v) => (n(), u("li", { 145 aid: e.item.key + "_NAVIGATION_ITEM", 146 class: A(["navigation-item", { 147 "navigation-item-active": a.value, 148 "navigation-item-minimized": i.value 149 }]) 150 }, [ 151 s("a", { 152 href: o.value, 153 onClick: v[0] || (v[0] = (m) => k(m)) 154 }, [ 155 I(ae, { 156 "font-awesome-icon": e.item.fontAwesomeIcon, 157 "font-awesome-icon-size": e.item.fontAwesomeIconSize, 158 "icon-url": e.item.iconUrl, 159 "icon-url-active": e.item.iconUrlActive, 160 "indent-pixels": r.value 161 }, null, 8, ["font-awesome-icon", "font-awesome-icon-size", "icon-url", "icon-url-active", "indent-pixels"]), 162 s("div", le, B(e.item.text), 1), 163 s("div", me, [ 164 (n(!0), u(w, null, P(g.value, (m) => (n(), x(L(m.component), { 165 key: m.key, 166 aid: m.key + "_ORNAMENT" 167 }, null, 8, ["aid"]))), 128)) 168 ]), 169 !i.value && p.value ? (n(), u("i", de)) : y("", !0) 170 ], 8, ce), 171 I(Z, { name: "slidedown" }, { 172 default: Q(() => [ 173 c.value ? (n(), u("div", ve, [ 174 I(R, { 175 groups: e.groups, 176 "group-key": e.item.key, 177 level: e.level + 1 178 }, null, 8, ["groups", "group-key", "level"]) 179 ])) : y("", !0) 180 ]), 181 _: 1 182 }) 183 ], 10, ue)); 184 } 185}), fe = /* @__PURE__ */ b(pe, [["__scopeId", "data-v-1c2c68a9"]]), R = /* @__PURE__ */ h({ 186 __name: "navigation-group", 187 props: { 188 groupKey: {}, 189 groups: {}, 190 level: {} 191 }, 192 setup(e) { 193 return (t, i) => (n(!0), u(w, null, P(e.groups.get(e.groupKey), (r) => (n(), x(fe, { 194 key: r.key, 195 item: r, 196 groups: e.groups, 197 level: e.level || 0 198 }, null, 8, ["item", "groups", "level"]))), 128)); 199 } 200}); 201class z extends Map { 202} 203const ge = { class: "navigation-items" }, N = "root", _e = /* @__PURE__ */ h({ 204 __name: "navigation-menu", 205 setup(e) { 206 function t(a) { 207 const c = new z(), p = /* @__PURE__ */ new Set(); 208 for (const o of a) { 209 if (p.has(o.key)) { 210 c.has(o.key) || console.error(`Duplicate navigation item "${o.key}"`); 211 continue; 212 } 213 p.add(o.key);
214 const k = o.parentKey || N, l = c.get(k); 215 l ? l.push(o) : c.set(k, [o]); 216 } 217 return console.debug("core-navigation: groups", c), c; 218 } 219 const i = E(new z()); 220 J.subscribe((a) => { 221 console.debug("core-navigation: items changed", a), i.value = t(a); 222 }); 223 const r = E(new z()); 224 X.subscribe((a) => { 225 console.debug("core-navigation: override items changed", a), r.value = t(a); 226 }); 227 const g = d(() => r.value.size ? r.value : i.value); 228 return (a, c) => (n(), u("ul", ge, [ 229 I(R, { 230 groups: g.value, 231 "group-key": N 232 }, null, 8, ["groups"]) 233 ])); 234 } 235}), he = /* @__PURE__ */ b(_e, [["__scopeId", "data-v-458892f1"]]); 236function we() { 237 O.register( 238 { 239 component: he, 240 key: "MAIN_NAV_ITEMS" 241 }, 242 { 243 priority: K.Low - 5e3 244 } 245 ); 246} 247const ye = { 248 key: 0, 249 class: "collapse-expand-button" 250}, ke = /* @__PURE__ */ h({ 251 __name: "core-navigation-mfe", 252 setup(e) { 253 const t = E([]); 254 O.subscribe((c) => { 255 console.debug("core-navigation: components changed", c), t.value = [...c]; 256 }); 257 const i = d( 258 () => _.value === f.MinimalView 259 ), r = d( 260 () => _.value !== f.Hidden 261 ), g = d( 262 () => _.value != f.Locked 263 ); 264 function a() { 265 _.value === f.MinimalView ? _.value = f.FullView : _.value = f.MinimalView; 266 } 267 return (c, p) => r.value ? (n(), u("div", { 268 key: 0, 269 class: A(["core-navigation-container", { 270 "minimized-navigation": i.value 271 }]), 272 aid: "NAVIGATION_PANEL" 273 }, [ 274 g.value ? (n(), u("div", ye, [ 275 s("button", { 276 onClick: p[0] || (p[0] = (o) => a()) 277 }, [...p[1] || (p[1] = [ 278 s("i", { class: "fa-regular fa-chevron-left" }, null, -1) 279 ])]) 280 ])) : y("", !0), 281 (n(!0), u(w, null, P(t.value, (o) => (n(), x(L(o.component), j({ 282 key: o.key 283 }, { ref_for: !0 }, o.props || {}, q(o.events || {})), null, 16))), 128)) 284 ], 2)) : y("", !0); 285 } 286}), Ce = /* @__PURE__ */ b(ke, [["__scopeId", "data-v-758a79ad"]]), { bootstrap: $e, mount: ze, unmount: Ee } = F({ 287 name: "core-navigation", 288 mainComponent: Ce, 289 includeCss: !0, 290 viteCdnPrefix: "/assets-ws1/1790235839988", 291 replaceMode: !0, 292 handleVueApp: (e) => { 293 G(e), we(); 294 } 295}); 296export { 297 f as NavigationBarMode, 298 $e as bootstrap, 299 ze as mount, 300 _ as navigationBarMode, 301 O as navigationComponents, 302 J as navigationItems, 303 X as navigationItemsOverride, 304 Ee as unmount 305}; 306//# sourceMappingURL=core-navigation-mfe.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.