@onecx/angular-accelerator 5.17.2 → 5.18.1
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.
- package/assets/i18n/de.json +3 -1
- package/assets/i18n/en.json +3 -1
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/components/data-list-grid/data-list-grid.component.mjs +2 -2
- package/esm2022/lib/components/data-sort-base/data-sort-base.mjs +14 -3
- package/esm2022/lib/components/data-table/data-table.component.mjs +31 -9
- package/esm2022/lib/components/data-view/data-view.component.mjs +1 -1
- package/esm2022/lib/components/interactive-data-view/interactive-data-view.component.mjs +2 -2
- package/esm2022/lib/components/search-header/search-header.component.mjs +3 -3
- package/esm2022/lib/model/data-table-column.model.mjs +1 -1
- package/esm2022/lib/model/filter.model.mjs +6 -0
- package/fesm2022/onecx-angular-accelerator.mjs +51 -14
- package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/data-list-grid/data-list-grid.component.d.ts +2 -1
- package/lib/components/data-sort-base/data-sort-base.d.ts +2 -1
- package/lib/components/data-table/data-table.component.d.ts +12 -8
- package/lib/components/data-view/data-view.component.d.ts +2 -1
- package/lib/components/interactive-data-view/interactive-data-view.component.d.ts +2 -1
- package/lib/model/data-table-column.model.d.ts +2 -0
- package/lib/model/filter.model.d.ts +9 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './lib/model/data-sort-direction';
|
|
|
27
27
|
export * from './lib/model/data-table-column.model';
|
|
28
28
|
export * from './lib/model/diagram-column';
|
|
29
29
|
export * from './lib/model/diagram-type';
|
|
30
|
+
export * from './lib/model/filter.model';
|
|
30
31
|
export * from './lib/angular-accelerator.module';
|
|
31
32
|
export * from './lib/angular-accelerator-primeng.module';
|
|
32
33
|
export * from './lib/functions/flatten-object';
|
|
@@ -11,7 +11,8 @@ import { DataAction } from '../../model/data-action';
|
|
|
11
11
|
import { DataSortDirection } from '../../model/data-sort-direction';
|
|
12
12
|
import { DataTableColumn } from '../../model/data-table-column.model';
|
|
13
13
|
import { DataSortBase } from '../data-sort-base/data-sort-base';
|
|
14
|
-
import {
|
|
14
|
+
import { Row } from '../data-table/data-table.component';
|
|
15
|
+
import { Filter } from '../../model/filter.model';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
export type ListGridData = {
|
|
17
18
|
id: string | number;
|
|
@@ -3,7 +3,8 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { DataSortDirection } from '../../model/data-sort-direction';
|
|
4
4
|
import { DataTableColumn } from '../../model/data-table-column.model';
|
|
5
5
|
import { ListGridData } from '../../components/data-list-grid/data-list-grid.component';
|
|
6
|
-
import { Row
|
|
6
|
+
import { Row } from '../../components/data-table/data-table.component';
|
|
7
|
+
import { Filter } from '../../model/filter.model';
|
|
7
8
|
type RowListGridData = ListGridData | Row;
|
|
8
9
|
export declare class DataSortBase {
|
|
9
10
|
protected locale: string;
|
|
@@ -11,7 +11,9 @@ import { DataSortDirection } from '../../model/data-sort-direction';
|
|
|
11
11
|
import { DataTableColumn } from '../../model/data-table-column.model';
|
|
12
12
|
import { DataSortBase } from '../data-sort-base/data-sort-base';
|
|
13
13
|
import { MultiSelectItem } from 'primeng/multiselect';
|
|
14
|
+
import { Filter, FilterType } from '../../model/filter.model';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
16
|
+
export type Primitive = number | string | boolean | bigint | Date;
|
|
15
17
|
export type Row = {
|
|
16
18
|
id: string | number;
|
|
17
19
|
[columnId: string]: unknown;
|
|
@@ -25,10 +27,6 @@ interface TemplatesData {
|
|
|
25
27
|
idSuffix: Array<string>;
|
|
26
28
|
templateNames: Record<ColumnType, Array<string>>;
|
|
27
29
|
}
|
|
28
|
-
export type Filter = {
|
|
29
|
-
columnId: string;
|
|
30
|
-
value: string;
|
|
31
|
-
};
|
|
32
30
|
export type Sort = {
|
|
33
31
|
sortColumn: string;
|
|
34
32
|
sortDirection: DataSortDirection;
|
|
@@ -44,6 +42,7 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
44
42
|
private router;
|
|
45
43
|
private injector;
|
|
46
44
|
private userService;
|
|
45
|
+
FilterType: typeof FilterType;
|
|
47
46
|
TemplateType: typeof TemplateType;
|
|
48
47
|
checked: boolean;
|
|
49
48
|
_rows$: BehaviorSubject<Row[]>;
|
|
@@ -184,8 +183,13 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
184
183
|
displayedRows$: Observable<unknown[]> | undefined;
|
|
185
184
|
selectedRows$: Observable<unknown[]> | undefined;
|
|
186
185
|
currentFilterColumn$: BehaviorSubject<DataTableColumn | null>;
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
currentEqualFilterOptions$: Observable<SelectItem[]> | undefined;
|
|
187
|
+
currentEqualSelectedFilters$: Observable<unknown[]> | undefined;
|
|
188
|
+
truthyFilterOptions: {
|
|
189
|
+
key: string;
|
|
190
|
+
value: boolean;
|
|
191
|
+
}[];
|
|
192
|
+
currentTruthySelectedFilters$: Observable<unknown[]> | undefined;
|
|
189
193
|
filterAmounts$: Observable<Record<string, number>> | undefined;
|
|
190
194
|
overflowActions$: Observable<DataAction[]>;
|
|
191
195
|
inlineActions$: Observable<DataAction[]>;
|
|
@@ -213,8 +217,8 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
|
|
|
213
217
|
onViewRow(selectedTableRow: Row): void;
|
|
214
218
|
onEditRow(selectedTableRow: Row): void;
|
|
215
219
|
onFilterChosen(column: DataTableColumn): void;
|
|
216
|
-
|
|
217
|
-
getSelectedFilters(columnId: string):
|
|
220
|
+
onMultiselectFilterChange(column: DataTableColumn, event: any): void;
|
|
221
|
+
getSelectedFilters(columnId: string): unknown[] | undefined;
|
|
218
222
|
sortIconTitle(sortColumn: string): "OCX_DATA_TABLE.TOGGLE_BUTTON.ASCENDING_TITLE" | "OCX_DATA_TABLE.TOGGLE_BUTTON.DESCENDING_TITLE" | "OCX_DATA_TABLE.TOGGLE_BUTTON.DEFAULT_TITLE";
|
|
219
223
|
sortDirectionToTitle(sortDirection: DataSortDirection): "OCX_DATA_TABLE.TOGGLE_BUTTON.ASCENDING_TITLE" | "OCX_DATA_TABLE.TOGGLE_BUTTON.DESCENDING_TITLE" | "OCX_DATA_TABLE.TOGGLE_BUTTON.DEFAULT_TITLE";
|
|
220
224
|
mapSelectionToRows(): void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AfterContentInit, DoCheck, EventEmitter, Injector, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
2
2
|
import { DataListGridComponent, DataListGridComponentState, ListGridData } from '../data-list-grid/data-list-grid.component';
|
|
3
|
-
import { Row,
|
|
3
|
+
import { Row, Sort, DataTableComponent, DataTableComponentState } from '../data-table/data-table.component';
|
|
4
4
|
import { DataTableColumn } from '../../model/data-table-column.model';
|
|
5
5
|
import { DataSortDirection } from '../../model/data-sort-direction';
|
|
6
6
|
import { DataAction } from '../../model/data-action';
|
|
7
7
|
import { BehaviorSubject, ReplaySubject, Observable } from 'rxjs';
|
|
8
8
|
import { PrimeTemplate } from 'primeng/api';
|
|
9
|
+
import { Filter } from '../../model/filter.model';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export type RowListGridData = ListGridData & Row;
|
|
11
12
|
export type DataViewComponentState = DataListGridComponentState & DataTableComponentState;
|
|
@@ -9,8 +9,9 @@ import { ActionColumnChangedEvent, ColumnSelectionChangedEvent, CustomGroupColum
|
|
|
9
9
|
import { SlotService } from '@onecx/angular-remote-components';
|
|
10
10
|
import { DataLayoutSelectionComponentState } from '../data-layout-selection/data-layout-selection.component';
|
|
11
11
|
import { DataListGridSortingComponentState } from '../data-list-grid-sorting/data-list-grid-sorting.component';
|
|
12
|
-
import {
|
|
12
|
+
import { Row, Sort } from '../data-table/data-table.component';
|
|
13
13
|
import { DataViewComponent, DataViewComponentState, RowListGridData } from '../data-view/data-view.component';
|
|
14
|
+
import { Filter } from '../../model/filter.model';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export type InteractiveDataViewComponentState = ColumnGroupSelectionComponentState & CustomGroupColumnSelectorComponentState & DataLayoutSelectionComponentState & DataListGridSortingComponentState & DataViewComponentState;
|
|
16
17
|
export interface ColumnGroupData {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ColumnType } from './column-type.model';
|
|
2
|
+
import { FilterType } from './filter.model';
|
|
2
3
|
export interface DataTableColumn {
|
|
3
4
|
columnType: ColumnType;
|
|
4
5
|
nameKey: string;
|
|
5
6
|
id: string;
|
|
6
7
|
sortable?: boolean;
|
|
7
8
|
filterable?: boolean;
|
|
9
|
+
filterType?: FilterType;
|
|
8
10
|
predefinedGroupKeys?: string[];
|
|
9
11
|
dateFormat?: string;
|
|
10
12
|
}
|