@esfaenza/es-table 11.2.131 → 11.2.134

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.
@@ -510,6 +510,7 @@
510
510
  aps.items = [];
511
511
  var newref = JSON.parse(JSON.stringify(aps));
512
512
  newref.items = items;
513
+ newref.page = 1;
513
514
  return newref;
514
515
  };
515
516
  return AppSearch;
@@ -1095,7 +1096,7 @@
1095
1096
  column_ordering: this.utiExts.deepClone(columnsOrderings),
1096
1097
  orders: this.utiExts.deepClone(columnOrders)
1097
1098
  };
1098
- this.prefService.setItem(this.est.ngControl.name, toStore, 'preference').subscribe();
1099
+ this.prefService.setItem(this.est.ngControl.name, toStore).subscribe();
1099
1100
  };
1100
1101
  /**
1101
1102
  * Partendo dagli **EsThs** estrappolo la lista di **EsTableColumn** che questa tabella dovrà eventualmente gestire per Visibilità e Ordine
@@ -3995,7 +3996,7 @@
3995
3996
  /** @ignore */
3996
3997
  function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService, logger) {
3997
3998
  var _this = this;
3998
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
3999
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
3999
4000
  this.ngControl = ngControl;
4000
4001
  this.prefService = prefService;
4001
4002
  this.deafults = deafults;
@@ -4204,6 +4205,8 @@
4204
4205
  this.StartsExpanded = true;
4205
4206
  /** Indica se effettuare il salvataggio delle preferenze di ricerca */
4206
4207
  this.SavePreferences = null;
4208
+ /** Allineamento di default per celle e headers */
4209
+ this.DefaultAlignment = null;
4207
4210
  /** Indica dove visualizzare le informazioni di paginazione, se sopra, sotto o in entrambi */
4208
4211
  this.PagingStyle = null;
4209
4212
  /** Indica dove visualizzare le informazioni di paginazione, se sopra, sotto o in entrambi */
@@ -4363,6 +4366,7 @@
4363
4366
  this.ShowItemGroupsColumns = this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns, (_q = this.deafults) === null || _q === void 0 ? void 0 : _q.ShowItemGroupsColumns, false);
4364
4367
  this.ArraymodeItemsPerPage = this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage, (_r = this.deafults) === null || _r === void 0 ? void 0 : _r.ArraymodeItemsPerPage, 15);
4365
4368
  this.ColumnsPinnable = this.utilities_H.InputOrDefault(this.ColumnsPinnable, (_s = this.deafults) === null || _s === void 0 ? void 0 : _s.ColumnsPinnable, true);
4369
+ this.DefaultAlignment = this.utilities_H.InputOrDefault(this.DefaultAlignment, (_t = this.deafults) === null || _t === void 0 ? void 0 : _t.DefaultAlignment, 'Left');
4366
4370
  }
4367
4371
  /** @ignore */
