@luzmo/embed 5.0.13-beta.1 → 5.0.13

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.
@@ -42,8 +42,7 @@ var __decorateClass = (decorators, target, key, kind) => {
42
42
  // libs/embed-libs/embed/src/index.libs.ts
43
43
  var index_libs_exports = {};
44
44
  __export(index_libs_exports, {
45
- LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent,
46
- LuzmoVizItem: () => LuzmoVizItem
45
+ LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent
47
46
  });
48
47
  module.exports = __toCommonJS(index_libs_exports);
49
48
 
@@ -1486,19 +1485,6 @@ var _extendAndValidate = (dashboardContent) => {
1486
1485
  }
1487
1486
  };
1488
1487
 
1489
- // libs/embed-libs/shared-embed/src/lib/models/viz-item.model.ts
1490
- var libraryTypeToWebComponentTypeMapping = {
1491
- type: "type",
1492
- theme: "theme",
1493
- slots: "slots",
1494
- options: "options",
1495
- itemId: "chart-id",
1496
- appServer: "app-server",
1497
- apiHost: "api-host",
1498
- authKey: "auth-key",
1499
- authToken: "auth-token"
1500
- };
1501
-
1502
1488
  // libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
1503
1489
  var luzmoEmbedContainerClass = "luzmo-embed-container";
1504
1490
 
