@luzmo/embed 5.0.14-beta.4 → 5.0.14

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
@@ -1,6 +1,12 @@
1
1
 
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [5.0.14] - 2024-03-28
5
+
6
+ ### Bugfixes
7
+
8
+ - Shared embed lib updated with bugfixes.
9
+
4
10
  ## [5.0.13] - 2024-03-26
5
11
 
6
12
  ### Updates
package/index.cjs CHANGED
@@ -39,8 +39,7 @@ var __decorateClass = (decorators, target, key, kind) => {
39
39
  // libs/embed-libs/embed/src/index.ts
40
40
  var src_exports = {};
41
41
  __export(src_exports, {
42
- LuzmoDashboard: () => LuzmoDashboard2,
43
- LuzmoVizItem: () => LuzmoVizItem
42
+ LuzmoDashboard: () => LuzmoDashboard2
44
43
  });
45
44
  module.exports = __toCommonJS(src_exports);
46
45
 
@@ -55,7 +54,7 @@ var import_style_map = require("lit/directives/style-map.js");
55
54
  var import_shared_embed = require("@luzmo/shared-embed");
56
55
 
57
56
  // libs/embed-libs/embed/package.json
58
- var version = "5.0.14-beta.4";
57
+ var version = "5.0.14";
59
58
 
60
59
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
60
  var LuzmoService = class {
@@ -1094,102 +1093,7 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
1094
1093
  LuzmoDashboard2 = __decorateClass([
1095
1094
  (0, import_decorators2.customElement)("luzmo-dashboard")
1096
1095
  ], LuzmoDashboard2);
1097
-
1098
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
1099
- var import_decorators4 = require("lit/decorators.js");
1100
-
1101
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1102
- var import_decorators3 = require("lit/decorators.js");
1103
- var import_lit3 = require("lit");
1104
- var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
1105
- var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1106
- constructor() {
1107
- super();
1108
- this.appServer = "https://app.luzmo.com";
1109
- this.apiHost = "https://api.luzmo.com";
1110
- this.slots = [];
1111
- this.options = {
1112
- title: {
1113
- en: ""
1114
- },
1115
- theme: "default"
1116
- };
1117
- this.version = version + "-wc-luzmo";
1118
- }
1119
- static {
1120
- // Static styles to set host display to block, else it is not shown at all for some reason.
1121
- this.styles = import_lit3.css`
1122
- :host {
1123
- display: block;
1124
- width: 100%;
1125
- height: 100%;
1126
- }
1127
- `;
1128
- }
1129
- async firstUpdated(_changedProperties) {
1130
- super.firstUpdated(_changedProperties);
1131
- await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1132
- this.chartElement = document.createElement("chart-component");
1133
- this.chartElement.setAttribute("embedding-mode", "chart");
1134
- this.updateVizItemProperties();
1135
- this.renderRoot.append(this.chartElement);
1136
- }
1137
- updateVizItemProperties() {
1138
- if (this.chartElement) {
1139
- for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
1140
- const value = this[key];
1141
- if (value) {
1142
- const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
1143
- this.chartElement.setAttribute(
1144
- SharedLib3.libraryTypeToWebComponentTypeMapping[key],
1145
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1146
- );
1147
- }
1148
- }
1149
- }
1150
- }
1151
- updated(changedProperties) {
1152
- if (this.chartElement) {
1153
- this.updateVizItemProperties();
1154
- }
1155
- }
1156
- render() {
1157
- return import_lit3.html``;
1158
- }
1159
- };
1160
- __decorateClass([
1161
- (0, import_decorators3.property)()
1162
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
1163
- __decorateClass([
1164
- (0, import_decorators3.property)()
1165
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
1166
- __decorateClass([
1167
- (0, import_decorators3.property)({ type: Array })
1168
- ], LuzmoBaseVizItem.prototype, "slots", 2);
1169
- __decorateClass([
1170
- (0, import_decorators3.property)({ type: Object })
1171
- ], LuzmoBaseVizItem.prototype, "options", 2);
1172
- __decorateClass([
1173
- (0, import_decorators3.property)()
1174
- ], LuzmoBaseVizItem.prototype, "type", 2);
1175
- __decorateClass([
1176
- (0, import_decorators3.property)()
1177
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
1178
- __decorateClass([
1179
- (0, import_decorators3.property)()
1180
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
1181
- __decorateClass([
1182
- (0, import_decorators3.property)()
1183
- ], LuzmoBaseVizItem.prototype, "version", 2);
1184
-
1185
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
1186
- var LuzmoVizItem = class extends LuzmoBaseVizItem {
1187
- };
1188
- LuzmoVizItem = __decorateClass([
1189
- (0, import_decorators4.customElement)("luzmo-viz-item")
1190
- ], LuzmoVizItem);
1191
1096
  // Annotate the CommonJS export names for ESM import in node:
1192
1097
  0 && (module.exports = {
1193
- LuzmoDashboard,
1194
- LuzmoVizItem
1098
+ LuzmoDashboard
1195
1099
  });
package/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, Filter, FilterExpression, FilterOrigin, FilterInput, FilterGroup, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode } from '@luzmo/shared-embed';
2
2
  export * from './lib/dashboard-component/dashboard-component';
3
- export * from './lib/viz-item/viz-item-component';
package/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  } from "@luzmo/shared-embed";
38
38
 
39
39
  // libs/embed-libs/embed/package.json
40
- var version = "5.0.14-beta.4";
40
+ var version = "5.0.14";
41
41
 
42
42
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
43
43
  var LuzmoService = class {
@@ -1076,101 +1076,6 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
1076
1076
  LuzmoDashboard2 = __decorateClass([
1077
1077
  customElement("luzmo-dashboard")
1078
1078
  ], LuzmoDashboard2);
1079
-
1080
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
1081
- import { customElement as customElement3 } from "lit/decorators.js";
1082
-
1083
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1084
- import { property as property2 } from "lit/decorators.js";
1085
- import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
1086
- import * as SharedLib3 from "@luzmo/shared-embed";
1087
- var LuzmoBaseVizItem = class extends LitElement2 {
1088
- constructor() {
1089
- super();
1090
- this.appServer = "https://app.luzmo.com";
1091
- this.apiHost = "https://api.luzmo.com";
1092
- this.slots = [];
1093
- this.options = {
1094
- title: {
1095
- en: ""
1096
- },
1097
- theme: "default"
1098
- };
1099
- this.version = version + "-wc-luzmo";
1100
- }
1101
- static {
1102
- // Static styles to set host display to block, else it is not shown at all for some reason.
1103
- this.styles = css2`
1104
- :host {
1105
- display: block;
1106
- width: 100%;
1107
- height: 100%;
1108
- }
1109
- `;
1110
- }
1111
- async firstUpdated(_changedProperties) {
1112
- super.firstUpdated(_changedProperties);
1113
- await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1114
- this.chartElement = document.createElement("chart-component");
1115
- this.chartElement.setAttribute("embedding-mode", "chart");
1116
- this.updateVizItemProperties();
1117
- this.renderRoot.append(this.chartElement);
1118
- }
1119
- updateVizItemProperties() {
1120
- if (this.chartElement) {
1121
- for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
1122
- const value = this[key];
1123
- if (value) {
1124
- const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
1125
- this.chartElement.setAttribute(
1126
- SharedLib3.libraryTypeToWebComponentTypeMapping[key],
1127
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1128
- );
1129
- }
1130
- }
1131
- }
1132
- }
1133
- updated(changedProperties) {
1134
- if (this.chartElement) {
1135
- this.updateVizItemProperties();
1136
- }
1137
- }
1138
- render() {
1139
- return html2``;
1140
- }
1141
- };
1142
- __decorateClass([
1143
- property2()
1144
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
1145
- __decorateClass([
1146
- property2()
1147
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
1148
- __decorateClass([
1149
- property2({ type: Array })
1150
- ], LuzmoBaseVizItem.prototype, "slots", 2);
1151
- __decorateClass([
1152
- property2({ type: Object })
1153
- ], LuzmoBaseVizItem.prototype, "options", 2);
1154
- __decorateClass([
1155
- property2()
1156
- ], LuzmoBaseVizItem.prototype, "type", 2);
1157
- __decorateClass([
1158
- property2()
1159
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
1160
- __decorateClass([
1161
- property2()
1162
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
1163
- __decorateClass([
1164
- property2()
1165
- ], LuzmoBaseVizItem.prototype, "version", 2);
1166
-
1167
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
1168
- var LuzmoVizItem = class extends LuzmoBaseVizItem {
1169
- };
1170
- LuzmoVizItem = __decorateClass([
1171
- customElement3("luzmo-viz-item")
1172
- ], LuzmoVizItem);
1173
1079
  export {
1174
- LuzmoDashboard2 as LuzmoDashboard,
1175
- LuzmoVizItem
1080
+ LuzmoDashboard2 as LuzmoDashboard
1176
1081
  };
package/index.libs.cjs CHANGED
@@ -39,8 +39,7 @@ var __decorateClass = (decorators, target, key, kind) => {
39
39
  // libs/embed-libs/embed/src/index.libs.ts
40
40
  var index_libs_exports = {};
41
41
  __export(index_libs_exports, {
42
- LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent,
43
- LuzmoVizItemWebComponent: () => LuzmoVizItemWebComponent
42
+ LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent
44
43
  });
45
44
  module.exports = __toCommonJS(index_libs_exports);
46
45
 
@@ -55,7 +54,7 @@ var import_style_map = require("lit/directives/style-map.js");
55
54
  var import_shared_embed = require("@luzmo/shared-embed");
56
55
 
57
56
  // libs/embed-libs/embed/package.json
58
- var version = "5.0.14-beta.4";
57
+ var version = "5.0.14";
59
58
 
60
59
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
60
  var LuzmoService = class {
@@ -1094,102 +1093,7 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
1094
1093
  LuzmoDashboardWebComponent = __decorateClass([
1095
1094
  (0, import_decorators2.customElement)("luzmo-dashboard-web-component")
1096
1095
  ], LuzmoDashboardWebComponent);
1097
-
1098
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1099
- var import_decorators4 = require("lit/decorators.js");
1100
-
1101
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1102
- var import_decorators3 = require("lit/decorators.js");
1103
- var import_lit3 = require("lit");
1104
- var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
1105
- var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1106
- constructor() {
1107
- super();
1108
- this.appServer = "https://app.luzmo.com";
1109
- this.apiHost = "https://api.luzmo.com";
1110
- this.slots = [];
1111
- this.options = {
1112
- title: {
1113
- en: ""
1114
- },
1115
- theme: "default"
1116
- };
1117
- this.version = version + "-wc-luzmo";
1118
- }
1119
- static {
1120
- // Static styles to set host display to block, else it is not shown at all for some reason.
1121
- this.styles = import_lit3.css`
1122
- :host {
1123
- display: block;
1124
- width: 100%;
1125
- height: 100%;
1126
- }
1127
- `;
1128
- }
1129
- async firstUpdated(_changedProperties) {
1130
- super.firstUpdated(_changedProperties);
1131
- await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1132
- this.chartElement = document.createElement("chart-component");
1133
- this.chartElement.setAttribute("embedding-mode", "chart");
1134
- this.updateVizItemProperties();
1135
- this.renderRoot.append(this.chartElement);
1136
- }
1137
- updateVizItemProperties() {
1138
- if (this.chartElement) {
1139
- for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
1140
- const value = this[key];
1141
- if (value) {
1142
- const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
1143
- this.chartElement.setAttribute(
1144
- SharedLib3.libraryTypeToWebComponentTypeMapping[key],
1145
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1146
- );
1147
- }
1148
- }
1149
- }
1150
- }
1151
- updated(changedProperties) {
1152
- if (this.chartElement) {
1153
- this.updateVizItemProperties();
1154
- }
1155
- }
1156
- render() {
1157
- return import_lit3.html``;
1158
- }
1159
- };
1160
- __decorateClass([
1161
- (0, import_decorators3.property)()
1162
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
1163
- __decorateClass([
1164
- (0, import_decorators3.property)()
1165
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
1166
- __decorateClass([
1167
- (0, import_decorators3.property)({ type: Array })
1168
- ], LuzmoBaseVizItem.prototype, "slots", 2);
1169
- __decorateClass([
1170
- (0, import_decorators3.property)({ type: Object })
1171
- ], LuzmoBaseVizItem.prototype, "options", 2);
1172
- __decorateClass([
1173
- (0, import_decorators3.property)()
1174
- ], LuzmoBaseVizItem.prototype, "type", 2);
1175
- __decorateClass([
1176
- (0, import_decorators3.property)()
1177
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
1178
- __decorateClass([
1179
- (0, import_decorators3.property)()
1180
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
1181
- __decorateClass([
1182
- (0, import_decorators3.property)()
1183
- ], LuzmoBaseVizItem.prototype, "version", 2);
1184
-
1185
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1186
- var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
1187
- };
1188
- LuzmoVizItemWebComponent = __decorateClass([
1189
- (0, import_decorators4.customElement)("luzmo-viz-item-web-component")
1190
- ], LuzmoVizItemWebComponent);
1191
1096
  // Annotate the CommonJS export names for ESM import in node:
1192
1097
  0 && (module.exports = {
1193
- LuzmoDashboardWebComponent,
1194
- LuzmoVizItemWebComponent
1098
+ LuzmoDashboardWebComponent
1195
1099
  });
package/index.libs.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export * from './lib/dashboard-component/dashboard-web-component';
2
- export * from './lib/viz-item/viz-item-web-component';
package/index.libs.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  } from "@luzmo/shared-embed";
36
36
 
37
37
  // libs/embed-libs/embed/package.json
38
- var version = "5.0.14-beta.4";
38
+ var version = "5.0.14";
39
39
 
40
40
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
41
41
  var LuzmoService = class {
@@ -1074,101 +1074,6 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
1074
1074
  LuzmoDashboardWebComponent = __decorateClass([
1075
1075
  customElement("luzmo-dashboard-web-component")
1076
1076
  ], LuzmoDashboardWebComponent);
1077
-
1078
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1079
- import { customElement as customElement3 } from "lit/decorators.js";
1080
-
1081
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1082
- import { property as property2 } from "lit/decorators.js";
1083
- import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
1084
- import * as SharedLib3 from "@luzmo/shared-embed";
1085
- var LuzmoBaseVizItem = class extends LitElement2 {
1086
- constructor() {
1087
- super();
1088
- this.appServer = "https://app.luzmo.com";
1089
- this.apiHost = "https://api.luzmo.com";
1090
- this.slots = [];
1091
- this.options = {
1092
- title: {
1093
- en: ""
1094
- },
1095
- theme: "default"
1096
- };
1097
- this.version = version + "-wc-luzmo";
1098
- }
1099
- static {
1100
- // Static styles to set host display to block, else it is not shown at all for some reason.
1101
- this.styles = css2`
1102
- :host {
1103
- display: block;
1104
- width: 100%;
1105
- height: 100%;
1106
- }
1107
- `;
1108
- }
1109
- async firstUpdated(_changedProperties) {
1110
- super.firstUpdated(_changedProperties);
1111
- await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1112
- this.chartElement = document.createElement("chart-component");
1113
- this.chartElement.setAttribute("embedding-mode", "chart");
1114
- this.updateVizItemProperties();
1115
- this.renderRoot.append(this.chartElement);
1116
- }
1117
- updateVizItemProperties() {
1118
- if (this.chartElement) {
1119
- for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
1120
- const value = this[key];
1121
- if (value) {
1122
- const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
1123
- this.chartElement.setAttribute(
1124
- SharedLib3.libraryTypeToWebComponentTypeMapping[key],
1125
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1126
- );
1127
- }
1128
- }
1129
- }
1130
- }
1131
- updated(changedProperties) {
1132
- if (this.chartElement) {
1133
- this.updateVizItemProperties();
1134
- }
1135
- }
1136
- render() {
1137
- return html2``;
1138
- }
1139
- };
1140
- __decorateClass([
1141
- property2()
1142
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
1143
- __decorateClass([
1144
- property2()
1145
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
1146
- __decorateClass([
1147
- property2({ type: Array })
1148
- ], LuzmoBaseVizItem.prototype, "slots", 2);
1149
- __decorateClass([
1150
- property2({ type: Object })
1151
- ], LuzmoBaseVizItem.prototype, "options", 2);
1152
- __decorateClass([
1153
- property2()
1154
- ], LuzmoBaseVizItem.prototype, "type", 2);
1155
- __decorateClass([
1156
- property2()
1157
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
1158
- __decorateClass([
1159
- property2()
1160
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
1161
- __decorateClass([
1162
- property2()
1163
- ], LuzmoBaseVizItem.prototype, "version", 2);
1164
-
1165
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1166
- var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
1167
- };
1168
- LuzmoVizItemWebComponent = __decorateClass([
1169
- customElement3("luzmo-viz-item-web-component")
1170
- ], LuzmoVizItemWebComponent);
1171
1077
  export {
1172
- LuzmoDashboardWebComponent,
1173
- LuzmoVizItemWebComponent
1078
+ LuzmoDashboardWebComponent
1174
1079
  };
@@ -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
- LuzmoVizItemWebComponent: () => LuzmoVizItemWebComponent
45
+ LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent
47
46
  });
48
47
  module.exports = __toCommonJS(index_libs_exports);
49
48
 
@@ -919,7 +918,9 @@ var getAccessibleDashboards = (dashboardComponent) => {
919
918
  void (() => {
920
919
  try {
921
920
  const responsePromise = window.fetch(
922
- `${String(dashboardComponent.params.apiHost)}0.1.0/authorization`,
921
+ // With experimental=true URLs remove the trailing slash, since the web component expects them to not have it.
922
+ // Fixes incorrect url with experimental=true
923
+ `${addTrailingSlash(dashboardComponent.params.apiHost)}0.1.0/authorization`,
923
924
  {
924
925
  method: "POST",
925
926
  mode: "cors",
@@ -968,7 +969,9 @@ var getAccessibleDashboards = (dashboardComponent) => {
968
969
  try {
969
970
  fetchUser.then((authorizationData) => {
970
971
  const responsePromise = window.fetch(
971
- `${String(dashboardComponent.params.apiHost)}0.1.0/securable`,
972
+ // With experimental=true URLs remove the trailing slash, since the web component expects them to not have it.
973
+ // Fixes incorrect url with experimental=true
974
+ `${addTrailingSlash(dashboardComponent.params.apiHost)}0.1.0/securable`,
972
975
  {
973
976
  method: "POST",
974
977
  mode: "cors",
@@ -1486,18 +1489,6 @@ var _extendAndValidate = (dashboardContent) => {
1486
1489
  }
1487
1490
  };
1488
1491
 
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
- appServer: "app-server",
1496
- apiHost: "api-host",
1497
- authKey: "auth-key",
1498
- authToken: "auth-token"
1499
- };
1500
-
1501
1492
  // libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
1502
1493
  var luzmoEmbedContainerClass = "luzmo-embed-container";
1503
1494
 
@@ -1565,21 +1556,6 @@ function __federationMethodWrapDefault(module2, need) {
1565
1556
  async function __federationMethodGetRemote(remoteName, componentName) {
1566
1557
  return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
1567
1558
  }
1568
- async function loadLibrary(appServer, componentName) {
1569
- if (remotesMap[appServer]) {
1570
- return remotesMap[appServer].module;
1571
- }
1572
- remotesMap[appServer] = {
1573
- url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
1574
- format: "esm",
1575
- from: "vite",
1576
- module: void 0
1577
- };
1578
- const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
1579
- const wrappedModule = __federationMethodWrapDefault(module2, true);
1580
- remotesMap[appServer].module = wrappedModule;
1581
- return wrappedModule;
1582
- }
1583
1559
 
1584
1560
  // node_modules/lit-html/lit-html.js
1585
1561
  var t3 = globalThis;
@@ -1930,7 +1906,7 @@ var o5 = e6(class extends i4 {
1930
1906
  });
1931
1907
 
1932
1908
  // libs/embed-libs/embed/package.json
1933
- var version = "5.0.14-beta.4";
1909
+ var version = "5.0.14";
1934
1910
 
1935
1911
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1936
1912
  var LuzmoService = class {
@@ -2967,94 +2943,6 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
2967
2943
  LuzmoDashboardWebComponent = __decorateClass([
2968
2944
  t("luzmo-dashboard-web-component")
2969
2945
  ], LuzmoDashboardWebComponent);
2970
-
2971
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
2972
- var LuzmoBaseVizItem = class extends s3 {
2973
- constructor() {
2974
- super();
2975
- this.appServer = "https://app.luzmo.com";
2976
- this.apiHost = "https://api.luzmo.com";
2977
- this.slots = [];
2978
- this.options = {
2979
- title: {
2980
- en: ""
2981
- },
2982
- theme: "default"
2983
- };
2984
- this.version = version + "-wc-luzmo";
2985
- }
2986
- static {
2987
- // Static styles to set host display to block, else it is not shown at all for some reason.
2988
- this.styles = i`
2989
- :host {
2990
- display: block;
2991
- width: 100%;
2992
- height: 100%;
2993
- }
2994
- `;
2995
- }
2996
- async firstUpdated(_changedProperties) {
2997
- super.firstUpdated(_changedProperties);
2998
- await loadLibrary(this.appServer, "DashboardApp");
2999
- this.chartElement = document.createElement("chart-component");
3000
- this.chartElement.setAttribute("embedding-mode", "chart");
3001
- this.updateVizItemProperties();
3002
- this.renderRoot.append(this.chartElement);
3003
- }
3004
- updateVizItemProperties() {
3005
- if (this.chartElement) {
3006
- for (const key in libraryTypeToWebComponentTypeMapping) {
3007
- const value = this[key];
3008
- if (value) {
3009
- const attributeValue = ["appServer", "apiHost"].includes(key) ? removeTrailingSlash(value) : value;
3010
- this.chartElement.setAttribute(
3011
- libraryTypeToWebComponentTypeMapping[key],
3012
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
3013
- );
3014
- }
3015
- }
3016
- }
3017
- }
3018
- updated(changedProperties) {
3019
- if (this.chartElement) {
3020
- this.updateVizItemProperties();
3021
- }
3022
- }
3023
- render() {
3024
- return x``;
3025
- }
3026
- };
3027
- __decorateClass([
3028
- n3()
3029
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
3030
- __decorateClass([
3031
- n3()
3032
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
3033
- __decorateClass([
3034
- n3({ type: Array })
3035
- ], LuzmoBaseVizItem.prototype, "slots", 2);
3036
- __decorateClass([
3037
- n3({ type: Object })
3038
- ], LuzmoBaseVizItem.prototype, "options", 2);
3039
- __decorateClass([
3040
- n3()
3041
- ], LuzmoBaseVizItem.prototype, "type", 2);
3042
- __decorateClass([
3043
- n3()
3044
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
3045
- __decorateClass([
3046
- n3()
3047
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
3048
- __decorateClass([
3049
- n3()
3050
- ], LuzmoBaseVizItem.prototype, "version", 2);
3051
-
3052
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
3053
- var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
3054
- };
3055
- LuzmoVizItemWebComponent = __decorateClass([
3056
- t("luzmo-viz-item-web-component")
3057
- ], LuzmoVizItemWebComponent);
3058
2946
  /*! Bundled license information:
3059
2947
 
3060
2948
  @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
 
@@ -919,7 +918,9 @@ var getAccessibleDashboards = (dashboardComponent) => {
919
918
  void (() => {
920
919
  try {
921
920
  const responsePromise = window.fetch(
922
- `${String(dashboardComponent.params.apiHost)}0.1.0/authorization`,
921
+ // With experimental=true URLs remove the trailing slash, since the web component expects them to not have it.
922
+ // Fixes incorrect url with experimental=true
923
+ `${addTrailingSlash(dashboardComponent.params.apiHost)}0.1.0/authorization`,
923
924
  {
924
925
  method: "POST",
925
926
  mode: "cors",
@@ -968,7 +969,9 @@ var getAccessibleDashboards = (dashboardComponent) => {
968
969
  try {
969
970
  fetchUser.then((authorizationData) => {
970
971
  const responsePromise = window.fetch(
971
- `${String(dashboardComponent.params.apiHost)}0.1.0/securable`,
972
+ // With experimental=true URLs remove the trailing slash, since the web component expects them to not have it.
973
+ // Fixes incorrect url with experimental=true
974
+ `${addTrailingSlash(dashboardComponent.params.apiHost)}0.1.0/securable`,
972
975
  {
973
976
  method: "POST",
974
977
  mode: "cors",
@@ -1486,18 +1489,6 @@ var _extendAndValidate = (dashboardContent) => {
1486
1489
  }
1487
1490
  };
1488
1491
 
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
- appServer: "app-server",
1496
- apiHost: "api-host",
1497
- authKey: "auth-key",
1498
- authToken: "auth-token"
1499
- };
1500
-
1501
1492
  // libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
1502
1493
  var luzmoEmbedContainerClass = "luzmo-embed-container";
1503
1494
 
@@ -1565,21 +1556,6 @@ function __federationMethodWrapDefault(module2, need) {
1565
1556
  async function __federationMethodGetRemote(remoteName, componentName) {
1566
1557
  return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
1567
1558
  }
1568
- async function loadLibrary(appServer, componentName) {
1569
- if (remotesMap[appServer]) {
1570
- return remotesMap[appServer].module;
1571
- }
1572
- remotesMap[appServer] = {
1573
- url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
1574
- format: "esm",
1575
- from: "vite",
1576
- module: void 0
1577
- };
1578
- const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
1579
- const wrappedModule = __federationMethodWrapDefault(module2, true);
1580
- remotesMap[appServer].module = wrappedModule;
1581
- return wrappedModule;
1582
- }
1583
1559
 
1584
1560
  // node_modules/lit-html/lit-html.js
1585
1561
  var t3 = globalThis;
@@ -1930,7 +1906,7 @@ var o5 = e6(class extends i4 {
1930
1906
  });
1931
1907
 
1932
1908
  // libs/embed-libs/embed/package.json
1933
- var version = "5.0.14-beta.4";
1909
+ var version = "5.0.14";
1934
1910
 
1935
1911
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1936
1912
  var LuzmoService = class {
@@ -2967,94 +2943,6 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
2967
2943
  LuzmoDashboard2 = __decorateClass([
2968
2944
  t("luzmo-dashboard")
2969
2945
  ], LuzmoDashboard2);
2970
-
2971
- // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
2972
- var LuzmoBaseVizItem = class extends s3 {
2973
- constructor() {
2974
- super();
2975
- this.appServer = "https://app.luzmo.com";
2976
- this.apiHost = "https://api.luzmo.com";
2977
- this.slots = [];
2978
- this.options = {
2979
- title: {
2980
- en: ""
2981
- },
2982
- theme: "default"
2983
- };
2984
- this.version = version + "-wc-luzmo";
2985
- }
2986
- static {
2987
- // Static styles to set host display to block, else it is not shown at all for some reason.
2988
- this.styles = i`
2989
- :host {
2990
- display: block;
2991
- width: 100%;
2992
- height: 100%;
2993
- }
2994
- `;
2995
- }
2996
- async firstUpdated(_changedProperties) {
2997
- super.firstUpdated(_changedProperties);
2998
- await loadLibrary(this.appServer, "DashboardApp");
2999
- this.chartElement = document.createElement("chart-component");
3000
- this.chartElement.setAttribute("embedding-mode", "chart");
3001
- this.updateVizItemProperties();
3002
- this.renderRoot.append(this.chartElement);
3003
- }
3004
- updateVizItemProperties() {
3005
- if (this.chartElement) {
3006
- for (const key in libraryTypeToWebComponentTypeMapping) {
3007
- const value = this[key];
3008
- if (value) {
3009
- const attributeValue = ["appServer", "apiHost"].includes(key) ? removeTrailingSlash(value) : value;
3010
- this.chartElement.setAttribute(
3011
- libraryTypeToWebComponentTypeMapping[key],
3012
- typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
3013
- );
3014
- }
3015
- }
3016
- }
3017
- }
3018
- updated(changedProperties) {
3019
- if (this.chartElement) {
3020
- this.updateVizItemProperties();
3021
- }
3022
- }
3023
- render() {
3024
- return x``;
3025
- }
3026
- };
3027
- __decorateClass([
3028
- n3()
3029
- ], LuzmoBaseVizItem.prototype, "appServer", 2);
3030
- __decorateClass([
3031
- n3()
3032
- ], LuzmoBaseVizItem.prototype, "apiHost", 2);
3033
- __decorateClass([
3034
- n3({ type: Array })
3035
- ], LuzmoBaseVizItem.prototype, "slots", 2);
3036
- __decorateClass([
3037
- n3({ type: Object })
3038
- ], LuzmoBaseVizItem.prototype, "options", 2);
3039
- __decorateClass([
3040
- n3()
3041
- ], LuzmoBaseVizItem.prototype, "type", 2);
3042
- __decorateClass([
3043
- n3()
3044
- ], LuzmoBaseVizItem.prototype, "authKey", 2);
3045
- __decorateClass([
3046
- n3()
3047
- ], LuzmoBaseVizItem.prototype, "authToken", 2);
3048
- __decorateClass([
3049
- n3()
3050
- ], LuzmoBaseVizItem.prototype, "version", 2);
3051
-
3052
- // libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
3053
- var LuzmoVizItem = class extends LuzmoBaseVizItem {
3054
- };
3055
- LuzmoVizItem = __decorateClass([
3056
- t("luzmo-viz-item")
3057
- ], LuzmoVizItem);
3058
2946
  /*! Bundled license information:
3059
2947
 
3060
2948
  @lit/reactive-element/decorators/custom-element.js:
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "5.0.14-beta.4",
3
+ "version": "5.0.14",
4
4
  "dependencies": {
5
5
  "lit": "3.1.2",
6
- "@luzmo/shared-embed": "5.0.7-beta.0"
6
+ "@luzmo/shared-embed": "5.0.7"
7
7
  },
8
8
  "type": "module",
9
9
  "keywords": [
@@ -1,3 +0,0 @@
1
- import { LuzmoBaseVizItem } from './viz-item.base';
2
- export declare class LuzmoVizItem extends LuzmoBaseVizItem {
3
- }
@@ -1,3 +0,0 @@
1
- import { LuzmoBaseVizItem } from './viz-item.base';
2
- export declare class LuzmoVizItemWebComponent extends LuzmoBaseVizItem {
3
- }
@@ -1,19 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- import * as SharedLib from '@luzmo/shared-embed';
3
- export declare class LuzmoBaseVizItem 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
- version?: string;
12
- chartElement: HTMLElement;
13
- static styles: import("lit").CSSResult;
14
- constructor();
15
- protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
16
- private updateVizItemProperties;
17
- updated(changedProperties: PropertyValues): void;
18
- protected render(): unknown;
19
- }