@esfaenza/es-table 11.2.152 → 11.2.153

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.
@@ -4410,25 +4410,26 @@
4410
4410
  };
4411
4411
  /** @ignore */
4412
4412
  EsTableComponent.prototype.ngAfterViewInit = function () {
4413
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
4413
+ var _a, _b;
4414
4414
  return __awaiter(this, void 0, void 0, function () {
4415
- var usesThsAndTdsDirectives, hasNoContentProjection;
4415
+ var thsTdsProviders, usesThsAndTdsDirectives, hasNoContentProjection;
4416
4416
  return __generator(this, function (_u) {
4417
4417
  switch (_u.label) {
4418
4418
  case 0:
4419
4419
  // Se utilizzo la new spicy mode deduco tutti i parametri di lavoro possibili al caricamento della tabella
4420
4420
  // Vengono sovrascritte solo le proprietà non impostate dall'utente
4421
- this.EsTds = (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).toArray();
4422
- this.EsThs = (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).toArray();
4423
- if (!(((_l = this.ThTdProvider) === null || _l === void 0 ? void 0 : _l.length) > 0)) return [3 /*break*/, 2];
4424
- return [4 /*yield*/, rxjs.forkJoin(this.ThTdProvider.map(function (t) { return t.LoadedSignal; })).toPromise()];
4421
+ this.EsTds = this.EsTdsDirective.toArray();
4422
+ this.EsThs = this.EsThsDirective.toArray();
4423
+ thsTdsProviders = __spread((this.EsThTdProvider ? [this.EsThTdProvider] : []), this.ThTdProvider);
4424
+ if (!((thsTdsProviders === null || thsTdsProviders === void 0 ? void 0 : thsTdsProviders.length) > 0)) return [3 /*break*/, 2];
4425
+ return [4 /*yield*/, rxjs.forkJoin(thsTdsProviders.map(function (t) { return t.LoadedSignal; })).toPromise()];
4425
4426
  case 1:
4426
4427
  _u.sent();
4427
- this.EsTds = __spread(this.EsTds, this.ThTdProvider.map(function (t) { return t.EsTdsDirective.toArray(); }).flat());
4428
- this.EsThs = __spread(this.EsThs, this.ThTdProvider.map(function (t) { return t.EsThsDirective.toArray(); }).flat());
4428
+ this.EsTds = __spread(this.EsTds, thsTdsProviders.map(function (t) { return t.EsTdsDirective.toArray(); }).flat());
4429
+ this.EsThs = __spread(this.EsThs, thsTdsProviders.map(function (t) { return t.EsThsDirective.toArray(); }).flat());
4429
4430
  _u.label = 2;
4430
4431
  case 2:
4431
- usesThsAndTdsDirectives = ((_m = this.EsTds) === null || _m === void 0 ? void 0 : _m.length) > 0 && ((_o = this.EsThs) === null || _o === void 0 ? void 0 : _o.length) > 0;
4432
+ usesThsAndTdsDirectives = ((_a = this.EsTds) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_b = this.EsThs) === null || _b === void 0 ? void 0 : _b.length) > 0;
4432
4433
  hasNoContentProjection = !this.bodyRef && !this.headerRef && !this.headerGroupRef && !this.secondaryHeaderGroupRef;
4433
4434
  if (usesThsAndTdsDirectives || hasNoContentProjection) {
4434
4435
  if (this.UseCustomCells == null)
@@ -4735,15 +4736,16 @@
4735
4736
  };
4736
4737
  /** 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 */
4737
4738
  EsTableComponent.prototype.internalPostBoundSource = function () {
4738
- var _a, _b;
4739
+ var _a;
4739
4740
  return __awaiter(this, void 0, void 0, function () {
4740
- var View, view, itemsAndGroups, si, ret_1, ret_2, ret, i, th, hI, items, si;
4741
+ var View, thsTdsProviders, view, itemsAndGroups, si, ret_1, ret_2, ret, i, th, hI, items, si;
4741
4742
  return __generator(this, function (_u) {
4742
4743
  switch (_u.label) {
4743
4744
  case 0:
4744
4745
  View = this.View;
4745
- if (!(((_a = this.ThTdProvider) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
4746
- return [4 /*yield*/, rxjs.forkJoin(this.ThTdProvider.map(function (t) { return t.LoadedSignal; })).toPromise()];
4746
+ thsTdsProviders = __spread((this.EsThTdProvider ? [this.EsThTdProvider] : []), this.ThTdProvider);
4747
+ if (!((thsTdsProviders === null || thsTdsProviders === void 0 ? void 0 : thsTdsProviders.length) > 0)) return [3 /*break*/, 2];
4748
+ return [4 /*yield*/, rxjs.forkJoin(thsTdsProviders.map(function (t) { return t.LoadedSignal; })).toPromise()];
4747
4749
  case 1:
4748
4750
  _u.sent();
4749
4751
  _u.label = 2;
@@ -4762,7 +4764,7 @@
4762
4764
  // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4763
4765
  // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4764
4766
  // Se ho definizioni dinamiche, prima di qualsiasi altra cosa devo trasformarle in th/td in modo che poi il codice qui sotto faccia le sue magie
4765
- if (((_b = this.DynamicRowColumnsDefinition) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4767
+ if (((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4766
4768
  this.logger.log("Generating ths and tds from Dynamic definition");
4767
4769
  ret_1 = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4768
4770
  this.EsThs = ret_1.ths;
@@ -5731,7 +5733,7 @@
5731
5733
  EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
5732
5734
  EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }],
5733
5735
  ThTdProvider: [{ type: i0.ContentChildren, args: [ThTdProvider,] }],
5734
- EsTableTemplate: [{ type: i0.Input }],
5736
+ EsThTdProvider: [{ type: i0.Input }],
5735
5737
  bodyRef: [{ type: i0.ContentChild, args: ['body', { static: false },] }],
5736
5738
  headerRef: [{ type: i0.ContentChild, args: ['header', { static: false },] }],
5737
5739
  headerGroupRef: [{ type: i0.ContentChild, args: ['headerGroup', { static: false },] }],
@@ -5814,25 +5816,6 @@
5814
5816
  return EsTdReference;
5815
5817
  }());
5816
5818
 
5817
- //Angular
5818
- /** Componente rappresentante un template di th coi loro relativi td da poter riutilizzare quandomminchia si vuole */
5819
- var EsTableTemplate = /** @class */ (function () {
5820
- function EsTableTemplate() {
5821
- }
5822
- return EsTableTemplate;
5823
- }());
5824
- EsTableTemplate.decorators = [
5825
- { type: i0.Component, args: [{
5826
- selector: "es-table-template",
5827
- template: "",
5828
- changeDetection: i0.ChangeDetectionStrategy.OnPush
5829
- },] }
5830
- ];
5831
- EsTableTemplate.propDecorators = {
5832
- EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
5833
- EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }]
5834
- };
5835
-
5836
5819
  /** Modello di configurazione per L'EsTable */
5837
5820
  var EsTableModuleConfig = /** @class */ (function () {
5838
5821
  function EsTableModuleConfig() {
@@ -6248,7 +6231,6 @@
6248
6231
  // Componenti
6249
6232
  EsTableComponent,
6250
6233
  TablePagerComponent,
6251
- EsTableTemplate,
6252
6234
  ThTdProvider
6253
6235
  ];
6254
6236
  var PRIVATE_ELEMENTS = [
@@ -6400,7 +6382,6 @@
6400
6382
  exports.EsTableModuleConfig = EsTableModuleConfig;
6401
6383
  exports.EsTableMultiValue = EsTableMultiValue;
6402
6384
  exports.EsTableOperationDefinition = EsTableOperationDefinition;
6403
- exports.EsTableTemplate = EsTableTemplate;
6404
6385
  exports.EsTdDirective = EsTdDirective;
6405
6386
  exports.EsTdEditorDirective = EsTdEditorDirective;
6406
6387
  exports.EsTdReference = EsTdReference;