@@ -1566,16 +1552,6 @@ function __federationMethodWrapDefault(module2, need) {
1566
1552
  async function __federationMethodGetRemote(remoteName, componentName) {
1567
1553
  return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
1568
1554
  }
1569
- async function loadLibrary(appServer, componentName) {
1570
- if (remotesMap[appServer]) {
1571
- return remotesMap[appServer].module;
1572
- }
1573
- remotesMap[appServer] = { url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`, format: "esm", from: "vite", module: void 0 };
1574
- const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
1575
- const wrappedModule = __federationMethodWrapDefault(module2, true);
1576
- remotesMap[appServer].module = wrappedModule;
1577
- return wrappedModule;
1578
- }
1579
1555
 
1580
1556
  // node_modules/lit-html/lit-html.js
1581
1557
  var t3 = globalThis;
@@ -1926,7 +1902,7 @@ var o5 = e6(class extends i4 {
1926
1902
  });
1927
1903
 
1928
1904
  // libs/embed-libs/embed/package.json
1929
- var version = "5.0.13-beta.1";
1905
+ var version = "5.0.13";
1930
1906
 
1931
1907
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1932
1908
  var LuzmoService = class {
@@ -2963,81 +2939,6 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
2963
2939
  LuzmoDashboardWebComponent = __decorateClass([
2964
2940
  t("luzmo-dashboard-web-component")
2965
2941
  ], LuzmoDashboardWebComponent);
2966
-
2967
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
2968
- var LuzmoVizItem = class extends s3 {
2969
- constructor() {
2970
- super();
2971
- this.appServer = "http://localhost:4201";
2972
- this.apiHost = "https://api.luzmo.com";
2973
- this.slots = [];
2974
- this.options = {
2975
- title: {
2976
- en: ""
2977
- },
2978
- theme: "default"
2979
- };
2980
- }
2981
- firstUpdated(_changedProperties) {
2982
- super.firstUpdated(_changedProperties);
2983
- console.log(this.appServer);
2984
- loadLibrary(this.appServer, "DashboardApp").then((lib) => {
2985
- this.chartElement = document.createElement("chart-component");
2986
- this.chartElement.setAttribute("embedding-mode", "chart-embedding");
2987
- this.upadateVizItemProperties();
2988
- this.renderRoot.append(this.chartElement);
2989
- });
2990
- }
2991
- upadateVizItemProperties() {
2992
- if (this.chartElement) {
2993
- this.chartElement.setAttribute("app-server", this.appServer);
2994
- this.chartElement.setAttribute("api-host", this.apiHost);
2995
- for (const key in libraryTypeToWebComponentTypeMapping) {
2996
- if (this[key]) {
2997
- this.chartElement.setAttribute(
2998
- libraryTypeToWebComponentTypeMapping[key],
2999
- typeof this[key] === "object" ? JSON.stringify(this[key]) : this[key]
3000
- );
3001
- }
3002
- }
3003
- }
3004
- }
3005
- render() {
3006
- return x``;
3007
- }
3008
- };
3009
- // Static styles to set host display to block, else it is not shown at all for some reason.
3010
- LuzmoVizItem.styles = i`
3011
- :host {
3012
- display: block;
3013
- width: 100%;
3014
- height: 100%;
3015
- }
3016
- `;
3017
- __decorateClass([
3018
- n3()
3019
- ], LuzmoVizItem.prototype, "appServer", 2);
3020
- __decorateClass([
3021
- n3()
3022
- ], LuzmoVizItem.prototype, "apiHost", 2);
3023
- __decorateClass([
3024
- n3({ type: Array })
3025
- ], LuzmoVizItem.prototype, "slots", 2);
3026
- __decorateClass([
3027
- n3({ type: Object })
3028
- ], LuzmoVizItem.prototype, "options", 2);
3029
- __decorateClass([
3030
- n3()
3031
- ], LuzmoVizItem.prototype, "type", 2);
3032
- __decorateClass([
3033
- n3()
3034
- ], LuzmoVizItem.prototype, "authKey", 2);
3035
- __decorateClass([
3036
- n3()
3037
- ], LuzmoVizItem.prototype, "authToken", 2);
3038
- LuzmoVizItem = __decorateClass([
3039
- t("luzmo-embed-viz-item")
3040
- ], LuzmoVizItem);
3041
2942
  /*! Bundled license information:
3042
2943
 
3043
2944
  @lit/reactive-element/decorators/custom-element.js:
@@ -42,8 +42,7 @@ var __decorateClass = (decorators, target, key, kind) => {
42
42
  // libs/embed-libs/embed/src/index.ts
43
43
  var src_exports2 = {};
44
44
  __export(src_exports2, {
45
- LuzmoDashboard: () => LuzmoDashboard2,
46
- LuzmoVizItem: () => LuzmoVizItem
45
+ LuzmoDashboard: () => LuzmoDashboard2
47
46
  });
48
47
  module.exports = __toCommonJS(src_exports2);
49
48
 
@@ -1486,19 +1485,6 @@ var _extendAndValidate = (dashboardContent) => {
1486
1485
  }
1487
1486
  };
1488
1487
 
1489
- // libs/embed-libs/shared-embed/src/lib/models/viz-item.model.ts
1490
- var libraryTypeToWebComponentTypeMapping = {
1491
- type: "type",
1492
- theme: "theme",
1493
- slots: "slots",
1494
- options: "options",
1495
- itemId: "chart-id",
1496
- appServer: "app-server",
1497
- apiHost: "api-host",
1498
- authKey: "auth-key",
1499
- authToken: "auth-token"
1500
- };
1501
-
1502
1488
  // libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
1503
1489
  var luzmoEmbedContainerClass = "luzmo-embed-container";
1504
1490
 
@@ -1566,16 +1552,6 @@ function __federationMethodWrapDefault(module2, need) {
1566
1552
  async function __federationMethodGetRemote(remoteName, componentName) {
1567
1553
  return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
1568
1554
  }
1569
- async function loadLibrary(appServer, componentName) {
1570
- if (remotesMap[appServer]) {
1571
- return remotesMap[appServer].module;
1572
- }
1573
- remotesMap[appServer] = { url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`, format: "esm", from: "vite", module: void 0 };
1574
- const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
1575
- const wrappedModule = __federationMethodWrapDefault(module2, true);
1576
- remotesMap[appServer].module = wrappedModule;
1577
- return wrappedModule;
1578
- }
1579
1555
 
1580
1556
  // node_modules/lit-html/lit-html.js
1581
1557
  var t3 = globalThis;
@@ -1926,7 +1902,7 @@ var o5 = e6(class extends i4 {
1926
1902
  });
1927
1903
 
1928
1904
  // libs/embed-libs/embed/package.json
1929
- var version = "5.0.13-beta.1";
1905
+ var version = "5.0.13";
1930
1906
 
1931
1907
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1932
1908
  var LuzmoService = class {
@@ -2963,81 +2939,6 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
2963
2939
  LuzmoDashboard2 = __decorateClass([
2964
2940
  t("luzmo-dashboard")
2965
2941
  ], LuzmoDashboard2);
2966
-
2967
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
2968
- var LuzmoVizItem = class extends s3 {
2969
- constructor() {
2970
- super();
2971
- this.appServer = "http://localhost:4201";
2972
- this.apiHost = "https://api.luzmo.com";
2973
- this.slots = [];
2974
- this.options = {
2975
- title: {
2976
- en: ""
2977
- },
2978
- theme: "default"
2979
- };
2980
- }
2981
- firstUpdated(_changedProperties) {
2982
- super.firstUpdated(_changedProperties);
2983
- console.log(this.appServer);
2984
- loadLibrary(this.appServer, "DashboardApp").then((lib) => {
2985
- this.chartElement = document.createElement("chart-component");
2986
- this.chartElement.setAttribute("embedding-mode", "chart-embedding");
2987
- this.upadateVizItemProperties();
2988
- this.renderRoot.append(this.chartElement);
2989
- });
2990
- }
2991
- upadateVizItemProperties() {
2992
- if (this.chartElement) {
2993
- this.chartElement.setAttribute("app-server", this.appServer);
2994
- this.chartElement.setAttribute("api-host", this.apiHost);
2995
- for (const key in libraryTypeToWebComponentTypeMapping) {
2996
- if (this[key]) {
2997
- this.chartElement.setAttribute(
2998
- libraryTypeToWebComponentTypeMapping[key],
2999
- typeof this[key] === "object" ? JSON.stringify(this[key]) : this[key]
3000
- );
3001
- }
3002
- }
3003
- }
3004
- }
3005
- render() {
3006
- return x``;
3007
- }
3008
- };
3009
- // Static styles to set host display to block, else it is not shown at all for some reason.
3010
- LuzmoVizItem.styles = i`
3011
- :host {
3012
- display: block;
3013
- width: 100%;
3014
- height: 100%;
3015
- }
3016
- `;
3017
- __decorateClass([
3018
- n3()
3019
- ], LuzmoVizItem.prototype, "appServer", 2);
3020
- __decorateClass([
3021
- n3()
3022
- ], LuzmoVizItem.prototype, "apiHost", 2);
3023
- __decorateClass([
3024
- n3({ type: Array })
3025
- ], LuzmoVizItem.prototype, "slots", 2);
3026
- __decorateClass([
3027
- n3({ type: Object })
3028
- ], LuzmoVizItem.prototype, "options", 2);
3029
- __decorateClass([
3030
- n3()
3031
- ], LuzmoVizItem.prototype, "type", 2);
3032
- __decorateClass([
3033
- n3()
3034
- ], LuzmoVizItem.prototype, "authKey", 2);
3035
- __decorateClass([
3036
- n3()
3037
- ], LuzmoVizItem.prototype, "authToken", 2);
3038
- LuzmoVizItem = __decorateClass([
3039
- t("luzmo-embed-viz-item")
3040
- ], LuzmoVizItem);
3041
2942
  /*! Bundled license information:
3042
2943
 
3043
2944
  @lit/reactive-element/decorators/custom-element.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "5.0.13-beta.1",
3
+ "version": "5.0.13",
4
4
  "dependencies": {
5
5
  "lit": "3.1.2",
6
6
  "@luzmo/shared-embed": "5.0.6"
@@ -1,17 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- import * as SharedLib from '@luzmo/shared-embed';
3
- export declare class LuzmoVizItem extends LitElement {
4
- appServer: string;
5
- apiHost: string;
6
- slots: SharedLib.Slots;
7
- options: SharedLib.VizItemOptions;
8
- type?: SharedLib.ItemType;
9
- authKey?: string;
10
- authToken?: string;
11
- chartElement: HTMLElement;
12
- static styles: import("lit").CSSResult;
13
- constructor();
14
- protected firstUpdated(_changedProperties: PropertyValues): void;
15
- private upadateVizItemProperties;
16
- protected render(): unknown;
17
- }