@esfaenza/es-table 11.2.93 → 11.2.95
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/bundles/esfaenza-es-table.umd.js +39 -12
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +11 -4
- package/esm2015/lib/components/es-table-template/es_table_template.component.js +19 -0
- package/esm2015/lib/components/es-td/es_td.component.js +5 -5
- package/esm2015/lib/directives/es_td.directive.js +3 -3
- package/esm2015/lib/directives/es_td_editor.directive.js +3 -3
- package/esm2015/lib/directives/es_th.directive.js +3 -3
- package/esm2015/lib/es-table.module.js +4 -3
- package/esm2015/public-api.js +2 -1
- package/fesm2015/esfaenza-es-table.js +37 -14
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +3 -0
- package/lib/components/es-table-template/es_table_template.component.d.ts +15 -0
- package/lib/components/es-td/es_td.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
{ type: i0.Directive, args: [{ selector: '[td]' },] }
|
|
604
604
|
];
|
|
605
605
|
EsTdDirective.ctorParameters = function () { return [
|
|
606
|
-
{ type: i0.TemplateRef }
|
|
606
|
+
{ type: i0.TemplateRef, decorators: [{ type: i0.Self }] }
|
|
607
607
|
]; };
|
|
608
608
|
EsTdDirective.propDecorators = {
|
|
609
609
|
tdVisible: [{ type: i0.Input }],
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
{ type: i0.Directive, args: [{ selector: '[th]' },] }
|
|
673
673
|
];
|
|
674
674
|
EsThDirective.ctorParameters = function () { return [
|
|
675
|
-
{ type: i0.TemplateRef }
|
|
675
|
+
{ type: i0.TemplateRef, decorators: [{ type: i0.Self }] }
|
|
676
676
|
]; };
|
|
677
677
|
EsThDirective.propDecorators = {
|
|
678
678
|
th: [{ type: i0.Input }],
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
{ type: i0.Directive, args: [{ selector: '[editor]' },] }
|
|
713
713
|
];
|
|
714
714
|
EsTdEditorDirective.ctorParameters = function () { return [
|
|
715
|
-
{ type: i0.TemplateRef }
|
|
715
|
+
{ type: i0.TemplateRef, decorators: [{ type: i0.Self }] }
|
|
716
716
|
]; };
|
|
717
717
|
EsTdEditorDirective.propDecorators = {
|
|
718
718
|
editor: [{ type: i0.Input }],
|
|
@@ -4169,9 +4169,12 @@
|
|
|
4169
4169
|
};
|
|
4170
4170
|
/** @ignore */
|
|
4171
4171
|
EsTableComponent.prototype.ngAfterViewInit = function () {
|
|
4172
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4172
4173
|
// Se utilizzo la new spicy mode deduco tutti i parametri di lavoro possibili al caricamento della tabella
|
|
4173
4174
|
// Vengono sovrascritte solo le proprietà non impostate dall'utente
|
|
4174
|
-
var
|
|
4175
|
+
var tdsD = this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective;
|
|
4176
|
+
var thsD = this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective;
|
|
4177
|
+
var usesThsAndTdsDirectives = tdsD && tdsD.length > 0 && thsD && thsD.length > 0;
|
|
4175
4178
|
var hasNoContentProjection = !this.bodyRef && !this.headerRef && !this.headerGroupRef && !this.secondaryHeaderGroupRef;
|
|
4176
4179
|
if (usesThsAndTdsDirectives || hasNoContentProjection) {
|
|
4177
4180
|
if (this.UseCustomCells == null)
|
|
@@ -4448,9 +4451,12 @@
|
|
|
4448
4451
|
};
|
|
4449
4452
|
/** Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive */
|
|
4450
4453
|
EsTableComponent.prototype.internalPostBoundSource = function () {
|
|
4454
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4451
4455
|
var View = this.View;
|
|
4452
|
-
var
|
|
4453
|
-
var
|
|
4456
|
+
var tdsD = this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective;
|
|
4457
|
+
var thsD = this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective;
|
|
4458
|
+
var ths = thsD && thsD.length > 0 ? thsD.toArray() : [];
|
|
4459
|
+
var tds = tdsD && tdsD.length > 0 ? tdsD.toArray() : [];
|
|
4454
4460
|
// Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
|
|
4455
4461
|
this.dynamicMode_H.eventuallyReviewDynamicColumns();
|
|
4456
4462
|
this.bindDisplayToLoadedItemsOrGroups(View);
|
|
@@ -5281,6 +5287,7 @@
|
|
|
5281
5287
|
EsTdEditorDirectives: [{ type: i0.ContentChildren, args: [EsTdEditorDirective,] }],
|
|
5282
5288
|
EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
|
|
5283
5289
|
EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }],
|
|
5290
|
+
EsTableTemplate: [{ type: i0.Input }],
|
|
5284
5291
|
bodyRef: [{ type: i0.ContentChild, args: ['body', { static: false },] }],
|
|
5285
5292
|
headerRef: [{ type: i0.ContentChild, args: ['header', { static: false },] }],
|
|
5286
5293
|
headerGroupRef: [{ type: i0.ContentChild, args: ['headerGroup', { static: false },] }],
|
|
@@ -5358,6 +5365,25 @@
|
|
|
5358
5365
|
return EsTdReference;
|
|
5359
5366
|
}());
|
|
5360
5367
|
|
|
5368
|
+
//Angular
|
|
5369
|
+
/** Componente rappresentante un template di th coi loro relativi td da poter riutilizzare quandomminchia si vuole */
|
|
5370
|
+
var EsTableTemplate = /** @class */ (function () {
|
|
5371
|
+
function EsTableTemplate() {
|
|
5372
|
+
}
|
|
5373
|
+
return EsTableTemplate;
|
|
5374
|
+
}());
|
|
5375
|
+
EsTableTemplate.decorators = [
|
|
5376
|
+
{ type: i0.Component, args: [{
|
|
5377
|
+
selector: "es-table-template",
|
|
5378
|
+
template: "",
|
|
5379
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
5380
|
+
},] }
|
|
5381
|
+
];
|
|
5382
|
+
EsTableTemplate.propDecorators = {
|
|
5383
|
+
EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
|
|
5384
|
+
EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }]
|
|
5385
|
+
};
|
|
5386
|
+
|
|
5361
5387
|
/** Modello di configurazione per L'EsTable */
|
|
5362
5388
|
var EsTableModuleConfig = /** @class */ (function () {
|
|
5363
5389
|
function EsTableModuleConfig() {
|
|
@@ -5547,7 +5573,7 @@
|
|
|
5547
5573
|
/** Quando questa cella viene generata questo evento permette di dire "ehi, sono nato!" */
|
|
5548
5574
|
this.onCellGeneration = new i0.EventEmitter();
|
|
5549
5575
|
// Ema commenta grazie
|
|
5550
|
-
this.
|
|
5576
|
+
this.ValidationError = "";
|
|
5551
5577
|
}
|
|
5552
5578
|
Object.defineProperty(EsTd.prototype, "Visible", {
|
|
5553
5579
|
/**
|
|
@@ -5585,7 +5611,7 @@
|
|
|
5585
5611
|
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
5586
5612
|
};
|
|
5587
5613
|
EsTd.prototype.validationError = function (isError, error) {
|
|
5588
|
-
this.
|
|
5614
|
+
this.ValidationError = isError ? error : "";
|
|
5589
5615
|
this.cdr.markForCheck();
|
|
5590
5616
|
};
|
|
5591
5617
|
return EsTd;
|
|
@@ -5593,9 +5619,9 @@
|
|
|
5593
5619
|
EsTd.decorators = [
|
|
5594
5620
|
{ type: i0.Component, args: [{
|
|
5595
5621
|
selector: "[es-td]",
|
|
5596
|
-
template: "<div
|
|
5622
|
+
template: "<div class=\"td-content\" [class.td-error]=\"!!ValidationError\" [matTooltip]=\"ValidationError\">\r\n <ng-content></ng-content>\r\n</div>",
|
|
5597
5623
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5598
|
-
styles: [".td-error{background-color:rgba(255,0,0,.2);box-shadow:inset 0 0 0 1px red}"]
|
|
5624
|
+
styles: [".td-error{background-color:rgba(255,0,0,.2);box-shadow:inset 0 0 0 1px red}.td-content{padding:.3rem;margin:-.3rem;box-sizing:border-box!important}"]
|
|
5599
5625
|
},] }
|
|
5600
5626
|
];
|
|
5601
5627
|
EsTd.ctorParameters = function () { return [
|
|
@@ -5648,9 +5674,9 @@
|
|
|
5648
5674
|
dragDrop.DragDropModule,
|
|
5649
5675
|
formsAndValidations.FormsAndValidationsModule
|
|
5650
5676
|
],
|
|
5651
|
-
declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent],
|
|
5677
|
+
declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate],
|
|
5652
5678
|
providers: [i1.UtilityService, i1.ExportService, i1.HashingService, i1.MessageService],
|
|
5653
|
-
exports: [EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent]
|
|
5679
|
+
exports: [EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate]
|
|
5654
5680
|
},] }
|
|
5655
5681
|
];
|
|
5656
5682
|
|
|
@@ -5767,6 +5793,7 @@
|
|
|
5767
5793
|
exports.EsTableModuleConfig = EsTableModuleConfig;
|
|
5768
5794
|
exports.EsTableMultiValue = EsTableMultiValue;
|
|
5769
5795
|
exports.EsTableOperationDefinition = EsTableOperationDefinition;
|
|
5796
|
+
exports.EsTableTemplate = EsTableTemplate;
|
|
5770
5797
|
exports.EsTdDirective = EsTdDirective;
|
|
5771
5798
|
exports.EsTdEditorDirective = EsTdEditorDirective;
|
|
5772
5799
|
exports.EsTdReference = EsTdReference;
|