@luzmo/embed 6.13.3 → 6.13.6-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 CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [6.13.6] - 2026-07-03
6
+
7
+ ### Added
8
+ - `getDashboardContext()` on `<luzmo-embed-dashboard>`, returning the live dashboard context as the unified `dashboard` aiprompt input (`{ type, value }`, where `value` carries the current screen mode as `value.currentScreenMode`) in both iframe and web-component embed modes.
9
+ - `getVizItemContext()` on `<luzmo-embed-viz-item>`, returning a flex chart's live context (id, type, slots, options, filters and datasetIds).
10
+ - `contextChanged` event on `<luzmo-embed-dashboard>` and `<luzmo-embed-viz-item>`, emitted on any change and carrying the full context.
11
+ - Context-aware IQ chat: `dashboardId`, `contextIds` and `availableDatasets` properties on `<luzmo-iq-embed-chat>` to auto-connect the chat to an embedded dashboard or flex charts on the same page, plus a `connectionStatusChanged` event reporting `standalone` / `connecting` / `connected` / `not-found`.
12
+
13
+ ## [6.13.5] - 2026-06-09
14
+
15
+ ### Fixed
16
+ - 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.
17
+
18
+ ## [6.13.4] - 2026-05-28
19
+
20
+ ### Added
21
+ - 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.
22
+
5
23
  ## [6.13.3] - 2026-05-27
6
24
 
7
25
  ### Changed
package/README.md CHANGED
@@ -82,13 +82,14 @@ Below a list of available properties on the viz item web component
82
82
 
83
83
  ### Events luzmo-embed-viz-item
84
84
 
85
- | Name | Description |
86
- |----------------|----------------------------------------|
87
- | changedFilters | Emitted when filters are changed |
88
- | customEvent | Emitted when a custom event is fired |
89
- | exported | Emitted when export completes or fails |
90
- | rendered | Emitted when the item is rendered |
91
- | load | Emitted when viz item is loaded |
85
+ | Name | Description |
86
+ |----------------|-------------------------------------------------------------|
87
+ | changedFilters | Emitted when filters are changed |
88
+ | contextChanged | Emitted on any change, carries the full viz-item context |
89
+ | customEvent | Emitted when a custom event is fired |
90
+ | exported | Emitted when export completes or fails |
91
+ | rendered | Emitted when the item is rendered |
92
+ | load | Emitted when viz item is loaded |
92
93
 
93
94
  <br/>
94
95
 
@@ -101,6 +102,10 @@ getData(): ItemData;
101
102
  // Return an array of active filters on the viz item.
102
103
  getFilters(): FilterGroup[];
103
104
 
105
+ // Return the live context of the viz item: id (contextId/DOM id), type, slots, options, filters and datasetIds.
106
+ // Used to feed a flex chart's context into an IQ chat or an /aiprompt call.
107
+ getVizItemContext(): VizItemContext;
108
+
104
109
  // Refresh the data of the viz item.
105
110
  refreshData(): void;
106
111
 
@@ -196,13 +201,14 @@ Below a list of available properties on the dashboard web component
196
201
 
197
202
  ### Events luzmo-embed-dashboard
198
203
 
199
- | Name | Description | Event Arguments |
200
- | -------------- | -------------------------------------- | --------------------- |
201
- | changedFilters | Emitted when filters are changed | `ChangedFiltersEvent` |
202
- | customEvent | Emitted when a custom event is fired | `CustomEvent` |
203
- | exported | Emitted when export completes or fails | `ExportedEvent` |
204
- | itemsRendered | Emitted when all items are rendered | `ItemsRenderedEvent` |
205
- | load | Emitted when dashboard is loaded | `LoadEvent` |
204
+ | Name | Description | Event Arguments |
205
+ | -------------- | ------------------------------------------------------------ | ---------------------- |
206
+ | changedFilters | Emitted when filters are changed | `ChangedFiltersEvent` |
207
+ | contextChanged | Emitted on any dashboard change, carries the full context | `ContextChangedEvent` |
208
+ | customEvent | Emitted when a custom event is fired | `CustomEvent` |
209
+ | exported | Emitted when export completes or fails | `ExportedEvent` |
210
+ | itemsRendered | Emitted when all items are rendered | `ItemsRenderedEvent` |
211
+ | load | Emitted when dashboard is loaded | `LoadEvent` |
206
212
 
