@luzmo/embed 6.13.0 → 6.13.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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [6.13.2] - 2026-05-25
6
+
7
+ ### Fixed
8
+ - Updated `@luzmo/shared-embed` to `5.12.1`, which reuses the host page's existing Module Federation runtime instead of creating a siloed private instance. Fixes NG0201 / NG0203 DI errors when a Luzmo remote (e.g. iq-app, dashboard-app) is loaded into a host that already has its own MF runtime.
9
+
10
+ ## [6.13.1] - 2026-05-13
11
+
12
+ ### Fixed
13
+ - Properly initialized dashboard webcomponent.
14
+
5
15
  ## [6.13.0] - 2026-03-30
6
16
 
7
17
  ### Changed
package/index.cjs CHANGED
@@ -65,7 +65,7 @@ var import_decorators = require("lit/decorators.js");
65
65
  var import_style_map = require("lit/directives/style-map.js");
66
66
 
67
67
  // libs/embed-libs/embed/package.json
68
- var version = "6.13.0";
68
+ var version = "6.13.2";
69
69
 
70
70
  // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
71
71
  var SharedLib = __toESM(require("@luzmo/shared-embed"));
@@ -483,22 +483,25 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
483
483
  SharedLib2.loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
484
484
  this.isLibraryLoaded = true;
485
485
  await this.updateComplete;
486
- const oldReference = this.renderRoot.querySelector("dashboard-component");
487
- this.dashboardReference = oldReference.cloneNode(true);
488
- oldReference.replaceWith(this.dashboardReference);
489
- this.dashboardReference.addEventListener("load", (payload) => {
490
- this.containerWidth = this.dashboardReference.offsetWidth;
486
+ const el = document.createElement("dashboard-component");
487
+ this.setAllAttributesOnElement(el);
488
+ el.addEventListener("load", (payload) => {
489
+ this.containerWidth = el.offsetWidth;
491
490
  this.dimensions = payload.detail.dimensions;
492
491
  SharedLib2._setCalculatedDimensions(this);
493
492
  window.dispatchEvent(new Event("resize"));
494
493
  this.dispatchEvent(new CustomEvent("load", payload));
495
494
  });
496
- this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
497
- this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
498
- this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
499
- this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
500
- this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
501
- this.setAllAttributes();
495
+ el.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
496
+ el.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
497
+ el.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
498
+ el.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
499
+ el.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
500
+ const container = this.renderRoot.querySelector("#dashboard-wc-container");
501
+ if (container) {
502
+ container.append(el);
503
+ this.dashboardReference = el;
504
+ }
502
505
  });
503
506
  } else {
504
507
  this.containerWidth = this.container?.clientWidth;
@@ -516,24 +519,36 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
516
519
  }
517
520
  setAllAttributes() {
518
521
  if (this.dashboardReference) {
519
- for (const key in this.attributesMap) {
520
- if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
521
- this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
522
- }
523
- }
524
- if (this.params.itemDimensions) {
525
- this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
526
- }
527
- if (this.params.apiHost) {
528
- this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
529
- }
530
- if (this.params.key) {
531
- this.dashboardReference.setAttribute("auth-key", this.params.key);
532
- }
533
- if (this.params.token) {
534
- this.dashboardReference.setAttribute("auth-token", this.params.token);
522
+ this.setAllAttributesOnElement(this.dashboardReference);
523
+ }
524
+ }
525
+ setAllAttributesOnElement(el) {
526
+ if (!el) {
527
+ return;
528
+ }
529
+ if (this.params.dashboardId) {
530
+ el.setAttribute("dashboard-id", this.params.dashboardId);
531
+ }
532
+ if (this.params.appServer) {
533
+ el.setAttribute("app-server", this.params.appServer);
534
+ }
535
+ if (this.params.apiHost) {
536
+ el.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
537
+ }
538
+ for (const key in this.attributesMap) {
539
+ if (!["authKey", "authToken", "apiHost", "itemDimensions", "dashboardId", "appServer"].includes(key) && this.params[key]) {
540
+ el.setAttribute(this.attributesMap[key], this.params[key]);
535
541
  }
536
542
  }
543
+ if (this.params.itemDimensions) {
544
+ el.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
545
+ }
546
+ if (this.params.key) {
547
+ el.setAttribute("auth-key", this.params.key);
548
+ }
549
+ if (this.params.token) {
550
+ el.setAttribute("auth-token", this.params.token);
551
+ }
537
552
  }
538
553
  // Reload dashboard when triggerproperty changes
