@luzmo/embed 5.0.12 → 5.0.13-beta.1
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/index.cjs +83 -3
- package/index.d.ts +1 -0
- package/index.js +81 -2
- package/index.libs.d.ts +1 -0
- package/lib/viz-item/viz-item.base.d.ts +17 -0
- package/luzmo-embed.libs.js +101 -2
- package/luzmo-embed.min.js +101 -2
- package/package.json +1 -1
- package/src/index.d.ts +0 -2
- package/src/lib/dashboard-component/dashboard-base.d.ts +0 -98
- package/src/lib/dashboard-component/dashboard-component.d.ts +0 -3
- package/src/lib/dashboard-component/dashboard-styles.d.ts +0 -1
- package/src/lib/helper/event-bus-handler.d.ts +0 -1
- package/src/lib/luzmo-service.d.ts +0 -6
package/index.cjs
CHANGED
|
@@ -39,7 +39,8 @@ 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
|
|
42
|
+
LuzmoDashboard: () => LuzmoDashboard2,
|
|
43
|
+
LuzmoVizItem: () => LuzmoVizItem
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(src_exports);
|
|
45
46
|
|
|
@@ -54,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
54
55
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
55
56
|
|
|
56
57
|
// libs/embed-libs/embed/package.json
|
|
57
|
-
var version = "5.0.
|
|
58
|
+
var version = "5.0.13-beta.1";
|
|
58
59
|
|
|
59
60
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
60
61
|
var LuzmoService = class {
|
|
@@ -1093,7 +1094,86 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
1093
1094
|
LuzmoDashboard2 = __decorateClass([
|
|
1094
1095
|
(0, import_decorators2.customElement)("luzmo-dashboard")
|
|
1095
1096
|
], LuzmoDashboard2);
|
|
1097
|
+
|
|
1098
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1099
|
+
var import_decorators3 = require("lit/decorators.js");
|
|
1100
|
+
var import_lit3 = require("lit");
|
|
1101
|
+
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1102
|
+
var LuzmoVizItem = class extends import_lit3.LitElement {
|
|
1103
|
+
constructor() {
|
|
1104
|
+
super();
|
|
1105
|
+
this.appServer = "http://localhost:4201";
|
|
1106
|
+
this.apiHost = "https://api.luzmo.com";
|
|
1107
|
+
this.slots = [];
|
|
1108
|
+
this.options = {
|
|
1109
|
+
title: {
|
|
1110
|
+
en: ""
|
|
1111
|
+
},
|
|
1112
|
+
theme: "default"
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
firstUpdated(_changedProperties) {
|
|
1116
|
+
super.firstUpdated(_changedProperties);
|
|
1117
|
+
console.log(this.appServer);
|
|
1118
|
+
SharedLib3.loadLibrary(this.appServer, "DashboardApp").then((lib) => {
|
|
1119
|
+
this.chartElement = document.createElement("chart-component");
|
|
1120
|
+
this.chartElement.setAttribute("embedding-mode", "chart-embedding");
|
|
1121
|
+
this.upadateVizItemProperties();
|
|
1122
|
+
this.renderRoot.append(this.chartElement);
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
upadateVizItemProperties() {
|
|
1126
|
+
if (this.chartElement) {
|
|
1127
|
+
this.chartElement.setAttribute("app-server", this.appServer);
|
|
1128
|
+
this.chartElement.setAttribute("api-host", this.apiHost);
|
|
1129
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1130
|
+
if (this[key]) {
|
|
1131
|
+
this.chartElement.setAttribute(
|
|
1132
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1133
|
+
typeof this[key] === "object" ? JSON.stringify(this[key]) : this[key]
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
render() {
|
|
1140
|
+
return import_lit3.html``;
|
|
1141
|
+
}
|
|
1142
|
+
};
|
|
1143
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1144
|
+
LuzmoVizItem.styles = import_lit3.css`
|
|
1145
|
+
:host {
|
|
1146
|
+
display: block;
|
|
1147
|
+
width: 100%;
|
|
1148
|
+
height: 100%;
|
|
1149
|
+
}
|
|
1150
|
+
`;
|
|
1151
|
+
__decorateClass([
|
|
1152
|
+
(0, import_decorators3.property)()
|
|
1153
|
+
], LuzmoVizItem.prototype, "appServer", 2);
|
|
1154
|
+
__decorateClass([
|
|
1155
|
+
(0, import_decorators3.property)()
|
|
1156
|
+
], LuzmoVizItem.prototype, "apiHost", 2);
|
|
1157
|
+
__decorateClass([
|
|
1158
|
+
(0, import_decorators3.property)({ type: Array })
|
|
1159
|
+
], LuzmoVizItem.prototype, "slots", 2);
|
|
1160
|
+
__decorateClass([
|
|
1161
|
+
(0, import_decorators3.property)({ type: Object })
|
|
1162
|
+
], LuzmoVizItem.prototype, "options", 2);
|
|
1163
|
+
__decorateClass([
|
|
1164
|
+
(0, import_decorators3.property)()
|
|
1165
|
+
], LuzmoVizItem.prototype, "type", 2);
|
|
1166
|
+
__decorateClass([
|
|
1167
|
+
(0, import_decorators3.property)()
|
|
1168
|
+
], LuzmoVizItem.prototype, "authKey", 2);
|
|
1169
|
+
__decorateClass([
|
|
1170
|
+
(0, import_decorators3.property)()
|
|
1171
|
+
], LuzmoVizItem.prototype, "authToken", 2);
|
|
1172
|
+
LuzmoVizItem = __decorateClass([
|
|
1173
|
+
(0, import_decorators3.customElement)("luzmo-embed-viz-item")
|
|
1174
|
+
], LuzmoVizItem);
|
|
1096
1175
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1097
1176
|
0 && (module.exports = {
|
|
1098
|
-
LuzmoDashboard
|
|
1177
|
+
LuzmoDashboard,
|
|
1178
|
+
LuzmoVizItem
|
|
1099
1179
|
});
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
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.base';
|
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.
|
|
40
|
+
var version = "5.0.13-beta.1";
|
|
41
41
|
|
|
42
42
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
43
43
|
var LuzmoService = class {
|
|
@@ -1076,6 +1076,85 @@ 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.base.ts
|
|
1081
|
+
import { customElement as customElement2, property as property2 } from "lit/decorators.js";
|
|
1082
|
+
import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
|
|
1083
|
+
import * as SharedLib3 from "@luzmo/shared-embed";
|
|
1084
|
+
var LuzmoVizItem = class extends LitElement2 {
|
|
1085
|
+
constructor() {
|
|
1086
|
+
super();
|
|
1087
|
+
this.appServer = "http://localhost:4201";
|
|
1088
|
+
this.apiHost = "https://api.luzmo.com";
|
|
1089
|
+
this.slots = [];
|
|
1090
|
+
this.options = {
|
|
1091
|
+
title: {
|
|
1092
|
+
en: ""
|
|
1093
|
+
},
|
|
1094
|
+
theme: "default"
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
firstUpdated(_changedProperties) {
|
|
1098
|
+
super.firstUpdated(_changedProperties);
|
|
1099
|
+
console.log(this.appServer);
|
|
1100
|
+
SharedLib3.loadLibrary(this.appServer, "DashboardApp").then((lib) => {
|
|
1101
|
+
this.chartElement = document.createElement("chart-component");
|
|
1102
|
+
this.chartElement.setAttribute("embedding-mode", "chart-embedding");
|
|
1103
|
+
this.upadateVizItemProperties();
|
|
1104
|
+
this.renderRoot.append(this.chartElement);
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
upadateVizItemProperties() {
|
|
1108
|
+
if (this.chartElement) {
|
|
1109
|
+
this.chartElement.setAttribute("app-server", this.appServer);
|
|
1110
|
+
this.chartElement.setAttribute("api-host", this.apiHost);
|
|
1111
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1112
|
+
if (this[key]) {
|
|
1113
|
+
this.chartElement.setAttribute(
|
|
1114
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1115
|
+
typeof this[key] === "object" ? JSON.stringify(this[key]) : this[key]
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
render() {
|
|
1122
|
+
return html2``;
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1126
|
+
LuzmoVizItem.styles = css2`
|
|
1127
|
+
:host {
|
|
1128
|
+
display: block;
|
|
1129
|
+
width: 100%;
|
|
1130
|
+
height: 100%;
|
|
1131
|
+
}
|
|
1132
|
+
`;
|
|
1133
|
+
__decorateClass([
|
|
1134
|
+
property2()
|
|
1135
|
+
], LuzmoVizItem.prototype, "appServer", 2);
|
|
1136
|
+
__decorateClass([
|
|
1137
|
+
property2()
|
|
1138
|
+
], LuzmoVizItem.prototype, "apiHost", 2);
|
|
1139
|
+
__decorateClass([
|
|
1140
|
+
property2({ type: Array })
|
|
1141
|
+
], LuzmoVizItem.prototype, "slots", 2);
|
|
1142
|
+
__decorateClass([
|
|
1143
|
+
property2({ type: Object })
|
|
1144
|
+
], LuzmoVizItem.prototype, "options", 2);
|
|
1145
|
+
__decorateClass([
|
|
1146
|
+
property2()
|
|
1147
|
+
], LuzmoVizItem.prototype, "type", 2);
|
|
1148
|
+
__decorateClass([
|
|
1149
|
+
property2()
|
|
1150
|
+
], LuzmoVizItem.prototype, "authKey", 2);
|
|
1151
|
+
__decorateClass([
|
|
1152
|
+
property2()
|
|
1153
|
+
], LuzmoVizItem.prototype, "authToken", 2);
|
|
1154
|
+
LuzmoVizItem = __decorateClass([
|
|
1155
|
+
customElement2("luzmo-embed-viz-item")
|
|
1156
|
+
], LuzmoVizItem);
|
|
1079
1157
|
export {
|
|
1080
|
-
LuzmoDashboard2 as LuzmoDashboard
|
|
1158
|
+
LuzmoDashboard2 as LuzmoDashboard,
|
|
1159
|
+
LuzmoVizItem
|
|
1081
1160
|
};
|
package/index.libs.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
package/luzmo-embed.libs.js
CHANGED
|
@@ -42,7 +42,8 @@ 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
|
|
45
|
+
LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent,
|
|
46
|
+
LuzmoVizItem: () => LuzmoVizItem
|
|
46
47
|
});
|
|
47
48
|
module.exports = __toCommonJS(index_libs_exports);
|
|
48
49
|
|
|
@@ -1485,6 +1486,19 @@ var _extendAndValidate = (dashboardContent) => {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
};
|
|
1487
1488
|
|
|
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
|
+
|
|
1488
1502
|
// libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
|
|
1489
1503
|
var luzmoEmbedContainerClass = "luzmo-embed-container";
|
|
1490
1504
|
|
|
@@ -1552,6 +1566,16 @@ function __federationMethodWrapDefault(module2, need) {
|
|
|
1552
1566
|
async function __federationMethodGetRemote(remoteName, componentName) {
|
|
1553
1567
|
return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
|
|
1554
1568
|
}
|
|
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
|
+
}
|
|
1555
1579
|
|
|
1556
1580
|
// node_modules/lit-html/lit-html.js
|
|
1557
1581
|
var t3 = globalThis;
|
|
@@ -1902,7 +1926,7 @@ var o5 = e6(class extends i4 {
|
|
|
1902
1926
|
});
|
|
1903
1927
|
|
|
1904
1928
|
// libs/embed-libs/embed/package.json
|
|
1905
|
-
var version = "5.0.
|
|
1929
|
+
var version = "5.0.13-beta.1";
|
|
1906
1930
|
|
|
1907
1931
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
1908
1932
|
var LuzmoService = class {
|
|
@@ -2939,6 +2963,81 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
|
|
|
2939
2963
|
LuzmoDashboardWebComponent = __decorateClass([
|
|
2940
2964
|
t("luzmo-dashboard-web-component")
|
|
2941
2965
|
], 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);
|
|
2942
3041
|
/*! Bundled license information:
|
|
2943
3042
|
|
|
2944
3043
|
@lit/reactive-element/decorators/custom-element.js:
|
package/luzmo-embed.min.js
CHANGED
|
@@ -42,7 +42,8 @@ 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
|
|
45
|
+
LuzmoDashboard: () => LuzmoDashboard2,
|
|
46
|
+
LuzmoVizItem: () => LuzmoVizItem
|
|
46
47
|
});
|
|
47
48
|
module.exports = __toCommonJS(src_exports2);
|
|
48
49
|
|
|
@@ -1485,6 +1486,19 @@ var _extendAndValidate = (dashboardContent) => {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
};
|
|
1487
1488
|
|
|
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
|
+
|
|
1488
1502
|
// libs/embed-libs/shared-embed/src/lib/constants/class-constants.ts
|
|
1489
1503
|
var luzmoEmbedContainerClass = "luzmo-embed-container";
|
|
1490
1504
|
|
|
@@ -1552,6 +1566,16 @@ function __federationMethodWrapDefault(module2, need) {
|
|
|
1552
1566
|
async function __federationMethodGetRemote(remoteName, componentName) {
|
|
1553
1567
|
return __federationMethodEnsure(remoteName).then((remote) => remote.get(componentName).then((factory) => factory()));
|
|
1554
1568
|
}
|
|
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
|
+
}
|
|
1555
1579
|
|
|
1556
1580
|
// node_modules/lit-html/lit-html.js
|
|
1557
1581
|
var t3 = globalThis;
|
|
@@ -1902,7 +1926,7 @@ var o5 = e6(class extends i4 {
|
|
|
1902
1926
|
});
|
|
1903
1927
|
|
|
1904
1928
|
// libs/embed-libs/embed/package.json
|
|
1905
|
-
var version = "5.0.
|
|
1929
|
+
var version = "5.0.13-beta.1";
|
|
1906
1930
|
|
|
1907
1931
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
1908
1932
|
var LuzmoService = class {
|
|
@@ -2939,6 +2963,81 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
2939
2963
|
LuzmoDashboard2 = __decorateClass([
|
|
2940
2964
|
t("luzmo-dashboard")
|
|
2941
2965
|
], 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);
|
|
2942
3041
|
/*! Bundled license information:
|
|
2943
3042
|
|
|
2944
3043
|
@lit/reactive-element/decorators/custom-element.js:
|
package/package.json
CHANGED
package/src/index.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, Filter, FilterExpression, FilterOrigin, FilterInput, FilterGroup, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode } from '@luzmo/shared-embed';
|
|
2
|
-
export * from './lib/dashboard-component/dashboard-component';
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as SharedLib from '@luzmo/shared-embed';
|
|
2
|
-
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
-
import { CombinedFilterInput } from '@luzmo/shared-embed';
|
|
4
|
-
/**
|
|
5
|
-
* Luzmo Dashboard
|
|
6
|
-
* Base component isn't registered in customEvents registry so that it can be reused.
|
|
7
|
-
*/
|
|
8
|
-
export declare class LuzmoDashboard extends LitElement implements SharedLib.ES6LuzmoDashboard {
|
|
9
|
-
container: HTMLElement;
|
|
10
|
-
luzmoEmbedContainer: HTMLElement;
|
|
11
|
-
iframe: HTMLIFrameElement;
|
|
12
|
-
dashboardId?: SharedLib.DashboardInputs['dashboardId'];
|
|
13
|
-
dashboardSlug?: SharedLib.DashboardInputs['dashboardSlug'];
|
|
14
|
-
itemId?: SharedLib.DashboardInputs['itemId'];
|
|
15
|
-
language: SharedLib.DashboardInputs['language'];
|
|
16
|
-
qeVersion: SharedLib.DashboardInputs['qeVersion'];
|
|
17
|
-
screenMode: SharedLib.DashboardInputs['screenMode'];
|
|
18
|
-
switchScreenModeOnResize: boolean;
|
|
19
|
-
editMode: SharedLib.DashboardInputs['editMode'];
|
|
20
|
-
mainColor?: SharedLib.DashboardInputs['mainColor'];
|
|
21
|
-
accentColor?: SharedLib.DashboardInputs['accentColor'];
|
|
22
|
-
authToken?: SharedLib.DashboardInputs['authToken'];
|
|
23
|
-
authKey?: SharedLib.DashboardInputs['authKey'];
|
|
24
|
-
loaderBackground?: SharedLib.DashboardInputs['loaderBackground'];
|
|
25
|
-
loaderFontColor?: SharedLib.DashboardInputs['loaderFontColor'];
|
|
26
|
-
loaderSpinnerColor?: SharedLib.DashboardInputs['loaderSpinnerColor'];
|
|
27
|
-
loaderSpinnerBackground?: SharedLib.DashboardInputs['loaderSpinnerBackground'];
|
|
28
|
-
appServer?: SharedLib.DashboardInputs['appServer'];
|
|
29
|
-
timezoneId?: SharedLib.DashboardInputs['timezoneId'];
|
|
30
|
-
apiHost?: SharedLib.DashboardInputs['apiHost'];
|
|
31
|
-
itemDimensions: SharedLib.DashboardInputs['itemDimensions'];
|
|
32
|
-
experimental: boolean;
|
|
33
|
-
_containerId: string;
|
|
34
|
-
_iframeId: string;
|
|
35
|
-
params: SharedLib.DashboardContentParams;
|
|
36
|
-
_iframeUrl?: string;
|
|
37
|
-
iframeLoaded: boolean;
|
|
38
|
-
promises: SharedLib.DashboardPromises;
|
|
39
|
-
iframeStyle: SharedLib.IframeStyles;
|
|
40
|
-
_containerStyle: SharedLib.ContainerStyles;
|
|
41
|
-
_loaderStyle: SharedLib.LoaderStyles;
|
|
42
|
-
_lcStyle: SharedLib.LcStyles;
|
|
43
|
-
_loadingCircleStyle: SharedLib.PlStyles;
|
|
44
|
-
_containerLoaderStyle: SharedLib.ContainerLoaderStyles;
|
|
45
|
-
_loaderMsg: string;
|
|
46
|
-
containerWidth?: number;
|
|
47
|
-
dimensions?: SharedLib.DashboardDimensions;
|
|
48
|
-
currentScreenMode?: SharedLib.ScreenMode;
|
|
49
|
-
_itemEmbedding: boolean;
|
|
50
|
-
browserError: boolean;
|
|
51
|
-
browserErrorMsg: string;
|
|
52
|
-
dashboardError: boolean;
|
|
53
|
-
browserNotSupported: any[];
|
|
54
|
-
VERSION: string;
|
|
55
|
-
protected isLibraryLoaded: boolean;
|
|
56
|
-
protected dashboardReference: SharedLib.LuzmoElement;
|
|
57
|
-
currentAuthKey: string;
|
|
58
|
-
currentAuthToken: string;
|
|
59
|
-
private attributesMap;
|
|
60
|
-
_loadTimeoutHandle?: number;
|
|
61
|
-
_onResize: () => void;
|
|
62
|
-
loaderSize: number;
|
|
63
|
-
borderWidth: number;
|
|
64
|
-
minHeight: number;
|
|
65
|
-
iframeHeight?: string;
|
|
66
|
-
iframeWidth?: string;
|
|
67
|
-
_resizeObserver: ResizeObserver;
|
|
68
|
-
constructor(inputParameters?: Record<keyof LuzmoDashboard, any>);
|
|
69
|
-
private loadLibrary;
|
|
70
|
-
private setInputParameters;
|
|
71
|
-
connectedCallback(): void;
|
|
72
|
-
disconnectedCallback(): void;
|
|
73
|
-
firstUpdated(): void;
|
|
74
|
-
initComponent(): void;
|
|
75
|
-
setAllAttributes(): void;
|
|
76
|
-
updated(changedProperties: PropertyValues): void;
|
|
77
|
-
_setOptions(): SharedLib.DashboardContentParams;
|
|
78
|
-
_updateIframeUrl(): void;
|
|
79
|
-
_setupLoader(): void;
|
|
80
|
-
_displayError(): void;
|
|
81
|
-
_calculateDimAfterDashboardLoaded(): void;
|
|
82
|
-
_loaderStyles(): void;
|
|
83
|
-
static get styles(): import("lit").CSSResult[];
|
|
84
|
-
render(): TemplateResult;
|
|
85
|
-
getDashboards(): Promise<LuzmoDashboard[]>;
|
|
86
|
-
getData(itemId: string): Promise<SharedLib.ItemData>;
|
|
87
|
-
getFilters(): Promise<SharedLib.FilterGroup[]>;
|
|
88
|
-
setFilters<K extends CombinedFilterInput>(itemId: string, filters: K): Promise<SharedLib.SetFilters>;
|
|
89
|
-
setAuthorization(key: string, token: string): Promise<void>;
|
|
90
|
-
refreshData(itemId?: string): Promise<void>;
|
|
91
|
-
reloadDashboard(): Promise<void>;
|
|
92
|
-
exportDashboard(format?: SharedLib.ExportType): Promise<SharedLib.ExportDashboard>;
|
|
93
|
-
getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
|
|
94
|
-
addFilters(itemId: string, filters: SharedLib.FilterGroup[]): Promise<SharedLib.AddFilters>;
|
|
95
|
-
setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
|
|
96
|
-
setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
|
|
97
|
-
getIsViewMode(): boolean;
|
|
98
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const _setEventHandler: () => void;
|