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

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 (87) hide show
  1. package/esm/components/data-field-level.d.ts +9 -1
  2. package/esm/components/data-field-level.js +15 -1
  3. package/esm/components/data-field-panel.d.ts +5 -1
  4. package/esm/components/data-field-panel.js +17 -1
  5. package/esm/components/data-field.d.ts +10 -1
  6. package/esm/components/data-field.js +22 -1
  7. package/esm/components/data-fields-select.d.ts +10 -1
  8. package/esm/components/data-fields-select.js +33 -1
  9. package/esm/components/display-settings-binning.d.ts +6 -1
  10. package/esm/components/display-settings-binning.js +18 -1
  11. package/esm/components/display-settings-datetime.d.ts +5 -1
  12. package/esm/components/display-settings-datetime.js +11 -1
  13. package/esm/components/display-settings-grand-totals.d.ts +5 -1
  14. package/esm/components/display-settings-grand-totals.js +17 -1
  15. package/esm/components/display-settings-numeric.d.ts +5 -1
  16. package/esm/components/display-settings-numeric.js +17 -1
  17. package/esm/components/display-settings-period-over-period.d.ts +7 -1
  18. package/esm/components/display-settings-period-over-period.js +19 -1
  19. package/esm/components/display-settings.d.ts +4 -1
  20. package/esm/components/display-settings.js +10 -1
  21. package/esm/components/filter-expression-picker.d.ts +11 -1
  22. package/esm/components/filter-expression-picker.js +34 -1
  23. package/esm/components/filter-item.d.ts +14 -1
  24. package/esm/components/filter-item.js +43 -2
  25. package/esm/components/filter-parameter-picker.d.ts +11 -1
  26. package/esm/components/filter-parameter-picker.js +34 -2
  27. package/esm/components/filter-value-picker-datetime.d.ts +14 -1
  28. package/esm/components/filter-value-picker-datetime.js +43 -2
  29. package/esm/components/filter-value-picker-hierarchy.d.ts +14 -1
  30. package/esm/components/filter-value-picker-hierarchy.js +43 -2
  31. package/esm/components/filter-value-picker-numeric.d.ts +14 -1
  32. package/esm/components/filter-value-picker-numeric.js +43 -2
  33. package/esm/components/filter-value-picker.d.ts +14 -1
  34. package/esm/components/filter-value-picker.js +43 -2
  35. package/esm/components/filters.d.ts +13 -1
  36. package/esm/components/filters.js +42 -2
  37. package/esm/components/formula-editor.d.ts +42 -3
  38. package/esm/components/formula-editor.js +138 -2
  39. package/esm/components/formula-field.d.ts +42 -3
  40. package/esm/components/formula-field.js +145 -5
  41. package/esm/components/formula.d.ts +31 -2
  42. package/esm/components/formula.js +105 -3
  43. package/esm/components/item-grid-item-actions-menu.d.ts +12 -1
  44. package/esm/components/item-grid-item-actions-menu.js +35 -2
  45. package/esm/components/item-option-action-button-group.d.ts +12 -1
  46. package/esm/components/item-option-action-button-group.js +49 -5
  47. package/esm/components/item-option-color-palette-picker.d.ts +19 -1
  48. package/esm/components/item-option-color-palette-picker.js +73 -5
  49. package/esm/components/item-option-color-picker.d.ts +17 -1
  50. package/esm/components/item-option-color-picker.js +40 -3
  51. package/esm/components/item-option-color-range.d.ts +37 -1
  52. package/esm/components/item-option-color-range.js +121 -5
  53. package/esm/components/item-option-multi-language-field.d.ts +20 -1
  54. package/esm/components/item-option-multi-language-field.js +67 -2
  55. package/esm/components/item-option-number-field.d.ts +27 -1
  56. package/esm/components/item-option-number-field.js +92 -2
  57. package/esm/components/item-option-picker.d.ts +17 -1
  58. package/esm/components/item-option-picker.js +66 -6
  59. package/esm/components/item-option-position-picker.d.ts +10 -1
  60. package/esm/components/item-option-position-picker.js +41 -5
  61. package/esm/components/item-option-positions-number-field.d.ts +23 -1
  62. package/esm/components/item-option-positions-number-field.js +68 -2
  63. package/esm/components/item-option-radio-button-group.d.ts +15 -1
  64. package/esm/components/item-option-radio-button-group.js +51 -2
  65. package/esm/components/item-option-slider.d.ts +11 -1
  66. package/esm/components/item-option-slider.js +23 -1
  67. package/esm/components/item-option-switch.d.ts +7 -1
  68. package/esm/components/item-option-switch.js +19 -1
  69. package/esm/components/item-option-text-field.d.ts +14 -1
  70. package/esm/components/item-option-text-field.js +43 -2
  71. package/esm/components/item-option.d.ts +10 -0
  72. package/esm/components/item-option.js +10 -0
  73. package/esm/components/item-slot-drop-panel.d.ts +5 -1
  74. package/esm/components/item-slot-drop-panel.js +17 -1
  75. package/esm/components/item-slot-drop.d.ts +15 -1
  76. package/esm/components/item-slot-drop.js +27 -1
  77. package/esm/components/item-slot-picker-panel.d.ts +5 -1
  78. package/esm/components/item-slot-picker-panel.js +17 -1
  79. package/esm/components/item-slot-picker.d.ts +7 -1
  80. package/esm/components/item-slot-picker.js +25 -1
  81. package/esm/components/slot-menu-list.d.ts +5 -1
  82. package/esm/components/slot-menu-list.js +11 -1
  83. package/esm/components/slot-menu.d.ts +16 -1
  84. package/esm/components/slot-menu.js +22 -1
  85. package/esm/components/viz-item-menu.d.ts +3 -1
  86. package/esm/components/viz-item-menu.js +9 -1
  87. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, 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/formula-editor';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -19,6 +19,40 @@ export class LuzmoFormulaEditor {
