@luzmo/embed 6.1.9 → 6.2.1

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
@@ -1,5 +1,17 @@
1
1
  All notable changes to this project will be documented in this file.
2
2
 
3
+ ## [6.2.1] - 2024-11-22
4
+
5
+ ### Updates
6
+
7
+ - Updated dependencies
8
+
9
+ ## [6.2.0] - 2024-11-20
10
+
11
+ ### Updates
12
+
13
+ - [Luzmo IQ](https://developer.luzmo.com/guide/iq--introduction) allows you to generate AI-powered answers to data-related questions. The update adds components that allows you embed chat and answer components onto your page.
14
+
3
15
  ## [6.1.9] - 2024-11-14
4
16
 
5
17
  ### Updates
package/README.md CHANGED
@@ -7,9 +7,10 @@ A modern [Web Component](https://developer.mozilla.org/en-US/docs/Web/Web_Compon
7
7
  1. [Installation instructions](#installation-instructions)
8
8
  2. [Luzmo Embed Viz Item](#luzmo-embed-viz-item)
9
9
  3. [Luzmo Embed Dashboard](#luzmo-embed-dashboard)
10
- 4. [Changelog](#changelog)
11
- 5. [Migration](#migration)
12
- 6. [Quick links](#quick-links)
10
+ 4. [Luzmo IQ Components](#luzmo-iq-components)
11
+ 5. [Changelog](#changelog)
12
+ 6. [Migration](#migration)
13
+ 7. [Quick links](#quick-links)
13
14
 
14
15
  ## Installation instructions
15
16
 
@@ -303,6 +304,174 @@ dashboardComponent.getAccessibleDashboards().then((dashboards) => {
303
304
  });
304
305
  ```
305
306
 
307
+ ## Luzmo IQ components
308
+
309
+ ### How to use the IQ components
310
+
311
+ Use the IQ components as if they were native HTML tags.
312
+
313
+ **In your HTML template.**
314
+
315
+ ```html
316
+ <luzmo-iq-embed-chat authKey="Your auth key" authToken="Your auth token" options="options"> </luzmo-iq-embed-chat>
317
+
318
+ OR
319
+
320
+ <luzmo-iq-embed-answer authKey="Your auth key" authToken="Your auth token" options="options" messages="messages"> </luzmo-iq-embed-answer>
321
+ ```
322
+
323
+ ### Properties
324
+
325
+ #### IQ chat component
326
+
327
+ All available properties for the IQ chat component can be seen in the table below.
328
+
329
+ | Property | Type | Description |
330
+ |-------------------------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
331
+ | `authKey` | string | Authorization key generated via Luzmo API |
332
+ | `authToken` | string | Authorization token generated via Luzmo API |
333
+ | `appServer` | string | Tenancy of Luzmo app to connect to (Default: 'https://app.luzmo.com/' for US set appServer to 'https://app.us.luzmo.com/') |
334
+ | `apiHost` | string | Tenancy of Luzmo API to connect to (Default: 'https://api.luzmo.com/' , for US set apiHost to 'https://api.us.luzmo.com/') |
335
+ | `options` | string | Specifies the customization options of the IQ chat component that affect its appearance and functionality. |
336
+ | `initialSuggestionsDatasetId` | string | ID of a dataset that assists the AI service in generating automated, initial prompts based on the provided data. |
337
+
338
+ <br/>
339
+
340
+ #### IQ answer component
341
+
342
+ All available properties for the IQ answer component can be seen in the table below.
343
+
344
+ | Property | Type | Description |
345
+ |-------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
346
+ | `authKey` | string | Authorization key generated via Luzmo API |
347
+ | `authToken` | string | Authorization token generated via Luzmo API |
348
+ | `appServer` | string | Tenancy of Luzmo app to connect to (Default: 'https://app.luzmo.com/' for US set appServer to 'https://app.us.luzmo.com/') |
349
+ | `apiHost` | string | Tenancy of Luzmo API to connect to (Default: 'https://api.luzmo.com/' , for US set apiHost to 'https://api.us.luzmo.com/') |
350
+ | `options` | string | Specifies the customization options of the IQ answer component that affect its appearance and functionality. |
351
+ | `messages` | string | Specifies an array of messages to be displayed in the IQ answer component. |
352
+
353
+ <br/>
354
+
355
+ ### Customization options
356
+
357
+ #### IQ chat component
358
+
359
+ The `IQChatOptions` interface provides a range of configuration options that allow you to customize the appearance and functionalitie of the IQ chat component.
360
+ <br>
361
+ These options help tailor the chat experience to fit specific use cases by controlling elements such as welcome messages, translations, interaction options, and whether to display charts or text summaries.
362
+ <br>
363
+ The table below provides a detailed overview of each configurable parameter and its purpose.
364
+
365
+ | Property | Type | Description |
366
+ |-------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
367
+ | `areChartActionsEnabled` | boolean | Determines whether users should be allowed to trigger **chart actions** that enable them to explore further insights based on the given chart type. |
368
+ | `areWelcomeMessagesVisible` | boolean | Specifies whether to display the **welcome messages** at the chat start. |
369
+ | `chartTheme` | ItemThemeConfig | Defines theme settings for the charts displayed in the component. |
370
+ | `chatWidgetHorizontalOffset` | number | Specifies the horizontal offset for the chat widget overlay position in relation to the chat button. |
371
+ | `chatWidgetOverlayPosition` | string | Defines the position of the chat widget overlay in relation to the chat button. |
372
+ | `chatWidgetPosition` | ConnectedPosition[] | Defines the customized configuration of the chat widget overlay position. |
373
+ | `chatWidgetTitle` | string | The **chat title** to be displayed at the top of the chat container. |
374
+ | `chatWidgetVerticalOffset` | number | Specifies the vertical offset for the chat widget overlay position in relation to the chat button. |
375
+ | `disclaimerText` | string | Defines the **disclaimer text** to be displayed if enabled. Uses a default message if not specified. |
376
+ | `displayMode` | string | Configures the appearance of the chat component as either 'chatWidget' or 'fullChat'. |
377
+ | `initialSuggestions` | IQSuggestion[] | Predefined questions displayed at chat start, sent to the AI service upon click. |
378
+ | `isChartConfigurationEnabled` | boolean | Specifies whether users can configure charts via the chart configuration panel. |
379
+ | `isChartExportEnabled` | boolean | Specifies whether users can export charts as PNGs. |
380
+ | `isChartFeedbackEnabled` | boolean | Enables feedback, allowing users to rate responses and suggest corrections. |
381
+ | `isConversationIdVisible` | boolean | Displays the **conversation ID** for reporting or feedback purposes. |
382
+ | `isDisclaimerVisible` | boolean | Determines if the **disclaimer text** is shown in the chat. |
383
+ | `locale` | string | Specifies the **locale** for localizing text elements and chart configurations.<br/>Accepts values: "de", "en", "es", "fr", "it", "ja", "nl", "no", "pt", "ru", "sv", "tr". |
384
+ | `messages` | IQMessage[] | An array of processed messages to display, following the IQMessages interface. |
385
+ | `responseMode` | string | Specifies the response format as 'chart', 'text', or 'mixed'. |
386
+ | `timezone` | string | Specifies the **timezone** for displaying timestamps in charts. |
387
+ | `welcomeMessages` | IQMessage[] | Array of **welcome messages** displayed at chat start. |
388
+
389
+ <br>
390
+
391
+ #### IQ answer component
392
+
393
+ The `IQAnswerOptions` interface allows to customize the appearance and functionality of the IQ answer component.
394
+ <br>
395
+ These options help define whether certain elements, such as charts, text summaries, or feedback panel, are displayed to users.
396
+ <br>
397
+ The table below provides a detailed overview of each configurable parameter and its purpose:
398
+
399
+ | Property | Type | Description |
400
+ |-------------------------------| ------------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
401
+ | `areChartActionsEnabled` | boolean | Determines whether users should be allowed to trigger **chart actions** that enable them to explore further insights based on the given chart type. |
402
+ | `isChartConfigurationEnabled` | boolean | Specifies whether users should be able to configure charts with the chart configuration panel. |
403
+ | `isChartExportEnabled` | boolean | Specifies whether users can export charts as PNGs. |
404
+ | `isChartFeedbackEnabled` | boolean | Specifies whether the feedback mechanism should be displayed, allowing users to rate AI responses and suggest chart corrections. |
405
+ | `locale` | string | Specifies the **locale** used for component interactions, including localization of text elements like welcome messages, responses, and chart configurations. |
406
+ | `responseMode` | string | Defines the **response mode** for the answer component: 'chart', 'text', or 'mixed' (default). 'chart' shows AI responses as charts only, 'text' shows only text summaries, and 'mixed' displays both. |
407
+ | `chartTheme` | ItemThemeConfig | Specifies the theme settings for customizing the appearance of charts displayed in the component. |
408
+
409
+ <br>
410
+
411
+ ### CSS Variables
412
+
413
+ The following CSS variables can be used to customize various aspects of the IQ components. They are grouped based on their functionality, such as general styling, chat appearance, bubble styles, messages, and feedback.
414
+
415
+ #### General Styling
416
+ These variables control the overall appearance of elements like borders, background colors, font sizes, and spacing.
417
+
418
+ ```css
419
+ --luzmo-iq-border-color: rgba(0,0,0,.1); /* Border color */
420
+ --luzmo-iq-border-radius: .5rem; /* Standard border radius */
421
+ --luzmo-iq-border-radius-lg: .75rem; /* Large border radius */
422
+ --luzmo-iq-border-radius-xl: 1rem; /* Extra-large border radius */
423
+ --luzmo-iq-border-radius-full: 999rem; /* Full (circle) border radius */
424
+ --luzmo-iq-border-width: 1px; /* Standard border width */
425
+ --luzmo-iq-background-color: #ffffff; /* Default background color */
426
+ --luzmo-iq-background-hover-color: #f8fafc; /* Background color on hover */
427
+ --luzmo-iq-background-active-color: #f1f5f9; /* Background color when active */
428
+ --luzmo-iq-font-size: .875rem; /* Default font size */
429
+ --luzmo-iq-font-weight: 400; /* Standard font weight */
430
+ --luzmo-iq-font-color: #333; /* Default font color */
431
+ --luzmo-iq-spacing-1: .125rem; /* Small spacing */
432
+ --luzmo-iq-spacing-5: 1rem; /* Large spacing */
433
+ ```
434
+
435
+ #### Messages Styling
436
+ These variables define the appearance of both human and system messages in the chat.
437
+
438
+ ```css
439
+ --luzmo-iq-human-message-background: blue; /* Default background color for human messages */
440
+ --luzmo-iq-human-message-color: white; /* Default text color for human messages */
441
+ --luzmo-iq-system-message-background: rgb(226, 232, 240); /* Default background for system messages */
442
+ --luzmo-iq-system-message-color: #333; /* Default text color for system messages */
443
+ ```
444
+
445
+ #### State Loader and Spinner Styling
446
+ These variables are used for customizing the appearance of state loaders and spinners within the chat component.
447
+
448
+ ```css
449
+ --luzmo-iq-spinner-color: magenta; /* Default spinner color */
450
+ --luzmo-iq-spinner-border-width: .125rem; /* Default spinner border width */
451
+ --luzmo-iq-spinner-opacity: .5; /* Default spinner opacity */
452
+ --luzmo-iq-state-loader-background: #778393; /* Default background color of the loader */
453
+ --luzmo-iq-state-loader-color: #333; /* Default text color for the loader */
454
+ ```
455
+
456
+ #### Feedback and Ratings
457
+ These variables control the appearance of feedback icons and rating elements.
458
+
459
+ ```css
460
+ --luzmo-iq-positive-feedback-icon-hover-color: rgb(20, 120, 63); /* Default hover color for positive feedback */
461
+ --luzmo-iq-negative-feedback-icon-hover-color: rgb(216, 64, 64); /* Default hover color for negative feedback */
462
+ --luzmo-iq-rating-icon-size: 1rem; /* Default size of the rating icons */
463
+ --luzmo-iq-info-icon-size: 1rem; /* Default size of the info icons */
464
+ ```
465
+
466
+ #### Tooltips
467
+ These variables are used to adjust the appearance of tooltips.
468
+
469
+ ```css
470
+ --luzmo-iq-tooltip-background-color: #000; /* Tooltip background color, defaults to #000 (black) */
471
+ --luzmo-iq-tooltip-color: #fff; /* Tooltip text color, defaults to #fff (white) */
472
+ --luzmo-iq-tooltip-font-size: 0.8125rem; /* Tooltip font size, defaults to 0.8125rem */
473
+ ```
474
+
306
475
  ## Changelog
307
476
 
308
477
  - [Changelog](https://embed-libs.luzmo.com/changelogs/embed/)
package/index.cjs CHANGED
@@ -41,6 +41,8 @@ var src_exports = {};
41
41
  __export(src_exports, {
42
42
  LuzmoEmbedDashboard: () => LuzmoEmbedDashboard,
43
43
  LuzmoEmbedVizItem: () => LuzmoEmbedVizItem,
44
+ LuzmoIQEmbedAnswerComponent: () => LuzmoIQEmbedAnswerComponent,
45
+ LuzmoIQEmbedChatComponent: () => LuzmoIQEmbedChatComponent,
44
46
  addJSONSchemas: () => addJSONSchemas,
45
47
  fetchJSONSchema: () => fetchJSONSchema,
46
48
  getCachedJSONSchema: () => getCachedJSONSchema,
@@ -60,7 +62,7 @@ var import_style_map = require("lit/directives/style-map.js");
60
62
  var import_shared_embed = require("@luzmo/shared-embed");
61
63
 
62
64
  // libs/embed-libs/embed/package.json
63
- var version = "6.1.9";
65
+ var version = "6.2.1";
64
66
 
65
67
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
66
68
  var LuzmoService = class {
@@ -1072,7 +1074,7 @@ var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
1072
1074
  var dashboardContentsVersion = "0.1.90";
1073
1075
  var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1074
1076
  constructor() {
1075
- super();
1077
+ super(...arguments);
1076
1078
  this.appServer = "https://app.luzmo.com";
1077
1079
  this.apiHost = "https://api.luzmo.com";
1078
1080
  this.slots = [];
@@ -1238,7 +1240,7 @@ __decorateClass([
1238
1240
  converter: (value) => {
1239
1241
  try {
1240
1242
  return JSON.parse(value);
1241
- } catch (exc) {
1243
+ } catch {
1242
1244
  return value;
1243
1245
  }
1244
1246
  }
@@ -1270,6 +1272,240 @@ if (!customElements.get("luzmo-embed-viz-item")) {
1270
1272
  customElements.define("luzmo-embed-viz-item", LuzmoEmbedVizItem);
1271
1273
  }
1272
1274
 
1275
+ // libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-chat.ts
1276
+ var import_decorators3 = require("lit/decorators.js");
1277
+ var import_lit4 = require("lit");
1278
+ var SharedLib4 = __toESM(require("@luzmo/shared-embed"), 1);
1279
+ var inputMap = {
1280
+ aiEndpoint: "ai-endpoint",
1281
+ appServer: "app-server",
1282
+ apiHost: "api-host",
1283
+ options: "options",
1284
+ initialSuggestionsDatasetId: "initialSuggestionsDatasetId",
1285
+ authKey: "auth-key",
1286
+ authToken: "auth-token",
1287
+ version: "version",
1288
+ libVersion: "lib-version",
1289
+ aydHost: "ayd-host"
1290
+ };
1291
+ var LuzmoIQEmbedChatComponent = class extends import_lit4.LitElement {
1292
+ constructor() {
1293
+ super(...arguments);
1294
+ this.appServer = "https://app.luzmo.com";
1295
+ this.apiHost = "https://api.luzmo.com";
1296
+ this.version = version + "-wc-luzmo";
1297
+ this.libVersion = version + "-wc-luzmo";
1298
+ this.remoteEntryServer = "http://localhost:4202/";
1299
+ this.aydHost = "https://ayd.luzmo.com/";
1300
+ }
1301
+ static {
1302
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1303
+ this.styles = import_lit4.css`
1304
+ :host {
1305
+ display: block;
1306
+ width: 100%;
1307
+ height: 100%;
1308
+ }
1309
+ `;
1310
+ }
1311
+ createRenderRoot() {
1312
+ return this;
1313
+ }
1314
+ async firstUpdated(_changedProperties) {
1315
+ super.firstUpdated(_changedProperties);
1316
+ await SharedLib4.loadLibrary(this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer, "Component");
1317
+ this.createAndAppendElement();
1318
+ }
1319
+ createAndAppendElement() {
1320
+ if (!this.chartElement) {
1321
+ this.chartElement = document.createElement("luzmo-iq-chat-component");
1322
+ this.chartElement.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
1323
+ this.updateVizItemProperties();
1324
+ this.renderRoot.append(this.chartElement);
1325
+ }
1326
+ }
1327
+ updateVizItemProperties() {
1328
+ if (this.chartElement) {
1329
+ for (const key in inputMap) {
1330
+ const value = this[key];
1331
+ if (value) {
1332
+ const attributeValue = ["appServer", "apiHost", "aydHost"].includes(key) ? SharedLib4.removeTrailingSlash(value) : value;
1333
+ this.chartElement.setAttribute(
1334
+ inputMap[key],
1335
+ typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1336
+ );
1337
+ }
1338
+ }
1339
+ }
1340
+ }
1341
+ async updated(changedProperties) {
1342
+ if (this.chartElement) {
1343
+ for (const [propertyName] of changedProperties.entries()) {
1344
+ const mappedAttributeName = inputMap[propertyName] ?? propertyName;
1345
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1346
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1347
+ }
1348
+ } else {
1349
+ await SharedLib4.loadLibrary(this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer, "Component");
1350
+ this.createAndAppendElement();
1351
+ }
1352
+ }
1353
+ render() {
1354
+ return import_lit4.html` `;
1355
+ }
1356
+ };
1357
+ __decorateClass([
1358
+ (0, import_decorators3.property)()
1359
+ ], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
1360
+ __decorateClass([
1361
+ (0, import_decorators3.property)()
1362
+ ], LuzmoIQEmbedChatComponent.prototype, "apiHost", 2);
1363
+ __decorateClass([
1364
+ (0, import_decorators3.property)({ type: Object })
1365
+ ], LuzmoIQEmbedChatComponent.prototype, "options", 2);
1366
+ __decorateClass([
1367
+ (0, import_decorators3.property)({ type: String })
1368
+ ], LuzmoIQEmbedChatComponent.prototype, "initialSuggestionsDatasetId", 2);
1369
+ __decorateClass([
1370
+ (0, import_decorators3.property)()
1371
+ ], LuzmoIQEmbedChatComponent.prototype, "aiEndpoint", 2);
1372
+ __decorateClass([
1373
+ (0, import_decorators3.property)()
1374
+ ], LuzmoIQEmbedChatComponent.prototype, "authKey", 2);
1375
+ __decorateClass([
1376
+ (0, import_decorators3.property)()
1377
+ ], LuzmoIQEmbedChatComponent.prototype, "authToken", 2);
1378
+ __decorateClass([
1379
+ (0, import_decorators3.property)()
1380
+ ], LuzmoIQEmbedChatComponent.prototype, "version", 2);
1381
+ __decorateClass([
1382
+ (0, import_decorators3.property)()
1383
+ ], LuzmoIQEmbedChatComponent.prototype, "libVersion", 2);
1384
+ __decorateClass([
1385
+ (0, import_decorators3.property)()
1386
+ ], LuzmoIQEmbedChatComponent.prototype, "remoteEntryServer", 2);
1387
+ __decorateClass([
1388
+ (0, import_decorators3.property)()
1389
+ ], LuzmoIQEmbedChatComponent.prototype, "aydHost", 2);
1390
+ if (!customElements.get("luzmo-iq-embed-chat")) {
1391
+ customElements.define("luzmo-iq-embed-chat", LuzmoIQEmbedChatComponent);
1392
+ }
1393
+
1394
+ // libs/embed-libs/embed/src/lib/luzmo-iq-components/luzmo-iq-answer.ts
1395
+ var import_decorators4 = require("lit/decorators.js");
1396
+ var import_lit5 = require("lit");
1397
+ var SharedLib5 = __toESM(require("@luzmo/shared-embed"), 1);
1398
+ var inputMap2 = {
1399
+ aiEndPoint: "ai-end-point",
1400
+ appServer: "app-server",
1401
+ apiHost: "api-host",
1402
+ options: "options",
1403
+ authKey: "auth-key",
1404
+ authToken: "auth-token",
1405
+ version: "version",
1406
+ libVersion: "lib-version",
1407
+ messages: "messages"
1408
+ };
1409
+ var LuzmoIQEmbedAnswerComponent = class extends import_lit5.LitElement {
1410
+ constructor() {
1411
+ super(...arguments);
1412
+ this.appServer = "https://app.luzmo.com";
1413
+ this.apiHost = "https://api.luzmo.com";
1414
+ this.version = version + "-wc-luzmo";
1415
+ this.libVersion = version + "-wc-luzmo";
1416
+ this.remoteEntryServer = "http://localhost:4202";
1417
+ }
1418
+ static {
1419
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1420
+ this.styles = import_lit5.css`
1421
+ :host {
1422
+ display: block;
1423
+ width: 100%;
1424
+ height: 100%;
1425
+ }
1426
+ `;
1427
+ }
1428
+ createRenderRoot() {
1429
+ return this;
1430
+ }
1431
+ async firstUpdated(_changedProperties) {
1432
+ super.firstUpdated(_changedProperties);
1433
+ await SharedLib5.loadLibrary(this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer, "Component");
1434
+ this.createAndAppendElement();
1435
+ }
1436
+ createAndAppendElement() {
1437
+ if (!this.chartElement) {
1438
+ this.chartElement = document.createElement("luzmo-iq-answer-component");
1439
+ this.chartElement.addEventListener("addQuestion", (payload) => this.dispatchEvent(new CustomEvent("addQuestion", payload)));
1440
+ this.chartElement.addEventListener("addAnswer", (payload) => this.dispatchEvent(new CustomEvent("addAnswer", payload)));
1441
+ this.updateVizItemProperties();
1442
+ this.renderRoot.append(this.chartElement);
1443
+ }
1444
+ }
1445
+ updateVizItemProperties() {
1446
+ if (this.chartElement) {
1447
+ for (const key in inputMap2) {
1448
+ const value = this[key];
1449
+ if (value) {
1450
+ const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib5.removeTrailingSlash(value) : value;
1451
+ this.chartElement.setAttribute(
1452
+ inputMap2[key],
1453
+ typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1454
+ );
1455
+ }
1456
+ }
1457
+ }
1458
+ }
1459
+ async updated(changedProperties) {
1460
+ if (this.chartElement) {
1461
+ for (const [propertyName] of changedProperties.entries()) {
1462
+ const mappedAttributeName = inputMap2[propertyName] ?? propertyName;
1463
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1464
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1465
+ }
1466
+ } else {
1467
+ await SharedLib5.loadLibrary(this.appServer.startsWith("http://localhost") ? this.remoteEntryServer : this.appServer, "Component");
1468
+ this.createAndAppendElement();
1469
+ }
1470
+ }
1471
+ render() {
1472
+ return import_lit5.html` `;
1473
+ }
1474
+ };
1475
+ __decorateClass([
1476
+ (0, import_decorators4.property)()
1477
+ ], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);
1478
+ __decorateClass([
1479
+ (0, import_decorators4.property)()
1480
+ ], LuzmoIQEmbedAnswerComponent.prototype, "apiHost", 2);
1481
+ __decorateClass([
1482
+ (0, import_decorators4.property)({ type: Object })
1483
+ ], LuzmoIQEmbedAnswerComponent.prototype, "options", 2);
1484
+ __decorateClass([
1485
+ (0, import_decorators4.property)()
1486
+ ], LuzmoIQEmbedAnswerComponent.prototype, "aiEndPoint", 2);
1487
+ __decorateClass([
1488
+ (0, import_decorators4.property)()
1489
+ ], LuzmoIQEmbedAnswerComponent.prototype, "authKey", 2);
1490
+ __decorateClass([
1491
+ (0, import_decorators4.property)()
1492
+ ], LuzmoIQEmbedAnswerComponent.prototype, "authToken", 2);
1493
+ __decorateClass([
1494
+ (0, import_decorators4.property)()
1495
+ ], LuzmoIQEmbedAnswerComponent.prototype, "messages", 2);
1496
+ __decorateClass([
1497
+ (0, import_decorators4.property)()
1498
+ ], LuzmoIQEmbedAnswerComponent.prototype, "version", 2);
1499
+ __decorateClass([
1500
+ (0, import_decorators4.property)()
1501
+ ], LuzmoIQEmbedAnswerComponent.prototype, "libVersion", 2);
1502
+ __decorateClass([
1503
+ (0, import_decorators4.property)()
1504
+ ], LuzmoIQEmbedAnswerComponent.prototype, "remoteEntryServer", 2);
1505
+ if (!customElements.get("luzmo-iq-embed-answer")) {
1506
+ customElements.define("luzmo-iq-embed-answer", LuzmoIQEmbedAnswerComponent);
1507
+ }
1508
+
1273
1509
  // libs/embed-libs/embed/src/lib/helper/json-schema-utils.ts
1274
1510
  var cachedSchemas = {};
1275
1511
  function addJSONSchemas(schemas) {
@@ -1331,6 +1567,8 @@ var luzmoRefParserOptions = {
1331
1567
  0 && (module.exports = {
1332
1568
  LuzmoEmbedDashboard,
1333
1569
  LuzmoEmbedVizItem,
1570
+ LuzmoIQEmbedAnswerComponent,
1571
+ LuzmoIQEmbedChatComponent,
1334
1572
  addJSONSchemas,
1335
1573
  fetchJSONSchema,
1336
1574
  getCachedJSONSchema,
package/index.d.ts CHANGED
@@ -3,4 +3,6 @@ export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, E
3
3
  export { selectedDataUtils } from '@luzmo/shared-embed';
4
4
  export * from './lib/dashboard-component/dashboard-component';
5
5
  export * from './lib/viz-item/viz-item-component';
6
+ export * from './lib/luzmo-iq-components/luzmo-iq-chat';
7
+ export * from './lib/luzmo-iq-components/luzmo-iq-answer';
6
8
  export * from './lib/helper/json-schema-utils';