@luzmo/embed 6.1.0 → 6.1.2-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.
Files changed (55) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/index.cjs +1247 -555
  3. package/index.d.ts +2 -0
  4. package/index.js +1228 -540
  5. package/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
  6. package/lib/ai-component/luzmo-ai-chat.d.ts +24 -0
  7. package/lib/viz-item/viz-item.base.d.ts +1 -1
  8. package/libs/dashboard-contents-types/json-schemas.d.ts +223 -68
  9. package/libs/dashboard-contents-types/src/index.d.ts +1 -0
  10. package/libs/dashboard-contents-types/src/lib/area-chart/area-chart-options.d.ts +5 -5
  11. package/libs/dashboard-contents-types/src/lib/bar-chart/bar-chart-options.d.ts +9 -9
  12. package/libs/dashboard-contents-types/src/lib/box-plot/box-plot-options.d.ts +4 -4
  13. package/libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.d.ts +4 -4
  14. package/libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.d.ts +6 -6
  15. package/libs/dashboard-contents-types/src/lib/choropleth-map/choropleth-map-options.d.ts +9 -9
  16. package/libs/dashboard-contents-types/src/lib/circular-gauge/circular-gauge-options.d.ts +6 -6
  17. package/libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.d.ts +9 -9
  18. package/libs/dashboard-contents-types/src/lib/combination-chart/combination-chart-options.d.ts +5 -5
  19. package/libs/dashboard-contents-types/src/lib/conditional-number/conditional-number-options.d.ts +7 -7
  20. package/libs/dashboard-contents-types/src/lib/donut-chart/donut-chart-options.d.ts +5 -5
  21. package/libs/dashboard-contents-types/src/lib/evolution-number/evolution-number-options.d.ts +24 -9
  22. package/libs/dashboard-contents-types/src/lib/funnel-chart/funnel-chart-options.d.ts +5 -5
  23. package/libs/dashboard-contents-types/src/lib/line-chart/line-chart-options.d.ts +4 -4
  24. package/libs/dashboard-contents-types/src/lib/pivot-table/pivot-table-options.d.ts +9 -9
  25. package/libs/dashboard-contents-types/src/lib/regular-table/regular-table-options.d.ts +5 -5
  26. package/libs/dashboard-contents-types/src/lib/sankey-diagram/sankey-diagram-options.d.ts +6 -6
  27. package/libs/dashboard-contents-types/src/lib/scatter-plot/scatter-plot-options.d.ts +6 -6
  28. package/libs/dashboard-contents-types/src/lib/search-filter/index.d.ts +3 -0
  29. package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-options.d.ts +56 -0
  30. package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-slots.d.ts +17 -0
  31. package/libs/dashboard-contents-types/src/lib/search-filter/search-filter.d.ts +23 -0
  32. package/libs/dashboard-contents-types/src/lib/shared/common.d.ts +5 -5
  33. package/libs/dashboard-contents-types/src/lib/shared/drop-object-view-options.d.ts +2 -0
  34. package/libs/dashboard-contents-types/src/lib/shared/interactivity-export.d.ts +2 -2
  35. package/libs/dashboard-contents-types/src/lib/shared/theme.d.ts +5 -1
  36. package/libs/dashboard-contents-types/src/lib/slicer-filter/slicer-filter-options.d.ts +7 -7
  37. package/libs/embed-libs/embed/src/index.d.ts +2 -0
  38. package/libs/embed-libs/embed/src/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
  39. package/libs/embed-libs/embed/src/lib/ai-component/luzmo-ai-chat.d.ts +24 -0
  40. package/libs/embed-libs/embed/src/lib/viz-item/viz-item.base.d.ts +1 -1
  41. package/libs/embed-libs/shared-embed/src/index.common.d.ts +1 -0
  42. package/libs/embed-libs/shared-embed/src/lib/helpers/remote-federation.d.ts +1 -1
  43. package/libs/embed-libs/shared-embed/src/lib/models/ai-components.model.d.ts +128 -0
  44. package/luzmo-embed.min.js +1634 -942
  45. package/package.json +3 -3
  46. package/src/index.d.ts +7 -0
  47. package/src/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
  48. package/src/lib/ai-component/luzmo-ai-chat.d.ts +24 -0
  49. package/src/lib/dashboard-component/dashboard-base.d.ts +98 -0
  50. package/src/lib/dashboard-component/dashboard-component.d.ts +8 -0
  51. package/src/lib/dashboard-component/dashboard-styles.d.ts +1 -0
  52. package/src/lib/helper/event-bus-handler.d.ts +1 -0
  53. package/src/lib/luzmo-service.d.ts +6 -0
  54. package/src/lib/viz-item/viz-item-component.d.ts +4 -0
  55. package/src/lib/viz-item/viz-item.base.d.ts +73 -0
