@paperless/angular 0.1.0-alpha.129 → 0.1.0-alpha.130

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.
@@ -44,6 +44,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImpor
44
44
  args: ['focusout']
45
45
  }] } });
46
46
 
47
+ class PageSizeSelectDirective extends ValueAccessor {
48
+ constructor(el) {
49
+ super(el);
50
+ }
51
+ writeValue(value) {
52
+ this.el.nativeElement.page = this.lastValue =
53
+ value == null ? '' : value;
54
+ }
55
+ registerOnChange(fn) {
56
+ super.registerOnChange((value) => fn(value === '' ? null : parseInt(value, 10)));
57
+ }
58
+ }
59
+ PageSizeSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PageSizeSelectDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
60
+ PageSizeSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: PageSizeSelectDirective, selector: "p-page-size-select", host: { listeners: { "sizeChange": "handleChangeEvent($event.detail)" } }, providers: [
61
+ {
62
+ provide: NG_VALUE_ACCESSOR,
63
+ useExisting: PageSizeSelectDirective,
64
+ multi: true,
65
+ },
66
+ ], usesInheritance: true, ngImport: i0 });
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PageSizeSelectDirective, decorators: [{
68
+ type: Directive,
69
+ args: [{
70
+ /* tslint:disable-next-line:directive-selector */
71
+ selector: 'p-page-size-select',
72
+ host: {
73
+ '(sizeChange)': 'handleChangeEvent($event.detail)',
74
+ },
75
+ providers: [
76
+ {
77
+ provide: NG_VALUE_ACCESSOR,
78
+ useExisting: PageSizeSelectDirective,
79
+ multi: true,
80
+ },
81
+ ],
82
+ }]
83
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
84
+
47
85
  class PaginationDirective extends ValueAccessor {
48
86
  constructor(el) {
49
87
  super(el);
@@ -57,7 +95,7 @@ class PaginationDirective extends ValueAccessor {
57
95
  }
58
96
  }
59
97
  PaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PaginationDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
60
- PaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: PaginationDirective, selector: "p-pagination", host: { listeners: { "pageChange": "handleChangeEvent($event.target.page)" } }, providers: [
98
+ PaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: PaginationDirective, selector: "p-pagination", host: { listeners: { "pageChange": "handleChangeEvent($event.detail)" } }, providers: [
61
99
  {
62
100
  provide: NG_VALUE_ACCESSOR,
63
101
  useExisting: PaginationDirective,
@@ -70,7 +108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImpor
70
108
  /* tslint:disable-next-line:directive-selector */
71
109
  selector: 'p-pagination',
72
110
  host: {
73
- '(pageChange)': 'handleChangeEvent($event.target.page)',
111
+ '(pageChange)': 'handleChangeEvent($event.detail)',
74
112
  },
75
113
  providers: [
76
114
  {
@@ -82,7 +120,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImpor
82
120
  }]
83
121
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
84
122
 
85
- const CUSTOM_DIRECTIVES = [PaginationDirective];
123
+ class TableFooterDirective extends ValueAccessor {
124
+ constructor(el) {
125
+ super(el);
126
+ this.lastValue = {
127
+ page: 1,
128
+ pageSize: 12,
129
+ };
130
+ }
131
+ writeValue(value) {
132
+ console.log('??');
133
+ this.el.nativeElement.page = this.lastValue.page =
134
+ value?.page == null ? '' : value?.page;
135
+ this.el.nativeElement.pageSize = this.lastValue.pageSize =
136
+ value?.pageSize == null ? '' : value?.pageSize;
137
+ }
138
+ handleChange(value, type) {
139
+ this.handleChangeEvent({
140
+ ...this.lastValue,
141
+ [type]: value,
142
+ });
143
+ }
144
+ }
145
+ TableFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: TableFooterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
146
+ TableFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: TableFooterDirective, selector: "p-table-footer", host: { listeners: { "pageChange": "handleChange($event.detail, \"page\")", "pageSizeChange": "handleChange($event.detail, \"pageSize\")" } }, providers: [
147
+ {
148
+ provide: NG_VALUE_ACCESSOR,
149
+ useExisting: TableFooterDirective,
150
+ multi: true,
151
+ },
152
+ ], usesInheritance: true, ngImport: i0 });
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: TableFooterDirective, decorators: [{
154
+ type: Directive,
155
+ args: [{
156
+ /* tslint:disable-next-line:directive-selector */
157
+ selector: 'p-table-footer',
158
+ host: {
159
+ '(pageChange)': 'handleChange($event.detail, "page")',
160
+ '(pageSizeChange)': 'handleChange($event.detail, "pageSize")',
161
+ },
162
+ providers: [
163
+ {
164
+ provide: NG_VALUE_ACCESSOR,
165
+ useExisting: TableFooterDirective,
166
+ multi: true,
167
+ },
168
+ ],
169
+ }]
170
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
171
+
172
+ class TableHeaderDirective extends ValueAccessor {
173
+ constructor(el) {
174
+ super(el);
175
+ this.lastValue = {
176
+ query: '',
177
+ quickFilter: undefined,
178
+ };
179
+ }
180
+ writeValue(value) {
181
+ this.el.nativeElement.query = this.lastValue.query = value?.query;
182
+ this.lastValue.quickFilter = value?.quickFilter;
183
+ if (value?.quickFilter) {
184
+ this._setActiveQuickFilter(value.quickFilter);
185
+ }
186
+ }
187
+ handleChange(value, type) {
188
+ this.handleChangeEvent({
189
+ ...this.lastValue,
190
+ [type]: value,
191
+ });
192
+ if (type === 'quickFilter' && typeof value !== 'string') {
193
+ this._setActiveQuickFilter(value);
194
+ }
195
+ }
196
+ _setActiveQuickFilter(quickFilter) {
197
+ this.el.nativeElement.activeQuickFilterIdentifier =
198
+ quickFilter?.identifier;
199
+ }
200
+ }
201
+ TableHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: TableHeaderDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
202
+ TableHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: TableHeaderDirective, selector: "p-table-header", host: { listeners: { "queryChange": "handleChange($event.detail, \"query\")", "quickFilter": "handleChange($event.detail, \"quickFilter\")" } }, providers: [
203
+ {
204
+ provide: NG_VALUE_ACCESSOR,
205
+ useExisting: TableHeaderDirective,
206
+ multi: true,
207
+ },
208
+ ], usesInheritance: true, ngImport: i0 });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: TableHeaderDirective, decorators: [{
210
+ type: Directive,
211
+ args: [{
212
+ /* tslint:disable-next-line:directive-selector */
213
+ selector: 'p-table-header',
214
+ host: {
215
+ '(queryChange)': 'handleChange($event.detail, "query")',
216
+ '(quickFilter)': 'handleChange($event.detail, "quickFilter")',
217
+ },
218
+ providers: [
219
+ {
220
+ provide: NG_VALUE_ACCESSOR,
221
+ useExisting: TableHeaderDirective,
222
+ multi: true,
223
+ },
224
+ ],
225
+ }]
226
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
227
+
228
+ const CUSTOM_DIRECTIVES = [
229
+ PaginationDirective,
230
+ PageSizeSelectDirective,
231
+ TableFooterDirective,
232
+ TableHeaderDirective,
233
+ ];
86
234
 
87
235
  /* eslint-disable */
88
236
  const proxyInputs = (Cmp, inputs) => {
@@ -1390,7 +1538,7 @@ const DIRECTIVES = [
1390
1538
  class PaperlessModule {
1391
1539
  }
1392
1540
  PaperlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PaperlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1393
- PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective] });
1541
+ PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective] });
1394
1542
  PaperlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PaperlessModule });
1395
1543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: PaperlessModule, decorators: [{
1396
1544
  type: NgModule,
@@ -1408,5 +1556,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImpor
1408
1556
  * Generated bundle index. Do not edit.
1409
1557
  */
1410
1558
 
1411
- export { CUSTOM_DIRECTIVES, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PaginationDirective, PaperlessModule };
1559
+ export { CUSTOM_DIRECTIVES, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTable, PTableBody, PTableContainer, PTableDefinition, PTableFooter, PTableHeader, PTableRow, PTag, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, TableFooterDirective, TableHeaderDirective };
1412
1560
  //# sourceMappingURL=paperless-angular.mjs.map