@luzmo/ngx-analytics-components-kit 1.0.6 → 1.0.7

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.
@@ -19,6 +19,8 @@ export declare class LuzmoDataFieldsSelect implements OnChanges {
19
19
  label?: string;
20
20
  /** Where to show icons */
21
21
  icons?: 'none' | 'menu-only' | 'all';
22
+ /** Whether datetime and hierarchy columns expand into selectable sublevels. Turn this off in contexts that address the column as a whole, so the column stays selectable by its own id. */
23
+ levels?: 'on' | 'off';
22
24
  /** Allow no selection. If true, the picker will not show a value when no item is selected. Else if no value is provided it will pick the first item. */
23
25
  allowEmpty?: boolean;
24
26
  /** The placeholder text for the picker is no value selected. If allowEmpty is true, this will be used as the label. */
@@ -66,7 +68,7 @@ export declare class LuzmoDataFieldsSelect implements OnChanges {
66
68
  private setHostProperty;
67
69
  private bindEvents;
68
70
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoDataFieldsSelect, never>;
69
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoDataFieldsSelect, "luzmo-data-fields-select", ["luzmoDataFieldsSelect"], { "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selects": { "alias": "selects"; "required": false; }; "value": { "alias": "value"; "required": false; }; "retrieving": { "alias": "retrieving"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "search": { "alias": "search"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "datasetsDataFields": { "alias": "datasetsDataFields"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoDataFieldsSelected": "luzmoDataFieldsSelected"; }, never, ["*"], true, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoDataFieldsSelect, "luzmo-data-fields-select", ["luzmoDataFieldsSelect"], { "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "levels": { "alias": "levels"; "required": false; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selects": { "alias": "selects"; "required": false; }; "value": { "alias": "value"; "required": false; }; "retrieving": { "alias": "retrieving"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "search": { "alias": "search"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "datasetsDataFields": { "alias": "datasetsDataFields"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoDataFieldsSelected": "luzmoDataFieldsSelected"; }, never, ["*"], true, never>;
70
72
  static ngAcceptInputType_allowEmpty: unknown;
71
73
  static ngAcceptInputType_retrieving: unknown;
72
74
  static ngAcceptInputType_invalid: unknown;
@@ -21,6 +21,8 @@ export class LuzmoDataFieldsSelect {
21
21
  label;
22
22
  /** Where to show icons */
23
23
  icons;
24
+ /** Whether datetime and hierarchy columns expand into selectable sublevels. Turn this off in contexts that address the column as a whole, so the column stays selectable by its own id. */
25
+ levels;
24
26
  /** Allow no selection. If true, the picker will not show a value when no item is selected. Else if no value is provided it will pick the first item. */
25
27
  allowEmpty;
26
28
  /** The placeholder text for the picker is no value selected. If allowEmpty is true, this will be used as the label. */
@@ -75,6 +77,9 @@ export class LuzmoDataFieldsSelect {
75
77
  case 'icons':
76
78
  this.setHostProperty('icons', changes['icons'].currentValue);
77
79
  break;
80
+ case 'levels':
81
+ this.setHostProperty('levels', changes['levels'].currentValue);
82
+ break;
78
83
  case 'allowEmpty':
79
84
  this.setHostProperty('allowEmpty', changes['allowEmpty'].currentValue);
80
85
  break;
@@ -144,7 +149,7 @@ export class LuzmoDataFieldsSelect {
144
149
  }));
145
150
  }
146
151
  static ɵfac = function LuzmoDataFieldsSelect_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoDataFieldsSelect)(); };
147
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoDataFieldsSelect, selectors: [["luzmo-data-fields-select"]], inputs: { contentLanguage: "contentLanguage", label: "label", icons: "icons", allowEmpty: [2, "allowEmpty", "allowEmpty", booleanAttribute], placeholder: "placeholder", selects: "selects", value: "value", retrieving: [2, "retrieving", "retrieving", booleanAttribute], invalid: [2, "invalid", "invalid", booleanAttribute], clearable: [2, "clearable", "clearable", booleanAttribute], pending: [2, "pending", "pending", booleanAttribute], disabled: [2, "disabled", "disabled", booleanAttribute], search: "search", placement: "placement", datasetsDataFields: "datasetsDataFields", language: "language", size: "size", autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoDataFieldsSelected: "luzmoDataFieldsSelected" }, exportAs: ["luzmoDataFieldsSelect"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoDataFieldsSelect_Template(rf, ctx) { if (rf & 1) {
152
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoDataFieldsSelect, selectors: [["luzmo-data-fields-select"]], inputs: { contentLanguage: "contentLanguage", label: "label", icons: "icons", levels: "levels", allowEmpty: [2, "allowEmpty", "allowEmpty", booleanAttribute], placeholder: "placeholder", selects: "selects", value: "value", retrieving: [2, "retrieving", "retrieving", booleanAttribute], invalid: [2, "invalid", "invalid", booleanAttribute], clearable: [2, "clearable", "clearable", booleanAttribute], pending: [2, "pending", "pending", booleanAttribute], disabled: [2, "disabled", "disabled", booleanAttribute], search: "search", placement: "placement", datasetsDataFields: "datasetsDataFields", language: "language", size: "size", autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoDataFieldsSelected: "luzmoDataFieldsSelected" }, exportAs: ["luzmoDataFieldsSelect"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoDataFieldsSelect_Template(rf, ctx) { if (rf & 1) {
148
153
  i0.ɵɵprojectionDef();
149
154
  i0.ɵɵprojection(0);
150
155
  } }, encapsulation: 2 });
@@ -167,6 +172,9 @@ export class LuzmoDataFieldsSelect {
167
172
  }], icons: [{
168
173
  type: Input,
169
174
  args: [{ alias: 'icons' }]
175
+ }], levels: [{
176
+ type: Input,
177
+ args: [{ alias: 'levels' }]
170
178
  }], allowEmpty: [{
171
179
  type: Input,
172
180
  args: [{ alias: 'allowEmpty', transform: booleanAttribute }]
@@ -1,6 +1,7 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/filter-item';
3
3
  import type { LuzmoFilterItem as LuzmoFilterItemHostElement } from '@luzmo/analytics-components-kit/filter-item';
4
+ import type { FilterParameter } from '@luzmo/analytics-components-kit/filters';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class LuzmoFilterItem implements OnChanges {
6
7
  private readonly elementRef;
@@ -26,6 +27,10 @@ export declare class LuzmoFilterItem implements OnChanges {
26
27
  datasetIds?: string[];
27
28
  /** The filter to display */
28
29
  filter?: any;
30
+ /** Whether parameter-backed filter values can be created and selected. */
31
+ allowParameters?: boolean;
32
+ /** Consumer-owned parameter definitions available for selection. */
33
+ parameters?: FilterParameter[];
29
34
  /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
30
35
  language?: string;
31
36
  /** The size of the element */
@@ -49,7 +54,8 @@ export declare class LuzmoFilterItem implements OnChanges {
49
54
  private setHostProperty;
50
55
  private bindEvents;
51
56
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFilterItem, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilterItem, "luzmo-filter-item", ["luzmoFilterItem"], { "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; }; "filter": { "alias": "filter"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoFilterChanged": "luzmoFilterChanged"; }, never, ["*"], true, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilterItem, "luzmo-filter-item", ["luzmoFilterItem"], { "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; }; "filter": { "alias": "filter"; "required": false; }; "allowParameters": { "alias": "allowParameters"; "required": false; }; "parameters": { "alias": "parameters"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoFilterChanged": "luzmoFilterChanged"; }, never, ["*"], true, never>;
58
+ static ngAcceptInputType_allowParameters: unknown;
53
59
  static ngAcceptInputType_disabled: unknown;
54
60
  static ngAcceptInputType_autofocus: unknown;
55
61
  }
@@ -31,6 +31,10 @@ export class LuzmoFilterItem {
31
31
  datasetIds;
32
32
  /** The filter to display */
33
33
  filter;
34
+ /** Whether parameter-backed filter values can be created and selected. */
35
+ allowParameters;
36
+ /** Consumer-owned parameter definitions available for selection. */
37
+ parameters;
34
38
  /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
35
39
  language;
36
40
  /** The size of the element */
@@ -78,6 +82,12 @@ export class LuzmoFilterItem {
78
82
  case 'filter':
79
83
  this.setHostProperty('filter', changes['filter'].currentValue);
80
84
  break;
85
+ case 'allowParameters':
86
+ this.setHostProperty('allowParameters', changes['allowParameters'].currentValue);
87
+ break;
88
+ case 'parameters':
89
+ this.setHostProperty('parameters', changes['parameters'].currentValue);
90
+ break;
81
91
  case 'language':
82
92
  this.setHostProperty('language', changes['language'].currentValue);
83
93
  break;
@@ -114,7 +124,7 @@ export class LuzmoFilterItem {
114
124
  }));
115
125
  }
116
126
  static ɵfac = function LuzmoFilterItem_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilterItem)(); };
117
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterItem, selectors: [["luzmo-filter-item"]], inputs: { apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", cacheTime: "cacheTime", contentLanguage: "contentLanguage", timeZone: "timeZone", datasetIds: "datasetIds", filter: "filter", language: "language", size: "size", disabled: [2, "disabled", "disabled", booleanAttribute], autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoFilterChanged: "luzmoFilterChanged" }, exportAs: ["luzmoFilterItem"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterItem_Template(rf, ctx) { if (rf & 1) {
127
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterItem, selectors: [["luzmo-filter-item"]], inputs: { apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", cacheTime: "cacheTime", contentLanguage: "contentLanguage", timeZone: "timeZone", datasetIds: "datasetIds", filter: "filter", allowParameters: [2, "allowParameters", "allowParameters", booleanAttribute], parameters: "parameters", language: "language", size: "size", disabled: [2, "disabled", "disabled", booleanAttribute], autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoFilterChanged: "luzmoFilterChanged" }, exportAs: ["luzmoFilterItem"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterItem_Template(rf, ctx) { if (rf & 1) {
118
128
  i0.ɵɵprojectionDef();
119
129
  i0.ɵɵprojection(0);
120
130
  } }, encapsulation: 2 });
@@ -152,6 +162,12 @@ export class LuzmoFilterItem {
152
162
  }], filter: [{
153
163
  type: Input,
154
164
  args: [{ alias: 'filter' }]
165
+ }], allowParameters: [{
166
+ type: Input,
167
+ args: [{ alias: 'allowParameters', transform: booleanAttribute }]
168
+ }], parameters: [{
169
+ type: Input,
170
+ args: [{ alias: 'parameters' }]
155
171
  }], language: [{
156
172
  type: Input,
157
173
  args: [{ alias: 'language' }]
@@ -168,4 +184,4 @@ export class LuzmoFilterItem {
168
184
  type: Input,
169
185
  args: [{ alias: 'tabIndex' }]
170
186
  }], luzmoFilterChanged: [{ type: i0.Output, args: ["luzmoFilterChanged"] }] }); })();