19
19
  expressionResource;
20
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
21
  explanationDisplay;
22
+ /** Renders the field display-only (no editing). */
23
+ readonly;
24
+ /** Placeholder text shown in the editable input when the expression is empty. */
25
+ placeholder;
26
+ /** Number of text lines the input is sized to start with. Defaults to 3. */
27
+ rows;
28
+ /** Maximum number of text lines before a scrollbar appears (only when `grows`). */
29
+ maxRows;
30
+ /** Whether the input grows in height with its content (up to `maxRows` if set). */
31
+ grows;
32
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
33
+ language;
34
+ /** The formula expression (function syntax), e.g. `SUM({datasetId:columnId})`. */
35
+ expression;
36
+ /** Datasets and their data fields, provided directly (takes preference over `datasetIds`). */
37
+ datasetsDataFields;
38
+ /** Dataset ids to fetch from the Luzmo API (auth attributes optional for public datasets). */
39
+ datasetIds;
40
+ /** Base URL of the Luzmo API used to fetch datasets by id. */
41
+ apiUrl;
42
+ /** Luzmo API authorization key, used with `authToken` to fetch datasets by id. */
43
+ authKey;
44
+ /** Luzmo API authorization token, used with `authKey` to fetch datasets by id. */
45
+ authToken;
46
+ /** Whether aggregation functions are offered (in the autocompletion, and - for the editor - via the aggregations list and pills). Defaults to `true`. Note: as a boolean attribute defaulting to `true` it cannot be turned off via markup (an absent attribute keeps the default); set the `.showAggregations` property to `false` to disable. */
47
+ showAggregations;
48
+ /** Language used for data labels (column / dataset names). */
49
+ contentLanguage;
50
+ /** When true, aggregations render as multi-stage nested widgets. */
51
+ multiStageAggregation;
52
+ /** When true, aggregations can be nested inside other aggregations. */
53
+ nestedAggregation;
54
+ /** The size of the element */
55
+ size;
22
56
  /** Fired when expression validity changes. */
23
57
  luzmoValidityChanged = output({ alias: 'luzmoValidityChanged' });
24
58
  /** Fired (debounced) when the expression changes. */
@@ -42,6 +76,57 @@ export class LuzmoFormulaEditor {
42
76
  case 'explanationDisplay':
43
77
  this.setHostProperty('explanationDisplay', changes['explanationDisplay'].currentValue);
44
78
  break;
79
+ case 'readonly':
80
+ this.setHostProperty('readonly', changes['readonly'].currentValue);
81
+ break;
82
+ case 'placeholder':
83
+ this.setHostProperty('placeholder', changes['placeholder'].currentValue);
84
+ break;
85
+ case 'rows':
86
+ this.setHostProperty('rows', changes['rows'].currentValue);
87
+ break;
88
+ case 'maxRows':
89
+ this.setHostProperty('maxRows', changes['maxRows'].currentValue);
90
+ break;
91
+ case 'grows':
92
+ this.setHostProperty('grows', changes['grows'].currentValue);
93
+ break;
94
+ case 'language':
95
+ this.setHostProperty('language', changes['language'].currentValue);
96
+ break;
97
+ case 'expression':
98
+ this.setHostProperty('expression', changes['expression'].currentValue);
99
+ break;
100
+ case 'datasetsDataFields':
101
+ this.setHostProperty('datasetsDataFields', changes['datasetsDataFields'].currentValue);
102
+ break;
103
+ case 'datasetIds':
104
+ this.setHostProperty('datasetIds', changes['datasetIds'].currentValue);
105
+ break;
106
+ case 'apiUrl':
107
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
108
+ break;
109
+ case 'authKey':
110
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
111
+ break;
112
+ case 'authToken':
113
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
114
+ break;
115
+ case 'showAggregations':
116
+ this.setHostProperty('showAggregations', changes['showAggregations'].currentValue);
117
+ break;
118
+ case 'contentLanguage':
119
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
120
+ break;
121
+ case 'multiStageAggregation':
122
+ this.setHostProperty('multiStageAggregation', changes['multiStageAggregation'].currentValue);
123
+ break;
124
+ case 'nestedAggregation':
125
+ this.setHostProperty('nestedAggregation', changes['nestedAggregation'].currentValue);
126
+ break;
127
+ case 'size':
128
+ this.setHostProperty('size', changes['size'].currentValue);
129
+ break;
45
130
  default:
46
131
  break;
47
132
  }
