@luzmo/ngx-analytics-components-kit 1.0.8 → 1.0.9-beta.10

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 (66) hide show
  1. package/esm/components/add-to-dashboard.d.ts +48 -0
  2. package/esm/components/add-to-dashboard.js +129 -0
  3. package/esm/components/ai-chat-empty-state.d.ts +41 -0
  4. package/esm/components/ai-chat-empty-state.js +107 -0
  5. package/esm/components/ai-chat.d.ts +149 -0
  6. package/esm/components/ai-chat.js +463 -0
  7. package/esm/components/ai-interaction-textarea.d.ts +108 -0
  8. package/esm/components/ai-interaction-textarea.js +313 -0
  9. package/esm/components/data-field-level.d.ts +50 -0
  10. package/esm/components/data-field-level.js +129 -0
  11. package/esm/components/data-field-panel.d.ts +4 -4
  12. package/esm/components/data-field.d.ts +4 -4
  13. package/esm/components/data-fields-select.d.ts +87 -0
  14. package/esm/components/data-fields-select.js +243 -0
  15. package/esm/components/dataset-icon.d.ts +34 -0
  16. package/esm/components/dataset-icon.js +86 -0
  17. package/esm/components/dataset-selector-list.d.ts +56 -0
  18. package/esm/components/dataset-selector-list.js +155 -0
  19. package/esm/components/dataset-selector-row.d.ts +72 -0
  20. package/esm/components/dataset-selector-row.js +205 -0
  21. package/esm/components/display-settings-binning.d.ts +37 -0
  22. package/esm/components/display-settings-binning.js +91 -0
  23. package/esm/components/display-settings-datetime.d.ts +40 -0
  24. package/esm/components/display-settings-datetime.js +99 -0
  25. package/esm/components/display-settings-grand-totals.d.ts +37 -0
  26. package/esm/components/display-settings-grand-totals.js +91 -0
  27. package/esm/components/display-settings-numeric.d.ts +45 -0
  28. package/esm/components/display-settings-numeric.js +115 -0
  29. package/esm/components/display-settings-period-over-period.d.ts +50 -0
  30. package/esm/components/display-settings-period-over-period.js +123 -0
  31. package/esm/components/display-settings.d.ts +83 -0
  32. package/esm/components/display-settings.js +231 -0
  33. package/esm/components/filter-expression-picker.d.ts +64 -0
  34. package/esm/components/filter-expression-picker.js +179 -0
  35. package/esm/components/filter-item.d.ts +74 -0
  36. package/esm/components/filter-item.js +222 -0
  37. package/esm/components/filter-parameter-picker.d.ts +56 -0
  38. package/esm/components/filter-parameter-picker.js +151 -0
  39. package/esm/components/filter-value-picker-datetime.d.ts +47 -0
  40. package/esm/components/filter-value-picker-datetime.js +131 -0
  41. package/esm/components/filter-value-picker-hierarchy.d.ts +53 -0
  42. package/esm/components/filter-value-picker-hierarchy.js +155 -0
  43. package/esm/components/filter-value-picker-numeric.d.ts +53 -0
  44. package/esm/components/filter-value-picker-numeric.js +155 -0
  45. package/esm/components/filter-value-picker.d.ts +57 -0
  46. package/esm/components/filter-value-picker.js +171 -0
  47. package/esm/components/filters.d.ts +14 -4
  48. package/esm/components/filters.js +39 -3
  49. package/esm/components/formula-editor.d.ts +1 -0
  50. package/esm/components/formula-editor.js +1 -1
  51. package/esm/components/formula-field.d.ts +70 -0
  52. package/esm/components/formula-field.js +209 -0
  53. package/esm/components/interactive-viz-item.d.ts +76 -0
  54. package/esm/components/interactive-viz-item.js +224 -0
  55. package/esm/components/item-grid-item-actions-menu.d.ts +10 -8
  56. package/esm/components/item-grid-item-actions-menu.js +12 -6
  57. package/esm/components/item-grid.d.ts +5 -3
  58. package/esm/components/item-grid.js +8 -2
  59. package/esm/components/item-slot-drop.d.ts +5 -5
  60. package/esm/components/slot-menu-list.d.ts +46 -0
  61. package/esm/components/slot-menu-list.js +123 -0
  62. package/esm/components/slot-menu.d.ts +104 -0
  63. package/esm/components/slot-menu.js +300 -0
  64. package/esm/index.d.ts +54 -2
  65. package/esm/index.js +106 -2
  66. package/package.json +2 -2
