@luzmo/embed 6.13.3 → 6.13.5-es2021
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 +10 -0
- package/index.cjs +109 -42
- package/index.js +108 -41
- package/luzmo-embed.min.js +110 -40
- package/package.json +8 -2
- package/src/lib/dashboard/dashboard-base.d.ts +5 -0
- package/src/lib/iq-components/luzmo-iq-chat.d.ts +12 -0
- package/src/lib/viz-item/viz-item.base.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [6.13.5] - 2026-06-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Fixed IQ analyst panel positioning and dashboard sizing. The dashboard now fills its container (removing overflowing charts and the double scrollbar) and the analyst panel stays pinned to the visible viewport while scrolling.
|
|
9
|
+
|
|
10
|
+
## [6.13.4] - 2026-05-28
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Added the `dashboardContext` property on `<luzmo-iq-embed-chat>` to pass the current dashboard layout, metadata and runtime filters to the IQ chat for context-aware answers.
|
|
14
|
+
|
|
5
15
|
## [6.13.3] - 2026-05-27
|
|
6
16
|
|
|
7
17
|
### Changed
|
package/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var import_decorators = require("lit/decorators.js");
|
|
|
65
65
|
var import_style_map = require("lit/directives/style-map.js");
|
|
66
66
|
|
|
67
67
|
// libs/embed-libs/embed/package.json
|
|
68
|
-
var version = "6.13.
|
|
68
|
+
var version = "6.13.5";
|
|
69
69
|
|
|
70
70
|
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
71
71
|
var SharedLib = __toESM(require("@luzmo/shared-embed"));
|
|
@@ -211,6 +211,14 @@ var _setEventHandler = () => {
|
|
|
211
211
|
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
212
212
|
break;
|
|
213
213
|
}
|
|
214
|
+
case "trackViewport": {
|
|
215
|
+
if (event.data.enabled) {
|
|
216
|
+
dashboardComponent._startViewportTracking();
|
|
217
|
+
} else {
|
|
218
|
+
dashboardComponent._stopViewportTracking();
|
|
219
|
+
}
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
214
222
|
case "setSelectedData":
|
|
215
223
|
case "setFilters": {
|
|
216
224
|
if (event.data.error) {
|
|
@@ -297,6 +305,24 @@ var dashboardStyles = import_lit.css`
|
|
|
297
305
|
height: 100%;
|
|
298
306
|
}
|
|
299
307
|
|
|
308
|
+
/*
|
|
309
|
+
* Web component mode: the dashboard app renders directly (no iframe). Make its host fill the
|
|
310
|
+
* sized .dashboard-container so the app's internal height:100% chain resolves to the calculated
|
|
311
|
+
* dashboard height - exactly like the iframe gets its height. Without this the app collapses to
|
|
312
|
+
* its intrinsic size and its inner scroll container produces a second scrollbar, and content can
|
|
313
|
+
* spill outside the container.
|
|
314
|
+
*/
|
|
315
|
+
#dashboard-wc-container {
|
|
316
|
+
width: 100%;
|
|
317
|
+
height: 100%;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
#dashboard-wc-container dashboard-component {
|
|
321
|
+
display: block;
|
|
322
|
+
width: 100%;
|
|
323
|
+
height: 100%;
|
|
324
|
+
}
|
|
325
|
+
|
|
300
326
|
.luzmo-container-loader {
|
|
301
327
|
width: 100%;
|
|
302
328
|
position: relative;
|
|
@@ -421,6 +447,12 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
|
421
447
|
this.loaderSize = 32;
|
|
422
448
|
this.borderWidth = 3;
|
|
423
449
|
this.minHeight = 400;
|
|
450
|
+
this._viewportTrackingActive = false;
|
|
451
|
+
// Post synchronously on scroll/resize (not via requestAnimationFrame) so the iframe receives the
|
|
452
|
+
// new slice as early as possible in the frame, minimizing the lag of the pinned analyst panel.
|
|
453
|
+
this._onViewportChange = () => {
|
|
454
|
+
this._postViewport();
|
|
455
|
+
};
|
|
424
456
|
this._containerId = SharedLib2.uuidv4();
|
|
425
457
|
this._iframeId = `luzmo-dashboard-${this._containerId}`;
|
|
426
458
|
this.iframeLoaded = false;
|
|
@@ -463,12 +495,48 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
|
463
495
|
disconnectedCallback() {
|
|
464
496
|
super.disconnectedCallback();
|
|
465
497
|
this._resizeObserver.disconnect();
|
|
498
|
+
this._stopViewportTracking();
|
|
466
499
|
for (const promiseKey of Object.keys(this.promises)) {
|
|
467
500
|
this.promises[promiseKey].reject(
|
|
468
501
|
new Error("Dashboard component was removed")
|
|
469
502
|
);
|
|
470
503
|
}
|
|
471
504
|
}
|
|
505
|
+
// Relay the iframe's visible slice within the host viewport to the dashboard app, so embedded
|
|
506
|
+
// overlays (e.g. the IQ analyst) can pin themselves to the visible area while the host page
|
|
507
|
+
// scrolls the full-height iframe. Opt-in: started when the iframe requests it via 'trackViewport'.
|
|
508
|
+
_startViewportTracking() {
|
|
509
|
+
if (this.embedMode !== "iframe") {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
if (!this._viewportTrackingActive) {
|
|
513
|
+
this._viewportTrackingActive = true;
|
|
514
|
+
window.addEventListener("scroll", this._onViewportChange, { passive: true, capture: true });
|
|
515
|
+
window.addEventListener("resize", this._onViewportChange, { passive: true });
|
|
516
|
+
}
|
|
517
|
+
this._postViewport();
|
|
518
|
+
}
|
|
519
|
+
_stopViewportTracking() {
|
|
520
|
+
if (!this._viewportTrackingActive) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
this._viewportTrackingActive = false;
|
|
524
|
+
window.removeEventListener("scroll", this._onViewportChange, { capture: true });
|
|
525
|
+
window.removeEventListener("resize", this._onViewportChange);
|
|
526
|
+
}
|
|
527
|
+
_postViewport() {
|
|
528
|
+
const contentWindow = this.iframe?.contentWindow;
|
|
529
|
+
if (!contentWindow) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
const rect = this.iframe.getBoundingClientRect();
|
|
533
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
534
|
+
const visibleTop = Math.max(rect.top, 0);
|
|
535
|
+
const visibleBottom = Math.min(rect.bottom, viewportHeight);
|
|
536
|
+
const visibleHeight = Math.max(visibleBottom - visibleTop, 0);
|
|
537
|
+
const offsetTop = Math.min(Math.max(-rect.top, 0), rect.height);
|
|
538
|
+
contentWindow.postMessage({ action: "setViewport", offsetTop, visibleHeight }, "*");
|
|
539
|
+
}
|
|
472
540
|
firstUpdated() {
|
|
473
541
|
this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
|
|
474
542
|
this._loaderStyles();
|
|
@@ -1122,14 +1190,12 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1122
1190
|
customElements.define("luzmo-embed-dashboard", LuzmoEmbedDashboard);
|
|
1123
1191
|
}
|
|
1124
1192
|
|
|
1125
|
-
// libs/dashboard-contents-types/src/lib/shared/version.ts
|
|
1126
|
-
var CONTENTS_VERSION = "0.1.100";
|
|
1127
|
-
|
|
1128
1193
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1194
|
+
var import_dashboard_contents_types = require("@luzmo/dashboard-contents-types");
|
|
1129
1195
|
var SharedLib3 = __toESM(require("@luzmo/shared-embed"));
|
|
1130
1196
|
var import_lit3 = require("lit");
|
|
1131
1197
|
var import_decorators2 = require("lit/decorators.js");
|
|
1132
|
-
var dashboardContentsVersion = CONTENTS_VERSION;
|
|
1198
|
+
var dashboardContentsVersion = import_dashboard_contents_types.CONTENTS_VERSION;
|
|
1133
1199
|
var vizItemRemote = "VizItemApp";
|
|
1134
1200
|
var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
1135
1201
|
constructor() {
|
|
@@ -1142,22 +1208,6 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
1142
1208
|
this.libVersion = version + "-wc-luzmo";
|
|
1143
1209
|
this.postInitCallQueue = [];
|
|
1144
1210
|
}
|
|
1145
|
-
static {
|
|
1146
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1147
|
-
this.styles = import_lit3.css`
|
|
1148
|
-
:host {
|
|
1149
|
-
display: block;
|
|
1150
|
-
width: 100%;
|
|
1151
|
-
height: 100%;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
luzmo-embed-viz-item {
|
|
1155
|
-
width: 100%;
|
|
1156
|
-
height: 1000%;
|
|
1157
|
-
display: block;
|
|
1158
|
-
}
|
|
1159
|
-
`;
|
|
1160
|
-
}
|
|
1161
1211
|
createRenderRoot() {
|
|
1162
1212
|
if (!this.style.display) {
|
|
1163
1213
|
this.style.display = "block";
|
|
@@ -1268,6 +1318,20 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
1268
1318
|
return import_lit3.html` `;
|
|
1269
1319
|
}
|
|
1270
1320
|
};
|
|
1321
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1322
|
+
LuzmoBaseVizItem.styles = import_lit3.css`
|
|
1323
|
+
:host {
|
|
1324
|
+
display: block;
|
|
1325
|
+
width: 100%;
|
|
1326
|
+
height: 100%;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
luzmo-embed-viz-item {
|
|
1330
|
+
width: 100%;
|
|
1331
|
+
height: 1000%;
|
|
1332
|
+
display: block;
|
|
1333
|
+
}
|
|
1334
|
+
`;
|
|
1271
1335
|
__decorateClass([
|
|
1272
1336
|
(0, import_decorators2.property)()
|
|
1273
1337
|
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
@@ -1315,6 +1379,9 @@ __decorateClass([
|
|
|
1315
1379
|
__decorateClass([
|
|
1316
1380
|
(0, import_decorators2.property)()
|
|
1317
1381
|
], LuzmoBaseVizItem.prototype, "itemId", 2);
|
|
1382
|
+
__decorateClass([
|
|
1383
|
+
(0, import_decorators2.property)({ attribute: "ai-message-asset-id" })
|
|
1384
|
+
], LuzmoBaseVizItem.prototype, "aiMessageAssetId", 2);
|
|
1318
1385
|
__decorateClass([
|
|
1319
1386
|
(0, import_decorators2.property)({ type: Object })
|
|
1320
1387
|
], LuzmoBaseVizItem.prototype, "selectedData", 2);
|
|
@@ -1347,7 +1414,8 @@ var inputMap = {
|
|
|
1347
1414
|
version: "version",
|
|
1348
1415
|
libVersion: "lib-version",
|
|
1349
1416
|
aydHost: "ayd-host",
|
|
1350
|
-
availableDatasets: "available-datasets"
|
|
1417
|
+
availableDatasets: "available-datasets",
|
|
1418
|
+
dashboardContext: "dashboard-context"
|
|
1351
1419
|
};
|
|
1352
1420
|
var embedChatTag = "luzmo-iq-embed-chat";
|
|
1353
1421
|
var chatComponentTag = "luzmo-iq-chat-component";
|
|
@@ -1361,16 +1429,6 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1361
1429
|
this.remoteEntryServer = "http://localhost:4202/";
|
|
1362
1430
|
this.aydHost = "https://ayd.luzmo.com/";
|
|
1363
1431
|
}
|
|
1364
|
-
static {
|
|
1365
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1366
|
-
this.styles = import_lit4.css`
|
|
1367
|
-
:host {
|
|
1368
|
-
display: block;
|
|
1369
|
-
width: 100%;
|
|
1370
|
-
height: 100%;
|
|
1371
|
-
}
|
|
1372
|
-
`;
|
|
1373
|
-
}
|
|
1374
1432
|
createRenderRoot() {
|
|
1375
1433
|
return this;
|
|
1376
1434
|
}
|
|
@@ -1439,6 +1497,14 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
|
|
|
1439
1497
|
observer.observe(embedChat, { childList: true, subtree: true });
|
|
1440
1498
|
}
|
|
1441
1499
|
};
|
|
1500
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1501
|
+
LuzmoIQEmbedChatComponent.styles = import_lit4.css`
|
|
1502
|
+
:host {
|
|
1503
|
+
display: block;
|
|
1504
|
+
width: 100%;
|
|
1505
|
+
height: 100%;
|
|
1506
|
+
}
|
|
1507
|
+
`;
|
|
1442
1508
|
__decorateClass([
|
|
1443
1509
|
(0, import_decorators3.property)()
|
|
1444
1510
|
], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
|
|
@@ -1475,6 +1541,9 @@ __decorateClass([
|
|
|
1475
1541
|
__decorateClass([
|
|
1476
1542
|
(0, import_decorators3.property)({ type: Array })
|
|
1477
1543
|
], LuzmoIQEmbedChatComponent.prototype, "availableDatasets", 2);
|
|
1544
|
+
__decorateClass([
|
|
1545
|
+
(0, import_decorators3.property)({ type: Object })
|
|
1546
|
+
], LuzmoIQEmbedChatComponent.prototype, "dashboardContext", 2);
|
|
1478
1547
|
if (!customElements.get(embedChatTag)) {
|
|
1479
1548
|
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
1480
1549
|
}
|
|
@@ -1504,16 +1573,6 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
|
|
|
1504
1573
|
this.libVersion = version + "-wc-luzmo";
|
|
1505
1574
|
this.remoteEntryServer = "http://localhost:4202";
|
|
1506
1575
|
}
|
|
1507
|
-
static {
|
|
1508
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1509
|
-
this.styles = import_lit5.css`
|
|
1510
|
-
:host {
|
|
1511
|
-
display: block;
|
|
1512
|
-
width: 100%;
|
|
1513
|
-
height: 100%;
|
|
1514
|
-
}
|
|
1515
|
-
`;
|
|
1516
|
-
}
|
|
1517
1576
|
createRenderRoot() {
|
|
1518
1577
|
return this;
|
|
1519
1578
|
}
|
|
@@ -1564,6 +1623,14 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
|
|
|
1564
1623
|
return import_lit5.html` `;
|
|
1565
1624
|
}
|
|
1566
1625
|
};
|
|
1626
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1627
|
+
LuzmoIQEmbedAnswerComponent.styles = import_lit5.css`
|
|
1628
|
+
:host {
|
|
1629
|
+
display: block;
|
|
1630
|
+
width: 100%;
|
|
1631
|
+
height: 100%;
|
|
1632
|
+
}
|
|
1633
|
+
`;
|
|
1567
1634
|
__decorateClass([
|
|
1568
1635
|
(0, import_decorators4.property)()
|
|
1569
1636
|
], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { property, query, state } from "lit/decorators.js";
|
|
|
23
23
|
import { styleMap } from "lit/directives/style-map.js";
|
|
24
24
|
|
|
25
25
|
// libs/embed-libs/embed/package.json
|
|
26
|
-
var version = "6.13.
|
|
26
|
+
var version = "6.13.5";
|
|
27
27
|
|
|
28
28
|
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
29
29
|
import * as SharedLib from "@luzmo/shared-embed";
|
|
@@ -169,6 +169,14 @@ var _setEventHandler = () => {
|
|
|
169
169
|
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
|
+
case "trackViewport": {
|
|
173
|
+
if (event.data.enabled) {
|
|
174
|
+
dashboardComponent._startViewportTracking();
|
|
175
|
+
} else {
|
|
176
|
+
dashboardComponent._stopViewportTracking();
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
172
180
|
case "setSelectedData":
|
|
173
181
|
case "setFilters": {
|
|
174
182
|
if (event.data.error) {
|
|
@@ -255,6 +263,24 @@ var dashboardStyles = css`
|
|
|
255
263
|
height: 100%;
|
|
256
264
|
}
|
|
257
265
|
|
|
266
|
+
/*
|
|
267
|
+
* Web component mode: the dashboard app renders directly (no iframe). Make its host fill the
|
|
268
|
+
* sized .dashboard-container so the app's internal height:100% chain resolves to the calculated
|
|
269
|
+
* dashboard height - exactly like the iframe gets its height. Without this the app collapses to
|
|
270
|
+
* its intrinsic size and its inner scroll container produces a second scrollbar, and content can
|
|
271
|
+
* spill outside the container.
|
|
272
|
+
*/
|
|
273
|
+
#dashboard-wc-container {
|
|
274
|
+
width: 100%;
|
|
275
|
+
height: 100%;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
#dashboard-wc-container dashboard-component {
|
|
279
|
+
display: block;
|
|
280
|
+
width: 100%;
|
|
281
|
+
height: 100%;
|
|
282
|
+
}
|
|
283
|
+
|
|
258
284
|
.luzmo-container-loader {
|
|
259
285
|
width: 100%;
|
|
260
286
|
position: relative;
|
|
@@ -379,6 +405,12 @@ var LuzmoDashboard = class extends LitElement {
|
|
|
379
405
|
this.loaderSize = 32;
|
|
380
406
|
this.borderWidth = 3;
|
|
381
407
|
this.minHeight = 400;
|
|
408
|
+
this._viewportTrackingActive = false;
|
|
409
|
+
// Post synchronously on scroll/resize (not via requestAnimationFrame) so the iframe receives the
|
|
410
|
+
// new slice as early as possible in the frame, minimizing the lag of the pinned analyst panel.
|
|
411
|
+
this._onViewportChange = () => {
|
|
412
|
+
this._postViewport();
|
|
413
|
+
};
|
|
382
414
|
this._containerId = SharedLib2.uuidv4();
|
|
383
415
|
this._iframeId = `luzmo-dashboard-${this._containerId}`;
|
|
384
416
|
this.iframeLoaded = false;
|
|
@@ -421,12 +453,48 @@ var LuzmoDashboard = class extends LitElement {
|
|
|
421
453
|
disconnectedCallback() {
|
|
422
454
|
super.disconnectedCallback();
|
|
423
455
|
this._resizeObserver.disconnect();
|
|
456
|
+
this._stopViewportTracking();
|
|
424
457
|
for (const promiseKey of Object.keys(this.promises)) {
|
|
425
458
|
this.promises[promiseKey].reject(
|
|
426
459
|
new Error("Dashboard component was removed")
|
|
427
460
|
);
|
|
428
461
|
}
|
|
429
462
|
}
|
|
463
|
+
// Relay the iframe's visible slice within the host viewport to the dashboard app, so embedded
|
|
464
|
+
// overlays (e.g. the IQ analyst) can pin themselves to the visible area while the host page
|
|
465
|
+
// scrolls the full-height iframe. Opt-in: started when the iframe requests it via 'trackViewport'.
|
|
466
|
+
_startViewportTracking() {
|
|
467
|
+
if (this.embedMode !== "iframe") {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (!this._viewportTrackingActive) {
|
|
471
|
+
this._viewportTrackingActive = true;
|
|
472
|
+
window.addEventListener("scroll", this._onViewportChange, { passive: true, capture: true });
|
|
473
|
+
window.addEventListener("resize", this._onViewportChange, { passive: true });
|
|
474
|
+
}
|
|
475
|
+
this._postViewport();
|
|
476
|
+
}
|
|
477
|
+
_stopViewportTracking() {
|
|
478
|
+
if (!this._viewportTrackingActive) {
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
this._viewportTrackingActive = false;
|
|
482
|
+
window.removeEventListener("scroll", this._onViewportChange, { capture: true });
|
|
483
|
+
window.removeEventListener("resize", this._onViewportChange);
|
|
484
|
+
}
|
|
485
|
+
_postViewport() {
|
|
486
|
+
const contentWindow = this.iframe?.contentWindow;
|
|
487
|
+
if (!contentWindow) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const rect = this.iframe.getBoundingClientRect();
|
|
491
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
492
|
+
const visibleTop = Math.max(rect.top, 0);
|
|
493
|
+
const visibleBottom = Math.min(rect.bottom, viewportHeight);
|
|
494
|
+
const visibleHeight = Math.max(visibleBottom - visibleTop, 0);
|
|
495
|
+
const offsetTop = Math.min(Math.max(-rect.top, 0), rect.height);
|
|
496
|
+
contentWindow.postMessage({ action: "setViewport", offsetTop, visibleHeight }, "*");
|
|
497
|
+
}
|
|
430
498
|
firstUpdated() {
|
|
431
499
|
this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
|
|
432
500
|
this._loaderStyles();
|
|
@@ -1080,10 +1148,8 @@ if (!customElements.get("luzmo-embed-dashboard")) {
|
|
|
1080
1148
|
customElements.define("luzmo-embed-dashboard", LuzmoEmbedDashboard);
|
|
1081
1149
|
}
|
|
1082
1150
|
|
|
1083
|
-
// libs/dashboard-contents-types/src/lib/shared/version.ts
|
|
1084
|
-
var CONTENTS_VERSION = "0.1.100";
|
|
1085
|
-
|
|
1086
1151
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1152
|
+
import { CONTENTS_VERSION } from "@luzmo/dashboard-contents-types";
|
|
1087
1153
|
import * as SharedLib3 from "@luzmo/shared-embed";
|
|
1088
1154
|
import { css as css2, html as html2, LitElement as LitElement2 } from "lit";
|
|
1089
1155
|
import { property as property2 } from "lit/decorators.js";
|
|
@@ -1100,22 +1166,6 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
1100
1166
|
this.libVersion = version + "-wc-luzmo";
|
|
1101
1167
|
this.postInitCallQueue = [];
|
|
1102
1168
|
}
|
|
1103
|
-
static {
|
|
1104
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1105
|
-
this.styles = css2`
|
|
1106
|
-
:host {
|
|
1107
|
-
display: block;
|
|
1108
|
-
width: 100%;
|
|
1109
|
-
height: 100%;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
luzmo-embed-viz-item {
|
|
1113
|
-
width: 100%;
|
|
1114
|
-
height: 1000%;
|
|
1115
|
-
display: block;
|
|
1116
|
-
}
|
|
1117
|
-
`;
|
|
1118
|
-
}
|
|
1119
1169
|
createRenderRoot() {
|
|
1120
1170
|
if (!this.style.display) {
|
|
1121
1171
|
this.style.display = "block";
|
|
@@ -1226,6 +1276,20 @@ var LuzmoBaseVizItem = class extends LitElement2 {
|
|
|
1226
1276
|
return html2` `;
|
|
1227
1277
|
}
|
|
1228
1278
|
};
|
|
1279
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1280
|
+
LuzmoBaseVizItem.styles = css2`
|
|
1281
|
+
:host {
|
|
1282
|
+
display: block;
|
|
1283
|
+
width: 100%;
|
|
1284
|
+
height: 100%;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
luzmo-embed-viz-item {
|
|
1288
|
+
width: 100%;
|
|
1289
|
+
height: 1000%;
|
|
1290
|
+
display: block;
|
|
1291
|
+
}
|
|
1292
|
+
`;
|
|
1229
1293
|
__decorateClass([
|
|
1230
1294
|
property2()
|
|
1231
1295
|
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
@@ -1273,6 +1337,9 @@ __decorateClass([
|
|
|
1273
1337
|
__decorateClass([
|
|
1274
1338
|
property2()
|
|
1275
1339
|
], LuzmoBaseVizItem.prototype, "itemId", 2);
|
|
1340
|
+
__decorateClass([
|
|
1341
|
+
property2({ attribute: "ai-message-asset-id" })
|
|
1342
|
+
], LuzmoBaseVizItem.prototype, "aiMessageAssetId", 2);
|
|
1276
1343
|
__decorateClass([
|
|
1277
1344
|
property2({ type: Object })
|
|
1278
1345
|
], LuzmoBaseVizItem.prototype, "selectedData", 2);
|
|
@@ -1305,7 +1372,8 @@ var inputMap = {
|
|
|
1305
1372
|
version: "version",
|
|
1306
1373
|
libVersion: "lib-version",
|
|
1307
1374
|
aydHost: "ayd-host",
|
|
1308
|
-
availableDatasets: "available-datasets"
|
|
1375
|
+
availableDatasets: "available-datasets",
|
|
1376
|
+
dashboardContext: "dashboard-context"
|
|
1309
1377
|
};
|
|
1310
1378
|
var embedChatTag = "luzmo-iq-embed-chat";
|
|
1311
1379
|
var chatComponentTag = "luzmo-iq-chat-component";
|
|
@@ -1319,16 +1387,6 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1319
1387
|
this.remoteEntryServer = "http://localhost:4202/";
|
|
1320
1388
|
this.aydHost = "https://ayd.luzmo.com/";
|
|
1321
1389
|
}
|
|
1322
|
-
static {
|
|
1323
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1324
|
-
this.styles = css3`
|
|
1325
|
-
:host {
|
|
1326
|
-
display: block;
|
|
1327
|
-
width: 100%;
|
|
1328
|
-
height: 100%;
|
|
1329
|
-
}
|
|
1330
|
-
`;
|
|
1331
|
-
}
|
|
1332
1390
|
createRenderRoot() {
|
|
1333
1391
|
return this;
|
|
1334
1392
|
}
|
|
@@ -1397,6 +1455,14 @@ var LuzmoIQEmbedChatComponent = class extends LitElement3 {
|
|
|
1397
1455
|
observer.observe(embedChat, { childList: true, subtree: true });
|
|
1398
1456
|
}
|
|
1399
1457
|
};
|
|
1458
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1459
|
+
LuzmoIQEmbedChatComponent.styles = css3`
|
|
1460
|
+
:host {
|
|
1461
|
+
display: block;
|
|
1462
|
+
width: 100%;
|
|
1463
|
+
height: 100%;
|
|
1464
|
+
}
|
|
1465
|
+
`;
|
|
1400
1466
|
__decorateClass([
|
|
1401
1467
|
property3()
|
|
1402
1468
|
], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
|
|
@@ -1433,6 +1499,9 @@ __decorateClass([
|
|
|
1433
1499
|
__decorateClass([
|
|
1434
1500
|
property3({ type: Array })
|
|
1435
1501
|
], LuzmoIQEmbedChatComponent.prototype, "availableDatasets", 2);
|
|
1502
|
+
__decorateClass([
|
|
1503
|
+
property3({ type: Object })
|
|
1504
|
+
], LuzmoIQEmbedChatComponent.prototype, "dashboardContext", 2);
|
|
1436
1505
|
if (!customElements.get(embedChatTag)) {
|
|
1437
1506
|
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
1438
1507
|
}
|
|
@@ -1462,16 +1531,6 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
1462
1531
|
this.libVersion = version + "-wc-luzmo";
|
|
1463
1532
|
this.remoteEntryServer = "http://localhost:4202";
|
|
1464
1533
|
}
|
|
1465
|
-
static {
|
|
1466
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1467
|
-
this.styles = css4`
|
|
1468
|
-
:host {
|
|
1469
|
-
display: block;
|
|
1470
|
-
width: 100%;
|
|
1471
|
-
height: 100%;
|
|
1472
|
-
}
|
|
1473
|
-
`;
|
|
1474
|
-
}
|
|
1475
1534
|
createRenderRoot() {
|
|
1476
1535
|
return this;
|
|
1477
1536
|
}
|
|
@@ -1522,6 +1581,14 @@ var LuzmoIQEmbedAnswerComponent = class extends LitElement4 {
|
|
|
1522
1581
|
return html4` `;
|
|
1523
1582
|
}
|
|
1524
1583
|
};
|
|
1584
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
1585
|
+
LuzmoIQEmbedAnswerComponent.styles = css4`
|
|
1586
|
+
:host {
|
|
1587
|
+
display: block;
|
|
1588
|
+
width: 100%;
|
|
1589
|
+
height: 100%;
|
|
1590
|
+
}
|
|
1591
|
+
`;
|
|
1525
1592
|
__decorateClass([
|
|
1526
1593
|
property4()
|
|
1527
1594
|
], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
|
package/luzmo-embed.min.js
CHANGED
|
@@ -1255,6 +1255,7 @@ var libraryTypeToWebComponentTypeMapping = {
|
|
|
1255
1255
|
filters: "filters",
|
|
1256
1256
|
dashboardId: "dashboard-id",
|
|
1257
1257
|
itemId: "item-id",
|
|
1258
|
+
aiMessageAssetId: "ai-message-asset-id",
|
|
1258
1259
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
1259
1260
|
libVersion: "lib-version"
|
|
1260
1261
|
};
|
|
@@ -2026,7 +2027,7 @@ function getGlobalFederationConstructor() {
|
|
|
2026
2027
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
|
|
2027
2028
|
if (isDebug) {
|
|
2028
2029
|
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
2029
|
-
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.5.
|
|
2030
|
+
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.5.1";
|
|
2030
2031
|
}
|
|
2031
2032
|
}
|
|
2032
2033
|
function getInfoWithoutType(target, key) {
|
|
@@ -4841,7 +4842,7 @@ var ModuleFederation = class {
|
|
|
4841
4842
|
beforeInitContainer: new AsyncWaterfallHook("beforeInitContainer"),
|
|
4842
4843
|
initContainer: new AsyncWaterfallHook("initContainer")
|
|
4843
4844
|
});
|
|
4844
|
-
this.version = "2.5.
|
|
4845
|
+
this.version = "2.5.1";
|
|
4845
4846
|
this.moduleCache = /* @__PURE__ */ new Map();
|
|
4846
4847
|
this.loaderHook = new PluginSystem({
|
|
4847
4848
|
getModuleInfo: new SyncHook(),
|
|
@@ -5742,7 +5743,7 @@ var o6 = e6(class extends i5 {
|
|
|
5742
5743
|
});
|
|
5743
5744
|
|
|
5744
5745
|
// libs/embed-libs/embed/package.json
|
|
5745
|
-
var version = "6.13.
|
|
5746
|
+
var version = "6.13.5";
|
|
5746
5747
|
|
|
5747
5748
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
5748
5749
|
var LuzmoDashboardService = class {
|
|
@@ -5885,6 +5886,14 @@ var _setEventHandler = () => {
|
|
|
5885
5886
|
_setCalculatedDimensions(dashboardComponent);
|
|
5886
5887
|
break;
|
|
5887
5888
|
}
|
|
5889
|
+
case "trackViewport": {
|
|
5890
|
+
if (event.data.enabled) {
|
|
5891
|
+
dashboardComponent._startViewportTracking();
|
|
5892
|
+
} else {
|
|
5893
|
+
dashboardComponent._stopViewportTracking();
|
|
5894
|
+
}
|
|
5895
|
+
break;
|
|
5896
|
+
}
|
|
5888
5897
|
case "setSelectedData":
|
|
5889
5898
|
case "setFilters": {
|
|
5890
5899
|
if (event.data.error) {
|
|
@@ -5970,6 +5979,24 @@ var dashboardStyles = i`
|
|
|
5970
5979
|
height: 100%;
|
|
5971
5980
|
}
|
|
5972
5981
|
|
|
5982
|
+
/*
|
|
5983
|
+
* Web component mode: the dashboard app renders directly (no iframe). Make its host fill the
|
|
5984
|
+
* sized .dashboard-container so the app's internal height:100% chain resolves to the calculated
|
|
5985
|
+
* dashboard height - exactly like the iframe gets its height. Without this the app collapses to
|
|
5986
|
+
* its intrinsic size and its inner scroll container produces a second scrollbar, and content can
|
|
5987
|
+
* spill outside the container.
|
|
5988
|
+
*/
|
|
5989
|
+
#dashboard-wc-container {
|
|
5990
|
+
width: 100%;
|
|
5991
|
+
height: 100%;
|
|
5992
|
+
}
|
|
5993
|
+
|
|
5994
|
+
#dashboard-wc-container dashboard-component {
|
|
5995
|
+
display: block;
|
|
5996
|
+
width: 100%;
|
|
5997
|
+
height: 100%;
|
|
5998
|
+
}
|
|
5999
|
+
|
|
5973
6000
|
.luzmo-container-loader {
|
|
5974
6001
|
width: 100%;
|
|
5975
6002
|
position: relative;
|
|
@@ -6094,6 +6121,12 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6094
6121
|
this.loaderSize = 32;
|
|
6095
6122
|
this.borderWidth = 3;
|
|
6096
6123
|
this.minHeight = 400;
|
|
6124
|
+
this._viewportTrackingActive = false;
|
|
6125
|
+
// Post synchronously on scroll/resize (not via requestAnimationFrame) so the iframe receives the
|
|
6126
|
+
// new slice as early as possible in the frame, minimizing the lag of the pinned analyst panel.
|
|
6127
|
+
this._onViewportChange = () => {
|
|
6128
|
+
this._postViewport();
|
|
6129
|
+
};
|
|
6097
6130
|
this._containerId = uuidv4();
|
|
6098
6131
|
this._iframeId = `luzmo-dashboard-${this._containerId}`;
|
|
6099
6132
|
this.iframeLoaded = false;
|
|
@@ -6136,12 +6169,48 @@ var LuzmoDashboard = class extends i4 {
|
|
|
6136
6169
|
disconnectedCallback() {
|
|
6137
6170
|
super.disconnectedCallback();
|
|
6138
6171
|
this._resizeObserver.disconnect();
|
|
6172
|
+
this._stopViewportTracking();
|
|
6139
6173
|
for (const promiseKey of Object.keys(this.promises)) {
|
|
6140
6174
|
this.promises[promiseKey].reject(
|
|
6141
6175
|
new Error("Dashboard component was removed")
|
|
6142
6176
|
);
|
|
6143
6177
|
}
|
|
6144
6178
|
}
|
|
6179
|
+
// Relay the iframe's visible slice within the host viewport to the dashboard app, so embedded
|
|
6180
|
+
// overlays (e.g. the IQ analyst) can pin themselves to the visible area while the host page
|
|
6181
|
+
// scrolls the full-height iframe. Opt-in: started when the iframe requests it via 'trackViewport'.
|
|
6182
|
+
_startViewportTracking() {
|
|
6183
|
+
if (this.embedMode !== "iframe") {
|
|
6184
|
+
return;
|
|
6185
|
+
}
|
|
6186
|
+
if (!this._viewportTrackingActive) {
|
|
6187
|
+
this._viewportTrackingActive = true;
|
|
6188
|
+
window.addEventListener("scroll", this._onViewportChange, { passive: true, capture: true });
|
|
6189
|
+
window.addEventListener("resize", this._onViewportChange, { passive: true });
|
|
6190
|
+
}
|
|
6191
|
+
this._postViewport();
|
|
6192
|
+
}
|
|
6193
|
+
_stopViewportTracking() {
|
|
6194
|
+
if (!this._viewportTrackingActive) {
|
|
6195
|
+
return;
|
|
6196
|
+
}
|
|
6197
|
+
this._viewportTrackingActive = false;
|
|
6198
|
+
window.removeEventListener("scroll", this._onViewportChange, { capture: true });
|
|
6199
|
+
window.removeEventListener("resize", this._onViewportChange);
|
|
6200
|
+
}
|
|
6201
|
+
_postViewport() {
|
|
6202
|
+
const contentWindow = this.iframe?.contentWindow;
|
|
6203
|
+
if (!contentWindow) {
|
|
6204
|
+
return;
|
|
6205
|
+
}
|
|
6206
|
+
const rect = this.iframe.getBoundingClientRect();
|
|
6207
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
6208
|
+
const visibleTop = Math.max(rect.top, 0);
|
|
6209
|
+
const visibleBottom = Math.min(rect.bottom, viewportHeight);
|
|
6210
|
+
const visibleHeight = Math.max(visibleBottom - visibleTop, 0);
|
|
6211
|
+
const offsetTop = Math.min(Math.max(-rect.top, 0), rect.height);
|
|
6212
|
+
contentWindow.postMessage({ action: "setViewport", offsetTop, visibleHeight }, "*");
|
|
6213
|
+
}
|
|
6145
6214
|
firstUpdated() {
|
|
6146
6215
|
this._loaderMsg = getLoader(this)?.loadingMsg;
|
|
6147
6216
|
this._loaderStyles();
|
|
@@ -6812,22 +6881,6 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
6812
6881
|
this.libVersion = version + "-wc-luzmo";
|
|
6813
6882
|
this.postInitCallQueue = [];
|
|
6814
6883
|
}
|
|
6815
|
-
static {
|
|
6816
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
6817
|
-
this.styles = i`
|
|
6818
|
-
:host {
|
|
6819
|
-
display: block;
|
|
6820
|
-
width: 100%;
|
|
6821
|
-
height: 100%;
|
|
6822
|
-
}
|
|
6823
|
-
|
|
6824
|
-
luzmo-embed-viz-item {
|
|
6825
|
-
width: 100%;
|
|
6826
|
-
height: 1000%;
|
|
6827
|
-
display: block;
|
|
6828
|
-
}
|
|
6829
|
-
`;
|
|
6830
|
-
}
|
|
6831
6884
|
createRenderRoot() {
|
|
6832
6885
|
if (!this.style.display) {
|
|
6833
6886
|
this.style.display = "block";
|
|
@@ -6938,6 +6991,20 @@ var LuzmoBaseVizItem = class extends i4 {
|
|
|
6938
6991
|
return b2` `;
|
|
6939
6992
|
}
|
|
6940
6993
|
};
|
|
6994
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
6995
|
+
LuzmoBaseVizItem.styles = i`
|
|
6996
|
+
:host {
|
|
6997
|
+
display: block;
|
|
6998
|
+
width: 100%;
|
|
6999
|
+
height: 100%;
|
|
7000
|
+
}
|
|
7001
|
+
|
|
7002
|
+
luzmo-embed-viz-item {
|
|
7003
|
+
width: 100%;
|
|
7004
|
+
height: 1000%;
|
|
7005
|
+
display: block;
|
|
7006
|
+
}
|
|
7007
|
+
`;
|
|
6941
7008
|
__decorateClass([
|
|
6942
7009
|
n4()
|
|
6943
7010
|
], LuzmoBaseVizItem.prototype, "appServer", 2);
|
|
@@ -6985,6 +7052,9 @@ __decorateClass([
|
|
|
6985
7052
|
__decorateClass([
|
|
6986
7053
|
n4()
|
|
6987
7054
|
], LuzmoBaseVizItem.prototype, "itemId", 2);
|
|
7055
|
+
__decorateClass([
|
|
7056
|
+
n4({ attribute: "ai-message-asset-id" })
|
|
7057
|
+
], LuzmoBaseVizItem.prototype, "aiMessageAssetId", 2);
|
|
6988
7058
|
__decorateClass([
|
|
6989
7059
|
n4({ type: Object })
|
|
6990
7060
|
], LuzmoBaseVizItem.prototype, "selectedData", 2);
|
|
@@ -7014,7 +7084,8 @@ var inputMap = {
|
|
|
7014
7084
|
version: "version",
|
|
7015
7085
|
libVersion: "lib-version",
|
|
7016
7086
|
aydHost: "ayd-host",
|
|
7017
|
-
availableDatasets: "available-datasets"
|
|
7087
|
+
availableDatasets: "available-datasets",
|
|
7088
|
+
dashboardContext: "dashboard-context"
|
|
7018
7089
|
};
|
|
7019
7090
|
var embedChatTag = "luzmo-iq-embed-chat";
|
|
7020
7091
|
var chatComponentTag = "luzmo-iq-chat-component";
|
|
@@ -7028,16 +7099,6 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7028
7099
|
this.remoteEntryServer = "http://localhost:4202/";
|
|
7029
7100
|
this.aydHost = "https://ayd.luzmo.com/";
|
|
7030
7101
|
}
|
|
7031
|
-
static {
|
|
7032
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7033
|
-
this.styles = i`
|
|
7034
|
-
:host {
|
|
7035
|
-
display: block;
|
|
7036
|
-
width: 100%;
|
|
7037
|
-
height: 100%;
|
|
7038
|
-
}
|
|
7039
|
-
`;
|
|
7040
|
-
}
|
|
7041
7102
|
createRenderRoot() {
|
|
7042
7103
|
return this;
|
|
7043
7104
|
}
|
|
@@ -7106,6 +7167,14 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
|
|
|
7106
7167
|
observer.observe(embedChat, { childList: true, subtree: true });
|
|
7107
7168
|
}
|
|
7108
7169
|
};
|
|
7170
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7171
|
+
LuzmoIQEmbedChatComponent.styles = i`
|
|
7172
|
+
:host {
|
|
7173
|
+
display: block;
|
|
7174
|
+
width: 100%;
|
|
7175
|
+
height: 100%;
|
|
7176
|
+
}
|
|
7177
|
+
`;
|
|
7109
7178
|
__decorateClass([
|
|
7110
7179
|
n4()
|
|
7111
7180
|
], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
|
|
@@ -7142,6 +7211,9 @@ __decorateClass([
|
|
|
7142
7211
|
__decorateClass([
|
|
7143
7212
|
n4({ type: Array })
|
|
7144
7213
|
], LuzmoIQEmbedChatComponent.prototype, "availableDatasets", 2);
|
|
7214
|
+
__decorateClass([
|
|
7215
|
+
n4({ type: Object })
|
|
7216
|
+
], LuzmoIQEmbedChatComponent.prototype, "dashboardContext", 2);
|
|
7145
7217
|
if (!customElements.get(embedChatTag)) {
|
|
7146
7218
|
customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
|
|
7147
7219
|
}
|
|
@@ -7168,16 +7240,6 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
|
|
|
7168
7240
|
this.libVersion = version + "-wc-luzmo";
|
|
7169
7241
|
this.remoteEntryServer = "http://localhost:4202";
|
|
7170
7242
|
}
|
|
7171
|
-
static {
|
|
7172
|
-
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7173
|
-
this.styles = i`
|
|
7174
|
-
:host {
|
|
7175
|
-
display: block;
|
|
7176
|
-
width: 100%;
|
|
7177
|
-
height: 100%;
|
|
7178
|
-
}
|
|
7179
|
-
`;
|
|
7180
|
-
}
|
|
7181
7243
|
createRenderRoot() {
|
|
7182
7244
|
return this;
|
|
7183
7245
|
}
|
|
@@ -7228,6 +7290,14 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
|
|
|
7228
7290
|
return b2` `;
|
|
7229
7291
|
}
|
|
7230
7292
|
};
|
|
7293
|
+
// Static styles to set host display to block, else it is not shown at all for some reason.
|
|
7294
|
+
LuzmoIQEmbedAnswerComponent.styles = i`
|
|
7295
|
+
:host {
|
|
7296
|
+
display: block;
|
|
7297
|
+
width: 100%;
|
|
7298
|
+
height: 100%;
|
|
7299
|
+
}
|
|
7300
|
+
`;
|
|
7231
7301
|
__decorateClass([
|
|
7232
7302
|
n4()
|
|
7233
7303
|
], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/embed",
|
|
3
|
-
"version": "6.13.
|
|
3
|
+
"version": "6.13.5-es2021",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.3.1",
|
|
6
6
|
"@luzmo/shared-embed": "5.12.2"
|
|
7
7
|
},
|
|
8
8
|
"keywords": [
|
|
9
|
+
"es2021",
|
|
10
|
+
"safari-compatible",
|
|
9
11
|
"es6",
|
|
10
12
|
"web-component",
|
|
11
13
|
"lit",
|
|
@@ -21,5 +23,9 @@
|
|
|
21
23
|
],
|
|
22
24
|
"module": "./index.js",
|
|
23
25
|
"types": "./src/index.d.ts",
|
|
24
|
-
"license": "SEE LICENSE IN LICENSE"
|
|
26
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
27
|
+
"description": "ES2021 build for Safari < 16.3 compatibility",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"tag": "es2021"
|
|
30
|
+
}
|
|
25
31
|
}
|
|
@@ -65,9 +65,14 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
|
|
|
65
65
|
iframeHeight?: string;
|
|
66
66
|
iframeWidth?: string;
|
|
67
67
|
_resizeObserver: ResizeObserver;
|
|
68
|
+
private _viewportTrackingActive;
|
|
69
|
+
private _onViewportChange;
|
|
68
70
|
constructor();
|
|
69
71
|
connectedCallback(): void;
|
|
70
72
|
disconnectedCallback(): void;
|
|
73
|
+
_startViewportTracking(): void;
|
|
74
|
+
_stopViewportTracking(): void;
|
|
75
|
+
private _postViewport;
|
|
71
76
|
firstUpdated(): void;
|
|
72
77
|
initComponent(): void;
|
|
73
78
|
setAllAttributes(): void;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { IQChatOptions } from '@luzmo/dashboard-contents-types';
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
3
|
import type { TemplateResult } from 'lit-html';
|
|
4
|
+
export interface SerializedDashboardContext {
|
|
5
|
+
type: 'dashboard-context';
|
|
6
|
+
id: string;
|
|
7
|
+
json: unknown;
|
|
8
|
+
screen_mode?: string;
|
|
9
|
+
meta?: {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
};
|
|
13
|
+
runtime_filters?: unknown[];
|
|
14
|
+
}
|
|
4
15
|
export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
5
16
|
appServer?: string;
|
|
6
17
|
apiHost?: string;
|
|
@@ -14,6 +25,7 @@ export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
|
14
25
|
remoteEntryServer: string;
|
|
15
26
|
aydHost: string;
|
|
16
27
|
availableDatasets?: string[];
|
|
28
|
+
dashboardContext?: SerializedDashboardContext;
|
|
17
29
|
chartElement: HTMLElement;
|
|
18
30
|
static styles: import("lit").CSSResult;
|
|
19
31
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
@@ -24,6 +24,7 @@ interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
|
24
24
|
authToken?: string;
|
|
25
25
|
dashboardId?: string;
|
|
26
26
|
itemId?: string;
|
|
27
|
+
aiMessageAssetId?: string;
|
|
27
28
|
getFilters: () => FilterGroup[];
|
|
28
29
|
export: (type?: VizItemExportType) => Promise<string | void>;
|
|
29
30
|
refreshData: () => void;
|
|
@@ -46,6 +47,7 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
|
|
|
46
47
|
filters?: FilterGroup[];
|
|
47
48
|
dashboardId?: string;
|
|
48
49
|
itemId?: string;
|
|
50
|
+
aiMessageAssetId?: string;
|
|
49
51
|
selectedData: SharedLib.SelectedDataInput;
|
|
50
52
|
dashboardContentsVersion?: string;
|
|
51
53
|
libVersion?: string;
|