@luzmo/embed 6.1.7 → 6.1.9-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +172 -3
- package/index.cjs +311 -55365
- package/index.d.ts +5 -2
- package/index.js +303 -55360
- package/lib/helper/json-schema-utils.d.ts +64 -0
- package/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +22 -0
- package/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +23 -0
- package/lib/viz-item/viz-item.base.d.ts +1 -1
- package/luzmo-embed.min.js +358 -55428
- package/package.json +3 -3
- package/src/index.d.ts +8 -0
- package/src/lib/dashboard-component/dashboard-base.d.ts +98 -0
- package/src/lib/dashboard-component/dashboard-component.d.ts +8 -0
- package/src/lib/dashboard-component/dashboard-styles.d.ts +1 -0
- package/src/lib/helper/event-bus-handler.d.ts +1 -0
- package/src/lib/helper/json-schema-utils.d.ts +64 -0
- package/src/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +22 -0
- package/src/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +23 -0
- package/src/lib/luzmo-service.d.ts +6 -0
- package/src/lib/viz-item/viz-item-component.d.ts +4 -0
- package/src/lib/viz-item/viz-item.base.d.ts +72 -0
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.1.9] - 2024-11-14
|
|
4
|
+
|
|
5
|
+
### Updates
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## [6.1.8] - 2024-11-12
|
|
10
|
+
|
|
11
|
+
### Updates
|
|
12
|
+
|
|
13
|
+
- Fixes for getAccessibleDashboards()
|
|
14
|
+
|
|
3
15
|
## [6.1.7] - 2024-10-25
|
|
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. [
|
|
11
|
-
5. [
|
|
12
|
-
6. [
|
|
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
|
+
| `areInteractionsEnabled` | boolean | Specifies whether **interactive options** should be enabled for users within displayed charts, such as exporting charts as PNGs. |
|
|
369
|
+
| `areWelcomeMessagesVisible` | boolean | Specifies whether to display the welcome messages at the chat start. |
|
|
370
|
+
| `chatTitle` | string | The **chat title** to be displayed at the top of the chat container. |
|
|
371
|
+
| `chatWidgetHorizontalOffset` | number | Specifies the horizontal offset for the chat widget overlay position in relation to the chat button. |
|
|
372
|
+
| `chatWidgetOverlayPosition` | string | Defines the position of the chat widget overlay in relation to the chat button. |
|
|
373
|
+
| `chatWidgetPosition` | ConnectedPosition[] | Defines the customized configuration of the chat widget overlay position. |
|
|
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
|
+
| `isConfigurationEnabled` | boolean | Specifies whether users can configure charts via the chart configuration panel. |
|
|
379
|
+
| `isConversationIdVisible` | boolean | Displays the **conversation ID** for reporting or feedback purposes. |
|
|
380
|
+
| `isDisclaimerVisible` | boolean | Determines if the **disclaimer text** is shown in the chat. |
|
|
381
|
+
| `isFeedbackEnabled` | boolean | Enables feedback, allowing users to rate responses and suggest corrections. |
|
|
382
|
+
| `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". |
|
|
383
|
+
| `messages` | IQMessage[] | An array of processed messages to display, following the IQMessages interface. |
|
|
384
|
+
| `responseMode` | string | Specifies the response format as 'chart', 'text', or 'mixed'. |
|
|
385
|
+
| `theme` | ItemThemeConfig | Defines the theme settings for the chat component. |
|
|
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
|
+
| `areInteractionsEnabled` | boolean | Specifies whether **interactive options** should be enabled for users within displayed charts, such as exporting charts as PNGs. |
|
|
403
|
+
| `isConfigurationEnabled` | boolean | Specifies whether users should be able to configure charts with the chart configuration panel. |
|
|
404
|
+
| `isFeedbackEnabled` | 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
|
+
| `theme` | ItemThemeConfig | Specifies the theme settings for customizing the appearance of the component and its elements. |
|
|
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-border-color: rgba(0,0,0,.1); /* Border color */
|
|
420
|
+
--luzmo-border-radius: .5rem; /* Standard border radius */
|
|
421
|
+
--luzmo-border-radius-lg: .75rem; /* Large border radius */
|
|
422
|
+
--luzmo-border-radius-xl: 1rem; /* Extra-large border radius */
|
|
423
|
+
--luzmo-border-radius-full: 999rem; /* Full (circle) border radius */
|
|
424
|
+
--luzmo-border-width: 1px; /* Standard border width */
|
|
425
|
+
--luzmo-background-color: #ffffff; /* Default background color */
|
|
426
|
+
--luzmo-background-hover-color: #f8fafc; /* Background color on hover */
|
|
427
|
+
--luzmo-background-active-color: #f1f5f9; /* Background color when active */
|
|
428
|
+
--luzmo-font-size: .875rem; /* Default font size */
|
|
429
|
+
--luzmo-font-weight: 400; /* Standard font weight */
|
|
430
|
+
--luzmo-font-color: #333; /* Default font color */
|
|
431
|
+
--luzmo-spacing-1: .125rem; /* Small spacing */
|
|
432
|
+
--luzmo-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-human-message-background: blue; /* Default background color for human messages */
|
|
440
|
+
--luzmo-human-message-color: white; /* Default text color for human messages */
|
|
441
|
+
--luzmo-system-message-background: rgb(226, 232, 240); /* Default background for system messages */
|
|
442
|
+
--luzmo-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-spinner-color: magenta; /* Default spinner color */
|
|
450
|
+
--luzmo-spinner-border-width: .125rem; /* Default spinner border width */
|
|
451
|
+
--luzmo-spinner-opacity: .5; /* Default spinner opacity */
|
|
452
|
+
--luzmo-state-loader-background: #778393; /* Default background color of the loader */
|
|
453
|
+
--luzmo-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-positive-feedback-icon-hover-color: rgb(20, 120, 63); /* Default hover color for positive feedback */
|
|
461
|
+
--luzmo-negative-feedback-icon-hover-color: rgb(216, 64, 64); /* Default hover color for negative feedback */
|
|
462
|
+
--luzmo-rating-icon-size: 1rem; /* Default size of the rating icons */
|
|
463
|
+
--luzmo-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-ai-tooltip-background-color: #000; /* Tooltip background color, defaults to #000 (black) */
|
|
471
|
+
--luzmo-ai-tooltip-color: #fff; /* Tooltip text color, defaults to #fff (white) */
|
|
472
|
+
--luzmo-ai-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/)
|