@esfaenza/es-table 19.2.3 → 19.2.4
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.
|
@@ -7,10 +7,8 @@ import * as i8 from '@angular/common';
|
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
9
9
|
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import * as i5$1 from '
|
|
11
|
-
import {
|
|
12
|
-
import * as i6 from '@angular/material/input';
|
|
13
|
-
import { MatInputModule } from '@angular/material/input';
|
|
10
|
+
import * as i5$1 from 'primeng/select';
|
|
11
|
+
import { SelectModule } from 'primeng/select';
|
|
14
12
|
import { Subject, forkJoin } from 'rxjs';
|
|
15
13
|
import * as i13 from '@angular/cdk/drag-drop';
|
|
16
14
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
@@ -27,6 +25,8 @@ import * as i14 from '@esfaenza/forms-and-validations';
|
|
|
27
25
|
import { FormsAndValidationsModule } from '@esfaenza/forms-and-validations';
|
|
28
26
|
import * as i1$1 from '@angular/material/tooltip';
|
|
29
27
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
28
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
29
|
+
import { MatInputModule } from '@angular/material/input';
|
|
30
30
|
|
|
31
31
|
/** Classe di localizzazione per il componente **TablePagerComponent** */
|
|
32
32
|
class TablePagerLoc extends LocalizationService {
|
|
@@ -73,13 +73,18 @@ class TablePagerComponent {
|
|
|
73
73
|
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
74
74
|
this.pagingSelected = new EventEmitter();
|
|
75
75
|
/** Opzioni di paginazione */
|
|
76
|
-
this.PagingOptions = [
|
|
76
|
+
this.PagingOptions = [10, 15, 30, 45, 100];
|
|
77
|
+
this.PagingOptionsForSelect = [];
|
|
77
78
|
}
|
|
78
79
|
/** @ignore */
|
|
79
80
|
ngOnInit() {
|
|
80
81
|
this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
|
|
81
82
|
if (this.AllSearch)
|
|
82
83
|
this.PagingOptions.push(this.DefaultAll);
|
|
84
|
+
let availableOptions = this.PagingOptions.filter(pOpt => pOpt == this.DefaultAll || this.PagerCount >= pOpt || this.PagerCount == -1);
|
|
85
|
+
this.PagingOptionsForSelect = availableOptions.map(p => {
|
|
86
|
+
return { description: p == this.DefaultAll ? this.lc.loc("All") : p.toString(), id: p.toString() };
|
|
87
|
+
});
|
|
83
88
|
}
|
|
84
89
|
/** @ignore */
|
|
85
90
|
ngOnChanges(changes) {
|
|
@@ -112,11 +117,11 @@ class TablePagerComponent {
|
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePagerComponent, deps: [{ token: i5.MessageService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
115
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePagerComponent, isStandalone: false, selector: "app-paging", inputs: { CurrentPageSize: "CurrentPageSize", View: "View", WarnOnAll: "WarnOnAll", AllSearch: "AllSearch", DefaultAll: "DefaultAll", GroupMode: "GroupMode", GroupCount: "GroupCount", CountLabel: "CountLabel", ShowCount: "ShowCount", ShowPaging: "ShowPaging", PagerCount: "PagerCount", Hidden: "Hidden" }, outputs: { pagingSelected: "pagingSelected" }, usesOnChanges: true, ngImport: i0, template: "<
|
|
120
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePagerComponent, isStandalone: false, selector: "app-paging", inputs: { CurrentPageSize: "CurrentPageSize", View: "View", WarnOnAll: "WarnOnAll", AllSearch: "AllSearch", DefaultAll: "DefaultAll", GroupMode: "GroupMode", GroupCount: "GroupCount", CountLabel: "CountLabel", ShowCount: "ShowCount", ShowPaging: "ShowPaging", PagerCount: "PagerCount", Hidden: "Hidden" }, outputs: { pagingSelected: "pagingSelected" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!Hidden\" [class.est-mt-4]=\"ShowCount && PagerCount != -1 && !(ShowPaging && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1))\">\r\n <span class=\"est-fs-14\"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? 'Shown Groups' : 'Shown Elements') | localize : lc)}}: </span>\r\n <ng-container *ngIf=\"ShowPaging && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)\">\r\n \r\n <p-select \r\n style=\"width: 120px\"\r\n size=\"small\"\r\n #innerInput=\"ngModel\"\r\n #innerElement\r\n name=\"input\"\r\n appendTo=\"body\"\r\n [filter]=\"true\" \r\n filterBy=\"description\"\r\n [showClear]=\"true\"\r\n [options]=\"PagingOptionsForSelect\"\r\n optionLabel=\"description\"\r\n optionValue=\"id\"\r\n [ngModel]=\"Model\"\r\n (ngModelChange)=\"choice($event)\"\r\n />\r\n\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\"> / </span>\r\n </ng-container>\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\">{{PagerCount | number : '0.0-0' : lc.Locale}}</span>\r\n</div>", styles: [".est-rg-ipp-sel-all,.est-rg-ipp-sel,.est-ipp-sel-all,.est-ipp-sel{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-ipp-bold{font-weight:700}.mat-paginator-page-size-select{margin:6px 4px 0;width:50px}.mat-paginator-page-size-select .mat-form-field-wrapper{height:52px!important;margin-top:-15px!important;padding:0!important}.mat-form-field-type-mat-native-select .mat-form-field-infix:after{margin-top:-5.5px!important}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "pipe", type: i8.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.LocalizePipe, name: "localize" }], viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
116
121
|
}
|
|
117
122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePagerComponent, decorators: [{
|
|
118
123
|
type: Component,
|
|
119
|
-
args: [{ selector: "app-paging", viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<
|
|
124
|
+
args: [{ selector: "app-paging", viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div *ngIf=\"!Hidden\" [class.est-mt-4]=\"ShowCount && PagerCount != -1 && !(ShowPaging && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1))\">\r\n <span class=\"est-fs-14\"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? 'Shown Groups' : 'Shown Elements') | localize : lc)}}: </span>\r\n <ng-container *ngIf=\"ShowPaging && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)\">\r\n \r\n <p-select \r\n style=\"width: 120px\"\r\n size=\"small\"\r\n #innerInput=\"ngModel\"\r\n #innerElement\r\n name=\"input\"\r\n appendTo=\"body\"\r\n [filter]=\"true\" \r\n filterBy=\"description\"\r\n [showClear]=\"true\"\r\n [options]=\"PagingOptionsForSelect\"\r\n optionLabel=\"description\"\r\n optionValue=\"id\"\r\n [ngModel]=\"Model\"\r\n (ngModelChange)=\"choice($event)\"\r\n />\r\n\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\"> / </span>\r\n </ng-container>\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\">{{PagerCount | number : '0.0-0' : lc.Locale}}</span>\r\n</div>", styles: [".est-rg-ipp-sel-all,.est-rg-ipp-sel,.est-ipp-sel-all,.est-ipp-sel{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-ipp-bold{font-weight:700}.mat-paginator-page-size-select{margin:6px 4px 0;width:50px}.mat-paginator-page-size-select .mat-form-field-wrapper{height:52px!important;margin-top:-15px!important;padding:0!important}.mat-form-field-type-mat-native-select .mat-form-field-infix:after{margin-top:-5.5px!important}\n"] }]
|
|
120
125
|
}], ctorParameters: () => [{ type: i5.MessageService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { CurrentPageSize: [{
|
|
121
126
|
type: Input
|
|
122
127
|
}], View: [{
|
|
@@ -5832,7 +5837,7 @@ class EsTableModule {
|
|
|
5832
5837
|
MatInputModule,
|
|
5833
5838
|
MatTooltipModule,
|
|
5834
5839
|
DragDropModule,
|
|
5835
|
-
FormsAndValidationsModule], exports: [
|
|
5840
|
+
FormsAndValidationsModule, SelectModule], exports: [
|
|
5836
5841
|
// Direttive
|
|
5837
5842
|
EsTdDirective,
|
|
5838
5843
|
EsThDirective,
|
|
@@ -5841,12 +5846,12 @@ class EsTableModule {
|
|
|
5841
5846
|
EsTableComponent,
|
|
5842
5847
|
TablePagerComponent,
|
|
5843
5848
|
ThTdProvider] }); }
|
|
5844
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsTableModule, imports: [MODULES] }); }
|
|
5849
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsTableModule, imports: [MODULES, SelectModule] }); }
|
|
5845
5850
|
}
|
|
5846
5851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsTableModule, decorators: [{
|
|
5847
5852
|
type: NgModule,
|
|
5848
5853
|
args: [{
|
|
5849
|
-
imports: [MODULES],
|
|
5854
|
+
imports: [MODULES, SelectModule],
|
|
5850
5855
|
declarations: [...PUBLIC_ELEMENTS, ...PRIVATE_ELEMENTS],
|
|
5851
5856
|
exports: [...PUBLIC_ELEMENTS]
|
|
5852
5857
|
}]
|