@one-paragon/angular-utilities 1.2.13 → 1.2.14
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/esm2022/table-builder/classes/TableBuilderConfig.mjs +1 -1
- package/esm2022/table-builder/classes/TableBuilderDataSource.mjs +6 -3
- package/esm2022/table-builder/classes/TableState.mjs +1 -2
- package/esm2022/table-builder/classes/table-builder-general-settings.mjs +49 -45
- package/esm2022/table-builder/classes/table-builder.mjs +2 -2
- package/esm2022/table-builder/classes/table-store.mjs +14 -9
- package/esm2022/table-builder/components/column-builder/column-builder.component.mjs +2 -2
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +15 -3
- package/esm2022/table-builder/components/generic-table/paginator.component.mjs +3 -3
- package/esm2022/table-builder/components/table-container/table-container.mjs +4 -4
- package/esm2022/table-builder/components/table-container/virtual-scroll-container.mjs +9 -5
- package/esm2022/table-builder/services/table-template-service.mjs +2 -2
- package/esm2022/table-builder/services/transform-creator.mjs +3 -3
- package/fesm2022/one-paragon-angular-utilities.mjs +97 -72
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/table-builder/classes/TableBuilderConfig.d.ts +6 -4
- package/table-builder/classes/TableState.d.ts +0 -1
- package/table-builder/classes/table-builder-general-settings.d.ts +13 -6
- package/table-builder/classes/table-builder.d.ts +2 -2
- package/table-builder/classes/table-store.d.ts +4 -4
- package/table-builder/components/generic-table/generic-table.component.d.ts +2 -0
- package/table-builder/components/table-container/table-container-imports.d.ts +1 -1
- package/table-builder/components/table-container/table-container.d.ts +1 -1
- package/table-builder/components/table-container/virtual-scroll-container.d.ts +2 -1
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
-
import { TableState } from './TableState';
|
|
3
2
|
import { DefaultSettings } from './DefaultSettings';
|
|
4
3
|
import { ArrayAdditional, FieldType } from '../interfaces/report-def';
|
|
4
|
+
import { TableBuilderSettings } from './table-builder-general-settings';
|
|
5
5
|
export interface TableBuilderConfig {
|
|
6
|
-
|
|
6
|
+
defaultTableSettings: Partial<Omit<TableBuilderSettings, 'injector'>> & {
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
};
|
|
7
9
|
export?: TableBuilderExport;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
dateFormats?: DefaultSettings;
|
|
11
|
+
arrayDefaults?: ArrayAdditional;
|
|
10
12
|
transformers?: Partial<{
|
|
11
13
|
[key in keyof typeof FieldType]: (val: any) => any;
|
|
12
14
|
}>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Injector } from "@angular/core";
|
|
2
|
-
export declare class GeneralTableSettings {
|
|
3
|
-
constructor(settings?: TableBuilderSettings);
|
|
2
|
+
export declare class GeneralTableSettings implements TableBuilderSettings {
|
|
4
3
|
headerSettings: TableWrapperHeaderSettings;
|
|
5
4
|
footerSettings: TableWrapperFooterSettings;
|
|
6
5
|
columnHeaderSettings: TableColumnHeaderSettings;
|
|
@@ -33,18 +32,20 @@ export declare class TableColumnHeaderSettings {
|
|
|
33
32
|
}
|
|
34
33
|
export declare class TableSettings {
|
|
35
34
|
usePaginator: boolean;
|
|
36
|
-
useVirtualScroll: true | Partial<VirtualScrollOptions> |
|
|
35
|
+
useVirtualScroll: true | Partial<VirtualScrollOptions> | undefined;
|
|
37
36
|
includeAllInPaginatorOptions: boolean;
|
|
38
37
|
rowHeight: string | number | undefined;
|
|
39
38
|
groupHeaderHeight?: number;
|
|
39
|
+
minColumnWidth: number | undefined;
|
|
40
40
|
}
|
|
41
41
|
export declare class PersistedTableSettings {
|
|
42
|
-
constructor(tableSettings?:
|
|
42
|
+
constructor(tableSettings?: NonFunctionProperties<PersistedTableSettings>);
|
|
43
|
+
merge(tableSettings?: TableBuilderSettings): PersistedTableSettings;
|
|
43
44
|
collapseHeader: boolean;
|
|
44
45
|
collapseFooter: boolean;
|
|
45
46
|
}
|
|
46
47
|
export declare class NotPersistedTableSettings {
|
|
47
|
-
|
|
48
|
+
merge(tableSettings?: TableBuilderSettings): this & NotPersistedTableSettings;
|
|
48
49
|
hideExport: boolean;
|
|
49
50
|
hideFilter: boolean;
|
|
50
51
|
hideColumnSettings: boolean;
|
|
@@ -54,11 +55,12 @@ export declare class NotPersistedTableSettings {
|
|
|
54
55
|
hideColumnHeaderFilters: boolean;
|
|
55
56
|
hideColumnHeader: boolean;
|
|
56
57
|
usePaginator: boolean;
|
|
57
|
-
useVirtualScroll: true | Partial<VirtualScrollOptions> |
|
|
58
|
+
useVirtualScroll: true | Partial<VirtualScrollOptions> | undefined;
|
|
58
59
|
includeAllInPaginatorOptions: boolean;
|
|
59
60
|
groupHeaderHeight?: number;
|
|
60
61
|
rowHeight?: string | number | undefined;
|
|
61
62
|
headerHeight?: string | number;
|
|
63
|
+
minColumnWidth?: number | undefined;
|
|
62
64
|
}
|
|
63
65
|
export declare class VirtualScrollOptions {
|
|
64
66
|
virtualAsDefault: boolean;
|
|
@@ -76,3 +78,8 @@ export declare const DefaultVirtualScrollOptions: {
|
|
|
76
78
|
rowHeight: number;
|
|
77
79
|
headerHeight: number;
|
|
78
80
|
};
|
|
81
|
+
type NonFunctionPropertyNames<T> = {
|
|
82
|
+
[K in keyof T]: T[K] extends Function ? never : K;
|
|
83
|
+
}[keyof T];
|
|
84
|
+
export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
|
|
85
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { MetaData, ReportDef } from '../interfaces/report-def';
|
|
3
|
-
import {
|
|
3
|
+
import { TableBuilderSettings } from './table-builder-general-settings';
|
|
4
4
|
import { Signal } from '@angular/core';
|
|
5
5
|
export declare class TableBuilder<T = any> {
|
|
6
6
|
metaData$: Observable<MetaData<T>[]>;
|
|
7
7
|
data$: Observable<T[]>;
|
|
8
|
-
settings: Observable<
|
|
8
|
+
settings: Observable<TableBuilderSettings>;
|
|
9
9
|
constructor(data: TableBuilderArgs<T[]>, metaData?: TableBuilderArgs<MetaData<T, any>[]>, settings?: TableBuilderArgs<TableBuilderSettings>);
|
|
10
10
|
getData$(): Observable<any[]>;
|
|
11
11
|
createMetaData(obj: any): MetaData[];
|
|
@@ -6,7 +6,7 @@ import { CustomFilter, FilterInfo } from './filter-info';
|
|
|
6
6
|
import { Sort, SortDirection } from '@angular/material/sort';
|
|
7
7
|
import { ComponentStore } from '@ngrx/component-store';
|
|
8
8
|
import { Dictionary } from '../interfaces/dictionary';
|
|
9
|
-
import {
|
|
9
|
+
import { NonFunctionProperties, NotPersistedTableSettings, PersistedTableSettings, TableBuilderSettings } from './table-builder-general-settings';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare function stateIs(initializationState: InitializationState): (state: TableState) => boolean;
|
|
12
12
|
export declare class TableStore extends ComponentStore<TableState> {
|
|
@@ -115,9 +115,9 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
115
115
|
}>) => import("rxjs").Subscription;
|
|
116
116
|
groupByKeys$: Observable<string[]>;
|
|
117
117
|
expandedGroups$: Observable<GroupedData[]>;
|
|
118
|
-
setTableSettings: (observableOrValue:
|
|
119
|
-
tableSettings: import("@angular/core").Signal<PersistedTableSettings & NotPersistedTableSettings
|
|
120
|
-
tableSettings$: Observable<PersistedTableSettings & NotPersistedTableSettings
|
|
118
|
+
setTableSettings: (observableOrValue: TableBuilderSettings | Observable<TableBuilderSettings>) => import("rxjs").Subscription;
|
|
119
|
+
tableSettings: import("@angular/core").Signal<NonFunctionProperties<PersistedTableSettings & NotPersistedTableSettings>>;
|
|
120
|
+
tableSettings$: Observable<NonFunctionProperties<PersistedTableSettings & NotPersistedTableSettings>>;
|
|
121
121
|
props: import("@angular/core").Signal<import("../components/table-container/tableProps").TableProps>;
|
|
122
122
|
setLinkMaps: (() => void) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
123
123
|
getLinkInfo: (md: MetaData) => import("@angular/core").Signal<import("../services/link-creator.service").LinkInfo>;
|
|
@@ -13,6 +13,7 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
13
13
|
private dataStore;
|
|
14
14
|
private viewContainer;
|
|
15
15
|
private transformCreator;
|
|
16
|
+
smallFooter: number;
|
|
16
17
|
$headerRow: import("@angular/core").Signal<MatHeaderRowDef | undefined>;
|
|
17
18
|
$footerRow: import("@angular/core").Signal<MatFooterRowDef | undefined>;
|
|
18
19
|
$table: import("@angular/core").Signal<MatTable<any> | undefined>;
|
|
@@ -77,6 +78,7 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
77
78
|
$rowHeight: import("@angular/core").Signal<string | undefined>;
|
|
78
79
|
$headerHeight: import("@angular/core").Signal<string | undefined>;
|
|
79
80
|
$groupHeaderHeight: import("@angular/core").Signal<string | undefined>;
|
|
81
|
+
$footerHeight: import("@angular/core").Signal<string | undefined>;
|
|
80
82
|
$stickyFooter: import("@angular/core").Signal<boolean>;
|
|
81
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericTableComponent, never>;
|
|
82
84
|
static ɵcmp: i0.ɵɵComponentDeclaration<GenericTableComponent, "tb-generic-table", never, { "trackBy": { "alias": "trackBy"; "required": false; }; "$displayData": { "alias": "displayData"; "required": true; "isSignal": true; }; "$data": { "alias": "data"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; }; "columnBuilders": { "alias": "columnBuilders"; "required": false; }; "$columnInfos": { "alias": "columnInfos"; "required": true; "isSignal": true; }; }, { "selection$": "selection$"; }, never, never, true, never>;
|
|
@@ -11,4 +11,4 @@ import { SortMenuComponent } from "../sort-menu/sort-menu.component";
|
|
|
11
11
|
import { StopPropagationDirective } from "../../../utilities";
|
|
12
12
|
import { PaginatorComponent } from "../generic-table/paginator.component";
|
|
13
13
|
import { VirtualScrollContainer } from "./virtual-scroll-container";
|
|
14
|
-
export declare const containerImports: (typeof
|
|
14
|
+
export declare const containerImports: (typeof MultiSortDirective | typeof NgTemplateOutlet | typeof AsyncPipe | typeof MatTooltipModule | typeof LetDirective | typeof GenericTableComponent | typeof VirtualScrollContainer | typeof PaginatorComponent | typeof GroupByListComponent | typeof FilterChipsComponent | typeof GenFilterDisplayerComponent | typeof GenColDisplayerComponent | typeof SortMenuComponent | typeof StopPropagationDirective)[];
|
|
@@ -25,7 +25,7 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
25
25
|
injector: Injector;
|
|
26
26
|
filterDirectives: import("@angular/core").Signal<readonly TableFilterDirective[]>;
|
|
27
27
|
customFilterDirectives: import("@angular/core").Signal<readonly TableCustomFilterDirective<any>[]>;
|
|
28
|
-
$allFilterDirectives: import("@angular/core").Signal<(TableCustomFilterDirective<any>
|
|
28
|
+
$allFilterDirectives: import("@angular/core").Signal<(TableFilterDirective | TableCustomFilterDirective<any>)[]>;
|
|
29
29
|
$isInitializationState: (state: InitializationState) => import("@angular/core").Signal<boolean>;
|
|
30
30
|
allFilterDirectivesEffect: import("@angular/core").EffectRef;
|
|
31
31
|
paginatorComponent?: PaginatorComponent;
|
|
@@ -7,6 +7,7 @@ export declare class VirtualScrollContainer implements OnDestroy {
|
|
|
7
7
|
private state;
|
|
8
8
|
private dataStore;
|
|
9
9
|
viewport: import("@angular/core").Signal<CdkVirtualScrollViewport | undefined>;
|
|
10
|
+
private genericTable;
|
|
10
11
|
defaultOptions: VirtualScrollOptions;
|
|
11
12
|
scrollStrategy: TableVirtualScrollStrategy;
|
|
12
13
|
$usePaginator: import("@angular/core").Signal<boolean>;
|
|
@@ -31,5 +32,5 @@ export declare class VirtualScrollContainer implements OnDestroy {
|
|
|
31
32
|
computedRowHeight(): number;
|
|
32
33
|
computedHeaderHeight(): number;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualScrollContainer, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollContainer, "tb-virtual-scroll-container", never, {}, {},
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollContainer, "tb-virtual-scroll-container", never, {}, {}, ["genericTable"], ["*"], true, never>;
|
|
35
36
|
}
|
|
@@ -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<(TableCustomFilterDirective<any>
|
|
4
|
+
$registrations: import("@angular/core").WritableSignal<(TableFilterDirective | TableCustomFilterDirective<any>)[]>;
|
|
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>;
|