171
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterItem, { className: "LuzmoFilterItem", filePath: "components/filter-item.ts", lineNumber: 15 }); })();
187
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterItem, { className: "LuzmoFilterItem", filePath: "components/filter-item.ts", lineNumber: 16 }); })();
@@ -1,7 +1,10 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/filter-parameter-picker';
3
- import type { LuzmoFilterParameterPicker as LuzmoFilterParameterPickerHostElement } from '@luzmo/analytics-components-kit/filter-parameter-picker';
3
+ import type { LuzmoFilterParameterPicker as LuzmoFilterParameterPickerHostElement, FilterParameterPickerEventDetail } from '@luzmo/analytics-components-kit/filter-parameter-picker';
4
+ import type { FilterParameterType } from '@luzmo/analytics-components-kit/filters';
5
+ import type { ItemFilterParameterDefinition } from '@luzmo/dashboard-contents-types';
4
6
  import * as i0 from "@angular/core";
7
+ export type { FilterParameterPickerEventDetail } from '@luzmo/analytics-components-kit/filter-parameter-picker';
5
8
  export declare class LuzmoFilterParameterPicker implements OnChanges {
6
9
  private readonly elementRef;
7
10
  private readonly renderer;
@@ -10,18 +13,30 @@ export declare class LuzmoFilterParameterPicker implements OnChanges {
10
13
  private readonly listenerCleanup;
11
14
  /** The underlying custom element instance. Use to call imperative methods. */
12
15
  get nativeElement(): LuzmoFilterParameterPickerHostElement;
13
- /** The language of the settings interface */
16
+ /** Parameter definitions available for selection. */
17
+ parameters?: ItemFilterParameterDefinition[];
18
+ /** Parameter types compatible with the active field and expression. */
19
+ allowedTypes?: FilterParameterType[];
20
+ /** The parameter currently attached to the filter. */
21
+ selectedParameter?: ItemFilterParameterDefinition;
22
+ /** The current literal filter value used as the default for a new parameter. */
23
+ currentValue?: unknown;
24
+ /** Whether parameter selection is disabled. */
25
+ disabled?: boolean;
26
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
14
27
  language?: string;
15
- /** The language to use for locale-aware formatting and labels */
16
- contentLanguage?: string;
17
28
  /** The size of the element */
18
29
  size?: 's' | 'm' | 'l' | 'xl';
19
- /** Disable this control. It will not receive focus or events */
20
- disabled?: boolean;
21
30
  /** When this control is rendered, focus it automatically */
22
31
  autofocus?: boolean;
23
32
  /** The tab index to apply to this control. See general documentation about the tabindex HTML property */
24
33
  tabIndex?: number;
34
+ /** Fired when a parameter is selected. */
35
+ readonly luzmoParameterSelected: import("@angular/core").OutputEmitterRef<CustomEvent<FilterParameterPickerEventDetail>>;
36
+ /** Fired when a parameter is created. */
37
+ readonly luzmoParameterCreated: import("@angular/core").OutputEmitterRef<CustomEvent<FilterParameterPickerEventDetail>>;
38
+ /** Fired when a parameter is detached from the filter. */
39
+ readonly luzmoParameterRemoved: import("@angular/core").OutputEmitterRef<CustomEvent<FilterParameterPickerEventDetail>>;
25
40
  constructor();
26
41
  ngOnChanges(changes: SimpleChanges): void;
27
42
  /**
@@ -33,7 +48,7 @@ export declare class LuzmoFilterParameterPicker implements OnChanges {
33
48
  private setHostProperty;
34
49
  private bindEvents;
35
50
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFilterParameterPicker, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilterParameterPicker, "luzmo-filter-parameter-picker", ["luzmoFilterParameterPicker"], { "language": { "alias": "language"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "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>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFilterParameterPicker, "luzmo-filter-parameter-picker", ["luzmoFilterParameterPicker"], { "parameters": { "alias": "parameters"; "required": false; }; "allowedTypes": { "alias": "allowedTypes"; "required": false; }; "selectedParameter": { "alias": "selectedParameter"; "required": false; }; "currentValue": { "alias": "currentValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoParameterSelected": "luzmoParameterSelected"; "luzmoParameterCreated": "luzmoParameterCreated"; "luzmoParameterRemoved": "luzmoParameterRemoved"; }, never, ["*"], true, never>;
37
52
  static ngAcceptInputType_disabled: unknown;
38
53
  static ngAcceptInputType_autofocus: unknown;
39
54
  }
@@ -1,4 +1,4 @@
1
- import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/filter-parameter-picker';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -15,18 +15,30 @@ export class LuzmoFilterParameterPicker {
15
15
  get nativeElement() {
16
16
  return this.host;
17
17
  }
18
- /** The language of the settings interface */
18
+ /** Parameter definitions available for selection. */
19
+ parameters;
20
+ /** Parameter types compatible with the active field and expression. */
21
+ allowedTypes;
22
+ /** The parameter currently attached to the filter. */
23
+ selectedParameter;
24
+ /** The current literal filter value used as the default for a new parameter. */
25
+ currentValue;
26
+ /** Whether parameter selection is disabled. */
27
+ disabled;
28
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
19
29
  language;
20
- /** The language to use for locale-aware formatting and labels */
21
- contentLanguage;
22
30
  /** The size of the element */
23
31
  size;
24
- /** Disable this control. It will not receive focus or events */
25
- disabled;
26
32
  /** When this control is rendered, focus it automatically */
27
33
  autofocus;
28
34
  /** The tab index to apply to this control. See general documentation about the tabindex HTML property */
29
35
  tabIndex;
36
+ /** Fired when a parameter is selected. */
37
+ luzmoParameterSelected = output({ alias: 'luzmoParameterSelected' });
38
+ /** Fired when a parameter is created. */
39
+ luzmoParameterCreated = output({ alias: 'luzmoParameterCreated' });
40
+ /** Fired when a parameter is detached from the filter. */
41
+ luzmoParameterRemoved = output({ alias: 'luzmoParameterRemoved' });
30
42
  constructor() {
31
43
  this.bindEvents();
32
44
  this.destroyRef.onDestroy(() => {
@@ -38,18 +50,27 @@ export class LuzmoFilterParameterPicker {
38
50
  ngOnChanges(changes) {
39
51
  for (const key of Object.keys(changes)) {
40
52
  switch (key) {
41
- case 'language':
42
- this.setHostProperty('language', changes['language'].currentValue);
53
+ case 'parameters':
54
+ this.setHostProperty('parameters', changes['parameters'].currentValue);
43
55
  break;
44
- case 'contentLanguage':
45
- this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
56
+ case 'allowedTypes':
57
+ this.setHostProperty('allowedTypes', changes['allowedTypes'].currentValue);
46
58
  break;
47
- case 'size':
48
- this.setHostProperty('size', changes['size'].currentValue);
59
+ case 'selectedParameter':
60
+ this.setHostProperty('selectedParameter', changes['selectedParameter'].currentValue);
61
+ break;
62
+ case 'currentValue':
63
+ this.setHostProperty('currentValue', changes['currentValue'].currentValue);
49
64
  break;
50
65
  case 'disabled':
51
66
  this.setHostProperty('disabled', changes['disabled'].currentValue);
52
67
  break;
68
+ case 'language':
69
+ this.setHostProperty('language', changes['language'].currentValue);
70
+ break;
71
+ case 'size':
72
+ this.setHostProperty('size', changes['size'].currentValue);
73
+ break;
53
74
  case 'autofocus':
54
75
  this.setHostProperty('autofocus', changes['autofocus'].currentValue);
55
76
  break;
@@ -71,10 +92,21 @@ export class LuzmoFilterParameterPicker {
71
92
  this.renderer.setProperty(this.host, key, value);
72
93
  }
73
94
  bindEvents() {
74
- // No custom events for this wrapper.
95
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-parameter-selected', (event) => {
96
+ const typed = event;
97
+ this.luzmoParameterSelected.emit(typed);
98
+ }));
99
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-parameter-created', (event) => {
100
+ const typed = event;
101
+ this.luzmoParameterCreated.emit(typed);
102
+ }));
103
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-parameter-removed', (event) => {
104
+ const typed = event;
105
+ this.luzmoParameterRemoved.emit(typed);
106
+ }));
75
107
  }
