@esfaenza/es-table 11.2.131 → 11.2.132

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.
@@ -3995,7 +3995,7 @@
3995
3995
  /** @ignore */
3996
3996
  function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService, logger) {
3997
3997
  var _this = this;
3998
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
3998
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
3999
3999
  this.ngControl = ngControl;
4000
4000
  this.prefService = prefService;
4001
4001
  this.deafults = deafults;
@@ -4204,6 +4204,8 @@
4204
4204
  this.StartsExpanded = true;
4205
4205
  /** Indica se effettuare il salvataggio delle preferenze di ricerca */
4206
4206
  this.SavePreferences = null;
4207
+ /** Allineamento di default per celle e headers */
4208
+ this.DefaultAlignment = null;
4207
4209
  /** Indica dove visualizzare le informazioni di paginazione, se sopra, sotto o in entrambi */
4208
4210
  this.PagingStyle = null;
4209
4211
  /** Indica dove visualizzare le informazioni di paginazione, se sopra, sotto o in entrambi */
@@ -4363,6 +4365,7 @@
4363
4365
  this.ShowItemGroupsColumns = this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns, (_q = this.deafults) === null || _q === void 0 ? void 0 : _q.ShowItemGroupsColumns, false);
4364
4366
  this.ArraymodeItemsPerPage = this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage, (_r = this.deafults) === null || _r === void 0 ? void 0 : _r.ArraymodeItemsPerPage, 15);
4365
4367
  this.ColumnsPinnable = this.utilities_H.InputOrDefault(this.ColumnsPinnable, (_s = this.deafults) === null || _s === void 0 ? void 0 : _s.ColumnsPinnable, true);
4368
+ this.DefaultAlignment = this.utilities_H.InputOrDefault(this.DefaultAlignment, (_t = this.deafults) === null || _t === void 0 ? void 0 : _t.DefaultAlignment, 'Left');
4366
4369
  }
4367
4370
  /** @ignore */
4368
4371
  EsTableComponent.prototype.ngOnInit = function () {
@@ -4425,7 +4428,7 @@
4425
4428
  EsTableComponent.prototype.ngOnChanges = function (changes) {
4426
4429
  return __awaiter(this, void 0, void 0, function () {
4427
4430
  var newSearchView;
4428
- return __generator(this, function (_t) {
4431
+ return __generator(this, function (_u) {
4429
4432
  newSearchView = changes['SearchView'];
4430
4433
  if (newSearchView && this.SearchView)
4431
4434
  this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.objectcount, this.SearchView.itemsperpageoverride);
@@ -4451,8 +4454,8 @@
4451
4454
  return __awaiter(this, void 0, void 0, function () {
4452
4455
  var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, i, prefs, cols, updatedPrefs, repository, source, i;
4453
4456
  var _this = this;
4454
- return __generator(this, function (_t) {
4455
- switch (_t.label) {
4457
+ return __generator(this, function (_u) {
4458
+ switch (_u.label) {
4456
4459
  case 0:
4457
4460
  this.View = obj ? obj : null;
4458
4461
  if (this.EsTableHandledSearch && throttle) {
@@ -4498,7 +4501,7 @@
4498
4501
  return [3 /*break*/, 4];
4499
4502
  case 2: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4500
4503
  case 3:
4501
- prefs = _t.sent();
4504
+ prefs = _u.sent();
4502
4505
  // 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
4506
  // a tirare su le preference da qui sopra la View potrebbe essere cambiata
4504
4507
  if (this.View) {
@@ -4541,7 +4544,7 @@
4541
4544
  this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4542
4545
  }
4543
4546
  }
4544
- _t.label = 4;
4547
+ _u.label = 4;
4545
4548
  case 4:
4546
4549
  // 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
4550
  if (firstItemGroupOrNoGrouping)
@@ -4565,7 +4568,7 @@
4565
4568
  return [3 /*break*/, 9];
4566
4569
  case 7: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4567
4570
  case 8:
4568
- prefs = _t.sent();
4571
+ prefs = _u.sent();
4569
4572
  cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4570
4573
  updatedPrefs = true;
4571
4574
  repository = void 0;
@@ -4597,11 +4600,11 @@
4597
4600
  if (prefs)
4598
4601
  this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4599
4602
  }
4600
- _t.label = 9;
4603
+ _u.label = 9;
4601
4604
  case 9:
4602
4605
  if (this.SearchView)
4603
4606
  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;
4607
+ _u.label = 10;
4605
4608
  case 10:
4606
4609
  this.finalizeContext();
4607
4610
  this.postBoundSourceCalculation();
@@ -4941,7 +4944,7 @@
4941
4944
  Multi: td._multi,
4942
4945
  MultiProp: td._multi ? td.td.split('_')[0] : null,
4943
4946
  MultiIndex: td._multi ? td.td.split('_')[1] : null,
4944
- Alignment: (td.tdAlignment || th.thAlignment || 'Center').toLowerCase(),
4947
+ Alignment: (td.tdAlignment || th.thAlignment || this.DefaultAlignment).toLowerCase(),
4945
4948
  Format: td.tdFormat || th.thFormat,
4946
4949
  PropertyName: th.thProperty,
4947
4950
  PropertyType: th.thType,
@@ -4996,7 +4999,7 @@
4996
4999
  * @param {EsThDirective[]} ths Colonne della tabella
4997
5000
  */
4998
5001
  EsTableComponent.prototype.evaluateRowThs = function (ths) {
4999
- var _t;
5002
+ var _u;
5000
5003
  if (ths.length == 0)
5001
5004
  return;
5002
5005
  var columnsListCache = {};
@@ -5022,7 +5025,7 @@
5022
5025
  Order: th.thOrder,
5023
5026
  Orderable: th.thOrderable,
5024
5027
  Template: th.Template,
5025
- Alignment: (th.thAlignment || 'Center').toLowerCase(),
5028
+ Alignment: (th.thAlignment || this.DefaultAlignment).toLowerCase(),
5026
5029
  // Se non è nessun contenuto né nessun template mostro semplicemente l'ID dell'header
5027
5030
  Content: th.thStaticContent != null ? th.thStaticContent : th.Template ? '' : th.th,
5028
5031
  Wrap: th.thWrap,
@@ -5039,7 +5042,7 @@
5039
5042
  if (!castedView.groupings)
5040
5043
  castedView.groupings = groupAggregations;
5041
5044
  else
5042
- (_t = castedView.groupings).push.apply(_t, __spread(groupAggregations));
5045
+ (_u = castedView.groupings).push.apply(_u, __spread(groupAggregations));
5043
5046
  this.ResearchNeeded = true;
5044
5047
  }
5045
5048
  }
@@ -5716,6 +5719,7 @@
5716
5719
  OwnKey: [{ type: i0.Input }],
5717
5720
  StartsExpanded: [{ type: i0.Input }],
5718
5721
  SavePreferences: [{ type: i0.Input }],
5722
+ DefaultAlignment: [{ type: i0.Input }],
5719
5723
  PagingStyle: [{ type: i0.Input }],
5720
5724
  RowGroupingPagingStyle: [{ type: i0.Input }],
5721
5725
  ItemSourceProperty: [{ type: i0.Input }],