@luzmo/embed 5.0.13-beta.1 → 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/CHANGELOG.md +6 -0
- package/index.cjs +43 -31
- package/index.d.ts +1 -1
- package/index.js +44 -32
- package/index.libs.cjs +1191 -0
- package/index.libs.d.ts +1 -1
- package/index.libs.js +1170 -0
- 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 +4 -3
- package/luzmo-embed.libs.js +49 -35
- package/luzmo-embed.min.js +46 -32
- 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/CHANGELOG.md
CHANGED
package/index.cjs
CHANGED
|
@@ -55,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
55
55
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
56
56
|
|
|
57
57
|
// libs/embed-libs/embed/package.json
|
|
58
|
-
var version = "5.0.
|
|
58
|
+
var version = "5.0.14-beta.0";
|
|
59
59
|
|
|
60
60
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
61
61
|
var LuzmoService = class {
|
|
@@ -1095,14 +1095,17 @@ LuzmoDashboard2 = __decorateClass([
|
|
|
1095
1095
|
(0, import_decorators2.customElement)("luzmo-dashboard")
|
|
1096
1096
|
], LuzmoDashboard2);
|
|
1097
1097
|
|
|
1098
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
1099
|
+
var import_decorators4 = require("lit/decorators.js");
|
|
1100
|
+
|
|
1098
1101
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1099
1102
|
var import_decorators3 = require("lit/decorators.js");
|
|
1100
1103
|
var import_lit3 = require("lit");
|
|
1101
1104
|
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1102
|
-
var
|
|
1105
|
+
var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
1103
1106
|
constructor() {
|
|
1104
1107
|
super();
|
|
1105
|
-
this.appServer = "
|
|
1108
|
+
this.appServer = "https://app.luzmo.com";
|
|
1106
1109
|
this.apiHost = "https://api.luzmo.com";
|
|
1107
1110
|
this.slots = [];
|
|
1108
1111
|
this.options = {
|
|
@@ -1111,26 +1114,36 @@ var LuzmoVizItem = class extends import_lit3.LitElement {
|
|
|
1111
1114
|
},
|
|
1112
1115
|
theme: "default"
|
|
1113
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
|
+
`;
|
|
1114
1128
|
}
|
|
1115
|
-
firstUpdated(_changedProperties) {
|
|
1129
|
+
async firstUpdated(_changedProperties) {
|
|
1116
1130
|
super.firstUpdated(_changedProperties);
|
|
1117
1131
|
console.log(this.appServer);
|
|
1118
|
-
SharedLib3.loadLibrary(this.appServer, "DashboardApp")
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
});
|
|
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);
|
|
1124
1137
|
}
|
|
1125
|
-
|
|
1138
|
+
updateVizItemProperties() {
|
|
1126
1139
|
if (this.chartElement) {
|
|
1127
|
-
this.chartElement.setAttribute("app-server", this.appServer);
|
|
1128
|
-
this.chartElement.setAttribute("api-host", this.apiHost);
|
|
1129
1140
|
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1130
|
-
|
|
1141
|
+
const value = this[key];
|
|
1142
|
+
if (value) {
|
|
1143
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1131
1144
|
this.chartElement.setAttribute(
|
|
1132
1145
|
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1133
|
-
typeof
|
|
1146
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1134
1147
|
);
|
|
1135
1148
|
}
|
|
1136
1149
|
}
|
|
@@ -1140,37 +1153,36 @@ var LuzmoVizItem = class extends import_lit3.LitElement {
|
|
|
1140
1153
|
return import_lit3.html``;
|
|
1141
1154
|
}
|
|
1142
1155
|
};
|
|
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
1156
|
__decorateClass([
|
|
1152
1157
|
(0, import_decorators3.property)()
|
|
1153
|
-
],
|
|
1158
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1154
1159
|
__decorateClass([
|
|
1155
1160
|
(0, import_decorators3.property)()
|
|
1156
|
-
],
|
|
1161
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1157
1162
|
__decorateClass([
|
|
1158
1163
|
(0, import_decorators3.property)({ type: Array })
|
|
1159
|
-
],
|
|
1164
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1160
1165
|
__decorateClass([
|
|
1161
1166
|
(0, import_decorators3.property)({ type: Object })
|
|
1162
|
-
],
|
|
1167
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1168
|
+
__decorateClass([
|
|
1169
|
+
(0, import_decorators3.property)()
|
|
1170
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1163
1171
|
__decorateClass([
|
|
1164
1172
|
(0, import_decorators3.property)()
|
|
1165
|
-
],
|
|
1173
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1166
1174
|
__decorateClass([
|
|
1167
1175
|
(0, import_decorators3.property)()
|
|
1168
|
-
],
|
|
1176
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1169
1177
|
__decorateClass([
|
|
1170
1178
|
(0, import_decorators3.property)()
|
|
1171
|
-
],
|
|
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
|
+
};
|
|
1172
1184
|
LuzmoVizItem = __decorateClass([
|
|
1173
|
-
(0,
|
|
1185
|
+
(0, import_decorators4.customElement)("luzmo-viz-item")
|
|
1174
1186
|
], LuzmoVizItem);
|
|
1175
1187
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1176
1188
|
0 && (module.exports = {
|
package/index.d.ts
CHANGED
|
@@ -1,3 +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
|
|
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 {
|
|
@@ -1077,14 +1077,17 @@ LuzmoDashboard2 = __decorateClass([
|
|
|
1077
1077
|
customElement("luzmo-dashboard")
|
|
1078
1078
|
], LuzmoDashboard2);
|
|
1079
1079
|
|
|
1080
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
1081
|
+
import { customElement as customElement3 } from "lit/decorators.js";
|
|
1082
|
+
|
|
1080
1083
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1081
|
-
import {
|
|
1084
|
+
import { property as property2 } from "lit/decorators.js";
|
|
1082
1085
|
import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
|
|
1083
1086
|
import * as SharedLib3 from "@luzmo/shared-embed";
|
|
1084
|
-
var
|
|
1087
|
+
var LuzmoBaseVizItem = class extends LitElement2 {
|
|
1085
1088
|
constructor() {
|
|
1086
1089
|
super();
|
|
1087
|
-
this.appServer = "
|
|
1090
|
+
this.appServer = "https://app.luzmo.com";
|
|
1088
1091
|
this.apiHost = "https://api.luzmo.com";
|
|
1089
1092
|
this.slots = [];
|
|
1090
1093
|
this.options = {
|
|
@@ -1093,26 +1096,36 @@ var LuzmoVizItem = class extends LitElement2 {
|
|
|
1093
1096
|
},
|
|
1094
1097
|
theme: "default"
|
|
1095
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
|
+
`;
|
|
1096
1110
|
}
|
|
1097
|
-
firstUpdated(_changedProperties) {
|
|
1111
|
+
async firstUpdated(_changedProperties) {
|
|
1098
1112
|
super.firstUpdated(_changedProperties);
|
|
1099
1113
|
console.log(this.appServer);
|
|
1100
|
-
SharedLib3.loadLibrary(this.appServer, "DashboardApp")
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
});
|
|
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);
|
|
1106
1119
|
}
|
|
1107
|
-
|
|
1120
|
+
updateVizItemProperties() {
|
|
1108
1121
|
if (this.chartElement) {
|
|
1109
|
-
this.chartElement.setAttribute("app-server", this.appServer);
|
|
1110
|
-
this.chartElement.setAttribute("api-host", this.apiHost);
|
|
1111
1122
|
for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
|
|
1112
|
-
|
|
1123
|
+
const value = this[key];
|
|
1124
|
+
if (value) {
|
|
1125
|
+
const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
|
|
1113
1126
|
this.chartElement.setAttribute(
|
|
1114
1127
|
SharedLib3.libraryTypeToWebComponentTypeMapping[key],
|
|
1115
|
-
typeof
|
|
1128
|
+
typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
|
|
1116
1129
|
);
|
|
1117
1130
|
}
|
|
1118
1131
|
}
|
|
@@ -1122,37 +1135,36 @@ var LuzmoVizItem = class extends LitElement2 {
|
|
|
1122
1135
|
return html2``;
|
|
1123
1136
|
}
|
|
1124
1137
|
};
|
|
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
1138
|
__decorateClass([
|
|
1134
1139
|
property2()
|
|
1135
|
-
],
|
|
1140
|
+
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
1136
1141
|
__decorateClass([
|
|
1137
1142
|
property2()
|
|
1138
|
-
],
|
|
1143
|
+
], LuzmoBaseVizItem.prototype, "apiHost", 2);
|
|
1139
1144
|
__decorateClass([
|
|
1140
1145
|
property2({ type: Array })
|
|
1141
|
-
],
|
|
1146
|
+
], LuzmoBaseVizItem.prototype, "slots", 2);
|
|
1142
1147
|
__decorateClass([
|
|
1143
1148
|
property2({ type: Object })
|
|
1144
|
-
],
|
|
1149
|
+
], LuzmoBaseVizItem.prototype, "options", 2);
|
|
1150
|
+
__decorateClass([
|
|
1151
|
+
property2()
|
|
1152
|
+
], LuzmoBaseVizItem.prototype, "type", 2);
|
|
1145
1153
|
__decorateClass([
|
|
1146
1154
|
property2()
|
|
1147
|
-
],
|
|
1155
|
+
], LuzmoBaseVizItem.prototype, "authKey", 2);
|
|
1148
1156
|
__decorateClass([
|
|
1149
1157
|
property2()
|
|
1150
|
-
],
|
|
1158
|
+
], LuzmoBaseVizItem.prototype, "authToken", 2);
|
|
1151
1159
|
__decorateClass([
|
|
1152
1160
|
property2()
|
|
1153
|
-
],
|
|
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
|
+
};
|
|
1154
1166
|
LuzmoVizItem = __decorateClass([
|
|
1155
|
-
|
|
1167
|
+
customElement3("luzmo-viz-item")
|
|
1156
1168
|
], LuzmoVizItem);
|
|
1157
1169
|
export {
|
|
1158
1170
|
LuzmoDashboard2 as LuzmoDashboard,
|