76
108
  static ɵfac = function LuzmoFilterParameterPicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilterParameterPicker)(); };
77
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterParameterPicker, selectors: [["luzmo-filter-parameter-picker"]], inputs: { language: "language", contentLanguage: "contentLanguage", size: "size", disabled: [2, "disabled", "disabled", booleanAttribute], autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, exportAs: ["luzmoFilterParameterPicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterParameterPicker_Template(rf, ctx) { if (rf & 1) {
109
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFilterParameterPicker, selectors: [["luzmo-filter-parameter-picker"]], inputs: { parameters: "parameters", allowedTypes: "allowedTypes", selectedParameter: "selectedParameter", currentValue: "currentValue", disabled: [2, "disabled", "disabled", booleanAttribute], language: "language", size: "size", autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoParameterSelected: "luzmoParameterSelected", luzmoParameterCreated: "luzmoParameterCreated", luzmoParameterRemoved: "luzmoParameterRemoved" }, exportAs: ["luzmoFilterParameterPicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilterParameterPicker_Template(rf, ctx) { if (rf & 1) {
78
110
  i0.ɵɵprojectionDef();
79
111
  i0.ɵɵprojection(0);
80
112
  } }, encapsulation: 2 });
@@ -88,23 +120,32 @@ export class LuzmoFilterParameterPicker {
88
120
  changeDetection: ChangeDetectionStrategy.OnPush,
89
121
  template: '<ng-content />'
90
122
  }]