@@ -71,7 +156,7 @@ export class LuzmoFormulaEditor {
71
156
  }));
72
157
  }
73
158
  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) {
159
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormulaEditor, selectors: [["luzmo-formula-editor"]], inputs: { expressionResource: "expressionResource", explanationDisplay: "explanationDisplay", readonly: [2, "readonly", "readonly", booleanAttribute], placeholder: "placeholder", rows: "rows", maxRows: "maxRows", grows: [2, "grows", "grows", booleanAttribute], language: "language", expression: "expression", datasetsDataFields: "datasetsDataFields", datasetIds: "datasetIds", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", showAggregations: [2, "showAggregations", "showAggregations", booleanAttribute], contentLanguage: "contentLanguage", multiStageAggregation: [2, "multiStageAggregation", "multiStageAggregation", booleanAttribute], nestedAggregation: [2, "nestedAggregation", "nestedAggregation", booleanAttribute], size: "size" }, 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
160
  i0.ɵɵprojectionDef();
76
161
  i0.ɵɵprojection(0);
77
162
  } }, encapsulation: 2, changeDetection: 0 });
@@ -91,5 +176,56 @@ export class LuzmoFormulaEditor {
91
176
  }], explanationDisplay: [{
92
177
  type: Input,
93
178
  args: [{ alias: 'explanationDisplay' }]
179
+ }], readonly: [{
180
+ type: Input,
181
+ args: [{ alias: 'readonly', transform: booleanAttribute }]
182
+ }], placeholder: [{
183
+ type: Input,
184
+ args: [{ alias: 'placeholder' }]
185
+ }], rows: [{
186
+ type: Input,
187
+ args: [{ alias: 'rows' }]
188
+ }], maxRows: [{
189
+ type: Input,
190
+ args: [{ alias: 'maxRows' }]
191
+ }], grows: [{
192
+ type: Input,
193
+ args: [{ alias: 'grows', transform: booleanAttribute }]
194
+ }], language: [{
195
+ type: Input,
196
+ args: [{ alias: 'language' }]
197
+ }], expression: [{
198
+ type: Input,
199
+ args: [{ alias: 'expression' }]
200
+ }], datasetsDataFields: [{
201
+ type: Input,
202
+ args: [{ alias: 'datasetsDataFields' }]
203
+ }], datasetIds: [{
204
+ type: Input,
205
+ args: [{ alias: 'datasetIds' }]
206
+ }], apiUrl: [{
207
+ type: Input,
208
+ args: [{ alias: 'apiUrl' }]
209
+ }], authKey: [{
210
+ type: Input,
211
+ args: [{ alias: 'authKey' }]
212
+ }], authToken: [{
213
+ type: Input,
214
+ args: [{ alias: 'authToken' }]
215
+ }], showAggregations: [{
216
+ type: Input,
217
+ args: [{ alias: 'showAggregations', transform: booleanAttribute }]
218
+ }], contentLanguage: [{
219
+ type: Input,
220
+ args: [{ alias: 'contentLanguage' }]
221
+ }], multiStageAggregation: [{
222
+ type: Input,
223
+ args: [{ alias: 'multiStageAggregation', transform: booleanAttribute }]
224
+ }], nestedAggregation: [{
225
+ type: Input,
226
+ args: [{ alias: 'nestedAggregation', transform: booleanAttribute }]
227
+ }], size: [{
228
+ type: Input,
229
+ args: [{ alias: 'size' }]
94
230
  }], luzmoValidityChanged: [{ type: i0.Output, args: ["luzmoValidityChanged"] }], luzmoExpressionChanged: [{ type: i0.Output, args: ["luzmoExpressionChanged"] }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
95
231
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFormulaEditor, { className: "LuzmoFormulaEditor", filePath: "components/formula-editor.ts", lineNumber: 17 }); })();
@@ -10,10 +10,44 @@ export declare class LuzmoFormulaField implements OnChanges {
10
10
  private readonly listenerCleanup;
11
11
  /** The underlying custom element instance. Use to call imperative methods. */
12
12
  get nativeElement(): LuzmoFormulaFieldHostElement;
13
+ /** Renders the field display-only (no editing). */
14
+ readonly?: boolean;
15
+ /** Placeholder text shown in the editable input when the expression is empty. */
16
+ placeholder?: string;
17
+ /** Number of text lines the input is sized to start with. Defaults to 3. */
18
+ rows?: number;
19
+ /** Maximum number of text lines before a scrollbar appears (only when `grows`). */
20
+ maxRows?: number;
21
+ /** Whether the input grows in height with its content (up to `maxRows` if set). */
22
+ grows?: boolean;
23
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
24
+ language?: string;
25
+ /** The formula expression (function syntax), e.g. `SUM({datasetId:columnId})`. */
26
+ expression?: string;
27
+ /** Datasets and their data fields, provided directly (takes preference over `datasetIds`). */
28
+ datasetsDataFields?: unknown;
29
+ /** Dataset ids to fetch from the Luzmo API (auth attributes optional for public datasets). */
30
+ datasetIds?: string[];
31
+ /** Base URL of the Luzmo API used to fetch datasets by id. */
32
+ apiUrl?: string;
33
+ /** Luzmo API authorization key, used with `authToken` to fetch datasets by id. */
34
+ authKey?: string;
35
+ /** Luzmo API authorization token, used with `authKey` to fetch datasets by id. */
36
+ authToken?: string;
37
+ /** Whether aggregation functions are offered (in the autocompletion, and - for the editor - via the aggregations list and pills). Defaults to `true`. Note: as a boolean attribute defaulting to `true` it cannot be turned off via markup (an absent attribute keeps the default); set the `.showAggregations` property to `false` to disable. */
38
+ showAggregations?: boolean;
39
+ /** Language used for data labels (column / dataset names). */
40
+ contentLanguage?: string;
41
+ /** When true, aggregations render as multi-stage nested widgets. */
42
+ multiStageAggregation?: boolean;
43
+ /** When true, aggregations can be nested inside other aggregations. */
44
+ nestedAggregation?: boolean;
45
+ /** The size of the element */
46
+ size?: 's' | 'm' | 'l' | 'xl';
13
47
  /** Fired (debounced) when the expression changes (only when not readonly). */
14
- readonly luzmoExpressionChanged: import("@angular/core").OutputEmitterRef<unknown>;
48
+ readonly luzmoExpressionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
15
49
  /** Fired when fetching datasets by id fails. */
16
- readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<unknown>;
50
+ readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
17
51
  constructor();
18
52
  ngOnChanges(changes: SimpleChanges): void;
19
53
  /**
@@ -25,7 +59,12 @@ export declare class LuzmoFormulaField implements OnChanges {
25
59
  private setHostProperty;
26
60
  private bindEvents;
27
61
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFormulaField, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormulaField, "luzmo-formula-field", ["luzmoFormulaField"], {}, { "luzmoExpressionChanged": "luzmoExpressionChanged"; "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
62
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormulaField, "luzmo-formula-field", ["luzmoFormulaField"], { "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; "grows": { "alias": "grows"; "required": false; }; "language": { "alias": "language"; "required": false; }; "expression": { "alias": "expression"; "required": false; }; "datasetsDataFields": { "alias": "datasetsDataFields"; "required": false; }; "datasetIds": { "alias": "datasetIds"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "showAggregations": { "alias": "showAggregations"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "multiStageAggregation": { "alias": "multiStageAggregation"; "required": false; }; "nestedAggregation": { "alias": "nestedAggregation"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "luzmoExpressionChanged": "luzmoExpressionChanged"; "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
63
+ static ngAcceptInputType_readonly: unknown;
64
+ static ngAcceptInputType_grows: unknown;
65
+ static ngAcceptInputType_showAggregations: unknown;
66
+ static ngAcceptInputType_multiStageAggregation: unknown;
67
+ static ngAcceptInputType_nestedAggregation: unknown;
29
68
  }
30
69
  /** The underlying custom element type for LuzmoFormulaField */
31
70
  export type LuzmoFormulaFieldElement = LuzmoFormulaFieldHostElement;
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, output, 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/formula-field';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -15,6 +15,40 @@ export class LuzmoFormulaField {
15
15
  get nativeElement() {
16
16
  return this.host;
17
17
  }
18
+ /** Renders the field display-only (no editing). */
19
+ readonly;
20
+ /** Placeholder text shown in the editable input when the expression is empty. */
21
+ placeholder;
22
+ /** Number of text lines the input is sized to start with. Defaults to 3. */
23
+ rows;
24
+ /** Maximum number of text lines before a scrollbar appears (only when `grows`). */
25
+ maxRows;
26
+ /** Whether the input grows in height with its content (up to `maxRows` if set). */
27
+ grows;
28
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
29
+ language;
30
+ /** The formula expression (function syntax), e.g. `SUM({datasetId:columnId})`. */
31
+ expression;
32
+ /** Datasets and their data fields, provided directly (takes preference over `datasetIds`). */
33
+ datasetsDataFields;
34
+ /** Dataset ids to fetch from the Luzmo API (auth attributes optional for public datasets). */
35
+ datasetIds;
36
+ /** Base URL of the Luzmo API used to fetch datasets by id. */
37
+ apiUrl;
38
+ /** Luzmo API authorization key, used with `authToken` to fetch datasets by id. */
39
+ authKey;
40
+ /** Luzmo API authorization token, used with `authKey` to fetch datasets by id. */
41
+ authToken;
42
+ /** Whether aggregation functions are offered (in the autocompletion, and - for the editor - via the aggregations list and pills). Defaults to `true`. Note: as a boolean attribute defaulting to `true` it cannot be turned off via markup (an absent attribute keeps the default); set the `.showAggregations` property to `false` to disable. */
43
+ showAggregations;
44
+ /** Language used for data labels (column / dataset names). */
45
+ contentLanguage;
46
+ /** When true, aggregations render as multi-stage nested widgets. */
47
+ multiStageAggregation;
48
+ /** When true, aggregations can be nested inside other aggregations. */
49
+ nestedAggregation;
50
+ /** The size of the element */
51
+ size;
18
52
  /** Fired (debounced) when the expression changes (only when not readonly). */
19
53
  luzmoExpressionChanged = output({ alias: 'luzmoExpressionChanged' });
20
54
  /** Fired when fetching datasets by id fails. */
@@ -28,8 +62,63 @@ export class LuzmoFormulaField {
28
62
  });
