@paperless/angular 1.44.3 → 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 +35 -9
- package/esm2020/lib/modules/table/components/table-row-action/table-row-action.component.mjs +8 -4
- package/esm2020/lib/modules/table/table.module.mjs +5 -4
- package/fesm2015/paperless-angular.mjs +38 -7
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +38 -7
- 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 +14 -1
- package/lib/modules/table/table.module.d.ts +3 -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,10 +12,21 @@ 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;
|
|
16
21
|
protected el: HTMLElement;
|
|
22
|
+
/**
|
|
23
|
+
* Routerlink to navigate to
|
|
24
|
+
*/
|
|
25
|
+
routerLink?: TableRowActionRouterLink;
|
|
26
|
+
/**
|
|
27
|
+
* Queryparams to add to the navigation
|
|
28
|
+
*/
|
|
29
|
+
queryParams?: TableRowActionQueryParams;
|
|
17
30
|
/**
|
|
18
31
|
* Event whenever a row is clicked
|
|
19
32
|
*/
|
|
@@ -25,5 +38,5 @@ export declare class TableRowAction implements OnChanges {
|
|
|
25
38
|
constructor(_c: ChangeDetectorRef, z: NgZone, r: ElementRef);
|
|
26
39
|
ngOnChanges(changes: SimpleChanges): void;
|
|
27
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowAction, never>;
|
|
28
|
-
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"; }, { "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>;
|
|
29
42
|
}
|
|
@@ -10,9 +10,10 @@ import * as i8 from "./directives/p-table-ngx.directive";
|
|
|
10
10
|
import * as i9 from "./directives/p-table-filter-modal.directive";
|
|
11
11
|
import * as i10 from "./directives/p-table-custom-filter.directive";
|
|
12
12
|
import * as i11 from "@angular/common";
|
|
13
|
-
import * as i12 from "
|
|
13
|
+
import * as i12 from "@angular/router";
|
|
14
|
+
import * as i13 from "../../stencil.module";
|
|
14
15
|
export declare class TableModule {
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.Table, typeof i2.TableCell, typeof i3.TableColumn, typeof i4.TableRowAction, typeof i5.TableFooterDirective, typeof i6.TableHeaderDirective, typeof i7.TableDirective, typeof i8.TableNgxDirective, typeof i9.TableFilterModalDirective, typeof i10.TableCustomFilterDirective], [typeof i11.CommonModule, typeof i12.StencilModule], [typeof i1.Table, typeof i2.TableCell, typeof i3.TableColumn, typeof i4.TableRowAction, typeof i5.TableFooterDirective, typeof i6.TableHeaderDirective, typeof i7.TableDirective, typeof i8.TableNgxDirective, typeof i9.TableFilterModalDirective, typeof i10.TableCustomFilterDirective]>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.Table, typeof i2.TableCell, typeof i3.TableColumn, typeof i4.TableRowAction, typeof i5.TableFooterDirective, typeof i6.TableHeaderDirective, typeof i7.TableDirective, typeof i8.TableNgxDirective, typeof i9.TableFilterModalDirective, typeof i10.TableCustomFilterDirective], [typeof i11.CommonModule, typeof i12.RouterModule, typeof i13.StencilModule], [typeof i1.Table, typeof i2.TableCell, typeof i3.TableColumn, typeof i4.TableRowAction, typeof i5.TableFooterDirective, typeof i6.TableHeaderDirective, typeof i7.TableDirective, typeof i8.TableNgxDirective, typeof i9.TableFilterModalDirective, typeof i10.TableCustomFilterDirective]>;
|
|
17
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableModule>;
|
|
18
19
|
}
|