207
213
  <br/>
208
214
 
@@ -218,6 +224,13 @@ getData(itemId: string): Promise<ItemData>;
218
224
  // Returns an array of active filters.
219
225
  getFilters(): Promise<FilterGroup[]>;
220
226
 
227
+ // Returns the live dashboard context (current views, runtime filters and titles) as the
228
+ // unified `dashboard` aiprompt input (`{ type: 'dashboard', value }`, where `value` carries
229
+ // the current screen mode as `value.currentScreenMode`).
230
+ // Works in both iframe and web-component embed modes. Feed it into an IQ chat (via its
231
+ // `dashboardContext` input) or an /aiprompt call.
232
+ getDashboardContext(): Promise<DashboardContext | undefined>;
233
+
221
234
  // Changes the authorization of all or one dashboard. To fetch data based on new authorization parameters, reloadDashboard() or refreshData() needs to be called.
222
235
  setAuthorization(key: string, token: string): Promise<void>;
223
236
 
@@ -354,6 +367,33 @@ All available properties for the IQ chat component can be seen in the table belo
354
367
  | `apiHost` | string | Tenancy of Luzmo API to connect to (Default: 'https://api.luzmo.com/' , for US set apiHost to 'https://api.us.luzmo.com/') |
355
368
  | `options` | IQChatOptions | Specifies the customization options of the IQ chat component that affect its appearance and functionality. |
356
369
  | `initialSuggestionsDatasetId` | string | ID of a dataset that assists the AI service in generating automated, initial prompts based on the provided data. |
370
+ | `availableDatasets` | string[] | Restrict the analyst to these dataset ids. Accepts a JSON array string attribute. |
371
+ | `dashboardContext` | DashboardContext | A `dashboard-context` to answer over (manual API path). Accepts a JSON object string attribute. |
372
+ | `dashboardId` | string | Connect the chat to a dashboard embedded on the same page; it auto-reads live context and refreshes on change. |
373
+ | `contextIds` | string[] | Connect the chat to one or more flex charts by their `context-id`; a synthetic dashboard-context is assembled. JSON array. |
374
+
375
+ <br/>
376
+
377
+ #### Context-aware chat (dashboards & flex charts)
378
+
379
+ The IQ chat can answer using the **live context** of an embedded dashboard or one/more standalone flex charts on the same page. Connection is always explicit:
380
+
381
+ - Set neither `dashboardId` nor `contextIds` → standalone chat (no context).
382
+ - Set `dashboardId` → the chat finds the `luzmo-embed-dashboard` with that id, reads its context via `getDashboardContext()` and refreshes on each `contextChanged`.
383
+ - Set `contextIds` → the chat finds each `luzmo-embed-viz-item` whose `context-id` matches, reads each via `getVizItemContext()` and assembles a synthetic dashboard-context.
384
+ - If an id is not found on the page, the chat does not connect and surfaces a clear message; a `connectionStatusChanged` event reports the status (`standalone` / `connecting` / `connected` / `not-found`).
385
+
386
+ For a customer's own UI you can also skip auto-connect and forward context yourself: listen to the dashboard's `contextChanged` (or call `getDashboardContext()`), then pass the payload into the chat's `dashboardContext` input or into an `/aiprompt` call.
387
+
388
+ ```html
389
+ <!-- Auto-connect to a dashboard on the same page -->
390
+ <luzmo-embed-dashboard dashboardId="<dashboard-id>" authKey="..." authToken="..."></luzmo-embed-dashboard>
391
+ <luzmo-iq-embed-chat dashboardId="<dashboard-id>" authKey="..." authToken="..."></luzmo-iq-embed-chat>
392
+
393
+ <!-- Auto-connect to one or more flex charts -->
394
+ <luzmo-embed-viz-item context-id="sales-by-product" authKey="..." authToken="..."></luzmo-embed-viz-item>
395
+ <luzmo-iq-embed-chat contextIds='["sales-by-product"]' authKey="..." authToken="..."></luzmo-iq-embed-chat>
396
+ ```
357
397
 
