@luzmo/embed 6.1.1 → 6.1.2-beta.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 +6 -0
- package/index.cjs +262 -30
- package/index.d.ts +2 -0
- package/index.js +243 -15
- package/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
- package/lib/ai-component/luzmo-ai-chat.d.ts +24 -0
- package/libs/dashboard-contents-types/src/index.d.ts +1 -0
- package/libs/dashboard-contents-types/src/lib/area-chart/area-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/bar-chart/bar-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/box-plot/box-plot-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/combination-chart/combination-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/conditional-number/conditional-number-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/donut-chart/donut-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/evolution-number/evolution-number-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/funnel-chart/funnel-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/line-chart/line-chart-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/scatter-plot/scatter-plot-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/search-filter/index.d.ts +3 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-options.d.ts +56 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-slots.d.ts +17 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter.d.ts +23 -0
- package/libs/dashboard-contents-types/src/lib/shared/common.d.ts +1 -1
- package/libs/embed-libs/embed/src/index.d.ts +2 -0
- package/libs/embed-libs/embed/src/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
- package/libs/embed-libs/embed/src/lib/ai-component/luzmo-ai-chat.d.ts +24 -0
- package/libs/embed-libs/shared-embed/src/index.common.d.ts +1 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/remote-federation.d.ts +1 -1
- package/libs/embed-libs/shared-embed/src/lib/models/ai-components.model.d.ts +129 -0
- package/luzmo-embed.min.js +649 -417
- package/package.json +2 -2
- package/src/index.d.ts +7 -0
- package/src/lib/ai-component/luzmo-ai-answer.d.ts +23 -0
- package/src/lib/ai-component/luzmo-ai-chat.d.ts +24 -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/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 +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
|
+
}
|
|
@@ -22,6 +22,7 @@ export * from './lib/scatter-plot';
|
|
|
22
22
|
export * from './lib/conditional-number';
|
|
23
23
|
export * from './lib/sankey-diagram';
|
|
24
24
|
export * from './lib/funnel-chart';
|
|
25
|
+
export * from './lib/search-filter';
|
|
25
26
|
export * from './lib/shared';
|
|
26
27
|
export * from './options';
|
|
27
28
|
export * from './slots';
|
|
@@ -284,7 +284,7 @@ interface AreaChartDisplayViewOptions extends DisplayLegendViewOptions, DisplayT
|
|
|
284
284
|
modeOption?: boolean;
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
|
-
interface AreaChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions,
|
|
287
|
+
interface AreaChartInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityMeasureDimensionPickerViewOptions, InteractivityGoToUrlViewOptions {
|
|
288
288
|
/**
|
|
289
289
|
* Interactivity options
|
|
290
290
|
*/
|
|
@@ -206,7 +206,7 @@ interface BarChartDisplayViewOptions extends DisplayTitleViewOptions, DisplayLeg
|
|
|
206
206
|
modeOption?: boolean;
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
interface BarChartInteractivityViewOptions extends
|
|
209
|
+
interface BarChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityFilterOnSelectViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
210
210
|
/**
|
|
211
211
|
* Interactivity options
|
|
212
212
|
*/
|
|
@@ -266,7 +266,7 @@ export interface BoxPlotViewOptions extends Omit<AxisObjectViewOptions, 'interac
|
|
|
266
266
|
};
|
|
267
267
|
manualAxisRange?: ManualAxesRange;
|
|
268
268
|
}
|
|
269
|
-
export interface BoxPlotInteractivity extends
|
|
269
|
+
export interface BoxPlotInteractivity extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
270
270
|
/**
|
|
271
271
|
* Interactivity options
|
|
272
272
|
*/
|
|
@@ -49,7 +49,7 @@ interface BubbleChartDisplayViewOptions extends DisplayLegendViewOptions, Displa
|
|
|
49
49
|
bubbleValues?: 'none' | 'percentage' | 'absolute';
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
interface BubbleChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions,
|
|
52
|
+
interface BubbleChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityFilterOnSelectViewOptions, InteractivityGoToUrlViewOptions {
|
|
53
53
|
/**
|
|
54
54
|
* Interactivity options
|
|
55
55
|
*/
|
|
@@ -38,7 +38,7 @@ interface BulletChartDisplayViewOptions extends DisplayTitleViewOptions {
|
|
|
38
38
|
ranges?: boolean;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
interface BulletChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions {
|
|
41
|
+
interface BulletChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
42
42
|
/**
|
|
43
43
|
* Interactivity options
|
|
44
44
|
*/
|
|
@@ -203,7 +203,7 @@ interface ColumnChartDisplayViewOptions extends DisplayLegendViewOptions, Displa
|
|
|
203
203
|
modeOption?: boolean;
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
interface ColumnChartInteractivityViewOptions extends InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityFilterOnSelectViewOptions {
|
|
206
|
+
interface ColumnChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityFilterOnSelectViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
207
207
|
/**
|
|
208
208
|
* Interactivity options
|
|
209
209
|
*/
|
package/libs/dashboard-contents-types/src/lib/combination-chart/combination-chart-options.d.ts
CHANGED
|
@@ -233,7 +233,7 @@ interface CombinationChartDisplayOptions extends DisplayTitleViewOptions, Displa
|
|
|
233
233
|
legend?: NonNullable<NonNullable<DisplayLegendViewOptions['display']>['legend']>;
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
|
-
interface CombinationChartInteractivityOptions extends
|
|
236
|
+
interface CombinationChartInteractivityOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
237
237
|
/**
|
|
238
238
|
* Interactivity options
|
|
239
239
|
*/
|
package/libs/dashboard-contents-types/src/lib/conditional-number/conditional-number-options.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ interface ConditionalNumberDisplayViewOptions extends DisplayTitleViewOptions {
|
|
|
59
59
|
label?: boolean;
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
interface ConditionalNumberInteractivityViewOptions extends
|
|
62
|
+
interface ConditionalNumberInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
63
63
|
/**
|
|
64
64
|
* Interactivity options
|
|
65
65
|
*/
|
|
@@ -81,7 +81,7 @@ interface DonutChartDisplayViewOptions extends DisplayLegendViewOptions, Display
|
|
|
81
81
|
categoryLabels?: boolean;
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
interface DonutChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions,
|
|
84
|
+
interface DonutChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityFilterOnSelectViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
85
85
|
/**
|
|
86
86
|
* Interactivity options
|
|
87
87
|
*/
|
package/libs/dashboard-contents-types/src/lib/evolution-number/evolution-number-options.d.ts
CHANGED
|
@@ -165,7 +165,7 @@ export interface EvolutionNumberViewOptions extends Omit<DropObjectViewOptions,
|
|
|
165
165
|
*/
|
|
166
166
|
uploadedImage?: string;
|
|
167
167
|
}
|
|
168
|
-
interface EvolutionNumberInteractivityViewOptions extends InteractivityGoToUrlViewOptions, InteractivityExportViewOptions {
|
|
168
|
+
interface EvolutionNumberInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions, InteractivityCustomEventsViewOptions, InteractivityGoToUrlViewOptions, InteractivityExportViewOptions {
|
|
169
169
|
/**
|
|
170
170
|
* Interactivity options
|
|
171
171
|
*/
|
|
@@ -61,7 +61,7 @@ interface FunnelChartDisplayViewOptions extends DisplayLegendViewOptions, Displa
|
|
|
61
61
|
values?: boolean;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
interface FunnelChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions,
|
|
64
|
+
interface FunnelChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityDrilldownViewOptions, InteractivityExportViewOptions, InteractivityFilterOnSelectViewOptions, InteractivityMeasureDimensionPickerViewOptions, InteractivityGoToUrlViewOptions {
|
|
65
65
|
/**
|
|
66
66
|
* Interactivity options
|
|
67
67
|
*/
|
|
@@ -307,7 +307,7 @@ interface LineChartDisplayViewOptions extends DisplayTitleViewOptions, DisplayLe
|
|
|
307
307
|
legend?: NonNullable<NonNullable<DisplayLegendViewOptions['display']>['legend']>;
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
interface LineChartInteractivityViewOptions extends InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
310
|
+
interface LineChartInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
311
311
|
/**
|
|
312
312
|
* Interactivity options
|
|
313
313
|
*/
|
|
@@ -167,7 +167,7 @@ interface ScatterPlotDisplayViewOptions extends DisplayLegendViewOptions, Displa
|
|
|
167
167
|
legend?: NonNullable<NonNullable<DisplayLegendViewOptions['display']>['legend']>;
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
interface ScatterPlotInteractivityViewOptions extends
|
|
170
|
+
interface ScatterPlotInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
171
171
|
/**
|
|
172
172
|
* Interactivity options
|
|
173
173
|
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
|
|
2
|
+
import { DropObjectViewOptions } from '../shared/drop-object-view-options';
|
|
3
|
+
import { InfoTooltipViewOptions } from '../shared/info-tooltip-options';
|
|
4
|
+
import { PlaceholderViewOptions } from '../shared/placeholder';
|
|
5
|
+
import { DisplayTitleViewOptions, TitleViewOptions } from '../shared/title';
|
|
6
|
+
export interface SearchFilterViewOptions extends Omit<DropObjectViewOptions, 'display' | 'interactivity'>, InfoTooltipViewOptions, TitleViewOptions, PlaceholderViewOptions, SearchFilterDisplayViewOptions, SearchFilterInteractivityViewOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to auto apply filters or add the apply button
|
|
9
|
+
*/
|
|
10
|
+
applyFiltersWithButton?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Update left or right padding of the Search filter
|
|
13
|
+
*/
|
|
14
|
+
padding?: {
|
|
15
|
+
/**
|
|
16
|
+
* Update left padding of the Search filter
|
|
17
|
+
*/
|
|
18
|
+
left?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Update right padding of the Search filter
|
|
21
|
+
*/
|
|
22
|
+
right?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface SearchFilterDisplayViewOptions extends DisplayTitleViewOptions {
|
|
26
|
+
/**
|
|
27
|
+
* General display options of the Search filter: title, label, placeholder, search and clear
|
|
28
|
+
*/
|
|
29
|
+
display: {
|
|
30
|
+
/**
|
|
31
|
+
* Show or hide the title
|
|
32
|
+
*/
|
|
33
|
+
title: NonNullable<NonNullable<DisplayTitleViewOptions['display']>['title']>;
|
|
34
|
+
/**
|
|
35
|
+
* Show or hide the label of the Search filter
|
|
36
|
+
*/
|
|
37
|
+
label?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Show or hide the placeholder
|
|
40
|
+
*/
|
|
41
|
+
placeholder?: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
interface SearchFilterInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions {
|
|
45
|
+
/**
|
|
46
|
+
* Interactivity options
|
|
47
|
+
*/
|
|
48
|
+
interactivity?: {
|
|
49
|
+
/**
|
|
50
|
+
* An array of measure dimension picker configurations
|
|
51
|
+
* @default [[]]
|
|
52
|
+
*/
|
|
53
|
+
measureDimensionPicker?: NonNullable<NonNullable<InteractivityMeasureDimensionPickerViewOptions['interactivity']>['measureDimensionPicker']>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DashboardContentVizItemSlot, DateTimeSlotContent, HierarchySlotContent, NumericSlotContent } from '../shared/slots';
|
|
2
|
+
/**
|
|
3
|
+
* Dimension slot definition of the search filter. Dimension slot is a required slot and it can have multiple columns.
|
|
4
|
+
*/
|
|
5
|
+
interface DimensionSlot extends DashboardContentVizItemSlot {
|
|
6
|
+
name: 'dimension';
|
|
7
|
+
/**
|
|
8
|
+
* Dimension slot definition
|
|
9
|
+
*/
|
|
10
|
+
content: (HierarchySlotContent | NumericSlotContent | DateTimeSlotContent)[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Data definition of the Search filter
|
|
14
|
+
* @maxItems 1
|
|
15
|
+
*/
|
|
16
|
+
export type SearchFilterSlots = DimensionSlot[];
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VizItemType } from '../shared/common';
|
|
2
|
+
import { SearchFilterViewOptions } from './search-filter-options';
|
|
3
|
+
import { SearchFilterSlots } from './search-filter-slots';
|
|
4
|
+
/**
|
|
5
|
+
* Search filter item
|
|
6
|
+
*/
|
|
7
|
+
export interface SearchFilter {
|
|
8
|
+
/**
|
|
9
|
+
* Type of the item
|
|
10
|
+
*/
|
|
11
|
+
type: Extract<VizItemType, 'search-filter'>;
|
|
12
|
+
/**
|
|
13
|
+
* Options of the search filter item
|
|
14
|
+
* @$ref ./search-filter-options.schema.json/
|
|
15
|
+
*/
|
|
16
|
+
options: SearchFilterViewOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Data definition of the search filter
|
|
19
|
+
* @maxItems 1
|
|
20
|
+
* @$ref ./search-filter-slots.schema.json
|
|
21
|
+
*/
|
|
22
|
+
slots: SearchFilterSlots;
|
|
23
|
+
}
|
|
@@ -97,7 +97,7 @@ export interface RankingViewOptions {
|
|
|
97
97
|
ranking?: ItemQueryRanking;
|
|
98
98
|
}
|
|
99
99
|
export type SortDirection = OrderDirection | '';
|
|
100
|
-
export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
|
|
100
|
+
export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'search-filter' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
|
|
101
101
|
export type ItemType = VizItemType;
|
|
102
102
|
export type DatetimeDisplayMode = 'default' | 'weekday_number' | 'weekday_name' | 'day_in_month' | 'day_in_year' | 'month_name' | 'month_number' | 'week_number' | 'second_in_minute' | 'minute_in_hour' | 'hour_in_day' | 'quarter_number';
|
|
103
103
|
export type ScreenMode = 'desktop' | 'tablet' | 'mobile' | 'largeScreen' | 'fixed';
|
|
@@ -3,3 +3,5 @@ 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/ai-component/luzmo-ai-chat';
|
|
7
|
+
export * from './lib/ai-component/luzmo-ai-answer';
|
|
@@ -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
|
+
}
|
|
@@ -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,129 @@
|
|
|
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
|
+
timezone?: string;
|
|
99
|
+
suggestions?: Suggestion[];
|
|
100
|
+
showChart?: boolean;
|
|
101
|
+
showTextSummary?: boolean;
|
|
102
|
+
showInteractions?: boolean;
|
|
103
|
+
showNextActions?: boolean;
|
|
104
|
+
showSuggestions?: boolean;
|
|
105
|
+
showWelcomeChat?: boolean;
|
|
106
|
+
showFeedback?: boolean;
|
|
107
|
+
showConfiguration?: boolean;
|
|
108
|
+
chatBubbleOverlayPosition?: 'topRight' | 'topLeft' | 'topCenter' | 'bottomRight' | 'bottomLeft' | 'bottomCenter' | 'leftCenter' | 'rightCenter';
|
|
109
|
+
chatBubbleVerticalOffset?: number;
|
|
110
|
+
chatBubbleHorizontalOffset?: number;
|
|
111
|
+
positions?: ConnectedPosition[];
|
|
112
|
+
theme?: ThemeConfig;
|
|
113
|
+
}
|
|
114
|
+
export interface AIAnswerDisplayOptions {
|
|
115
|
+
language?: AIChatDisplayOptions['language'];
|
|
116
|
+
showChart?: AIChatDisplayOptions['showChart'];
|
|
117
|
+
showTextSummary?: AIChatDisplayOptions['showTextSummary'];
|
|
118
|
+
showInteractions?: AIChatDisplayOptions['showInteractions'];
|
|
119
|
+
showNextBestActions?: AIChatDisplayOptions['showNextActions'];
|
|
120
|
+
showFeedback?: AIChatDisplayOptions['showFeedback'];
|
|
121
|
+
showConfiguration?: AIChatDisplayOptions['showConfiguration'];
|
|
122
|
+
theme?: AIChatDisplayOptions['theme'];
|
|
123
|
+
}
|
|
124
|
+
export interface Suggestion {
|
|
125
|
+
title: string;
|
|
126
|
+
chartType: string;
|
|
127
|
+
columnIds: number[];
|
|
128
|
+
}
|
|
129
|
+
export {};
|