@esfaenza/es-pager 19.2.2 → 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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable,
|
|
2
|
+
import { Injectable, input, EventEmitter, signal, computed, effect, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@esfaenza/localizations';
|
|
4
4
|
import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
|
|
5
5
|
import * as i1 from '@esfaenza/extensions';
|
|
@@ -7,10 +7,8 @@ import * as i3 from '@angular/common';
|
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import * as i4 from '@angular/forms';
|
|
9
9
|
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import * as i5 from '
|
|
11
|
-
import {
|
|
12
|
-
import * as i6 from '@angular/material/input';
|
|
13
|
-
import { MatInputModule } from '@angular/material/input';
|
|
10
|
+
import * as i5 from 'primeng/select';
|
|
11
|
+
import { SelectModule } from 'primeng/select';
|
|
14
12
|
import { RouterModule } from '@angular/router';
|
|
15
13
|
|
|
16
14
|
/** Modello di configurazione per L'EsTable */
|
|
@@ -35,51 +33,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
35
33
|
type: Injectable
|
|
36
34
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
37
35
|
|
|
38
|
-
/** Token che indica se emettere log a console o meno */
|
|
39
|
-
const ESP_DEBUG = new InjectionToken('ESP_DEBUG');
|
|
40
|
-
|
|
41
36
|
// Angular
|
|
42
37
|
/** Componente che si occupa della paginazione di una tabella */
|
|
43
38
|
class TablePagerComponent {
|
|
44
39
|
/** @ignore */
|
|
45
|
-
constructor(msgExts, lc, cdr
|
|
40
|
+
constructor(msgExts, lc, cdr) {
|
|
46
41
|
this.msgExts = msgExts;
|
|
47
42
|
this.lc = lc;
|
|
48
43
|
this.cdr = cdr;
|
|
49
|
-
|
|
44
|
+
/** Dimensione di pagina attuale */
|
|
45
|
+
this.CurrentPageSize = input(null);
|
|
46
|
+
/** View gestita, che può essere un IAppSearch o una ReportView */
|
|
47
|
+
this.View = input();
|
|
50
48
|
/** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
|
|
51
|
-
this.WarnOnAll = true;
|
|
49
|
+
this.WarnOnAll = input(true);
|
|
52
50
|
/** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
|
|
53
|
-
this.AllSearch = true;
|
|
51
|
+
this.AllSearch = input(true);
|
|
54
52
|
/** Placeholder che identifica il "Tutti" */
|
|
55
|
-
this.DefaultAll = 999999;
|
|
53
|
+
this.DefaultAll = input(999999);
|
|
56
54
|
/** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
|
|
57
|
-
this.GroupMode = false;
|
|
55
|
+
this.GroupMode = input(false);
|
|
58
56
|
/** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
|
|
59
|
-
this.GroupCount = false;
|
|
57
|
+
this.GroupCount = input(false);
|
|
60
58
|
/** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
|
|
61
|
-
this.CountLabel = null;
|
|
59
|
+
this.CountLabel = input(null);
|
|
62
60
|
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
63
|
-
this.ShowCount = true;
|
|
61
|
+
this.ShowCount = input(true);
|
|
64
62
|
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
65
|
-
this.ShowPaging = true;
|
|
63
|
+
this.ShowPaging = input(true);
|
|
64
|
+
/** Indica il numero totale di oggeti presenti */
|
|
65
|
+
this.PagerCount = input(undefined);
|
|
66
|
+
/** Indica se mostrare o meno il contenuto @deprecated usata solo da MatrixValuesComponent nella lib relativa */
|
|
67
|
+
this.Hidden = input(false);
|
|
66
68
|
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
67
69
|
this.pagingSelected = new EventEmitter();
|
|
70
|
+
/** Modello su cui la select effettua operazioni di selezione */
|
|
71
|
+
this.Model = signal(null);
|
|
68
72
|
/** Opzioni di paginazione */
|
|
69
|
-
this.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
this.Model = newView?.currentValue ? (newView.currentValue.itemsperpageoverride || 15) : newCPS?.currentValue ? newCPS.currentValue : null;
|
|
73
|
+
this._pagingOptions = [10, 15, 30, 45, 100];
|
|
74
|
+
this.PagingOptionsForSelect = computed(() => {
|
|
75
|
+
let defAllValue = this.DefaultAll();
|
|
76
|
+
let availableOptions = this._pagingOptions.filter(pOpt => pOpt == defAllValue || this.PagerCount() >= pOpt || this.PagerCount() == -1);
|
|
77
|
+
if (this.AllSearch())
|
|
78
|
+
availableOptions.push(defAllValue);
|
|
79
|
+
return availableOptions.map(p => { return { description: p == defAllValue ? this.lc.loc("All") : p.toString(), id: p }; });
|
|
80
|
+
});
|
|
81
|
+
effect(() => {
|
|
82
|
+
let vv = this.View();
|
|
83
|
+
let newModel = vv ? (vv.itemsperpageoverride || 15) : this.CurrentPageSize();
|
|
84
|
+
this.Model.set(newModel);
|
|
85
|
+
});
|
|
83
86
|
}
|
|
84
87
|
/**
|
|
85
88
|
* Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
|
|
@@ -89,60 +92,30 @@ class TablePagerComponent {
|
|
|
89
92
|
* @param {number} pageSize Dimensione selezionata lato UI
|
|
90
93
|
*/
|
|
91
94
|
choice(pageSize) {
|
|
92
|
-
if (pageSize == this.DefaultAll && this.WarnOnAll) {
|
|
93
|
-
this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"), this.lc.loc("This might slow down the page and possibly crash the entire application"), () => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.Model = null;
|
|
97
|
-
this.cdr.detectChanges();
|
|
98
|
-
this.Model = prevModel;
|
|
99
|
-
this.cdr.detectChanges();
|
|
95
|
+
if (pageSize == this.DefaultAll() && this.WarnOnAll) {
|
|
96
|
+
this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"), this.lc.loc("This might slow down the page and possibly crash the entire application"), () => {
|
|
97
|
+
this.pagingSelected.emit(pageSize);
|
|
98
|
+
this.Model.set(pageSize);
|
|
100
99
|
});
|
|
101
100
|
}
|
|
102
101
|
else {
|
|
103
102
|
this.pagingSelected.emit(pageSize);
|
|
104
|
-
this.Model
|
|
103
|
+
this.Model.set(pageSize);
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePagerComponent, deps: [{ token: i1.MessageService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePagerComponent, deps: [{ token: i1.MessageService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: TablePagerComponent, isStandalone: false, selector: "app-paging", inputs: { CurrentPageSize: { classPropertyName: "CurrentPageSize", publicName: "CurrentPageSize", isSignal: true, isRequired: false, transformFunction: null }, View: { classPropertyName: "View", publicName: "View", isSignal: true, isRequired: false, transformFunction: null }, WarnOnAll: { classPropertyName: "WarnOnAll", publicName: "WarnOnAll", isSignal: true, isRequired: false, transformFunction: null }, AllSearch: { classPropertyName: "AllSearch", publicName: "AllSearch", isSignal: true, isRequired: false, transformFunction: null }, DefaultAll: { classPropertyName: "DefaultAll", publicName: "DefaultAll", isSignal: true, isRequired: false, transformFunction: null }, GroupMode: { classPropertyName: "GroupMode", publicName: "GroupMode", isSignal: true, isRequired: false, transformFunction: null }, GroupCount: { classPropertyName: "GroupCount", publicName: "GroupCount", isSignal: true, isRequired: false, transformFunction: null }, CountLabel: { classPropertyName: "CountLabel", publicName: "CountLabel", isSignal: true, isRequired: false, transformFunction: null }, ShowCount: { classPropertyName: "ShowCount", publicName: "ShowCount", isSignal: true, isRequired: false, transformFunction: null }, ShowPaging: { classPropertyName: "ShowPaging", publicName: "ShowPaging", isSignal: true, isRequired: false, transformFunction: null }, PagerCount: { classPropertyName: "PagerCount", publicName: "PagerCount", isSignal: true, isRequired: false, transformFunction: null }, Hidden: { classPropertyName: "Hidden", publicName: "Hidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pagingSelected: "pagingSelected" }, 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: 95px\"\r\n size=\"small\"\r\n name=\"input\"\r\n appendTo=\"body\"\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{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-head-resizer{top:0;right:0;bottom:0;width:2px;position:absolute;cursor:col-resize;background-color:#ccc}.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:0 4px;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}.mat-paginator-page-size-select .mat-form-field-underline{bottom:10px}.est-mt-4{margin-top:4px!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.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: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.LocalizePipe, name: "localize" }], viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
109
108
|
}
|
|
110
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePagerComponent, decorators: [{
|
|
111
110
|
type: Component,
|
|
112
|
-
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
|
|
113
|
-
}], ctorParameters: () => [{ type: i1.MessageService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef },
|
|
114
|
-
type: Optional
|
|
115
|
-
}, {
|
|
116
|
-
type: Inject,
|
|
117
|
-
args: [ESP_DEBUG]
|
|
118
|
-
}] }], propDecorators: { CurrentPageSize: [{
|
|
119
|
-
type: Input
|
|
120
|
-
}], View: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], WarnOnAll: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], AllSearch: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], DefaultAll: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], GroupMode: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], GroupCount: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], CountLabel: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], ShowCount: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], ShowPaging: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], PagerCount: [{
|
|
139
|
-
type: Input
|
|
140
|
-
}], Hidden: [{
|
|
141
|
-
type: Input
|
|
142
|
-
}], pagingSelected: [{
|
|
111
|
+
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: 95px\"\r\n size=\"small\"\r\n name=\"input\"\r\n appendTo=\"body\"\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{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-head-resizer{top:0;right:0;bottom:0;width:2px;position:absolute;cursor:col-resize;background-color:#ccc}.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:0 4px;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}.mat-paginator-page-size-select .mat-form-field-underline{bottom:10px}.est-mt-4{margin-top:4px!important}\n"] }]
|
|
112
|
+
}], ctorParameters: () => [{ type: i1.MessageService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { pagingSelected: [{
|
|
143
113
|
type: Output
|
|
144
114
|
}] } });
|
|
145
115
|
|
|
116
|
+
/** Token che indica se emettere log a console o meno */
|
|
117
|
+
const ESP_DEBUG = new InjectionToken('ESP_DEBUG');
|
|
118
|
+
|
|
146
119
|
class EsPagerModule {
|
|
147
120
|
static forRoot(config) {
|
|
148
121
|
return {
|
|
@@ -157,14 +130,12 @@ class EsPagerModule {
|
|
|
157
130
|
FormsModule,
|
|
158
131
|
RouterModule,
|
|
159
132
|
LocalizationModule,
|
|
160
|
-
|
|
161
|
-
MatInputModule], exports: [TablePagerComponent] }); }
|
|
133
|
+
SelectModule], exports: [TablePagerComponent] }); }
|
|
162
134
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsPagerModule, imports: [CommonModule,
|
|
163
135
|
FormsModule,
|
|
164
136
|
RouterModule,
|
|
165
137
|
LocalizationModule,
|
|
166
|
-
|
|
167
|
-
MatInputModule] }); }
|
|
138
|
+
SelectModule] }); }
|
|
168
139
|
}
|
|
169
140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsPagerModule, decorators: [{
|
|
170
141
|
type: NgModule,
|
|
@@ -174,8 +145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
174
145
|
FormsModule,
|
|
175
146
|
RouterModule,
|
|
176
147
|
LocalizationModule,
|
|
177
|
-
|
|
178
|
-
MatInputModule,
|
|
148
|
+
SelectModule,
|
|
179
149
|
],
|
|
180
150
|
declarations: [TablePagerComponent],
|
|
181
151
|
exports: [TablePagerComponent]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esfaenza-es-pager.mjs","sources":["../../../projects/es-pager/src/lib/domain/configuration/EsPagerModuleConfig.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.loc.ts","../../../projects/es-pager/src/lib/tokens.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.html","../../../projects/es-pager/src/lib/es-pager.module.ts","../../../projects/es-pager/src/public-api.ts","../../../projects/es-pager/src/esfaenza-es-pager.ts"],"sourcesContent":["/** Modello di configurazione per L'EsTable */\r\nexport class EsPagerModuleConfig {\r\n\r\n /** Locale da utilizzare per i messaggi, supportati \"it-IT\" ed \"en-US\" */\r\n public locale?: string;\r\n /** Indica se scrivere messaggi di log a console */\r\n public debugMode?: boolean;\r\n}","import { Injectable, Injector } from \"@angular/core\";\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\n\r\n/** Classe di localizzazione per il componente **TablePagerComponent** */\r\n@Injectable()\r\nexport class TablePagerLoc extends LocalizationService {\r\n\r\n /** @ignore */\r\n constructor(injector: Injector) {\r\n super(injector);\r\n super.set(\"en->it\", \"All\", [\"Tutto\"]);\r\n super.set(\"en->it\", \"Shown Elements\", [\"Elementi visualizzati\"]);\r\n super.set(\"en->it\", \"Shown Groups\", [\"Gruppi visualizzati\"]);\r\n super.set(\"en->it\", \"Are you sure you want to retrieve all results?\", [\"Si è sicuri di voler caricare tutti i risultati?\"]);\r\n super.set(\"en->it\", \"This might slow down the page and possibly crash the entire application\", [\"L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione\"]);\r\n }\r\n}","import { InjectionToken } from '@angular/core';\r\n\r\n/** Token che indica se emettere log a console o meno */\r\nexport const ESP_DEBUG: InjectionToken<string> = new InjectionToken<string>('ESP_DEBUG');","// Angular\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, Optional, Output, SimpleChanges, ViewEncapsulation } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\nimport { MessageService } from \"@esfaenza/extensions\";\r\n\r\n// Applicazione\r\nimport { TablePagerLoc } from \"./table_pager.component.loc\";\r\nimport { ESP_DEBUG } from \"../../tokens\";\r\n\r\n/** Componente che si occupa della paginazione di una tabella */\r\n@Component({\n selector: \"app-paging\",\n viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }],\n styleUrls: ['./table_pager.component.scss'],\n templateUrl: \"./table_pager.component.html\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\r\nexport class TablePagerComponent {\r\n\r\n /** Dimensione di pagina attuale */\r\n @Input() CurrentPageSize: any;\r\n\r\n /** View gestita, che può essere un IAppSearch o una ReportView */\r\n @Input() View: any;\r\n\r\n /** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare \"Tutti\" */\r\n @Input() WarnOnAll: boolean = true;\r\n\r\n /** Indica se dare la possibilità o meno di selezionare \"Tutti\" nelle opzioni di paginazione */\r\n @Input() AllSearch: boolean = true;\r\n \r\n /** Placeholder che identifica il \"Tutti\" */\r\n @Input() DefaultAll = 999999;\r\n \r\n /** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */\r\n @Input() GroupMode = false;\r\n\r\n /** Indica se utilizzare il conteggio dei gruppi o degli oggetti */\r\n @Input() GroupCount = false;\r\n\r\n /** Indica il testo che va a sostituire \"Oggetti Visualizzati\" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */\r\n @Input() CountLabel: string = null;\r\n\r\n /** Indica se visualizzare il numero totale di oggeti presenti */\r\n @Input() ShowCount: boolean = true;\r\n\r\n /** Indica se visualizzare il numero totale di oggeti presenti */\r\n @Input() ShowPaging: boolean = true;\r\n\r\n /** Indica il numero totale di oggeti presenti */\r\n @Input() PagerCount: number;\r\n\r\n /** Indica se mostrare o meno il contenuto @deprecated usata solo da MatrixValuesComponent nella lib relativa */\r\n @Input() Hidden: boolean;\r\n\r\n /** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */\r\n @Output() pagingSelected = new EventEmitter<number>();\r\n\r\n /** @ignore */\r\n constructor(private msgExts: MessageService, public lc: LocalizationService, public cdr: ChangeDetectorRef, @Optional() @Inject(ESP_DEBUG) public debug: boolean) { }\r\n\r\n /** Modello su cui la select effettua operazioni di selezione */\r\n public Model: number;\r\n\r\n /** Opzioni di paginazione */\r\n public PagingOptions: number[] = [10, 15, 30, 45, 100 ];\r\n\r\n /** @ignore */\r\n ngOnInit() {\r\n this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;\r\n if (this.AllSearch)\r\n this.PagingOptions.push(this.DefaultAll);\r\n }\r\n\r\n /** @ignore */\r\n ngOnChanges(changes: SimpleChanges) {\r\n let newView = changes['View'];\r\n let newCPS = changes['CurrentPageSize'];\r\n\r\n if ((newView && !newView.firstChange) || (newCPS && !newCPS.firstChange))\r\n this.Model = newView?.currentValue ? (newView.currentValue.itemsperpageoverride || 15) : newCPS?.currentValue ? newCPS.currentValue : null;\r\n }\r\n\r\n /**\r\n * Funzione richiamata dal template quando un utente clicca su un numero di paginazione.\r\n * \r\n * Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati\r\n * \r\n * @param {number} pageSize Dimensione selezionata lato UI\r\n */\r\n public choice(pageSize: number) {\r\n if (pageSize == this.DefaultAll && this.WarnOnAll) {\r\n this.msgExts.simpleWarningWithChoice(\r\n this.lc.loc(\"Are you sure you want to retrieve all results?\"),\r\n this.lc.loc(\"This might slow down the page and possibly crash the entire application\"),\r\n () => { this.pagingSelected.emit(pageSize); this.Model = pageSize; },\r\n () => {\r\n // Dio solo sa perché mi tocca fare sta roba... qui dentro per qualche motivo la CD non prende\r\n let prevModel = this.Model;\r\n this.Model = null;\r\n this.cdr.detectChanges();\r\n this.Model = prevModel;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n else {\r\n this.pagingSelected.emit(pageSize);\r\n this.Model = pageSize;\r\n }\r\n }\r\n}","<div *ngIf=\"!Hidden\" [class.est-mt-4]=\"ShowCount && PagerCount != -1 && !(ShowPaging && Model && (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 && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)\">\r\n <mat-form-field [appearance]=\"'legacy'\" class=\"mat-paginator-page-size-select est-fs-14 est-ipp-bold\">\r\n <select matNativeControl [ngModel]=\"Model\" name=\"input\" (ngModelChange)=\"choice($event)\">\r\n <ng-container *ngFor=\"let pOpt of PagingOptions\">\r\n <option *ngIf=\"pOpt == DefaultAll || PagerCount >= pOpt || PagerCount == -1\" [value]=\"pOpt\">{{ pOpt == DefaultAll ? ('All' | localize : lc) : pOpt.toString()}}</option>\r\n </ng-container>\r\n </select>\r\n </mat-form-field>\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>","import { CommonModule } from '@angular/common';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\n\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\n\r\nimport { LocalizationModule } from '@esfaenza/localizations';\r\n\r\nimport { ESP_DEBUG } from './tokens';\r\nimport { EsPagerModuleConfig } from './domain/configuration/EsPagerModuleConfig';\r\n\r\nimport { TablePagerComponent } from './components/pager/table_pager.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule, \r\n RouterModule,\r\n LocalizationModule,\r\n MatSelectModule,\r\n MatInputModule,\r\n ],\r\n declarations: [TablePagerComponent],\r\n exports: [TablePagerComponent]\r\n})\r\nexport class EsPagerModule {\r\n static forRoot(config?: EsPagerModuleConfig): ModuleWithProviders<EsPagerModule> {\r\n return {\r\n ngModule: EsPagerModule,\r\n providers: [\r\n { provide: ESP_DEBUG, useValue: config?.debugMode || false }\r\n ]\r\n };\r\n }\r\n}","/*\r\n * Public API Surface of es-pager\r\n */\r\n\r\nexport * from './lib/domain/configuration/EsPagerModuleConfig'\r\nexport * from './lib/components/pager/table_pager.component'\r\nexport * from './lib/es-pager.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;MACa,mBAAmB,CAAA;AAM/B;;ACJD;AAEM,MAAO,aAAc,SAAQ,mBAAmB,CAAA;;AAGlD,IAAA,WAAA,CAAY,QAAkB,EAAA;QAC1B,KAAK,CAAC,QAAQ,CAAC;QACf,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC;QACrC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,EAAE,CAAC,uBAAuB,CAAC,CAAC;QAChE,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAC,qBAAqB,CAAC,CAAC;QAC5D,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,gDAAgD,EAAE,CAAC,kDAAkD,CAAC,CAAC;QAC3H,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,yEAAyE,EAAE,CAAC,4EAA4E,CAAC,CAAC;;+GATzK,aAAa,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pager.mjs","sources":["../../../projects/es-pager/src/lib/domain/configuration/EsPagerModuleConfig.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.loc.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.ts","../../../projects/es-pager/src/lib/components/pager/table_pager.component.html","../../../projects/es-pager/src/lib/tokens.ts","../../../projects/es-pager/src/lib/es-pager.module.ts","../../../projects/es-pager/src/public-api.ts","../../../projects/es-pager/src/esfaenza-es-pager.ts"],"sourcesContent":["/** Modello di configurazione per L'EsTable */\r\nexport class EsPagerModuleConfig {\r\n\r\n /** Locale da utilizzare per i messaggi, supportati \"it-IT\" ed \"en-US\" */\r\n public locale?: string;\r\n /** Indica se scrivere messaggi di log a console */\r\n public debugMode?: boolean;\r\n}","import { Injectable, Injector } from \"@angular/core\";\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\n\r\n/** Classe di localizzazione per il componente **TablePagerComponent** */\r\n@Injectable()\r\nexport class TablePagerLoc extends LocalizationService {\r\n\r\n /** @ignore */\r\n constructor(injector: Injector) {\r\n super(injector);\r\n super.set(\"en->it\", \"All\", [\"Tutto\"]);\r\n super.set(\"en->it\", \"Shown Elements\", [\"Elementi visualizzati\"]);\r\n super.set(\"en->it\", \"Shown Groups\", [\"Gruppi visualizzati\"]);\r\n super.set(\"en->it\", \"Are you sure you want to retrieve all results?\", [\"Si è sicuri di voler caricare tutti i risultati?\"]);\r\n super.set(\"en->it\", \"This might slow down the page and possibly crash the entire application\", [\"L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione\"]);\r\n }\r\n}","// Angular\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, input, Output, ViewEncapsulation } from \"@angular/core\";\r\nimport { signal, computed, Signal, effect, WritableSignal } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\nimport { MessageService } from \"@esfaenza/extensions\";\r\n\r\n// Applicazione\r\nimport { TablePagerLoc } from \"./table_pager.component.loc\";\r\n\r\n/** Componente che si occupa della paginazione di una tabella */\r\n@Component({\r\n selector: \"app-paging\",\r\n viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }],\r\n styleUrls: ['./table_pager.component.scss'],\r\n templateUrl: \"./table_pager.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: false\r\n})\r\nexport class TablePagerComponent {\r\n\r\n /** Dimensione di pagina attuale */\r\n CurrentPageSize = input<number>(null);\r\n /** View gestita, che può essere un IAppSearch o una ReportView */\r\n View = input<any>();\r\n /** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare \"Tutti\" */\r\n WarnOnAll = input<boolean>(true);\r\n /** Indica se dare la possibilità o meno di selezionare \"Tutti\" nelle opzioni di paginazione */\r\n AllSearch = input<boolean>(true);\r\n /** Placeholder che identifica il \"Tutti\" */\r\n DefaultAll = input<number>(999999);\r\n /** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */\r\n GroupMode = input<boolean>(false);\r\n /** Indica se utilizzare il conteggio dei gruppi o degli oggetti */\r\n GroupCount = input<boolean>(false);\r\n /** Indica il testo che va a sostituire \"Oggetti Visualizzati\" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */\r\n CountLabel = input<string>(null);\r\n /** Indica se visualizzare il numero totale di oggeti presenti */\r\n ShowCount = input<boolean>(true);\r\n /** Indica se visualizzare il numero totale di oggeti presenti */\r\n ShowPaging = input<boolean>(true);\r\n /** Indica il numero totale di oggeti presenti */\r\n PagerCount = input<number>(undefined);\r\n /** Indica se mostrare o meno il contenuto @deprecated usata solo da MatrixValuesComponent nella lib relativa */\r\n Hidden = input<boolean>(false);\r\n\r\n /** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */\r\n @Output() pagingSelected = new EventEmitter<number>();\r\n\r\n /** @ignore */\r\n constructor(private msgExts: MessageService, public lc: LocalizationService, public cdr: ChangeDetectorRef) {\r\n effect(() => {\r\n let vv = this.View();\r\n let newModel = vv ? (vv.itemsperpageoverride || 15) : this.CurrentPageSize();\r\n this.Model.set(newModel);\r\n });\r\n }\r\n\r\n /** Modello su cui la select effettua operazioni di selezione */\r\n public Model: WritableSignal<number> = signal(null);\r\n\r\n /** Opzioni di paginazione */\r\n private _pagingOptions: number[] = [10, 15, 30, 45, 100];\r\n\r\n public PagingOptionsForSelect: Signal<{ id: number, description: string }[]> = computed(() => {\r\n let defAllValue = this.DefaultAll();\r\n let availableOptions = this._pagingOptions.filter(pOpt => pOpt == defAllValue || this.PagerCount() >= pOpt || this.PagerCount() == -1);\r\n if (this.AllSearch())\r\n availableOptions.push(defAllValue);\r\n\r\n return availableOptions.map(p => { return { description: p == defAllValue ? this.lc.loc(\"All\") : p.toString(), id: p } });\r\n });\r\n\r\n /**\r\n * Funzione richiamata dal template quando un utente clicca su un numero di paginazione.\r\n * \r\n * Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati\r\n * \r\n * @param {number} pageSize Dimensione selezionata lato UI\r\n */\r\n public choice(pageSize: number) {\r\n if (pageSize == this.DefaultAll() && this.WarnOnAll) {\r\n this.msgExts.simpleWarningWithChoice(\r\n this.lc.loc(\"Are you sure you want to retrieve all results?\"),\r\n this.lc.loc(\"This might slow down the page and possibly crash the entire application\"),\r\n () => {\r\n this.pagingSelected.emit(pageSize);\r\n this.Model.set(pageSize);\r\n });\r\n }\r\n else {\r\n this.pagingSelected.emit(pageSize);\r\n this.Model.set(pageSize);\r\n }\r\n }\r\n}","<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: 95px\"\r\n size=\"small\"\r\n name=\"input\"\r\n appendTo=\"body\"\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>","import { InjectionToken } from '@angular/core';\r\n\r\n/** Token che indica se emettere log a console o meno */\r\nexport const ESP_DEBUG: InjectionToken<string> = new InjectionToken<string>('ESP_DEBUG');","import { CommonModule } from '@angular/common';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\n\r\nimport { SelectModule } from 'primeng/select';\r\n\r\nimport { LocalizationModule } from '@esfaenza/localizations';\r\n\r\nimport { ESP_DEBUG } from './tokens';\r\nimport { EsPagerModuleConfig } from './domain/configuration/EsPagerModuleConfig';\r\n\r\nimport { TablePagerComponent } from './components/pager/table_pager.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule, \r\n RouterModule,\r\n LocalizationModule,\r\n SelectModule,\r\n ],\r\n declarations: [TablePagerComponent],\r\n exports: [TablePagerComponent]\r\n})\r\nexport class EsPagerModule {\r\n static forRoot(config?: EsPagerModuleConfig): ModuleWithProviders<EsPagerModule> {\r\n return {\r\n ngModule: EsPagerModule,\r\n providers: [\r\n { provide: ESP_DEBUG, useValue: config?.debugMode || false }\r\n ]\r\n };\r\n }\r\n}","/*\r\n * Public API Surface of es-pager\r\n */\r\n\r\nexport * from './lib/domain/configuration/EsPagerModuleConfig'\r\nexport * from './lib/components/pager/table_pager.component'\r\nexport *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A,EAAA,CAAA,CAAA;gHAAb,aAAa,EAAA,YAAA,EAAA,CAHT,mBAAmB,CAAA,EAAA,OAAA,EAAA,CANhC,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,kBAAkB;AAClB,YAAA,YAAY,aAGJ,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YATtB,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,kBAAkB;YAClB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKH,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,kBAAkB;wBAClB,YAAY;AACb,qBAAA;oBACD,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB;AAC9B,iBAAA;;;ACxBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from "@angular/core";
|
|
2
|
+
import { Signal, WritableSignal } from "@angular/core";
|
|
2
3
|
import { LocalizationService } from "@esfaenza/localizations";
|
|
3
4
|
import { MessageService } from "@esfaenza/extensions";
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
@@ -7,43 +8,42 @@ export declare class TablePagerComponent {
|
|
|
7
8
|
private msgExts;
|
|
8
9
|
lc: LocalizationService;
|
|
9
10
|
cdr: ChangeDetectorRef;
|
|
10
|
-
debug: boolean;
|
|
11
11
|
/** Dimensione di pagina attuale */
|
|
12
|
-
CurrentPageSize:
|
|
12
|
+
CurrentPageSize: import("@angular/core").InputSignal<number>;
|
|
13
13
|
/** View gestita, che può essere un IAppSearch o una ReportView */
|
|
14
|
-
View: any
|
|
14
|
+
View: import("@angular/core").InputSignal<any>;
|
|
15
15
|
/** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
|
|
16
|
-
WarnOnAll: boolean
|
|
16
|
+
WarnOnAll: import("@angular/core").InputSignal<boolean>;
|
|
17
17
|
/** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
|
|
18
|
-
AllSearch: boolean
|
|
18
|
+
AllSearch: import("@angular/core").InputSignal<boolean>;
|
|
19
19
|
/** Placeholder che identifica il "Tutti" */
|
|
20
|
-
DefaultAll: number
|
|
20
|
+
DefaultAll: import("@angular/core").InputSignal<number>;
|
|
21
21
|
/** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
|
|
22
|
-
GroupMode: boolean
|
|
22
|
+
GroupMode: import("@angular/core").InputSignal<boolean>;
|
|
23
23
|
/** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
|
|
24
|
-
GroupCount: boolean
|
|
24
|
+
GroupCount: import("@angular/core").InputSignal<boolean>;
|
|
25
25
|
/** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
|
|
26
|
-
CountLabel: string
|
|
26
|
+
CountLabel: import("@angular/core").InputSignal<string>;
|
|
27
27
|
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
28
|
-
ShowCount: boolean
|
|
28
|
+
ShowCount: import("@angular/core").InputSignal<boolean>;
|
|
29
29
|
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
30
|
-
ShowPaging: boolean
|
|
30
|
+
ShowPaging: import("@angular/core").InputSignal<boolean>;
|
|
31
31
|
/** Indica il numero totale di oggeti presenti */
|
|
32
|
-
PagerCount: number
|
|
32
|
+
PagerCount: import("@angular/core").InputSignal<number>;
|
|
33
33
|
/** Indica se mostrare o meno il contenuto @deprecated usata solo da MatrixValuesComponent nella lib relativa */
|
|
34
|
-
Hidden: boolean
|
|
34
|
+
Hidden: import("@angular/core").InputSignal<boolean>;
|
|
35
35
|
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
36
36
|
pagingSelected: EventEmitter<number>;
|
|
37
37
|
/** @ignore */
|
|
38
|
-
constructor(msgExts: MessageService, lc: LocalizationService, cdr: ChangeDetectorRef
|
|
38
|
+
constructor(msgExts: MessageService, lc: LocalizationService, cdr: ChangeDetectorRef);
|
|
39
39
|
/** Modello su cui la select effettua operazioni di selezione */
|
|
40
|
-
Model: number
|
|
40
|
+
Model: WritableSignal<number>;
|
|
41
41
|
/** Opzioni di paginazione */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
private _pagingOptions;
|
|
43
|
+
PagingOptionsForSelect: Signal<{
|
|
44
|
+
id: number;
|
|
45
|
+
description: string;
|
|
46
|
+
}[]>;
|
|
47
47
|
/**
|
|
48
48
|
* Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
|
|
49
49
|
*
|
|
@@ -52,6 +52,6 @@ export declare class TablePagerComponent {
|
|
|
52
52
|
* @param {number} pageSize Dimensione selezionata lato UI
|
|
53
53
|
*/
|
|
54
54
|
choice(pageSize: number): void;
|
|
55
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TablePagerComponent,
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TablePagerComponent, "app-paging", never, { "CurrentPageSize": { "alias": "CurrentPageSize"; "required": false; }; "View": { "alias": "View"; "required": false; }; "WarnOnAll": { "alias": "WarnOnAll"; "required": false; }; "AllSearch": { "alias": "AllSearch"; "required": false; }; "DefaultAll": { "alias": "DefaultAll"; "required": false; }; "GroupMode": { "alias": "GroupMode"; "required": false; }; "GroupCount": { "alias": "GroupCount"; "required": false; }; "CountLabel": { "alias": "CountLabel"; "required": false; }; "ShowCount": { "alias": "ShowCount"; "required": false; }; "ShowPaging": { "alias": "ShowPaging"; "required": false; }; "PagerCount": { "alias": "PagerCount"; "required": false; }; "Hidden": { "alias": "Hidden"; "required": false; }; }, { "pagingSelected": "pagingSelected"; }, never, never, false, never>;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TablePagerComponent, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TablePagerComponent, "app-paging", never, { "CurrentPageSize": { "alias": "CurrentPageSize"; "required": false; "isSignal": true; }; "View": { "alias": "View"; "required": false; "isSignal": true; }; "WarnOnAll": { "alias": "WarnOnAll"; "required": false; "isSignal": true; }; "AllSearch": { "alias": "AllSearch"; "required": false; "isSignal": true; }; "DefaultAll": { "alias": "DefaultAll"; "required": false; "isSignal": true; }; "GroupMode": { "alias": "GroupMode"; "required": false; "isSignal": true; }; "GroupCount": { "alias": "GroupCount"; "required": false; "isSignal": true; }; "CountLabel": { "alias": "CountLabel"; "required": false; "isSignal": true; }; "ShowCount": { "alias": "ShowCount"; "required": false; "isSignal": true; }; "ShowPaging": { "alias": "ShowPaging"; "required": false; "isSignal": true; }; "PagerCount": { "alias": "PagerCount"; "required": false; "isSignal": true; }; "Hidden": { "alias": "Hidden"; "required": false; "isSignal": true; }; }, { "pagingSelected": "pagingSelected"; }, never, never, false, never>;
|
|
57
57
|
}
|
package/lib/es-pager.module.d.ts
CHANGED
|
@@ -6,11 +6,10 @@ import * as i2 from "@angular/common";
|
|
|
6
6
|
import * as i3 from "@angular/forms";
|
|
7
7
|
import * as i4 from "@angular/router";
|
|
8
8
|
import * as i5 from "@esfaenza/localizations";
|
|
9
|
-
import * as i6 from "
|
|
10
|
-
import * as i7 from "@angular/material/input";
|
|
9
|
+
import * as i6 from "primeng/select";
|
|
11
10
|
export declare class EsPagerModule {
|
|
12
11
|
static forRoot(config?: EsPagerModuleConfig): ModuleWithProviders<EsPagerModule>;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsPagerModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EsPagerModule, [typeof i1.TablePagerComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.RouterModule, typeof i5.LocalizationModule, typeof i6.
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EsPagerModule, [typeof i1.TablePagerComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.RouterModule, typeof i5.LocalizationModule, typeof i6.SelectModule], [typeof i1.TablePagerComponent]>;
|
|
15
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<EsPagerModule>;
|
|
16
15
|
}
|