@paperless/angular 1.45.0 → 1.46.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.
- package/esm2020/lib/modules/table/components/table/table.component.mjs +26 -5
- package/esm2020/lib/modules/table/components/table-row-action/table-row-action.component.mjs +4 -2
- package/fesm2015/paperless-angular.mjs +26 -3
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +26 -3
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/modules/table/components/table/table.component.d.ts +4 -1
- package/lib/modules/table/components/table-row-action/table-row-action.component.d.ts +11 -2
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Params } from '@angular/router';
|
|
2
3
|
import { QuickFilter, RowClickEvent } from '@paperless/core';
|
|
3
4
|
import { IconVariant, IllustrationVariant } from '@paperless/core/dist/types/components';
|
|
4
5
|
import { BehaviorSubject } from 'rxjs';
|
|
5
6
|
import { TableColumn } from '../table-column/table-column.component';
|
|
6
|
-
import { TableRowAction } from '../table-row-action/table-row-action.component';
|
|
7
|
+
import { AsyncItem, TableRowAction, TableRowActionQueryParams, TableRowActionRouterLink } from '../table-row-action/table-row-action.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class Table implements OnInit, OnChanges {
|
|
9
10
|
private _changeDetection;
|
|
@@ -277,6 +278,8 @@ export declare class Table implements OnInit, OnChanges {
|
|
|
277
278
|
_selectionContainsAll(): boolean;
|
|
278
279
|
_selectionIndeterminate(): boolean;
|
|
279
280
|
_rowClick($event: MouseEvent, index: number): void;
|
|
281
|
+
_getActionRouterLink(routerLink: TableRowActionRouterLink, rowIndex: number): BehaviorSubject<string | any[]> | AsyncItem<string | any[]>;
|
|
282
|
+
_getActionQueryParams(queryParams: TableRowActionQueryParams, rowIndex: number): BehaviorSubject<Params> | AsyncItem<Params>;
|
|
280
283
|
_rowActionClick(action: TableRowAction, rowIndex?: number): void;
|
|
281
284
|
private _findRow;
|
|
282
285
|
private _findRowAction;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Components } from '@paperless/core';
|
|
3
|
+
import { Params } from '@angular/router';
|
|
4
|
+
import { Observable, Subscribable } from 'rxjs';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export interface TableRowActionClickEvent {
|
|
5
7
|
item?: any;
|
|
@@ -10,6 +12,9 @@ export interface TableRowActionClickEvent {
|
|
|
10
12
|
export declare interface TableRowAction extends Omit<Components.PTableRowAction, 'action'> {
|
|
11
13
|
action: EventEmitter<TableRowActionClickEvent>;
|
|
12
14
|
}
|
|
15
|
+
export declare type AsyncItem<T> = Observable<T> | Subscribable<T> | Promise<T>;
|
|
16
|
+
export declare type TableRowActionRouterLink = string | any[] | AsyncItem<string | any[]> | ((item: any) => AsyncItem<string | any[]> | string | any[]);
|
|
17
|
+
export declare type TableRowActionQueryParams = Params | AsyncItem<Params> | ((item: any) => Params | AsyncItem<Params>);
|
|
13
18
|
export declare class TableRowAction implements OnChanges {
|
|
14
19
|
private _c;
|
|
15
20
|
protected z: NgZone;
|
|
@@ -17,7 +22,11 @@ export declare class TableRowAction implements OnChanges {
|
|
|
17
22
|
/**
|
|
18
23
|
* Routerlink to navigate to
|
|
19
24
|
*/
|
|
20
|
-
routerLink?:
|
|
25
|
+
routerLink?: TableRowActionRouterLink;
|
|
26
|
+
/**
|
|
27
|
+
* Queryparams to add to the navigation
|
|
28
|
+
*/
|
|
29
|
+
queryParams?: TableRowActionQueryParams;
|
|
21
30
|
/**
|
|
22
31
|
* Event whenever a row is clicked
|
|
23
32
|
*/
|
|
@@ -29,5 +38,5 @@ export declare class TableRowAction implements OnChanges {
|
|
|
29
38
|
constructor(_c: ChangeDetectorRef, z: NgZone, r: ElementRef);
|
|
30
39
|
ngOnChanges(changes: SimpleChanges): void;
|
|
31
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowAction, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableRowAction, "p-table-row-action", never, { "disabled": "disabled"; "icon": "icon"; "iconFlip": "iconFlip"; "iconOnly": "iconOnly"; "iconRotate": "iconRotate"; "label": "label"; "type": "type"; "loading": "loading"; "routerLink": "routerLink"; }, { "action": "action"; "_loadingChanged": "_loadingChanged"; }, never, ["*"], false, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableRowAction, "p-table-row-action", never, { "disabled": "disabled"; "icon": "icon"; "iconFlip": "iconFlip"; "iconOnly": "iconOnly"; "iconRotate": "iconRotate"; "label": "label"; "type": "type"; "loading": "loading"; "routerLink": "routerLink"; "queryParams": "queryParams"; }, { "action": "action"; "_loadingChanged": "_loadingChanged"; }, never, ["*"], false, never>;
|
|
33
42
|
}
|