@one-paragon/angular-utilities 2.2.7 → 2.2.9
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/fesm2022/one-paragon-angular-utilities.mjs +41 -25
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/table-builder/classes/TableBuilderConfig.d.ts +8 -5
- package/table-builder/classes/table-store.d.ts +5 -5
- package/table-builder/components/generic-table/generic-table.component.d.ts +1 -1
- package/table-builder/components/table-container/table-container.component.d.ts +3 -1
- package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts +1 -0
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
- package/table-builder/interfaces/report-def.d.ts +5 -1
- package/table-builder/services/export-to-csv.service.d.ts +4 -9
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './table-builder/classes/MatTableObservableDataSource';
|
|
|
8
8
|
export * from './table-builder/classes/table-builder';
|
|
9
9
|
export * from './table-builder/classes/table-builder-general-settings';
|
|
10
10
|
export * from './table-builder/components';
|
|
11
|
+
export * from './table-builder/components/table-container/table-container.helpers/groupBy.helpers';
|
|
11
12
|
export * from './table-builder/directives';
|
|
12
13
|
export * from './table-builder/enums/filterTypes';
|
|
13
14
|
export * from './rxjs';
|
|
@@ -21,11 +21,14 @@ export interface TableBuilderExport {
|
|
|
21
21
|
dateTimeFormat?: string;
|
|
22
22
|
prepend?: string;
|
|
23
23
|
mapEnumToString?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
/**
|
|
25
|
+
* defaults to 'as view'
|
|
26
|
+
*/
|
|
27
|
+
mapLink?: 'as link' | 'as view' | 'add link';
|
|
28
|
+
/**
|
|
29
|
+
* used with `mapLink` = 'as link' or 'add link' to add a domain prefix to the link
|
|
30
|
+
*/
|
|
31
|
+
domainPrefix?: string;
|
|
29
32
|
}
|
|
30
33
|
export declare const TableBuilderConfigToken: InjectionToken<TableBuilderConfig>;
|
|
31
34
|
export declare function provideTableBuilder(config?: TableBuilderConfig): EnvironmentProviders;
|
|
@@ -46,7 +46,7 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
46
46
|
groupByKeys$: Observable<string[]>;
|
|
47
47
|
expandedGroups$: Observable<GroupedData[]>;
|
|
48
48
|
$expandGroups: Signal<GroupedData[]>;
|
|
49
|
-
$getIsExpanded: (columnKey: string,
|
|
49
|
+
$getIsExpanded: (columnKey: string, groupUniqueName: string) => Signal<boolean>;
|
|
50
50
|
$currentPage: Signal<number>;
|
|
51
51
|
$pageSize: Signal<number>;
|
|
52
52
|
$showAll: Signal<boolean>;
|
|
@@ -115,20 +115,20 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
115
115
|
readonly removeGroupByKey: (observableOrValue: string | Observable<string>) => import("rxjs").Subscription;
|
|
116
116
|
readonly updateExpandedGroups: (observableOrValue: {
|
|
117
117
|
key: string;
|
|
118
|
-
|
|
118
|
+
groupUniqueName: string;
|
|
119
119
|
isExpanded: boolean;
|
|
120
120
|
} | Observable<{
|
|
121
121
|
key: string;
|
|
122
|
-
|
|
122
|
+
groupUniqueName: string;
|
|
123
123
|
isExpanded: boolean;
|
|
124
124
|
}>) => import("rxjs").Subscription;
|
|
125
125
|
readonly expandAllOfGroup: (observableOrValue: {
|
|
126
126
|
groupHeadersByKey: Dictionary<{
|
|
127
|
-
|
|
127
|
+
uniqueName: string;
|
|
128
128
|
}[]>;
|
|
129
129
|
} | Observable<{
|
|
130
130
|
groupHeadersByKey: Dictionary<{
|
|
131
|
-
|
|
131
|
+
uniqueName: string;
|
|
132
132
|
}[]>;
|
|
133
133
|
}>) => import("rxjs").Subscription;
|
|
134
134
|
readonly collapseAll: () => void;
|
|
@@ -47,7 +47,7 @@ export declare class GenericTableComponent {
|
|
|
47
47
|
isGroupHeader(_: number, row: {
|
|
48
48
|
isGroupHeader: boolean;
|
|
49
49
|
}): boolean;
|
|
50
|
-
setExpanded(key: string,
|
|
50
|
+
setExpanded(key: string, groupUniqueName: string, isExpanded: boolean): void;
|
|
51
51
|
buildColumn(column: ColumnInfo): void;
|
|
52
52
|
$hasSelectColumn: import("@angular/core").Signal<boolean>;
|
|
53
53
|
$selection: import("@angular/core").Signal<SelectionModel<any>>;
|
|
@@ -23,6 +23,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
23
23
|
stateService: TableBuilderStateStore;
|
|
24
24
|
injector: Injector;
|
|
25
25
|
elementRef: ElementRef<any>;
|
|
26
|
+
private exportToCsvService;
|
|
26
27
|
protected dataSource: TableBuilderDataSource<T>;
|
|
27
28
|
$filterDirectives: import("@angular/core").Signal<readonly TableFilterDirective[]>;
|
|
28
29
|
$customFilterDirectives: import("@angular/core").Signal<readonly TableCustomFilterDirective[]>;
|
|
@@ -36,7 +37,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
36
37
|
$tableBuilder: import("@angular/core").InputSignal<TableBuilder<T>>;
|
|
37
38
|
$tableIdInput: import("@angular/core").InputSignal<string | undefined>;
|
|
38
39
|
$trackByInput: import("@angular/core").InputSignal<string | undefined>;
|
|
39
|
-
$inputFilters: import("@angular/core").InputSignal<(
|
|
40
|
+
$inputFilters: import("@angular/core").InputSignal<(Predicate<T> | CustomFilter<T> | FilterInfo<any, T>)[]>;
|
|
40
41
|
$filterInfoInputs: import("@angular/core").Signal<(FilterInfo<any, any> | CustomFilter<any>)[]>;
|
|
41
42
|
$indexColumnInput: import("@angular/core").InputSignal<boolean>;
|
|
42
43
|
$selectionColumnInput: import("@angular/core").InputSignal<boolean>;
|
|
@@ -57,6 +58,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
57
58
|
lastPage(): void;
|
|
58
59
|
expandAllGroups: () => void;
|
|
59
60
|
collapseAllGroups: () => void;
|
|
61
|
+
exportToCsv: () => void;
|
|
60
62
|
protected $myColumns: import("@angular/core").Signal<{
|
|
61
63
|
metaData: import("../../interfaces/report-def").MetaData;
|
|
62
64
|
customCell: CustomCellDirective<any> | undefined;
|
package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Timestamp } from "rxjs";
|
|
2
2
|
import { DataGroup, Group, GroupedData, GroupGroup, NoneGroupHeader } from "../../../classes/TableState";
|
|
3
3
|
import { Dictionary } from "@ngrx/entity";
|
|
4
|
+
export declare function setCustomGroupBy(customGroupBy: <T extends NoneGroupHeader = any>(data: T[], groupByKeys: string[], level?: number, parentGroupName?: string) => DataGroup<T>[] | GroupGroup<T>[]): void;
|
|
4
5
|
export declare function updateGroupByState<T extends NoneGroupHeader = any>(groupedData: any[], { data, groups, expanded }: {
|
|
5
6
|
data: Timestamp<T[]>;
|
|
6
7
|
groups: Timestamp<string[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableCustomFilterDirective, TableFilterDirective } from "./tb-filter.directive";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TableWrapperDirective {
|
|
4
|
-
$registrations: import("@angular/core").WritableSignal<(
|
|
4
|
+
$registrations: import("@angular/core").WritableSignal<(TableFilterDirective | TableCustomFilterDirective)[]>;
|
|
5
5
|
register(filter: TableCustomFilterDirective | TableFilterDirective): void;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableWrapperDirective, never>;
|
|
7
7
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableWrapperDirective, "[tbWrapper]", never, {}, {}, never, never, true, never>;
|
|
@@ -215,11 +215,15 @@ export interface ArrayAdditional<T = any> extends Additional<T> {
|
|
|
215
215
|
limit?: number;
|
|
216
216
|
arrayStyle?: ArrayStyle;
|
|
217
217
|
}
|
|
218
|
-
interface MetaDataExport<T> extends TableBuilderExport {
|
|
218
|
+
export interface MetaDataExport<T> extends TableBuilderExport {
|
|
219
219
|
/**
|
|
220
220
|
* This will supersede all other mappings when exporting.
|
|
221
221
|
*/
|
|
222
222
|
mapForExport?: (t: T) => string;
|
|
223
|
+
/**
|
|
224
|
+
* used with `mapLink` = 'add link'
|
|
225
|
+
*/
|
|
226
|
+
linkColumnName?: string;
|
|
223
227
|
}
|
|
224
228
|
export declare function metaDataArrToDict<T = MetaData>(arr: MetaData[], transform?: (m: MetaData) => T): Dictionary<T>;
|
|
225
229
|
export interface CustomCellMeta extends Pick<MetaData, 'key' | 'displayName' | 'preSort' | 'fieldType' | 'order' | 'width'> {
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { TableStore } from '../classes/table-store';
|
|
2
|
-
import { TableBuilderExport } from '../classes/TableBuilderConfig';
|
|
3
1
|
import { MetaData } from '../interfaces/report-def';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
export declare class ExportToCsvService<T> {
|
|
6
|
-
state
|
|
4
|
+
private state;
|
|
7
5
|
private config;
|
|
8
6
|
private datePipe;
|
|
9
|
-
$exportSettings
|
|
10
|
-
mapLinkToString?: boolean;
|
|
11
|
-
excellStyle?: boolean;
|
|
12
|
-
domainPrefix?: string;
|
|
13
|
-
}>;
|
|
7
|
+
private $exportSettings;
|
|
14
8
|
exportToCsv: (data: T[]) => void;
|
|
15
|
-
|
|
9
|
+
private getExtraLinkCols;
|
|
10
|
+
private csvData;
|
|
16
11
|
metaToField: (meta: MetaData<T>, row: T) => any;
|
|
17
12
|
private stringByType;
|
|
18
13
|
cleanValForCsv(val: any): any;
|