91
- }], () => [], { language: [{
123
+ }], () => [], { parameters: [{
92
124
  type: Input,
93
- args: [{ alias: 'language' }]
94
- }], contentLanguage: [{
125
+ args: [{ alias: 'parameters' }]
126
+ }], allowedTypes: [{
95
127
  type: Input,
96
- args: [{ alias: 'contentLanguage' }]
97
- }], size: [{
128
+ args: [{ alias: 'allowedTypes' }]
129
+ }], selectedParameter: [{
98
130
  type: Input,
99
- args: [{ alias: 'size' }]
131
+ args: [{ alias: 'selectedParameter' }]
132
+ }], currentValue: [{
133
+ type: Input,
134
+ args: [{ alias: 'currentValue' }]
100
135
  }], disabled: [{
101
136
  type: Input,
102
137
  args: [{ alias: 'disabled', transform: booleanAttribute }]
138
+ }], language: [{
139
+ type: Input,
140
+ args: [{ alias: 'language' }]
141
+ }], size: [{
142
+ type: Input,
143
+ args: [{ alias: 'size' }]
103
144
  }], autofocus: [{
104
145
  type: Input,
105
146
  args: [{ alias: 'autofocus', transform: booleanAttribute }]
106
147
  }], tabIndex: [{
107
148
  type: Input,
108
149
  args: [{ alias: 'tabIndex' }]
109
- }] }); })();
110
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterParameterPicker, { className: "LuzmoFilterParameterPicker", filePath: "components/filter-parameter-picker.ts", lineNumber: 15 }); })();
150
+ }], luzmoParameterSelected: [{ type: i0.Output, args: ["luzmoParameterSelected"] }], luzmoParameterCreated: [{ type: i0.Output, args: ["luzmoParameterCreated"] }], luzmoParameterRemoved: [{ type: i0.Output, args: ["luzmoParameterRemoved"] }] }); })();
151
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilterParameterPicker, { className: "LuzmoFilterParameterPicker", filePath: "components/filter-parameter-picker.ts", lineNumber: 18 }); })();
@@ -1,9 +1,8 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
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';
3
+ import type { LuzmoFilters as LuzmoFiltersHostElement, FilterParameter, FiltersChangedEventDetail, FiltersFormat, FiltersInput } from '@luzmo/analytics-components-kit/filters';
5
4
  import * as i0 from "@angular/core";
