@onecx/angular-accelerator 5.6.0 → 5.8.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.
Files changed (29) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/lib/angular-accelerator-primeng.module.mjs +14 -7
  3. package/esm2022/lib/angular-accelerator.module.mjs +10 -9
  4. package/esm2022/lib/components/data-layout-selection/data-layout-selection.component.mjs +9 -9
  5. package/esm2022/lib/components/data-list-grid/data-list-grid.component.mjs +174 -8
  6. package/esm2022/lib/components/data-table/data-table.component.mjs +256 -6
  7. package/esm2022/lib/components/data-view/data-view.component.mjs +235 -6
  8. package/esm2022/lib/components/interactive-data-view/interactive-data-view.component.mjs +190 -4
  9. package/esm2022/lib/components/page-header/page-header.component.mjs +3 -3
  10. package/esm2022/lib/directives/tooltipOnOverflow.directive.mjs +48 -0
  11. package/esm2022/lib/model/column-type.model.mjs +7 -1
  12. package/esm2022/testing/data-table.harness.mjs +2 -2
  13. package/esm2022/testing/data-view.harness.mjs +3 -3
  14. package/fesm2022/onecx-angular-accelerator-testing.mjs +3 -3
  15. package/fesm2022/onecx-angular-accelerator-testing.mjs.map +1 -1
  16. package/fesm2022/onecx-angular-accelerator.mjs +1036 -157
  17. package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
  18. package/index.d.ts +1 -0
  19. package/lib/angular-accelerator-primeng.module.d.ts +2 -1
  20. package/lib/angular-accelerator.module.d.ts +7 -6
  21. package/lib/components/data-list-grid/data-list-grid.component.d.ts +51 -8
  22. package/lib/components/data-table/data-table.component.d.ts +76 -4
  23. package/lib/components/data-view/data-view.component.d.ts +83 -3
  24. package/lib/components/interactive-data-view/interactive-data-view.component.d.ts +55 -7
  25. package/lib/directives/tooltipOnOverflow.directive.d.ts +14 -0
  26. package/lib/model/column-type.model.d.ts +6 -0
  27. package/package.json +2 -1
  28. package/testing/data-table.harness.d.ts +1 -1
  29. package/testing/data-view.harness.d.ts +2 -2
