@paperless/angular 0.1.0-alpha.197 → 0.1.0-alpha.198
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/directives/index.mjs +4 -1
- package/esm2020/lib/directives/p-table-ngx.directive.mjs +88 -0
- package/esm2020/lib/directives/p-table.directive.mjs +1 -1
- package/esm2020/lib/paperless.module.mjs +4 -3
- package/fesm2015/paperless-angular.mjs +86 -3
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +87 -3
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/directives/index.d.ts +3 -1
- package/lib/directives/p-table-ngx.directive.d.ts +24 -0
- package/lib/directives/p-table.directive.d.ts +3 -3
- package/lib/paperless.module.d.ts +4 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, EventEmitter, Input, Output, ViewChild, Directive, HostListener, ChangeDetectionStrategy, HostBinding, TemplateRef, ContentChild, ContentChildren, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, EventEmitter, Input, Output, ViewChild, Directive, HostListener, ChangeDetectionStrategy, HostBinding, TemplateRef, ContentChild, ContentChildren, Host, NgModule } from '@angular/core';
|
|
3
3
|
import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
5
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
@@ -2533,6 +2533,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
2533
2533
|
}]
|
|
2534
2534
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
2535
2535
|
|
|
2536
|
+
/* eslint-disable @angular-eslint/no-host-metadata-property */
|
|
2537
|
+
class TableNgxDirective extends BaseValueAccessor {
|
|
2538
|
+
constructor(el, _base) {
|
|
2539
|
+
super(el);
|
|
2540
|
+
this._base = _base;
|
|
2541
|
+
this.lastValue = {
|
|
2542
|
+
query: '',
|
|
2543
|
+
quickFilter: undefined,
|
|
2544
|
+
page: 1,
|
|
2545
|
+
pageSize: 12,
|
|
2546
|
+
selectedRows: [],
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
writeValue(value) {
|
|
2550
|
+
this._base.query = this.lastValue.query = value?.query;
|
|
2551
|
+
// this.el.nativeElement.query = this.lastValue.query = value?.query;
|
|
2552
|
+
this.lastValue.quickFilter = value?.quickFilter;
|
|
2553
|
+
this._base.page = this.lastValue.page =
|
|
2554
|
+
value?.page == null ? 1 : value?.page;
|
|
2555
|
+
this._base.pageSize = this.lastValue.pageSize =
|
|
2556
|
+
value?.pageSize == null ? 12 : value?.pageSize;
|
|
2557
|
+
// this.el.nativeElement.page = this.lastValue.page =
|
|
2558
|
+
// value?.page == null ? 1 : value?.page;
|
|
2559
|
+
// this.el.nativeElement.pageSize = this.lastValue.pageSize =
|
|
2560
|
+
// value?.pageSize == null ? 12 : value?.pageSize;
|
|
2561
|
+
this.lastValue.selectedRows =
|
|
2562
|
+
value?.selectedRows == null ? [] : value?.selectedRows;
|
|
2563
|
+
if (value?.quickFilter) {
|
|
2564
|
+
this._setActiveQuickFilter(value.quickFilter);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
registerOnChange(fn) {
|
|
2568
|
+
this.onChange = fn;
|
|
2569
|
+
}
|
|
2570
|
+
registerOnTouched(fn) {
|
|
2571
|
+
this.onTouched = fn;
|
|
2572
|
+
}
|
|
2573
|
+
handleChange(value, type) {
|
|
2574
|
+
this.handleChangeEvent({
|
|
2575
|
+
...this.lastValue,
|
|
2576
|
+
[type]: value,
|
|
2577
|
+
});
|
|
2578
|
+
if (type === 'quickFilter' && typeof value === 'object') {
|
|
2579
|
+
this._setActiveQuickFilter(value);
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
_setActiveQuickFilter(quickFilter) {
|
|
2583
|
+
this._base.activeQuickFilterIdentifier = quickFilter?.identifier;
|
|
2584
|
+
// this.el.nativeElement.activeQuickFilterIdentifier =
|
|
2585
|
+
// quickFilter?.identifier;
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
TableNgxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TableNgxDirective, deps: [{ token: i0.ElementRef }, { token: TableComponent, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2589
|
+
TableNgxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: TableNgxDirective, selector: "p-table-ngx", host: { listeners: { "queryChange": "handleChange($event.detail, \"query\")", "quickFilter": "handleChange($event.detail, \"quickFilter\")", "pageChange": "handleChange($event.detail, \"page\")", "pageSizeChange": "handleChange($event.detail, \"pageSize\")", "selectedRowsChange": "handleChange($event, \"selectedRows\")" } }, providers: [
|
|
2590
|
+
{
|
|
2591
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2592
|
+
useExisting: TableNgxDirective,
|
|
2593
|
+
multi: true,
|
|
2594
|
+
},
|
|
2595
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TableNgxDirective, decorators: [{
|
|
2597
|
+
type: Directive,
|
|
2598
|
+
args: [{
|
|
2599
|
+
selector: 'p-table-ngx',
|
|
2600
|
+
host: {
|
|
2601
|
+
'(queryChange)': 'handleChange($event.detail, "query")',
|
|
2602
|
+
'(quickFilter)': 'handleChange($event.detail, "quickFilter")',
|
|
2603
|
+
'(pageChange)': 'handleChange($event.detail, "page")',
|
|
2604
|
+
'(pageSizeChange)': 'handleChange($event.detail, "pageSize")',
|
|
2605
|
+
'(selectedRowsChange)': 'handleChange($event, "selectedRows")',
|
|
2606
|
+
},
|
|
2607
|
+
providers: [
|
|
2608
|
+
{
|
|
2609
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2610
|
+
useExisting: TableNgxDirective,
|
|
2611
|
+
multi: true,
|
|
2612
|
+
},
|
|
2613
|
+
],
|
|
2614
|
+
}]
|
|
2615
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: TableComponent, decorators: [{
|
|
2616
|
+
type: Host
|
|
2617
|
+
}] }]; } });
|
|
2618
|
+
|
|
2536
2619
|
class TableDirective extends BaseValueAccessor {
|
|
2537
2620
|
constructor(el) {
|
|
2538
2621
|
super(el);
|
|
@@ -2614,6 +2697,7 @@ const CUSTOM_DIRECTIVES = [
|
|
|
2614
2697
|
TableFooterDirective,
|
|
2615
2698
|
TableHeaderDirective,
|
|
2616
2699
|
TableDirective,
|
|
2700
|
+
TableNgxDirective,
|
|
2617
2701
|
SelectDirective,
|
|
2618
2702
|
];
|
|
2619
2703
|
|
|
@@ -2672,7 +2756,7 @@ const DIRECTIVES = [
|
|
|
2672
2756
|
class PaperlessModule {
|
|
2673
2757
|
}
|
|
2674
2758
|
PaperlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2675
|
-
PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, TableComponent, TableColumn, TableCell, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, SelectDirective], imports: [CommonModule], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, TableComponent, TableColumn, TableCell, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, SelectDirective] });
|
|
2759
|
+
PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, TableComponent, TableColumn, TableCell, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, TableNgxDirective, SelectDirective], imports: [CommonModule], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, TableComponent, TableColumn, TableCell, PaginationDirective, PageSizeSelectDirective, TableFooterDirective, TableHeaderDirective, TableDirective, TableNgxDirective, SelectDirective] });
|
|
2676
2760
|
PaperlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, imports: [CommonModule] });
|
|
2677
2761
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PaperlessModule, decorators: [{
|
|
2678
2762
|
type: NgModule,
|
|
@@ -2691,5 +2775,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
2691
2775
|
* Generated bundle index. Do not edit.
|
|
2692
2776
|
*/
|
|
2693
2777
|
|
|
2694
|
-
export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, COMPONENTS, CUSTOM_DIRECTIVES, FormBaseComponent, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, SelectDirective, TableCell, TableColumn, TableComponent, TableDirective, TableFooterDirective, TableHeaderDirective };
|
|
2778
|
+
export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, COMPONENTS, CUSTOM_DIRECTIVES, FormBaseComponent, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToastContainer, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, SelectDirective, TableCell, TableColumn, TableComponent, TableDirective, TableFooterDirective, TableHeaderDirective, TableNgxDirective };
|
|
2695
2779
|
//# sourceMappingURL=paperless-angular.mjs.map
|