6
- export type { FilterCondition, FilterGroup, FiltersChangedEventDetail } from '@luzmo/analytics-components-kit/filters';
5
+ export type { CleanFilter, CleanFilterClauseGroup, CleanFilterGroup, CleanRetrievedFilterGroup, DashboardFilterOutput, DetectedFiltersFormat, FilterClause, FilterCondition, FilterGroup, FilterParameter, FilterParameterEventDetail, FilterParameterType, FiltersChangedEventDetail, FiltersFormat, FiltersInput, FiltersOutput, ItemFilterOutput, TransformFiltersOptions } from '@luzmo/analytics-components-kit/filters';
7
6
  export declare class LuzmoFilters implements OnChanges {
8
7
  private readonly elementRef;
9
8
  private readonly renderer;
@@ -26,8 +25,14 @@ export declare class LuzmoFilters implements OnChanges {
26
25
  timeZone?: string;
27
26
  /** The dataset ids to fetch columns & formulas */
28
27
  datasetIds?: string[];
29
- /** The filter groups to display */
30
- filters?: ItemFilterGroup[];
28
+ /** The filter groups to display. Accepts both halves of the public `ItemFilterOutput` / `DashboardFilterOutput` unions: canonical `ItemFilterGroup[]` and clean clause groups with flattened leaves. Nested `and` / `or` groups are preserved either way. */
29
+ filters?: FiltersInput;
30
+ /** Output format for the `luzmo-filters-changed` event. `canonical` emits `ItemFilterGroup[]`; `clean` emits the clean clause groups that aligned hosts consume. A tree that cannot be represented cleanly falls back to canonical output, and the event says which format it carries. */
31
+ format?: FiltersFormat;
32
+ /** Whether parameter-backed filter values can be created and selected. */
33
+ allowParameters?: boolean;
34
+ /** Consumer-owned parameter definitions available to filter rows. */
35
+ parameters?: FilterParameter[];
31
36
  /** Debounce time in milliseconds for the filters-changed event */
32
37
  debounce?: number;
33
38
  /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
@@ -40,8 +45,16 @@ export declare class LuzmoFilters implements OnChanges {
40
45
  autofocus?: boolean;
41
46
  /** The tab index to apply to this control. See general documentation about the tabindex HTML property */
42
47
  tabIndex?: number;
43
- /** Announces that the filters have changed */
48
+ /** Announces that the filters have changed, carrying the emitted groups and the format they are in */
44
49
  readonly luzmoFiltersChanged: import("@angular/core").OutputEmitterRef<CustomEvent<FiltersChangedEventDetail>>;
50
+ /** Announces that a parameter was created and added to `parameters`. */
51
+ readonly luzmoParameterCreated: import("@angular/core").OutputEmitterRef<CustomEvent<{
52
+ parameter: FilterParameter;
53
+ }>>;
54
+ /** Announces that a parameter was detached from a filter. */
55
+ readonly luzmoParameterRemoved: import("@angular/core").OutputEmitterRef<CustomEvent<{
56
+ parameter: FilterParameter;
57
+ }>>;
45
58
  constructor();
46
59
  ngOnChanges(changes: SimpleChanges): void;
47
60
  /**
@@ -53,7 +66,8 @@ export declare class LuzmoFilters implements OnChanges {
53
66
  private setHostProperty;
54
67
  private bindEvents;
55
68
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFilters, never>;
56
- 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; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoFiltersChanged": "luzmoFiltersChanged"; }, never, ["*"], true, never>;
69
+ 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; }; "format": { "alias": "format"; "required": false; }; "allowParameters": { "alias": "allowParameters"; "required": false; }; "parameters": { "alias": "parameters"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "language": { "alias": "language"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoFiltersChanged": "luzmoFiltersChanged"; "luzmoParameterCreated": "luzmoParameterCreated"; "luzmoParameterRemoved": "luzmoParameterRemoved"; }, never, ["*"], true, never>;
70
+ static ngAcceptInputType_allowParameters: unknown;
57
71
  static ngAcceptInputType_disabled: unknown;
58
72
  static ngAcceptInputType_autofocus: unknown;
59
73
  }
@@ -29,8 +29,14 @@ export class LuzmoFilters {
29
29
  timeZone;
30
30
  /** The dataset ids to fetch columns & formulas */
31
31
  datasetIds;
32
- /** The filter groups to display */
32
+ /** The filter groups to display. Accepts both halves of the public `ItemFilterOutput` / `DashboardFilterOutput` unions: canonical `ItemFilterGroup[]` and clean clause groups with flattened leaves. Nested `and` / `or` groups are preserved either way. */
33
33
  filters;
34
+ /** Output format for the `luzmo-filters-changed` event. `canonical` emits `ItemFilterGroup[]`; `clean` emits the clean clause groups that aligned hosts consume. A tree that cannot be represented cleanly falls back to canonical output, and the event says which format it carries. */
35
+ format;
36
+ /** Whether parameter-backed filter values can be created and selected. */
37
+ allowParameters;
38
+ /** Consumer-owned parameter definitions available to filter rows. */
39
+ parameters;
34
40
  /** Debounce time in milliseconds for the filters-changed event */
35
41
  debounce;
36
42
  /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
@@ -43,8 +49,12 @@ export class LuzmoFilters {
43
49
  autofocus;
44
50
  /** The tab index to apply to this control. See general documentation about the tabindex HTML property */
45
51
  tabIndex;
46
- /** Announces that the filters have changed */
52
+ /** Announces that the filters have changed, carrying the emitted groups and the format they are in */
47
53
  luzmoFiltersChanged = output({ alias: 'luzmoFiltersChanged' });
54
+ /** Announces that a parameter was created and added to `parameters`. */
55
+ luzmoParameterCreated = output({ alias: 'luzmoParameterCreated' });
56
+ /** Announces that a parameter was detached from a filter. */
57
+ luzmoParameterRemoved = output({ alias: 'luzmoParameterRemoved' });
48
58
  constructor() {
49
59
  this.bindEvents();
50
60
  this.destroyRef.onDestroy(() => {
@@ -80,6 +90,15 @@ export class LuzmoFilters {
80
90
  case 'filters':
81
91
  this.setHostProperty('filters', changes['filters'].currentValue);
82
92
  break;
93
+ case 'format':
94
+ this.setHostProperty('format', changes['format'].currentValue);
95
+ break;
96
+ case 'allowParameters':
97
+ this.setHostProperty('allowParameters', changes['allowParameters'].currentValue);
98
+ break;
99
+ case 'parameters':
100
+ this.setHostProperty('parameters', changes['parameters'].currentValue);
101
+ break;
83
102
  case 'debounce':
84
103
  this.setHostProperty('debounce', changes['debounce'].currentValue);
85
104
  break;
@@ -117,9 +136,17 @@ export class LuzmoFilters {
117
136
  const typed = event;
118
137
  this.luzmoFiltersChanged.emit(typed);
119
138
  }));
139
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-parameter-created', (event) => {
140
+ const typed = event;
141
+ this.luzmoParameterCreated.emit(typed);
142
+ }));
143
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-parameter-removed', (event) => {
144
+ const typed = event;
145
+ this.luzmoParameterRemoved.emit(typed);
146
+ }));
120
147
  }