@@ -0,0 +1,23 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import * as SharedLib from '@luzmo/shared-embed';
3
+ export declare class LuzmoAIAnswerComponent extends LitElement {
4
+ appServer?: string;
5
+ apiHost?: string;
6
+ options?: SharedLib.AIAnswerDisplayOptions;
7
+ aiEndPoint?: string;
8
+ authKey?: string;
9
+ authToken?: string;
10
+ messages: SharedLib.Message[];
11
+ version?: string;
12
+ libVersion?: string;
13
+ remoteEntryServer: string;
14
+ chartElement: HTMLElement;
15
+ static styles: import("lit").CSSResult;
16
+ constructor();
17
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
18
+ protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
19
+ private createAndAppendElement;
20
+ private updateVizItemProperties;
21
+ updated(changedProperties: PropertyValues): Promise<void>;
22
+ protected render(): unknown;
23
+ }
@@ -0,0 +1,24 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import * as SharedLib from '@luzmo/shared-embed';
3
+ export declare class LuzmoEmbedAIChatComponent extends LitElement {
4
+ appServer?: string;
5
+ apiHost?: string;
6
+ options?: SharedLib.AIChatDisplayOptions;
7
+ datasets?: string[];
8
+ aiEndpoint?: string;
9
+ authKey?: string;
10
+ authToken?: string;
11
+ version?: string;
12
+ libVersion?: string;
13
+ remoteEntryServer: string;
14
+ aydHost: string;
15
+ chartElement: HTMLElement;
16
+ static styles: import("lit").CSSResult;
17
+ constructor();
18
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
19
+ protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
20
+ private createAndAppendElement;
21
+ private updateVizItemProperties;
22
+ updated(changedProperties: PropertyValues): Promise<void>;
23
+ protected render(): unknown;
24
+ }
@@ -9,7 +9,7 @@ import type { VizItemType, VizItemSlots, FilterGroup } from '@luzmo/dashboard-co
9
9
  * together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.mjs)
10
10
  * and if needed the migration will be applied on the dashboard app level.
11
11
  */
12
- export declare const dashboardContentsVersion = "0.1.88";
12
+ export declare const dashboardContentsVersion = "0.1.89";
13
13
  type FunctionCall = [(...args: any) => any, any[]];
14
14
  interface LuzmoVizItemComponentInterface extends HTMLElement {
15
15
  options?: SharedLib.VizItemOptions;
@@ -29,5 +29,6 @@ export * from './lib/models/styles.model';
29
29
  export * from './lib/models/filters.model';
30
30
  export * from './lib/models/viz-item.model';
31
31
  export * from './lib/models/viz-item-post-message.model';
32
+ export * from './lib/models/ai-components.model';
32
33
  export * from './lib/models/viz-items';
33
34
  export * from './lib/constants/class-constants';
@@ -8,7 +8,7 @@ type RemoteMap = {
8
8
  lib?: any;
9
9
  };
10
10
  };
11
- type ComponentNames = 'DashboardApp';
11
+ type ComponentNames = 'DashboardApp' | 'Component';
12
12
  export declare const remotesMap: RemoteMap;
13
13
  export declare function __federationMethodWrapDefault(module: any, need?: boolean): any;
14
14
  export declare function __federationMethodGetRemote(remoteName: string, componentName: string): Promise<any>;