29
63
  }
30
64
  ngOnChanges(changes) {
31
- // No mapped inputs for this wrapper.
32
- void changes;
65
+ for (const key of Object.keys(changes)) {
66
+ switch (key) {
67
+ case 'readonly':
68
+ this.setHostProperty('readonly', changes['readonly'].currentValue);
69
+ break;
70
+ case 'placeholder':
71
+ this.setHostProperty('placeholder', changes['placeholder'].currentValue);
72
+ break;
73
+ case 'rows':
74
+ this.setHostProperty('rows', changes['rows'].currentValue);
75
+ break;
76
+ case 'maxRows':
77
+ this.setHostProperty('maxRows', changes['maxRows'].currentValue);
78
+ break;
79
+ case 'grows':
80
+ this.setHostProperty('grows', changes['grows'].currentValue);
81
+ break;
82
+ case 'language':
83
+ this.setHostProperty('language', changes['language'].currentValue);
84
+ break;
85
+ case 'expression':
86
+ this.setHostProperty('expression', changes['expression'].currentValue);
87
+ break;
88
+ case 'datasetsDataFields':
89
+ this.setHostProperty('datasetsDataFields', changes['datasetsDataFields'].currentValue);
90
+ break;
91
+ case 'datasetIds':
92
+ this.setHostProperty('datasetIds', changes['datasetIds'].currentValue);
93
+ break;
94
+ case 'apiUrl':
95
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
96
+ break;
97
+ case 'authKey':
98
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
99
+ break;
100
+ case 'authToken':
101
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
102
+ break;
103
+ case 'showAggregations':
104
+ this.setHostProperty('showAggregations', changes['showAggregations'].currentValue);
105
+ break;
106
+ case 'contentLanguage':
107
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
108
+ break;
109
+ case 'multiStageAggregation':
110
+ this.setHostProperty('multiStageAggregation', changes['multiStageAggregation'].currentValue);
111
+ break;
112
+ case 'nestedAggregation':
113
+ this.setHostProperty('nestedAggregation', changes['nestedAggregation'].currentValue);
114
+ break;
115
+ case 'size':
116
+ this.setHostProperty('size', changes['size'].currentValue);
117
+ break;
118
+ default:
119
+ break;
120
+ }
121
+ }
33
122
  }
