@colijnit/extendedcomponents 12.0.8 → 12.0.10

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.
@@ -1267,6 +1267,7 @@
1267
1267
  this.depth = 0;
1268
1268
  this.indentation = 10;
1269
1269
  this.dataPipe = null;
1270
+ this.dataPointClicked = new i0.EventEmitter();
1270
1271
  }
1271
1272
  RecursiveListComponent.prototype.toggleCollapse = function (event, item) {
1272
1273
  event.stopPropagation(); // Stop event propagation here
@@ -1286,15 +1287,18 @@
1286
1287
  return dataValue.toString(); // No formatting needed
1287
1288
  }
1288
1289
  };
1290
+ RecursiveListComponent.prototype.handleDataPointClicked = function (event) {
1291
+ this.dataPointClicked.emit(event);
1292
+ };
1289
1293
  return RecursiveListComponent;
1290
1294
  }());
1291
1295
  RecursiveListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecursiveListComponent, deps: [{ token: IconCacheService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1292
- RecursiveListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RecursiveListComponent, selector: "co-recursive-list", inputs: { collection: "collection", columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", depth: "depth", indentation: "indentation", dataPipe: "dataPipe", params: "params" }, ngImport: i0__namespace, template: "\n <div class=\"co-recursive-list\">\n <div class=\"table-header-row\">\n <div class=\"table-legend\" *ngIf=\"tableLegend.length > 1\">\n <span [textContent]=\"tableLegend | localize\"></span>\n </div>\n <div class=\"table-header\" *ngIf=\"columns && columns.length > 0\">\n <div class=\"table-row\">\n <div class=\"table-cell\" *ngFor=\"let column of columns\">\n <span [textContent]=\"formatDataValue(column) | localize\"></span>\n </div>\n </div>\n <div class=\"table-row\" *ngIf=\"subColumns && subColumns.length > 0\">\n <div class=\"table-cell\" *ngFor=\"let column of subColumns\">\n <span [textContent]=\"formatDataValue(column)\"></span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"tree-node\" [class.background]=\"depth === 0\" *ngFor=\"let item of collection\" (click)=\"toggleCollapse($event, item)\">\n <div class=\"table-row\">\n <div class=\"table-cell node-text-icon\" [ngStyle]=\"{'padding-left.px' : indentation}\">\n <co-icon *ngIf=\"item.children && item.children.length > 0\" [iconData]=\"iconCacheService.getIcon(getCurrentIcon(item))\"></co-icon>\n <span [textContent]=\"item.name\"></span>\n </div>\n <div class=\"table-cell data-points\">\n <div *ngFor=\"let dataPoint of item.data\" class=\"custom-property\">\n <span [textContent]=\"formatDataValue(dataPoint, params)\"></span>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"item.children && item.children.length > 0 && item.expanded\">\n <co-recursive-list [dataPipe]=\"dataPipe\" [collection]=\"item.children\" [depth]=\"depth + 1\" [indentation]=\"indentation + 20\" [params]=\"params\"></co-recursive-list>\n </ng-container>\n </div>\n </div>\n ", isInline: true, components: [{ type: i2__namespace.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "localize": LocalizePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
1296
+ RecursiveListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RecursiveListComponent, selector: "co-recursive-list", inputs: { collection: "collection", columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", depth: "depth", indentation: "indentation", dataPipe: "dataPipe", params: "params" }, outputs: { dataPointClicked: "dataPointClicked" }, ngImport: i0__namespace, template: "\n <div class=\"co-recursive-list\">\n <div class=\"table-header-row\">\n <div class=\"table-legend\" *ngIf=\"tableLegend.length > 1\">\n <span [textContent]=\"tableLegend | localize\"></span>\n </div>\n <div class=\"table-header\" *ngIf=\"columns && columns.length > 0\">\n <div class=\"table-row\">\n <div class=\"table-cell\" *ngFor=\"let column of columns\">\n <span [textContent]=\"formatDataValue(column) | localize\"></span>\n </div>\n </div>\n <div class=\"table-row\" *ngIf=\"subColumns && subColumns.length > 0\">\n <div class=\"table-cell\" *ngFor=\"let column of subColumns\">\n <span [textContent]=\"formatDataValue(column)\"></span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"tree-node\" [class.background]=\"depth === 0\" *ngFor=\"let item of collection\" (click)=\"toggleCollapse($event, item)\">\n <div class=\"table-row\">\n <div class=\"table-cell node-text-icon\" [ngStyle]=\"{'padding-left.px' : indentation}\">\n <co-icon *ngIf=\"item.children && item.children.length > 0\" [iconData]=\"iconCacheService.getIcon(getCurrentIcon(item))\"></co-icon>\n <span (click)=\"handleDataPointClicked(item.name)\" [textContent]=\"item.name\"></span>\n </div>\n <div class=\"table-cell data-points\">\n <div *ngFor=\"let dataPoint of item.data\" class=\"custom-property\">\n <span [textContent]=\"formatDataValue(dataPoint, params)\"></span>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"item.children && item.children.length > 0 && item.expanded\">\n <co-recursive-list [dataPipe]=\"dataPipe\" [collection]=\"item.children\" [depth]=\"depth + 1\" [indentation]=\"indentation + 20\" [params]=\"params\" (dataPointClicked)=\"handleDataPointClicked($event)\"></co-recursive-list>\n </ng-container>\n </div>\n </div>\n ", isInline: true, components: [{ type: i2__namespace.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"], outputs: ["dataPointClicked"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "localize": LocalizePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
1293
1297
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecursiveListComponent, decorators: [{
1294
1298
  type: i0.Component,
1295
1299
  args: [{
1296
1300
  selector: 'co-recursive-list',
1297
- template: "\n <div class=\"co-recursive-list\">\n <div class=\"table-header-row\">\n <div class=\"table-legend\" *ngIf=\"tableLegend.length > 1\">\n <span [textContent]=\"tableLegend | localize\"></span>\n </div>\n <div class=\"table-header\" *ngIf=\"columns && columns.length > 0\">\n <div class=\"table-row\">\n <div class=\"table-cell\" *ngFor=\"let column of columns\">\n <span [textContent]=\"formatDataValue(column) | localize\"></span>\n </div>\n </div>\n <div class=\"table-row\" *ngIf=\"subColumns && subColumns.length > 0\">\n <div class=\"table-cell\" *ngFor=\"let column of subColumns\">\n <span [textContent]=\"formatDataValue(column)\"></span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"tree-node\" [class.background]=\"depth === 0\" *ngFor=\"let item of collection\" (click)=\"toggleCollapse($event, item)\">\n <div class=\"table-row\">\n <div class=\"table-cell node-text-icon\" [ngStyle]=\"{'padding-left.px' : indentation}\">\n <co-icon *ngIf=\"item.children && item.children.length > 0\" [iconData]=\"iconCacheService.getIcon(getCurrentIcon(item))\"></co-icon>\n <span [textContent]=\"item.name\"></span>\n </div>\n <div class=\"table-cell data-points\">\n <div *ngFor=\"let dataPoint of item.data\" class=\"custom-property\">\n <span [textContent]=\"formatDataValue(dataPoint, params)\"></span>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"item.children && item.children.length > 0 && item.expanded\">\n <co-recursive-list [dataPipe]=\"dataPipe\" [collection]=\"item.children\" [depth]=\"depth + 1\" [indentation]=\"indentation + 20\" [params]=\"params\"></co-recursive-list>\n </ng-container>\n </div>\n </div>\n ",
1301
+ template: "\n <div class=\"co-recursive-list\">\n <div class=\"table-header-row\">\n <div class=\"table-legend\" *ngIf=\"tableLegend.length > 1\">\n <span [textContent]=\"tableLegend | localize\"></span>\n </div>\n <div class=\"table-header\" *ngIf=\"columns && columns.length > 0\">\n <div class=\"table-row\">\n <div class=\"table-cell\" *ngFor=\"let column of columns\">\n <span [textContent]=\"formatDataValue(column) | localize\"></span>\n </div>\n </div>\n <div class=\"table-row\" *ngIf=\"subColumns && subColumns.length > 0\">\n <div class=\"table-cell\" *ngFor=\"let column of subColumns\">\n <span [textContent]=\"formatDataValue(column)\"></span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"tree-node\" [class.background]=\"depth === 0\" *ngFor=\"let item of collection\" (click)=\"toggleCollapse($event, item)\">\n <div class=\"table-row\">\n <div class=\"table-cell node-text-icon\" [ngStyle]=\"{'padding-left.px' : indentation}\">\n <co-icon *ngIf=\"item.children && item.children.length > 0\" [iconData]=\"iconCacheService.getIcon(getCurrentIcon(item))\"></co-icon>\n <span (click)=\"handleDataPointClicked(item.name)\" [textContent]=\"item.name\"></span>\n </div>\n <div class=\"table-cell data-points\">\n <div *ngFor=\"let dataPoint of item.data\" class=\"custom-property\">\n <span [textContent]=\"formatDataValue(dataPoint, params)\"></span>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"item.children && item.children.length > 0 && item.expanded\">\n <co-recursive-list [dataPipe]=\"dataPipe\" [collection]=\"item.children\" [depth]=\"depth + 1\" [indentation]=\"indentation + 20\" [params]=\"params\" (dataPointClicked)=\"handleDataPointClicked($event)\"></co-recursive-list>\n </ng-container>\n </div>\n </div>\n ",
1298
1302
  encapsulation: i0.ViewEncapsulation.None,
1299
1303
  }]
1300
1304
  }], ctorParameters: function () { return [{ type: IconCacheService }]; }, propDecorators: { collection: [{
@@ -1313,79 +1317,30 @@
1313
1317
  type: i0.Input
1314
1318
  }], params: [{
1315
1319
  type: i0.Input
1320
+ }], dataPointClicked: [{
1321
+ type: i0.Output
1316
1322
  }] } });
1317
1323
 
1318
1324
  // summary-grid.component.ts
1319
1325
  var SummaryGridComponent = /** @class */ (function () {
1320
1326
  function SummaryGridComponent() {
1321
1327
  this.showClass = true;
1322
- this.columns = ['Column1', 'Column2']; // Add your column headers here
1323
- this.subColumns = ['SubColumn1', 'SubColumn2']; // Add your column headers here
1324
- this.tableLegend = "Legend";
1328
+ this.columns = [];
1329
+ this.subColumns = [];
1330
+ this.tableLegend = "";
1325
1331
  this.dataPipe = null;
1326
- this.collection = [
1327
- {
1328
- name: 'Root 1',
1329
- expanded: false,
1330
- data: [1, 2],
1331
- children: [
1332
- {
1333
- name: 'Child 1.1',
1334
- expanded: false,
1335
- data: [3, 4],
1336
- children: [
1337
- {
1338
- name: 'Grandchild 1.1.1',
1339
- expanded: false,
1340
- data: [5, 6],
1341
- },
1342
- {
1343
- name: 'Grandchild 1.1.2',
1344
- expanded: false,
1345
- data: [7, 0],
1346
- },
1347
- ],
1348
- },
1349
- // ... other nodes
1350
- ],
1351
- },
1352
- {
1353
- name: 'Root 2',
1354
- expanded: false,
1355
- data: [9, 10],
1356
- children: [
1357
- {
1358
- name: 'Child 2.1',
1359
- expanded: false,
1360
- data: [11, 12],
1361
- children: [
1362
- {
1363
- name: 'Grandchild 2.1.1',
1364
- expanded: false,
1365
- data: [13, 14],
1366
- },
1367
- {
1368
- name: 'Grandchild 2.1.2',
1369
- expanded: false,
1370
- data: [15, 16],
1371
- },
1372
- ],
1373
- },
1374
- // ... other nodes
1375
- ],
1376
- },
1377
- // ... other root nodes
1378
- ];
1332
+ this.collection = [];
1333
+ this.dataPointClickedEvent = new i0.EventEmitter();
1379
1334
  }
1380
1335
  return SummaryGridComponent;
1381
1336
  }());
1382
1337
  SummaryGridComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SummaryGridComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1383
- SummaryGridComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SummaryGridComponent, selector: "co-summary-grid", inputs: { columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", dataPipe: "dataPipe", params: "params", collection: "collection" }, host: { properties: { "class.co-summary-grid": "this.showClass" } }, ngImport: i0__namespace, template: "\n <co-recursive-list\n [collection]=\"collection\"\n [columns]=\"columns\"\n [subColumns]=\"subColumns\"\n [tableLegend]=\"tableLegend\"\n [dataPipe]=\"dataPipe\"\n [params]=\"params\"\n ></co-recursive-list>\n ", isInline: true, components: [{ type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
1338
+ SummaryGridComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SummaryGridComponent, selector: "co-summary-grid", inputs: { columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", dataPipe: "dataPipe", params: "params", collection: "collection" }, outputs: { dataPointClickedEvent: "dataPointClickedEvent" }, host: { properties: { "class.co-summary-grid": "this.showClass" } }, ngImport: i0__namespace, template: "\n <co-recursive-list\n [collection]=\"collection\"\n [columns]=\"columns\"\n [subColumns]=\"subColumns\"\n [tableLegend]=\"tableLegend\"\n [dataPipe]=\"dataPipe\"\n [params]=\"params\"\n (dataPointClicked)=\"dataPointClickedEvent.emit($event)\"\n ></co-recursive-list>\n ", isInline: true, components: [{ type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"], outputs: ["dataPointClicked"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
1384
1339
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SummaryGridComponent, decorators: [{
1385
1340
  type: i0.Component,
1386
1341
  args: [{
1387
1342
  selector: 'co-summary-grid',
1388
- template: "\n <co-recursive-list\n [collection]=\"collection\"\n [columns]=\"columns\"\n [subColumns]=\"subColumns\"\n [tableLegend]=\"tableLegend\"\n [dataPipe]=\"dataPipe\"\n [params]=\"params\"\n ></co-recursive-list>\n ",
1343
+ template: "\n <co-recursive-list\n [collection]=\"collection\"\n [columns]=\"columns\"\n [subColumns]=\"subColumns\"\n [tableLegend]=\"tableLegend\"\n [dataPipe]=\"dataPipe\"\n [params]=\"params\"\n (dataPointClicked)=\"dataPointClickedEvent.emit($event)\"\n ></co-recursive-list>\n ",
1389
1344
  encapsulation: i0.ViewEncapsulation.None,
1390
1345
  }]
1391
1346
  }], propDecorators: { showClass: [{
@@ -1403,6 +1358,8 @@
1403
1358
  type: i0.Input
1404
1359
  }], collection: [{
1405
1360
  type: i0.Input
1361
+ }], dataPointClickedEvent: [{
1362
+ type: i0.Output
1406
1363
  }] } });
1407
1364
 
1408
1365
  var ExtendedComponentsTranslationService = /** @class */ (function () {