121
148
  static ɵfac = function LuzmoFilters_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFilters)(); };
122
- 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", language: "language", size: "size", disabled: [2, "disabled", "disabled", booleanAttribute], autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoFiltersChanged: "luzmoFiltersChanged" }, exportAs: ["luzmoFilters"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilters_Template(rf, ctx) { if (rf & 1) {
149
+ 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", format: "format", allowParameters: [2, "allowParameters", "allowParameters", booleanAttribute], parameters: "parameters", debounce: "debounce", language: "language", size: "size", disabled: [2, "disabled", "disabled", booleanAttribute], autofocus: [2, "autofocus", "autofocus", booleanAttribute], tabIndex: "tabIndex" }, outputs: { luzmoFiltersChanged: "luzmoFiltersChanged", luzmoParameterCreated: "luzmoParameterCreated", luzmoParameterRemoved: "luzmoParameterRemoved" }, exportAs: ["luzmoFilters"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFilters_Template(rf, ctx) { if (rf & 1) {
123
150
  i0.ɵɵprojectionDef();
124
151
  i0.ɵɵprojection(0);
125
152
  } }, encapsulation: 2 });
@@ -157,6 +184,15 @@ export class LuzmoFilters {
157
184
  }], filters: [{
158
185
  type: Input,
159
186
  args: [{ alias: 'filters' }]
187
+ }], format: [{
188
+ type: Input,
189
+ args: [{ alias: 'format' }]
190
+ }], allowParameters: [{
191
+ type: Input,
192
+ args: [{ alias: 'allowParameters', transform: booleanAttribute }]
193
+ }], parameters: [{
194
+ type: Input,
195
+ args: [{ alias: 'parameters' }]
160
196
  }], debounce: [{
161
197
  type: Input,
162
198
  args: [{ alias: 'debounce' }]
@@ -175,5 +211,5 @@ export class LuzmoFilters {
175
211
  }], tabIndex: [{
176
212
  type: Input,
177
213
  args: [{ alias: 'tabIndex' }]
178
- }], luzmoFiltersChanged: [{ type: i0.Output, args: ["luzmoFiltersChanged"] }] }); })();
179
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilters, { className: "LuzmoFilters", filePath: "components/filters.ts", lineNumber: 17 }); })();
214
+ }], luzmoFiltersChanged: [{ type: i0.Output, args: ["luzmoFiltersChanged"] }], luzmoParameterCreated: [{ type: i0.Output, args: ["luzmoParameterCreated"] }], luzmoParameterRemoved: [{ type: i0.Output, args: ["luzmoParameterRemoved"] }] }); })();
215
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFilters, { className: "LuzmoFilters", filePath: "components/filters.ts", lineNumber: 16 }); })();
package/package.json CHANGED
@@ -29,9 +29,9 @@
29
29
  "peerDependencies": {
30
30
  "@angular/core": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
31
31
  "@angular/forms": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
32
- "@luzmo/analytics-components-kit": "1.0.6"
32
+ "@luzmo/analytics-components-kit": "1.0.7"
33
33
  },
34
- "version": "1.0.6",
34
+ "version": "1.0.7",
35
35
  "peerDependenciesMeta": {
36
36
  "@angular/forms": {
37
37
  "optional": true