@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
package/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export * from './components/edit-option-radio-button-group';
|
|
|
29
29
|
export * from './components/edit-option-slider';
|
|
30
30
|
export * from './components/edit-option-switch';
|
|
31
31
|
export * from './components/edit-option-text-field';
|
|
32
|
-
export * from './components/
|
|
32
|
+
export * from './components/data-items-select';
|
|
33
33
|
export * from './components/filter-expression-picker';
|
|
34
34
|
export * from './components/filter-item';
|
|
35
35
|
export * from './components/filter-value-picker';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/analytics-components-kit",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./components/index.js",
|
|
6
6
|
"module": "./components/index.js",
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"import": "./components/ai-interaction-textarea/index.js",
|
|
32
32
|
"require": "./components/ai-interaction-textarea/index.cjs"
|
|
33
33
|
},
|
|
34
|
+
"./data-items-select": {
|
|
35
|
+
"types": "./components/data-items-select/index.d.ts",
|
|
36
|
+
"import": "./components/data-items-select/index.js",
|
|
37
|
+
"require": "./components/data-items-select/index.cjs"
|
|
38
|
+
},
|
|
34
39
|
"./dataset-icon": {
|
|
35
40
|
"types": "./components/dataset-icon/index.d.ts",
|
|
36
41
|
"import": "./components/dataset-icon/index.js",
|
|
@@ -91,6 +96,11 @@
|
|
|
91
96
|
"import": "./components/droppable-slot/index.js",
|
|
92
97
|
"require": "./components/droppable-slot/index.cjs"
|
|
93
98
|
},
|
|
99
|
+
"./edit-filters": {
|
|
100
|
+
"types": "./components/edit-filters/index.d.ts",
|
|
101
|
+
"import": "./components/edit-filters/index.js",
|
|
102
|
+
"require": "./components/edit-filters/index.cjs"
|
|
103
|
+
},
|
|
94
104
|
"./edit-item": {
|
|
95
105
|
"types": "./components/edit-item/index.d.ts",
|
|
96
106
|
"import": "./components/edit-item/index.js",
|
|
@@ -166,21 +176,11 @@
|
|
|
166
176
|
"import": "./components/edit-option-text-field/index.js",
|
|
167
177
|
"require": "./components/edit-option-text-field/index.cjs"
|
|
168
178
|
},
|
|
169
|
-
"./filter-data-item-picker": {
|
|
170
|
-
"types": "./components/filter-data-item-picker/index.d.ts",
|
|
171
|
-
"import": "./components/filter-data-item-picker/index.js",
|
|
172
|
-
"require": "./components/filter-data-item-picker/index.cjs"
|
|
173
|
-
},
|
|
174
179
|
"./filter-expression-picker": {
|
|
175
180
|
"types": "./components/filter-expression-picker/index.d.ts",
|
|
176
181
|
"import": "./components/filter-expression-picker/index.js",
|
|
177
182
|
"require": "./components/filter-expression-picker/index.cjs"
|
|
178
183
|
},
|
|
179
|
-
"./filter-group": {
|
|
180
|
-
"types": "./components/filter-group/index.d.ts",
|
|
181
|
-
"import": "./components/filter-group/index.js",
|
|
182
|
-
"require": "./components/filter-group/index.cjs"
|
|
183
|
-
},
|
|
184
184
|
"./filter-item": {
|
|
185
185
|
"types": "./components/filter-item/index.d.ts",
|
|
186
186
|
"import": "./components/filter-item/index.js",
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
"@lit/localize": "^0.12.2",
|
|
289
289
|
"@lit/task": "^1.0.1",
|
|
290
290
|
"@luzmo/icons": "^1.0.1-alpha.25",
|
|
291
|
-
"@luzmo/lucero": "^1.0.1-alpha.
|
|
291
|
+
"@luzmo/lucero": "^1.0.1-alpha.40",
|
|
292
292
|
"colorjs.io": "^0.5.2",
|
|
293
293
|
"lit": "^3.3.1"
|
|
294
294
|
},
|
package/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'>;
|
|
@@ -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[];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'luzmo-filter-group',
|
|
6
|
-
standalone: true,
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
-
template: `<luzmo-filter-group
|
|
9
|
-
[attr.language]="language"
|
|
10
|
-
[attr.content-language]="contentLanguage"
|
|
11
|
-
[attr.filters]="filters"
|
|
12
|
-
[attr.size]="size"
|
|
13
|
-
[attr.disabled]="disabled"
|
|
14
|
-
[attr.autofocus]="autofocus"
|
|
15
|
-
[attr.tabIndex]="tabIndex"
|
|
16
|
-
>
|
|
17
|
-
<ng-content></ng-content>
|
|
18
|
-
</luzmo-filter-group>`
|
|
19
|
-
})
|
|
20
|
-
export class FilterGroupComponent {
|
|
21
|
-
@Input() language?: string;
|
|
22
|
-
@Input() contentLanguage?: string;
|
|
23
|
-
@Input() filters?: any[];
|
|
24
|
-
@Input() size?: any;
|
|
25
|
-
@Input() disabled?: any;
|
|
26
|
-
@Input() autofocus?: any;
|
|
27
|
-
@Input() tabIndex?: any;
|
|
28
|
-
|
|
29
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import type { DataItem } from '../types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class FilterDataItemPickerComponent {
|
|
5
|
-
language?: string;
|
|
6
|
-
contentLanguage?: string;
|
|
7
|
-
hasLabel?: boolean;
|
|
8
|
-
label?: string;
|
|
9
|
-
icons?: 'none' | 'only-menu' | 'all';
|
|
10
|
-
allowEmpty?: boolean;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
dataItemId?: string;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
invalid?: boolean;
|
|
15
|
-
datasetsDataItems?: {
|
|
16
|
-
id: string;
|
|
17
|
-
name: {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
};
|
|
20
|
-
columns: DataItem[];
|
|
21
|
-
formulas: DataItem[];
|
|
22
|
-
}[];
|
|
23
|
-
size?: any;
|
|
24
|
-
disabled?: any;
|
|
25
|
-
autofocus?: any;
|
|
26
|
-
tabIndex?: any;
|
|
27
|
-
dataItemSelected: EventEmitter<CustomEvent<any>>;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterDataItemPickerComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterDataItemPickerComponent, "luzmo-filter-data-item-picker", never, { "language": { "alias": "language"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "hasLabel": { "alias": "hasLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "dataItemId": { "alias": "dataItemId"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "datasetsDataItems": { "alias": "datasetsDataItems"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "dataItemSelected": "dataItemSelected"; }, never, ["*"], true, never>;
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class FilterGroupComponent {
|
|
3
|
-
language?: string;
|
|
4
|
-
contentLanguage?: string;
|
|
5
|
-
filters?: any[];
|
|
6
|
-
size?: any;
|
|
7
|
-
disabled?: any;
|
|
8
|
-
autofocus?: any;
|
|
9
|
-
tabIndex?: any;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterGroupComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterGroupComponent, "luzmo-filter-group", never, { "language": { "alias": "language"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
12
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class FilterGroupComponent {
|
|
4
|
-
language;
|
|
5
|
-
contentLanguage;
|
|
6
|
-
filters;
|
|
7
|
-
size;
|
|
8
|
-
disabled;
|
|
9
|
-
autofocus;
|
|
10
|
-
tabIndex;
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: FilterGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.3", type: FilterGroupComponent, isStandalone: true, selector: "luzmo-filter-group", inputs: { language: "language", contentLanguage: "contentLanguage", filters: "filters", size: "size", disabled: "disabled", autofocus: "autofocus", tabIndex: "tabIndex" }, ngImport: i0, template: `<luzmo-filter-group
|
|
13
|
-
[attr.language]="language"
|
|
14
|
-
[attr.content-language]="contentLanguage"
|
|
15
|
-
[attr.filters]="filters"
|
|
16
|
-
[attr.size]="size"
|
|
17
|
-
[attr.disabled]="disabled"
|
|
18
|
-
[attr.autofocus]="autofocus"
|
|
19
|
-
[attr.tabIndex]="tabIndex"
|
|
20
|
-
>
|
|
21
|
-
<ng-content></ng-content>
|
|
22
|
-
</luzmo-filter-group>`, isInline: true, dependencies: [{ kind: "component", type: FilterGroupComponent, selector: "luzmo-filter-group", inputs: ["language", "contentLanguage", "filters", "size", "disabled", "autofocus", "tabIndex"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23
|
-
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: FilterGroupComponent, decorators: [{
|
|
25
|
-
type: Component,
|
|
26
|
-
args: [{
|
|
27
|
-
selector: 'luzmo-filter-group',
|
|
28
|
-
standalone: true,
|
|
29
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30
|
-
template: `<luzmo-filter-group
|
|
31
|
-
[attr.language]="language"
|
|
32
|
-
[attr.content-language]="contentLanguage"
|
|
33
|
-
[attr.filters]="filters"
|
|
34
|
-
[attr.size]="size"
|
|
35
|
-
[attr.disabled]="disabled"
|
|
36
|
-
[attr.autofocus]="autofocus"
|
|
37
|
-
[attr.tabIndex]="tabIndex"
|
|
38
|
-
>
|
|
39
|
-
<ng-content></ng-content>
|
|
40
|
-
</luzmo-filter-group>`
|
|
41
|
-
}]
|
|
42
|
-
}], propDecorators: { language: [{
|
|
43
|
-
type: Input
|
|
44
|
-
}], contentLanguage: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}], filters: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}], size: [{
|
|
49
|
-
type: Input
|
|
50
|
-
}], disabled: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}], autofocus: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], tabIndex: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}] } });
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/field-label");require("@luzmo/lucero/icon");require("@luzmo/lucero/menu");require("@luzmo/lucero/picker");const m=require("lit"),f=require("@lit/localize"),p=require("@luzmo/lucero/utils"),I=require("../set-locale-BRRalqne.cjs"),r=require("lit/decorators.js"),y=require("../calculate-data-item-icon-DtVGbet3.cjs"),z=require("../localize-C4zNlrwK.cjs"),D=":host{--var: blue}:host{font-family:var(--luzmo-font-family)}";var b=Object.defineProperty,L=Object.getOwnPropertyDescriptor,o=(h,e,a,s)=>{for(var i=s>1?void 0:s?L(e,a):e,t=h.length-1,l;t>=0;t--)(l=h[t])&&(i=(s?l(e,a,i):l(i))||i);return s&&i&&b(e,a,i),i};exports.LuzmoFilterDataItemPicker=class extends p.SizedMixin(p.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.hasLabel=!1,this.icons="only-menu",this.allowEmpty=!1,this.placeholder="",this.dataItemId="",this.loading=!1,this.invalid=!1,this.datasetsDataItems=[]}static get styles(){return[m.unsafeCSS(D)]}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("data-item-selected",{bubbles:!0,composed:!0,cancelable:!0,detail:{dataItem:this._dataItemSelected}}))}setDataItem(e){const a=e?.detail;for(const s of this.datasetsDataItems){const i=s.columns,t=s.formulas,l=i.find(c=>c.id===a),n=c=>{this._dataItemSelected=c,this.dataItemId=a,this._sendChangeEvent()};if(l){n(l);break}const d=t.find(c=>c.id===a);if(d){n(d);break}}}_findDataItemInDatasetsDataItems(e){for(const a of this.datasetsDataItems){const s=a.columns,i=a.formulas,t=s?.find(n=>n.id===e);if(t){this._dataItemSelected=t,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(t.type??"")&&(this._dataItemSelected.lowestLevel=t.lowestLevel);break}const l=i?.find(n=>n.id===e);if(l){this._dataItemSelected=l,this._dataItemSelected.isFormula=!0,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(l.type??"")&&(this._dataItemSelected.lowestLevel=l.lowestLevel);break}}}willUpdate(e){const a=e.has("language"),s=e.has("dataItemId"),i=e.has("datasetsDataItems");if(a&&this.language!==I.getLocale()&&([...I.targetLocales].includes(this.language??"en")||this.language==="en")&&I.setLocale(this.language),(s||i)&&(this._findDataItemInDatasetsDataItems(this.dataItemId),!this._dataItemSelected&&!this.allowEmpty&&!this.loading)){for(const t of this.datasetsDataItems)if(t?.columns?.length>0){this._dataItemSelected=t.columns[0];break}else if(t?.formulas?.length>0){this._dataItemSelected=t.formulas[0];break}this.dataItemId=this._dataItemSelected?.id,this._sendChangeEvent()}}render(){let e=m.html``;for(const i of this.datasetsDataItems??[]){const t=i?.columns??[],l=i?.formulas??[],n=u=>{const g=m.html`
|
|
21
|
-
<luzmo-icon
|
|
22
|
-
slot="icon"
|
|
23
|
-
.size=${this.size}
|
|
24
|
-
.icon=${y.calculateDataItemIcon(u,this.size)}
|
|
25
|
-
>
|
|
26
|
-
</luzmo-icon>
|
|
27
|
-
`;return m.html`<luzmo-menu-item value=${u.id}>
|
|
28
|
-
${this.icons==="none"?"":g}
|
|
29
|
-
${z.localize(u?.name??{},this.contentLanguage)}
|
|
30
|
-
</luzmo-menu-item>`},d=t.map(u=>n(u)),c=l.map(u=>n(u));e=m.html`${d} ${c}`}const a=m.html`${e}`,s=m.html`
|
|
31
|
-
<luzmo-field-label for="data-item" size=${this.size}
|
|
32
|
-
>${this.label??f.msg("Select...")}
|
|
33
|
-
</luzmo-field-label>
|
|
34
|
-
`;return m.html` ${this.hasLabel?s:""}
|
|
35
|
-
<luzmo-picker
|
|
36
|
-
label=${this.placeholder??f.msg("Select...")}
|
|
37
|
-
id="data-item"
|
|
38
|
-
size=${this.size}
|
|
39
|
-
.icons=${!this.icons||["none","only-menu"].includes(this.icons)?"none":void 0}
|
|
40
|
-
variant="highlight"
|
|
41
|
-
.pending=${this.loading}
|
|
42
|
-
.invalid=${this.invalid}
|
|
43
|
-
value=${this.dataItemId}
|
|
44
|
-
@change=${this.setDataItem}
|
|
45
|
-
>
|
|
46
|
-
${a}
|
|
47
|
-
</luzmo-picker>`}};o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"language",2);o([r.property({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"contentLanguage",2);o([r.property({type:Boolean,attribute:"has-label",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"hasLabel",2);o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"label",2);o([r.property({type:String,reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"icons",2);o([r.property({type:Boolean,attribute:"allow-empty",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"allowEmpty",2);o([r.property({type:String,attribute:"placeholder",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"placeholder",2);o([r.property({type:String,attribute:"data-item-id",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"dataItemId",2);o([r.property({type:Boolean,attribute:"loading",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"loading",2);o([r.property({type:Boolean,attribute:"invalid",reflect:!0})],exports.LuzmoFilterDataItemPicker.prototype,"invalid",2);o([r.property({type:Array,reflect:!1})],exports.LuzmoFilterDataItemPicker.prototype,"datasetsDataItems",2);exports.LuzmoFilterDataItemPicker=o([f.localized()],exports.LuzmoFilterDataItemPicker);customElements.get("luzmo-filter-data-item-picker")||customElements.define("luzmo-filter-data-item-picker",exports.LuzmoFilterDataItemPicker);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { LuzmoFilterDataItemPicker } from './filter-data-item-picker';
|
|
2
|
-
declare global {
|
|
3
|
-
interface HTMLElementTagNameMap {
|
|
4
|
-
'luzmo-filter-data-item-picker': LuzmoFilterDataItemPicker;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export { LuzmoFilterDataItemPicker } from './filter-data-item-picker';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { LuzmoElement } from '@luzmo/lucero/utils';
|
|
2
|
-
import { CSSResultArray, TemplateResult } from 'lit';
|
|
3
|
-
declare const LuzmoFilterGroup_base: typeof LuzmoElement & {
|
|
4
|
-
new (...args: any[]): import("@luzmo/lucero").SizedElementInterface;
|
|
5
|
-
prototype: import("@luzmo/lucero").SizedElementInterface;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* @element luzmo-filter-group
|
|
9
|
-
*/
|
|
10
|
-
export declare class LuzmoFilterGroup extends LuzmoFilterGroup_base {
|
|
11
|
-
static get styles(): CSSResultArray;
|
|
12
|
-
/**
|
|
13
|
-
* The language of the settings interface
|
|
14
|
-
*/
|
|
15
|
-
language: string;
|
|
16
|
-
/**
|
|
17
|
-
* The language to use for locale-aware formatting and labels
|
|
18
|
-
*/
|
|
19
|
-
contentLanguage: string;
|
|
20
|
-
/**
|
|
21
|
-
* The filters to display in the group
|
|
22
|
-
*/
|
|
23
|
-
filters: any[];
|
|
24
|
-
protected render(): TemplateResult;
|
|
25
|
-
}
|
|
26
|
-
export {};
|