@@ -1,13 +1,15 @@
1
- import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
- import { DataTableColumn } from '../../model/data-table-column.model';
1
+ import { AfterContentInit, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
2
+ import { PrimeTemplate } from 'primeng/api';
3
+ import { DataAction } from '../../model/data-action';
3
4
  import { DataSortDirection } from '../../model/data-sort-direction';
4
- import { Filter, Row, Sort } from '../data-table/data-table.component';
5
- import { DataViewComponent, RowListGridData } from '../data-view/data-view.component';
5
+ import { DataTableColumn } from '../../model/data-table-column.model';
6
6
  import { GroupSelectionChangedEvent } from '../column-group-selection/column-group-selection.component';
7
7
  import { ActionColumnChangedEvent, ColumnSelectionChangedEvent } from '../custom-group-column-selector/custom-group-column-selector.component';
8
- import { DataAction } from '../../model/data-action';
8
+ import { Filter, Row, Sort } from '../data-table/data-table.component';
9
+ import { DataViewComponent, RowListGridData } from '../data-view/data-view.component';
10
+ import { BehaviorSubject } from 'rxjs';
9
11
  import * as i0 from "@angular/core";
10
- export declare class InteractiveDataViewComponent implements OnInit {
12
+ export declare class InteractiveDataViewComponent implements OnInit, AfterContentInit {
11
13
  _dataViewComponent: DataViewComponent | undefined;
12
14
  set dataView(ref: DataViewComponent | undefined);
13
15
  get dataView(): DataViewComponent | undefined;
@@ -70,10 +72,41 @@ export declare class InteractiveDataViewComponent implements OnInit {
70
72
  listItemSubtitleLines: TemplateRef<any> | undefined;
71
73
  stringTableCell: TemplateRef<any> | undefined;
72
74
  numberTableCell: TemplateRef<any> | undefined;
75
+ /**
76
+ * @deprecated Will be removed and instead to change the template of a specific column
77
+ * use the new approach instead by following the naming convention column id + IdTableCell
78
+ * e.g. for a column with the id 'status' in DataTable use pTemplate="statusIdTableCell"
79
+ */
73
80
  customTableCell: TemplateRef<any> | undefined;
74
81
  gridItem: TemplateRef<any> | undefined;
75
82
  listItem: TemplateRef<any> | undefined;
76
83
  topCenter: TemplateRef<any> | undefined;
84
+ listValue: TemplateRef<any> | undefined;
85
+ translationKeyListValue: TemplateRef<any> | undefined;
86
+ numberListValue: TemplateRef<any> | undefined;
87
+ relativeDateListValue: TemplateRef<any> | undefined;
88
+ /**
89
+ * @deprecated Will be removed and instead to change the template of a specific column
90
+ * use the new approach instead by following the naming convention column id + IdListValue
91
+ * e.g. for a column with the id 'status' DataListGrid use pTemplate="statusIdListValue"
92
+ */
93
+ customListValue: TemplateRef<any> | undefined;
94
+ stringListValue: TemplateRef<any> | undefined;
95
+ dateListValue: TemplateRef<any> | undefined;
96
+ tableFilterCell: TemplateRef<any> | undefined;
97
+ dateTableFilterCell: TemplateRef<any> | undefined;
98
+ relativeDateTableFilterCell: TemplateRef<any> | undefined;
99
+ translationKeyTableFilterCell: TemplateRef<any> | undefined;
100
+ stringTableFilterCell: TemplateRef<any> | undefined;
101
+ numberTableFilterCell: TemplateRef<any> | undefined;
102
+ /**
103
+ * @deprecated Will be removed and instead to change the template of a specific column filter
104
+ * use the new approach instead by following the naming convention column id + IdTableFilterCell
105
+ * e.g. for a column with the id 'status' in DataTable use pTemplate="statusIdTableFilterCell"
106
+ */
107
+ customTableFilterCell: TemplateRef<any> | undefined;
108
+ templates$: BehaviorSubject<QueryList<PrimeTemplate> | undefined>;
109
+ set templates(value: QueryList<PrimeTemplate> | undefined);
77
110
  filtered: EventEmitter<Filter[]>;
78
111
  sorted: EventEmitter<Sort>;
79
112
  deleteItem: EventEmitter<RowListGridData>;
@@ -104,10 +137,25 @@ export declare class InteractiveDataViewComponent implements OnInit {
104
137
  get _translationKeyTableCell(): TemplateRef<any> | undefined;
105
138
  get _gridItem(): TemplateRef<any> | undefined;
106
139
  get _listItem(): TemplateRef<any> | undefined;
140
+ get _listValue(): TemplateRef<any> | undefined;
141
+ get _translationKeyListValue(): TemplateRef<any> | undefined;
142
+ get _numberListValue(): TemplateRef<any> | undefined;
143
+ get _relativeDateListValue(): TemplateRef<any> | undefined;
144
+ get _customListValue(): TemplateRef<any> | undefined;
145
+ get _stringListValue(): TemplateRef<any> | undefined;
146
+ get _dateListValue(): TemplateRef<any> | undefined;
147
+ get _tableFilterCell(): TemplateRef<any> | undefined;
148
+ get _dateTableFilterCell(): TemplateRef<any> | undefined;
149
+ get _relativeDateTableFilterCell(): TemplateRef<any> | undefined;
150
+ get _translationKeyTableFilterCell(): TemplateRef<any> | undefined;
151
+ get _stringTableFilterCell(): TemplateRef<any> | undefined;
152
+ get _numberTableFilterCell(): TemplateRef<any> | undefined;
153
+ get _customTableFilterCell(): TemplateRef<any> | undefined;
107
154
  _data: RowListGridData[];
108
155
  get data(): RowListGridData[];
109
156
  set data(value: RowListGridData[]);
110
157
  ngOnInit(): void;
158
+ ngAfterContentInit(): void;
111
159
  filtering(event: any): void;
112
160
  sorting(event: any): void;
113
161
  onDeleteElement(element: RowListGridData): void;
@@ -123,5 +171,5 @@ export declare class InteractiveDataViewComponent implements OnInit {
123
171
  onRowSelectionChange(event: Row[]): void;
124
172
  onPageChange(event: number): void;
125
173
  static ɵfac: i0.ɵɵFactoryDeclaration<InteractiveDataViewComponent, never>;
126
- static ɵcmp: i0.ɵɵComponentDeclaration<InteractiveDataViewComponent, "ocx-interactive-data-view", never, { "deletePermission": { "alias": "deletePermission"; "required": false; }; "editPermission": { "alias": "editPermission"; "required": false; }; "viewPermission": { "alias": "viewPermission"; "required": false; }; "deleteActionVisibleField": { "alias": "deleteActionVisibleField"; "required": false; }; "deleteActionEnabledField": { "alias": "deleteActionEnabledField"; "required": false; }; "viewActionVisibleField": { "alias": "viewActionVisibleField"; "required": false; }; "viewActionEnabledField": { "alias": "viewActionEnabledField"; "required": false; }; "editActionVisibleField": { "alias": "editActionVisibleField"; "required": false; }; "editActionEnabledField": { "alias": "editActionEnabledField"; "required": false; }; "name": { "alias": "name"; "required": false; }; "titleLineId": { "alias": "titleLineId"; "required": false; }; "subtitleLineIds": { "alias": "subtitleLineIds"; "required": false; }; "supportedViewLayouts": { "alias": "supportedViewLayouts"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "emptyResultsMessage": { "alias": "emptyResultsMessage"; "required": false; }; "clientSideSorting": { "alias": "clientSideSorting"; "required": false; }; "clientSideFiltering": { "alias": "clientSideFiltering"; "required": false; }; "fallbackImage": { "alias": "fallbackImage"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortField": { "alias": "sortField"; "required": false; }; "sortStates": { "alias": "sortStates"; "required": false; }; "pageSizes": { "alias": "pageSizes"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalRecordsOnServer": { "alias": "totalRecordsOnServer"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "defaultGroupKey": { "alias": "defaultGroupKey"; "required": false; }; "customGroupKey": { "alias": "customGroupKey"; "required": false; }; "groupSelectionNoGroupSelectedKey": { "alias": "groupSelectionNoGroupSelectedKey"; "required": false; }; "currentPageShowingKey": { "alias": "currentPageShowingKey"; "required": false; }; "currentPageShowingWithTotalOnServerKey": { "alias": "currentPageShowingWithTotalOnServerKey"; "required": false; }; "additionalActions": { "alias": "additionalActions"; "required": false; }; "listGridPaginator": { "alias": "listGridPaginator"; "required": false; }; "tablePaginator": { "alias": "tablePaginator"; "required": false; }; "page": { "alias": "page"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "frozenActionColumn": { "alias": "frozenActionColumn"; "required": false; }; "actionColumnPosition": { "alias": "actionColumnPosition"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "filtered": "filtered"; "sorted": "sorted"; "deleteItem": "deleteItem"; "viewItem": "viewItem"; "editItem": "editItem"; "dataViewLayoutChange": "dataViewLayoutChange"; "displayedColumnsChange": "displayedColumnsChange"; "selectionChanged": "selectionChanged"; "pageChanged": "pageChanged"; }, ["tableCell", "tableDateCell", "dateTableCell", "tableRelativeDateCell", "relativeDateTableCell", "tableTranslationKeyCell", "translationKeyTableCell", "gridItemSubtitleLines", "listItemSubtitleLines", "stringTableCell", "numberTableCell", "customTableCell", "gridItem", "listItem", "topCenter"], never, false, never>;
174
+ static ɵcmp: i0.ɵɵComponentDeclaration<InteractiveDataViewComponent, "ocx-interactive-data-view", never, { "deletePermission": { "alias": "deletePermission"; "required": false; }; "editPermission": { "alias": "editPermission"; "required": false; }; "viewPermission": { "alias": "viewPermission"; "required": false; }; "deleteActionVisibleField": { "alias": "deleteActionVisibleField"; "required": false; }; "deleteActionEnabledField": { "alias": "deleteActionEnabledField"; "required": false; }; "viewActionVisibleField": { "alias": "viewActionVisibleField"; "required": false; }; "viewActionEnabledField": { "alias": "viewActionEnabledField"; "required": false; }; "editActionVisibleField": { "alias": "editActionVisibleField"; "required": false; }; "editActionEnabledField": { "alias": "editActionEnabledField"; "required": false; }; "name": { "alias": "name"; "required": false; }; "titleLineId": { "alias": "titleLineId"; "required": false; }; "subtitleLineIds": { "alias": "subtitleLineIds"; "required": false; }; "supportedViewLayouts": { "alias": "supportedViewLayouts"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "emptyResultsMessage": { "alias": "emptyResultsMessage"; "required": false; }; "clientSideSorting": { "alias": "clientSideSorting"; "required": false; }; "clientSideFiltering": { "alias": "clientSideFiltering"; "required": false; }; "fallbackImage": { "alias": "fallbackImage"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortField": { "alias": "sortField"; "required": false; }; "sortStates": { "alias": "sortStates"; "required": false; }; "pageSizes": { "alias": "pageSizes"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalRecordsOnServer": { "alias": "totalRecordsOnServer"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "defaultGroupKey": { "alias": "defaultGroupKey"; "required": false; }; "customGroupKey": { "alias": "customGroupKey"; "required": false; }; "groupSelectionNoGroupSelectedKey": { "alias": "groupSelectionNoGroupSelectedKey"; "required": false; }; "currentPageShowingKey": { "alias": "currentPageShowingKey"; "required": false; }; "currentPageShowingWithTotalOnServerKey": { "alias": "currentPageShowingWithTotalOnServerKey"; "required": false; }; "additionalActions": { "alias": "additionalActions"; "required": false; }; "listGridPaginator": { "alias": "listGridPaginator"; "required": false; }; "tablePaginator": { "alias": "tablePaginator"; "required": false; }; "page": { "alias": "page"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "frozenActionColumn": { "alias": "frozenActionColumn"; "required": false; }; "actionColumnPosition": { "alias": "actionColumnPosition"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "filtered": "filtered"; "sorted": "sorted"; "deleteItem": "deleteItem"; "viewItem": "viewItem"; "editItem": "editItem"; "dataViewLayoutChange": "dataViewLayoutChange"; "displayedColumnsChange": "displayedColumnsChange"; "selectionChanged": "selectionChanged"; "pageChanged": "pageChanged"; }, ["tableCell", "tableDateCell", "dateTableCell", "tableRelativeDateCell", "relativeDateTableCell", "tableTranslationKeyCell", "translationKeyTableCell", "gridItemSubtitleLines", "listItemSubtitleLines", "stringTableCell", "numberTableCell", "customTableCell", "gridItem", "listItem", "topCenter", "listValue", "translationKeyListValue", "numberListValue", "relativeDateListValue", "customListValue", "stringListValue", "dateListValue", "tableFilterCell", "dateTableFilterCell", "relativeDateTableFilterCell", "translationKeyTableFilterCell", "stringTableFilterCell", "numberTableFilterCell", "customTableFilterCell", "templates"], never, false, never>;
127
175
  }
@@ -0,0 +1,14 @@
1
+ import { AfterViewInit, ElementRef, NgZone, OnDestroy, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { PrimeNGConfig } from 'primeng/api';
3
+ import { Tooltip } from 'primeng/tooltip';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TooltipOnOverflowDirective extends Tooltip implements OnDestroy, AfterViewInit {
6
+ mutationObserver: MutationObserver;
7
+ get ocxTooltipOnOverflow(): string | TemplateRef<HTMLElement> | undefined;
8
+ set ocxTooltipOnOverflow(value: string | TemplateRef<HTMLElement> | undefined);
9
+ ngOnDestroy(): void;
10
+ ngAfterViewInit(): void;
11
+ constructor(platformId: any, el: ElementRef, zone: NgZone, config: PrimeNGConfig, renderer: Renderer2, viewContainer: ViewContainerRef);
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipOnOverflowDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipOnOverflowDirective, "[ocxTooltipOnOverflow]", never, { "ocxTooltipOnOverflow": { "alias": "ocxTooltipOnOverflow"; "required": false; }; }, {}, never, never, false, never>;
14
+ }
@@ -4,5 +4,11 @@ export declare enum ColumnType {
4
4
  DATE = "DATE",
5
5
  RELATIVE_DATE = "RELATIVE_DATE",
6
6
  TRANSLATION_KEY = "TRANSLATION_KEY",
7
+ /**
8
+ * @deprecated Will be removed with the next major v6 upgrade.
9
+ * Please use pTemplate="column id + IdCell" in DataTable or
10
+ * pTemplate="column id + IdTableCell" in DataView and InteractiveDataView
11
+ * e.g. for a column with the id 'status' in DataTable use pTemplate="statusIdCell"
12
+ */
7
13
  CUSTOM = "CUSTOM"
8
14
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@onecx/angular-accelerator",
3
- "version": "5.6.0",
3
+ "version": "5.8.0",
4
+ "license": "Apache-2.0",
4
5
  "peerDependencies": {
5
6
  "@angular/common": "^18.0.5",
6
7
  "@angular/core": "^18.0.5",
@@ -13,5 +13,5 @@ export declare class DataTableHarness extends ContentContainerComponentHarness {
13
13
  actionButtonIsDisabled(actionButton: TestElement): Promise<any>;
14
14
  hasAmountOfActionButtons(amount: number): Promise<boolean>;
15
15
  hasAmountOfDisabledActionButtons(amount: number): Promise<boolean>;
16
- columnIsFrozen(column: TestElement | null): Promise<boolean>;
16
+ columnIsFrozen(column: TestElement | null | undefined): Promise<boolean>;
17
17
  }
@@ -3,6 +3,6 @@ import { DataListGridHarness } from './data-list-grid.harness';
3
3
  import { DataTableHarness } from './data-table.harness';
4
4
  export declare class DataViewHarness extends ContentContainerComponentHarness {
5
5
  static hostSelector: string;
6
- getDataTable: import("@angular/cdk/testing").AsyncFactoryFn<DataTableHarness>;
7
- getDataListGrid: import("@angular/cdk/testing").AsyncFactoryFn<DataListGridHarness>;
6
+ getDataTable: import("@angular/cdk/testing").AsyncFactoryFn<DataTableHarness | null>;
7
+ getDataListGrid: import("@angular/cdk/testing").AsyncFactoryFn<DataListGridHarness | null>;
8
8
  }