@esfaenza/es-table 11.2.151 → 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.
@@ -760,8 +760,11 @@
760
760
  this.LoadedSignal = new rxjs.Subject();
761
761
  }
762
762
  ThTdProvider.prototype.setLoaded = function () {
763
- this.LoadedSignal.next();
764
- this.LoadedSignal.complete();
763
+ var _this = this;
764
+ requestAnimationFrame(function () {
765
+ _this.LoadedSignal.next();
766
+ _this.LoadedSignal.complete();
767
+ });
765
768
  };
766
769
  return ThTdProvider;
767
770
  }());
@@ -4407,25 +4410,26 @@
4407
4410
  };
4408
4411
  /** @ignore */
4409
4412
  EsTableComponent.prototype.ngAfterViewInit = function () {
4410
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
4413
+ var _a, _b;
4411
4414
  return __awaiter(this, void 0, void 0, function () {
4412
- var usesThsAndTdsDirectives, hasNoContentProjection;
4415
+ var thsTdsProviders, usesThsAndTdsDirectives, hasNoContentProjection;
4413
4416
  return __generator(this, function (_u) {
4414
4417
  switch (_u.label) {
4415
4418
  case 0:
4416
4419
  // Se utilizzo la new spicy mode deduco tutti i parametri di lavoro possibili al caricamento della tabella
4417
4420
  // Vengono sovrascritte solo le proprietà non impostate dall'utente
4418
- 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();
4419
- 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();
4420
- if (!(((_l = this.ThTdProvider) === null || _l === void 0 ? void 0 : _l.length) > 0)) return [3 /*break*/, 2];
4421
- 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()];
4422
4426
  case 1:
4423
4427
  _u.sent();
4424
- this.EsTds = __spread(this.EsTds, this.ThTdProvider.map(function (t) { return t.EsTdsDirective.toArray(); }).flat());
4425
- 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());
4426
4430
  _u.label = 2;
4427
4431
  case 2:
4428
- 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;
4429
4433
  hasNoContentProjection = !this.bodyRef && !this.headerRef && !this.headerGroupRef && !this.secondaryHeaderGroupRef;
4430
4434
  if (usesThsAndTdsDirectives || hasNoContentProjection) {
4431
4435
  if (this.UseCustomCells == null)
@@ -4732,15 +4736,16 @@
4732
4736
  };
4733
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 */
4734
4738
  EsTableComponent.prototype.internalPostBoundSource = function () {
4735
- var _a, _b;
4739
+ var _a;
4736
4740
  return __awaiter(this, void 0, void 0, function () {
4737
- 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;
4738
4742
  return __generator(this, function (_u) {
4739
4743
  switch (_u.label) {
4740
4744
  case 0:
4741
4745
  View = this.View;
4742
- if (!(((_a = this.ThTdProvider) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
4743
- 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()];
4744
4749
  case 1:
4745
4750
  _u.sent();
4746
4751
  _u.label = 2;
@@ -4759,7 +4764,7 @@
4759
4764
  // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4760
4765
  // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4761
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
4762
- 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) {
4763
4768
  this.logger.log("Generating ths and tds from Dynamic definition");
4764
4769
  ret_1 = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4765
4770
  this.EsThs = ret_1.ths;
@@ -5728,7 +5733,7 @@
5728
5733
  EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
5729
5734
  EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }],
5730
5735
  ThTdProvider: [{ type: i0.ContentChildren, args: [ThTdProvider,] }],
5731
- EsTableTemplate: [{ type: i0.Input }],
5736
+ EsThTdProvider: [{ type: i0.Input }],
5732
5737
  bodyRef: [{ type: i0.ContentChild, args: ['body', { static: false },] }],
5733
5738
  headerRef: [{ type: i0.ContentChild, args: ['header', { static: false },] }],
5734
5739
  headerGroupRef: [{ type: i0.ContentChild, args: ['headerGroup', { static: false },] }],
@@ -5811,25 +5816,6 @@
5811
5816
  return EsTdReference;
5812
5817
  }());
5813
5818
 
5814
- //Angular
5815
- /** Componente rappresentante un template di th coi loro relativi td da poter riutilizzare quandomminchia si vuole */
5816
- var EsTableTemplate = /** @class */ (function () {
5817
- function EsTableTemplate() {
5818
- }
5819
- return EsTableTemplate;
5820
- }());
5821
- EsTableTemplate.decorators = [
5822
- { type: i0.Component, args: [{
5823
- selector: "es-table-template",
5824
- template: "",
5825
- changeDetection: i0.ChangeDetectionStrategy.OnPush
5826
- },] }
5827
- ];
5828
- EsTableTemplate.propDecorators = {
5829
- EsTdsDirective: [{ type: i0.ContentChildren, args: [EsTdDirective,] }],
5830
- EsThsDirective: [{ type: i0.ContentChildren, args: [EsThDirective,] }]
5831
- };
5832
-
5833
5819
  /** Modello di configurazione per L'EsTable */
5834
5820
  var EsTableModuleConfig = /** @class */ (function () {
5835
5821
  function EsTableModuleConfig() {
@@ -6245,7 +6231,6 @@
6245
6231
  // Componenti
6246
6232
  EsTableComponent,
6247
6233
  TablePagerComponent,
6248
- EsTableTemplate,
6249
6234
  ThTdProvider
6250
6235
  ];
6251
6236
  var PRIVATE_ELEMENTS = [
@@ -6397,7 +6382,6 @@
6397
6382
  exports.EsTableModuleConfig = EsTableModuleConfig;
6398
6383
  exports.EsTableMultiValue = EsTableMultiValue;
6399
6384
  exports.EsTableOperationDefinition = EsTableOperationDefinition;
6400
- exports.EsTableTemplate = EsTableTemplate;
6401
6385
  exports.EsTdDirective = EsTdDirective;
6402
6386
  exports.EsTdEditorDirective = EsTdEditorDirective;
6403
6387
  exports.EsTdReference = EsTdReference;