34
123
  /**
35
124
  * Forward a wrapper @Input to the underlying host element via Renderer2 so
@@ -51,7 +140,7 @@ export class LuzmoFormulaField {
51
140
  }));
52
141
  }
53
142
  static ɵfac = function LuzmoFormulaField_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFormulaField)(); };
54
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormulaField, selectors: [["luzmo-formula-field"]], outputs: { luzmoExpressionChanged: "luzmoExpressionChanged", luzmoDatasetsError: "luzmoDatasetsError" }, exportAs: ["luzmoFormulaField"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFormulaField_Template(rf, ctx) { if (rf & 1) {
143
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormulaField, selectors: [["luzmo-formula-field"]], inputs: { readonly: [2, "readonly", "readonly", booleanAttribute], placeholder: "placeholder", rows: "rows", maxRows: "maxRows", grows: [2, "grows", "grows", booleanAttribute], language: "language", expression: "expression", datasetsDataFields: "datasetsDataFields", datasetIds: "datasetIds", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", showAggregations: [2, "showAggregations", "showAggregations", booleanAttribute], contentLanguage: "contentLanguage", multiStageAggregation: [2, "multiStageAggregation", "multiStageAggregation", booleanAttribute], nestedAggregation: [2, "nestedAggregation", "nestedAggregation", booleanAttribute], size: "size" }, outputs: { luzmoExpressionChanged: "luzmoExpressionChanged", luzmoDatasetsError: "luzmoDatasetsError" }, exportAs: ["luzmoFormulaField"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFormulaField_Template(rf, ctx) { if (rf & 1) {
55
144
  i0.ɵɵprojectionDef();
56
145
  i0.ɵɵprojection(0);
57
146
  } }, encapsulation: 2, changeDetection: 0 });
@@ -65,5 +154,56 @@ export class LuzmoFormulaField {
65
154
  changeDetection: ChangeDetectionStrategy.OnPush,
66
155
  template: '<ng-content />'
67
156
  }]
68
- }], () => [], { luzmoExpressionChanged: [{ type: i0.Output, args: ["luzmoExpressionChanged"] }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
157
+ }], () => [], { readonly: [{
158
+ type: Input,
159
+ args: [{ alias: 'readonly', transform: booleanAttribute }]
160
+ }], placeholder: [{
161
+ type: Input,
162
+ args: [{ alias: 'placeholder' }]
163
+ }], rows: [{
164
+ type: Input,
165
+ args: [{ alias: 'rows' }]
166
+ }], maxRows: [{
167
+ type: Input,
168
+ args: [{ alias: 'maxRows' }]
169
+ }], grows: [{
170
+ type: Input,
171
+ args: [{ alias: 'grows', transform: booleanAttribute }]
172
+ }], language: [{
173
+ type: Input,
174
+ args: [{ alias: 'language' }]
175
+ }], expression: [{
176
+ type: Input,
177
+ args: [{ alias: 'expression' }]
178
+ }], datasetsDataFields: [{
179
+ type: Input,
180
+ args: [{ alias: 'datasetsDataFields' }]
181
+ }], datasetIds: [{
182
+ type: Input,
183
+ args: [{ alias: 'datasetIds' }]
184
+ }], apiUrl: [{
185
+ type: Input,
186
+ args: [{ alias: 'apiUrl' }]
187
+ }], authKey: [{
188
+ type: Input,
189
+ args: [{ alias: 'authKey' }]
190
+ }], authToken: [{
191
+ type: Input,
192
+ args: [{ alias: 'authToken' }]
193
+ }], showAggregations: [{
194
+ type: Input,
195
+ args: [{ alias: 'showAggregations', transform: booleanAttribute }]
196
+ }], contentLanguage: [{
197
+ type: Input,
198
+ args: [{ alias: 'contentLanguage' }]
199
+ }], multiStageAggregation: [{
200
+ type: Input,
201
+ args: [{ alias: 'multiStageAggregation', transform: booleanAttribute }]
202
+ }], nestedAggregation: [{
203
+ type: Input,
204
+ args: [{ alias: 'nestedAggregation', transform: booleanAttribute }]
205
+ }], size: [{
206
+ type: Input,
207
+ args: [{ alias: 'size' }]
208
+ }], luzmoExpressionChanged: [{ type: i0.Output, args: ["luzmoExpressionChanged"] }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
69
209
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFormulaField, { className: "LuzmoFormulaField", filePath: "components/formula-field.ts", lineNumber: 15 }); })();
@@ -12,8 +12,34 @@ export declare class LuzmoFormula implements OnChanges {
12
12
  get nativeElement(): LuzmoFormulaHostElement;
13
13
  /** Rendering mode. `rich` (default) renders read-only column / aggregation pills; `text` renders plain text with an inline type icon per column. Both are always read-only. */