539
554
  updated(changedProperties) {
@@ -771,8 +786,7 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
771
786
  if (this.isWebComponentViewMode()) {
772
787
  toBeRenderedHTML = this.isLibraryLoaded ? import_lit2.html`
773
788
  ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
774
- <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
775
- api-host="${this.params.apiHost}"></dashboard-component>
789
+ <div id="dashboard-wc-container"></div>
776
790
  ` : import_lit2.html`
777
791
  <div id="luzmo-error-${this._containerId}">
778
792
  <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
@@ -1108,14 +1122,12 @@ if (!customElements.get("luzmo-embed-dashboard")) {
1108
1122
  customElements.define("luzmo-embed-dashboard", LuzmoEmbedDashboard);
1109
1123
  }
1110
1124
 
1111
- // libs/dashboard-contents-types/src/lib/shared/version.ts
1112
- var CONTENTS_VERSION = "0.1.99";
1113
-
1114
1125
  // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1126
+ var import_dashboard_contents_types = require("@luzmo/dashboard-contents-types");
1115
1127
  var SharedLib3 = __toESM(require("@luzmo/shared-embed"));
1116
1128
  var import_lit3 = require("lit");
1117
1129
  var import_decorators2 = require("lit/decorators.js");
1118
- var dashboardContentsVersion = CONTENTS_VERSION;
1130
+ var dashboardContentsVersion = import_dashboard_contents_types.CONTENTS_VERSION;
1119
1131
  var vizItemRemote = "VizItemApp";
1120
1132
  var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1121
1133
  constructor() {
package/index.js CHANGED
@@ -23,7 +23,7 @@ import { property, query, state } from "lit/decorators.js";
23
23
  import { styleMap } from "lit/directives/style-map.js";
24
24
 
25
25
  // libs/embed-libs/embed/package.json
26
- var version = "6.13.0";
26
+ var version = "6.13.2";
27
27
 
28
28
  // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
29
29
  import * as SharedLib from "@luzmo/shared-embed";
@@ -441,22 +441,25 @@ var LuzmoDashboard = class extends LitElement {
441
441
  SharedLib2.loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
442
442
  this.isLibraryLoaded = true;
443
443
  await this.updateComplete;
444
- const oldReference = this.renderRoot.querySelector("dashboard-component");
445
- this.dashboardReference = oldReference.cloneNode(true);
446
- oldReference.replaceWith(this.dashboardReference);
447
- this.dashboardReference.addEventListener("load", (payload) => {
448
- this.containerWidth = this.dashboardReference.offsetWidth;
444
+ const el = document.createElement("dashboard-component");
445
+ this.setAllAttributesOnElement(el);
446
+ el.addEventListener("load", (payload) => {
447
+ this.containerWidth = el.offsetWidth;
449
448
  this.dimensions = payload.detail.dimensions;
450
449
  SharedLib2._setCalculatedDimensions(this);
451
450
  window.dispatchEvent(new Event("resize"));
452
451
  this.dispatchEvent(new CustomEvent("load", payload));
453
452
  });
454
- this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
455
- this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
456
- this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
457
- this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
458
- this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
459
- this.setAllAttributes();
453
+ el.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
454
+ el.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
455
+ el.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
456
+ el.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
457
+ el.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
458
+ const container = this.renderRoot.querySelector("#dashboard-wc-container");
459
+ if (container) {
460
+ container.append(el);
461
+ this.dashboardReference = el;
462
+ }
460
463
  });
461
464
  } else {
462
465
  this.containerWidth = this.container?.clientWidth;
@@ -474,24 +477,36 @@ var LuzmoDashboard = class extends LitElement {
474
477
  }
475
478
  setAllAttributes() {
476
479
  if (this.dashboardReference) {
477
- for (const key in this.attributesMap) {
478
- if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
479
- this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
480
- }
481
- }
482
- if (this.params.itemDimensions) {
483
- this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
484
- }
485
- if (this.params.apiHost) {
486
- this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
487
- }
488
- if (this.params.key) {
489
- this.dashboardReference.setAttribute("auth-key", this.params.key);
490
- }
491
- if (this.params.token) {
492
- this.dashboardReference.setAttribute("auth-token", this.params.token);
480
+ this.setAllAttributesOnElement(this.dashboardReference);
481
+ }
482
+ }
483
+ setAllAttributesOnElement(el) {
484
+ if (!el) {
485
+ return;
486
+ }
487
+ if (this.params.dashboardId) {
488
+ el.setAttribute("dashboard-id", this.params.dashboardId);
489
+ }
490
+ if (this.params.appServer) {
491
+ el.setAttribute("app-server", this.params.appServer);
492
+ }
493
+ if (this.params.apiHost) {
494
+ el.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
495
+ }
496
+ for (const key in this.attributesMap) {
497
+ if (!["authKey", "authToken", "apiHost", "itemDimensions", "dashboardId", "appServer"].includes(key) && this.params[key]) {
498
+ el.setAttribute(this.attributesMap[key], this.params[key]);
493
499
  }
494
500
  }
501
+ if (this.params.itemDimensions) {
502
+ el.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
503
+ }
504
+ if (this.params.key) {
505
+ el.setAttribute("auth-key", this.params.key);
506
+ }
507
+ if (this.params.token) {
508
+ el.setAttribute("auth-token", this.params.token);
509
+ }
495
510
  }
496
511
  // Reload dashboard when triggerproperty changes
497
512
  updated(changedProperties) {
@@ -729,8 +744,7 @@ var LuzmoDashboard = class extends LitElement {
729
744
  if (this.isWebComponentViewMode()) {
730
745
  toBeRenderedHTML = this.isLibraryLoaded ? html`
731
746
  ${this.dashboardId || this.dashboardSlug ? html`
732
- <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
733
- api-host="${this.params.apiHost}"></dashboard-component>
747
+ <div id="dashboard-wc-container"></div>
734
748
  ` : html`
735
749
  <div id="luzmo-error-${this._containerId}">
736
750
  <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
@@ -1066,10 +1080,8 @@ if (!customElements.get("luzmo-embed-dashboard")) {
1066
1080
  customElements.define("luzmo-embed-dashboard", LuzmoEmbedDashboard);
1067
1081
  }
1068
1082
 
1069
- // libs/dashboard-contents-types/src/lib/shared/version.ts
1070
- var CONTENTS_VERSION = "0.1.99";
1071
-
1072
1083
  // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1084
+ import { CONTENTS_VERSION } from "@luzmo/dashboard-contents-types";
1073
1085
  import * as SharedLib3 from "@luzmo/shared-embed";
1074
1086
  import { css as css2, html as html2, LitElement as LitElement2 } from "lit";
1075
1087
  import { property as property2 } from "lit/decorators.js";
@@ -391,7 +391,7 @@ var createIframeUrl = (dashboardContent) => {
391
391
  searchString.push(`accentColor=${accentColor}`);
392
392
  }
393
393
  if (screenMode && screenMode !== "auto") {
394
- searchString.push(`screenMode=&{screenMode}`);
394
+ searchString.push(`screenMode=${screenMode}`);
395
395
  }
396
396
  if (timezoneId) {
397
397
  searchString.push("timezoneId=" + timezoneId);
@@ -1262,7 +1262,7 @@ var libraryTypeToWebComponentTypeMapping = {
1262
1262
  // libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
1263
1263
  var luzmoEmbedContainerClass = "luzmo-embed-container";
1264
1264
 
1265
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/constant.js
1265
+ // node_modules/@module-federation/sdk/dist/constant.js
1266
1266
  var MANIFEST_EXT = ".json";
1267
1267
  var BROWSER_LOG_KEY = "FEDERATION_DEBUG";
1268
1268
  var NameTransformSymbol = {
@@ -1288,7 +1288,7 @@ var TreeShakingStatus = /* @__PURE__ */ (function(TreeShakingStatus2) {
1288
1288
  return TreeShakingStatus2;
1289
1289
  })({});
1290
1290
 
1291
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/env.js
1291
+ // node_modules/@module-federation/sdk/dist/env.js
1292
1292
  var isBrowserEnvValue = typeof ENV_TARGET !== "undefined" ? ENV_TARGET === "web" : typeof window !== "undefined" && typeof window.document !== "undefined";
1293
1293
  function isBrowserEnv() {
1294
1294
  return isBrowserEnvValue;
@@ -1310,7 +1310,7 @@ function isDebugMode() {
1310
1310
  return isBrowserDebug();
1311
1311
  }
1312
1312
 
1313
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/utils.js
1313
+ // node_modules/@module-federation/sdk/dist/utils.js
1314
1314
  var LOG_CATEGORY = "[ Federation Runtime ]";
1315
1315
  var composeKeyWithSeparator = function(...args) {
1316
1316
  if (!args.length) return "";
@@ -1345,7 +1345,7 @@ function safeToString(info) {
1345
1345
  }
1346
1346
  }
1347
1347
 
1348
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/generateSnapshotFromManifest.js
1348
+ // node_modules/@module-federation/sdk/dist/generateSnapshotFromManifest.js
1349
1349
  var simpleJoinRemoteEntry = (rPath, rName) => {
1350
1350
  if (!rPath) return rName;
1351
1351
  const transformPath = (str) => {
@@ -1416,21 +1416,6 @@ function generateSnapshotFromManifest(manifest, options = {}) {
1416
1416
  assets: expose.assets
1417
1417
  }))
1418
1418
  };
1419
- if (manifest.metaData?.prefetchInterface) {
1420
- const prefetchInterface = manifest.metaData.prefetchInterface;
1421
- basicRemoteSnapshot = {
1422
- ...basicRemoteSnapshot,
1423
- prefetchInterface
1424
- };
1425
- }
1426
- if (manifest.metaData?.prefetchEntry) {
1427
- const { path, name, type } = manifest.metaData.prefetchEntry;
1428
- basicRemoteSnapshot = {
1429
- ...basicRemoteSnapshot,
1430
- prefetchEntry: simpleJoinRemoteEntry(path, name),
1431
- prefetchEntryType: type
1432
- };
1433
- }
1434
1419
  if ("publicPath" in manifest.metaData) {
1435
1420
  remoteSnapshot = {
1436
1421
  ...basicRemoteSnapshot,
@@ -1453,7 +1438,7 @@ function isManifestProvider(moduleInfo) {
1453
1438
  else return false;
1454
1439
  }
1455
1440
 
1456
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/logger.js
1441
+ // node_modules/@module-federation/sdk/dist/logger.js
1457
1442
  var PREFIX = "[ Module Federation ]";
1458
1443
  var DEFAULT_DELEGATE = console;
1459
1444
  var LOGGER_STACK_SKIP_TOKENS = [
@@ -1569,7 +1554,7 @@ function createInfrastructureLogger(prefix) {
1569
1554
  var logger = createLogger(PREFIX);
1570
1555
  var infrastructureLogger = createInfrastructureLogger(PREFIX);
1571
1556
 
1572
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/dom.js
1557
+ // node_modules/@module-federation/sdk/dist/dom.js
1573
1558
  async function safeWrapper(callback, disableWarn) {
1574
1559
  try {
1575
1560
  return await callback();
@@ -1743,7 +1728,7 @@ function loadScript(url, info) {
1743
1728
  });
1744
1729
  }
1745
1730
 
1746
- // node_modules/@module-federation/runtime-core/node_modules/@module-federation/sdk/dist/node.js
1731
+ // node_modules/@module-federation/sdk/dist/node.js
1747
1732
  var sdkImportCache = /* @__PURE__ */ new Map();
1748
1733
  function importNodeModule(name) {
1749
1734
  if (!name) throw new Error("import specifier is required");
@@ -2001,8 +1986,8 @@ function setGlobalDefaultVal(target) {
2001
1986
  }
2002
1987
  setGlobalDefaultVal(CurrentGlobal);
2003
1988
  setGlobalDefaultVal(nativeGlobal);
2004
- function setGlobalFederationInstance(FederationInstance) {
2005
- CurrentGlobal.__FEDERATION__.__INSTANCES__.push(FederationInstance);
1989
+ function setGlobalFederationInstance(FederationInstance2) {
1990
+ CurrentGlobal.__FEDERATION__.__INSTANCES__.push(FederationInstance2);
2006
1991
  }
2007
1992
  function getGlobalFederationConstructor() {
2008
1993
  return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__;
@@ -2010,7 +1995,7 @@ function getGlobalFederationConstructor() {
2010
1995
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
2011
1996
  if (isDebug) {
2012
1997
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
2013
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.3.0";
1998
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.4.0";
2014
1999
  }
2015
2000
  }
2016
2001
  function getInfoWithoutType(target, key) {
@@ -2719,7 +2704,7 @@ function handleRemoteEntryLoaded(name, globalName, entry) {
2719
2704
  });
2720
2705
  return entryExports;
2721
2706
  }
2722
- async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUrl }) {
2707
+ async function loadEntryScript({ name, globalName, entry, remoteInfo, loaderHook, getEntryUrl }) {
2723
2708
  const { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);
2724
2709
  if (remoteEntryExports) return remoteEntryExports;
2725
2710
  const url = getEntryUrl ? getEntryUrl(entry) : entry;
@@ -2728,7 +2713,8 @@ async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUr
2728
2713
  createScriptHook: (url2, attrs) => {
2729
2714
  const res = loaderHook.lifecycle.createScript.emit({
2730
2715
  url: url2,
2731
- attrs
2716
+ attrs,
2717
+ remoteInfo
2732
2718
  });
2733
2719
  if (!res) return;
2734
2720
  if (res instanceof HTMLScriptElement) return res;
@@ -2763,6 +2749,7 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook, getEnt
2763
2749
  entry,
2764
2750
  globalName,
2765
2751
  name,
2752
+ remoteInfo,
2766
2753
  loaderHook,
2767
2754
  getEntryUrl
2768
2755
  });
@@ -2781,7 +2768,8 @@ async function loadEntryNode({ remoteInfo, loaderHook }) {
2781
2768
  loaderHook: { createScriptHook: (url, attrs = {}) => {
2782
2769
  const res = loaderHook.lifecycle.createScript.emit({
2783
2770
  url,
2784
- attrs
2771
+ attrs,
2772
+ remoteInfo
2785
2773
  });
2786
2774
  if (!res) return;
2787
2775
  if ("url" in res) return res;
@@ -2923,7 +2911,6 @@ function defaultPreloadArgs(preloadConfig) {
2923
2911
  resourceCategory: "sync",
2924
2912
  share: true,
2925
2913
  depsRemote: true,
2926
- prefetchInterface: false,
2927
2914
  ...preloadConfig
2928
2915
  };
2929
2916
  }
@@ -2979,7 +2966,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
2979
2966
  createLinkHook: (url, attrs) => {
2980
2967
  const res = host.loaderHook.lifecycle.createLink.emit({
2981
2968
  url,
2982
- attrs
2969
+ attrs,
2970
+ remoteInfo
2983
2971
  });
2984
2972
  if (res instanceof HTMLLinkElement) return res;
2985
2973
  }
@@ -3000,7 +2988,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
3000
2988
  createLinkHook: (url, attrs) => {
3001
2989
  const res = host.loaderHook.lifecycle.createLink.emit({
3002
2990
  url,
3003
- attrs
2991
+ attrs,
2992
+ remoteInfo
3004
2993
  });
3005
2994
  if (res instanceof HTMLLinkElement) return res;
3006
2995
  },
@@ -3023,7 +3012,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
3023
3012
  createLinkHook: (url, attrs) => {
3024
3013
  const res = host.loaderHook.lifecycle.createLink.emit({
3025
3014
  url,
3026
- attrs
3015
+ attrs,
3016
+ remoteInfo
3027
3017
  });
3028
3018
  if (res instanceof HTMLLinkElement) return res;
3029
3019
  }
@@ -3044,7 +3034,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
3044
3034
  createScriptHook: (url, attrs) => {
3045
3035
  const res = host.loaderHook.lifecycle.createScript.emit({
3046
3036
  url,
3047
- attrs
3037
+ attrs,
3038
+ remoteInfo
3048
3039
  });
3049
3040
  if (res instanceof HTMLScriptElement) return res;
3050
3041
  },
@@ -3671,7 +3662,7 @@ var SnapshotHandler = class {
3671
3662
  let manifestJson = this.manifestCache.get(manifestUrl);
3672
3663
  if (manifestJson) return manifestJson;
3673
3664
  try {
3674
- let res = await this.loaderHook.lifecycle.fetch.emit(manifestUrl, {});
3665
+ let res = await this.loaderHook.lifecycle.fetch.emit(manifestUrl, {}, getRemoteInfo(moduleInfo));
3675
3666
  if (!res || !(res instanceof Response)) res = await fetch(manifestUrl, {});
3676
3667
  manifestJson = await res.json();
3677
3668
  } catch (err) {
@@ -4296,7 +4287,7 @@ var ModuleFederation = class {
4296
4287
  beforeInitContainer: new AsyncWaterfallHook("beforeInitContainer"),
4297
4288
  initContainer: new AsyncWaterfallHook("initContainer")
4298
4289
  });
4299
- this.version = "2.3.0";
4290
+ this.version = "2.4.0";
4300
4291
  this.moduleCache = /* @__PURE__ */ new Map();
4301
4292
  this.loaderHook = new PluginSystem({
4302
4293
  getModuleInfo: new SyncHook(),
@@ -4387,7 +4378,8 @@ var ModuleFederation = class {
4387
4378
  ...userOptions,
4388
4379
  plugins,
4389
4380
  remotes,
4390
- shared: allShareInfos
4381
+ shared: allShareInfos,
4382
+ id: userOptionsRes.id || globalOptions.id
4391
4383
  };
4392
4384
  this.hooks.lifecycle.init.emit({
4393
4385
  origin: this,
@@ -4416,17 +4408,31 @@ var ModuleFederation = class {
4416
4408
 
4417
4409
  // node_modules/@module-federation/runtime/dist/index.js
4418
4410
  function createInstance(options) {
4419
- const instance = new (getGlobalFederationConstructor() || ModuleFederation)(options);
4411
+ const instance = new (getGlobalFederationConstructor() || ModuleFederation)({
4412
+ id: `${options.name}@${options.version || Date.now()}`,
4413
+ ...options
4414
+ });
4420
4415
  setGlobalFederationInstance(instance);
4421
4416
  return instance;
4422
4417
  }
4418
+ var FederationInstance = null;
4419
+ function getInstance() {
4420
+ return FederationInstance;
4421
+ }
4423
4422
  setGlobalFederationConstructor(ModuleFederation);
4424
4423
 
4425
4424
  // libs/embed-libs/shared-embed/src/lib/helpers/remote-federation.ts
4426
- var federationRuntime = createInstance({
4427
- name: "luzmo-embed-runtime",
4428
- remotes: []
4429
- });
4425
+ var resolvedFederationRuntime = null;
4426
+ function getFederationRuntime() {
4427
+ if (resolvedFederationRuntime) {
4428
+ return resolvedFederationRuntime;
4429
+ }
4430
+ resolvedFederationRuntime = getInstance() ?? createInstance({
4431
+ name: "luzmo-embed-runtime",
4432
+ remotes: []
4433
+ });
4434
+ return resolvedFederationRuntime;
4435
+ }
4430
4436
  var remoteCache = /* @__PURE__ */ new Map();
4431
4437
  var remoteCounter = 0;
4432
4438
  var preconnectedOrigins = /* @__PURE__ */ new Set();
@@ -4491,8 +4497,9 @@ function loadLibrary(appServer, componentName = "DashboardApp") {
4491
4497
  if (remote.loadPromise) {
4492
4498
  return remote.loadPromise;
4493
4499
  }
4500
+ const runtime = getFederationRuntime();
4494
4501
  if (!remote.registered) {
4495
- federationRuntime.registerRemotes([
4502
+ runtime.registerRemotes([
4496
4503
  {
4497
4504
  name: remote.remoteName,
4498
4505
  entry: remote.entry
@@ -4500,7 +4507,7 @@ function loadLibrary(appServer, componentName = "DashboardApp") {
4500
4507
  ]);
4501
4508
  remote.registered = true;
4502
4509
  }
4503
- remote.loadPromise = federationRuntime.loadRemote(`${remote.remoteName}/${componentName}`).then((module2) => {
4510
+ remote.loadPromise = runtime.loadRemote(`${remote.remoteName}/${componentName}`).then((module2) => {
4504
4511
  if (!module2) {
4505
4512
  throw new Error(`Failed to load "${componentName}" from "${remote.entry}".`);
4506
4513
  }
@@ -4793,94 +4800,95 @@ y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProper
4793
4800
 
4794
4801
  // node_modules/lit-html/lit-html.js
4795
4802
  var t2 = globalThis;
4796
- var i3 = t2.trustedTypes;
4797
- var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t4) => t4 }) : void 0;
4798
- var e3 = "$lit$";
4799
- var h2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
4800
- var o3 = "?" + h2;
4801
- var n3 = `<${o3}>`;
4802
- var r3 = document;
4803
- var l2 = () => r3.createComment("");
4804
- var c3 = (t4) => null === t4 || "object" != typeof t4 && "function" != typeof t4;
4805
- var a2 = Array.isArray;
4806
- var u2 = (t4) => a2(t4) || "function" == typeof t4?.[Symbol.iterator];
4807
- var d2 = "[ \n\f\r]";
4808
- var f2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
4809
- var v = /-->/g;
4810
- var _ = />/g;
4811
- var m = RegExp(`>|${d2}(?:([^\\s"'>=/]+)(${d2}*=${d2}*(?:[^
4803
+ var i3 = (t4) => t4;
4804
+ var s2 = t2.trustedTypes;
4805
+ var e3 = s2 ? s2.createPolicy("lit-html", { createHTML: (t4) => t4 }) : void 0;
4806
+ var h2 = "$lit$";
4807
+ var o3 = `lit$${Math.random().toFixed(9).slice(2)}$`;
4808
+ var n3 = "?" + o3;
4809
+ var r3 = `<${n3}>`;
4810
+ var l2 = document;
4811
+ var c3 = () => l2.createComment("");
4812
+ var a2 = (t4) => null === t4 || "object" != typeof t4 && "function" != typeof t4;
4813
+ var u2 = Array.isArray;
4814
+ var d2 = (t4) => u2(t4) || "function" == typeof t4?.[Symbol.iterator];
4815
+ var f2 = "[ \n\f\r]";
4816
+ var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
4817
+ var _ = /-->/g;
4818
+ var m = />/g;
4819
+ var p2 = RegExp(`>|${f2}(?:([^\\s"'>=/]+)(${f2}*=${f2}*(?:[^
4812
4820
  \f\r"'\`<>=]|("|')|))|$)`, "g");
4813
- var p2 = /'/g;
4814
- var g = /"/g;
4815
- var $ = /^(?:script|style|textarea|title)$/i;
4816
- var y2 = (t4) => (i7, ...s4) => ({ _$litType$: t4, strings: i7, values: s4 });
4817
- var x = y2(1);
4818
- var b2 = y2(2);
4819
- var w = y2(3);
4820
- var T = /* @__PURE__ */ Symbol.for("lit-noChange");
4821
- var E = /* @__PURE__ */ Symbol.for("lit-nothing");
4822
- var A = /* @__PURE__ */ new WeakMap();
4823
- var C = r3.createTreeWalker(r3, 129);
4824
- function P(t4, i7) {
4825
- if (!a2(t4) || !t4.hasOwnProperty("raw")) throw Error("invalid template strings array");
4826
- return void 0 !== s2 ? s2.createHTML(i7) : i7;
4827
- }
4828
- var V = (t4, i7) => {
4829
- const s4 = t4.length - 1, o7 = [];
4830
- let r6, l3 = 2 === i7 ? "<svg>" : 3 === i7 ? "<math>" : "", c4 = f2;
4821
+ var g = /'/g;
4822
+ var $ = /"/g;
4823
+ var y2 = /^(?:script|style|textarea|title)$/i;
4824
+ var x = (t4) => (i7, ...s4) => ({ _$litType$: t4, strings: i7, values: s4 });
4825
+ var b2 = x(1);
4826
+ var w = x(2);
4827
+ var T = x(3);
4828
+ var E = /* @__PURE__ */ Symbol.for("lit-noChange");
4829
+ var A = /* @__PURE__ */ Symbol.for("lit-nothing");
4830
+ var C = /* @__PURE__ */ new WeakMap();
4831
+ var P = l2.createTreeWalker(l2, 129);
4832
+ function V(t4, i7) {
4833
+ if (!u2(t4) || !t4.hasOwnProperty("raw")) throw Error("invalid template strings array");
4834
+ return void 0 !== e3 ? e3.createHTML(i7) : i7;
4835
+ }
4836
+ var N = (t4, i7) => {
4837
+ const s4 = t4.length - 1, e7 = [];
4838
+ let n6, l3 = 2 === i7 ? "<svg>" : 3 === i7 ? "<math>" : "", c4 = v;
4831
4839
  for (let i8 = 0; i8 < s4; i8++) {
4832
4840
  const s5 = t4[i8];
4833
- let a3, u3, d3 = -1, y3 = 0;
4834
- for (; y3 < s5.length && (c4.lastIndex = y3, u3 = c4.exec(s5), null !== u3); ) y3 = c4.lastIndex, c4 === f2 ? "!--" === u3[1] ? c4 = v : void 0 !== u3[1] ? c4 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r6 = RegExp("</" + u3[2], "g")), c4 = m) : void 0 !== u3[3] && (c4 = m) : c4 === m ? ">" === u3[0] ? (c4 = r6 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c4 === g || c4 === p2 ? c4 = m : c4 === v || c4 === _ ? c4 = f2 : (c4 = m, r6 = void 0);
4835
- const x2 = c4 === m && t4[i8 + 1].startsWith("/>") ? " " : "";
4836
- l3 += c4 === f2 ? s5 + n3 : d3 >= 0 ? (o7.push(a3), s5.slice(0, d3) + e3 + s5.slice(d3) + h2 + x2) : s5 + h2 + (-2 === d3 ? i8 : x2);
4841
+ let a3, u3, d3 = -1, f3 = 0;
4842
+ for (; f3 < s5.length && (c4.lastIndex = f3, u3 = c4.exec(s5), null !== u3); ) f3 = c4.lastIndex, c4 === v ? "!--" === u3[1] ? c4 = _ : void 0 !== u3[1] ? c4 = m : void 0 !== u3[2] ? (y2.test(u3[2]) && (n6 = RegExp("</" + u3[2], "g")), c4 = p2) : void 0 !== u3[3] && (c4 = p2) : c4 === p2 ? ">" === u3[0] ? (c4 = n6 ?? v, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? p2 : '"' === u3[3] ? $ : g) : c4 === $ || c4 === g ? c4 = p2 : c4 === _ || c4 === m ? c4 = v : (c4 = p2, n6 = void 0);
4843
+ const x2 = c4 === p2 && t4[i8 + 1].startsWith("/>") ? " " : "";
4844
+ l3 += c4 === v ? s5 + r3 : d3 >= 0 ? (e7.push(a3), s5.slice(0, d3) + h2 + s5.slice(d3) + o3 + x2) : s5 + o3 + (-2 === d3 ? i8 : x2);
4837
4845
  }
4838
- return [P(t4, l3 + (t4[s4] || "<?>") + (2 === i7 ? "</svg>" : 3 === i7 ? "</math>" : "")), o7];
4846
+ return [V(t4, l3 + (t4[s4] || "<?>") + (2 === i7 ? "</svg>" : 3 === i7 ? "</math>" : "")), e7];
4839
4847
  };
4840
- var N = class _N {
4841
- constructor({ strings: t4, _$litType$: s4 }, n6) {
4848
+ var S2 = class _S {
4849
+ constructor({ strings: t4, _$litType$: i7 }, e7) {
4842
4850
  let r6;
4843
4851
  this.parts = [];
4844
- let c4 = 0, a3 = 0;
4845
- const u3 = t4.length - 1, d3 = this.parts, [f3, v2] = V(t4, s4);
4846
- if (this.el = _N.createElement(f3, n6), C.currentNode = this.el.content, 2 === s4 || 3 === s4) {
4852
+ let l3 = 0, a3 = 0;
4853
+ const u3 = t4.length - 1, d3 = this.parts, [f3, v2] = N(t4, i7);
4854
+ if (this.el = _S.createElement(f3, e7), P.currentNode = this.el.content, 2 === i7 || 3 === i7) {
4847
4855
  const t5 = this.el.content.firstChild;
4848
4856
  t5.replaceWith(...t5.childNodes);
4849
4857
  }
4850
- for (; null !== (r6 = C.nextNode()) && d3.length < u3; ) {
4858
+ for (; null !== (r6 = P.nextNode()) && d3.length < u3; ) {
4851
4859
  if (1 === r6.nodeType) {
4852
- if (r6.hasAttributes()) for (const t5 of r6.getAttributeNames()) if (t5.endsWith(e3)) {
4853
- const i7 = v2[a3++], s5 = r6.getAttribute(t5).split(h2), e7 = /([.?@])?(.*)/.exec(i7);
4854
- d3.push({ type: 1, index: c4, name: e7[2], strings: s5, ctor: "." === e7[1] ? H : "?" === e7[1] ? I : "@" === e7[1] ? L : k }), r6.removeAttribute(t5);
4855
- } else t5.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r6.removeAttribute(t5));
4856
- if ($.test(r6.tagName)) {
4857
- const t5 = r6.textContent.split(h2), s5 = t5.length - 1;
4858
- if (s5 > 0) {
4859
- r6.textContent = i3 ? i3.emptyScript : "";
4860
- for (let i7 = 0; i7 < s5; i7++) r6.append(t5[i7], l2()), C.nextNode(), d3.push({ type: 2, index: ++c4 });
4861
- r6.append(t5[s5], l2());
4860
+ if (r6.hasAttributes()) for (const t5 of r6.getAttributeNames()) if (t5.endsWith(h2)) {
4861
+ const i8 = v2[a3++], s4 = r6.getAttribute(t5).split(o3), e8 = /([.?@])?(.*)/.exec(i8);
4862
+ d3.push({ type: 1, index: l3, name: e8[2], strings: s4, ctor: "." === e8[1] ? I : "?" === e8[1] ? L : "@" === e8[1] ? z : H }), r6.removeAttribute(t5);
4863
+ } else t5.startsWith(o3) && (d3.push({ type: 6, index: l3 }), r6.removeAttribute(t5));
4864
+ if (y2.test(r6.tagName)) {
4865
+ const t5 = r6.textContent.split(o3), i8 = t5.length - 1;
4866
+ if (i8 > 0) {
4867
+ r6.textContent = s2 ? s2.emptyScript : "";
4868
+ for (let s4 = 0; s4 < i8; s4++) r6.append(t5[s4], c3()), P.nextNode(), d3.push({ type: 2, index: ++l3 });
4869
+ r6.append(t5[i8], c3());
4862
4870
  }
4863
4871
  }
4864
- } else if (8 === r6.nodeType) if (r6.data === o3) d3.push({ type: 2, index: c4 });
4872
+ } else if (8 === r6.nodeType) if (r6.data === n3) d3.push({ type: 2, index: l3 });
4865
4873
  else {
4866
4874
  let t5 = -1;
4867
- for (; -1 !== (t5 = r6.data.indexOf(h2, t5 + 1)); ) d3.push({ type: 7, index: c4 }), t5 += h2.length - 1;
4875
+ for (; -1 !== (t5 = r6.data.indexOf(o3, t5 + 1)); ) d3.push({ type: 7, index: l3 }), t5 += o3.length - 1;
4868
4876
  }
4869
- c4++;
4877
+ l3++;
4870
4878
  }
4871
4879
  }
4872
4880
  static createElement(t4, i7) {
4873
- const s4 = r3.createElement("template");
4881
+ const s4 = l2.createElement("template");
4874
4882
  return s4.innerHTML = t4, s4;
4875
4883
  }
4876
4884
  };
4877
- function S2(t4, i7, s4 = t4, e7) {
4878
- if (i7 === T) return i7;
4885
+ function M(t4, i7, s4 = t4, e7) {
4886
+ if (i7 === E) return i7;
4879
4887
  let h3 = void 0 !== e7 ? s4._$Co?.[e7] : s4._$Cl;
4880
- const o7 = c3(i7) ? void 0 : i7._$litDirective$;
4881
- return h3?.constructor !== o7 && (h3?._$AO?.(false), void 0 === o7 ? h3 = void 0 : (h3 = new o7(t4), h3._$AT(t4, s4, e7)), void 0 !== e7 ? (s4._$Co ??= [])[e7] = h3 : s4._$Cl = h3), void 0 !== h3 && (i7 = S2(t4, h3._$AS(t4, i7.values), h3, e7)), i7;
4888
+ const o7 = a2(i7) ? void 0 : i7._$litDirective$;
4889
+ return h3?.constructor !== o7 && (h3?._$AO?.(false), void 0 === o7 ? h3 = void 0 : (h3 = new o7(t4), h3._$AT(t4, s4, e7)), void 0 !== e7 ? (s4._$Co ??= [])[e7] = h3 : s4._$Cl = h3), void 0 !== h3 && (i7 = M(t4, h3._$AS(t4, i7.values), h3, e7)), i7;
4882
4890
  }
4883
- var M = class {
4891
+ var R = class {
4884
4892
  constructor(t4, i7) {
4885
4893
  this._$AV = [], this._$AN = void 0, this._$AD = t4, this._$AM = i7;
4886
4894
  }
@@ -4891,29 +4899,29 @@ var M = class {
4891
4899
  return this._$AM._$AU;
4892
4900
  }
4893
4901
  u(t4) {
4894
- const { el: { content: i7 }, parts: s4 } = this._$AD, e7 = (t4?.creationScope ?? r3).importNode(i7, true);
4895
- C.currentNode = e7;
4896
- let h3 = C.nextNode(), o7 = 0, n6 = 0, l3 = s4[0];
4897
- for (; void 0 !== l3; ) {
4898
- if (o7 === l3.index) {
4902
+ const { el: { content: i7 }, parts: s4 } = this._$AD, e7 = (t4?.creationScope ?? l2).importNode(i7, true);
4903
+ P.currentNode = e7;
4904
+ let h3 = P.nextNode(), o7 = 0, n6 = 0, r6 = s4[0];
4905
+ for (; void 0 !== r6; ) {
4906
+ if (o7 === r6.index) {
4899
4907
  let i8;
4900
- 2 === l3.type ? i8 = new R(h3, h3.nextSibling, this, t4) : 1 === l3.type ? i8 = new l3.ctor(h3, l3.name, l3.strings, this, t4) : 6 === l3.type && (i8 = new z(h3, this, t4)), this._$AV.push(i8), l3 = s4[++n6];
4908
+ 2 === r6.type ? i8 = new k(h3, h3.nextSibling, this, t4) : 1 === r6.type ? i8 = new r6.ctor(h3, r6.name, r6.strings, this, t4) : 6 === r6.type && (i8 = new Z(h3, this, t4)), this._$AV.push(i8), r6 = s4[++n6];
4901
4909
  }
4902
- o7 !== l3?.index && (h3 = C.nextNode(), o7++);
4910
+ o7 !== r6?.index && (h3 = P.nextNode(), o7++);
4903
4911
  }
4904
- return C.currentNode = r3, e7;
4912
+ return P.currentNode = l2, e7;
4905
4913
  }
4906
4914
  p(t4) {
4907
4915
  let i7 = 0;
4908
4916
  for (const s4 of this._$AV) void 0 !== s4 && (void 0 !== s4.strings ? (s4._$AI(t4, s4, i7), i7 += s4.strings.length - 2) : s4._$AI(t4[i7])), i7++;
4909
4917
  }
4910
4918
  };
4911
- var R = class _R {
4919
+ var k = class _k {
4912
4920
  get _$AU() {
4913
4921
  return this._$AM?._$AU ?? this._$Cv;
4914
4922
  }
4915
4923
  constructor(t4, i7, s4, e7) {
4916
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t4, this._$AB = i7, this._$AM = s4, this.options = e7, this._$Cv = e7?.isConnected ?? true;
4924
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t4, this._$AB = i7, this._$AM = s4, this.options = e7, this._$Cv = e7?.isConnected ?? true;
4917
4925
  }
4918
4926
  get parentNode() {
4919
4927
  let t4 = this._$AA.parentNode;
@@ -4927,7 +4935,7 @@ var R = class _R {
4927
4935
  return this._$AB;
4928
4936
  }
4929
4937
  _$AI(t4, i7 = this) {
4930
- t4 = S2(this, t4, i7), c3(t4) ? t4 === E || null == t4 || "" === t4 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t4 !== this._$AH && t4 !== T && this._(t4) : void 0 !== t4._$litType$ ? this.$(t4) : void 0 !== t4.nodeType ? this.T(t4) : u2(t4) ? this.k(t4) : this._(t4);
4938
+ t4 = M(this, t4, i7), a2(t4) ? t4 === A || null == t4 || "" === t4 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t4 !== this._$AH && t4 !== E && this._(t4) : void 0 !== t4._$litType$ ? this.$(t4) : void 0 !== t4.nodeType ? this.T(t4) : d2(t4) ? this.k(t4) : this._(t4);
4931
4939
  }
4932
4940
  O(t4) {
4933
4941
  return this._$AA.parentNode.insertBefore(t4, this._$AB);
@@ -4936,38 +4944,38 @@ var R = class _R {
4936
4944
  this._$AH !== t4 && (this._$AR(), this._$AH = this.O(t4));
4937
4945
  }
4938
4946
  _(t4) {
4939
- this._$AH !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t4 : this.T(r3.createTextNode(t4)), this._$AH = t4;
4947
+ this._$AH !== A && a2(this._$AH) ? this._$AA.nextSibling.data = t4 : this.T(l2.createTextNode(t4)), this._$AH = t4;
4940
4948
  }
4941
4949
  $(t4) {
4942
- const { values: i7, _$litType$: s4 } = t4, e7 = "number" == typeof s4 ? this._$AC(t4) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4);
4950
+ const { values: i7, _$litType$: s4 } = t4, e7 = "number" == typeof s4 ? this._$AC(t4) : (void 0 === s4.el && (s4.el = S2.createElement(V(s4.h, s4.h[0]), this.options)), s4);
4943
4951
  if (this._$AH?._$AD === e7) this._$AH.p(i7);
4944
4952
  else {
4945
- const t5 = new M(e7, this), s5 = t5.u(this.options);
4953
+ const t5 = new R(e7, this), s5 = t5.u(this.options);
4946
4954
  t5.p(i7), this.T(s5), this._$AH = t5;
4947
4955
  }
4948
4956
  }
4949
4957
  _$AC(t4) {
4950
- let i7 = A.get(t4.strings);
4951
- return void 0 === i7 && A.set(t4.strings, i7 = new N(t4)), i7;
4958
+ let i7 = C.get(t4.strings);
4959
+ return void 0 === i7 && C.set(t4.strings, i7 = new S2(t4)), i7;
4952
4960
  }
4953
4961
  k(t4) {
4954
- a2(this._$AH) || (this._$AH = [], this._$AR());
4962
+ u2(this._$AH) || (this._$AH = [], this._$AR());
4955
4963
  const i7 = this._$AH;
4956
4964
  let s4, e7 = 0;
4957
- for (const h3 of t4) e7 === i7.length ? i7.push(s4 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s4 = i7[e7], s4._$AI(h3), e7++;
4965
+ for (const h3 of t4) e7 === i7.length ? i7.push(s4 = new _k(this.O(c3()), this.O(c3()), this, this.options)) : s4 = i7[e7], s4._$AI(h3), e7++;
4958
4966
  e7 < i7.length && (this._$AR(s4 && s4._$AB.nextSibling, e7), i7.length = e7);
4959
4967
  }
4960
- _$AR(t4 = this._$AA.nextSibling, i7) {
4961
- for (this._$AP?.(false, true, i7); t4 !== this._$AB; ) {
4962
- const i8 = t4.nextSibling;
4963
- t4.remove(), t4 = i8;
4968
+ _$AR(t4 = this._$AA.nextSibling, s4) {
4969
+ for (this._$AP?.(false, true, s4); t4 !== this._$AB; ) {
4970
+ const s5 = i3(t4).nextSibling;
4971
+ i3(t4).remove(), t4 = s5;
4964
4972
  }
4965
4973
  }
4966
4974
  setConnected(t4) {
4967
4975
  void 0 === this._$AM && (this._$Cv = t4, this._$AP?.(t4));
4968
4976
  }
4969
4977
  };
4970
- var k = class {
4978
+ var H = class {
4971
4979
  get tagName() {
4972
4980
  return this.element.tagName;
4973
4981
  }
@@ -4975,53 +4983,53 @@ var k = class {
4975
4983
  return this._$AM._$AU;
4976
4984
  }
4977
4985
  constructor(t4, i7, s4, e7, h3) {
4978
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t4, this.name = i7, this._$AM = e7, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E;
4986
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t4, this.name = i7, this._$AM = e7, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = A;
4979
4987
  }
4980
4988
  _$AI(t4, i7 = this, s4, e7) {
4981
4989
  const h3 = this.strings;
4982
4990
  let o7 = false;
4983
- if (void 0 === h3) t4 = S2(this, t4, i7, 0), o7 = !c3(t4) || t4 !== this._$AH && t4 !== T, o7 && (this._$AH = t4);
4991
+ if (void 0 === h3) t4 = M(this, t4, i7, 0), o7 = !a2(t4) || t4 !== this._$AH && t4 !== E, o7 && (this._$AH = t4);
4984
4992
  else {
4985
4993
  const e8 = t4;
4986
4994
  let n6, r6;
4987
- for (t4 = h3[0], n6 = 0; n6 < h3.length - 1; n6++) r6 = S2(this, e8[s4 + n6], i7, n6), r6 === T && (r6 = this._$AH[n6]), o7 ||= !c3(r6) || r6 !== this._$AH[n6], r6 === E ? t4 = E : t4 !== E && (t4 += (r6 ?? "") + h3[n6 + 1]), this._$AH[n6] = r6;
4995
+ for (t4 = h3[0], n6 = 0; n6 < h3.length - 1; n6++) r6 = M(this, e8[s4 + n6], i7, n6), r6 === E && (r6 = this._$AH[n6]), o7 ||= !a2(r6) || r6 !== this._$AH[n6], r6 === A ? t4 = A : t4 !== A && (t4 += (r6 ?? "") + h3[n6 + 1]), this._$AH[n6] = r6;
4988
4996
  }
4989
4997
  o7 && !e7 && this.j(t4);
4990
4998
  }
4991
4999
  j(t4) {
4992
- t4 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t4 ?? "");
5000
+ t4 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t4 ?? "");
4993
5001
  }
4994
5002
  };
4995
- var H = class extends k {
5003
+ var I = class extends H {
4996
5004
  constructor() {
4997
5005
  super(...arguments), this.type = 3;
4998
5006
  }
4999
5007
  j(t4) {
5000
- this.element[this.name] = t4 === E ? void 0 : t4;
5008
+ this.element[this.name] = t4 === A ? void 0 : t4;
5001
5009
  }
5002
5010
  };
5003
- var I = class extends k {
5011
+ var L = class extends H {
5004
5012
  constructor() {
5005
5013
  super(...arguments), this.type = 4;
5006
5014
  }
5007
5015
  j(t4) {
5008
- this.element.toggleAttribute(this.name, !!t4 && t4 !== E);
5016
+ this.element.toggleAttribute(this.name, !!t4 && t4 !== A);
5009
5017
  }
5010
5018
  };
5011
- var L = class extends k {
5019
+ var z = class extends H {
5012
5020
  constructor(t4, i7, s4, e7, h3) {
5013
5021
  super(t4, i7, s4, e7, h3), this.type = 5;
5014
5022
  }
5015
5023
  _$AI(t4, i7 = this) {
5016
- if ((t4 = S2(this, t4, i7, 0) ?? E) === T) return;
5017
- const s4 = this._$AH, e7 = t4 === E && s4 !== E || t4.capture !== s4.capture || t4.once !== s4.once || t4.passive !== s4.passive, h3 = t4 !== E && (s4 === E || e7);
5024
+ if ((t4 = M(this, t4, i7, 0) ?? A) === E) return;
5025
+ const s4 = this._$AH, e7 = t4 === A && s4 !== A || t4.capture !== s4.capture || t4.once !== s4.once || t4.passive !== s4.passive, h3 = t4 !== A && (s4 === A || e7);
5018
5026
  e7 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t4), this._$AH = t4;
5019
5027
  }
5020
5028
  handleEvent(t4) {
5021
5029
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t4) : this._$AH.handleEvent(t4);
5022
5030
  }
5023
5031
  };
5024
- var z = class {
5032
+ var Z = class {
5025
5033
  constructor(t4, i7, s4) {
5026
5034
  this.element = t4, this.type = 6, this._$AN = void 0, this._$AM = i7, this.options = s4;
5027
5035
  }
@@ -5029,17 +5037,17 @@ var z = class {
5029
5037
  return this._$AM._$AU;
5030
5038
  }
5031
5039
  _$AI(t4) {
5032
- S2(this, t4);
5040
+ M(this, t4);
5033
5041
  }
5034
5042
  };
5035
- var j = t2.litHtmlPolyfillSupport;
5036
- j?.(N, R), (t2.litHtmlVersions ??= []).push("3.3.1");
5037
- var B = (t4, i7, s4) => {
5043
+ var B = t2.litHtmlPolyfillSupport;
5044
+ B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2");
5045
+ var D = (t4, i7, s4) => {
5038
5046
  const e7 = s4?.renderBefore ?? i7;
5039
5047
  let h3 = e7._$litPart$;
5040
5048
  if (void 0 === h3) {
5041
5049
  const t5 = s4?.renderBefore ?? null;
5042
- e7._$litPart$ = h3 = new R(i7.insertBefore(l2(), t5), t5, void 0, s4 ?? {});
5050
+ e7._$litPart$ = h3 = new k(i7.insertBefore(c3(), t5), t5, void 0, s4 ?? {});
5043
5051
  }
5044
5052
  return h3._$AI(t4), h3;
5045
5053
  };
@@ -5056,7 +5064,7 @@ var i4 = class extends y {
5056
5064
  }
5057
5065
  update(t4) {
5058
5066
  const r6 = this.render();
5059
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t4), this._$Do = B(r6, this.renderRoot, this.renderOptions);
5067
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t4), this._$Do = D(r6, this.renderRoot, this.renderOptions);
5060
5068
  }
5061
5069
  connectedCallback() {
5062
5070
  super.connectedCallback(), this._$Do?.setConnected(true);
@@ -5065,7 +5073,7 @@ var i4 = class extends y {
5065
5073
  super.disconnectedCallback(), this._$Do?.setConnected(false);
5066
5074
  }
5067
5075
  render() {
5068
- return T;
5076
+ return E;
5069
5077
  }
5070
5078
  };
5071
5079
  i4._$litElement$ = true, i4["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i4 });
@@ -5163,10 +5171,10 @@ var o6 = e6(class extends i5 {
5163
5171
  if (super(t4), t4.type !== t3.ATTRIBUTE || "style" !== t4.name || t4.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
5164
5172
  }
5165
5173
  render(t4) {
5166
- return Object.keys(t4).reduce(((e7, r6) => {
5174
+ return Object.keys(t4).reduce((e7, r6) => {
5167
5175
  const s4 = t4[r6];
5168
5176
  return null == s4 ? e7 : e7 + `${r6 = r6.includes("-") ? r6 : r6.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s4};`;
5169
- }), "");
5177
+ }, "");
5170
5178
  }
5171
5179
  update(e7, [r6]) {
5172
5180
  const { style: s4 } = e7.element;
@@ -5180,12 +5188,12 @@ var o6 = e6(class extends i5 {
5180
5188
  t4.includes("-") || r7 ? s4.setProperty(t4, r7 ? e8.slice(0, -11) : e8, r7 ? n5 : "") : s4[t4] = e8;
5181
5189
  }
5182
5190
  }
5183
- return T;
5191
+ return E;
5184
5192
  }
5185
5193
  });
5186
5194
 
5187
5195
  // libs/embed-libs/embed/package.json
5188
- var version = "6.13.0";
5196
+ var version = "6.13.2";
5189
5197
 
5190
5198
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
5191
5199
  var LuzmoDashboardService = class {
@@ -5599,22 +5607,25 @@ var LuzmoDashboard = class extends i4 {
5599
5607
  loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
5600
5608
  this.isLibraryLoaded = true;
5601
5609
  await this.updateComplete;
5602
- const oldReference = this.renderRoot.querySelector("dashboard-component");
5603
- this.dashboardReference = oldReference.cloneNode(true);
5604
- oldReference.replaceWith(this.dashboardReference);
5605
- this.dashboardReference.addEventListener("load", (payload) => {
5606
- this.containerWidth = this.dashboardReference.offsetWidth;
5610
+ const el = document.createElement("dashboard-component");
5611
+ this.setAllAttributesOnElement(el);
5612
+ el.addEventListener("load", (payload) => {
5613
+ this.containerWidth = el.offsetWidth;
5607
5614
  this.dimensions = payload.detail.dimensions;
5608
5615
  _setCalculatedDimensions(this);
5609
5616
  window.dispatchEvent(new Event("resize"));
5610
5617
  this.dispatchEvent(new CustomEvent("load", payload));
5611
5618
  });
5612
- this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
5613
- this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
5614
- this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
5615
- this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
5616
- this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
5617
- this.setAllAttributes();
5619
+ el.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
5620
+ el.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
5621
+ el.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
5622
+ el.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
5623
+ el.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
5624
+ const container = this.renderRoot.querySelector("#dashboard-wc-container");
5625
+ if (container) {
5626
+ container.append(el);
5627
+ this.dashboardReference = el;
5628
+ }
5618
5629
  });
5619
5630
  } else {
5620
5631
  this.containerWidth = this.container?.clientWidth;
@@ -5632,24 +5643,36 @@ var LuzmoDashboard = class extends i4 {
5632
5643
  }
5633
5644
  setAllAttributes() {
5634
5645
  if (this.dashboardReference) {
5635
- for (const key in this.attributesMap) {
5636
- if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
5637
- this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
5638
- }
5639
- }
5640
- if (this.params.itemDimensions) {
5641
- this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
5642
- }
5643
- if (this.params.apiHost) {
5644
- this.dashboardReference.setAttribute("api-host", removeTrailingSlash(this.params.apiHost));
5645
- }
5646
- if (this.params.key) {
5647
- this.dashboardReference.setAttribute("auth-key", this.params.key);
5648
- }
5649
- if (this.params.token) {
5650
- this.dashboardReference.setAttribute("auth-token", this.params.token);
5646
+ this.setAllAttributesOnElement(this.dashboardReference);
5647
+ }
5648
+ }
5649
+ setAllAttributesOnElement(el) {
5650
+ if (!el) {
5651
+ return;
5652
+ }
5653
+ if (this.params.dashboardId) {
5654
+ el.setAttribute("dashboard-id", this.params.dashboardId);
5655
+ }
5656
+ if (this.params.appServer) {
5657
+ el.setAttribute("app-server", this.params.appServer);
5658
+ }
5659
+ if (this.params.apiHost) {
5660
+ el.setAttribute("api-host", removeTrailingSlash(this.params.apiHost));
5661
+ }
5662
+ for (const key in this.attributesMap) {
5663
+ if (!["authKey", "authToken", "apiHost", "itemDimensions", "dashboardId", "appServer"].includes(key) && this.params[key]) {
5664
+ el.setAttribute(this.attributesMap[key], this.params[key]);
5651
5665
  }
5652
5666
  }
5667
+ if (this.params.itemDimensions) {
5668
+ el.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
5669
+ }
5670
+ if (this.params.key) {
5671
+ el.setAttribute("auth-key", this.params.key);
5672
+ }
5673
+ if (this.params.token) {
5674
+ el.setAttribute("auth-token", this.params.token);
5675
+ }
5653
5676
  }
5654
5677
  // Reload dashboard when triggerproperty changes
5655
5678
  updated(changedProperties) {
@@ -5849,7 +5872,7 @@ var LuzmoDashboard = class extends i4 {
5849
5872
  }
5850
5873
  render() {
5851
5874
  let toBeRenderedHTML;
5852
- const loader = x`
5875
+ const loader = b2`
5853
5876
  <div
5854
5877
  class="luzmo-container-loader"
5855
5878
  id="luzmo-container-loader-${this._containerId}"
@@ -5872,7 +5895,7 @@ var LuzmoDashboard = class extends i4 {
5872
5895
  this._loadingCircleStyle
5873
5896
  )}
5874
5897
  ></div>
5875
- ${this._itemEmbedding ? "" : x`
5898
+ ${this._itemEmbedding ? "" : b2`
5876
5899
  <div
5877
5900
  class="luzmo-loading-message"
5878
5901
  style=${o6({ color: this.loaderFontColor })}
@@ -5885,19 +5908,18 @@ var LuzmoDashboard = class extends i4 {
5885
5908
  </div>
5886
5909
  `;
5887
5910
  if (this.isWebComponentViewMode()) {
5888
- toBeRenderedHTML = this.isLibraryLoaded ? x`
5889
- ${this.dashboardId || this.dashboardSlug ? x`
5890
- <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
5891
- api-host="${this.params.apiHost}"></dashboard-component>
5892
- ` : x`
5911
+ toBeRenderedHTML = this.isLibraryLoaded ? b2`
5912
+ ${this.dashboardId || this.dashboardSlug ? b2`
5913
+ <div id="dashboard-wc-container"></div>
5914
+ ` : b2`
5893
5915
  <div id="luzmo-error-${this._containerId}">
5894
5916
  <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
5895
5917
  </div>
5896
5918
  `}
5897
- ` : x`${loader}`;
5919
+ ` : b2`${loader}`;
5898
5920
  } else {
5899
- toBeRenderedHTML = x`
5900
- ${this.dashboardId || this.dashboardSlug ? x`
5921
+ toBeRenderedHTML = b2`
5922
+ ${this.dashboardId || this.dashboardSlug ? b2`
5901
5923
  ${loader}
5902
5924
  <iframe
5903
5925
  class="luzmo-embed-dashboard ${this.isWebComponentViewMode() ? "" : `luzmo-embed-dashboard-ede`}"
@@ -5907,15 +5929,15 @@ var LuzmoDashboard = class extends i4 {
5907
5929
  src="${this._iframeUrl}"
5908
5930
  frameborder="0"
5909
5931
  ></iframe>
5910
- ` : x`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
5911
- ${this.browserError ? x`
5932
+ ` : b2`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
5933
+ ${this.browserError ? b2`
5912
5934
  <div id="luzmo-error-${this._containerId}">
5913
5935
  <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
5914
5936
  </div>
5915
5937
  ` : ""}
5916
5938
  `;
5917
5939
  }
5918
- return x`
5940
+ return b2`
5919
5941
  <div class="${luzmoEmbedContainerClass} ${this.isWebComponentViewMode() ? "" : `${luzmoEmbedContainerClass}-ede`}">
5920
5942
  <div
5921
5943
  class="dashboard-container"
@@ -6225,7 +6247,7 @@ if (!customElements.get("luzmo-embed-dashboard")) {
6225
6247
  }
6226
6248
 
6227
6249
  // libs/dashboard-contents-types/src/lib/shared/version.ts
6228
- var CONTENTS_VERSION = "0.1.99";
6250
+ var CONTENTS_VERSION = "0.1.100";
6229
6251
 
6230
6252
  // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
6231
6253
  var dashboardContentsVersion = CONTENTS_VERSION;
@@ -6364,7 +6386,7 @@ var LuzmoBaseVizItem = class extends i4 {
6364
6386
  }
6365
6387
  }
6366
6388
  render() {
6367
- return x` `;
6389
+ return b2` `;
6368
6390
  }
6369
6391
  };
6370
6392
  __decorateClass([
@@ -6513,7 +6535,7 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
6513
6535
  }
6514
6536
  }
6515
6537
  render() {
6516
- return x``;
6538
+ return b2``;
6517
6539
  }
6518
6540
  connectedCallback() {
6519
6541
  super.connectedCallback();
@@ -6654,7 +6676,7 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
6654
6676
  }
6655
6677
  }
6656
6678
  render() {
6657
- return x` `;
6679
+ return b2` `;
6658
6680
  }
6659
6681
  };
6660
6682
  __decorateClass([
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "6.13.0",
3
+ "version": "6.13.2",
4
4
  "dependencies": {
5
5
  "lit": "^3.3.1",
6
- "@luzmo/shared-embed": "5.12.0"
6
+ "@luzmo/shared-embed": "5.12.1"
7
7
  },
8
8
  "keywords": [
9
9
  "es6",
@@ -71,6 +71,7 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
71
71
  firstUpdated(): void;
72
72
  initComponent(): void;
73
73
  setAllAttributes(): void;
74
+ setAllAttributesOnElement(el: LuzmoElement): void;
74
75
  updated(changedProperties: PropertyValues): void;
75
76
  _setOptions(): SharedLib.DashboardContentParams;
76
77
  _updateIframeUrl(): void;
@@ -9,7 +9,7 @@ import { LitElement, PropertyValues } from 'lit';
9
9
  * together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.js)
10
10
  * and if needed the migration will be applied on the dashboard app level.
11
11
  */
12
- export declare const dashboardContentsVersion = "0.1.99";
12
+ export declare const dashboardContentsVersion = "0.1.100";
13
13
  type FunctionCall = [(...args: any) => any, any[]];
14
14
  interface LuzmoVizItemComponentInterface extends HTMLElement {
15
15
  options?: VizItemOptions;