@luzmo/ngx-analytics-components-kit 1.0.3-beta.11

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 (106) hide show
  1. package/README.md +40 -0
  2. package/esm/components/ai-chat-empty-state.d.ts +39 -0
  3. package/esm/components/ai-chat-empty-state.js +99 -0
  4. package/esm/components/ai-chat.d.ts +121 -0
  5. package/esm/components/ai-chat.js +369 -0
  6. package/esm/components/ai-interaction-textarea.d.ts +110 -0
  7. package/esm/components/ai-interaction-textarea.js +297 -0
  8. package/esm/components/data-field-level.d.ts +42 -0
  9. package/esm/components/data-field-level.js +115 -0
  10. package/esm/components/data-field-panel.d.ts +84 -0
  11. package/esm/components/data-field-panel.js +260 -0
  12. package/esm/components/data-field.d.ts +41 -0
  13. package/esm/components/data-field.js +108 -0
  14. package/esm/components/data-fields-select.d.ts +70 -0
  15. package/esm/components/data-fields-select.js +187 -0
  16. package/esm/components/dataset-icon.d.ts +34 -0
  17. package/esm/components/dataset-icon.js +86 -0
  18. package/esm/components/dataset-selector-list.d.ts +53 -0
  19. package/esm/components/dataset-selector-list.js +147 -0
  20. package/esm/components/dataset-selector-row.d.ts +56 -0
  21. package/esm/components/dataset-selector-row.js +153 -0
  22. package/esm/components/display-settings-binning.d.ts +32 -0
  23. package/esm/components/display-settings-binning.js +74 -0
  24. package/esm/components/display-settings-datetime.d.ts +36 -0
  25. package/esm/components/display-settings-datetime.js +89 -0
  26. package/esm/components/display-settings-grand-totals.d.ts +33 -0
  27. package/esm/components/display-settings-grand-totals.js +75 -0
  28. package/esm/components/display-settings-numeric.d.ts +41 -0
  29. package/esm/components/display-settings-numeric.js +99 -0
  30. package/esm/components/display-settings-period-over-period.d.ts +38 -0
  31. package/esm/components/display-settings-period-over-period.js +89 -0
  32. package/esm/components/display-settings.d.ts +69 -0
  33. package/esm/components/display-settings.js +182 -0
  34. package/esm/components/filter-expression-picker.d.ts +54 -0
  35. package/esm/components/filter-expression-picker.js +146 -0
  36. package/esm/components/filter-item.d.ts +44 -0
  37. package/esm/components/filter-item.js +130 -0
  38. package/esm/components/filter-parameter-picker.d.ts +31 -0
  39. package/esm/components/filter-parameter-picker.js +78 -0
  40. package/esm/components/filter-value-picker-datetime.d.ts +34 -0
  41. package/esm/components/filter-value-picker-datetime.js +90 -0
  42. package/esm/components/filter-value-picker-hierarchy.d.ts +40 -0
  43. package/esm/components/filter-value-picker-hierarchy.js +114 -0
  44. package/esm/components/filter-value-picker-numeric.d.ts +40 -0
  45. package/esm/components/filter-value-picker-numeric.js +114 -0
  46. package/esm/components/filter-value-picker.d.ts +44 -0
  47. package/esm/components/filter-value-picker.js +130 -0
  48. package/esm/components/filters.d.ts +49 -0
  49. package/esm/components/filters.js +139 -0
  50. package/esm/components/formula-editor.d.ts +39 -0
  51. package/esm/components/formula-editor.js +95 -0
  52. package/esm/components/formula-field.d.ts +31 -0
  53. package/esm/components/formula-field.js +69 -0
  54. package/esm/components/formula.d.ts +31 -0
  55. package/esm/components/formula.js +75 -0
  56. package/esm/components/item-grid-item-actions-menu.d.ts +34 -0
  57. package/esm/components/item-grid-item-actions-menu.js +82 -0
  58. package/esm/components/item-grid.d.ts +80 -0
  59. package/esm/components/item-grid.js +245 -0
  60. package/esm/components/item-option-action-button-group.d.ts +30 -0
  61. package/esm/components/item-option-action-button-group.js +63 -0
  62. package/esm/components/item-option-color-palette-picker.d.ts +30 -0
  63. package/esm/components/item-option-color-palette-picker.js +63 -0
  64. package/esm/components/item-option-color-picker.d.ts +35 -0
  65. package/esm/components/item-option-color-picker.js +102 -0
  66. package/esm/components/item-option-color-range.d.ts +30 -0
  67. package/esm/components/item-option-color-range.js +63 -0
  68. package/esm/components/item-option-multi-language-field.d.ts +31 -0
  69. package/esm/components/item-option-multi-language-field.js +74 -0
  70. package/esm/components/item-option-number-field.d.ts +32 -0
  71. package/esm/components/item-option-number-field.js +81 -0
  72. package/esm/components/item-option-panel.d.ts +54 -0
  73. package/esm/components/item-option-panel.js +155 -0
  74. package/esm/components/item-option-picker.d.ts +30 -0
  75. package/esm/components/item-option-picker.js +63 -0
  76. package/esm/components/item-option-position-picker.d.ts +30 -0
  77. package/esm/components/item-option-position-picker.js +63 -0
  78. package/esm/components/item-option-positions-number-field.d.ts +32 -0
  79. package/esm/components/item-option-positions-number-field.js +81 -0
  80. package/esm/components/item-option-radio-button-group.d.ts +31 -0
  81. package/esm/components/item-option-radio-button-group.js +74 -0
  82. package/esm/components/item-option-slider.d.ts +36 -0
  83. package/esm/components/item-option-slider.js +109 -0
  84. package/esm/components/item-option-switch.d.ts +34 -0
  85. package/esm/components/item-option-switch.js +81 -0
  86. package/esm/components/item-option-text-field.d.ts +31 -0
  87. package/esm/components/item-option-text-field.js +74 -0
  88. package/esm/components/item-option.d.ts +48 -0
  89. package/esm/components/item-option.js +161 -0
  90. package/esm/components/item-slot-drop-panel.d.ts +78 -0
  91. package/esm/components/item-slot-drop-panel.js +233 -0
  92. package/esm/components/item-slot-drop.d.ts +63 -0
  93. package/esm/components/item-slot-drop.js +201 -0
  94. package/esm/components/item-slot-picker-panel.d.ts +95 -0
  95. package/esm/components/item-slot-picker-panel.js +301 -0
  96. package/esm/components/item-slot-picker.d.ts +80 -0
  97. package/esm/components/item-slot-picker.js +235 -0
  98. package/esm/components/slot-menu-list.d.ts +37 -0
  99. package/esm/components/slot-menu-list.js +97 -0
  100. package/esm/components/slot-menu.d.ts +85 -0
  101. package/esm/components/slot-menu.js +271 -0
  102. package/esm/components/viz-item-menu.d.ts +40 -0
  103. package/esm/components/viz-item-menu.js +103 -0
  104. package/esm/index.d.ts +105 -0
  105. package/esm/index.js +209 -0
  106. package/package.json +40 -0