14
14
  display?: 'rich' | 'text';
15
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
16
+ language?: string;
17
+ /** The formula expression (function syntax), e.g. `SUM({datasetId:columnId})`. */
18
+ expression?: string;
19
+ /** Datasets and their data fields, provided directly (takes preference over `datasetIds`). */
20
+ datasetsDataFields?: unknown;
21
+ /** Dataset ids to fetch from the Luzmo API (auth attributes optional for public datasets). */
22
+ datasetIds?: string[];
23
+ /** Base URL of the Luzmo API used to fetch datasets by id. */
24
+ apiUrl?: string;
25
+ /** Luzmo API authorization key, used with `authToken` to fetch datasets by id. */
26
+ authKey?: string;
27
+ /** Luzmo API authorization token, used with `authKey` to fetch datasets by id. */
28
+ authToken?: string;
29
+ /** Whether aggregation functions are offered (in the autocompletion, and - for the editor - via the aggregations list and pills). Defaults to `true`. Note: as a boolean attribute defaulting to `true` it cannot be turned off via markup (an absent attribute keeps the default); set the `.showAggregations` property to `false` to disable. */
30
+ showAggregations?: boolean;
31
+ /** Language used for data labels (column / dataset names). */
32
+ contentLanguage?: string;
33
+ /** When true, aggregations render as multi-stage nested widgets. */
34
+ multiStageAggregation?: boolean;
35
+ /** When true, aggregations can be nested inside other aggregations. */
36
+ nestedAggregation?: boolean;
37
+ /** The size of the element */
38
+ size?: 's' | 'm' | 'l' | 'xl';
39
+ /** Fired (debounced) when the formula expression changes; `detail.expression` holds the new expression. */
40
+ readonly luzmoExpressionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
15
41
  /** Fired when fetching datasets by id fails. */
16
- readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<unknown>;
42
+ readonly luzmoDatasetsError: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
17
43
  constructor();
18
44
  ngOnChanges(changes: SimpleChanges): void;
19
45
  /**
@@ -25,7 +51,10 @@ export declare class LuzmoFormula implements OnChanges {
25
51
  private setHostProperty;
26
52
  private bindEvents;
27
53
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoFormula, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormula, "luzmo-formula", ["luzmoFormula"], { "display": { "alias": "display"; "required": false; }; }, { "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoFormula, "luzmo-formula", ["luzmoFormula"], { "display": { "alias": "display"; "required": false; }; "language": { "alias": "language"; "required": false; }; "expression": { "alias": "expression"; "required": false; }; "datasetsDataFields": { "alias": "datasetsDataFields"; "required": false; }; "datasetIds": { "alias": "datasetIds"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "showAggregations": { "alias": "showAggregations"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "multiStageAggregation": { "alias": "multiStageAggregation"; "required": false; }; "nestedAggregation": { "alias": "nestedAggregation"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "luzmoExpressionChanged": "luzmoExpressionChanged"; "luzmoDatasetsError": "luzmoDatasetsError"; }, never, ["*"], true, never>;
55
+ static ngAcceptInputType_showAggregations: unknown;
56
+ static ngAcceptInputType_multiStageAggregation: unknown;
57
+ static ngAcceptInputType_nestedAggregation: unknown;
29
58
  }
30
59
  /** The underlying custom element type for LuzmoFormula */
