@luzmo/embed 5.0.13 → 5.0.14-beta.0
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 +95 -3
- package/index.d.ts +1 -0
- package/index.js +93 -2
- package/index.libs.cjs +95 -3
- package/index.libs.d.ts +1 -0
- package/index.libs.js +93 -2
- package/lib/viz-item/viz-item-component.d.ts +3 -0
- package/lib/viz-item/viz-item-web-component.d.ts +3 -0
- package/lib/viz-item/viz-item.base.d.ts +18 -0
- package/luzmo-embed.libs.js +115 -2
- package/luzmo-embed.min.js +115 -2
- package/package.json +2 -2
- package/src/index.d.ts +3 -0
- package/src/lib/dashboard-component/dashboard-base.d.ts +98 -0
- package/src/lib/dashboard-component/dashboard-component.d.ts +3 -0
- package/src/lib/dashboard-component/dashboard-styles.d.ts +1 -0
- package/src/lib/helper/event-bus-handler.d.ts +1 -0
- package/src/lib/luzmo-service.d.ts +6 -0
- package/src/lib/viz-item/viz-item-component.d.ts +3 -0
- package/src/lib/viz-item/viz-item.base.d.ts +18 -0
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.14-beta.0";
|
|
58
59
|
|
|
59
60
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
60
61
|
var LuzmoService = class {
|
|
@@ -1093,7 +1094,98 @@ 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-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
|
+
console.log(this.appServer);
|
|
1132
|
+
await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
|
|
1133
|
+
this.chartElement = document.createElement("chart-component");
|
|
1134
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
1135
|
+
this.updateVizItemProperties();
|
|
1136
|
+
this.renderRoot.append(this.chartElement);
|
|
1137
|
+
}
|
|
1138
|
+
updateVizItemProperties() {
|
|
1139
|
+
if (this.chartElement) {
|
|
1140
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1141
|
+
const value = this[key];
|
|
1142
|
+
if (value) {
|
|
1143
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1144
|
+
this.chartElement.setAttribute(
|
|
1145
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1146
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1147
|
+
);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
render() {
|
|
1153
|
+
return import_lit3.html``;
|
|
1154
|
+
}
|
|
1155
|
+
};
|
|
1156
|
+
__decorateClass([
|
|
1157
|
+
(0, import_decorators3.property)()
|
|
1158
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1159
|
+
__decorateClass([
|
|
1160
|
+
(0, import_decorators3.property)()
|
|
1161
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1162
|
+
__decorateClass([
|
|
1163
|
+
(0, import_decorators3.property)({ type: Array })
|
|
1164
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1165
|
+
__decorateClass([
|
|
1166
|
+
(0, import_decorators3.property)({ type: Object })
|
|
1167
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1168
|
+
__decorateClass([
|
|
1169
|
+
(0, import_decorators3.property)()
|
|
1170
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1171
|
+
__decorateClass([
|
|
1172
|
+
(0, import_decorators3.property)()
|
|
1173
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1174
|
+
__decorateClass([
|
|
1175
|
+
(0, import_decorators3.property)()
|
|
1176
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1177
|
+
__decorateClass([
|
|
1178
|
+
(0, import_decorators3.property)()
|
|
1179
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
1180
|
+
|
|
1181
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
1182
|
+
var LuzmoVizItem = class extends LuzmoBaseVizItem {
|
|
1183
|
+
};
|
|
1184
|
+
LuzmoVizItem = __decorateClass([
|
|
1185
|
+
(0, import_decorators4.customElement)("luzmo-viz-item")
|
|
1186
|
+
], LuzmoVizItem);
|
|
1096
1187
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1097
1188
|
0 && (module.exports = {
|
|
1098
|
-
LuzmoDashboard
|
|
1189
|
+
LuzmoDashboard,
|
|
1190
|
+
LuzmoVizItem
|
|
1099
1191
|
});
|
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-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.
|
|
40
|
+
var version = "5.0.14-beta.0";
|
|
41
41
|
|
|
42
42
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
43
43
|
var LuzmoService = class {
|
|
@@ -1076,6 +1076,97 @@ 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
|
+
console.log(this.appServer);
|
|
1114
|
+
await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
|
|
1115
|
+
this.chartElement = document.createElement("chart-component");
|
|
1116
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
1117
|
+
this.updateVizItemProperties();
|
|
1118
|
+
this.renderRoot.append(this.chartElement);
|
|
1119
|
+
}
|
|
1120
|
+
updateVizItemProperties() {
|
|
1121
|
+
if (this.chartElement) {
|
|
1122
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1123
|
+
const value = this[key];
|
|
1124
|
+
if (value) {
|
|
1125
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1126
|
+
this.chartElement.setAttribute(
|
|
1127
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1128
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1129
|
+
);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
render() {
|
|
1135
|
+
return html2``;
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
__decorateClass([
|
|
1139
|
+
property2()
|
|
1140
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1141
|
+
__decorateClass([
|
|
1142
|
+
property2()
|
|
1143
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1144
|
+
__decorateClass([
|
|
1145
|
+
property2({ type: Array })
|
|
1146
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1147
|
+
__decorateClass([
|
|
1148
|
+
property2({ type: Object })
|
|
1149
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1150
|
+
__decorateClass([
|
|
1151
|
+
property2()
|
|
1152
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1153
|
+
__decorateClass([
|
|
1154
|
+
property2()
|
|
1155
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1156
|
+
__decorateClass([
|
|
1157
|
+
property2()
|
|
1158
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1159
|
+
__decorateClass([
|
|
1160
|
+
property2()
|
|
1161
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
1162
|
+
|
|
1163
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
1164
|
+
var LuzmoVizItem = class extends LuzmoBaseVizItem {
|
|
1165
|
+
};
|
|
1166
|
+
LuzmoVizItem = __decorateClass([
|
|
1167
|
+
customElement3("luzmo-viz-item")
|
|
1168
|
+
], LuzmoVizItem);
|
|
1079
1169
|
export {
|
|
1080
|
-
LuzmoDashboard2 as LuzmoDashboard
|
|
1170
|
+
LuzmoDashboard2 as LuzmoDashboard,
|
|
1171
|
+
LuzmoVizItem
|
|
1081
1172
|
};
|
package/index.libs.cjs
CHANGED
|
@@ -39,7 +39,8 @@ 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
|
|
42
|
+
LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent,
|
|
43
|
+
LuzmoVizItemWebComponent: () => LuzmoVizItemWebComponent
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(index_libs_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.14-beta.0";
|
|
58
59
|
|
|
59
60
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
60
61
|
var LuzmoService = class {
|
|
@@ -1093,7 +1094,98 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
|
|
|
1093
1094
|
LuzmoDashboardWebComponent = __decorateClass([
|
|
1094
1095
|
(0, import_decorators2.customElement)("luzmo-dashboard-web-component")
|
|
1095
1096
|
], 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
|
+
console.log(this.appServer);
|
|
1132
|
+
await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
|
|
1133
|
+
this.chartElement = document.createElement("chart-component");
|
|
1134
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
1135
|
+
this.updateVizItemProperties();
|
|
1136
|
+
this.renderRoot.append(this.chartElement);
|
|
1137
|
+
}
|
|
1138
|
+
updateVizItemProperties() {
|
|
1139
|
+
if (this.chartElement) {
|
|
1140
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1141
|
+
const value = this[key];
|
|
1142
|
+
if (value) {
|
|
1143
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1144
|
+
this.chartElement.setAttribute(
|
|
1145
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1146
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1147
|
+
);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
render() {
|
|
1153
|
+
return import_lit3.html``;
|
|
1154
|
+
}
|
|
1155
|
+
};
|
|
1156
|
+
__decorateClass([
|
|
1157
|
+
(0, import_decorators3.property)()
|
|
1158
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1159
|
+
__decorateClass([
|
|
1160
|
+
(0, import_decorators3.property)()
|
|
1161
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1162
|
+
__decorateClass([
|
|
1163
|
+
(0, import_decorators3.property)({ type: Array })
|
|
1164
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1165
|
+
__decorateClass([
|
|
1166
|
+
(0, import_decorators3.property)({ type: Object })
|
|
1167
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1168
|
+
__decorateClass([
|
|
1169
|
+
(0, import_decorators3.property)()
|
|
1170
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1171
|
+
__decorateClass([
|
|
1172
|
+
(0, import_decorators3.property)()
|
|
1173
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1174
|
+
__decorateClass([
|
|
1175
|
+
(0, import_decorators3.property)()
|
|
1176
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1177
|
+
__decorateClass([
|
|
1178
|
+
(0, import_decorators3.property)()
|
|
1179
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
1180
|
+
|
|
1181
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
|
|
1182
|
+
var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
|
|
1183
|
+
};
|
|
1184
|
+
LuzmoVizItemWebComponent = __decorateClass([
|
|
1185
|
+
(0, import_decorators4.customElement)("luzmo-viz-item-web-component")
|
|
1186
|
+
], LuzmoVizItemWebComponent);
|
|
1096
1187
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1097
1188
|
0 && (module.exports = {
|
|
1098
|
-
LuzmoDashboardWebComponent
|
|
1189
|
+
LuzmoDashboardWebComponent,
|
|
1190
|
+
LuzmoVizItemWebComponent
|
|
1099
1191
|
});
|
package/index.libs.d.ts
CHANGED
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.
|
|
38
|
+
var version = "5.0.14-beta.0";
|
|
39
39
|
|
|
40
40
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
41
41
|
var LuzmoService = class {
|
|
@@ -1074,6 +1074,97 @@ 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
|
+
console.log(this.appServer);
|
|
1112
|
+
await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
|
|
1113
|
+
this.chartElement = document.createElement("chart-component");
|
|
1114
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
1115
|
+
this.updateVizItemProperties();
|
|
1116
|
+
this.renderRoot.append(this.chartElement);
|
|
1117
|
+
}
|
|
1118
|
+
updateVizItemProperties() {
|
|
1119
|
+
if (this.chartElement) {
|
|
1120
|
+
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1121
|
+
const value = this[key];
|
|
1122
|
+
if (value) {
|
|
1123
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1124
|
+
this.chartElement.setAttribute(
|
|
1125
|
+
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1126
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
render() {
|
|
1133
|
+
return html2``;
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
__decorateClass([
|
|
1137
|
+
property2()
|
|
1138
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1139
|
+
__decorateClass([
|
|
1140
|
+
property2()
|
|
1141
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1142
|
+
__decorateClass([
|
|
1143
|
+
property2({ type: Array })
|
|
1144
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1145
|
+
__decorateClass([
|
|
1146
|
+
property2({ type: Object })
|
|
1147
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1148
|
+
__decorateClass([
|
|
1149
|
+
property2()
|
|
1150
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1151
|
+
__decorateClass([
|
|
1152
|
+
property2()
|
|
1153
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1154
|
+
__decorateClass([
|
|
1155
|
+
property2()
|
|
1156
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1157
|
+
__decorateClass([
|
|
1158
|
+
property2()
|
|
1159
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
1160
|
+
|
|
1161
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
|
|
1162
|
+
var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
|
|
1163
|
+
};
|
|
1164
|
+
LuzmoVizItemWebComponent = __decorateClass([
|
|
1165
|
+
customElement3("luzmo-viz-item-web-component")
|
|
1166
|
+
], LuzmoVizItemWebComponent);
|
|
1077
1167
|
export {
|
|
1078
|
-
LuzmoDashboardWebComponent
|
|
1168
|
+
LuzmoDashboardWebComponent,
|
|
1169
|
+
LuzmoVizItemWebComponent
|
|
1079
1170
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
protected render(): unknown;
|
|
18
|
+
}
|
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
|
+
LuzmoVizItemWebComponent: () => LuzmoVizItemWebComponent
|
|
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,21 @@ 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] = {
|
|
1574
|
+
url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
|
|
1575
|
+
format: "esm",
|
|
1576
|
+
from: "vite",
|
|
1577
|
+
module: void 0
|
|
1578
|
+
};
|
|
1579
|
+
const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
|
|
1580
|
+
const wrappedModule = __federationMethodWrapDefault(module2, true);
|
|
1581
|
+
remotesMap[appServer].module = wrappedModule;
|
|
1582
|
+
return wrappedModule;
|
|
1583
|
+
}
|
|
1555
1584
|
|
|
1556
1585
|
// node_modules/lit-html/lit-html.js
|
|
1557
1586
|
var t3 = globalThis;
|
|
@@ -1902,7 +1931,7 @@ var o5 = e6(class extends i4 {
|
|
|
1902
1931
|
});
|
|
1903
1932
|
|
|
1904
1933
|
// libs/embed-libs/embed/package.json
|
|
1905
|
-
var version = "5.0.
|
|
1934
|
+
var version = "5.0.14-beta.0";
|
|
1906
1935
|
|
|
1907
1936
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
1908
1937
|
var LuzmoService = class {
|
|
@@ -2939,6 +2968,90 @@ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
|
|
|
2939
2968
|
LuzmoDashboardWebComponent = __decorateClass([
|
|
2940
2969
|
t("luzmo-dashboard-web-component")
|
|
2941
2970
|
], LuzmoDashboardWebComponent);
|
|
2971
|
+
|
|
2972
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
2973
|
+
var LuzmoBaseVizItem = class extends s3 {
|
|
2974
|
+
constructor() {
|
|
2975
|
+
super();
|
|
2976
|
+
this.appServer = "https://app.luzmo.com";
|
|
2977
|
+
this.apiHost = "https://api.luzmo.com";
|
|
2978
|
+
this.slots = [];
|
|
2979
|
+
this.options = {
|
|
2980
|
+
title: {
|
|
2981
|
+
en: ""
|
|
2982
|
+
},
|
|
2983
|
+
theme: "default"
|
|
2984
|
+
};
|
|
2985
|
+
this.VERSION = version + "-wc-luzmo";
|
|
2986
|
+
}
|
|
2987
|
+
static {
|
|
2988
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
2989
|
+
this.styles = i`
|
|
2990
|
+
:host {
|
|
2991
|
+
display: block;
|
|
2992
|
+
width: 100%;
|
|
2993
|
+
height: 100%;
|
|
2994
|
+
}
|
|
2995
|
+
`;
|
|
2996
|
+
}
|
|
2997
|
+
async firstUpdated(_changedProperties) {
|
|
2998
|
+
super.firstUpdated(_changedProperties);
|
|
2999
|
+
console.log(this.appServer);
|
|
3000
|
+
await loadLibrary(this.appServer, "DashboardApp");
|
|
3001
|
+
this.chartElement = document.createElement("chart-component");
|
|
3002
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
3003
|
+
this.updateVizItemProperties();
|
|
3004
|
+
this.renderRoot.append(this.chartElement);
|
|
3005
|
+
}
|
|
3006
|
+
updateVizItemProperties() {
|
|
3007
|
+
if (this.chartElement) {
|
|
3008
|
+
for (const key in libraryTypeToWebComponentTypeMapping) {
|
|
3009
|
+
const value = this[key];
|
|
3010
|
+
if (value) {
|
|
3011
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? removeTrailingSlash(value) : value;
|
|
3012
|
+
this.chartElement.setAttribute(
|
|
3013
|
+
libraryTypeToWebComponentTypeMapping[key],
|
|
3014
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
3015
|
+
);
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
render() {
|
|
3021
|
+
return x``;
|
|
3022
|
+
}
|
|
3023
|
+
};
|
|
3024
|
+
__decorateClass([
|
|
3025
|
+
n3()
|
|
3026
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
3027
|
+
__decorateClass([
|
|
3028
|
+
n3()
|
|
3029
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
3030
|
+
__decorateClass([
|
|
3031
|
+
n3({ type: Array })
|
|
3032
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
3033
|
+
__decorateClass([
|
|
3034
|
+
n3({ type: Object })
|
|
3035
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
3036
|
+
__decorateClass([
|
|
3037
|
+
n3()
|
|
3038
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
3039
|
+
__decorateClass([
|
|
3040
|
+
n3()
|
|
3041
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
3042
|
+
__decorateClass([
|
|
3043
|
+
n3()
|
|
3044
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
3045
|
+
__decorateClass([
|
|
3046
|
+
n3()
|
|
3047
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
3048
|
+
|
|
3049
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
|
|
3050
|
+
var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
|
|
3051
|
+
};
|
|
3052
|
+
LuzmoVizItemWebComponent = __decorateClass([
|
|
3053
|
+
t("luzmo-viz-item-web-component")
|
|
3054
|
+
], LuzmoVizItemWebComponent);
|
|
2942
3055
|
/*! Bundled license information:
|
|
2943
3056
|
|
|
2944
3057
|
@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,21 @@ 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] = {
|
|
1574
|
+
url: appServer?.startsWith("http://localhost") ? `${removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
|
|
1575
|
+
format: "esm",
|
|
1576
|
+
from: "vite",
|
|
1577
|
+
module: void 0
|
|
1578
|
+
};
|
|
1579
|
+
const module2 = await __federationMethodGetRemote(appServer, `./${componentName}`);
|
|
1580
|
+
const wrappedModule = __federationMethodWrapDefault(module2, true);
|
|
1581
|
+
remotesMap[appServer].module = wrappedModule;
|
|
1582
|
+
return wrappedModule;
|
|
1583
|
+
}
|
|
1555
1584
|
|
|
1556
1585
|
// node_modules/lit-html/lit-html.js
|
|
1557
1586
|
var t3 = globalThis;
|
|
@@ -1902,7 +1931,7 @@ var o5 = e6(class extends i4 {
|
|
|
1902
1931
|
});
|
|
1903
1932
|
|
|
1904
1933
|
// libs/embed-libs/embed/package.json
|
|
1905
|
-
var version = "5.0.
|
|
1934
|
+
var version = "5.0.14-beta.0";
|
|
1906
1935
|
|
|
1907
1936
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
1908
1937
|
var LuzmoService = class {
|
|
@@ -2939,6 +2968,90 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
2939
2968
|
LuzmoDashboard2 = __decorateClass([
|
|
2940
2969
|
t("luzmo-dashboard")
|
|
2941
2970
|
], LuzmoDashboard2);
|
|
2971
|
+
|
|
2972
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
2973
|
+
var LuzmoBaseVizItem = class extends s3 {
|
|
2974
|
+
constructor() {
|
|
2975
|
+
super();
|
|
2976
|
+
this.appServer = "https://app.luzmo.com";
|
|
2977
|
+
this.apiHost = "https://api.luzmo.com";
|
|
2978
|
+
this.slots = [];
|
|
2979
|
+
this.options = {
|
|
2980
|
+
title: {
|
|
2981
|
+
en: ""
|
|
2982
|
+
},
|
|
2983
|
+
theme: "default"
|
|
2984
|
+
};
|
|
2985
|
+
this.VERSION = version + "-wc-luzmo";
|
|
2986
|
+
}
|
|
2987
|
+
static {
|
|
2988
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
2989
|
+
this.styles = i`
|
|
2990
|
+
:host {
|
|
2991
|
+
display: block;
|
|
2992
|
+
width: 100%;
|
|
2993
|
+
height: 100%;
|
|
2994
|
+
}
|
|
2995
|
+
`;
|
|
2996
|
+
}
|
|
2997
|
+
async firstUpdated(_changedProperties) {
|
|
2998
|
+
super.firstUpdated(_changedProperties);
|
|
2999
|
+
console.log(this.appServer);
|
|
3000
|
+
await loadLibrary(this.appServer, "DashboardApp");
|
|
3001
|
+
this.chartElement = document.createElement("chart-component");
|
|
3002
|
+
this.chartElement.setAttribute("embedding-mode", "chart");
|
|
3003
|
+
this.updateVizItemProperties();
|
|
3004
|
+
this.renderRoot.append(this.chartElement);
|
|
3005
|
+
}
|
|
3006
|
+
updateVizItemProperties() {
|
|
3007
|
+
if (this.chartElement) {
|
|
3008
|
+
for (const key in libraryTypeToWebComponentTypeMapping) {
|
|
3009
|
+
const value = this[key];
|
|
3010
|
+
if (value) {
|
|
3011
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? removeTrailingSlash(value) : value;
|
|
3012
|
+
this.chartElement.setAttribute(
|
|
3013
|
+
libraryTypeToWebComponentTypeMapping[key],
|
|
3014
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
3015
|
+
);
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
render() {
|
|
3021
|
+
return x``;
|
|
3022
|
+
}
|
|
3023
|
+
};
|
|
3024
|
+
__decorateClass([
|
|
3025
|
+
n3()
|
|
3026
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
3027
|
+
__decorateClass([
|
|
3028
|
+
n3()
|
|
3029
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
3030
|
+
__decorateClass([
|
|
3031
|
+
n3({ type: Array })
|
|
3032
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
3033
|
+
__decorateClass([
|
|
3034
|
+
n3({ type: Object })
|
|
3035
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
3036
|
+
__decorateClass([
|
|
3037
|
+
n3()
|
|
3038
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
3039
|
+
__decorateClass([
|
|
3040
|
+
n3()
|
|
3041
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
3042
|
+
__decorateClass([
|
|
3043
|
+
n3()
|
|
3044
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
3045
|
+
__decorateClass([
|
|
3046
|
+
n3()
|
|
3047
|
+
], LuzmoBaseVizItem.prototype, "VERSION", 2);
|
|
3048
|
+
|
|
3049
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
3050
|
+
var LuzmoVizItem = class extends LuzmoBaseVizItem {
|
|
3051
|
+
};
|
|
3052
|
+
LuzmoVizItem = __decorateClass([
|
|
3053
|
+
t("luzmo-viz-item")
|
|
3054
|
+
], LuzmoVizItem);
|
|
2942
3055
|
/*! Bundled license information:
|
|
2943
3056
|
|
|
2944
3057
|
@lit/reactive-element/decorators/custom-element.js:
|
package/package.json
CHANGED
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
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';
|
|
3
|
+
export * from './lib/viz-item/viz-item-component';
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const _setEventHandler: () => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
protected render(): unknown;
|
|
18
|
+
}
|