@luzmo/analytics-components-kit 1.0.1-alpha.97 → 1.0.1-alpha.99
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/README.md +2 -2
- package/angular/components/ai-interaction-textarea.component.ts +8 -0
- package/angular/components/{filter-data-item-picker.component.ts → data-items-select.component.ts} +34 -17
- package/angular/components/edit-filters/index.ts +1 -0
- package/angular/components/edit-filters/types.ts +10 -0
- package/angular/components/edit-filters.component.ts +41 -0
- package/angular/components/slot-contents-picker.component.ts +8 -6
- package/angular/esm/components/ai-interaction-textarea.component.d.ts +5 -1
- package/angular/esm/components/ai-interaction-textarea.component.js +22 -2
- package/angular/esm/components/data-items-select.component.d.ts +33 -0
- package/angular/esm/components/{filter-data-item-picker.component.js → data-items-select.component.js} +41 -26
- package/angular/esm/components/edit-filters/index.d.ts +1 -0
- package/angular/esm/components/edit-filters/index.js +1 -0
- package/angular/esm/components/edit-filters/types.d.ts +8 -0
- package/angular/esm/components/edit-filters/types.js +1 -0
- package/angular/esm/components/edit-filters.component.d.ts +21 -0
- package/angular/esm/components/edit-filters.component.js +89 -0
- package/angular/esm/components/slot-contents-picker.component.d.ts +7 -6
- package/angular/esm/components/slot-contents-picker.component.js +11 -6
- package/angular/esm/index.d.ts +5 -5
- package/angular/esm/index.js +6 -6
- package/angular/esm/types.d.ts +9 -0
- package/angular/index.ts +6 -6
- package/angular/types.ts +17 -0
- package/angular/utils/filters/expressions.d.ts +1 -1
- package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +21 -0
- package/components/ai-interaction-textarea/index.cjs +17 -15
- package/components/ai-interaction-textarea/index.js +90 -65
- package/components/{filter-data-item-picker/filter-data-item-picker.d.ts → data-items-select/data-items-select.d.ts} +36 -21
- package/components/data-items-select/index.cjs +39 -0
- package/components/data-items-select/index.d.ts +6 -0
- package/components/{filter-data-item-picker → data-items-select}/index.js +127 -109
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +3 -3
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{de-COKGBX9L.cjs → de-DOYL4txr.cjs} +1 -1
- package/components/{de-DU0DlXuf.js → de-SDzGVifr.js} +10 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/draggable-data-item/index.cjs +1 -1
- package/components/draggable-data-item/index.js +1 -1
- package/components/draggable-data-item-level/index.cjs +1 -1
- package/components/draggable-data-item-level/index.js +1 -1
- package/components/droppable-slot/index.cjs +9 -9
- package/components/droppable-slot/index.js +82 -158
- package/components/edit-filters/edit-filters.d.ts +79 -0
- package/components/edit-filters/index.cjs +144 -0
- package/components/edit-filters/index.d.ts +8 -0
- package/components/edit-filters/index.js +341 -0
- package/components/edit-filters/types.d.ts +8 -0
- package/components/{es-BxR1uGKR.js → es-B1TeapPZ.js} +10 -1
- package/components/{es-CaKfa7fn.cjs → es-DcQvrHgz.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-item/filter-item.d.ts +1 -1
- package/components/filter-item/index.cjs +7 -5
- package/components/filter-item/index.js +78 -68
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/filter-value-picker-datetime/index.cjs +2 -2
- package/components/filter-value-picker-datetime/index.js +4 -4
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +2 -2
- package/components/filter-value-picker-numeric/index.cjs +2 -1
- package/components/filter-value-picker-numeric/index.js +3 -2
- package/components/{fr-DiZbjx_a.cjs → fr-D6QmA3Ve.cjs} +1 -1
- package/components/{fr-CvltYxR_.js → fr-sZFBmltf.js} +10 -1
- package/components/{get-css-variable-Pzks_rOx.cjs → get-css-variable-C0B_Sxqf.cjs} +1 -1
- package/components/{get-css-variable-Bb7TxJdX.js → get-css-variable-DgTBQV3c.js} +2 -1
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +1 -1
- package/components/{index-DNPULp4A.js → index-BikhVAa1.js} +1 -1
- package/components/{index-CFL6gmIu.cjs → index-CAbDIHYI.cjs} +1 -1
- package/components/{index-BNAmjOkm.cjs → index-DM58h73U.cjs} +3 -3
- package/components/{index-DdyZ2g5L.js → index-DR5275fa.js} +48 -18
- package/components/index.cjs +1 -1
- package/components/index.js +105 -106
- package/components/{nl-CLs7FmRK.js → nl-BYXZ-qNp.js} +10 -1
- package/components/{nl-Bot6bJ4g.cjs → nl-D7oNsLn0.cjs} +1 -1
- package/components/{set-locale-hKTMz37h.js → set-locale-B5562CBM.js} +1 -1
- package/components/{set-locale-BRRalqne.cjs → set-locale-B8iQGfk0.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +31 -27
- package/components/slot-contents-picker/index.js +137 -124
- package/components/slot-contents-picker/slot-contents-picker.d.ts +26 -5
- package/components/slot-menu/index.cjs +6 -6
- package/components/slot-menu/index.js +76 -76
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/slot-store-CRfN0nD3.js +98 -0
- package/components/slot-store-Dd_cPNXk.cjs +20 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/viz-item-menu/index.cjs +6 -6
- package/components/viz-item-menu/index.js +27 -28
- package/custom-elements.json +1922 -1631
- package/index.d.ts +1 -1
- package/package.json +12 -12
- package/types.d.ts +9 -0
- package/utils/filters/expressions.d.ts +1 -1
- package/angular/components/filter-group.component.ts +0 -29
- package/angular/esm/components/filter-data-item-picker.component.d.ts +0 -30
- package/angular/esm/components/filter-group.component.d.ts +0 -12
- package/angular/esm/components/filter-group.component.js +0 -56
- package/components/filter-data-item-picker/index.cjs +0 -47
- package/components/filter-data-item-picker/index.d.ts +0 -7
- package/components/filter-group/filter-group.d.ts +0 -26
- package/components/filter-group/index.d.ts +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import type { Placement } from '../types';
|
|
2
|
+
import type { VizItemType, SlotName, Placement } from '../types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SlotContentsPickerComponent {
|
|
5
|
-
itemType?:
|
|
6
|
-
slotName?:
|
|
5
|
+
itemType?: VizItemType;
|
|
6
|
+
slotName?: SlotName;
|
|
7
7
|
slotConfiguration?: any;
|
|
8
8
|
slotContents?: any;
|
|
9
9
|
language?: string;
|
|
@@ -12,7 +12,7 @@ export declare class SlotContentsPickerComponent {
|
|
|
12
12
|
hasLabel?: boolean;
|
|
13
13
|
label?: string;
|
|
14
14
|
selects?: 'single' | 'multiple';
|
|
15
|
-
icons?: 'none' | 'only
|
|
15
|
+
icons?: 'none' | 'menu-only' | 'all';
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
datasetsDataItems?: {
|
|
18
18
|
id: string;
|
|
@@ -25,9 +25,10 @@ export declare class SlotContentsPickerComponent {
|
|
|
25
25
|
placement?: Placement;
|
|
26
26
|
hideDelete?: boolean;
|
|
27
27
|
hideConfiguration?: boolean;
|
|
28
|
-
|
|
28
|
+
hideClear?: boolean;
|
|
29
|
+
search?: any;
|
|
29
30
|
size?: any;
|
|
30
31
|
slotContentsChanged: EventEmitter<CustomEvent<any>>;
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<SlotContentsPickerComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SlotContentsPickerComponent, "luzmo-slot-contents-picker", never, { "itemType": { "alias": "itemType"; "required": false; }; "slotName": { "alias": "slotName"; "required": false; }; "slotConfiguration": { "alias": "slotConfiguration"; "required": false; }; "slotContents": { "alias": "slotContents"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; "hasLabel": { "alias": "hasLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "selects": { "alias": "selects"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "datasetsDataItems": { "alias": "datasetsDataItems"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "hideDelete": { "alias": "hideDelete"; "required": false; }; "hideConfiguration": { "alias": "hideConfiguration"; "required": false; }; "
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SlotContentsPickerComponent, "luzmo-slot-contents-picker", never, { "itemType": { "alias": "itemType"; "required": false; }; "slotName": { "alias": "slotName"; "required": false; }; "slotConfiguration": { "alias": "slotConfiguration"; "required": false; }; "slotContents": { "alias": "slotContents"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; "hasLabel": { "alias": "hasLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "selects": { "alias": "selects"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "datasetsDataItems": { "alias": "datasetsDataItems"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "hideDelete": { "alias": "hideDelete"; "required": false; }; "hideConfiguration": { "alias": "hideConfiguration"; "required": false; }; "hideClear": { "alias": "hideClear"; "required": false; }; "search": { "alias": "search"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "slotContentsChanged": "slotContentsChanged"; }, never, ["*"], true, never>;
|
|
33
34
|
}
|
|
@@ -17,11 +17,12 @@ export class SlotContentsPickerComponent {
|
|
|
17
17
|
placement;
|
|
18
18
|
hideDelete;
|
|
19
19
|
hideConfiguration;
|
|
20
|
-
|
|
20
|
+
hideClear;
|
|
21
|
+
search;
|
|
21
22
|
size;
|
|
22
23
|
slotContentsChanged = new EventEmitter();
|
|
23
24
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: SlotContentsPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.3", type: SlotContentsPickerComponent, isStandalone: true, selector: "luzmo-slot-contents-picker", inputs: { itemType: "itemType", slotName: "slotName", slotConfiguration: "slotConfiguration", slotContents: "slotContents", language: "language", disabled: "disabled", menu: "menu", hasLabel: "hasLabel", label: "label", selects: "selects", icons: "icons", placeholder: "placeholder", datasetsDataItems: "datasetsDataItems", placement: "placement", hideDelete: "hideDelete", hideConfiguration: "hideConfiguration",
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.3", type: SlotContentsPickerComponent, isStandalone: true, selector: "luzmo-slot-contents-picker", inputs: { itemType: "itemType", slotName: "slotName", slotConfiguration: "slotConfiguration", slotContents: "slotContents", language: "language", disabled: "disabled", menu: "menu", hasLabel: "hasLabel", label: "label", selects: "selects", icons: "icons", placeholder: "placeholder", datasetsDataItems: "datasetsDataItems", placement: "placement", hideDelete: "hideDelete", hideConfiguration: "hideConfiguration", hideClear: "hideClear", search: "search", size: "size" }, outputs: { slotContentsChanged: "slotContentsChanged" }, ngImport: i0, template: `<luzmo-slot-contents-picker
|
|
25
26
|
[attr.item-type]="itemType"
|
|
26
27
|
[attr.slot-name]="slotName"
|
|
27
28
|
[attr.slotConfiguration]="slotConfiguration"
|
|
@@ -38,11 +39,12 @@ export class SlotContentsPickerComponent {
|
|
|
38
39
|
[attr.placement]="placement"
|
|
39
40
|
[attr.hide-delete]="hideDelete"
|
|
40
41
|
[attr.hide-configuration]="hideConfiguration"
|
|
41
|
-
[attr.
|
|
42
|
+
[attr.hide-clear]="hideClear"
|
|
43
|
+
[attr.search]="search"
|
|
42
44
|
[attr.size]="size"
|
|
43
45
|
(slot-contents-changed)="slotContentsChanged.emit($event)">
|
|
44
46
|
<ng-content></ng-content>
|
|
45
|
-
</luzmo-slot-contents-picker>`, isInline: true, dependencies: [{ kind: "component", type: SlotContentsPickerComponent, selector: "luzmo-slot-contents-picker", inputs: ["itemType", "slotName", "slotConfiguration", "slotContents", "language", "disabled", "menu", "hasLabel", "label", "selects", "icons", "placeholder", "datasetsDataItems", "placement", "hideDelete", "hideConfiguration", "
|
|
47
|
+
</luzmo-slot-contents-picker>`, isInline: true, dependencies: [{ kind: "component", type: SlotContentsPickerComponent, selector: "luzmo-slot-contents-picker", inputs: ["itemType", "slotName", "slotConfiguration", "slotContents", "language", "disabled", "menu", "hasLabel", "label", "selects", "icons", "placeholder", "datasetsDataItems", "placement", "hideDelete", "hideConfiguration", "hideClear", "search", "size"], outputs: ["slotContentsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
48
|
}
|
|
47
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: SlotContentsPickerComponent, decorators: [{
|
|
48
50
|
type: Component,
|
|
@@ -67,7 +69,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
|
|
|
67
69
|
[attr.placement]="placement"
|
|
68
70
|
[attr.hide-delete]="hideDelete"
|
|
69
71
|
[attr.hide-configuration]="hideConfiguration"
|
|
70
|
-
[attr.
|
|
72
|
+
[attr.hide-clear]="hideClear"
|
|
73
|
+
[attr.search]="search"
|
|
71
74
|
[attr.size]="size"
|
|
72
75
|
(slot-contents-changed)="slotContentsChanged.emit($event)">
|
|
73
76
|
<ng-content></ng-content>
|
|
@@ -105,7 +108,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
|
|
|
105
108
|
type: Input
|
|
106
109
|
}], hideConfiguration: [{
|
|
107
110
|
type: Input
|
|
108
|
-
}],
|
|
111
|
+
}], hideClear: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], search: [{
|
|
109
114
|
type: Input
|
|
110
115
|
}], size: [{
|
|
111
116
|
type: Input
|
package/angular/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
2
2
|
import { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
3
3
|
import { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
4
4
|
import { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
5
|
+
import { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
5
6
|
import { DatasetIconComponent } from './components/dataset-icon.component';
|
|
6
7
|
import { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
7
8
|
import { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -14,13 +15,12 @@ import { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
14
15
|
import { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
15
16
|
import { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
16
17
|
import { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
18
|
+
import { EditFiltersComponent } from './components/edit-filters.component';
|
|
17
19
|
import { EditItemComponent } from './components/edit-item.component';
|
|
18
20
|
import { EditOptionComponent } from './components/edit-option.component';
|
|
19
21
|
import { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
20
22
|
import { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
21
|
-
import { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
22
23
|
import { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
23
|
-
import { FilterGroupComponent } from './components/filter-group.component';
|
|
24
24
|
import { FilterItemComponent } from './components/filter-item.component';
|
|
25
25
|
import { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
26
26
|
import { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -37,6 +37,7 @@ export { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
37
37
|
export { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
38
38
|
export { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
39
39
|
export { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
40
|
+
export { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
40
41
|
export { DatasetIconComponent } from './components/dataset-icon.component';
|
|
41
42
|
export { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
42
43
|
export { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -49,13 +50,12 @@ export { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
49
50
|
export { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
50
51
|
export { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
51
52
|
export { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
53
|
+
export { EditFiltersComponent } from './components/edit-filters.component';
|
|
52
54
|
export { EditItemComponent } from './components/edit-item.component';
|
|
53
55
|
export { EditOptionComponent } from './components/edit-option.component';
|
|
54
56
|
export { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
55
57
|
export { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
56
|
-
export { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
57
58
|
export { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
58
|
-
export { FilterGroupComponent } from './components/filter-group.component';
|
|
59
59
|
export { FilterItemComponent } from './components/filter-item.component';
|
|
60
60
|
export { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
61
61
|
export { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -68,4 +68,4 @@ export { SlotContentsPickerComponent } from './components/slot-contents-picker.c
|
|
|
68
68
|
export { SlotMenuComponent } from './components/slot-menu.component';
|
|
69
69
|
export { SlotMenuListComponent } from './components/slot-menu-list.component';
|
|
70
70
|
export { VizItemMenuComponent } from './components/viz-item-menu.component';
|
|
71
|
-
export declare const LUZMO_COMPONENTS: readonly [typeof AiChatMessageAssistantComponent, typeof AiChatMessageUserComponent, typeof AiChatMessagesContainerComponent, typeof AiInteractionTextareaComponent, typeof DatasetIconComponent, typeof DatasetSelectorListComponent, typeof DatasetSelectorRowComponent, typeof DisplaySettingsComponent, typeof DisplaySettingsBinningComponent, typeof DisplaySettingsDatetimeComponent, typeof DisplaySettingsGrandTotalsComponent, typeof DisplaySettingsNumericComponent, typeof DisplaySettingsPeriodOverPeriodComponent, typeof DraggableDataItemComponent, typeof DraggableDataItemLevelComponent, typeof DroppableSlotComponent, typeof EditItemComponent, typeof EditOptionComponent, typeof EditOptionColorPickerComponent, typeof EditOptionColorRangeComponent, typeof
|
|
71
|
+
export declare const LUZMO_COMPONENTS: readonly [typeof AiChatMessageAssistantComponent, typeof AiChatMessageUserComponent, typeof AiChatMessagesContainerComponent, typeof AiInteractionTextareaComponent, typeof DataItemsSelectComponent, typeof DatasetIconComponent, typeof DatasetSelectorListComponent, typeof DatasetSelectorRowComponent, typeof DisplaySettingsComponent, typeof DisplaySettingsBinningComponent, typeof DisplaySettingsDatetimeComponent, typeof DisplaySettingsGrandTotalsComponent, typeof DisplaySettingsNumericComponent, typeof DisplaySettingsPeriodOverPeriodComponent, typeof DraggableDataItemComponent, typeof DraggableDataItemLevelComponent, typeof DroppableSlotComponent, typeof EditFiltersComponent, typeof EditItemComponent, typeof EditOptionComponent, typeof EditOptionColorPickerComponent, typeof EditOptionColorRangeComponent, typeof FilterExpressionPickerComponent, typeof FilterItemComponent, typeof FilterParameterPickerComponent, typeof FilterValuePickerComponent, typeof FilterValuePickerDatetimeComponent, typeof FilterValuePickerHierarchyComponent, typeof FilterValuePickerNumericComponent, typeof GridComponent, typeof GridItemActionsMenuComponent, typeof SlotContentsPickerComponent, typeof SlotMenuComponent, typeof SlotMenuListComponent, typeof VizItemMenuComponent];
|
package/angular/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
2
2
|
import { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
3
3
|
import { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
4
4
|
import { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
5
|
+
import { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
5
6
|
import { DatasetIconComponent } from './components/dataset-icon.component';
|
|
6
7
|
import { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
7
8
|
import { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -14,13 +15,12 @@ import { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
14
15
|
import { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
15
16
|
import { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
16
17
|
import { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
18
|
+
import { EditFiltersComponent } from './components/edit-filters.component';
|
|
17
19
|
import { EditItemComponent } from './components/edit-item.component';
|
|
18
20
|
import { EditOptionComponent } from './components/edit-option.component';
|
|
19
21
|
import { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
20
22
|
import { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
21
|
-
import { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
22
23
|
import { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
23
|
-
import { FilterGroupComponent } from './components/filter-group.component';
|
|
24
24
|
import { FilterItemComponent } from './components/filter-item.component';
|
|
25
25
|
import { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
26
26
|
import { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -37,6 +37,7 @@ export { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
37
37
|
export { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
38
38
|
export { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
39
39
|
export { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
40
|
+
export { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
40
41
|
export { DatasetIconComponent } from './components/dataset-icon.component';
|
|
41
42
|
export { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
42
43
|
export { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -49,13 +50,12 @@ export { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
49
50
|
export { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
50
51
|
export { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
51
52
|
export { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
53
|
+
export { EditFiltersComponent } from './components/edit-filters.component';
|
|
52
54
|
export { EditItemComponent } from './components/edit-item.component';
|
|
53
55
|
export { EditOptionComponent } from './components/edit-option.component';
|
|
54
56
|
export { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
55
57
|
export { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
56
|
-
export { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
57
58
|
export { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
58
|
-
export { FilterGroupComponent } from './components/filter-group.component';
|
|
59
59
|
export { FilterItemComponent } from './components/filter-item.component';
|
|
60
60
|
export { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
61
61
|
export { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -73,6 +73,7 @@ export const LUZMO_COMPONENTS = [
|
|
|
73
73
|
AiChatMessageUserComponent,
|
|
74
74
|
AiChatMessagesContainerComponent,
|
|
75
75
|
AiInteractionTextareaComponent,
|
|
76
|
+
DataItemsSelectComponent,
|
|
76
77
|
DatasetIconComponent,
|
|
77
78
|
DatasetSelectorListComponent,
|
|
78
79
|
DatasetSelectorRowComponent,
|
|
@@ -85,13 +86,12 @@ export const LUZMO_COMPONENTS = [
|
|
|
85
86
|
DraggableDataItemComponent,
|
|
86
87
|
DraggableDataItemLevelComponent,
|
|
87
88
|
DroppableSlotComponent,
|
|
89
|
+
EditFiltersComponent,
|
|
88
90
|
EditItemComponent,
|
|
89
91
|
EditOptionComponent,
|
|
90
92
|
EditOptionColorPickerComponent,
|
|
91
93
|
EditOptionColorRangeComponent,
|
|
92
|
-
FilterDataItemPickerComponent,
|
|
93
94
|
FilterExpressionPickerComponent,
|
|
94
|
-
FilterGroupComponent,
|
|
95
95
|
FilterItemComponent,
|
|
96
96
|
FilterParameterPickerComponent,
|
|
97
97
|
FilterValuePickerComponent,
|
package/angular/esm/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { TemplateResult } from 'lit';
|
|
|
10
10
|
export type { Column, ColumnSubtype, ColumnType, GenericSlotContent, SlotName, VizItemSlots, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
11
11
|
export type { DraggableDataItemData } from './components/draggable-data-item';
|
|
12
12
|
export type { DroppableSlotConfiguration, SlotContentsChangedEventDetail } from './components/droppable-slot';
|
|
13
|
+
export type { FilterCondition, FilterGroup } from './components/edit-filters/types';
|
|
13
14
|
export type { MeasureColumnsItem, SlotContentChangedEventDetail, SlotListChangedEventDetail, SlotMenuActiveEventDetail, SlotMenuHighlightEventDetail } from './components/slot-menu';
|
|
14
15
|
export declare enum PeriodOverPeriodCondition {
|
|
15
16
|
HasDatetimeColumnAndNoComparisonFilters = "hasDatetimeColumnAndNoComparisonFilters",
|
|
@@ -113,3 +114,11 @@ export interface Dataset {
|
|
|
113
114
|
* Viz item menu button types that can be selected
|
|
114
115
|
*/
|
|
115
116
|
export type VizItemMenuButton = 'clone' | 'edit' | 'delete';
|
|
117
|
+
export type DataItemExtended = DataItem & {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
export type DataItemSelected = DataItemExtended & {
|
|
121
|
+
datasetId: string;
|
|
122
|
+
columnId?: string;
|
|
123
|
+
formulaId?: string;
|
|
124
|
+
} & Omit<DataItemExtended, 'id'>;
|
package/angular/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
2
2
|
import { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
3
3
|
import { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
4
4
|
import { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
5
|
+
import { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
5
6
|
import { DatasetIconComponent } from './components/dataset-icon.component';
|
|
6
7
|
import { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
7
8
|
import { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -14,13 +15,12 @@ import { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
14
15
|
import { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
15
16
|
import { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
16
17
|
import { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
18
|
+
import { EditFiltersComponent } from './components/edit-filters.component';
|
|
17
19
|
import { EditItemComponent } from './components/edit-item.component';
|
|
18
20
|
import { EditOptionComponent } from './components/edit-option.component';
|
|
19
21
|
import { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
20
22
|
import { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
21
|
-
import { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
22
23
|
import { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
23
|
-
import { FilterGroupComponent } from './components/filter-group.component';
|
|
24
24
|
import { FilterItemComponent } from './components/filter-item.component';
|
|
25
25
|
import { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
26
26
|
import { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -38,6 +38,7 @@ export { AiChatMessageAssistantComponent } from './components/ai-chat-message-as
|
|
|
38
38
|
export { AiChatMessageUserComponent } from './components/ai-chat-message-user.component';
|
|
39
39
|
export { AiChatMessagesContainerComponent } from './components/ai-chat-messages-container.component';
|
|
40
40
|
export { AiInteractionTextareaComponent } from './components/ai-interaction-textarea.component';
|
|
41
|
+
export { DataItemsSelectComponent } from './components/data-items-select.component';
|
|
41
42
|
export { DatasetIconComponent } from './components/dataset-icon.component';
|
|
42
43
|
export { DatasetSelectorListComponent } from './components/dataset-selector-list.component';
|
|
43
44
|
export { DatasetSelectorRowComponent } from './components/dataset-selector-row.component';
|
|
@@ -50,13 +51,12 @@ export { DisplaySettingsPeriodOverPeriodComponent } from './components/display-s
|
|
|
50
51
|
export { DraggableDataItemComponent } from './components/draggable-data-item.component';
|
|
51
52
|
export { DraggableDataItemLevelComponent } from './components/draggable-data-item-level.component';
|
|
52
53
|
export { DroppableSlotComponent } from './components/droppable-slot.component';
|
|
54
|
+
export { EditFiltersComponent } from './components/edit-filters.component';
|
|
53
55
|
export { EditItemComponent } from './components/edit-item.component';
|
|
54
56
|
export { EditOptionComponent } from './components/edit-option.component';
|
|
55
57
|
export { EditOptionColorPickerComponent } from './components/edit-option-color-picker.component';
|
|
56
58
|
export { EditOptionColorRangeComponent } from './components/edit-option-color-range.component';
|
|
57
|
-
export { FilterDataItemPickerComponent } from './components/filter-data-item-picker.component';
|
|
58
59
|
export { FilterExpressionPickerComponent } from './components/filter-expression-picker.component';
|
|
59
|
-
export { FilterGroupComponent } from './components/filter-group.component';
|
|
60
60
|
export { FilterItemComponent } from './components/filter-item.component';
|
|
61
61
|
export { FilterParameterPickerComponent } from './components/filter-parameter-picker.component';
|
|
62
62
|
export { FilterValuePickerComponent } from './components/filter-value-picker.component';
|
|
@@ -75,6 +75,7 @@ export const LUZMO_COMPONENTS = [
|
|
|
75
75
|
AiChatMessageUserComponent,
|
|
76
76
|
AiChatMessagesContainerComponent,
|
|
77
77
|
AiInteractionTextareaComponent,
|
|
78
|
+
DataItemsSelectComponent,
|
|
78
79
|
DatasetIconComponent,
|
|
79
80
|
DatasetSelectorListComponent,
|
|
80
81
|
DatasetSelectorRowComponent,
|
|
@@ -87,13 +88,12 @@ export const LUZMO_COMPONENTS = [
|
|
|
87
88
|
DraggableDataItemComponent,
|
|
88
89
|
DraggableDataItemLevelComponent,
|
|
89
90
|
DroppableSlotComponent,
|
|
91
|
+
EditFiltersComponent,
|
|
90
92
|
EditItemComponent,
|
|
91
93
|
EditOptionComponent,
|
|
92
94
|
EditOptionColorPickerComponent,
|
|
93
95
|
EditOptionColorRangeComponent,
|
|
94
|
-
FilterDataItemPickerComponent,
|
|
95
96
|
FilterExpressionPickerComponent,
|
|
96
|
-
FilterGroupComponent,
|
|
97
97
|
FilterItemComponent,
|
|
98
98
|
FilterParameterPickerComponent,
|
|
99
99
|
FilterValuePickerComponent,
|
package/angular/types.ts
CHANGED
|
@@ -26,6 +26,11 @@ export type {
|
|
|
26
26
|
SlotContentsChangedEventDetail
|
|
27
27
|
} from './components/droppable-slot';
|
|
28
28
|
|
|
29
|
+
export type {
|
|
30
|
+
FilterCondition,
|
|
31
|
+
FilterGroup
|
|
32
|
+
} from './components/edit-filters/types';
|
|
33
|
+
|
|
29
34
|
export type {
|
|
30
35
|
MeasureColumnsItem,
|
|
31
36
|
SlotContentChangedEventDetail,
|
|
@@ -150,3 +155,15 @@ export interface Dataset {
|
|
|
150
155
|
* Viz item menu button types that can be selected
|
|
151
156
|
*/
|
|
152
157
|
export type VizItemMenuButton = 'clone' | 'edit' | 'delete';
|
|
158
|
+
|
|
159
|
+
// Extends DataItem and allows for unknown additional properties (can be empty). Should cater for many cases
|
|
160
|
+
export type DataItemExtended = DataItem & {
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// create a type that extends DataItemExtended and adds a datasetId property and either a columnId or a formulaId property & removes the id property
|
|
165
|
+
export type DataItemSelected = DataItemExtended & {
|
|
166
|
+
datasetId: string;
|
|
167
|
+
columnId?: string;
|
|
168
|
+
formulaId?: string;
|
|
169
|
+
} & Omit<DataItemExtended, 'id'>;
|
|
@@ -10,6 +10,6 @@ export type FilterExpressionConfiguration = {
|
|
|
10
10
|
type: ColumnType[];
|
|
11
11
|
subtype?: ColumnSubtype[];
|
|
12
12
|
};
|
|
13
|
-
export type FilterExpressionKey = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'last_available' | 'last_completed' | 'next_now' | 'next_full' | 'to_date' | '? is null' | '? is not null';
|
|
13
|
+
export type FilterExpressionKey = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'last_available' | 'last_completed' | 'next_now' | 'more_than_ago' | 'or_more_ago' | 'next_full' | 'to_date' | '? is null' | '? is not null';
|
|
14
14
|
export declare const filterExpressionsConfigurations: () => FilterExpressionConfiguration[];
|
|
15
15
|
export declare const getValidExpressions: (type?: ColumnType, subtype?: ColumnSubtype, isFormula?: boolean) => FilterExpressionConfiguration[];
|
|
@@ -7,6 +7,10 @@ import '../dataset-selector-row';
|
|
|
7
7
|
* @fires prompt-submitted - Fired when a prompt is submitted with selected datasets
|
|
8
8
|
*
|
|
9
9
|
* @attr {boolean} disabled - When true, disables the entire component (opacity 60%, no interactions)
|
|
10
|
+
* @attr {boolean} single-line - When true, starts in compact single-line mode and auto-expands as needed
|
|
11
|
+
* @attr {boolean} hide-dataset-button - When true, hides the "+ Add dataset" button
|
|
12
|
+
* @attr {boolean} is-generating - When true, shows a spinning loader icon instead of the submit arrow
|
|
13
|
+
* @attr {string} value - The current value of the textarea (can be controlled from parent to clear or set text)
|
|
10
14
|
*
|
|
11
15
|
* @cssprop --luzmo-ai-interaction-textarea-background-color - Override for background color of the component (client customization)
|
|
12
16
|
* @cssprop --ai-interaction-textarea-background-color - Background color of the component
|
|
@@ -69,6 +73,22 @@ export declare class LuzmoAiInteractionTextarea extends LitElement {
|
|
|
69
73
|
* When true, disables the entire component (sets opacity to 60% and prevents all interactions)
|
|
70
74
|
*/
|
|
71
75
|
disabled: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* When true, starts in compact single-line mode and auto-expands as needed
|
|
78
|
+
*/
|
|
79
|
+
singleLine: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* When true, hides the "+ Add dataset" button
|
|
82
|
+
*/
|
|
83
|
+
hideDatasetButton: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* When true, shows a spinning loader icon instead of the submit arrow
|
|
86
|
+
*/
|
|
87
|
+
isGenerating: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The current value of the textarea (controlled from parent)
|
|
90
|
+
*/
|
|
91
|
+
value: string;
|
|
72
92
|
private _promptValue;
|
|
73
93
|
private _isPromptValid;
|
|
74
94
|
private get _buttonDisabled();
|
|
@@ -78,6 +98,7 @@ export declare class LuzmoAiInteractionTextarea extends LitElement {
|
|
|
78
98
|
private _submitPrompt;
|
|
79
99
|
private _handleDatasetSelected;
|
|
80
100
|
private _handleDatasetRemoved;
|
|
101
|
+
protected willUpdate(changedProperties: Map<string, unknown>): void;
|
|
81
102
|
protected firstUpdated(): void;
|
|
82
103
|
protected render(): TemplateResult;
|
|
83
104
|
}
|
|
@@ -17,19 +17,21 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@lit/localize"),
|
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@lit/localize"),l=require("@luzmo/icons"),c=require("lit"),r=require("lit/decorators.js"),p=require("lit/directives/class-map.js");require("../dataset-selector-row/index.cjs");const h=":host{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--luzmo-ai-interaction-textarea-background-color, var(--ai-interaction-textarea-background-color));border:1px solid var(--luzmo-ai-interaction-textarea-border-color, var(--ai-interaction-textarea-border-color));border-radius:var(--luzmo-ai-interaction-textarea-border-radius, var(--ai-interaction-textarea-border-radius));padding:var(--luzmo-ai-interaction-textarea-padding, var(--ai-interaction-textarea-padding));gap:var(--luzmo-ai-interaction-textarea-gap, var(--ai-interaction-textarea-gap));font-family:var(--luzmo-ai-interaction-textarea-font-family, var(--ai-interaction-textarea-font-family));font-size:var(--luzmo-ai-interaction-textarea-font-size, var(--ai-interaction-textarea-font-size))}:host:has(textarea:focus){border-color:var(--luzmo-ai-interaction-textarea-focus-border-color, var(--ai-interaction-textarea-focus-border-color));box-shadow:var(--luzmo-ai-interaction-textarea-focus-box-shadow, var(--ai-interaction-textarea-focus-box-shadow))}:host .content-wrapper{display:flex;flex-direction:column;gap:var(--luzmo-ai-interaction-textarea-gap, var(--ai-interaction-textarea-gap))}:host .content-wrapper.single-line{flex-direction:row;align-items:center}:host .content-wrapper.single-line textarea{flex:1;min-height:auto}:host .content-wrapper.single-line .button-container{align-self:flex-end}:host .content-wrapper.disabled{opacity:.6;pointer-events:none;cursor:not-allowed}:host .content-wrapper.disabled *{pointer-events:none}:host textarea{background-color:var(--luzmo-ai-interaction-textarea-textarea-background, var(--ai-interaction-textarea-textarea-background));border:none;resize:none;outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;vertical-align:middle;padding:0;min-height:var(--luzmo-ai-interaction-textarea-textarea-min-height, var(--ai-interaction-textarea-textarea-min-height, 3rem));color:var(--luzmo-ai-interaction-textarea-textarea-color, var(--ai-interaction-textarea-textarea-color));font-family:var(--luzmo-ai-interaction-textarea-font-family, var(--ai-interaction-textarea-font-family));font-size:var(--luzmo-ai-interaction-textarea-font-size, var(--ai-interaction-textarea-font-size));line-height:1.5}:host textarea::placeholder{color:var(--luzmo-ai-interaction-textarea-textarea-placeholder-color, var(--ai-interaction-textarea-textarea-placeholder-color))}:host .button-container{text-align:var(--luzmo-ai-interaction-textarea-button-container-text-align, var(--ai-interaction-textarea-button-container-text-align))}:host .button-container button{padding:var(--luzmo-ai-interaction-textarea-button-padding, var(--ai-interaction-textarea-button-padding));min-width:var(--luzmo-ai-interaction-textarea-button-min-width, var(--ai-interaction-textarea-button-min-width));min-height:var(--luzmo-ai-interaction-textarea-button-min-height, var(--ai-interaction-textarea-button-min-height));border:none;border-radius:var(--luzmo-ai-interaction-textarea-button-border-radius, var(--ai-interaction-textarea-button-border-radius));font-size:var(--luzmo-ai-interaction-textarea-button-font-size, var(--ai-interaction-textarea-button-font-size));cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:all .15s ease}:host .button-container button:disabled{opacity:.6;cursor:not-allowed}:host .button-container button.disabled{opacity:.6;cursor:not-allowed}:host .button-container button svg{display:flex;align-items:center;justify-content:center}:host .button-container button svg.spin{animation:spin 1s linear infinite}:host .button-container button.btn-primary{background-color:var(--luzmo-ai-interaction-textarea-button-background-color, var(--ai-interaction-textarea-button-background-color));color:var(--luzmo-ai-interaction-textarea-button-color, var(--ai-interaction-textarea-button-color))}:host .button-container button.btn-primary:hover:not(:disabled):not(.disabled){background-color:var(--luzmo-ai-interaction-textarea-button-background-color-hover, var(--ai-interaction-textarea-button-background-color-hover))}:host .button-container button.btn-primary:disabled,:host .button-container button.btn-primary.disabled{background-color:var(--luzmo-ai-interaction-textarea-button-background-color-disabled, var(--ai-interaction-textarea-button-background-color-disabled));opacity:.6}@keyframes spin{to{transform:rotate(360deg)}}:host{--ai-interaction-textarea-background-color: var(--luzmo-background-color-alt-2);--ai-interaction-textarea-border-color: var(--luzmo-border-color);--ai-interaction-textarea-border-radius: .5rem;--ai-interaction-textarea-padding: .75rem;--ai-interaction-textarea-gap: 1rem;--ai-interaction-textarea-focus-border-color: var(--luzmo-primary);--ai-interaction-textarea-focus-box-shadow: 0 0 1rem 0 var(--luzmo-primary-50);--ai-interaction-textarea-font-family: var(--luzmo-font-family);--ai-interaction-textarea-font-size: .875rem;--ai-interaction-textarea-textarea-background: transparent;--ai-interaction-textarea-textarea-color: var(--luzmo-font-color);--ai-interaction-textarea-textarea-placeholder-color: var(--luzmo-font-color-extra-dimmed);--ai-interaction-textarea-textarea-min-height: 3rem;--ai-interaction-textarea-button-container-text-align: right;--ai-interaction-textarea-button-padding: 0;--ai-interaction-textarea-button-min-width: 2rem;--ai-interaction-textarea-button-min-height: 1.875rem;--ai-interaction-textarea-button-border-radius: .5rem;--ai-interaction-textarea-button-font-size: 1rem;--ai-interaction-textarea-button-background-color: var(--luzmo-primary);--ai-interaction-textarea-button-background-color-hover: var(--luzmo-primary-hover);--ai-interaction-textarea-button-background-color-disabled: var(--luzmo-primary);--ai-interaction-textarea-button-color: var(--luzmo-primary-inverse-color)}";var m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,a=(u,t,e,i)=>{for(var o=i>1?void 0:i?b(t,e):t,n=u.length-1,s;n>=0;n--)(s=u[n])&&(o=(i?s(t,e,o):s(o))||o);return i&&o&&m(t,e,o),o};exports.LuzmoAiInteractionTextarea=class extends c.LitElement{constructor(){super(...arguments),this.placeholder="Type your prompt here...",this.selectedDatasets=[],this.authKey="",this.authToken="",this.apiUrl="https://api.luzmo.com",this.appServer="https://app.luzmo.com",this.flagOpendata=!1,this.disabled=!1,this.singleLine=!1,this.hideDatasetButton=!1,this.isGenerating=!1,this.value="",this._promptValue="",this._isPromptValid=!1}get _buttonDisabled(){return this.hideDatasetButton?this.disabled||!this._isPromptValid:this.disabled||this.selectedDatasets.length===0||!this._isPromptValid}_autoResizeTextarea(t){if(t.style.height="auto",this.singleLine){const i=Number.parseFloat(getComputedStyle(t).fontSize)||14,o=1.5*i,n=8*1.5*i,s=Math.max(o,Math.min(t.scrollHeight,n));t.style.height=`${s}px`}else{const o=Math.max(48,Math.min(t.scrollHeight,192));t.style.height=`${o}px`}}_handlePromptInput(t){const e=t.target;this._promptValue=e.value,this._isPromptValid=e.value.trim().length>0,this._autoResizeTextarea(e),e.scrollTo({top:e.scrollHeight})}_handleKeyDown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this._submitPrompt())}_submitPrompt(){if(this._buttonDisabled)return;const t=this._promptValue.trim();this.dispatchEvent(new CustomEvent("prompt-submitted",{detail:{prompt:t,selectedDatasets:this.selectedDatasets},bubbles:!0,composed:!0}))}_handleDatasetSelected(t){const e=t.detail;this.selectedDatasets.some(i=>i.id===e.id)||(this.selectedDatasets=[...this.selectedDatasets,e])}_handleDatasetRemoved(t){const e=t.detail;this.selectedDatasets=this.selectedDatasets.filter(i=>i.id!==e.id)}willUpdate(t){t.has("value")&&(this._promptValue=this.value,this._isPromptValid=this.value.trim().length>0,requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector("textarea");e&&this._autoResizeTextarea(e)}))}firstUpdated(){const t=this.shadowRoot?.querySelector("textarea");t&&this._autoResizeTextarea(t)}render(){const t={"content-wrapper":!0,disabled:this.disabled,"single-line":this.singleLine};return c.html`
|
|
21
21
|
<div class=${p.classMap(t)}>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
${this.hideDatasetButton?"":c.html`
|
|
23
|
+
<luzmo-dataset-selector-row
|
|
24
|
+
.selectedDatasets=${this.selectedDatasets}
|
|
25
|
+
auth-key=${this.authKey}
|
|
26
|
+
auth-token=${this.authToken}
|
|
27
|
+
api-url=${this.apiUrl}
|
|
28
|
+
app-server=${this.appServer}
|
|
29
|
+
?flag-opendata=${this.flagOpendata}
|
|
30
|
+
?disabled=${this.disabled}
|
|
31
|
+
@dataset-selected=${this._handleDatasetSelected}
|
|
32
|
+
@dataset-removed=${this._handleDatasetRemoved}
|
|
33
|
+
></luzmo-dataset-selector-row>
|
|
34
|
+
`}
|
|
33
35
|
|
|
34
36
|
<textarea
|
|
35
37
|
?autofocus=${!this.disabled}
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
.value=${this._promptValue}
|
|
39
41
|
@input=${this._handlePromptInput}
|
|
40
42
|
@keydown=${this._handleKeyDown}
|
|
41
|
-
rows
|
|
43
|
+
rows=${this.singleLine?"1":"2"}
|
|
42
44
|
></textarea>
|
|
43
45
|
|
|
44
46
|
<div class="button-container">
|
|
@@ -47,8 +49,8 @@
|
|
|
47
49
|
?disabled=${this._buttonDisabled}
|
|
48
50
|
@click=${this._submitPrompt}
|
|
49
51
|
>
|
|
50
|
-
${
|
|
52
|
+
${this.isGenerating?l.luzmoIcon(l.luzmoSpin,{className:"spin"}):l.luzmoIcon(l.luzmoArrowRight)}
|
|
51
53
|
</button>
|
|
52
54
|
</div>
|
|
53
55
|
</div>
|
|
54
|
-
`}};exports.LuzmoAiInteractionTextarea.styles=
|
|
56
|
+
`}};exports.LuzmoAiInteractionTextarea.styles=c.unsafeCSS(h);exports.LuzmoAiInteractionTextarea.tagName="luzmo-ai-interaction-textarea";a([r.property({type:String})],exports.LuzmoAiInteractionTextarea.prototype,"placeholder",2);a([r.property({type:Array})],exports.LuzmoAiInteractionTextarea.prototype,"selectedDatasets",2);a([r.property({type:String,attribute:"auth-key"})],exports.LuzmoAiInteractionTextarea.prototype,"authKey",2);a([r.property({type:String,attribute:"auth-token"})],exports.LuzmoAiInteractionTextarea.prototype,"authToken",2);a([r.property({type:String,attribute:"api-url"})],exports.LuzmoAiInteractionTextarea.prototype,"apiUrl",2);a([r.property({type:String,attribute:"app-server"})],exports.LuzmoAiInteractionTextarea.prototype,"appServer",2);a([r.property({type:Boolean,attribute:"flag-opendata"})],exports.LuzmoAiInteractionTextarea.prototype,"flagOpendata",2);a([r.property({type:Boolean,reflect:!0,attribute:"disabled"})],exports.LuzmoAiInteractionTextarea.prototype,"disabled",2);a([r.property({type:Boolean,attribute:"single-line"})],exports.LuzmoAiInteractionTextarea.prototype,"singleLine",2);a([r.property({type:Boolean,attribute:"hide-dataset-button"})],exports.LuzmoAiInteractionTextarea.prototype,"hideDatasetButton",2);a([r.property({type:Boolean,attribute:"is-generating"})],exports.LuzmoAiInteractionTextarea.prototype,"isGenerating",2);a([r.property({type:String})],exports.LuzmoAiInteractionTextarea.prototype,"value",2);a([r.state()],exports.LuzmoAiInteractionTextarea.prototype,"_promptValue",2);a([r.state()],exports.LuzmoAiInteractionTextarea.prototype,"_isPromptValid",2);exports.LuzmoAiInteractionTextarea=a([d.localized()],exports.LuzmoAiInteractionTextarea);customElements.get("luzmo-ai-interaction-textarea")||customElements.define("luzmo-ai-interaction-textarea",exports.LuzmoAiInteractionTextarea);
|