31
60
  export type LuzmoFormulaElement = LuzmoFormulaHostElement;
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, 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/formula';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -17,6 +17,32 @@ export class LuzmoFormula {
17
17
  }
18
18
  /** Rendering mode. `rich` (default) renders read-only column / aggregation pills; `text` renders plain text with an inline type icon per column. Both are always read-only. */
19
19
  display;
20
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
21
+ language;
22
+ /** The formula expression (function syntax), e.g. `SUM({datasetId:columnId})`. */
23
+ expression;
24
+ /** Datasets and their data fields, provided directly (takes preference over `datasetIds`). */
25
+ datasetsDataFields;
26
+ /** Dataset ids to fetch from the Luzmo API (auth attributes optional for public datasets). */
27
+ datasetIds;
28
+ /** Base URL of the Luzmo API used to fetch datasets by id. */
29
+ apiUrl;
30
+ /** Luzmo API authorization key, used with `authToken` to fetch datasets by id. */
31
+ authKey;
32
+ /** Luzmo API authorization token, used with `authKey` to fetch datasets by id. */
33
+ authToken;
34
+ /** Whether aggregation functions are offered (in the autocompletion, and - for the editor - via the aggregations list and pills). Defaults to `true`. Note: as a boolean attribute defaulting to `true` it cannot be turned off via markup (an absent attribute keeps the default); set the `.showAggregations` property to `false` to disable. */
35
+ showAggregations;
36
+ /** Language used for data labels (column / dataset names). */
37
+ contentLanguage;
38
+ /** When true, aggregations render as multi-stage nested widgets. */
39
+ multiStageAggregation;
40
+ /** When true, aggregations can be nested inside other aggregations. */
41
+ nestedAggregation;
42
+ /** The size of the element */
43
+ size;
44
+ /** Fired (debounced) when the formula expression changes; `detail.expression` holds the new expression. */
45
+ luzmoExpressionChanged = output({ alias: 'luzmoExpressionChanged' });
20
46
  /** Fired when fetching datasets by id fails. */
21
47
  luzmoDatasetsError = output({ alias: 'luzmoDatasetsError' });
22
48
  constructor() {
@@ -33,6 +59,42 @@ export class LuzmoFormula {
33
59
  case 'display':
34
60
  this.setHostProperty('display', changes['display'].currentValue);
35
61
  break;
62
+ case 'language':
63
+ this.setHostProperty('language', changes['language'].currentValue);
64
+ break;
65
+ case 'expression':
66
+ this.setHostProperty('expression', changes['expression'].currentValue);
67
+ break;
68
+ case 'datasetsDataFields':
69
+ this.setHostProperty('datasetsDataFields', changes['datasetsDataFields'].currentValue);
70
+ break;
71
+ case 'datasetIds':
72
+ this.setHostProperty('datasetIds', changes['datasetIds'].currentValue);
73
+ break;
74
+ case 'apiUrl':
75
+ this.setHostProperty('apiUrl', changes['apiUrl'].currentValue);
76
+ break;
77
+ case 'authKey':
78
+ this.setHostProperty('authKey', changes['authKey'].currentValue);
79
+ break;
80
+ case 'authToken':
81
+ this.setHostProperty('authToken', changes['authToken'].currentValue);
82
+ break;
83
+ case 'showAggregations':
84
+ this.setHostProperty('showAggregations', changes['showAggregations'].currentValue);
85
+ break;
86
+ case 'contentLanguage':
87
+ this.setHostProperty('contentLanguage', changes['contentLanguage'].currentValue);
88
+ break;
89
+ case 'multiStageAggregation':
90
+ this.setHostProperty('multiStageAggregation', changes['multiStageAggregation'].currentValue);
91
+ break;
92
+ case 'nestedAggregation':
93
+ this.setHostProperty('nestedAggregation', changes['nestedAggregation'].currentValue);
94
+ break;
95
+ case 'size':
96
+ this.setHostProperty('size', changes['size'].currentValue);
97
+ break;
36
98
  default:
37
99
  break;
38
100
  }
@@ -48,13 +110,17 @@ export class LuzmoFormula {
48
110
  this.renderer.setProperty(this.host, key, value);
49
111
  }
50
112
  bindEvents() {
113
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-expression-changed', (event) => {
114
+ const typed = event;
115
+ this.luzmoExpressionChanged.emit(typed);
116
+ }));
51
117
  this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-datasets-error', (event) => {
52
118
  const typed = event;
53
119
  this.luzmoDatasetsError.emit(typed);
54
120
  }));
55
121
  }
56
122
  static ɵfac = function LuzmoFormula_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoFormula)(); };