@@ -0,0 +1,114 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/filter-value-picker-numeric';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-filter-value-picker-numeric>
7
+ */
8
+ export class LuzmoFilterValuePickerNumeric {
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
+ /** The API URL of the databroker */
19
+ apiUrl;
20
+ /** The auth key of the databroker */
21
+ authKey;
22
+ /** The auth token of the databroker */
23
+ authToken;
24
+ /** The cache time of the databroker */
25
+ cacheTime;
26
+ /** The language to use for locale-aware formatting and labels */
27
+ contentLanguage;
28
+ /** The filter used to retrieve the value */
29
+ filter;
30
+ luzmoFilterValueChanged = output({ alias: 'luzmoFilterValueChanged' });
31
+ constructor() {
32
+ this.bindEvents();
33
+ this.destroyRef.onDestroy(() => {
34
+ for (const cleanup of this.listenerCleanup) {
35
+ cleanup();
36
+ }
37
+ });
38
+ }
39
+ ngOnChanges(changes) {
40
+ for (const key of Object.keys(changes)) {
41
+ switch (key) {
42
+ case 'apiUrl':
43
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
44
+ break;
45
+ case 'authKey':
46
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
47
+ break;
48
+ case 'authToken':
49
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
50
+ break;
51
+ case 'cacheTime':
52
+ this.setHostProperty('cacheTime', changes['cacheTime'].currentValue);
53
+ break;
54
+ case 'contentLanguage':
55
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
56
+ break;
57
+ case 'filter':
58
+ this.setHostProperty('filter', changes['filter'].currentValue);
59
+ break;
60
+ default:
61
+ break;
62
+ }
63
+ }
64
+ }
65
+ /**
66
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
67
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
68
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
69
+ * undefined / null by clearing their bindings.
70
+ */
71
+ setHostProperty(key, value) {
72
+ this.renderer.setProperty(this.host, key, value);
73
+ }
74
+ bindEvents() {
75
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-filter-value-changed', (event) => {
76
+ const typed = event;
77
+ this.luzmoFilterValueChanged.emit(typed);
78
+ }));
79
+ }
80
+ static ɵfac = function LuzmoFilterValuePickerNumeric_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilterValuePickerNumeric)(); };
81
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterValuePickerNumeric, selectors: [["luzmo-filter-value-picker-numeric"]], inputs: { apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", cacheTime: "cacheTime", contentLanguage: "contentLanguage", filter: "filter" }, outputs: { luzmoFilterValueChanged: "luzmoFilterValueChanged" }, exportAs: ["luzmoFilterValuePickerNumeric"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterValuePickerNumeric_Template(rf, ctx) { if (rf & 1) {
82
+ i0.ɵɵprojectionDef();
83
+ i0.ɵɵprojection(0);
84
+ } }, encapsulation: 2, changeDetection: 0 });
85
+ }
86
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoFilterValuePickerNumeric, [{
87
+ type: Component,
88
+ args: [{
89
+ selector: 'luzmo-filter-value-picker-numeric',
90
+ exportAs: 'luzmoFilterValuePickerNumeric',
91
+ standalone: true,
92
+ changeDetection: ChangeDetectionStrategy.OnPush,
93
+ template: '<ng-content />'
94
+ }]
95
+ }], () => [], { apiUrl: [{
96
+ type: Input,
97
+ args: [{ alias: 'apiUrl' }]
98
+ }], authKey: [{
99
+ type: Input,
100
+ args: [{ alias: 'authKey' }]
101
+ }], authToken: [{
102
+ type: Input,
103
+ args: [{ alias: 'authToken' }]
104
+ }], cacheTime: [{
105
+ type: Input,
106
+ args: [{ alias: 'cacheTime' }]
107
+ }], contentLanguage: [{
108
+ type: Input,
109
+ args: [{ alias: 'contentLanguage' }]
110
+ }], filter: [{
111
+ type: Input,
112
+ args: [{ alias: 'filter' }]
113
+ }], luzmoFilterValueChanged: [{ type: i0.Output, args: ["luzmoFilterValueChanged"] }] }); })();
114
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterValuePickerNumeric, { className: "LuzmoFilterValuePickerNumeric", filePath: "components/filter-value-picker-numeric.ts", lineNumber: 15 }); })();
@@ -0,0 +1,44 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/filter-value-picker';
3
+ import type { LuzmoFilterValuePicker as LuzmoFilterValuePickerHostElement } from '@luzmo/analytics-components-kit/filter-value-picker';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoFilterValuePicker implements OnChanges {
6
+ private readonly elementRef;
7
+ private readonly renderer;
8
+ private readonly destroyRef;
9
+ private readonly host;
10
+ private readonly listenerCleanup;
11
+ /** The underlying custom element instance. Use to call imperative methods. */
12
+ get nativeElement(): LuzmoFilterValuePickerHostElement;
13
+ /** The API URL of the databroker */
14
+ apiUrl?: string;
15
+ /** The auth key of the databroker */
16
+ authKey?: string;
17
+ /** The auth token of the databroker */
18
+ authToken?: string;
19
+ /** The cache time of the databroker */
20
+ cacheTime?: number;
21
+ /** The language to use for locale-aware formatting and labels */
22
+ contentLanguage?: string;
23
+ /** The time zone to use for the date picker */
24
+ timeZone?: string;
25
+ /** The type value picker to render */
26
+ valueType?: 'hierarchy' | 'numeric' | 'datetime';
27
+ /** The filter for which to render the value picker */
28
+ filter?: any;
29
+ readonly luzmoFilterValueChanged: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
30
+ constructor();
31
+ ngOnChanges(changes: SimpleChanges): void;
32
+ /**
33
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
34
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
35
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
36
+ * undefined / null by clearing their bindings.
37
+ */
38
+ private setHostProperty;
39
+ private bindEvents;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFilterValuePicker, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilterValuePicker, "luzmo-filter-value-picker", ["luzmoFilterValuePicker"], { "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "cacheTime": { "alias": "cacheTime"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "timeZone": { "alias": "timeZone"; "required": false; }; "valueType": { "alias": "valueType"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; }, { "luzmoFilterValueChanged": "luzmoFilterValueChanged"; }, never, ["*"], true, never>;
42
+ }
43
+ /** The underlying custom element type for LuzmoFilterValuePicker */
44
+ export type LuzmoFilterValuePickerElement = LuzmoFilterValuePickerHostElement;
@@ -0,0 +1,130 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/filter-value-picker';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-filter-value-picker>
7
+ */
8
+ export class LuzmoFilterValuePicker {
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
+ /** The API URL of the databroker */
19
+ apiUrl;
20
+ /** The auth key of the databroker */
21
+ authKey;
22
+ /** The auth token of the databroker */
23
+ authToken;
24
+ /** The cache time of the databroker */
25
+ cacheTime;
26
+ /** The language to use for locale-aware formatting and labels */
27
+ contentLanguage;
28
+ /** The time zone to use for the date picker */
29
+ timeZone;
30
+ /** The type value picker to render */
31
+ valueType;
32
+ /** The filter for which to render the value picker */
33
+ filter;
34
+ luzmoFilterValueChanged = output({ alias: 'luzmoFilterValueChanged' });
35
+ constructor() {
36
+ this.bindEvents();
37
+ this.destroyRef.onDestroy(() => {
38
+ for (const cleanup of this.listenerCleanup) {
39
+ cleanup();
40
+ }
41
+ });
42
+ }
43
+ ngOnChanges(changes) {
44
+ for (const key of Object.keys(changes)) {
45
+ switch (key) {
46
+ case 'apiUrl':
47
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
48
+ break;
49
+ case 'authKey':
50
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
51
+ break;
52
+ case 'authToken':
53
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
54
+ break;
55
+ case 'cacheTime':
56
+ this.setHostProperty('cacheTime', changes['cacheTime'].currentValue);
57
+ break;
58
+ case 'contentLanguage':
59
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
60
+ break;
61
+ case 'timeZone':
62
+ this.setHostProperty('timeZone', changes['timeZone'].currentValue);
63
+ break;
64
+ case 'valueType':
65
+ this.setHostProperty('valueType', changes['valueType'].currentValue);
66
+ break;
67
+ case 'filter':
68
+ this.setHostProperty('filter', changes['filter'].currentValue);
69
+ break;
70
+ default:
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ /**
76
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
77
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
78
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
79
+ * undefined / null by clearing their bindings.
80
+ */
81
+ setHostProperty(key, value) {
82
+ this.renderer.setProperty(this.host, key, value);
83
+ }
84
+ bindEvents() {
85
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-filter-value-changed', (event) => {
86
+ const typed = event;
87
+ this.luzmoFilterValueChanged.emit(typed);
88
+ }));
89
+ }
90
+ static ɵfac = function LuzmoFilterValuePicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilterValuePicker)(); };
91
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterValuePicker, selectors: [["luzmo-filter-value-picker"]], inputs: { apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", cacheTime: "cacheTime", contentLanguage: "contentLanguage", timeZone: "timeZone", valueType: "valueType", filter: "filter" }, outputs: { luzmoFilterValueChanged: "luzmoFilterValueChanged" }, exportAs: ["luzmoFilterValuePicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterValuePicker_Template(rf, ctx) { if (rf & 1) {
92
+ i0.ɵɵprojectionDef();
93
+ i0.ɵɵprojection(0);
94
+ } }, encapsulation: 2, changeDetection: 0 });
95
+ }
96
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoFilterValuePicker, [{
97
+ type: Component,
98
+ args: [{
99
+ selector: 'luzmo-filter-value-picker',
100
+ exportAs: 'luzmoFilterValuePicker',
101
+ standalone: true,
102
+ changeDetection: ChangeDetectionStrategy.OnPush,
103
+ template: '<ng-content />'
104
+ }]
105
+ }], () => [], { apiUrl: [{
106
+ type: Input,
107
+ args: [{ alias: 'apiUrl' }]
108
+ }], authKey: [{
109
+ type: Input,
110
+ args: [{ alias: 'authKey' }]
111
+ }], authToken: [{
112
+ type: Input,
113
+ args: [{ alias: 'authToken' }]
114
+ }], cacheTime: [{
115
+ type: Input,
116
+ args: [{ alias: 'cacheTime' }]
117
+ }], contentLanguage: [{
118
+ type: Input,
119
+ args: [{ alias: 'contentLanguage' }]
120
+ }], timeZone: [{
121
+ type: Input,
122
+ args: [{ alias: 'timeZone' }]
123
+ }], valueType: [{
124
+ type: Input,
125
+ args: [{ alias: 'valueType' }]
126
+ }], filter: [{
127
+ type: Input,
128
+ args: [{ alias: 'filter' }]
129
+ }], luzmoFilterValueChanged: [{ type: i0.Output, args: ["luzmoFilterValueChanged"] }] }); })();
130
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterValuePicker, { className: "LuzmoFilterValuePicker", filePath: "components/filter-value-picker.ts", lineNumber: 15 }); })();
@@ -0,0 +1,49 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/filters';
3
+ import type { LuzmoFilters as LuzmoFiltersHostElement, FiltersChangedEventDetail } from '@luzmo/analytics-components-kit/filters';
4
+ import type { ItemFilterGroup } from '@luzmo/dashboard-contents-types';
5
+ import * as i0 from "@angular/core";
6
+ export type { FilterCondition, FilterGroup, FiltersChangedEventDetail } from '@luzmo/analytics-components-kit/filters';
7
+ export declare class LuzmoFilters implements OnChanges {
8
+ private readonly elementRef;
9
+ private readonly renderer;
10
+ private readonly destroyRef;
11
+ private readonly host;
12
+ private readonly listenerCleanup;
13
+ /** The underlying custom element instance. Use to call imperative methods. */
14
+ get nativeElement(): LuzmoFiltersHostElement;
15
+ /** The API URL of the databroker */
16
+ apiUrl?: string;
17
+ /** The auth key of the databroker */
18
+ authKey?: string;
19
+ /** The auth token of the databroker */
20
+ authToken?: string;
21
+ /** The cache time of the databroker */
22
+ cacheTime?: number;
23
+ /** The language to use for locale-aware formatting and labels */
24
+ contentLanguage?: string;
25
+ /** The time zone to use for the date picker */
26
+ timeZone?: string;
27
+ /** The dataset ids to fetch columns & formulas */
28
+ datasetIds?: string[];
29
+ /** The filter groups to display */
30
+ filters?: ItemFilterGroup[];
31
+ /** Debounce time in milliseconds for the filters-changed event */
32
+ debounce?: number;
33
+ /** Announces that the filters have changed */
34
+ readonly luzmoFiltersChanged: import("@angular/core").OutputEmitterRef<CustomEvent<FiltersChangedEventDetail>>;
35
+ constructor();
36
+ ngOnChanges(changes: SimpleChanges): void;
37
+ /**
38
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
39
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
40
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
41
+ * undefined / null by clearing their bindings.
42
+ */
43
+ private setHostProperty;
44
+ private bindEvents;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFilters, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilters, "luzmo-filters", ["luzmoFilters"], { "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "cacheTime": { "alias": "cacheTime"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "timeZone": { "alias": "timeZone"; "required": false; }; "datasetIds": { "alias": "datasetIds"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; }, { "luzmoFiltersChanged": "luzmoFiltersChanged"; }, never, ["*"], true, never>;
47
+ }
48
+ /** The underlying custom element type for LuzmoFilters */
49
+ export type LuzmoFiltersElement = LuzmoFiltersHostElement;
@@ -0,0 +1,139 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/filters';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-filters>
7
+ */
8
+ export class LuzmoFilters {
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
+ /** The API URL of the databroker */
19
+ apiUrl;
20
+ /** The auth key of the databroker */
21
+ authKey;
22
+ /** The auth token of the databroker */
23
+ authToken;
24
+ /** The cache time of the databroker */
25
+ cacheTime;
26
+ /** The language to use for locale-aware formatting and labels */
27
+ contentLanguage;
28
+ /** The time zone to use for the date picker */
29
+ timeZone;
30
+ /** The dataset ids to fetch columns & formulas */
31
+ datasetIds;
32
+ /** The filter groups to display */
33
+ filters;
34
+ /** Debounce time in milliseconds for the filters-changed event */
35
+ debounce;
36
+ /** Announces that the filters have changed */
37
+ luzmoFiltersChanged = output({ alias: 'luzmoFiltersChanged' });
38
+ constructor() {
39
+ this.bindEvents();
40
+ this.destroyRef.onDestroy(() => {
41
+ for (const cleanup of this.listenerCleanup) {
42
+ cleanup();
43
+ }
44
+ });
45
+ }
46
+ ngOnChanges(changes) {
47
+ for (const key of Object.keys(changes)) {
48
+ switch (key) {
49
+ case 'apiUrl':
50
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
51
+ break;
52
+ case 'authKey':
53
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
54
+ break;
55
+ case 'authToken':
56
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
57
+ break;
58
+ case 'cacheTime':
59
+ this.setHostProperty('cacheTime', changes['cacheTime'].currentValue);
60
+ break;
61
+ case 'contentLanguage':
62
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
63
+ break;
64
+ case 'timeZone':
65
+ this.setHostProperty('timeZone', changes['timeZone'].currentValue);
66
+ break;
67
+ case 'datasetIds':
68
+ this.setHostProperty('datasetIds', changes['datasetIds'].currentValue);
69
+ break;
70
+ case 'filters':
71
+ this.setHostProperty('filters', changes['filters'].currentValue);
72
+ break;
73
+ case 'debounce':
74
+ this.setHostProperty('debounce', changes['debounce'].currentValue);
75
+ break;
76
+ default:
77
+ break;
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
83
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
84
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
85
+ * undefined / null by clearing their bindings.
86
+ */
87
+ setHostProperty(key, value) {
88
+ this.renderer.setProperty(this.host, key, value);
89
+ }
90
+ bindEvents() {
91
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-filters-changed', (event) => {
92
+ const typed = event;
93
+ this.luzmoFiltersChanged.emit(typed);
94
+ }));
95
+ }
96
+ static ɵfac = function LuzmoFilters_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilters)(); };
97
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilters, selectors: [["luzmo-filters"]], inputs: { apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", cacheTime: "cacheTime", contentLanguage: "contentLanguage", timeZone: "timeZone", datasetIds: "datasetIds", filters: "filters", debounce: "debounce" }, outputs: { luzmoFiltersChanged: "luzmoFiltersChanged" }, exportAs: ["luzmoFilters"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilters_Template(rf, ctx) { if (rf & 1) {
98
+ i0.ɵɵprojectionDef();
99
+ i0.ɵɵprojection(0);
100
+ } }, encapsulation: 2, changeDetection: 0 });
101
+ }
102
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoFilters, [{
103
+ type: Component,
104
+ args: [{
105
+ selector: 'luzmo-filters',
106
+ exportAs: 'luzmoFilters',
107
+ standalone: true,
108
+ changeDetection: ChangeDetectionStrategy.OnPush,
109
+ template: '<ng-content />'
110
+ }]
111
+ }], () => [], { apiUrl: [{
112
+ type: Input,
113
+ args: [{ alias: 'apiUrl' }]
114
+ }], authKey: [{
115
+ type: Input,
116
+ args: [{ alias: 'authKey' }]
117
+ }], authToken: [{
118
+ type: Input,
119
+ args: [{ alias: 'authToken' }]
120
+ }], cacheTime: [{
121
+ type: Input,
122
+ args: [{ alias: 'cacheTime' }]
123
+ }], contentLanguage: [{
124
+ type: Input,
125
+ args: [{ alias: 'contentLanguage' }]
126
+ }], timeZone: [{
127
+ type: Input,
128
+ args: [{ alias: 'timeZone' }]
129
+ }], datasetIds: [{
130
+ type: Input,
131
+ args: [{ alias: 'datasetIds' }]
132
+ }], filters: [{
133
+ type: Input,
134
+ args: [{ alias: 'filters' }]
135
+ }], debounce: [{
136
+ type: Input,
137
+ args: [{ alias: 'debounce' }]
138
+ }], luzmoFiltersChanged: [{ type: i0.Output, args: ["luzmoFiltersChanged"] }] }); })();
139
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilters, { className: "LuzmoFilters", filePath: "components/filters.ts", lineNumber: 17 }); })();
@@ -0,0 +1,39 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/formula-editor';
3
+ import type { LuzmoFormulaEditor as LuzmoFormulaEditorHostElement } from '@luzmo/analytics-components-kit/formula-editor';
4
+ import type { ValidityChangedEventDetail } from '@luzmo/analytics-components-kit/types';
5
+ import * as i0 from "@angular/core";
6
+ export type { LuzmoFormulaCodeMirror } from '@luzmo/analytics-components-kit/formula-editor';
7
+ export declare class LuzmoFormulaEditor implements OnChanges {
8
+ private readonly elementRef;
9
+ private readonly renderer;
10
+ private readonly destroyRef;
11
+ private readonly host;
12
+ private readonly listenerCleanup;
13
+ /** The underlying custom element instance. Use to call imperative methods. */
14
+ get nativeElement(): LuzmoFormulaEditorHostElement;
15
+ /** Whether the expression is validated as a column or a formula. */
16
+ expressionResource?: 'column' | 'formula';
17
+ /** How function / aggregation explanations are surfaced: as hover `tooltip`s on the list items (default), or in a dedicated `description` region. With `tooltip` there is no description, so the remaining lists spread across the full width. */
18
+ explanationDisplay?: 'tooltip' | 'description';
19
+ /** Fired when expression validity changes. */
20
+ readonly luzmoValidityChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ValidityChangedEventDetail>>;
21
+ /** Fired (debounced) when the expression changes. */
22
+ readonly luzmoExpressionChanged: import("@angular/core").OutputEmitterRef<unknown>;
23
+ /** Fired when fetching datasets by id fails. */
24
+ readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<unknown>;
25
+ constructor();
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ /**
28
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
29
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
30
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
31
+ * undefined / null by clearing their bindings.
32
+ */
33
+ private setHostProperty;
34
+ private bindEvents;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFormulaEditor, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormulaEditor, "luzmo-formula-editor", ["luzmoFormulaEditor"], { "expressionResource": { "alias": "expressionResource"; "required": false; }; "explanationDisplay": { "alias": "explanationDisplay"; "required": false; }; }, { "luzmoValidityChanged": "luzmoValidityChanged"; "luzmoExpressionChanged": "luzmoExpressionChanged"; "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
37
+ }
38
+ /** The underlying custom element type for LuzmoFormulaEditor */
39
+ export type LuzmoFormulaEditorElement = LuzmoFormulaEditorHostElement;
@@ -0,0 +1,95 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/formula-editor';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-formula-editor>
7
+ */
8
+ export class LuzmoFormulaEditor {
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
+ /** Whether the expression is validated as a column or a formula. */
19
+ expressionResource;
20
+ /** How function / aggregation explanations are surfaced: as hover `tooltip`s on the list items (default), or in a dedicated `description` region. With `tooltip` there is no description, so the remaining lists spread across the full width. */
21
+ explanationDisplay;
22
+ /** Fired when expression validity changes. */
23
+ luzmoValidityChanged = output({ alias: 'luzmoValidityChanged' });
24
+ /** Fired (debounced) when the expression changes. */
25
+ luzmoExpressionChanged = output({ alias: 'luzmoExpressionChanged' });
26
+ /** Fired when fetching datasets by id fails. */
27
+ luzmoDatasetsError = output({ alias: 'luzmoDatasetsError' });
28
+ constructor() {
29
+ this.bindEvents();
30
+ this.destroyRef.onDestroy(() => {
31
+ for (const cleanup of this.listenerCleanup) {
32
+ cleanup();
33
+ }
34
+ });
35
+ }
36
+ ngOnChanges(changes) {
37
+ for (const key of Object.keys(changes)) {
38
+ switch (key) {
39
+ case 'expressionResource':
40
+ this.setHostProperty('expressionResource', changes['expressionResource'].currentValue);
41
+ break;
42
+ case 'explanationDisplay':
43
+ this.setHostProperty('explanationDisplay', changes['explanationDisplay'].currentValue);
44
+ break;
45
+ default:
46
+ break;
47
+ }
48
+ }
49
+ }
50
+ /**
51
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
52
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
53
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
54
+ * undefined / null by clearing their bindings.
55
+ */
56
+ setHostProperty(key, value) {
57
+ this.renderer.setProperty(this.host, key, value);
58
+ }
59
+ bindEvents() {
60
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-validity-changed', (event) => {
61
+ const typed = event;
62
+ this.luzmoValidityChanged.emit(typed);
63
+ }));
64
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-expression-changed', (event) => {
65
+ const typed = event;
66
+ this.luzmoExpressionChanged.emit(typed);
67
+ }));
68
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-datasets-error', (event) => {
69
+ const typed = event;
70
+ this.luzmoDatasetsError.emit(typed);
71
+ }));
72
+ }
73
+ static ɵfac = function LuzmoFormulaEditor_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFormulaEditor)(); };
74
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormulaEditor, selectors: [["luzmo-formula-editor"]], inputs: { expressionResource: "expressionResource", explanationDisplay: "explanationDisplay" }, outputs: { luzmoValidityChanged: "luzmoValidityChanged", luzmoExpressionChanged: "luzmoExpressionChanged", luzmoDatasetsError: "luzmoDatasetsError" }, exportAs: ["luzmoFormulaEditor"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFormulaEditor_Template(rf, ctx) { if (rf & 1) {
75
+ i0.ɵɵprojectionDef();
76
+ i0.ɵɵprojection(0);
77
+ } }, encapsulation: 2, changeDetection: 0 });
78
+ }
79
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoFormulaEditor, [{
80
+ type: Component,
81
+ args: [{
82
+ selector: 'luzmo-formula-editor',
83
+ exportAs: 'luzmoFormulaEditor',
84
+ standalone: true,
85
+ changeDetection: ChangeDetectionStrategy.OnPush,
86
+ template: '<ng-content />'
87
+ }]
88
+ }], () => [], { expressionResource: [{
89
+ type: Input,
90
+ args: [{ alias: 'expressionResource' }]
91
+ }], explanationDisplay: [{
92
+ type: Input,
93
+ args: [{ alias: 'explanationDisplay' }]
94
+ }], luzmoValidityChanged: [{ type: i0.Output, args: ["luzmoValidityChanged"] }], luzmoExpressionChanged: [{ type: i0.Output, args: ["luzmoExpressionChanged"] }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
95
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFormulaEditor, { className: "LuzmoFormulaEditor", filePath: "components/formula-editor.ts", lineNumber: 17 }); })();
@@ -0,0 +1,31 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/analytics-components-kit/formula-field';
3
+ import type { LuzmoFormulaField as LuzmoFormulaFieldHostElement } from '@luzmo/analytics-components-kit/formula-field';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoFormulaField implements OnChanges {
6
+ private readonly elementRef;
7
+ private readonly renderer;
8
+ private readonly destroyRef;
9
+ private readonly host;
10
+ private readonly listenerCleanup;
11
+ /** The underlying custom element instance. Use to call imperative methods. */
12
+ get nativeElement(): LuzmoFormulaFieldHostElement;
13
+ /** Fired (debounced) when the expression changes (only when not readonly). */
14
+ readonly luzmoExpressionChanged: import("@angular/core").OutputEmitterRef<unknown>;
15
+ /** Fired when fetching datasets by id fails. */
16
+ readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<unknown>;
17
+ constructor();
18
+ ngOnChanges(changes: SimpleChanges): void;
19
+ /**
20
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
21
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
22
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
23
+ * undefined / null by clearing their bindings.
24
+ */
25
+ private setHostProperty;
26
+ private bindEvents;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFormulaField, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormulaField, "luzmo-formula-field", ["luzmoFormulaField"], {}, { "luzmoExpressionChanged": "luzmoExpressionChanged"; "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
29
+ }
30
+ /** The underlying custom element type for LuzmoFormulaField */
31
+ export type LuzmoFormulaFieldElement = LuzmoFormulaFieldHostElement;