@ajf/material 13.1.3 → 13.2.0

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@ajf/core/reports';
2
2
  import { AjfBaseWidgetComponent, widgetToWidgetInstance, AjfWidgetType, AjfWidgetService as AjfWidgetService$1, AjfReportWidget as AjfReportWidget$1, AjfReportRenderer as AjfReportRenderer$1, AjfReportsModule as AjfReportsModule$1 } from '@ajf/core/reports';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Injectable, NgModule } from '@angular/core';
4
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Injectable, TemplateRef, ViewChild, NgModule } from '@angular/core';
5
5
  import * as i2 from '@ajf/core/chart';
6
6
  import { AjfChartModule } from '@ajf/core/chart';
7
7
  import * as i2$1 from '@angular/common';
@@ -16,19 +16,25 @@ import * as i3 from '@ajf/material/forms';
16
16
  import { AjfFormsModule } from '@ajf/material/forms';
17
17
  import * as i1$2 from '@ajf/core/text';
18
18
  import { AjfTextModule } from '@ajf/core/text';
19
+ import * as i1$3 from '@ajf/core/heat-map';
20
+ import { AjfHeatMapModule } from '@ajf/core/heat-map';
19
21
  import { AjfImageType } from '@ajf/core/image';
20
- import * as i1$3 from '@ajf/material/image';
22
+ import * as i1$4 from '@ajf/material/image';
21
23
  import { AjfImageModule } from '@ajf/material/image';
22
24
  import * as i3$1 from '@ajf/core/common';
23
25
  import { AjfCommonModule } from '@ajf/core/common';
24
- import * as i1$4 from '@ajf/core/map';
26
+ import * as i1$5 from '@ajf/core/map';
25
27
  import { AjfMapModule } from '@ajf/core/map';
26
- import * as i1$5 from '@ajf/core/page-break';
28
+ import * as i1$6 from '@ajf/core/page-break';
27
29
  import { AjfPageBreakModule } from '@ajf/core/page-break';
28
30
  import { BehaviorSubject } from 'rxjs';
31
+ import * as i1$7 from '@ajf/core/graph';
32
+ import { AjfGraphModule } from '@ajf/core/graph';
29
33
  import * as i2$3 from '@ajf/core/table';
30
34
  import { AjfTableModule } from '@ajf/core/table';
31
35
  import * as i3$2 from '@ngneat/transloco';
36
+ import * as i4 from '@angular/material/dialog';
37
+ import { MatDialogModule } from '@angular/material/dialog';
32
38
 