57
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormula, selectors: [["luzmo-formula"]], inputs: { display: "display" }, outputs: { luzmoDatasetsError: "luzmoDatasetsError" }, exportAs: ["luzmoFormula"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFormula_Template(rf, ctx) { if (rf & 1) {
123
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoFormula, selectors: [["luzmo-formula"]], inputs: { display: "display", language: "language", expression: "expression", datasetsDataFields: "datasetsDataFields", datasetIds: "datasetIds", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", showAggregations: [2, "showAggregations", "showAggregations", booleanAttribute], contentLanguage: "contentLanguage", multiStageAggregation: [2, "multiStageAggregation", "multiStageAggregation", booleanAttribute], nestedAggregation: [2, "nestedAggregation", "nestedAggregation", booleanAttribute], size: "size" }, outputs: { luzmoExpressionChanged: "luzmoExpressionChanged", luzmoDatasetsError: "luzmoDatasetsError" }, exportAs: ["luzmoFormula"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoFormula_Template(rf, ctx) { if (rf & 1) {
58
124
  i0.ɵɵprojectionDef();
59
125
  i0.ɵɵprojection(0);
60
126
  } }, encapsulation: 2, changeDetection: 0 });
@@ -71,5 +137,41 @@ export class LuzmoFormula {
71
137
  }], () => [], { display: [{
72
138
  type: Input,
73
139
  args: [{ alias: 'display' }]
74
- }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
140
+ }], language: [{
141
+ type: Input,
142
+ args: [{ alias: 'language' }]
143
+ }], expression: [{
144
+ type: Input,
145
+ args: [{ alias: 'expression' }]
146
+ }], datasetsDataFields: [{
147
+ type: Input,
148
+ args: [{ alias: 'datasetsDataFields' }]
149
+ }], datasetIds: [{
150
+ type: Input,
151
+ args: [{ alias: 'datasetIds' }]
152
+ }], apiUrl: [{
153
+ type: Input,
154
+ args: [{ alias: 'apiUrl' }]
155
+ }], authKey: [{
156
+ type: Input,
157
+ args: [{ alias: 'authKey' }]
158
+ }], authToken: [{
159
+ type: Input,
160
+ args: [{ alias: 'authToken' }]
161
+ }], showAggregations: [{
162
+ type: Input,
163
+ args: [{ alias: 'showAggregations', transform: booleanAttribute }]
164
+ }], contentLanguage: [{
165
+ type: Input,
166
+ args: [{ alias: 'contentLanguage' }]
167
+ }], multiStageAggregation: [{
168
+ type: Input,
169
+ args: [{ alias: 'multiStageAggregation', transform: booleanAttribute }]
170
+ }], nestedAggregation: [{
171
+ type: Input,
172
+ args: [{ alias: 'nestedAggregation', transform: booleanAttribute }]
173
+ }], size: [{
174
+ type: Input,
175
+ args: [{ alias: 'size' }]
176
+ }], luzmoExpressionChanged: [{ type: i0.Output, args: ["luzmoExpressionChanged"] }], luzmoDatasetsError: [{ type: i0.Output, args: ["luzmoDatasetsError"] }] }); })();
75
177
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoFormula, { className: "LuzmoFormula", filePath: "components/formula.ts", lineNumber: 15 }); })();
@@ -16,6 +16,15 @@ export declare class LuzmoItemGridItemActionsMenu implements OnChanges {
16
16
  placement?: Placement;
17
17
  /** The Actions to display in the menu */
18
18
  actions?: ActionGroup[];
19
+ /** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
20
+ language?: string;
21
+ /** Disable this control. It will not receive focus or events */
22
+ disabled?: boolean;
23
+ /** When this control is rendered, focus it automatically */
24
+ autofocus?: boolean;
25
+ /** The tab index to apply to this control. See general documentation about the tabindex HTML property */
26
+ tabIndex?: number;
27
+ /** Fired when the user clicks an action in the menu; `detail` holds the action key, type, and active state. */
19
28
  readonly luzmoItemGridItemAction: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
20
29
  constructor();
21
30
  ngOnChanges(changes: SimpleChanges): void;
@@ -28,7 +37,9 @@ export declare class LuzmoItemGridItemActionsMenu implements OnChanges {
28
37
  private setHostProperty;
29
38
  private bindEvents;
30
39
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemGridItemActionsMenu, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemGridItemActionsMenu, "luzmo-item-grid-item-actions-menu", ["luzmoItemGridItemActionsMenu"], { "placement": { "alias": "placement"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "luzmoItemGridItemAction": "luzmoItemGridItemAction"; }, never, ["*"], true, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemGridItemActionsMenu, "luzmo-item-grid-item-actions-menu", ["luzmoItemGridItemActionsMenu"], { "placement": { "alias": "placement"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoItemGridItemAction": "luzmoItemGridItemAction"; }, never, ["*"], true, never>;
41
+ static ngAcceptInputType_disabled: unknown;
42
+ static ngAcceptInputType_autofocus: unknown;
32
43
  }
33
44
  /** The underlying custom element type for LuzmoItemGridItemActionsMenu */
34
45
  export type LuzmoItemGridItemActionsMenuElement = LuzmoItemGridItemActionsMenuHostElement;