4368
4372
  EsTableComponent.prototype.ngOnInit = function () {
@@ -4425,7 +4429,7 @@
4425
4429
  EsTableComponent.prototype.ngOnChanges = function (changes) {
4426
4430
  return __awaiter(this, void 0, void 0, function () {
4427
4431
  var newSearchView;
4428
- return __generator(this, function (_t) {
4432
+ return __generator(this, function (_u) {
4429
4433
  newSearchView = changes['SearchView'];
4430
4434
  if (newSearchView && this.SearchView)
4431
4435
  this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.objectcount, this.SearchView.itemsperpageoverride);
@@ -4451,8 +4455,8 @@
4451
4455
  return __awaiter(this, void 0, void 0, function () {
4452
4456
  var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, i, prefs, cols, updatedPrefs, repository, source, i;
4453
4457
  var _this = this;
4454
- return __generator(this, function (_t) {
4455
- switch (_t.label) {
4458
+ return __generator(this, function (_u) {
4459
+ switch (_u.label) {
4456
4460
  case 0:
4457
4461
  this.View = obj ? obj : null;
4458
4462
  if (this.EsTableHandledSearch && throttle) {
@@ -4498,7 +4502,7 @@
4498
4502
  return [3 /*break*/, 4];
4499
4503
  case 2: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4500
4504
  case 3:
4501
- prefs = _t.sent();
4505
+ prefs = _u.sent();
4502
4506
  // In casi la gente si metta a spammare refresh con ngif strani sull'estable creandola e distruggendola N volte al secondo nel tempo che ci mette
4503
4507
  // a tirare su le preference da qui sopra la View potrebbe essere cambiata
4504
4508
  if (this.View) {
@@ -4541,7 +4545,7 @@
4541
4545
  this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4542
4546
  }
4543
4547
  }
4544
- _t.label = 4;
4548
+ _u.label = 4;
4545
4549
  case 4:
4546
4550
  // La paginazione devo farla solamente quando richiedo o un gruppo principale (se sono in row grouping) o se non richiedo gruppi (in tutti lgi altri casi)
4547
4551
  if (firstItemGroupOrNoGrouping)
@@ -4565,7 +4569,7 @@
4565
4569
  return [3 /*break*/, 9];
4566
4570
  case 7: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4567
4571
  case 8:
4568
- prefs = _t.sent();
4572
+ prefs = _u.sent();
4569
4573
  cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4570
4574
  updatedPrefs = true;
4571
4575
  repository = void 0;
@@ -4597,11 +4601,11 @@
4597
4601
  if (prefs)
4598
4602
  this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4599
4603
  }
4600
- _t.label = 9;
4604
+ _u.label = 9;
4601
4605
  case 9:
4602
4606
  if (this.SearchView)
4603
4607
  this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.items.length, this.SearchView.itemsperpageoverride);
4604
- _t.label = 10;
4608
+ _u.label = 10;
4605
4609
  case 10:
4606
4610
  this.finalizeContext();
4607
4611
  this.postBoundSourceCalculation();
@@ -4941,7 +4945,7 @@
4941
4945
  Multi: td._multi,
4942
4946
  MultiProp: td._multi ? td.td.split('_')[0] : null,
4943
4947
  MultiIndex: td._multi ? td.td.split('_')[1] : null,
4944
- Alignment: (td.tdAlignment || th.thAlignment || 'Center').toLowerCase(),
4948
+ Alignment: (td.tdAlignment || th.thAlignment || this.DefaultAlignment).toLowerCase(),
4945
4949
  Format: td.tdFormat || th.thFormat,
4946
4950
  PropertyName: th.thProperty,
4947
4951
  PropertyType: th.thType,
@@ -4996,7 +5000,7 @@
4996
5000
  * @param {EsThDirective[]} ths Colonne della tabella
4997
5001
  */
4998
5002
  EsTableComponent.prototype.evaluateRowThs = function (ths) {
4999
- var _t;
5003
+ var _u;
5000
5004
  if (ths.length == 0)
5001
5005
  return;
5002
5006
  var columnsListCache = {};
@@ -5022,7 +5026,7 @@
5022
5026
  Order: th.thOrder,
5023
5027
  Orderable: th.thOrderable,
5024
5028
  Template: th.Template,
5025
- Alignment: (th.thAlignment || 'Center').toLowerCase(),
5029
+ Alignment: (th.thAlignment || this.DefaultAlignment).toLowerCase(),
5026
5030
  // Se non è nessun contenuto né nessun template mostro semplicemente l'ID dell'header
5027
5031
  Content: th.thStaticContent != null ? th.thStaticContent : th.Template ? '' : th.th,
5028
5032
  Wrap: th.thWrap,
@@ -5039,7 +5043,7 @@
5039
5043
  if (!castedView.groupings)
5040
5044
  castedView.groupings = groupAggregations;
5041
5045
  else
5042
- (_t = castedView.groupings).push.apply(_t, __spread(groupAggregations));
5046
+ (_u = castedView.groupings).push.apply(_u, __spread(groupAggregations));
5043
5047
  this.ResearchNeeded = true;
5044
5048
  }
5045
5049
  }
@@ -5716,6 +5720,7 @@
5716
5720
  OwnKey: [{ type: i0.Input }],
5717
5721
  StartsExpanded: [{ type: i0.Input }],
5718
5722
  SavePreferences: [{ type: i0.Input }],
5723
+ DefaultAlignment: [{ type: i0.Input }],
5719
5724
  PagingStyle: [{ type: i0.Input }],
5720
5725
  RowGroupingPagingStyle: [{ type: i0.Input }],
5721
5726
  ItemSourceProperty: [{ type: i0.Input }],