@luzmo/analytics-components-kit 1.0.1-alpha.144 → 1.0.1-alpha.146
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/angular/esm/types/ai-chat.types.d.ts +3 -0
- package/angular/tsconfig.json +3 -0
- package/angular/types/ai-chat.types.ts +5 -0
- package/components/ai-chat/ai-chat-streaming.d.ts +14 -0
- package/components/ai-chat/ai-chat.d.ts +43 -5
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +3 -0
- package/components/ai-chat/index.js +6 -6
- package/components/ai-chat/request-contract.d.ts +2 -0
- package/components/{ai-chat-CEX2VQeq.js → ai-chat-BEjlRutF.js} +262 -99
- package/components/ai-chat-BH0PuNwY.cjs +113 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +3 -3
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +3 -3
- package/components/{data-fields-select-dbn1KG3y.js → data-fields-select-CHOKEMb2.js} +1 -1
- package/components/{data-fields-select-Byfdph5v.cjs → data-fields-select-_WjjNpcl.cjs} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +2 -2
- package/components/{dataset-selector-list-BDSXGUDh.js → dataset-selector-list-C5FvwP-r.js} +1 -1
- package/components/{dataset-selector-list-CH3lwAjJ.cjs → dataset-selector-list-DYsi3LBF.cjs} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +3 -3
- package/components/{dataset-selector-row-DPyGMP__.js → dataset-selector-row-BKIFTyJl.js} +1 -1
- package/components/{dataset-selector-row-DdTnaQ6w.cjs → dataset-selector-row-Qwz9WmR4.cjs} +1 -1
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +2 -2
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +3 -3
- package/components/{display-settings-binning-DP9oFC6h.js → display-settings-binning-B58LCqmn.js} +1 -1
- package/components/{display-settings-binning-C9VF0K9q.cjs → display-settings-binning-Bte25mmH.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +3 -3
- package/components/{display-settings-datetime-C3LDVEcH.cjs → display-settings-datetime-DAL8zjtk.cjs} +1 -1
- package/components/{display-settings-datetime-DxBUXAuH.js → display-settings-datetime-DxSNsem7.js} +1 -1
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +3 -3
- package/components/{display-settings-grand-totals-C3QlInwU.cjs → display-settings-grand-totals-NWow1vhX.cjs} +1 -1
- package/components/{display-settings-grand-totals-BiGxXuw2.js → display-settings-grand-totals-Poa2qL3U.js} +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +3 -3
- package/components/{display-settings-numeric-BvLDL-qP.js → display-settings-numeric-CTaS1NhY.js} +1 -1
- package/components/{display-settings-numeric-CyoTJKZv.cjs → display-settings-numeric-eG0gr9Jn.cjs} +1 -1
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +3 -3
- package/components/{display-settings-period-over-period-CvvgRCVH.js → display-settings-period-over-period-D9r-6vbW.js} +1 -1
- package/components/{display-settings-period-over-period-Cdmaf_Rw.cjs → display-settings-period-over-period-DjB0K-Zj.cjs} +1 -1
- package/components/draggable-data-field/index.cjs +1 -1
- package/components/draggable-data-field/index.js +3 -3
- package/components/{draggable-data-field-C_zHA_mn.js → draggable-data-field-BIWzuhyP.js} +1 -1
- package/components/{draggable-data-field-CbF7N-o7.cjs → draggable-data-field-Cez4-c6O.cjs} +1 -1
- package/components/draggable-data-field-level/index.cjs +1 -1
- package/components/draggable-data-field-level/index.js +2 -2
- package/components/draggable-data-fields-panel/index.cjs +1 -1
- package/components/draggable-data-fields-panel/index.js +4 -4
- package/components/{draggable-data-fields-panel-DOdI9NaC.cjs → draggable-data-fields-panel-B0DzaGsv.cjs} +1 -1
- package/components/{draggable-data-fields-panel-D7oa6gGZ.js → draggable-data-fields-panel-C3IwyVQh.js} +1 -1
- package/components/droppable-slot/index.cjs +1 -1
- package/components/droppable-slot/index.js +3 -3
- package/components/{droppable-slot-oB61SQKO.js → droppable-slot-BEKnuzJd.js} +1 -1
- package/components/{droppable-slot-DtFdADiO.cjs → droppable-slot-CHtF9RZo.cjs} +1 -1
- package/components/edit-filters/index.cjs +1 -1
- package/components/edit-filters/index.js +10 -10
- package/components/{edit-filters-B29YfSBe.js → edit-filters-BHiGSnrn.js} +1 -1
- package/components/{edit-filters-geWHEBCw.cjs → edit-filters-CoVNGAfA.cjs} +1 -1
- package/components/edit-item/index.cjs +1 -1
- package/components/edit-item/index.js +2 -2
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +2 -2
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +2 -2
- package/components/edit-option-color-palette-picker/index.cjs +1 -1
- package/components/edit-option-color-palette-picker/index.js +2 -2
- package/components/edit-option-color-picker/index.cjs +1 -1
- package/components/edit-option-color-picker/index.js +2 -2
- package/components/edit-option-color-range/index.cjs +1 -1
- package/components/edit-option-color-range/index.js +2 -2
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +2 -2
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +2 -2
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +2 -2
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +2 -2
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +2 -2
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +2 -2
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +2 -2
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +2 -2
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +2 -2
- package/components/{es-cTUhzLmn.js → es-CjgYaJJY.js} +1 -0
- package/components/es-D8zLt69A.cjs +20 -0
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +3 -3
- package/components/{filter-expression-picker-D83ya_dt.js → filter-expression-picker-Bbu8Bd25.js} +1 -1
- package/components/{filter-expression-picker-wOcgU2No.cjs → filter-expression-picker-Dc3K44W0.cjs} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +9 -9
- package/components/{filter-item-ByKzQ-fl.cjs → filter-item-C7i8LLr-.cjs} +1 -1
- package/components/{filter-item-BdnrbMUW.js → filter-item-DmzZL5Wr.js} +2 -2
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +6 -6
- package/components/{filter-value-picker-Co9Vka2J.cjs → filter-value-picker-CwQLOgTl.cjs} +1 -1
- package/components/{filter-value-picker-B2BjJuIa.js → filter-value-picker-Vq-PfjoU.js} +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +3 -3
- package/components/{filter-value-picker-datetime-BzMfKPkZ.cjs → filter-value-picker-datetime-By3czRqA.cjs} +1 -1
- package/components/{filter-value-picker-datetime-BOheBbvB.js → filter-value-picker-datetime-Cf60JAgg.js} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +3 -3
- package/components/{filter-value-picker-hierarchy-Cwq8GLp4.js → filter-value-picker-hierarchy-CL1YmeY9.js} +1 -1
- package/components/{filter-value-picker-hierarchy-Dgdj-xqx.cjs → filter-value-picker-hierarchy-CpvItjbb.cjs} +1 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +3 -3
- package/components/{filter-value-picker-numeric-CHFRRe1f.js → filter-value-picker-numeric-CDUGCKAy.js} +1 -1
- package/components/{filter-value-picker-numeric-CZrRBHuR.cjs → filter-value-picker-numeric-Dq143AGo.cjs} +1 -1
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +3 -3
- package/components/{grid-BxeX-SG-.cjs → grid-By5MAIqI.cjs} +9 -8
- package/components/{grid-CfCH13sk.js → grid-DN9I7DDY.js} +9 -8
- package/components/index.cjs +1 -1
- package/components/index.js +27 -27
- package/components/item-data-drop-panel/index.cjs +1 -1
- package/components/item-data-drop-panel/index.js +4 -4
- package/components/{item-data-drop-panel-BNf_N7GH.js → item-data-drop-panel-hXvAIkBq.js} +1 -1
- package/components/{item-data-drop-panel-Dcj5Gz29.cjs → item-data-drop-panel-jxlsaggu.cjs} +1 -1
- package/components/item-data-picker-panel/index.cjs +1 -1
- package/components/item-data-picker-panel/index.js +5 -5
- package/components/{item-data-picker-panel-OK_nMbm4.js → item-data-picker-panel-C7wyaWko.js} +1 -1
- package/components/{item-data-picker-panel-GD6CRais.cjs → item-data-picker-panel-sWJGFZ7e.cjs} +1 -1
- package/components/{localized-mixin-BmZhC9XV.cjs → localized-mixin-BhUvOsd7.cjs} +1 -1
- package/components/{localized-mixin-CgQFYGOU.js → localized-mixin-HngLqDZn.js} +1 -1
- package/components/{set-locale-CRNDDu2d.js → set-locale-C3o6ooUV.js} +1 -1
- package/components/{set-locale-DjOkyNGu.cjs → set-locale-CdlBx8s9.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +4 -4
- package/components/{slot-contents-picker-BjqOUNKU.cjs → slot-contents-picker-CBxXz7nw.cjs} +11 -1
- package/components/{slot-contents-picker-BNWBIypw.js → slot-contents-picker-DrDo62G7.js} +11 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +2 -2
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +2 -2
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +3 -3
- package/components/{viz-item-menu-_DLQJFWj.js → viz-item-menu-BX_S-XUm.js} +1 -1
- package/components/{viz-item-menu-BNgd025g.cjs → viz-item-menu-CGhptlJg.cjs} +1 -1
- package/custom-elements.json +192 -10
- package/package.json +1 -1
- package/types/ai-chat.types.d.ts +3 -0
- package/components/ai-chat-PZrWiUxE.cjs +0 -90
- package/components/es-CNpZK6tJ.cjs +0 -20
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
|
+
export type { ProgressTreeNode };
|
|
1
3
|
export interface ChatMessage {
|
|
2
4
|
id?: string;
|
|
3
5
|
type: 'user' | 'ai';
|
|
4
6
|
message: string;
|
|
7
|
+
progress?: ProgressTreeNode;
|
|
5
8
|
isError?: boolean;
|
|
6
9
|
}
|
|
7
10
|
export interface LuzmoChart {
|
package/angular/tsconfig.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
|
+
|
|
3
|
+
export type { ProgressTreeNode };
|
|
4
|
+
|
|
1
5
|
export interface ChatMessage {
|
|
2
6
|
id?: string;
|
|
3
7
|
type: 'user' | 'ai';
|
|
4
8
|
message: string;
|
|
9
|
+
progress?: ProgressTreeNode;
|
|
5
10
|
isError?: boolean;
|
|
6
11
|
}
|
|
7
12
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
|
+
export declare function createInitialProgress(): ProgressTreeNode;
|
|
3
|
+
export declare function hasProgressChunk(value: Record<string, unknown>): boolean;
|
|
4
|
+
export interface StreamingRequestOptions {
|
|
5
|
+
url: string;
|
|
6
|
+
body: Record<string, unknown>;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}
|
|
9
|
+
export interface StreamingResponse {
|
|
10
|
+
body: ReadableStream<Uint8Array>;
|
|
11
|
+
conversationId: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function fetchStreamingResponse(options: StreamingRequestOptions): Promise<StreamingResponse>;
|
|
14
|
+
export declare function readNdjsonStream(body: ReadableStream<Uint8Array>, onChunk: (chunk: Record<string, unknown>) => void): Promise<void>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '@luzmo/lucero/chat-message';
|
|
2
|
+
import '@luzmo/lucero/progress-steps';
|
|
3
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
4
|
import { LuzmoElement } from '@utils/base';
|
|
3
5
|
import { TemplateResult } from 'lit';
|
|
4
6
|
import type { ChatMessage, Dataset, LuzmoChart } from '../../types';
|
|
@@ -91,25 +93,59 @@ export declare class LuzmoAiChat extends LuzmoElement {
|
|
|
91
93
|
*/
|
|
92
94
|
apiVersion: string;
|
|
93
95
|
/**
|
|
94
|
-
*
|
|
96
|
+
* When true, uses NDJSON streaming for AI responses.
|
|
97
|
+
* When false, uses a single JSON response.
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
100
|
+
stream: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Loading message shown while generating and before progress steps are available.
|
|
103
|
+
* Only effective in external request mode; in internal mode, progress steps
|
|
104
|
+
* are initialized immediately.
|
|
95
105
|
* @default null
|
|
96
106
|
*/
|
|
97
107
|
loadingMessage: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* When set, the component auto-submits this prompt via the streaming API
|
|
110
|
+
* without adding a duplicate user message (assumes it is already in `messages`).
|
|
111
|
+
* Useful when the prompt originates from an external source (e.g. a dropdown).
|
|
112
|
+
* @default null
|
|
113
|
+
*/
|
|
114
|
+
initialPrompt: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* Progress tree for external request mode. Ignored in internal mode.
|
|
117
|
+
* @default null
|
|
118
|
+
*/
|
|
119
|
+
progress: ProgressTreeNode | null;
|
|
120
|
+
/**
|
|
121
|
+
* Whether progress steps should be shown collapsed.
|
|
122
|
+
* Only used in external request mode. Ignored in internal mode.
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
progressCollapsed: boolean;
|
|
126
|
+
private _progress;
|
|
127
|
+
private _progressCollapsed;
|
|
98
128
|
private _isGeneratingInternal;
|
|
99
129
|
private _textareaValue;
|
|
130
|
+
private _abortController;
|
|
131
|
+
private _inflightAiMessage;
|
|
132
|
+
private _lastProcessedInitialPrompt;
|
|
133
|
+
private _receivedProgress;
|
|
100
134
|
private _generateMessageId;
|
|
101
135
|
private _buildRequestBody;
|
|
102
|
-
private
|
|
136
|
+
private _finalizeInflightMessage;
|
|
137
|
+
private _sendStreamingMessage;
|
|
138
|
+
private _processStreamChunk;
|
|
103
139
|
private _addUserMessage;
|
|
140
|
+
private _updateMessage;
|
|
104
141
|
private _prepareForAIResponse;
|
|
105
|
-
private _handleChartResponse;
|
|
106
|
-
private _handleErrorResponse;
|
|
107
|
-
private _processAIResponse;
|
|
108
142
|
private _handleAPIError;
|
|
109
143
|
private _handleDatasetSelected;
|
|
110
144
|
private _handleDatasetRemoved;
|
|
111
145
|
private _emitDatasetsChanged;
|
|
112
146
|
private _handlePromptSubmitted;
|
|
147
|
+
private _processInitialPrompt;
|
|
148
|
+
disconnectedCallback(): void;
|
|
113
149
|
private _scrollToBottom;
|
|
114
150
|
protected updated(changedProperties: Map<string, unknown>): void;
|
|
115
151
|
/**
|
|
@@ -118,7 +154,9 @@ export declare class LuzmoAiChat extends LuzmoElement {
|
|
|
118
154
|
* @returns Sanitized HTML string safe for rendering
|
|
119
155
|
*/
|
|
120
156
|
private _sanitizeMessage;
|
|
157
|
+
private _renderProgress;
|
|
121
158
|
private _renderMessages;
|
|
159
|
+
private _renderStreamingResponse;
|
|
122
160
|
private _renderLoadingMessage;
|
|
123
161
|
private _renderPlaceholderMessage;
|
|
124
162
|
protected render(): TemplateResult;
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-CdlBx8s9.cjs`),require(`../localized-mixin-BhUvOsd7.cjs`);const e=require(`../ai-chat-BH0PuNwY.cjs`);require(`../dataset-icon-C0cID-ra.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../dataset-selector-list-DYsi3LBF.cjs`),require(`../dataset-selector-row-Qwz9WmR4.cjs`),require(`../ai-interaction-textarea-CcgFeoIg.cjs`),exports.LuzmoAiChat=e.t,exports.buildAiMessageRequest=e.n,exports.createInitialProgress=e.r,exports.fetchStreamingResponse=e.i,exports.hasProgressChunk=e.a,exports.readNdjsonStream=e.o;
|
|
@@ -5,4 +5,7 @@ declare global {
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export { LuzmoAiChat } from './ai-chat';
|
|
8
|
+
export type { ProgressTreeNode } from '../../types/ai-chat.types';
|
|
8
9
|
export * from './request-contract';
|
|
10
|
+
export { createInitialProgress, fetchStreamingResponse, hasProgressChunk, readNdjsonStream } from './ai-chat-streaming';
|
|
11
|
+
export type { StreamingRequestOptions, StreamingResponse } from './ai-chat-streaming';
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
})();
|
|
26
26
|
import "../base-rg2x95aL.js";
|
|
27
27
|
import "../focus-visible-D1pJhWEh.js";
|
|
28
|
-
import "../set-locale-
|
|
29
|
-
import "../localized-mixin-
|
|
30
|
-
import { n as buildAiMessageRequest, t as LuzmoAiChat } from "../ai-chat-
|
|
28
|
+
import "../set-locale-C3o6ooUV.js";
|
|
29
|
+
import "../localized-mixin-HngLqDZn.js";
|
|
30
|
+
import { a as hasProgressChunk, i as fetchStreamingResponse, n as buildAiMessageRequest, o as readNdjsonStream, r as createInitialProgress, t as LuzmoAiChat } from "../ai-chat-BEjlRutF.js";
|
|
31
31
|
import "../dataset-icon-DhF21dXC.js";
|
|
32
32
|
import "../data-broker-cLR-t5LM.js";
|
|
33
|
-
import "../dataset-selector-list-
|
|
34
|
-
import "../dataset-selector-row-
|
|
33
|
+
import "../dataset-selector-list-C5FvwP-r.js";
|
|
34
|
+
import "../dataset-selector-row-BKIFTyJl.js";
|
|
35
35
|
import "../ai-interaction-textarea-B5UE7CIq.js";
|
|
36
|
-
export { LuzmoAiChat, buildAiMessageRequest };
|
|
36
|
+
export { LuzmoAiChat, buildAiMessageRequest, createInitialProgress, fetchStreamingResponse, hasProgressChunk, readNdjsonStream };
|
|
@@ -16,6 +16,7 @@ export interface AiMessageRequestBody {
|
|
|
16
16
|
dataset_id?: string;
|
|
17
17
|
chart?: Record<string, unknown>;
|
|
18
18
|
model_preference: 'performance' | 'quality';
|
|
19
|
+
stream?: boolean;
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
export interface BuildAiMessageRequestOptions {
|
|
@@ -27,6 +28,7 @@ export interface BuildAiMessageRequestOptions {
|
|
|
27
28
|
chart: LuzmoChart | null;
|
|
28
29
|
modelPreference: 'performance' | 'quality';
|
|
29
30
|
apiVersion?: string;
|
|
31
|
+
stream?: boolean;
|
|
30
32
|
}
|
|
31
33
|
export interface LuzmoPromptSubmittedEventDetail {
|
|
32
34
|
prompt: string;
|