@@ -0,0 +1,128 @@
1
+ import { Filter, ItemType } from '@luzmo/ngx-embed';
2
+ import type { ThemeConfig } from '@luzmo/dashboard-contents-types';
3
+ declare interface ConnectedPosition {
4
+ originX: 'start' | 'center' | 'end';
5
+ originY: 'top' | 'center' | 'bottom';
6
+ overlayX: 'start' | 'center' | 'end';
7
+ overlayY: 'top' | 'center' | 'bottom';
8
+ weight?: number;
9
+ offsetX?: number;
10
+ offsetY?: number;
11
+ panelClass?: string | string[];
12
+ }
13
+ type ChartFeedback = {
14
+ aichart_id?: string;
15
+ based_on_message_id?: string;
16
+ corrected_chart: Chart;
17
+ created_at: string;
18
+ id: string;
19
+ message_id?: string;
20
+ rating: number;
21
+ type: 'user';
22
+ updated_at: string;
23
+ user_id: string;
24
+ };
25
+ type Chart = {
26
+ aichartId?: string;
27
+ filters?: Filter[];
28
+ feedback?: ChartFeedback;
29
+ name: string;
30
+ options?: {
31
+ display?: {
32
+ title?: boolean;
33
+ legend?: boolean;
34
+ categoryLabels?: boolean;
35
+ };
36
+ interactivity?: any;
37
+ theme?: string | ThemeConfig;
38
+ mode?: string;
39
+ sort?: any;
40
+ };
41
+ slots: any[];
42
+ type: ItemType;
43
+ setInitialOptions?: (options: any) => any;
44
+ cleanupOptions?: (options: any) => any;
45
+ };
46
+ type ColumnType = 'numeric' | 'datetime' | 'hierarchy' | 'spatial';
47
+ type Column = {
48
+ id: string;
49
+ name: Record<string, string>;
50
+ description: Record<string, string> | null;
51
+ type: ColumnType;
52
+ subtype: string | null;
53
+ format?: string;
54
+ idx: string;
55
+ securableFormula?: {
56
+ formula_id: string;
57
+ securable_id: string;
58
+ };
59
+ isFormula?: boolean;
60
+ };
61
+ type Formula = {
62
+ id: string;
63
+ name: Record<string, string>;
64
+ type: ColumnType;
65
+ subtype: string | null;
66
+ format?: string;
67
+ idx: string;
68
+ securableFormula?: {
69
+ formula_id: string;
70
+ securable_id: string;
71
+ };
72
+ isFormula?: boolean;
73
+ };
74
+ type Dataset = {
75
+ id: string;
76
+ name: Record<string, string>;
77
+ description: Record<string, string> | null;
78
+ columns: Column[];
79
+ formulas: Formula[];
80
+ };
81
+ export type Message = {
82
+ type?: 'humanMessage' | 'systemMessage' | 'chartAnswer';
83
+ message?: string;
84
+ question?: string;
85
+ chart?: Chart;
86
+ datasets?: Dataset[];
87
+ default?: boolean;
88
+ messageId?: string | number;
89
+ };
90
+ export interface AIChatDisplayOptions {
91
+ chatWelcomeMessages?: Message[];
92
+ chatContainerHeaderTitle?: string;
93
+ showConversationId?: boolean;
94
+ showDisclaimer?: boolean;
95
+ disclaimerText?: string;
96
+ display?: string;
97
+ language?: string;
98
+ suggestions?: Suggestion[];
99
+ showOnlyChart?: boolean;
100
+ showOnlyTextSummary?: boolean;
101
+ showInteractions?: boolean;
102
+ showNextBestActions?: boolean;
103
+ showSuggestions?: boolean;
104
+ showWelcomeChat?: boolean;
105
+ showFeedback?: boolean;
106
+ showConfiguration?: boolean;
107
+ chatBubbleOverlayPosition?: 'topRight' | 'topLeft' | 'topCenter' | 'bottomRight' | 'bottomLeft' | 'bottomCenter' | 'leftCenter' | 'rightCenter';
108
+ chatBubbleVerticalOffset?: number;
109
+ chatBubbleHorizontalOffset?: number;
110
+ positions?: ConnectedPosition[];
111
+ theme?: ThemeConfig;
112
+ }
113
+ export interface AIAnswerDisplayOptions {
114
+ language?: AIChatDisplayOptions['language'];
115
+ showChart?: AIChatDisplayOptions['showOnlyChart'];
116
+ showTextSummary?: AIChatDisplayOptions['showOnlyTextSummary'];
117
+ showInteractions?: AIChatDisplayOptions['showInteractions'];
118
+ showNextBestActions?: AIChatDisplayOptions['showNextBestActions'];
119
+ showFeedback?: AIChatDisplayOptions['showFeedback'];
120
+ showConfiguration?: AIChatDisplayOptions['showConfiguration'];
121
+ theme?: AIChatDisplayOptions['theme'];
122
+ }
123
+ export interface Suggestion {
124
+ title: string;
125
+ chartType: string;
126
+ columnIds: number[];
127
+ }
128
+ export {};