@paperless/angular 0.1.0-alpha.130 → 0.1.0-alpha.132
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/base/form.component.mjs +105 -0
- package/esm2020/lib/base/index.mjs +4 -1
- package/esm2020/lib/base/table.component.mjs +155 -0
- package/esm2020/lib/base/upload.component.mjs +57 -0
- package/esm2020/lib/base/value-accessor.mjs +5 -5
- package/esm2020/lib/directives/index.mjs +4 -1
- package/esm2020/lib/directives/p-page-size-select.directive.mjs +3 -3
- package/esm2020/lib/directives/p-pagination.directive.mjs +3 -3
- package/esm2020/lib/directives/p-table-footer.directive.mjs +3 -3
- package/esm2020/lib/directives/p-table-header.directive.mjs +3 -3
- package/esm2020/lib/directives/p-table.directive.mjs +72 -0
- package/esm2020/lib/paperless.module.mjs +3 -2
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/paperless-angular.mjs +392 -13
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +387 -13
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/base/form.component.d.ts +15 -0
- package/lib/base/index.d.ts +3 -0
- package/lib/base/table.component.d.ts +45 -0
- package/lib/base/upload.component.d.ts +16 -0
- package/lib/base/value-accessor.d.ts +3 -3
- package/lib/directives/index.d.ts +3 -1
- package/lib/directives/p-page-size-select.directive.d.ts +2 -2
- package/lib/directives/p-pagination.directive.d.ts +2 -2
- package/lib/directives/p-table-footer.directive.d.ts +2 -2
- package/lib/directives/p-table-header.directive.d.ts +2 -2
- package/lib/directives/p-table.directive.d.ts +20 -0
- package/lib/paperless.module.d.ts +2 -1
- package/package.json +2 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class FormBaseComponent {
|
|
4
|
+
markedDirty: boolean;
|
|
5
|
+
scrollToFirstError(): void;
|
|
6
|
+
markControlDirty(control: FormControl | FormGroup | FormArray | AbstractControl): void;
|
|
7
|
+
markAllDirty(formGroup: FormGroup): void;
|
|
8
|
+
getControlError(control: FormControl | AbstractControl | FormArray | FormGroup): string | undefined;
|
|
9
|
+
hasControlError(control: FormControl | AbstractControl | FormGroup | FormArray, showChildErrors?: boolean): string | false | undefined;
|
|
10
|
+
firstControlError(control: FormControl | AbstractControl | FormGroup | FormArray, showChildErrors?: boolean): string | undefined;
|
|
11
|
+
resetControl(control: FormControl | FormGroup | FormArray | AbstractControl): void;
|
|
12
|
+
resetForm(formGroup: FormGroup): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormBaseComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormBaseComponent, "ng-component", never, {}, {}, never, never, false>;
|
|
15
|
+
}
|
package/lib/base/index.d.ts
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { QuickFilter } from '@paperless/core';
|
|
4
|
+
import { FormBaseComponent } from './form.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface TableOptions {
|
|
7
|
+
pageSize: number;
|
|
8
|
+
page: number;
|
|
9
|
+
quickFilter: any | string;
|
|
10
|
+
query: string;
|
|
11
|
+
selectedRows: any[];
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class BaseTableComponent extends FormBaseComponent implements OnInit {
|
|
14
|
+
protected quickFilters: any[];
|
|
15
|
+
pageSizeDefault: number;
|
|
16
|
+
tableOptions?: FormGroup;
|
|
17
|
+
private _defaultTableValues;
|
|
18
|
+
defaultTableValues: Partial<TableOptions>;
|
|
19
|
+
get pageSize(): any;
|
|
20
|
+
get page(): any;
|
|
21
|
+
get quickFilter(): QuickFilter;
|
|
22
|
+
set quickFilter(quickFilter: QuickFilter);
|
|
23
|
+
get query(): string;
|
|
24
|
+
set query(query: string);
|
|
25
|
+
get selectedRows(): any[];
|
|
26
|
+
set selectedRows(selectedRows: any[]);
|
|
27
|
+
get parsedDefaultTableValues(): {
|
|
28
|
+
pageSize: number;
|
|
29
|
+
page: number;
|
|
30
|
+
quickFilter: any;
|
|
31
|
+
query: string;
|
|
32
|
+
selectedRows: any[];
|
|
33
|
+
};
|
|
34
|
+
get tableValues(): Partial<TableOptions>;
|
|
35
|
+
set tableValues(values: Partial<TableOptions>);
|
|
36
|
+
constructor();
|
|
37
|
+
ngOnInit(): void;
|
|
38
|
+
resetTable(emitEvent?: boolean, forceRefresh?: null): void;
|
|
39
|
+
protected _refresh(): void;
|
|
40
|
+
private _resetPageOrRefresh;
|
|
41
|
+
private _setTableValues;
|
|
42
|
+
private _getChanges;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTableComponent, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseTableComponent, "ng-component", never, {}, {}, never, never, false>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class BaseUploadComponent {
|
|
4
|
+
fileId?: string;
|
|
5
|
+
uploaded: boolean;
|
|
6
|
+
set loading(value: boolean);
|
|
7
|
+
get loading(): boolean;
|
|
8
|
+
fileChange: EventEmitter<any>;
|
|
9
|
+
uploaderInput?: ElementRef;
|
|
10
|
+
file?: File;
|
|
11
|
+
private _loading;
|
|
12
|
+
onChange($event: Event): void;
|
|
13
|
+
onLoad(file: File, result: string): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseUploadComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseUploadComponent, "ng-component", never, { "fileId": "fileId"; "uploaded": "uploaded"; "loading": "loading"; }, { "fileChange": "fileChange"; }, never, never, false>;
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class BaseValueAccessor implements ControlValueAccessor {
|
|
5
5
|
protected el: ElementRef;
|
|
6
6
|
private onChange;
|
|
7
7
|
private onTouched;
|
|
@@ -12,6 +12,6 @@ export declare class ValueAccessor implements ControlValueAccessor {
|
|
|
12
12
|
_handleBlurEvent(): void;
|
|
13
13
|
registerOnChange(fn: (value: any) => void): void;
|
|
14
14
|
registerOnTouched(fn: () => void): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseValueAccessor, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseValueAccessor, never, never, {}, {}, never, never, false>;
|
|
17
17
|
}
|
|
@@ -2,7 +2,9 @@ export * from './p-page-size-select.directive';
|
|
|
2
2
|
export * from './p-pagination.directive';
|
|
3
3
|
export * from './p-table-footer.directive';
|
|
4
4
|
export * from './p-table-header.directive';
|
|
5
|
+
export * from './p-table.directive';
|
|
5
6
|
import { PageSizeSelectDirective } from './p-page-size-select.directive';
|
|
6
7
|
import { TableFooterDirective } from './p-table-footer.directive';
|
|
7
8
|
import { TableHeaderDirective } from './p-table-header.directive';
|
|
8
|
-
|
|
9
|
+
import { TableDirective } from './p-table.directive';
|
|
10
|
+
export declare const CUSTOM_DIRECTIVES: (typeof PageSizeSelectDirective | typeof TableFooterDirective | typeof TableHeaderDirective | typeof TableDirective)[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseValueAccessor } from '../base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PageSizeSelectDirective extends
|
|
4
|
+
export declare class PageSizeSelectDirective extends BaseValueAccessor {
|
|
5
5
|
constructor(el: ElementRef);
|
|
6
6
|
writeValue(value: any): void;
|
|
7
7
|
registerOnChange(fn: (_: number | null) => void): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseValueAccessor } from '../base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PaginationDirective extends
|
|
4
|
+
export declare class PaginationDirective extends BaseValueAccessor {
|
|
5
5
|
constructor(el: ElementRef);
|
|
6
6
|
writeValue(value: any): void;
|
|
7
7
|
registerOnChange(fn: (_: number | null) => void): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseValueAccessor } from '../base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TableFooterDirective extends
|
|
4
|
+
export declare class TableFooterDirective extends BaseValueAccessor {
|
|
5
5
|
protected lastValue: any;
|
|
6
6
|
constructor(el: ElementRef);
|
|
7
7
|
writeValue(value: any): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { QuickFilter } from '@paperless/core';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseValueAccessor } from '../base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface TableHeaderDirectiveValue {
|
|
6
6
|
query?: string;
|
|
7
7
|
quickFilter?: QuickFilter;
|
|
8
8
|
}
|
|
9
|
-
export declare class TableHeaderDirective extends
|
|
9
|
+
export declare class TableHeaderDirective extends BaseValueAccessor {
|
|
10
10
|
protected lastValue: TableHeaderDirectiveValue;
|
|
11
11
|
constructor(el: ElementRef);
|
|
12
12
|
writeValue(value: TableHeaderDirectiveValue): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { QuickFilter } from '@paperless/core';
|
|
3
|
+
import { BaseValueAccessor } from '../base';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface TableDirectiveValue {
|
|
6
|
+
query?: string;
|
|
7
|
+
quickFilter?: QuickFilter;
|
|
8
|
+
page?: number;
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
selectedRows?: any[];
|
|
11
|
+
}
|
|
12
|
+
export declare class TableDirective extends BaseValueAccessor {
|
|
13
|
+
protected lastValue: TableDirectiveValue;
|
|
14
|
+
constructor(el: ElementRef);
|
|
15
|
+
writeValue(value: TableDirectiveValue): void;
|
|
16
|
+
handleChange(value: number | string | QuickFilter, type: 'page' | 'pageSize' | 'query' | 'quickFilter' | 'selectedRows'): void;
|
|
17
|
+
private _setActiveQuickFilter;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableDirective, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableDirective, "p-table", never, {}, {}, never, never, false>;
|
|
20
|
+
}
|
|
@@ -4,8 +4,9 @@ import * as i2 from "./directives/p-pagination.directive";
|
|
|
4
4
|
import * as i3 from "./directives/p-page-size-select.directive";
|
|
5
5
|
import * as i4 from "./directives/p-table-footer.directive";
|
|
6
6
|
import * as i5 from "./directives/p-table-header.directive";
|
|
7
|
+
import * as i6 from "./directives/p-table.directive";
|
|
7
8
|
export declare class PaperlessModule {
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaperlessModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PaperlessModule, [typeof i1.PAccordion, typeof i1.PAvatar, typeof i1.PAvatarGroup, typeof i1.PButton, typeof i1.PCardBody, typeof i1.PCardContainer, typeof i1.PCardHeader, typeof i1.PContentSlider, typeof i1.PCounter, typeof i1.PDivider, typeof i1.PDropdown, typeof i1.PDropdownMenuContainer, typeof i1.PDropdownMenuItem, typeof i1.PHelper, typeof i1.PIcon, typeof i1.PIllustration, typeof i1.PInfoPanel, typeof i1.PInputGroup, typeof i1.PLayout, typeof i1.PLoader, typeof i1.PModal, typeof i1.PModalBackdrop, typeof i1.PModalBody, typeof i1.PModalContainer, typeof i1.PModalFooter, typeof i1.PModalHeader, typeof i1.PNavbar, typeof i1.PNavigationItem, typeof i1.PPageSizeSelect, typeof i1.PPagination, typeof i1.PPaginationItem, typeof i1.PProfile, typeof i1.PSegmentContainer, typeof i1.PSegmentItem, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTable, typeof i1.PTableBody, typeof i1.PTableContainer, typeof i1.PTableDefinition, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PTag, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective], never, [typeof i1.PAccordion, typeof i1.PAvatar, typeof i1.PAvatarGroup, typeof i1.PButton, typeof i1.PCardBody, typeof i1.PCardContainer, typeof i1.PCardHeader, typeof i1.PContentSlider, typeof i1.PCounter, typeof i1.PDivider, typeof i1.PDropdown, typeof i1.PDropdownMenuContainer, typeof i1.PDropdownMenuItem, typeof i1.PHelper, typeof i1.PIcon, typeof i1.PIllustration, typeof i1.PInfoPanel, typeof i1.PInputGroup, typeof i1.PLayout, typeof i1.PLoader, typeof i1.PModal, typeof i1.PModalBackdrop, typeof i1.PModalBody, typeof i1.PModalContainer, typeof i1.PModalFooter, typeof i1.PModalHeader, typeof i1.PNavbar, typeof i1.PNavigationItem, typeof i1.PPageSizeSelect, typeof i1.PPagination, typeof i1.PPaginationItem, typeof i1.PProfile, typeof i1.PSegmentContainer, typeof i1.PSegmentItem, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTable, typeof i1.PTableBody, typeof i1.PTableContainer, typeof i1.PTableDefinition, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PTag, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective]>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PaperlessModule, [typeof i1.PAccordion, typeof i1.PAvatar, typeof i1.PAvatarGroup, typeof i1.PButton, typeof i1.PCardBody, typeof i1.PCardContainer, typeof i1.PCardHeader, typeof i1.PContentSlider, typeof i1.PCounter, typeof i1.PDivider, typeof i1.PDropdown, typeof i1.PDropdownMenuContainer, typeof i1.PDropdownMenuItem, typeof i1.PHelper, typeof i1.PIcon, typeof i1.PIllustration, typeof i1.PInfoPanel, typeof i1.PInputGroup, typeof i1.PLayout, typeof i1.PLoader, typeof i1.PModal, typeof i1.PModalBackdrop, typeof i1.PModalBody, typeof i1.PModalContainer, typeof i1.PModalFooter, typeof i1.PModalHeader, typeof i1.PNavbar, typeof i1.PNavigationItem, typeof i1.PPageSizeSelect, typeof i1.PPagination, typeof i1.PPaginationItem, typeof i1.PProfile, typeof i1.PSegmentContainer, typeof i1.PSegmentItem, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTable, typeof i1.PTableBody, typeof i1.PTableContainer, typeof i1.PTableDefinition, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PTag, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective, typeof i6.TableDirective], never, [typeof i1.PAccordion, typeof i1.PAvatar, typeof i1.PAvatarGroup, typeof i1.PButton, typeof i1.PCardBody, typeof i1.PCardContainer, typeof i1.PCardHeader, typeof i1.PContentSlider, typeof i1.PCounter, typeof i1.PDivider, typeof i1.PDropdown, typeof i1.PDropdownMenuContainer, typeof i1.PDropdownMenuItem, typeof i1.PHelper, typeof i1.PIcon, typeof i1.PIllustration, typeof i1.PInfoPanel, typeof i1.PInputGroup, typeof i1.PLayout, typeof i1.PLoader, typeof i1.PModal, typeof i1.PModalBackdrop, typeof i1.PModalBody, typeof i1.PModalContainer, typeof i1.PModalFooter, typeof i1.PModalHeader, typeof i1.PNavbar, typeof i1.PNavigationItem, typeof i1.PPageSizeSelect, typeof i1.PPagination, typeof i1.PPaginationItem, typeof i1.PProfile, typeof i1.PSegmentContainer, typeof i1.PSegmentItem, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTable, typeof i1.PTableBody, typeof i1.PTableContainer, typeof i1.PTableDefinition, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PTag, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective, typeof i6.TableDirective]>;
|
|
10
11
|
static ɵinj: i0.ɵɵInjectorDeclaration<PaperlessModule>;
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paperless/angular",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.132",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^13.3.0 || ^14.0.0",
|
|
6
6
|
"@angular/core": "^13.3.0 || ^14.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"@ngneat/until-destroy": "9.2.2",
|
|
9
10
|
"tslib": "2.4.0"
|
|
10
11
|
},
|
|
11
12
|
"module": "fesm2015/paperless-angular.mjs",
|
package/public-api.d.ts
CHANGED