@paperless/angular 0.1.0-alpha.195 → 0.1.0-alpha.197

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.
@@ -0,0 +1,7 @@
1
+ export * from './table-cell/table-cell.component';
2
+ export * from './table-column/table-column.component';
3
+ export * from './table/table.component';
4
+ import { TableCell } from './table-cell/table-cell.component';
5
+ import { TableColumn } from './table-column/table-column.component';
6
+ import { TableComponent } from './table/table.component';
7
+ export declare const COMPONENTS: (typeof TableCell | typeof TableColumn | typeof TableComponent)[];
@@ -0,0 +1,2 @@
1
+ export declare const defaultSize = 12;
2
+ export declare const defaultSizeOptions: number[];
@@ -0,0 +1,190 @@
1
+ import { EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
2
+ import { QuickFilter, RowClickEvent } from '@paperless/core';
3
+ import { TableColumn } from '../table-column/table-column.component';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TableComponent implements OnInit, OnChanges {
6
+ /**
7
+ * The items to be fed to the table
8
+ */
9
+ items: string;
10
+ /**
11
+ * Wether data is loading
12
+ */
13
+ loading: boolean;
14
+ /**
15
+ * The amount of loading rows to show
16
+ */
17
+ amountOfLoadingRows: number;
18
+ /**
19
+ * Wether to enable selection
20
+ */
21
+ enableRowSelection: boolean;
22
+ /**
23
+ * Wether to enable row clicking
24
+ */
25
+ enableRowClick: boolean;
26
+ /**
27
+ * The current selection of items
28
+ */
29
+ selectedRows: any[];
30
+ /**
31
+ * Event whenever the current selection changes
32
+ */
33
+ selectedRowsChange: EventEmitter<any>;
34
+ /**
35
+ * The key to determine if a row is selected
36
+ */
37
+ selectionKey: string | undefined;
38
+ /**
39
+ * A key to determine if a row can be selected
40
+ */
41
+ canSelectKey: string | undefined;
42
+ /**
43
+ * Event whenever a row is clicked
44
+ */
45
+ rowClick: EventEmitter<RowClickEvent>;
46
+ /**
47
+ * Event whenever a row is selected
48
+ */
49
+ rowSelected: EventEmitter<any>;
50
+ /**
51
+ * Event whenever a row is deselected
52
+ */
53
+ rowDeselected: EventEmitter<any>;
54
+ /** START HEADER */
55
+ /**
56
+ * Quick filters to show
57
+ */
58
+ quickFilters: QuickFilter[];
59
+ /**
60
+ * Active quick filter identifier
61
+ */
62
+ activeQuickFilterIdentifier: string | undefined;
63
+ /**
64
+ * Wether to show the search input
65
+ */
66
+ enableSearch: boolean;
67
+ /**
68
+ * The query to show in the search bar
69
+ */
70
+ query: string | undefined;
71
+ /**
72
+ * Wether to show the filter button
73
+ */
74
+ enableFilter: boolean;
75
+ /**
76
+ * The amount of filters being selected
77
+ */
78
+ selectedFiltersAmount: number | undefined;
79
+ /**
80
+ * The template for the filter button text
81
+ */
82
+ filterButtonTemplate: any;
83
+ /**
84
+ * Wether to show the edit button
85
+ */
86
+ enableEdit: boolean;
87
+ /**
88
+ * The template for the edit button text
89
+ */
90
+ editButtonTemplate: any;
91
+ /**
92
+ * Event when one of the quick filters is clicked
93
+ */
94
+ quickFilter: EventEmitter<QuickFilter>;
95
+ /**
96
+ * Event when the query changes
97
+ */
98
+ queryChange: EventEmitter<string>;
99
+ /**
100
+ * Event when the filter button is clicked
101
+ */
102
+ filter: EventEmitter<null>;
103
+ /**
104
+ * Event when the edit button is clicked
105
+ */
106
+ edit: EventEmitter<null>;
107
+ /** START FOOTER */
108
+ /**
109
+ * Wether to enable page size select
110
+ */
111
+ enablePageSize: boolean;
112
+ /**
113
+ * Wether to enable pagination
114
+ */
115
+ enablePagination: boolean;
116
+ /**
117
+ * Wether to enable export
118
+ */
119
+ enableExport: boolean;
120
+ /**
121
+ * The current page
122
+ */
123
+ page: number;
124
+ /**
125
+ * The total amount of items
126
+ */
127
+ total: number;
128
+ /**
129
+ * Event whenever the page changes
130
+ */
131
+ pageChange: EventEmitter<number>;
132
+ /**
133
+ * The amount of items per page
134
+ */
135
+ pageSize: number;
136
+ /**
137
+ * The options for the page size
138
+ */
139
+ pageSizeOptions: number[];
140
+ /**
141
+ * Event whenever the page changes
142
+ */
143
+ pageSizeChange: EventEmitter<number>;
144
+ /**
145
+ * Event whenever the page changes
146
+ */
147
+ export: EventEmitter<number>;
148
+ /**
149
+ * Wether to hide when there is only 1 page available
150
+ */
151
+ hideOnSinglePage: boolean;
152
+ columns: any[];
153
+ parsedItems: any[];
154
+ loadingRows: unknown[];
155
+ private _ctrlDown;
156
+ private _columnDefinitions;
157
+ set columnDefinitions(v: QueryList<TableColumn>);
158
+ get columnDefinitions(): QueryList<TableColumn>;
159
+ constructor();
160
+ ngOnInit(): void;
161
+ ngOnChanges(changes: SimpleChanges): void;
162
+ keyDown({ key }: {
163
+ key: string;
164
+ }): void;
165
+ keyUp({ key }: {
166
+ key: string;
167
+ }): void;
168
+ visibilityChange(): void;
169
+ onQueryChange({ detail }: CustomEvent<string>): void;
170
+ onQuickFilter({ detail }: CustomEvent<any>): void;
171
+ onPageSizeChange({ detail }: CustomEvent<number>): void;
172
+ onPageChange({ detail }: CustomEvent<number>): void;
173
+ private _parseItems;
174
+ private _generateColumns;
175
+ _checkboxDisabled(item: any): boolean | "" | undefined;
176
+ _selectAllChange($event: any): void;
177
+ _checkboxChange(target: any, index: number): void;
178
+ private _getCheckedValue;
179
+ private _getSelectionValue;
180
+ _selectionContains(row: any, index: number, returnIndex?: boolean): any;
181
+ _selectionContainsAll(): boolean;
182
+ _selectionIndeterminate(): boolean;
183
+ _rowClick($event: {
184
+ target: any;
185
+ }, index: number): void;
186
+ private _findRow;
187
+ private _findRowAction;
188
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
189
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "p-table-ngx", never, { "items": "items"; "loading": "loading"; "amountOfLoadingRows": "amountOfLoadingRows"; "enableRowSelection": "enableRowSelection"; "enableRowClick": "enableRowClick"; "selectedRows": "selectedRows"; "selectionKey": "selectionKey"; "canSelectKey": "canSelectKey"; "quickFilters": "quickFilters"; "activeQuickFilterIdentifier": "activeQuickFilterIdentifier"; "enableSearch": "enableSearch"; "query": "query"; "enableFilter": "enableFilter"; "selectedFiltersAmount": "selectedFiltersAmount"; "filterButtonTemplate": "filterButtonTemplate"; "enableEdit": "enableEdit"; "editButtonTemplate": "editButtonTemplate"; "enablePageSize": "enablePageSize"; "enablePagination": "enablePagination"; "enableExport": "enableExport"; "page": "page"; "total": "total"; "pageSize": "pageSize"; "pageSizeOptions": "pageSizeOptions"; "hideOnSinglePage": "hideOnSinglePage"; }, { "selectedRowsChange": "selectedRowsChange"; "rowClick": "rowClick"; "rowSelected": "rowSelected"; "rowDeselected": "rowDeselected"; "quickFilter": "quickFilter"; "queryChange": "queryChange"; "filter": "filter"; "edit": "edit"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "export": "export"; }, ["columnDefinitions"], never, false>;
190
+ }
@@ -0,0 +1,45 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { TableDefinitionData } from '@paperless/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TableCell {
5
+ /**
6
+ * The variant of the column
7
+ */
8
+ variant: 'default' | 'loading' | 'header';
9
+ /**
10
+ * The index of the column
11
+ */
12
+ index: number;
13
+ /**
14
+ * The index of the row
15
+ */
16
+ rowIndex: number;
17
+ /**
18
+ * The definition of the table column
19
+ */
20
+ definition?: any;
21
+ /**
22
+ * The item in question
23
+ */
24
+ item: any;
25
+ /**
26
+ * The value of the column
27
+ */
28
+ value: any;
29
+ /**
30
+ * The checkbox templateRef
31
+ */
32
+ checkbox: TemplateRef<any> | undefined;
33
+ /**
34
+ * The template ref for the content
35
+ */
36
+ template: TemplateRef<any> | undefined;
37
+ get class(): any;
38
+ get data(): TableDefinitionData | {
39
+ value: string;
40
+ };
41
+ getColumnClasses(): any;
42
+ private _getSizes;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableCell, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "p-table-cell-ngx", never, { "variant": "variant"; "index": "index"; "rowIndex": "rowIndex"; "definition": "definition"; "item": "item"; "value": "value"; "checkbox": "checkbox"; "template": "template"; }, {}, never, never, false>;
45
+ }
@@ -0,0 +1,17 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, TemplateRef } from '@angular/core';
2
+ import { Components } from '@paperless/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare interface PTableColumn extends Components.PTableColumn {
5
+ /**
6
+ * Event to let the table know it has to re render
7
+ */
8
+ tableDefinitionChanged: EventEmitter<CustomEvent<boolean>>;
9
+ }
10
+ export declare class TableColumn {
11
+ protected z: NgZone;
12
+ protected el: HTMLElement;
13
+ template: TemplateRef<any> | undefined;
14
+ constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableColumn, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableColumn, "p-table-column", never, { "align": "align"; "name": "name"; "path": "path"; "sizes": "sizes"; "type": "type"; "useSlot": "useSlot"; }, {}, ["template"], ["*"], false>;
17
+ }
@@ -1,13 +1,17 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./stencil/components";
3
- import * as i2 from "./directives/p-pagination.directive";
4
- import * as i3 from "./directives/p-page-size-select.directive";
5
- import * as i4 from "./directives/p-table-footer.directive";
6
- import * as i5 from "./directives/p-table-header.directive";
7
- import * as i6 from "./directives/p-table.directive";
8
- import * as i7 from "./directives/p-select.directive";
3
+ import * as i2 from "./components/table/table.component";
4
+ import * as i3 from "./components/table-column/table-column.component";
5
+ import * as i4 from "./components/table-cell/table-cell.component";
6
+ import * as i5 from "./directives/p-pagination.directive";
7
+ import * as i6 from "./directives/p-page-size-select.directive";
8
+ import * as i7 from "./directives/p-table-footer.directive";
9
+ import * as i8 from "./directives/p-table-header.directive";
10
+ import * as i9 from "./directives/p-table.directive";
11
+ import * as i10 from "./directives/p-select.directive";
12
+ import * as i11 from "@angular/common";
9
13
  export declare class PaperlessModule {
10
14
  static ɵfac: i0.ɵɵFactoryDeclaration<PaperlessModule, never>;
11
- 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.PLabel, 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.PSelect, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTableContainer, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PToastContainer, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective, typeof i6.TableDirective, typeof i7.SelectDirective], 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.PLabel, 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.PSelect, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTableContainer, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PToastContainer, typeof i1.PTooltip, typeof i2.PaginationDirective, typeof i3.PageSizeSelectDirective, typeof i4.TableFooterDirective, typeof i5.TableHeaderDirective, typeof i6.TableDirective, typeof i7.SelectDirective]>;
15
+ 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.PLabel, 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.PSelect, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTableContainer, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PToastContainer, typeof i1.PTooltip, typeof i2.TableComponent, typeof i3.TableColumn, typeof i4.TableCell, typeof i5.PaginationDirective, typeof i6.PageSizeSelectDirective, typeof i7.TableFooterDirective, typeof i8.TableHeaderDirective, typeof i9.TableDirective, typeof i10.SelectDirective], [typeof i11.CommonModule], [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.PLabel, 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.PSelect, typeof i1.PSliderIndicator, typeof i1.PStatus, typeof i1.PStepper, typeof i1.PStepperItem, typeof i1.PStepperLine, typeof i1.PTabGroup, typeof i1.PTabItem, typeof i1.PTableContainer, typeof i1.PTableFooter, typeof i1.PTableHeader, typeof i1.PTableRow, typeof i1.PToastContainer, typeof i1.PTooltip, typeof i2.TableComponent, typeof i3.TableColumn, typeof i4.TableCell, typeof i5.PaginationDirective, typeof i6.PageSizeSelectDirective, typeof i7.TableFooterDirective, typeof i8.TableHeaderDirective, typeof i9.TableDirective, typeof i10.SelectDirective]>;
12
16
  static ɵinj: i0.ɵɵInjectorDeclaration<PaperlessModule>;
13
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/angular",
3
- "version": "0.1.0-alpha.195",
3
+ "version": "0.1.0-alpha.197",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.3.0 || ^14.0.0",
6
6
  "@angular/core": "^13.3.0 || ^14.0.0"
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './lib/base';
2
+ export * from './lib/components';
2
3
  export * from './lib/directives';
3
4
  export * from './lib/paperless.module';
4
5
  export * from './lib/stencil/components';