358
398
  <br/>
359
399
 
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.3";
68
+ var version = "6.13.6";
69
69
 
70
70
  // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
71
71
  var SharedLib = __toESM(require("@luzmo/shared-embed"));
@@ -131,6 +131,14 @@ var _setEventHandler = () => {
131
131
  );
132
132
  break;
133
133
  }
134
+ case "dashboardContext": {
135
+ SharedLib.resolvePromise(
136
+ dashboardComponent,
137
+ event.data.requestId,
138
+ event.data.context
139
+ );
140
+ break;
141
+ }
134
142
  case "getAccessibleDashboards": {
135
143
  SharedLib.resolvePromise(
136
144
  dashboardComponent,
@@ -170,6 +178,12 @@ var _setEventHandler = () => {
170
178
  );
171
179
  break;
172
180
  }
181
+ case "contextChanged": {
182
+ dashboardComponent.dispatchEvent(
183
+ new CustomEvent("contextChanged", { detail: { data: event.data } })
184
+ );
185
+ break;
186
+ }
173
187
  case "customEvent": {
174
188
  dashboardComponent.dispatchEvent(
175
189
  new CustomEvent("customEvent", { detail: { data: event.data } })
@@ -211,6 +225,14 @@ var _setEventHandler = () => {
211
225
  SharedLib._setCalculatedDimensions(dashboardComponent);
212
226
  break;
213
227
  }
228
+ case "trackViewport": {
229
+ if (event.data.enabled) {
230
+ dashboardComponent._startViewportTracking();
231
+ } else {
232
+ dashboardComponent._stopViewportTracking();
233
+ }
234
+ break;
235
+ }
214
236
  case "setSelectedData":
215
237
  case "setFilters": {
216
238
  if (event.data.error) {
@@ -297,6 +319,24 @@ var dashboardStyles = import_lit.css`
297
319
  height: 100%;
298
320
  }
299
321
 
322
+ /*
323
+ * Web component mode: the dashboard app renders directly (no iframe). Make its host fill the
324
+ * sized .dashboard-container so the app's internal height:100% chain resolves to the calculated
325
+ * dashboard height - exactly like the iframe gets its height. Without this the app collapses to
326
+ * its intrinsic size and its inner scroll container produces a second scrollbar, and content can
327
+ * spill outside the container.
328
+ */
329
+ #dashboard-wc-container {
330
+ width: 100%;
331
+ height: 100%;
332
+ }
333
+
334
+ #dashboard-wc-container dashboard-component {
335
+ display: block;
336
+ width: 100%;
337
+ height: 100%;
338
+ }
339
+
300
340
  .luzmo-container-loader {
301
341
  width: 100%;
302
342
  position: relative;
@@ -421,6 +461,12 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
421
461
  this.loaderSize = 32;
422
462
  this.borderWidth = 3;
423
463
  this.minHeight = 400;
464
+ this._viewportTrackingActive = false;
465
+ // Post synchronously on scroll/resize (not via requestAnimationFrame) so the iframe receives the
466
+ // new slice as early as possible in the frame, minimizing the lag of the pinned analyst panel.
467
+ this._onViewportChange = () => {
468
+ this._postViewport();
469
+ };
424
470
  this._containerId = SharedLib2.uuidv4();
425
471
  this._iframeId = `luzmo-dashboard-${this._containerId}`;
426
472
  this.iframeLoaded = false;
@@ -463,12 +509,48 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
463
509
  disconnectedCallback() {
464
510
  super.disconnectedCallback();
465
511
  this._resizeObserver.disconnect();
512
+ this._stopViewportTracking();
466
513
  for (const promiseKey of Object.keys(this.promises)) {
467
514
  this.promises[promiseKey].reject(
468
515
  new Error("Dashboard component was removed")
469
516
  );
470
517
  }
471
518
  }
519
+ // Relay the iframe's visible slice within the host viewport to the dashboard app, so embedded
520
+ // overlays (e.g. the IQ analyst) can pin themselves to the visible area while the host page
521
+ // scrolls the full-height iframe. Opt-in: started when the iframe requests it via 'trackViewport'.
522
+ _startViewportTracking() {
523
+ if (this.embedMode !== "iframe") {
524
+ return;
525
+ }
526
+ if (!this._viewportTrackingActive) {
527
+ this._viewportTrackingActive = true;
528
+ window.addEventListener("scroll", this._onViewportChange, { passive: true, capture: true });
529
+ window.addEventListener("resize", this._onViewportChange, { passive: true });
530
+ }
531
+ this._postViewport();
532
+ }
533
+ _stopViewportTracking() {
534
+ if (!this._viewportTrackingActive) {
535
+ return;
536
+ }
537
+ this._viewportTrackingActive = false;
538
+ window.removeEventListener("scroll", this._onViewportChange, { capture: true });
539
+ window.removeEventListener("resize", this._onViewportChange);
540
+ }
541
+ _postViewport() {
542
+ const contentWindow = this.iframe?.contentWindow;
543
+ if (!contentWindow) {
544
+ return;
545
+ }
546
+ const rect = this.iframe.getBoundingClientRect();
547
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
548
+ const visibleTop = Math.max(rect.top, 0);
549
+ const visibleBottom = Math.min(rect.bottom, viewportHeight);
550
+ const visibleHeight = Math.max(visibleBottom - visibleTop, 0);
551
+ const offsetTop = Math.min(Math.max(-rect.top, 0), rect.height);
552
+ contentWindow.postMessage({ action: "setViewport", offsetTop, visibleHeight }, "*");
553
+ }
472
554
  firstUpdated() {
473
555
  this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
474
556
  this._loaderStyles();
@@ -497,6 +579,7 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
497
579
  el.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
498
580
  el.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
499
581
  el.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
582
+ el.addEventListener("contextChanged", (payload) => this.dispatchEvent(new CustomEvent("contextChanged", payload)));
500
583
  const container = this.renderRoot.querySelector("#dashboard-wc-container");
501
584
  if (container) {
502
585
  container.append(el);
@@ -852,6 +935,15 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
852
935
  }
853
936
  return Promise.reject();
854
937
  }
938
+ getDashboardContext() {
939
+ if (this.isWebComponentViewMode() && this.dashboardReference) {
940
+ return this.dashboardReference.getDashboardContext();
941
+ }
942
+ if (!this.isWebComponentViewMode()) {
943
+ return SharedLib2.getDashboardContext(this, this.iframe);
944
+ }
945
+ return Promise.reject(new Error("getDashboardContext is not available: dashboard reference is not ready."));
946
+ }
855
947
  setSelectedData(itemId, filters) {
856
948
  if (this.isWebComponentViewMode() && this.dashboardReference) {
857
949
  return this.dashboardReference.setSelectedData(itemId, filters);
@@ -1122,15 +1214,26 @@ if (!customElements.get("luzmo-embed-dashboard")) {
1122
1214
  customElements.define("luzmo-embed-dashboard", LuzmoEmbedDashboard);
1123
1215
  }
1124
1216
 
1125
- // libs/dashboard-contents-types/src/lib/shared/version.ts
1126
- var CONTENTS_VERSION = "0.1.100";
1127
-
1128
1217
  // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1218
+ var import_dashboard_contents_types = require("@luzmo/dashboard-contents-types");
1129
1219
  var SharedLib3 = __toESM(require("@luzmo/shared-embed"));
1130
1220
  var import_lit3 = require("lit");
1131
1221
  var import_decorators2 = require("lit/decorators.js");
1132
- var dashboardContentsVersion = CONTENTS_VERSION;
1222
+ var dashboardContentsVersion = import_dashboard_contents_types.CONTENTS_VERSION;
1133
1223
  var vizItemRemote = "VizItemApp";
1224
+ function collectVizItemDatasetIds(slots) {
1225
+ const ids = /* @__PURE__ */ new Set();
1226
+ for (const slot of slots ?? []) {
1227
+ for (const content of slot?.content ?? []) {
1228
+ const column = content;
1229
+ const datasetId = column.datasetId ?? column.set;
1230
+ if (datasetId) {
1231
+ ids.add(datasetId);
1232
+ }
1233
+ }
1234
+ }
1235
+ return [...ids];
1236
+ }
1134
1237
  var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1135
1238
  constructor() {
1136
1239
  super(...arguments);
@@ -1142,22 +1245,6 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1142
1245
  this.libVersion = version + "-wc-luzmo";
1143
1246
  this.postInitCallQueue = [];
1144
1247
  }
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
1248
  createRenderRoot() {
1162
1249
  if (!this.style.display) {
1163
1250
  this.style.display = "block";
@@ -1176,6 +1263,22 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1176
1263
  getFilters() {
1177
1264
  return this.chartElement.getFilters();
1178
1265
  }
1266
+ /**
1267
+ * Snapshot of this flex chart's live context: its definition (type, slots,
1268
+ * options), current filters and the datasets it reads. Used by context-aware
1269
+ * embeds such as the Luzmo IQ chat component.
1270
+ */
1271
+ getVizItemContext() {
1272
+ const slots = this.slots ?? [];
1273
+ return {
1274
+ id: this.contextId ?? this.getAttribute("context-id") ?? this.id ?? this.itemId ?? "",
1275
+ type: this.type,
1276
+ slots,
1277
+ options: this.options,
1278
+ filters: typeof this.chartElement?.getFilters === "function" ? this.getFilters() : this.filters ?? [],
1279
+ datasetIds: collectVizItemDatasetIds(slots)
1280
+ };
1281
+ }
1179
1282
  export(type = "png") {
1180
1283
  return this.chartElement.export(type);
1181
1284
  }
@@ -1228,7 +1331,12 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1228
1331
  }
1229
1332
  this.dispatchEvent(new CustomEvent("rendered", payload));
1230
1333
  });
1231
- this.chartElement.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
1334
+ this.chartElement.addEventListener("changedFilters", (payload) => {
1335
+ this.dispatchEvent(new CustomEvent("changedFilters", payload));
1336
+ this.dispatchEvent(new CustomEvent("contextChanged", {
1337
+ detail: { data: { type: "contextChanged", context: this.getVizItemContext() } }
1338
+ }));
1339
+ });
1232
1340
  this.chartElement.addEventListener("exported", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
1233
1341
  this.chartElement.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
1234
1342
  this.chartElement.addEventListener("authorizationExpired", (payload) => this.dispatchEvent(new CustomEvent("authorizationExpired", payload)));
@@ -1268,6 +1376,20 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1268
1376
  return import_lit3.html` `;
1269
1377
  }
1270
1378
  };
1379
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1380
+ LuzmoBaseVizItem.styles = import_lit3.css`
1381
+ :host {
1382
+ display: block;
1383
+ width: 100%;
1384
+ height: 100%;
1385
+ }
1386
+
1387
+ luzmo-embed-viz-item {
1388
+ width: 100%;
1389
+ height: 1000%;
1390
+ display: block;
1391
+ }
1392
+ `;
1271
1393
  __decorateClass([
1272
1394
  (0, import_decorators2.property)()
1273
1395
  ], LuzmoBaseVizItem.prototype, "appServer", 2);
@@ -1315,6 +1437,9 @@ __decorateClass([
1315
1437
  __decorateClass([
1316
1438
  (0, import_decorators2.property)()
1317
1439
  ], LuzmoBaseVizItem.prototype, "itemId", 2);
1440
+ __decorateClass([
1441
+ (0, import_decorators2.property)({ attribute: "ai-message-asset-id" })
1442
+ ], LuzmoBaseVizItem.prototype, "aiMessageAssetId", 2);
1318
1443
  __decorateClass([
1319
1444
  (0, import_decorators2.property)({ type: Object })
1320
1445
  ], LuzmoBaseVizItem.prototype, "selectedData", 2);
@@ -1347,7 +1472,10 @@ var inputMap = {
1347
1472
  version: "version",
1348
1473
  libVersion: "lib-version",
1349
1474
  aydHost: "ayd-host",
1350
- availableDatasets: "available-datasets"
1475
+ availableDatasets: "available-datasets",
1476
+ dashboardContext: "dashboard-context",
1477
+ dashboardId: "dashboard-id",
1478
+ contextIds: "context-ids"
1351
1479
  };
1352
1480
  var embedChatTag = "luzmo-iq-embed-chat";
1353
1481
  var chatComponentTag = "luzmo-iq-chat-component";
@@ -1361,16 +1489,6 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
1361
1489
  this.remoteEntryServer = "http://localhost:4202/";
1362
1490
  this.aydHost = "https://ayd.luzmo.com/";
1363
1491
  }
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
1492
  createRenderRoot() {
1375
1493
  return this;
1376
1494
  }
@@ -1386,6 +1504,10 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
1386
1504
  if (!this.chartElement) {
1387
1505
  this.chartElement = document.createElement(chatComponentTag);
1388
1506
  this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
1507
+ this.chartElement.addEventListener(
1508
+ "connectionStatusChanged",
1509
+ (event) => this.dispatchEvent(new CustomEvent("connectionStatusChanged", { detail: event.detail }))
1510
+ );
1389
1511
  this.updateVizItemProperties();
1390
1512
  this.renderRoot.append(this.chartElement);
1391
1513
  }
@@ -1408,7 +1530,12 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
1408
1530
  if (this.chartElement) {
1409
1531
  for (const [propertyName] of changedProperties.entries()) {
1410
1532
  const mappedAttributeName = inputMap[propertyName] ?? propertyName;
1411
- const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1533
+ const propertyValue = this[propertyName];
1534
+ if (propertyValue == null) {
1535
+ this.chartElement.removeAttribute(mappedAttributeName);
1536
+ continue;
1537
+ }
1538
+ const attributeValue = typeof propertyValue === "object" ? JSON.stringify(propertyValue) : propertyValue.toString();
1412
1539
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1413
1540
  }
1414
1541
  } else {
@@ -1439,6 +1566,14 @@ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
1439
1566
  observer.observe(embedChat, { childList: true, subtree: true });
1440
1567
  }
1441
1568
  };
1569
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1570
+ LuzmoIQEmbedChatComponent.styles = import_lit4.css`
1571
+ :host {
1572
+ display: block;
1573
+ width: 100%;
1574
+ height: 100%;
1575
+ }
1576
+ `;
1442
1577
  __decorateClass([
1443
1578
  (0, import_decorators3.property)()
1444
1579
  ], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
@@ -1475,6 +1610,15 @@ __decorateClass([
1475
1610
  __decorateClass([
1476
1611
  (0, import_decorators3.property)({ type: Array })
1477
1612
  ], LuzmoIQEmbedChatComponent.prototype, "availableDatasets", 2);
1613
+ __decorateClass([
1614
+ (0, import_decorators3.property)({ type: Object })
1615
+ ], LuzmoIQEmbedChatComponent.prototype, "dashboardContext", 2);
1616
+ __decorateClass([
1617
+ (0, import_decorators3.property)()
1618
+ ], LuzmoIQEmbedChatComponent.prototype, "dashboardId", 2);
1619
+ __decorateClass([
1620
+ (0, import_decorators3.property)({ type: Array })
1621
+ ], LuzmoIQEmbedChatComponent.prototype, "contextIds", 2);
1478
1622
  if (!customElements.get(embedChatTag)) {
1479
1623
  customElements.define(embedChatTag, LuzmoIQEmbedChatComponent);
1480
1624
  }
@@ -1504,16 +1648,6 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
1504
1648
  this.libVersion = version + "-wc-luzmo";
1505
1649
  this.remoteEntryServer = "http://localhost:4202";
1506
1650
  }
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
1651
  createRenderRoot() {
1518
1652
  return this;
1519
1653
  }
@@ -1564,6 +1698,14 @@ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
1564
1698
  return import_lit5.html` `;
1565
1699
  }
1566
1700
  };
1701
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1702
+ LuzmoIQEmbedAnswerComponent.styles = import_lit5.css`
1703
+ :host {
1704
+ display: block;
1705
+ width: 100%;
1706
+ height: 100%;
1707
+ }
1708
+ `;
1567
1709
  __decorateClass([
1568
1710
  (0, import_decorators4.property)()
1569
1711
  ], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);