@luzmo/embed 6.2.6 → 6.3.0-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 +37 -24
- package/index.js +40 -38
- package/luzmo-embed.min.js +37 -20
- package/package.json +2 -2
- package/src/lib/dashboard-component/dashboard-base.d.ts +2 -6
- package/src/lib/dashboard-component/dashboard-component.d.ts +4 -4
- package/src/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +1 -0
- package/src/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +1 -0
- package/src/lib/viz-item/viz-item.base.d.ts +2 -2
package/index.cjs
CHANGED
|
@@ -56,13 +56,16 @@ var import_shared_embed2 = require("@luzmo/shared-embed");
|
|
|
56
56
|
|
|
57
57
|
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
58
58
|
var SharedLib2 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
59
|
+
var import_shared_embed = require("@luzmo/shared-embed");
|
|
59
60
|
var import_lit2 = require("lit");
|
|
60
61
|
var import_decorators = require("lit/decorators.js");
|
|
61
62
|
var import_style_map = require("lit/directives/style-map.js");
|
|
62
|
-
var import_shared_embed = require("@luzmo/shared-embed");
|
|
63
63
|
|
|
64
64
|
// libs/embed-libs/embed/package.json
|
|
65
|
-
var version = "6.
|
|
65
|
+
var version = "6.3.0-beta.0";
|
|
66
|
+
|
|
67
|
+
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
68
|
+
var SharedLib = __toESM(require("@luzmo/shared-embed"), 1);
|
|
66
69
|
|
|
67
70
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
68
71
|
var LuzmoService = class {
|
|
@@ -73,7 +76,6 @@ var LuzmoService = class {
|
|
|
73
76
|
var luzmo_service_default = new LuzmoService();
|
|
74
77
|
|
|
75
78
|
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
76
|
-
var SharedLib = __toESM(require("@luzmo/shared-embed"), 1);
|
|
77
79
|
var _setEventHandler = () => {
|
|
78
80
|
if (typeof window.__luzmoMessageHandler === "function") {
|
|
79
81
|
return;
|
|
@@ -361,6 +363,7 @@ var dashboardStyles = import_lit.css`
|
|
|
361
363
|
`;
|
|
362
364
|
|
|
363
365
|
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
366
|
+
var dashboardRemote = "DashboardApp";
|
|
364
367
|
var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
365
368
|
constructor() {
|
|
366
369
|
super();
|
|
@@ -471,7 +474,7 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
|
471
474
|
initComponent() {
|
|
472
475
|
this.params = this._setOptions();
|
|
473
476
|
if (this.getIsViewMode()) {
|
|
474
|
-
SharedLib2.loadLibrary(this.params.appServer).then(async () => {
|
|
477
|
+
SharedLib2.loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
|
|
475
478
|
this.isLibraryLoaded = true;
|
|
476
479
|
await this.updateComplete;
|
|
477
480
|
const oldReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -559,7 +562,7 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
|
559
562
|
if (this.dashboardReference) {
|
|
560
563
|
for (const [propertyName] of changedProperties.entries()) {
|
|
561
564
|
if (propertyName === "appSever") {
|
|
562
|
-
SharedLib2.loadLibrary(changedProperties[propertyName]).then(async () => {
|
|
565
|
+
SharedLib2.loadLibrary(changedProperties[propertyName], dashboardRemote).then(async () => {
|
|
563
566
|
this.isLibraryLoaded = true;
|
|
564
567
|
await this.updateComplete;
|
|
565
568
|
this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -1090,10 +1093,11 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1090
1093
|
}
|
|
1091
1094
|
|
|
1092
1095
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1093
|
-
var import_decorators2 = require("lit/decorators.js");
|
|
1094
|
-
var import_lit3 = require("lit");
|
|
1095
1096
|
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1097
|
+
var import_lit3 = require("lit");
|
|
1098
|
+
var import_decorators2 = require("lit/decorators.js");
|
|
1096
1099
|
var dashboardContentsVersion = "0.1.92";
|
|
1100
|
+
var vizItemRemote = "VizItemApp";
|
|
1097
1101
|
var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
1098
1102
|
constructor() {
|
|
1099
1103
|
super(...arguments);
|
|
@@ -1167,7 +1171,7 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
1167
1171
|
async firstUpdated(_changedProperties) {
|
|
1168
1172
|
super.firstUpdated(_changedProperties);
|
|
1169
1173
|
if (this.canInitializeVizItem()) {
|
|
1170
|
-
await SharedLib3.loadLibrary(this.appServer,
|
|
1174
|
+
await SharedLib3.loadLibrary(this.appServer, vizItemRemote);
|
|
1171
1175
|
this.createAndAppendElement();
|
|
1172
1176
|
}
|
|
1173
1177
|
}
|
|
@@ -1221,7 +1225,7 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
1221
1225
|
}
|
|
1222
1226
|
} else {
|
|
1223
1227
|
if (this.canInitializeVizItem()) {
|
|
1224
|
-
await SharedLib3.loadLibrary(this.appServer,
|
|
1228
|
+
await SharedLib3.loadLibrary(this.appServer, vizItemRemote);
|
|
1225
1229
|
this.createAndAppendElement();
|
|
1226
1230
|
}
|
|
1227
1231
|
}
|
|
@@ -1295,9 +1299,9 @@ if (!customElements.get("luzmo-embed-viz-item")) {
|
|
|
1295
1299
|
}
|
|
1296
1300
|
|
|
1297
1301
|
// libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-chat.ts
|
|
1298
|
-
var import_decorators3 = require("lit/decorators.js");
|
|
1299
|
-
var import_lit4 = require("lit");
|
|
1300
1302
|
var SharedLib4 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1303
|
+
var import_lit4 = require("lit");
|
|
1304
|
+
var import_decorators3 = require("lit/decorators.js");
|
|
1301
1305
|
var inputMap = {
|
|
1302
1306
|
aiEndpoint: "ai-endpoint",
|
|
1303
1307
|
appServer: "app-server",
|
|
@@ -1310,6 +1314,8 @@ var inputMap = {
|
|
|
1310
1314
|
libVersion: "lib-version",
|
|
1311
1315
|
aydHost: "ayd-host"
|
|
1312
1316
|
};
|
|
1317
|
+
var embedChatTag = "luzmo-iq-embed-chat";
|
|
1318
|
+
var chatComponentTag = "luzmo-iq-chat-component";
|
|
1313
1319
|
var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
1314
1320
|
constructor() {
|
|
1315
1321
|
super(...arguments);
|
|
@@ -1335,12 +1341,15 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1335
1341
|
}
|
|
1336
1342
|
async firstUpdated(_changedProperties) {
|
|
1337
1343
|
super.firstUpdated(_changedProperties);
|
|
1338
|
-
await SharedLib4.loadLibrary(this.
|
|
1344
|
+
await SharedLib4.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1339
1345
|
this.createAndAppendElement();
|
|
1340
1346
|
}
|
|
1347
|
+
get calculatedAppServer() {
|
|
1348
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
1349
|
+
}
|
|
1341
1350
|
createAndAppendElement() {
|
|
1342
1351
|
if (!this.chartElement) {
|
|
1343
|
-
this.chartElement = document.createElement(
|
|
1352
|
+
this.chartElement = document.createElement(chatComponentTag);
|
|
1344
1353
|
this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
|
|
1345
1354
|
this.updateVizItemProperties();
|
|
1346
1355
|
this.renderRoot.append(this.chartElement);
|
|
@@ -1368,7 +1377,7 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1368
1377
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
1369
1378
|
}
|
|
1370
1379
|
} else {
|
|
1371
|
-
await SharedLib4.loadLibrary(this.
|
|
1380
|
+
await SharedLib4.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1372
1381
|
this.createAndAppendElement();
|
|
1373
1382
|
}
|
|
1374
1383
|
}
|
|
@@ -1377,7 +1386,7 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1377
1386
|
}
|
|
1378
1387
|
connectedCallback() {
|
|
1379
1388
|
super.connectedCallback();
|
|
1380
|
-
const embedChat = document.querySelector(
|
|
1389
|
+
const embedChat = document.querySelector(embedChatTag);
|
|
1381
1390
|
if (!embedChat) {
|
|
1382
1391
|
return;
|
|
1383
1392
|
}
|
|
@@ -1386,7 +1395,7 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1386
1395
|
if (!customChatWidgetContentSlot) {
|
|
1387
1396
|
return;
|
|
1388
1397
|
}
|
|
1389
|
-
const chatElement = embedChat.querySelector(
|
|
1398
|
+
const chatElement = embedChat.querySelector(chatComponentTag);
|
|
1390
1399
|
if (chatElement) {
|
|
1391
1400
|
chatElement.append(customChatWidgetContentSlot);
|
|
1392
1401
|
observer.disconnect();
|
|
@@ -1428,14 +1437,14 @@ __decorateClass([
|
|
|
1428
1437
|
__decorateClass([
|
|
1429
1438
|
(0, import_decorators3.property)()
|
|
1430
1439
|
], LuzmoIQEmbedChatComponent.prototype, "aydHost", 2);
|
|
1431
|
-
if (!customElements.get(
|
|
1432
|
-
customElements.define(
|
|
1440
|
+
if (!customElements.get(embedChatTag)) {
|
|
1441
|
+
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
1433
1442
|
}
|
|
1434
1443
|
|
|
1435
1444
|
// libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-answer.ts
|
|
1436
|
-
var import_decorators4 = require("lit/decorators.js");
|
|
1437
|
-
var import_lit5 = require("lit");
|
|
1438
1445
|
var SharedLib5 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1446
|
+
var import_lit5 = require("lit");
|
|
1447
|
+
var import_decorators4 = require("lit/decorators.js");
|
|
1439
1448
|
var inputMap2 = {
|
|
1440
1449
|
aiEndPoint: "ai-end-point",
|
|
1441
1450
|
appServer: "app-server",
|
|
@@ -1447,6 +1456,7 @@ var inputMap2 = {
|
|
|
1447
1456
|
libVersion: "lib-version",
|
|
1448
1457
|
messages: "messages"
|
|
1449
1458
|
};
|
|
1459
|
+
var componentTag = "luzmo-iq-embed-answer";
|
|
1450
1460
|
var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
|
|
1451
1461
|
constructor() {
|
|
1452
1462
|
super(...arguments);
|
|
@@ -1471,9 +1481,12 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
|
|
|
1471
1481
|
}
|
|
1472
1482
|
async firstUpdated(_changedProperties) {
|
|
1473
1483
|
super.firstUpdated(_changedProperties);
|
|
1474
|
-
await SharedLib5.loadLibrary(this.
|
|
1484
|
+
await SharedLib5.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1475
1485
|
this.createAndAppendElement();
|
|
1476
1486
|
}
|
|
1487
|
+
get calculatedAppServer() {
|
|
1488
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
1489
|
+
}
|
|
1477
1490
|
createAndAppendElement() {
|
|
1478
1491
|
if (!this.chartElement) {
|
|
1479
1492
|
this.chartElement = document.createElement("luzmo-iq-answer-component");
|
|
@@ -1505,7 +1518,7 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
|
|
|
1505
1518
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
1506
1519
|
}
|
|
1507
1520
|
} else {
|
|
1508
|
-
await SharedLib5.loadLibrary(this.
|
|
1521
|
+
await SharedLib5.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1509
1522
|
this.createAndAppendElement();
|
|
1510
1523
|
}
|
|
1511
1524
|
}
|
|
@@ -1543,8 +1556,8 @@ __decorateClass([
|
|
|
1543
1556
|
__decorateClass([
|
|
1544
1557
|
(0, import_decorators4.property)()
|
|
1545
1558
|
], LuzmoIQEmbedAnswerComponent.prototype, "remoteEntryServer", 2);
|
|
1546
|
-
if (!customElements.get(
|
|
1547
|
-
customElements.define(
|
|
1559
|
+
if (!customElements.get(componentTag)) {
|
|
1560
|
+
customElements.define(componentTag, LuzmoIQEmbedAnswerComponent);
|
|
1548
1561
|
}
|
|
1549
1562
|
|
|
1550
1563
|
// libs/embed-libs/embed/src/lib/helper/json-schema-utils.ts
|
package/index.js
CHANGED
|
@@ -15,24 +15,16 @@ import { selectedDataUtils } from "@luzmo/shared-embed";
|
|
|
15
15
|
|
|
16
16
|
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
17
17
|
import * as SharedLib2 from "@luzmo/shared-embed";
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "lit";
|
|
22
|
-
import {
|
|
23
|
-
property,
|
|
24
|
-
query,
|
|
25
|
-
state
|
|
26
|
-
} from "lit/decorators.js";
|
|
27
|
-
import {
|
|
28
|
-
styleMap
|
|
29
|
-
} from "lit/directives/style-map.js";
|
|
30
|
-
import {
|
|
31
|
-
luzmoEmbedContainerClass
|
|
32
|
-
} from "@luzmo/shared-embed";
|
|
18
|
+
import { luzmoEmbedContainerClass } from "@luzmo/shared-embed";
|
|
19
|
+
import { html, LitElement } from "lit";
|
|
20
|
+
import { property, query, state } from "lit/decorators.js";
|
|
21
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
33
22
|
|
|
34
23
|
// libs/embed-libs/embed/package.json
|
|
35
|
-
var version = "6.
|
|
24
|
+
var version = "6.3.0-beta.0";
|
|
25
|
+
|
|
26
|
+
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
27
|
+
import * as SharedLib from "@luzmo/shared-embed";
|
|
36
28
|
|
|
37
29
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
38
30
|
var LuzmoService = class {
|
|
@@ -43,7 +35,6 @@ var LuzmoService = class {
|
|
|
43
35
|
var luzmo_service_default = new LuzmoService();
|
|
44
36
|
|
|
45
37
|
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
46
|
-
import * as SharedLib from "@luzmo/shared-embed";
|
|
47
38
|
var _setEventHandler = () => {
|
|
48
39
|
if (typeof window.__luzmoMessageHandler === "function") {
|
|
49
40
|
return;
|
|
@@ -331,6 +322,7 @@ var dashboardStyles = css`
|
|
|
331
322
|
`;
|
|
332
323
|
|
|
333
324
|
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
325
|
+
var dashboardRemote = "DashboardApp";
|
|
334
326
|
var LuzmoDashboard = class extends LitElement {
|
|
335
327
|
constructor() {
|
|
336
328
|
super();
|
|
@@ -441,7 +433,7 @@ var LuzmoDashboard = class extends LitElement {
|
|
|
441
433
|
initComponent() {
|
|
442
434
|
this.params = this._setOptions();
|
|
443
435
|
if (this.getIsViewMode()) {
|
|
444
|
-
SharedLib2.loadLibrary(this.params.appServer).then(async () => {
|
|
436
|
+
SharedLib2.loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
|
|
445
437
|
this.isLibraryLoaded = true;
|
|
446
438
|
await this.updateComplete;
|
|
447
439
|
const oldReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -529,7 +521,7 @@ var LuzmoDashboard = class extends LitElement {
|
|
|
529
521
|
if (this.dashboardReference) {
|
|
530
522
|
for (const [propertyName] of changedProperties.entries()) {
|
|
531
523
|
if (propertyName === "appSever") {
|
|
532
|
-
SharedLib2.loadLibrary(changedProperties[propertyName]).then(async () => {
|
|
524
|
+
SharedLib2.loadLibrary(changedProperties[propertyName], dashboardRemote).then(async () => {
|
|
533
525
|
this.isLibraryLoaded = true;
|
|
534
526
|
await this.updateComplete;
|
|
535
527
|
this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -1060,10 +1052,11 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1060
1052
|
}
|
|
1061
1053
|
|
|
1062
1054
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1063
|
-
import { property as property2 } from "lit/decorators.js";
|
|
1064
|
-
import { LitElement as LitElement2, html as html2, css as css2 } from "lit";
|
|
1065
1055
|
import * as SharedLib3 from "@luzmo/shared-embed";
|
|
1056
|
+
import { css as css2, html as html2, LitElement as LitElement2 } from "lit";
|
|
1057
|
+
import { property as property2 } from "lit/decorators.js";
|
|
1066
1058
|
var dashboardContentsVersion = "0.1.92";
|
|
1059
|
+
var vizItemRemote = "VizItemApp";
|
|
1067
1060
|
var LuzmoBaseVizItem = class extends LitElement2 {
|
|
1068
1061
|
constructor() {
|
|
1069
1062
|
super(...arguments);
|
|
@@ -1137,7 +1130,7 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
1137
1130
|
async firstUpdated(_changedProperties) {
|
|
1138
1131
|
super.firstUpdated(_changedProperties);
|
|
1139
1132
|
if (this.canInitializeVizItem()) {
|
|
1140
|
-
await SharedLib3.loadLibrary(this.appServer,
|
|
1133
|
+
await SharedLib3.loadLibrary(this.appServer, vizItemRemote);
|
|
1141
1134
|
this.createAndAppendElement();
|
|
1142
1135
|
}
|
|
1143
1136
|
}
|
|
@@ -1191,7 +1184,7 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
1191
1184
|
}
|
|
1192
1185
|
} else {
|
|
1193
1186
|
if (this.canInitializeVizItem()) {
|
|
1194
|
-
await SharedLib3.loadLibrary(this.appServer,
|
|
1187
|
+
await SharedLib3.loadLibrary(this.appServer, vizItemRemote);
|
|
1195
1188
|
this.createAndAppendElement();
|
|
1196
1189
|
}
|
|
1197
1190
|
}
|
|
@@ -1265,9 +1258,9 @@ if (!customElements.get("luzmo-embed-viz-item")) {
|
|
|
1265
1258
|
}
|
|
1266
1259
|
|
|
1267
1260
|
// libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-chat.ts
|
|
1268
|
-
import { property as property3 } from "lit/decorators.js";
|
|
1269
|
-
import { LitElement as LitElement3, html as html3, css as css3 } from "lit";
|
|
1270
1261
|
import * as SharedLib4 from "@luzmo/shared-embed";
|
|
1262
|
+
import { css as css3, html as html3, LitElement as LitElement3 } from "lit";
|
|
1263
|
+
import { property as property3 } from "lit/decorators.js";
|
|
1271
1264
|
var inputMap = {
|
|
1272
1265
|
aiEndpoint: "ai-endpoint",
|
|
1273
1266
|
appServer: "app-server",
|
|
@@ -1280,6 +1273,8 @@ var inputMap = {
|
|
|
1280
1273
|
libVersion: "lib-version",
|
|
1281
1274
|
aydHost: "ayd-host"
|
|
1282
1275
|
};
|
|
1276
|
+
var embedChatTag = "luzmo-iq-embed-chat";
|
|
1277
|
+
var chatComponentTag = "luzmo-iq-chat-component";
|
|
1283
1278
|
var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
1284
1279
|
constructor() {
|
|
1285
1280
|
super(...arguments);
|
|
@@ -1305,12 +1300,15 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1305
1300
|
}
|
|
1306
1301
|
async firstUpdated(_changedProperties) {
|
|
1307
1302
|
super.firstUpdated(_changedProperties);
|
|
1308
|
-
await SharedLib4.loadLibrary(this.
|
|
1303
|
+
await SharedLib4.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1309
1304
|
this.createAndAppendElement();
|
|
1310
1305
|
}
|
|
1306
|
+
get calculatedAppServer() {
|
|
1307
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
1308
|
+
}
|
|
1311
1309
|
createAndAppendElement() {
|
|
1312
1310
|
if (!this.chartElement) {
|
|
1313
|
-
this.chartElement = document.createElement(
|
|
1311
|
+
this.chartElement = document.createElement(chatComponentTag);
|
|
1314
1312
|
this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
|
|
1315
1313
|
this.updateVizItemProperties();
|
|
1316
1314
|
this.renderRoot.append(this.chartElement);
|
|
@@ -1338,7 +1336,7 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1338
1336
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
1339
1337
|
}
|
|
1340
1338
|
} else {
|
|
1341
|
-
await SharedLib4.loadLibrary(this.
|
|
1339
|
+
await SharedLib4.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1342
1340
|
this.createAndAppendElement();
|
|
1343
1341
|
}
|
|
1344
1342
|
}
|
|
@@ -1347,7 +1345,7 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1347
1345
|
}
|
|
1348
1346
|
connectedCallback() {
|
|
1349
1347
|
super.connectedCallback();
|
|
1350
|
-
const embedChat = document.querySelector(
|
|
1348
|
+
const embedChat = document.querySelector(embedChatTag);
|
|
1351
1349
|
if (!embedChat) {
|
|
1352
1350
|
return;
|
|
1353
1351
|
}
|
|
@@ -1356,7 +1354,7 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1356
1354
|
if (!customChatWidgetContentSlot) {
|
|
1357
1355
|
return;
|
|
1358
1356
|
}
|
|
1359
|
-
const chatElement = embedChat.querySelector(
|
|
1357
|
+
const chatElement = embedChat.querySelector(chatComponentTag);
|
|
1360
1358
|
if (chatElement) {
|
|
1361
1359
|
chatElement.append(customChatWidgetContentSlot);
|
|
1362
1360
|
observer.disconnect();
|
|
@@ -1398,14 +1396,14 @@ __decorateClass([
|
|
|
1398
1396
|
__decorateClass([
|
|
1399
1397
|
property3()
|
|
1400
1398
|
], LuzmoIQEmbedChatComponent.prototype, "aydHost", 2);
|
|
1401
|
-
if (!customElements.get(
|
|
1402
|
-
customElements.define(
|
|
1399
|
+
if (!customElements.get(embedChatTag)) {
|
|
1400
|
+
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
1403
1401
|
}
|
|
1404
1402
|
|
|
1405
1403
|
// libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-answer.ts
|
|
1406
|
-
import { property as property4 } from "lit/decorators.js";
|
|
1407
|
-
import { LitElement as LitElement4, html as html4, css as css4 } from "lit";
|
|
1408
1404
|
import * as SharedLib5 from "@luzmo/shared-embed";
|
|
1405
|
+
import { css as css4, html as html4, LitElement as LitElement4 } from "lit";
|
|
1406
|
+
import { property as property4 } from "lit/decorators.js";
|
|
1409
1407
|
var inputMap2 = {
|
|
1410
1408
|
aiEndPoint: "ai-end-point",
|
|
1411
1409
|
appServer: "app-server",
|
|
@@ -1417,6 +1415,7 @@ var inputMap2 = {
|
|
|
1417
1415
|
libVersion: "lib-version",
|
|
1418
1416
|
messages: "messages"
|
|
1419
1417
|
};
|
|
1418
|
+
var componentTag = "luzmo-iq-embed-answer";
|
|
1420
1419
|
var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
1421
1420
|
constructor() {
|
|
1422
1421
|
super(...arguments);
|
|
@@ -1441,9 +1440,12 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
1441
1440
|
}
|
|
1442
1441
|
async firstUpdated(_changedProperties) {
|
|
1443
1442
|
super.firstUpdated(_changedProperties);
|
|
1444
|
-
await SharedLib5.loadLibrary(this.
|
|
1443
|
+
await SharedLib5.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1445
1444
|
this.createAndAppendElement();
|
|
1446
1445
|
}
|
|
1446
|
+
get calculatedAppServer() {
|
|
1447
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
1448
|
+
}
|
|
1447
1449
|
createAndAppendElement() {
|
|
1448
1450
|
if (!this.chartElement) {
|
|
1449
1451
|
this.chartElement = document.createElement("luzmo-iq-answer-component");
|
|
@@ -1475,7 +1477,7 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
1475
1477
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
1476
1478
|
}
|
|
1477
1479
|
} else {
|
|
1478
|
-
await SharedLib5.loadLibrary(this.
|
|
1480
|
+
await SharedLib5.loadLibrary(this.calculatedAppServer, "IQApp");
|
|
1479
1481
|
this.createAndAppendElement();
|
|
1480
1482
|
}
|
|
1481
1483
|
}
|
|
@@ -1513,8 +1515,8 @@ __decorateClass([
|
|
|
1513
1515
|
__decorateClass([
|
|
1514
1516
|
property4()
|
|
1515
1517
|
], LuzmoIQEmbedAnswerComponent.prototype, "remoteEntryServer", 2);
|
|
1516
|
-
if (!customElements.get(
|
|
1517
|
-
customElements.define(
|
|
1518
|
+
if (!customElements.get(componentTag)) {
|
|
1519
|
+
customElements.define(componentTag, LuzmoIQEmbedAnswerComponent);
|
|
1518
1520
|
}
|
|
1519
1521
|
|
|
1520
1522
|
// libs/embed-libs/embed/src/lib/helper/json-schema-utils.ts
|
package/luzmo-embed.min.js
CHANGED
|
@@ -1308,10 +1308,16 @@ async function loadLibrary(appServer, componentName = "DashboardApp") {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
let url = `${removeTrailingSlash(appServer)}/remoteEntry.mjs`;
|
|
1310
1310
|
if (!appServer.startsWith("http://localhost")) {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1311
|
+
switch (componentName) {
|
|
1312
|
+
case "DashboardApp":
|
|
1313
|
+
case "VizItemApp": {
|
|
1314
|
+
url = `${removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`;
|
|
1315
|
+
break;
|
|
1316
|
+
}
|
|
1317
|
+
case "IQApp": {
|
|
1318
|
+
url = `${removeTrailingSlash(appServer)}/iq-components/remoteEntry.mjs`;
|
|
1319
|
+
break;
|
|
1320
|
+
}
|
|
1315
1321
|
}
|
|
1316
1322
|
}
|
|
1317
1323
|
remotesMap[remotesMapIndex] = {
|
|
@@ -2020,7 +2026,7 @@ var se = e5(class extends i3 {
|
|
|
2020
2026
|
});
|
|
2021
2027
|
|
|
2022
2028
|
// libs/embed-libs/embed/package.json
|
|
2023
|
-
var version = "6.
|
|
2029
|
+
var version = "6.3.0-beta.0";
|
|
2024
2030
|
|
|
2025
2031
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
2026
2032
|
var LuzmoService = class {
|
|
@@ -2317,6 +2323,7 @@ var dashboardStyles = i`
|
|
|
2317
2323
|
`;
|
|
2318
2324
|
|
|
2319
2325
|
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
2326
|
+
var dashboardRemote = "DashboardApp";
|
|
2320
2327
|
var LuzmoDashboard = class extends h3 {
|
|
2321
2328
|
constructor() {
|
|
2322
2329
|
super();
|
|
@@ -2427,7 +2434,7 @@ var LuzmoDashboard = class extends h3 {
|
|
|
2427
2434
|
initComponent() {
|
|
2428
2435
|
this.params = this._setOptions();
|
|
2429
2436
|
if (this.getIsViewMode()) {
|
|
2430
|
-
loadLibrary(this.params.appServer).then(async () => {
|
|
2437
|
+
loadLibrary(this.params.appServer, dashboardRemote).then(async () => {
|
|
2431
2438
|
this.isLibraryLoaded = true;
|
|
2432
2439
|
await this.updateComplete;
|
|
2433
2440
|
const oldReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -2515,7 +2522,7 @@ var LuzmoDashboard = class extends h3 {
|
|
|
2515
2522
|
if (this.dashboardReference) {
|
|
2516
2523
|
for (const [propertyName] of changedProperties.entries()) {
|
|
2517
2524
|
if (propertyName === "appSever") {
|
|
2518
|
-
loadLibrary(changedProperties[propertyName]).then(async () => {
|
|
2525
|
+
loadLibrary(changedProperties[propertyName], dashboardRemote).then(async () => {
|
|
2519
2526
|
this.isLibraryLoaded = true;
|
|
2520
2527
|
await this.updateComplete;
|
|
2521
2528
|
this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
|
|
@@ -3047,6 +3054,7 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
3047
3054
|
|
|
3048
3055
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
3049
3056
|
var dashboardContentsVersion = "0.1.92";
|
|
3057
|
+
var vizItemRemote = "VizItemApp";
|
|
3050
3058
|
var LuzmoBaseVizItem = class extends h3 {
|
|
3051
3059
|
constructor() {
|
|
3052
3060
|
super(...arguments);
|
|
@@ -3120,7 +3128,7 @@ var LuzmoBaseVizItem = class extends h3 {
|
|
|
3120
3128
|
async firstUpdated(_changedProperties) {
|
|
3121
3129
|
super.firstUpdated(_changedProperties);
|
|
3122
3130
|
if (this.canInitializeVizItem()) {
|
|
3123
|
-
await loadLibrary(this.appServer,
|
|
3131
|
+
await loadLibrary(this.appServer, vizItemRemote);
|
|
3124
3132
|
this.createAndAppendElement();
|
|
3125
3133
|
}
|
|
3126
3134
|
}
|
|
@@ -3174,7 +3182,7 @@ var LuzmoBaseVizItem = class extends h3 {
|
|
|
3174
3182
|
}
|
|
3175
3183
|
} else {
|
|
3176
3184
|
if (this.canInitializeVizItem()) {
|
|
3177
|
-
await loadLibrary(this.appServer,
|
|
3185
|
+
await loadLibrary(this.appServer, vizItemRemote);
|
|
3178
3186
|
this.createAndAppendElement();
|
|
3179
3187
|
}
|
|
3180
3188
|
}
|
|
@@ -3260,6 +3268,8 @@ var inputMap = {
|
|
|
3260
3268
|
libVersion: "lib-version",
|
|
3261
3269
|
aydHost: "ayd-host"
|
|
3262
3270
|
};
|
|
3271
|
+
var embedChatTag = "luzmo-iq-embed-chat";
|
|
3272
|
+
var chatComponentTag = "luzmo-iq-chat-component";
|
|
3263
3273
|
var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
3264
3274
|
constructor() {
|
|
3265
3275
|
super(...arguments);
|
|
@@ -3285,12 +3295,15 @@ var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
|
3285
3295
|
}
|
|
3286
3296
|
async firstUpdated(_changedProperties) {
|
|
3287
3297
|
super.firstUpdated(_changedProperties);
|
|
3288
|
-
await loadLibrary(this.
|
|
3298
|
+
await loadLibrary(this.calculatedAppServer, "IQApp");
|
|
3289
3299
|
this.createAndAppendElement();
|
|
3290
3300
|
}
|
|
3301
|
+
get calculatedAppServer() {
|
|
3302
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
3303
|
+
}
|
|
3291
3304
|
createAndAppendElement() {
|
|
3292
3305
|
if (!this.chartElement) {
|
|
3293
|
-
this.chartElement = document.createElement(
|
|
3306
|
+
this.chartElement = document.createElement(chatComponentTag);
|
|
3294
3307
|
this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
|
|
3295
3308
|
this.updateVizItemProperties();
|
|
3296
3309
|
this.renderRoot.append(this.chartElement);
|
|
@@ -3318,7 +3331,7 @@ var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
|
3318
3331
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
3319
3332
|
}
|
|
3320
3333
|
} else {
|
|
3321
|
-
await loadLibrary(this.
|
|
3334
|
+
await loadLibrary(this.calculatedAppServer, "IQApp");
|
|
3322
3335
|
this.createAndAppendElement();
|
|
3323
3336
|
}
|
|
3324
3337
|
}
|
|
@@ -3327,7 +3340,7 @@ var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
|
3327
3340
|
}
|
|
3328
3341
|
connectedCallback() {
|
|
3329
3342
|
super.connectedCallback();
|
|
3330
|
-
const embedChat = document.querySelector(
|
|
3343
|
+
const embedChat = document.querySelector(embedChatTag);
|
|
3331
3344
|
if (!embedChat) {
|
|
3332
3345
|
return;
|
|
3333
3346
|
}
|
|
@@ -3336,7 +3349,7 @@ var LuzmoIQEmbedChatComponent = class extends h3 {
|
|
|
3336
3349
|
if (!customChatWidgetContentSlot) {
|
|
3337
3350
|
return;
|
|
3338
3351
|
}
|
|
3339
|
-
const chatElement = embedChat.querySelector(
|
|
3352
|
+
const chatElement = embedChat.querySelector(chatComponentTag);
|
|
3340
3353
|
if (chatElement) {
|
|
3341
3354
|
chatElement.append(customChatWidgetContentSlot);
|
|
3342
3355
|
observer.disconnect();
|
|
@@ -3378,8 +3391,8 @@ __decorateClass([
|
|
|
3378
3391
|
__decorateClass([
|
|
3379
3392
|
n4()
|
|
3380
3393
|
], LuzmoIQEmbedChatComponent.prototype, "aydHost", 2);
|
|
3381
|
-
if (!customElements.get(
|
|
3382
|
-
customElements.define(
|
|
3394
|
+
if (!customElements.get(embedChatTag)) {
|
|
3395
|
+
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
3383
3396
|
}
|
|
3384
3397
|
|
|
3385
3398
|
// libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-answer.ts
|
|
@@ -3394,6 +3407,7 @@ var inputMap2 = {
|
|
|
3394
3407
|
libVersion: "lib-version",
|
|
3395
3408
|
messages: "messages"
|
|
3396
3409
|
};
|
|
3410
|
+
var componentTag = "luzmo-iq-embed-answer";
|
|
3397
3411
|
var LuzmoIQEmbedAnswerComponent = class extends h3 {
|
|
3398
3412
|
constructor() {
|
|
3399
3413
|
super(...arguments);
|
|
@@ -3418,9 +3432,12 @@ var LuzmoIQEmbedAnswerComponent = class extends h3 {
|
|
|
3418
3432
|
}
|
|
3419
3433
|
async firstUpdated(_changedProperties) {
|
|
3420
3434
|
super.firstUpdated(_changedProperties);
|
|
3421
|
-
await loadLibrary(this.
|
|
3435
|
+
await loadLibrary(this.calculatedAppServer, "IQApp");
|
|
3422
3436
|
this.createAndAppendElement();
|
|
3423
3437
|
}
|
|
3438
|
+
get calculatedAppServer() {
|
|
3439
|
+
return this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer;
|
|
3440
|
+
}
|
|
3424
3441
|
createAndAppendElement() {
|
|
3425
3442
|
if (!this.chartElement) {
|
|
3426
3443
|
this.chartElement = document.createElement("luzmo-iq-answer-component");
|
|
@@ -3452,7 +3469,7 @@ var LuzmoIQEmbedAnswerComponent = class extends h3 {
|
|
|
3452
3469
|
this.chartElement.setAttribute(mappedAttributeName, attributeValue);
|
|
3453
3470
|
}
|
|
3454
3471
|
} else {
|
|
3455
|
-
await loadLibrary(this.
|
|
3472
|
+
await loadLibrary(this.calculatedAppServer, "IQApp");
|
|
3456
3473
|
this.createAndAppendElement();
|
|
3457
3474
|
}
|
|
3458
3475
|
}
|
|
@@ -3490,8 +3507,8 @@ __decorateClass([
|
|
|
3490
3507
|
__decorateClass([
|
|
3491
3508
|
n4()
|
|
3492
3509
|
], LuzmoIQEmbedAnswerComponent.prototype, "remoteEntryServer", 2);
|
|
3493
|
-
if (!customElements.get(
|
|
3494
|
-
customElements.define(
|
|
3510
|
+
if (!customElements.get(componentTag)) {
|
|
3511
|
+
customElements.define(componentTag, LuzmoIQEmbedAnswerComponent);
|
|
3495
3512
|
}
|
|
3496
3513
|
|
|
3497
3514
|
// libs/embed-libs/embed/src/lib/helper/json-schema-utils.ts
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/embed",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0-beta.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "3.1.2",
|
|
6
|
-
"@luzmo/shared-embed": "5.
|
|
6
|
+
"@luzmo/shared-embed": "5.3.0-beta.0",
|
|
7
7
|
"@luzmo/dashboard-contents-types": "1.0.10"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
+
import type { FilterGroup } from '@luzmo/dashboard-contents-types';
|
|
1
2
|
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
+
import { CombinedSelectedDataInput, LuzmoElement } from '@luzmo/shared-embed';
|
|
2
4
|
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
-
import { LuzmoElement, CombinedSelectedDataInput } from '@luzmo/shared-embed';
|
|
4
|
-
import type { FilterGroup } from '@luzmo/dashboard-contents-types';
|
|
5
|
-
/**
|
|
6
|
-
* Luzmo Dashboard
|
|
7
|
-
* Base component isn't registered in customEvents registry so that it can be reused.
|
|
8
|
-
*/
|
|
9
5
|
export declare class LuzmoDashboard extends LitElement implements SharedLib.ES6LuzmoDashboard {
|
|
10
6
|
container: HTMLElement;
|
|
11
7
|
luzmoEmbedContainer: HTMLElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LuzmoDashboard } from './dashboard-base';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/**!
|
|
3
|
+
* @element luzmo-embed-dashboard
|
|
4
|
+
* @description Exposed by @luzmo/embed lib to everyone.
|
|
5
|
+
*
|
|
6
6
|
*/
|
|
7
7
|
export declare class LuzmoEmbedDashboard extends LuzmoDashboard {
|
|
8
8
|
}
|
|
@@ -15,6 +15,7 @@ export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
|
|
|
15
15
|
static styles: import("lit").CSSResult;
|
|
16
16
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
17
17
|
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
18
|
+
private get calculatedAppServer();
|
|
18
19
|
private createAndAppendElement;
|
|
19
20
|
private updateVizItemProperties;
|
|
20
21
|
updated(changedProperties: PropertyValues): Promise<void>;
|
|
@@ -16,6 +16,7 @@ export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
|
16
16
|
static styles: import("lit").CSSResult;
|
|
17
17
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
18
18
|
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
19
|
+
private get calculatedAppServer();
|
|
19
20
|
private createAndAppendElement;
|
|
20
21
|
private updateVizItemProperties;
|
|
21
22
|
updated(changedProperties: PropertyValues): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterGroup, VizItemOptions, VizItemSlots, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
2
2
|
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
-
import {
|
|
3
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
4
4
|
/**
|
|
5
5
|
* The version of the dashboard contents that is linked to the current library.
|
|
6
6
|
*
|