@@ -0,0 +1,463 @@
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/ai-chat';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-ai-chat>
7
+ */
8
+ export class LuzmoAiChat {
9
+ elementRef = inject(ElementRef);
10
+ renderer = inject(Renderer2);
11
+ destroyRef = inject(DestroyRef);
12
+ host = this.elementRef.nativeElement;
13
+ listenerCleanup = [];
14
+ /** The underlying custom element instance. Use to call imperative methods. */
15
+ get nativeElement() {
16
+ return this.host;
17
+ }
18
+ /** Live transcript is AiChatSessionState.messages. This prop optionally seeds the session on first connect. */
19
+ messages;
20
+ /** Live selection is in the session. This prop optionally seeds on first connect. */
21
+ selectedDatasets;
22
+ /** Placeholder text for the textarea */
23
+ placeholder;
24
+ /** When true, disables the entire chat interface */
25
+ disabled;
26
+ /** When true, shows a stop control on the prompt input while a response is generating */
27
+ stoppable;
28
+ /** When true, shows context menu (3 dots) on assistant messages */
29
+ showAssistantContextMenu;
30
+ /** Auth key for DataBroker authentication */
31
+ authKey;
32
+ /** Auth token for DataBroker authentication */
33
+ authToken;
34
+ /** API URL for DataBroker */
35
+ apiUrl;
36
+ /** The URL of the app server for thumbnails and assets */
37
+ appServer;
38
+ /** When true, shows public datasets alongside the user's other datasets. */
39
+ includePublicDatasets;
40
+ /** Alias for includePublicDatasets. */
41
+ flagOpendata;
42
+ /** When true, hides the "+ Add dataset" button in the input */
43
+ hideDatasetButton;
44
+ /** When true, hides dataset icons in the input dataset selector and @ mention dataset headers */
45
+ hideDatasetIcons;
46
+ /** When true, hides the add-dataset button and disables removing selected datasets while keeping pills visible */
47
+ disableDatasetModification;
48
+ /** When true, hides the dataset row and add-dataset button entirely */
49
+ hideSelectedDatasets;
50
+ /** When true, hides the Agents section in the input and runs prompts without a picked agent */
51
+ hideAgents;
52
+ /** When true, disables @ trigger mentions for dataset fields in the input */
53
+ disableColumnMentions;
54
+ /** When true, a picked agent or at least one selected dataset is required before the prompt can be submitted */
55
+ requireDataset;
56
+ /** Enables image attachments (PNG/JPEG/WebP/GIF). */
57
+ allowImages;
58
+ /** Enables mic dictation; audio is transcribed via `POST /aidictation` and inserted as editable text. */
59
+ allowVoiceInput;
60
+ /** Attachment MIME types/extensions. Defaults to PNG/JPEG/WebP/GIF when `allow-images` is set. */
61
+ acceptedFileTypes;
62
+ /** Optional upload override; otherwise uploads via `POST /upload` on attach. */
63
+ uploadAttachments;
64
+ /** Which aiprompt agent to use (`item`, `dashboard`, `analyst` or `custom-item`). Determines request payload and stream handling. With `agent-id` set it no longer shapes the request payload, only stream handling. Custom-item hosts must set `hide-agents` and leave `agent-id` unset to preserve draft context and internal repair prompts. */
65
+ agent;
66
+ /** Typed agent selection and context. Takes precedence over legacy agent, task and context properties. Omit context to preserve the same agent's session context; use null to clear it. Undefined leaves a host session's typed configuration intact and uses legacy properties for an internal session. */
67
+ agentConfig;
68
+ /** Saved Agent id (UUID) to run the prompt as. An agent picked in the prompt box takes precedence for that prompt. */
69
+ agentId;
70
+ /** Task for the item agent (`generate`, `suggest`, `describe`). Ignored when `agent-id` is set. */
71
+ task;
72
+ /** AI model preference for item agent chart generation */
73
+ modelPreference;
74
+ /** Host-owned AiChatSession. The component subscribes and renders; does not abort on disconnect. */
75
+ chatSession;
76
+ /** Conversation ID (synced into the session; updated when the API returns a new id). */
77
+ conversationId;
78
+ /** Chart context for `agent="item"`. */
79
+ chart;
80
+ /** Dashboard context for `agent="dashboard"`. */
81
+ dashboard;
82
+ /** Draft context for `agent="custom-item"`, sent as its `custom-item` input. The host owns the shape: the chart document under `document`, plus fields such as `chartId`. With a host `chatSession`, the default null preserves its draft. Once this element supplies a draft, setting this property to null clears the session's custom item context. */
83
+ customItem;
84
+ /** Current screen mode when editing a dashboard. */
85
+ currentScreenMode;
86
+ /** Locale ID sent to the aiprompt API. */
87
+ localeId;
88
+ /** Timezone ID for dashboard agent requests. */
89
+ timezoneId;
90
+ /** API version */
91
+ apiVersion;
92
+ /** When true, uses NDJSON streaming for AI responses. When false, uses a single JSON response. */
93
+ stream;
94
+ /** Loading message shown while generating and before progress steps are available. */
95
+ loadingMessage;
96
+ /** Message shown in place of the assistant reply when the user stops an in-flight response. Falls back to a localized default when not set. */
97
+ cancelledMessage;
98
+ /** When set, auto-submits via the session without adding a duplicate user message (assumes the prompt is already in the transcript). */
99
+ initialPrompt;
100
+ /** Title for the empty state when there are no messages. */
101
+ emptyStateTitle;
102
+ /** Optional label above empty-state suggestion chips. Only shown when `emptyStateSuggestions` is non-empty. */
103
+ emptyStateSubtitle;
104
+ /** Optional suggestion chips for the empty state. When empty, only the title is shown. Each entry may include `selectedDatasets` to pre-select datasets when the chip is activated. */
105
+ emptyStateSuggestions;
106
+ /** Size of the chat: `s`, `m` (default), `l` or `xl`. Scales messages, progress steps, questions, the empty state and the prompt input together. Custom actions beyond built-in `ChatMessage.actions` buttons can be projected via the `assistant-message-actions` light-DOM slot on the latest assistant message. */
107
+ size;
108
+ /** Fired when a user sends a message */
109
+ luzmoMessageSent = output({ alias: 'luzmoMessageSent' });
110
+ /** Fired when the selected datasets change */
111
+ luzmoDatasetsChanged = output({ alias: 'luzmoDatasetsChanged' });
112
+ /** Fired for every incremental, kit-assembled event during a streamed response (decision, text, progress, dashboard-title/layout/item, chart, custom-item, elicitation, interrupt, plus forward-by-default unrecognized chunks). Use `isRecognizedStep` to narrow. */
113
+ luzmoStep = output({ alias: 'luzmoStep' });
114
+ /** Fired exactly once per response with the authoritative final result (dashboard/chart/name/customItem) or an `error`. */
115
+ luzmoComplete = output({ alias: 'luzmoComplete' });
116
+ /** Fired when an in-flight prompt is stopped */
117
+ luzmoStop = output({ alias: 'luzmoStop' });
118
+ /** Fired when the conversation ID is updated from the API */
119
+ luzmoConversationIdChanged = output({ alias: 'luzmoConversationIdChanged' });
120
+ /** Fired when a built-in assistant message action is activated (after confirmation when `confirm` is set) */
121
+ luzmoAssistantMessageAction = output({ alias: 'luzmoAssistantMessageAction' });
122
+ constructor() {
123
+ this.bindEvents();
124
+ this.destroyRef.onDestroy(() => {
125
+ for (const cleanup of this.listenerCleanup) {
126
+ cleanup();
127
+ }
128
+ });
129
+ }
130
+ ngOnChanges(changes) {
131
+ for (const key of Object.keys(changes)) {
132
+ switch (key) {
133
+ case 'messages':
134
+ this.setHostProperty('messages', changes['messages'].currentValue);
135
+ break;
136
+ case 'selectedDatasets':
137
+ this.setHostProperty('selectedDatasets', changes['selectedDatasets'].currentValue);
138
+ break;
139
+ case 'placeholder':
140
+ this.setHostProperty('placeholder', changes['placeholder'].currentValue);
141
+ break;
142
+ case 'disabled':
143
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
144
+ break;
145
+ case 'stoppable':
146
+ this.setHostProperty('stoppable', changes['stoppable'].currentValue);
147
+ break;
148
+ case 'showAssistantContextMenu':
149
+ this.setHostProperty('showAssistantContextMenu', changes['showAssistantContextMenu'].currentValue);
150
+ break;
151
+ case 'authKey':
152
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
153
+ break;
154
+ case 'authToken':
155
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
156
+ break;
157
+ case 'apiUrl':
158
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
159
+ break;
160
+ case 'appServer':
161
+ this.setHostProperty('appServer', changes['appServer'].currentValue);
162
+ break;
163
+ case 'includePublicDatasets':
164
+ this.setHostProperty('includePublicDatasets', changes['includePublicDatasets'].currentValue);
165
+ break;
166
+ case 'flagOpendata':
167
+ this.setHostProperty('flagOpendata', changes['flagOpendata'].currentValue);
168
+ break;
169
+ case 'hideDatasetButton':
170
+ this.setHostProperty('hideDatasetButton', changes['hideDatasetButton'].currentValue);
171
+ break;
172
+ case 'hideDatasetIcons':
173
+ this.setHostProperty('hideDatasetIcons', changes['hideDatasetIcons'].currentValue);
174
+ break;
175
+ case 'disableDatasetModification':
176
+ this.setHostProperty('disableDatasetModification', changes['disableDatasetModification'].currentValue);
177
+ break;
178
+ case 'hideSelectedDatasets':
179
+ this.setHostProperty('hideSelectedDatasets', changes['hideSelectedDatasets'].currentValue);
180
+ break;
181
+ case 'hideAgents':
182
+ this.setHostProperty('hideAgents', changes['hideAgents'].currentValue);
183
+ break;
184
+ case 'disableColumnMentions':
185
+ this.setHostProperty('disableColumnMentions', changes['disableColumnMentions'].currentValue);
186
+ break;
187
+ case 'requireDataset':
188
+ this.setHostProperty('requireDataset', changes['requireDataset'].currentValue);
189
+ break;
190
+ case 'allowImages':
191
+ this.setHostProperty('allowImages', changes['allowImages'].currentValue);
192
+ break;
193
+ case 'allowVoiceInput':
194
+ this.setHostProperty('allowVoiceInput', changes['allowVoiceInput'].currentValue);
195
+ break;
196
+ case 'acceptedFileTypes':
197
+ this.setHostProperty('acceptedFileTypes', changes['acceptedFileTypes'].currentValue);
198
+ break;
199
+ case 'uploadAttachments':
200
+ this.setHostProperty('uploadAttachments', changes['uploadAttachments'].currentValue);
201
+ break;
202
+ case 'agent':
203
+ this.setHostProperty('agent', changes['agent'].currentValue);
204
+ break;
205
+ case 'agentConfig':
206
+ this.setHostProperty('agentConfig', changes['agentConfig'].currentValue);
207
+ break;
208
+ case 'agentId':
209
+ this.setHostProperty('agentId', changes['agentId'].currentValue);
210
+ break;
211
+ case 'task':
212
+ this.setHostProperty('task', changes['task'].currentValue);
213
+ break;
214
+ case 'modelPreference':
215
+ this.setHostProperty('modelPreference', changes['modelPreference'].currentValue);
216
+ break;
217
+ case 'chatSession':
218
+ this.setHostProperty('chatSession', changes['chatSession'].currentValue);
219
+ break;
220
+ case 'conversationId':
221
+ this.setHostProperty('conversationId', changes['conversationId'].currentValue);
222
+ break;
223
+ case 'chart':
224
+ this.setHostProperty('chart', changes['chart'].currentValue);
225
+ break;
226
+ case 'dashboard':
227
+ this.setHostProperty('dashboard', changes['dashboard'].currentValue);
228
+ break;
229
+ case 'customItem':
230
+ this.setHostProperty('customItem', changes['customItem'].currentValue);
231
+ break;
232
+ case 'currentScreenMode':
233
+ this.setHostProperty('currentScreenMode', changes['currentScreenMode'].currentValue);
234
+ break;
235
+ case 'localeId':
236
+ this.setHostProperty('localeId', changes['localeId'].currentValue);
237
+ break;
238
+ case 'timezoneId':
239
+ this.setHostProperty('timezoneId', changes['timezoneId'].currentValue);
240
+ break;
241
+ case 'apiVersion':
242
+ this.setHostProperty('apiVersion', changes['apiVersion'].currentValue);
243
+ break;
244
+ case 'stream':
245
+ this.setHostProperty('stream', changes['stream'].currentValue);
246
+ break;
247
+ case 'loadingMessage':
248
+ this.setHostProperty('loadingMessage', changes['loadingMessage'].currentValue);
249
+ break;
250
+ case 'cancelledMessage':
251
+ this.setHostProperty('cancelledMessage', changes['cancelledMessage'].currentValue);
252
+ break;
253
+ case 'initialPrompt':
254
+ this.setHostProperty('initialPrompt', changes['initialPrompt'].currentValue);
255
+ break;
256
+ case 'emptyStateTitle':
257
+ this.setHostProperty('emptyStateTitle', changes['emptyStateTitle'].currentValue);
258
+ break;
259
+ case 'emptyStateSubtitle':
260
+ this.setHostProperty('emptyStateSubtitle', changes['emptyStateSubtitle'].currentValue);
261
+ break;
262
+ case 'emptyStateSuggestions':
263
+ this.setHostProperty('emptyStateSuggestions', changes['emptyStateSuggestions'].currentValue);
264
+ break;
265
+ case 'size':
266
+ this.setHostProperty('size', changes['size'].currentValue);
267
+ break;
268
+ default:
269
+ break;
270
+ }
271
+ }
272
+ }
273
+ /**
274
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
275
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
276
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
277
+ * undefined / null by clearing their bindings.
278
+ */
279
+ setHostProperty(key, value) {
280
+ this.renderer.setProperty(this.host, key, value);
281
+ }
282
+ bindEvents() {
283
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-message-sent', (event) => {
284
+ const typed = event;
285
+ this.luzmoMessageSent.emit(typed);
286
+ }));
287
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-datasets-changed', (event) => {
288
+ const typed = event;
289
+ this.luzmoDatasetsChanged.emit(typed);
290
+ }));
291
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-step', (event) => {
292
+ const typed = event;
293
+ this.luzmoStep.emit(typed);
294
+ }));
295
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-complete', (event) => {
296
+ const typed = event;
297
+ this.luzmoComplete.emit(typed);
298
+ }));
299
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-stop', (event) => {
300
+ const typed = event;
301
+ this.luzmoStop.emit(typed);
302
+ }));
303
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-conversation-id-changed', (event) => {
304
+ const typed = event;
305
+ this.luzmoConversationIdChanged.emit(typed);
306
+ }));
307
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-assistant-message-action', (event) => {
308
+ const typed = event;
309
+ this.luzmoAssistantMessageAction.emit(typed);
310
+ }));
311
+ }
312
+ static ɵfac = function LuzmoAiChat_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoAiChat)(); };
313
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoAiChat, selectors: [["luzmo-ai-chat"]], inputs: { messages: "messages", selectedDatasets: "selectedDatasets", placeholder: "placeholder", disabled: [2, "disabled", "disabled", booleanAttribute], stoppable: [2, "stoppable", "stoppable", booleanAttribute], showAssistantContextMenu: [2, "showAssistantContextMenu", "showAssistantContextMenu", booleanAttribute], authKey: "authKey", authToken: "authToken", apiUrl: "apiUrl", appServer: "appServer", includePublicDatasets: [2, "includePublicDatasets", "includePublicDatasets", booleanAttribute], flagOpendata: [2, "flagOpendata", "flagOpendata", booleanAttribute], hideDatasetButton: [2, "hideDatasetButton", "hideDatasetButton", booleanAttribute], hideDatasetIcons: [2, "hideDatasetIcons", "hideDatasetIcons", booleanAttribute], disableDatasetModification: [2, "disableDatasetModification", "disableDatasetModification", booleanAttribute], hideSelectedDatasets: [2, "hideSelectedDatasets", "hideSelectedDatasets", booleanAttribute], hideAgents: [2, "hideAgents", "hideAgents", booleanAttribute], disableColumnMentions: [2, "disableColumnMentions", "disableColumnMentions", booleanAttribute], requireDataset: [2, "requireDataset", "requireDataset", booleanAttribute], allowImages: [2, "allowImages", "allowImages", booleanAttribute], allowVoiceInput: [2, "allowVoiceInput", "allowVoiceInput", booleanAttribute], acceptedFileTypes: "acceptedFileTypes", uploadAttachments: "uploadAttachments", agent: "agent", agentConfig: "agentConfig", agentId: "agentId", task: "task", modelPreference: "modelPreference", chatSession: "chatSession", conversationId: "conversationId", chart: "chart", dashboard: "dashboard", customItem: "customItem", currentScreenMode: "currentScreenMode", localeId: "localeId", timezoneId: "timezoneId", apiVersion: "apiVersion", stream: [2, "stream", "stream", booleanAttribute], loadingMessage: "loadingMessage", cancelledMessage: "cancelledMessage", initialPrompt: "initialPrompt", emptyStateTitle: "emptyStateTitle", emptyStateSubtitle: "emptyStateSubtitle", emptyStateSuggestions: "emptyStateSuggestions", size: "size" }, outputs: { luzmoMessageSent: "luzmoMessageSent", luzmoDatasetsChanged: "luzmoDatasetsChanged", luzmoStep: "luzmoStep", luzmoComplete: "luzmoComplete", luzmoStop: "luzmoStop", luzmoConversationIdChanged: "luzmoConversationIdChanged", luzmoAssistantMessageAction: "luzmoAssistantMessageAction" }, exportAs: ["luzmoAiChat"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoAiChat_Template(rf, ctx) { if (rf & 1) {
314
+ i0.ɵɵprojectionDef();
315
+ i0.ɵɵprojection(0);
316
+ } }, encapsulation: 2 });
317
+ }
318
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoAiChat, [{
319
+ type: Component,
320
+ args: [{
321
+ selector: 'luzmo-ai-chat',
322
+ exportAs: 'luzmoAiChat',
323
+ standalone: true,
324
+ changeDetection: ChangeDetectionStrategy.OnPush,
325
+ template: '<ng-content />'
326
+ }]
327
+ }], () => [], { messages: [{
328
+ type: Input,
329
+ args: [{ alias: 'messages' }]
330
+ }], selectedDatasets: [{
331
+ type: Input,
332
+ args: [{ alias: 'selectedDatasets' }]
333
+ }], placeholder: [{
334
+ type: Input,
335
+ args: [{ alias: 'placeholder' }]
336
+ }], disabled: [{
337
+ type: Input,
338
+ args: [{ alias: 'disabled', transform: booleanAttribute }]
339
+ }], stoppable: [{
340
+ type: Input,
341
+ args: [{ alias: 'stoppable', transform: booleanAttribute }]
342
+ }], showAssistantContextMenu: [{
343
+ type: Input,
344
+ args: [{ alias: 'showAssistantContextMenu', transform: booleanAttribute }]
345
+ }], authKey: [{
346
+ type: Input,
347
+ args: [{ alias: 'authKey' }]
348
+ }], authToken: [{
349
+ type: Input,
350
+ args: [{ alias: 'authToken' }]
351
+ }], apiUrl: [{
352
+ type: Input,
353
+ args: [{ alias: 'apiUrl' }]
354
+ }], appServer: [{
355
+ type: Input,
356
+ args: [{ alias: 'appServer' }]
357
+ }], includePublicDatasets: [{
358
+ type: Input,
359
+ args: [{ alias: 'includePublicDatasets', transform: booleanAttribute }]
360
+ }], flagOpendata: [{
361
+ type: Input,
362
+ args: [{ alias: 'flagOpendata', transform: booleanAttribute }]
363
+ }], hideDatasetButton: [{
364
+ type: Input,
365
+ args: [{ alias: 'hideDatasetButton', transform: booleanAttribute }]
366
+ }], hideDatasetIcons: [{
367
+ type: Input,
368
+ args: [{ alias: 'hideDatasetIcons', transform: booleanAttribute }]
369
+ }], disableDatasetModification: [{
370
+ type: Input,
371
+ args: [{ alias: 'disableDatasetModification', transform: booleanAttribute }]
372
+ }], hideSelectedDatasets: [{
373
+ type: Input,
374
+ args: [{ alias: 'hideSelectedDatasets', transform: booleanAttribute }]
375
+ }], hideAgents: [{
376
+ type: Input,
377
+ args: [{ alias: 'hideAgents', transform: booleanAttribute }]
378
+ }], disableColumnMentions: [{
379
+ type: Input,
380
+ args: [{ alias: 'disableColumnMentions', transform: booleanAttribute }]
381
+ }], requireDataset: [{
382
+ type: Input,
383
+ args: [{ alias: 'requireDataset', transform: booleanAttribute }]
384
+ }], allowImages: [{
385
+ type: Input,
386
+ args: [{ alias: 'allowImages', transform: booleanAttribute }]
387
+ }], allowVoiceInput: [{
388
+ type: Input,
389
+ args: [{ alias: 'allowVoiceInput', transform: booleanAttribute }]
390
+ }], acceptedFileTypes: [{
391
+ type: Input,
392
+ args: [{ alias: 'acceptedFileTypes' }]
393
+ }], uploadAttachments: [{
394
+ type: Input,
395
+ args: [{ alias: 'uploadAttachments' }]
396
+ }], agent: [{
397
+ type: Input,
398
+ args: [{ alias: 'agent' }]
399
+ }], agentConfig: [{
400
+ type: Input,
401
+ args: [{ alias: 'agentConfig' }]
402
+ }], agentId: [{
403
+ type: Input,
404
+ args: [{ alias: 'agentId' }]
405
+ }], task: [{
406
+ type: Input,
407
+ args: [{ alias: 'task' }]
408
+ }], modelPreference: [{
409
+ type: Input,
410
+ args: [{ alias: 'modelPreference' }]
411
+ }], chatSession: [{
412
+ type: Input,
413
+ args: [{ alias: 'chatSession' }]
414
+ }], conversationId: [{
415
+ type: Input,
416
+ args: [{ alias: 'conversationId' }]
417
+ }], chart: [{
418
+ type: Input,
419
+ args: [{ alias: 'chart' }]
420
+ }], dashboard: [{
421
+ type: Input,
422
+ args: [{ alias: 'dashboard' }]
423
+ }], customItem: [{
424
+ type: Input,
425
+ args: [{ alias: 'customItem' }]
426
+ }], currentScreenMode: [{
427
+ type: Input,
428
+ args: [{ alias: 'currentScreenMode' }]
429
+ }], localeId: [{
430
+ type: Input,
431
+ args: [{ alias: 'localeId' }]
432
+ }], timezoneId: [{
433
+ type: Input,
434
+ args: [{ alias: 'timezoneId' }]
435
+ }], apiVersion: [{
436
+ type: Input,
437
+ args: [{ alias: 'apiVersion' }]
438
+ }], stream: [{
439
+ type: Input,
440
+ args: [{ alias: 'stream', transform: booleanAttribute }]
441
+ }], loadingMessage: [{
442
+ type: Input,
443
+ args: [{ alias: 'loadingMessage' }]
444
+ }], cancelledMessage: [{
445
+ type: Input,
446
+ args: [{ alias: 'cancelledMessage' }]
447
+ }], initialPrompt: [{
448
+ type: Input,
449
+ args: [{ alias: 'initialPrompt' }]
450
+ }], emptyStateTitle: [{
451
+ type: Input,
452
+ args: [{ alias: 'emptyStateTitle' }]
453
+ }], emptyStateSubtitle: [{
454
+ type: Input,
455
+ args: [{ alias: 'emptyStateSubtitle' }]
456
+ }], emptyStateSuggestions: [{
457
+ type: Input,
458
+ args: [{ alias: 'emptyStateSuggestions' }]
459
+ }], size: [{
460
+ type: Input,
461
+ args: [{ alias: 'size' }]
462
+ }], luzmoMessageSent: [{ type: i0.Output, args: ["luzmoMessageSent"] }], luzmoDatasetsChanged: [{ type: i0.Output, args: ["luzmoDatasetsChanged"] }], luzmoStep: [{ type: i0.Output, args: ["luzmoStep"] }], luzmoComplete: [{ type: i0.Output, args: ["luzmoComplete"] }], luzmoStop: [{ type: i0.Output, args: ["luzmoStop"] }], luzmoConversationIdChanged: [{ type: i0.Output, args: ["luzmoConversationIdChanged"] }], luzmoAssistantMessageAction: [{ type: i0.Output, args: ["luzmoAssistantMessageAction"] }] }); })();
463
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoAiChat, { className: "LuzmoAiChat", filePath: "components/ai-chat.ts", lineNumber: 18 }); })();
@@ -0,0 +1,108 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/ai-interaction-textarea';
3
+ import type { LuzmoAiInteractionTextarea as LuzmoAiInteractionTextareaHostElement, Agent, Dataset, PromptBoxFileIcons, PromptSubmittedEventDetail } from '@luzmo/analytics-components-kit/ai-interaction-textarea';
4
+ import * as i0 from "@angular/core";
5
+ export type { Agent, Dataset, PromptBoxAttachment, PromptBoxFileIcons, PromptSubmittedEventDetail } from '@luzmo/analytics-components-kit/ai-interaction-textarea';
6
+ export declare class LuzmoAiInteractionTextarea implements OnChanges {
7
+ private readonly elementRef;
8
+ private readonly renderer;
9
+ private readonly destroyRef;
10
+ private readonly host;
11
+ private readonly listenerCleanup;
12
+ /** The underlying custom element instance. Use to call imperative methods. */
13
+ get nativeElement(): LuzmoAiInteractionTextareaHostElement;
14
+ /** Placeholder text for the textarea */
15
+ placeholder?: string;
16
+ /** Array of selected datasets */
17
+ selectedDatasets?: Dataset[];
18
+ /** Auth key for DataBroker authentication */
19
+ authKey?: string;
20
+ /** Auth token for DataBroker authentication */
21
+ authToken?: string;
22
+ /** API URL for DataBroker */
23
+ apiUrl?: string;
24
+ /** The URL of the app server for thumbnails and assets */
25
+ appServer?: string;
26
+ /** When true, shows public datasets alongside the user's other datasets. */
27
+ includePublicDatasets?: boolean;
28
+ /** Alias for includePublicDatasets. */
29
+ flagOpendata?: boolean;
30
+ /** When true, disables the entire component (opacity 60%, no interactions) */
31
+ disabled?: boolean;
32
+ /** When true, starts in compact single-line mode and auto-expands as needed */
33
+ singleLine?: boolean;
34
+ /** When true, hides the "+ Add dataset" button */
35
+ hideDatasetButton?: boolean;
36
+ /** When true, hides dataset-specific icons in selector tags and @ mention dataset headers */
37
+ hideDatasetIcons?: boolean;
38
+ /** Maximum number of selected dataset tags shown before the overflow control. */
39
+ maxVisibleSelectedDatasets?: number;
40
+ /** The saved Agent the prompt is scoped to, or null */
41
+ selectedAgent?: Agent | null;
42
+ /** When true, hides the Agents section in the add dropdown and ignores `selectedAgent` for `require-dataset` and `prompt-submitted` */
43
+ hideAgents?: boolean;
44
+ /** When true, disables the "+ Add dataset" button and disables dataset pill removal */
45
+ disableDatasetModification?: boolean;
46
+ /** When true, hides the dataset row entirely */
47
+ hideSelectedDatasets?: boolean;
48
+ /** When true, disables @ trigger mentions completely */
49
+ disableColumnMentions?: boolean;
50
+ /** When true, shows a spinning loader icon instead of the submit arrow */
51
+ isGenerating?: boolean;
52
+ /** When true, shows a stop control while `is-generating` is true */
53
+ stoppable?: boolean;
54
+ /** The current value of the textarea (can be controlled from parent to clear or set text) */
55
+ value?: string;
56
+ /** When true, retains the input value after submitting a prompt (default: false) When false (default), clears the textarea value after submission */
57
+ retainOnSubmit?: boolean;
58
+ /** When true, a selected agent or at least one selected dataset is required before the prompt can be submitted */
59
+ requireDataset?: boolean;
60
+ /** When true, enables image attachments via paste or the file picker. */
61
+ allowImages?: boolean;
62
+ /** When true, shows Lucero's mic control; the `POST /aidictation` transcript is inserted, never auto-sent. */
63
+ allowVoiceInput?: boolean;
64
+ /** Accepted attachment MIME types or extensions. */
65
+ acceptedFileTypes?: string[];
66
+ /** API version for built-in `POST /upload` and `POST /aidictation` (default `0.1.0`). */
67
+ apiVersion?: string;
68
+ /** Optional override for eager image upload on attach; return one signed URL per file */
69
+ uploadAttachments?: unknown;
70
+ /** Custom icons for non-image attachment tiles, keyed by extension. */
71
+ fileIcons?: PromptBoxFileIcons;
72
+ /** Size of the prompt box, its dataset row and its attachment button: `s`, `m` (default), `l` or `xl` */
73
+ size?: unknown;
74
+ /** Fired when a prompt is submitted with selected datasets */
75
+ readonly promptSubmitted: import("@angular/core").OutputEmitterRef<CustomEvent<PromptSubmittedEventDetail>>;
76
+ /** Fired when a running prompt is stopped */
77
+ readonly promptStopped: import("@angular/core").OutputEmitterRef<CustomEvent<void>>;
78
+ constructor();
79
+ ngOnChanges(changes: SimpleChanges): void;
80
+ /**
81
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
82
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
83
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
84
+ * undefined / null by clearing their bindings.
85
+ */
86
+ private setHostProperty;
87
+ private bindEvents;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoAiInteractionTextarea, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoAiInteractionTextarea, "luzmo-ai-interaction-textarea", ["luzmoAiInteractionTextarea"], { "placeholder": { "alias": "placeholder"; "required": false; }; "selectedDatasets": { "alias": "selectedDatasets"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "appServer": { "alias": "appServer"; "required": false; }; "includePublicDatasets": { "alias": "includePublicDatasets"; "required": false; }; "flagOpendata": { "alias": "flagOpendata"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "singleLine": { "alias": "singleLine"; "required": false; }; "hideDatasetButton": { "alias": "hideDatasetButton"; "required": false; }; "hideDatasetIcons": { "alias": "hideDatasetIcons"; "required": false; }; "maxVisibleSelectedDatasets": { "alias": "maxVisibleSelectedDatasets"; "required": false; }; "selectedAgent": { "alias": "selectedAgent"; "required": false; }; "hideAgents": { "alias": "hideAgents"; "required": false; }; "disableDatasetModification": { "alias": "disableDatasetModification"; "required": false; }; "hideSelectedDatasets": { "alias": "hideSelectedDatasets"; "required": false; }; "disableColumnMentions": { "alias": "disableColumnMentions"; "required": false; }; "isGenerating": { "alias": "isGenerating"; "required": false; }; "stoppable": { "alias": "stoppable"; "required": false; }; "value": { "alias": "value"; "required": false; }; "retainOnSubmit": { "alias": "retainOnSubmit"; "required": false; }; "requireDataset": { "alias": "requireDataset"; "required": false; }; "allowImages": { "alias": "allowImages"; "required": false; }; "allowVoiceInput": { "alias": "allowVoiceInput"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "apiVersion": { "alias": "apiVersion"; "required": false; }; "uploadAttachments": { "alias": "uploadAttachments"; "required": false; }; "fileIcons": { "alias": "fileIcons"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "promptSubmitted": "promptSubmitted"; "promptStopped": "promptStopped"; }, never, ["*"], true, never>;
90
+ static ngAcceptInputType_includePublicDatasets: unknown;
91
+ static ngAcceptInputType_flagOpendata: unknown;
92
+ static ngAcceptInputType_disabled: unknown;
93
+ static ngAcceptInputType_singleLine: unknown;
94
+ static ngAcceptInputType_hideDatasetButton: unknown;
95
+ static ngAcceptInputType_hideDatasetIcons: unknown;
96
+ static ngAcceptInputType_hideAgents: unknown;
97
+ static ngAcceptInputType_disableDatasetModification: unknown;
98
+ static ngAcceptInputType_hideSelectedDatasets: unknown;
99
+ static ngAcceptInputType_disableColumnMentions: unknown;
100
+ static ngAcceptInputType_isGenerating: unknown;
101
+ static ngAcceptInputType_stoppable: unknown;
102
+ static ngAcceptInputType_retainOnSubmit: unknown;
103
+ static ngAcceptInputType_requireDataset: unknown;
104
+ static ngAcceptInputType_allowImages: unknown;
105
+ static ngAcceptInputType_allowVoiceInput: unknown;
106
+ }
107
+ /** The underlying custom element type for LuzmoAiInteractionTextarea */
108
+ export type LuzmoAiInteractionTextareaElement = LuzmoAiInteractionTextareaHostElement;