33
39
  /**
34
40
  * @license
@@ -145,6 +151,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
145
151
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-text *ngIf=\"instance\" [htmlText]=\"instance.formula\"></ajf-text>\n", styles: [""] }]
146
152
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
147
153
 
154
+ /**
155
+ * @license
156
+ * Copyright (C) Gnucoop soc. coop.
157
+ *
158
+ * This file is part of the Advanced JSON forms (ajf).
159
+ *
160
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
161
+ * modify it under the terms of the GNU Affero General Public License as
162
+ * published by the Free Software Foundation, either version 3 of the License,
163
+ * or (at your option) any later version.
164
+ *
165
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
166
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
167
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
168
+ * General Public License for more details.
169
+ *
170
+ * You should have received a copy of the GNU Affero General Public License
171
+ * along with Advanced JSON forms (ajf).
172
+ * If not, see http://www.gnu.org/licenses/.
173
+ *
174
+ */
175
+ class AjfHeatMapWidgetComponent extends AjfBaseWidgetComponent {
176
+ constructor(cdr, el) {
177
+ super(cdr, el);
178
+ }
179
+ }
180
+ AjfHeatMapWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfHeatMapWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
181
+ AjfHeatMapWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfHeatMapWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-heat-map *ngIf=\"instance\"\n [idProp]=\"instance.idProp\"\n [features]=\"instance.features\"\n [values]=\"instance.values\"\n [startColor]=\"instance.startColor\"\n [endColor]=\"instance.endColor\"\n [highlightColor]=\"instance.highlightColor\"\n [showVisualMap]=\"instance.showVisualMap\"></ajf-heat-map>\n", styles: ["ajf-widget ajf-heat-map{flex:1;height:100%}\n"], components: [{ type: i1$3.AjfHeatMap, selector: "ajf-heat-map", inputs: ["features", "startColor", "endColor", "highlightColor", "values", "idProp", "showVisualMap"], outputs: ["featureSelected"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfHeatMapWidgetComponent, decorators: [{
183
+ type: Component,
184
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-heat-map *ngIf=\"instance\"\n [idProp]=\"instance.idProp\"\n [features]=\"instance.features\"\n [values]=\"instance.values\"\n [startColor]=\"instance.startColor\"\n [endColor]=\"instance.endColor\"\n [highlightColor]=\"instance.highlightColor\"\n [showVisualMap]=\"instance.showVisualMap\"></ajf-heat-map>\n", styles: ["ajf-widget ajf-heat-map{flex:1;height:100%}\n"] }]
185
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
186
+
148
187
  /**
149
188
  * @license
150
189
  * Copyright (C) Gnucoop soc. coop.
@@ -173,7 +212,7 @@ class AjfImageContainerWidgetComponent extends AjfBaseWidgetComponent {
173
212
  }
174
213
  }
175
214
  AjfImageContainerWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfImageContainerWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
176
- AjfImageContainerWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfImageContainerWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"instance\" class=\"ajf-image-container ajf-columns\" [ngSwitch]=\"instance.widget.imageType\">\n <ng-template [ngSwitchCase]=\"imageTypes.Image\">\n <div *ngFor=\"let icw of instance.urls; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"icw\"\n [icon]=\"null\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Flag\">\n <div *ngFor=\"let icw of instance.flags; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"null\"\n [flag]=\"icw\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Icon\">\n <div *ngFor=\"let icw of instance.icons; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"icw\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n</div>\n", styles: [".ajf-image-container img{max-width:none;max-height:none}\n"], components: [{ type: i1$3.AjfImage, selector: "ajf-image" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.ApplyStylesDirective, selector: "[applyStyles]", inputs: ["applyStyles"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
215
+ AjfImageContainerWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfImageContainerWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"instance\" class=\"ajf-image-container ajf-columns\" [ngSwitch]=\"instance.widget.imageType\">\n <ng-template [ngSwitchCase]=\"imageTypes.Image\">\n <div *ngFor=\"let icw of instance.urls; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"icw\"\n [icon]=\"null\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Flag\">\n <div *ngFor=\"let icw of instance.flags; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"null\"\n [flag]=\"icw\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Icon\">\n <div *ngFor=\"let icw of instance.icons; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"icw\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n</div>\n", styles: [".ajf-image-container img{max-width:none;max-height:none}\n"], components: [{ type: i1$4.AjfImage, selector: "ajf-image" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.ApplyStylesDirective, selector: "[applyStyles]", inputs: ["applyStyles"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
177
216
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfImageContainerWidgetComponent, decorators: [{
178
217
  type: Component,
179
218
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"instance\" class=\"ajf-image-container ajf-columns\" [ngSwitch]=\"instance.widget.imageType\">\n <ng-template [ngSwitchCase]=\"imageTypes.Image\">\n <div *ngFor=\"let icw of instance.urls; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"icw\"\n [icon]=\"null\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Flag\">\n <div *ngFor=\"let icw of instance.flags; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"null\"\n [flag]=\"icw\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"imageTypes.Icon\">\n <div *ngFor=\"let icw of instance.icons; let idx = index\" class=\"ajf-column\">\n <ajf-image\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"null\"\n [icon]=\"icw\"\n [flag]=\"null\"\n [applyStyles]=\"instance.widget!.styles\"\n ></ajf-image>\n </div>\n </ng-template>\n</div>\n", styles: [".ajf-image-container img{max-width:none;max-height:none}\n"] }]
@@ -206,7 +245,7 @@ class AjfImageWidgetComponent extends AjfBaseWidgetComponent {
206
245
  }
207
246
  }
208
247
  AjfImageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfImageWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
209
- AjfImageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfImageWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-image *ngIf=\"instance\"\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"instance.url\"\n [icon]=\"instance.icon\"\n [flag]=\"instance.flag\"\n></ajf-image>\n", styles: [""], components: [{ type: i1$3.AjfImage, selector: "ajf-image" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
248
+ AjfImageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfImageWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-image *ngIf=\"instance\"\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"instance.url\"\n [icon]=\"instance.icon\"\n [flag]=\"instance.flag\"\n></ajf-image>\n", styles: [""], components: [{ type: i1$4.AjfImage, selector: "ajf-image" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
210
249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfImageWidgetComponent, decorators: [{
211
250
  type: Component,
212
251
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-image *ngIf=\"instance\"\n [type]=\"instance.widget.imageType\"\n [imageUrl]=\"instance.url\"\n [icon]=\"instance.icon\"\n [flag]=\"instance.flag\"\n></ajf-image>\n", styles: [""] }]
@@ -239,7 +278,7 @@ class AjfMapWidgetComponent extends AjfBaseWidgetComponent {
239
278
  }
240
279
  }
241
280
  AjfMapWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfMapWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
242
- AjfMapWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfMapWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-map *ngIf=\"instance\"\n [coordinate]=\"instance.coordinate\"\n [tileLayer]=\"instance.widget.tileLayer\"\n [attribution]=\"instance.widget.attribution\"\n [disabled]=\"instance.widget.disabled\"\n></ajf-map>\n", styles: [""], components: [{ type: i1$4.AjfMapComponent, selector: "ajf-map", inputs: ["coordinate", "tileLayer", "attribution", "disabled"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
281
+ AjfMapWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfMapWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-map *ngIf=\"instance\"\n [coordinate]=\"instance.coordinate\"\n [tileLayer]=\"instance.widget.tileLayer\"\n [attribution]=\"instance.widget.attribution\"\n [disabled]=\"instance.widget.disabled\"\n></ajf-map>\n", styles: [""], components: [{ type: i1$5.AjfMapComponent, selector: "ajf-map", inputs: ["coordinate", "tileLayer", "attribution", "disabled"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
243
282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfMapWidgetComponent, decorators: [{
244
283
  type: Component,
245
284
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-map *ngIf=\"instance\"\n [coordinate]=\"instance.coordinate\"\n [tileLayer]=\"instance.widget.tileLayer\"\n [attribution]=\"instance.widget.attribution\"\n [disabled]=\"instance.widget.disabled\"\n></ajf-map>\n", styles: [""] }]
@@ -272,12 +311,45 @@ class AjfPageBreakWidgetComponent extends AjfBaseWidgetComponent {
272
311
  }
273
312
  }
274
313
  AjfPageBreakWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfPageBreakWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
275
- AjfPageBreakWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfPageBreakWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-page-break></ajf-page-break>\n", styles: [""], components: [{ type: i1$5.AjfPageBreakComponent, selector: "ajf-page-break" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
314
+ AjfPageBreakWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfPageBreakWidgetComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-page-break></ajf-page-break>\n", styles: [""], components: [{ type: i1$6.AjfPageBreakComponent, selector: "ajf-page-break" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
276
315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfPageBreakWidgetComponent, decorators: [{
277
316
  type: Component,
278
317
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-page-break></ajf-page-break>\n", styles: [""] }]
279
318
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
280
319
 
320
+ /**
321
+ * @license
322
+ * Copyright (C) Gnucoop soc. coop.
323
+ *
324
+ * This file is part of the Advanced JSON forms (ajf).
325
+ *
326
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
327
+ * modify it under the terms of the GNU Affero General Public License as
328
+ * published by the Free Software Foundation, either version 3 of the License,
329
+ * or (at your option) any later version.
330
+ *
331
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
332
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
333
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
334
+ * General Public License for more details.
335
+ *
336
+ * You should have received a copy of the GNU Affero General Public License
337
+ * along with Advanced JSON forms (ajf).
338
+ * If not, see http://www.gnu.org/licenses/.
339
+ *
340
+ */
341
+ class AjfGraphWidgetComponent extends AjfBaseWidgetComponent {
342
+ constructor(cdr, el) {
343
+ super(cdr, el);
344
+ }
345
+ }
346
+ AjfGraphWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfGraphWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
347
+ AjfGraphWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfGraphWidgetComponent, selector: "ajf-graph-widget", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"instance\" class=\"ajf-graph-container\">\n <ajf-graph [nodes]=\"instance.nodes\"></ajf-graph>\n</div>\n", styles: ["ajf-graph-widget{width:100%;height:600px}\n"], components: [{ type: i1$7.AjfGraphComponent, selector: "ajf-graph", inputs: ["nodes"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfGraphWidgetComponent, decorators: [{
349
+ type: Component,
350
+ args: [{ selector: 'ajf-graph-widget', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"instance\" class=\"ajf-graph-container\">\n <ajf-graph [nodes]=\"instance.nodes\"></ajf-graph>\n</div>\n", styles: ["ajf-graph-widget{width:100%;height:600px}\n"] }]
351
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
352
+
281
353
  /**
282
354
  * @license
283
355
  * Copyright (C) Gnucoop soc. coop.
@@ -378,6 +450,10 @@ const defaultWidgetsFactory = () => {
378
450
  defaultWidgets[AjfWidgetType.Column] = { component: AjfColumnWidgetComponent };
379
451
  defaultWidgets[AjfWidgetType.Formula] = { component: AjfFormulaWidgetComponent };
380
452
  defaultWidgets[AjfWidgetType.ImageContainer] = { component: AjfImageContainerWidgetComponent };
453
+ defaultWidgets[AjfWidgetType.Graph] = { component: AjfGraphWidgetComponent };
454
+ defaultWidgets[AjfWidgetType.PaginatedList] = { component: AjfPaginatedListWidgetComponent };
455
+ defaultWidgets[AjfWidgetType.Dialog] = { component: AjfDialogWidgetComponent };
456
+ defaultWidgets[AjfWidgetType.HeatMap] = { component: AjfHeatMapWidgetComponent };
381
457
  return defaultWidgets;
382
458
  };
383
459
  class AjfWidgetService extends AjfWidgetService$1 {
@@ -431,6 +507,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
431
507
  type: Component,
432
508
  args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"instance\" class=\"ajf-columns\">\n <div\n *ngFor=\"let column of instance.widget.columns; let idx = index\"\n [ngStyle]=\"{'flex-grow': column > -1 ? 1 : null, 'flex-basis' : column > -1 ? (column * 100) + '%' : null}\"\n class=\"ajf-column\"\n >\n <ng-container *ngIf=\"allcolumnsRendered$|async\">\n <ajf-widget *ngIf=\"(instance|ajfGetColumnContent:idx) as cc\" [instance]=\"cc!\">\n </ajf-widget>\n </ng-container>\n </div>\n</div>\n", styles: [".ajf-columns{flex:1 1 auto;display:flex;align-items:inherit;box-sizing:border-box}.ajf-columns>.ajf-column{box-sizing:border-box;display:flex;align-items:inherit;flex-shrink:1}\n"] }]
433
509
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
510
+ class AjfDialogWidgetComponent extends AjfBaseWidgetComponent {
511
+ constructor(cdr, el, _dialog) {
512
+ super(cdr, el);
513
+ this._dialog = _dialog;
514
+ }
515
+ openDialog() {
516
+ this._dialog.open(this.dialogContent);
517
+ }
518
+ }
519
+ AjfDialogWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfDialogWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
520
+ AjfDialogWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfDialogWidgetComponent, selector: "ng-component", viewQueries: [{ propertyName: "dialogContent", first: true, predicate: ["dialogContent"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<a *ngIf=\"instance\" class=\"ajf-dialog-toggle\" (click)=\"openDialog()\">\n <ajf-widget [instance]=\"instance.toggle\"></ajf-widget>\n</a>\n<ng-template #dialogContent>\n <ng-container *ngIf=\"instance\">\n <ng-container *ngFor=\"let item of instance.content\">\n <ajf-widget [instance]=\"item\"></ajf-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [".ajf-dialog-toggle{display:block;cursor:pointer}\n"], components: [{ type: AjfReportWidget, selector: "ajf-widget" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfDialogWidgetComponent, decorators: [{
522
+ type: Component,
523
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<a *ngIf=\"instance\" class=\"ajf-dialog-toggle\" (click)=\"openDialog()\">\n <ajf-widget [instance]=\"instance.toggle\"></ajf-widget>\n</a>\n<ng-template #dialogContent>\n <ng-container *ngIf=\"instance\">\n <ng-container *ngFor=\"let item of instance.content\">\n <ajf-widget [instance]=\"item\"></ajf-widget>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [".ajf-dialog-toggle{display:block;cursor:pointer}\n"] }]
524
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i4.MatDialog }]; }, propDecorators: { dialogContent: [{
525
+ type: ViewChild,
526
+ args: ['dialogContent', { read: TemplateRef }]
527
+ }] } });
528
+ class AjfPaginatedListWidgetComponent extends AjfBaseWidgetComponent {
529
+ constructor(cdr, el) {
530
+ super(cdr, el);
531
+ this._currentPage = 0;
532
+ this._pages = 0;
533
+ this._currentContent = [];
534
+ this._canGoForward = false;
535
+ this._canGoBackward = false;
536
+ }
537
+ get currentPage() {
538
+ return this._currentPage;
539
+ }
540
+ get pages() {
541
+ return this._pages;
542
+ }
543
+ get currentContent() {
544
+ return this._currentContent;
545
+ }
546
+ get canGoForward() {
547
+ return this._canGoForward;
548
+ }
549
+ get canGoBackward() {
550
+ return this._canGoBackward;
551
+ }
552
+ ngOnChanges(changes) {
553
+ if (changes['instance']) {
554
+ this._updateCurrentContent();
555
+ }
556
+ }
557
+ ngOnInit() {
558
+ this._updateCurrentContent();
559
+ }
560
+ goToPage(direction) {
561
+ const diff = direction === 'next' ? 1 : -1;
562
+ const newPage = this._currentPage + diff;
563
+ if (newPage <= 0 || newPage > this._pages) {
564
+ return;
565
+ }
566
+ this._currentPage = newPage;
567
+ this._canGoForward = newPage < this._pages;
568
+ this._canGoBackward = newPage > 1;
569
+ this._fillCurrentContent();
570
+ }
571
+ _updateCurrentContent() {
572
+ this._canGoBackward = false;
573
+ if (this.instance == null || this.instance.content.length === 0) {
574
+ this._currentPage = 0;
575
+ this._pages = 0;
576
+ }
577
+ else {
578
+ this._currentPage = 1;
579
+ const { content } = this.instance;
580
+ const { pageSize } = this.instance.widget;
581
+ this._pages = Math.ceil(content.length / pageSize);
582
+ this._canGoForward = this._pages > 1;
583
+ }
584
+ this._fillCurrentContent();
585
+ }
586
+ _fillCurrentContent() {
587
+ if (this.instance == null || this.instance.content.length === 0) {
588
+ this._currentContent = [];
589
+ return;
590
+ }
591
+ const { content } = this.instance;
592
+ const { pageSize } = this.instance.widget;
593
+ const start = (this._currentPage - 1) * pageSize;
594
+ this._currentContent = content.slice(start, start + pageSize);
595
+ this._cdr.markForCheck();
596
+ }
597
+ }
598
+ AjfPaginatedListWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfPaginatedListWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
599
+ AjfPaginatedListWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfPaginatedListWidgetComponent, selector: "ng-component", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"ajf-paginated-list\" *ngIf=\"instance && pages > 0\">\n <div class=\"ajf-paginated-list-title-container\">\n <div class=\"ajf-paginated-list-title\">{{ instance.widget.title }}</div>\n <div class=\"ajf-spacer\"></div>\n <div class=\"ajf-paginated-list-paginator\">\n <a (click)=\"goToPage('previous')\" class=\"ajf-paginated-list-btn ajf-paginated-list-back-btn\"\n [class.ajf-paginated-list-btn-disabled]=\"canGoBackward === false\"></a>\n <div class=\"ajf-paginated-list-paginator-page\">{{ currentPage }}</div>\n <div class=\"ajf-paginated-list-paginator-separator\"></div>\n <div class=\"ajf-paginated-list-paginator-pages\">{{ pages }}</div>\n <a (click)=\"goToPage('next')\" class=\"ajf-paginated-list-btn ajf-paginated-list-forward-btn\"\n [class.ajf-paginated-list-btn-disabled]=\"canGoForward === false\"></a>\n </div>\n </div>\n <div class=\"ajf-paginated-list-item\" *ngFor=\"let item of currentContent\">\n <ajf-widget [instance]=\"item\"></ajf-widget>\n </div>\n</div>\n", styles: [".ajf-paginated-list-title-container{display:flex;align-items:center}.ajf-spacer{flex:1 0 auto}.ajf-paginated-list-btn{cursor:pointer;display:block;width:32px;height:32px;position:relative}.ajf-paginated-list-btn:after{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.ajf-paginated-list-paginator-separator{width:16px;height:32px;position:relative}.ajf-paginated-list-paginator-separator:after{width:100%;height:100%;display:flex;justify-content:center;align-items:center;content:\"/\"}.ajf-paginated-list-btn-disabled{opacity:.5;cursor:default}.ajf-paginated-list-back-btn:after{content:\"<\"}.ajf-paginated-list-forward-btn:after{content:\">\"}.ajf-paginated-list-paginator{display:flex;align-items:center}.ajf-paginated-list-paginator>*{margin:0 .5em}\n"], components: [{ type: AjfReportWidget, selector: "ajf-widget" }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfPaginatedListWidgetComponent, decorators: [{
601
+ type: Component,
602
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ajf-paginated-list\" *ngIf=\"instance && pages > 0\">\n <div class=\"ajf-paginated-list-title-container\">\n <div class=\"ajf-paginated-list-title\">{{ instance.widget.title }}</div>\n <div class=\"ajf-spacer\"></div>\n <div class=\"ajf-paginated-list-paginator\">\n <a (click)=\"goToPage('previous')\" class=\"ajf-paginated-list-btn ajf-paginated-list-back-btn\"\n [class.ajf-paginated-list-btn-disabled]=\"canGoBackward === false\"></a>\n <div class=\"ajf-paginated-list-paginator-page\">{{ currentPage }}</div>\n <div class=\"ajf-paginated-list-paginator-separator\"></div>\n <div class=\"ajf-paginated-list-paginator-pages\">{{ pages }}</div>\n <a (click)=\"goToPage('next')\" class=\"ajf-paginated-list-btn ajf-paginated-list-forward-btn\"\n [class.ajf-paginated-list-btn-disabled]=\"canGoForward === false\"></a>\n </div>\n </div>\n <div class=\"ajf-paginated-list-item\" *ngFor=\"let item of currentContent\">\n <ajf-widget [instance]=\"item\"></ajf-widget>\n </div>\n</div>\n", styles: [".ajf-paginated-list-title-container{display:flex;align-items:center}.ajf-spacer{flex:1 0 auto}.ajf-paginated-list-btn{cursor:pointer;display:block;width:32px;height:32px;position:relative}.ajf-paginated-list-btn:after{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.ajf-paginated-list-paginator-separator{width:16px;height:32px;position:relative}.ajf-paginated-list-paginator-separator:after{width:100%;height:100%;display:flex;justify-content:center;align-items:center;content:\"/\"}.ajf-paginated-list-btn-disabled{opacity:.5;cursor:default}.ajf-paginated-list-back-btn:after{content:\"<\"}.ajf-paginated-list-forward-btn:after{content:\">\"}.ajf-paginated-list-paginator{display:flex;align-items:center}.ajf-paginated-list-paginator>*{margin:0 .5em}\n"] }]
603
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
434
604
 
435
605
  /**
436
606
  * @license
@@ -491,39 +661,49 @@ class AjfReportsModule {
491
661
  AjfReportsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfReportsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
492
662
  AjfReportsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfReportsModule, declarations: [AjfChartWidgetComponent,
493
663
  AjfColumnWidgetComponent,
664
+ AjfDialogWidgetComponent,
494
665
  AjfFilterWidgetComponent,
495
666
  AjfFormulaWidgetComponent,
667
+ AjfHeatMapWidgetComponent,
496
668
  AjfImageContainerWidgetComponent,
497
669
  AjfImageWidgetComponent,
670
+ AjfGraphWidgetComponent,
498
671
  AjfLayoutWidgetComponent,
499
672
  AjfMapWidgetComponent,
500
673
  AjfPageBreakWidgetComponent,
674
+ AjfPaginatedListWidgetComponent,
501
675
  AjfReportRenderer,
502
676
  AjfReportWidget,
503
677
  AjfTableWidgetComponent,
504
678
  AjfTextWidgetComponent], imports: [AjfChartModule,
505
679
  AjfCommonModule,
506
680
  AjfImageModule,
681
+ AjfFormsModule,
682
+ AjfGraphModule,
683
+ AjfHeatMapModule,
507
684
  AjfMapModule,
508
685
  AjfPageBreakModule,
509
686
  AjfTableModule,
510
687
  AjfTextModule,
511
- AjfFormsModule,
688
+ AjfTranslocoModule,
512
689
  CommonModule,
513
690
  AjfReportsModule$1,
514
- AjfTranslocoModule], exports: [AjfReportRenderer, AjfReportWidget] });
691
+ MatDialogModule], exports: [AjfReportRenderer, AjfReportWidget] });
515
692
  AjfReportsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfReportsModule, imports: [[
516
693
  AjfChartModule,
517
694
  AjfCommonModule,
518
695
  AjfImageModule,
696
+ AjfFormsModule,
697
+ AjfGraphModule,
698
+ AjfHeatMapModule,
519
699
  AjfMapModule,
520
700
  AjfPageBreakModule,
521
701
  AjfTableModule,
522
702
  AjfTextModule,
523
- AjfFormsModule,
703
+ AjfTranslocoModule,
524
704
  CommonModule,
525
705
  AjfReportsModule$1,
526
- AjfTranslocoModule,
706
+ MatDialogModule,
527
707
  ]] });
528
708
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfReportsModule, decorators: [{
529
709
  type: NgModule,
@@ -532,25 +712,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
532
712
  AjfChartModule,
533
713
  AjfCommonModule,
534
714
  AjfImageModule,
715
+ AjfFormsModule,
716
+ AjfGraphModule,
717
+ AjfHeatMapModule,
535
718
  AjfMapModule,
536
719
  AjfPageBreakModule,
537
720
  AjfTableModule,
538
721
  AjfTextModule,
539
- AjfFormsModule,
722
+ AjfTranslocoModule,
540
723
  CommonModule,
541
724
  AjfReportsModule$1,
542
- AjfTranslocoModule,
725
+ MatDialogModule,
543
726
  ],
544
727
  declarations: [
545
728
  AjfChartWidgetComponent,
546
729
  AjfColumnWidgetComponent,
730
+ AjfDialogWidgetComponent,
547
731
  AjfFilterWidgetComponent,
548
732
  AjfFormulaWidgetComponent,
733
+ AjfHeatMapWidgetComponent,
549
734
  AjfImageContainerWidgetComponent,
550
735
  AjfImageWidgetComponent,
736
+ AjfGraphWidgetComponent,
551
737
  AjfLayoutWidgetComponent,
552
738
  AjfMapWidgetComponent,
553
739
  AjfPageBreakWidgetComponent,
740
+ AjfPaginatedListWidgetComponent,
554
741
  AjfReportRenderer,
555
742
  AjfReportWidget,
556
743
  AjfTableWidgetComponent,
@@ -586,5 +773,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
586
773
  * Generated bundle index. Do not edit.
587
774
  */
588
775
 
589
- export { AjfChartWidgetComponent, AjfColumnWidgetComponent, AjfFilterWidgetComponent, AjfFormulaWidgetComponent, AjfImageContainerWidgetComponent, AjfImageWidgetComponent, AjfLayoutWidgetComponent, AjfMapWidgetComponent, AjfPageBreakWidgetComponent, AjfReportRenderer, AjfReportWidget, AjfReportsModule, AjfTableWidgetComponent, AjfTextWidgetComponent, AjfWidgetService };
776
+ export { AjfChartWidgetComponent, AjfColumnWidgetComponent, AjfDialogWidgetComponent, AjfFilterWidgetComponent, AjfFormulaWidgetComponent, AjfHeatMapWidgetComponent, AjfImageContainerWidgetComponent, AjfImageWidgetComponent, AjfLayoutWidgetComponent, AjfMapWidgetComponent, AjfPageBreakWidgetComponent, AjfPaginatedListWidgetComponent, AjfReportRenderer, AjfReportWidget, AjfReportsModule, AjfTableWidgetComponent, AjfTextWidgetComponent, AjfWidgetService };
590
777
  //# sourceMappingURL=ajf-material-reports.mjs.map