@esfaenza/es-table 11.2.112 → 11.2.114

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@esfaenza/localizations'), require('@esfaenza/extensions'), require('@angular/forms'), require('@esfaenza/preferences'), require('@angular/cdk/drag-drop'), require('rxjs'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/material/tooltip'), require('@esfaenza/forms-and-validations'), require('@angular/platform-browser'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), require('@ctrl/ngx-csv'), require('@esfaenza/ngx-contextmenu')) :
3
- typeof define === 'function' && define.amd ? define('@esfaenza/es-table', ['exports', '@angular/core', '@esfaenza/localizations', '@esfaenza/extensions', '@angular/forms', '@esfaenza/preferences', '@angular/cdk/drag-drop', 'rxjs', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/material/tooltip', '@esfaenza/forms-and-validations', '@angular/platform-browser', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@ctrl/ngx-csv', '@esfaenza/ngx-contextmenu'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['es-table'] = {}), global.ng.core, global.localizations, global.i1, global.ng.forms, global.preferences, global.ng.cdk.dragDrop, global.rxjs, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.material.tooltip, global.formsAndValidations, global.ng.platformBrowser, global.modal, global.dropdown, global.ngxCsv, global.ngxContextmenu));
5
- }(this, (function (exports, i0, localizations, i1, forms, preferences, dragDrop, rxjs, common, router, select, input, tooltip, formsAndValidations, platformBrowser, modal, dropdown, ngxCsv, ngxContextmenu) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@esfaenza/localizations'), require('@esfaenza/extensions'), require('@angular/forms'), require('@esfaenza/preferences'), require('@angular/cdk/drag-drop'), require('rxjs'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/material/tooltip'), require('@esfaenza/forms-and-validations'), require('@angular/platform-browser'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), require('@esfaenza/ngx-contextmenu')) :
3
+ typeof define === 'function' && define.amd ? define('@esfaenza/es-table', ['exports', '@angular/core', '@esfaenza/localizations', '@esfaenza/extensions', '@angular/forms', '@esfaenza/preferences', '@angular/cdk/drag-drop', 'rxjs', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/material/tooltip', '@esfaenza/forms-and-validations', '@angular/platform-browser', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@esfaenza/ngx-contextmenu'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['es-table'] = {}), global.ng.core, global.localizations, global.i1, global.ng.forms, global.preferences, global.ng.cdk.dragDrop, global.rxjs, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.material.tooltip, global.formsAndValidations, global.ng.platformBrowser, global.modal, global.dropdown, global.ngxContextmenu));
5
+ }(this, (function (exports, i0, localizations, i1, forms, preferences, dragDrop, rxjs, common, router, select, input, tooltip, formsAndValidations, platformBrowser, modal, dropdown, ngxContextmenu) { 'use strict';
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -915,7 +915,9 @@
915
915
  */
916
916
  ExportHandler.prototype.setupExport = function (items) {
917
917
  var drcd = this.est.DynamicRowColumnsDefinition;
918
- this.est.headers = drcd && drcd.length > 0 ? this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.Description, key: t.PropertyName, order: t.ColumnOrder, type: 'string' }; })) : this.expExts.setupForExport(items);
918
+ this.est.headers = drcd && drcd.length > 0 ?
919
+ this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.Description, key: t.PropertyName, order: t.ColumnOrder, type: 'string' }; })) :
920
+ this.expExts.setupForExport(items, this.est.ExportOnlyVisibleColumns ? this.est.ColumnsList.filter(function (t) { return t.visible; }).map(function (t) { return t.id; }) : null);
919
921
  this.est.data = items;
920
922
  };
921
923
  return ExportHandler;
@@ -4015,6 +4017,8 @@
4015
4017
  this.ExportFileName = 'Export.csv';
4016
4018
  /** Classe (HTML) di default della tabella */
4017
4019
  this.TableClass = null;
4020
+ /** Indica di esportare solo le colonne attualmente visibili della view */
4021
+ this.ExportOnlyVisibleColumns = false;
4018
4022
  /** Indica la presenza di raggruppamenti a livello di header */
4019
4023
  this.HasHeaderGroup = null;
4020
4024
  /** Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
@@ -4373,7 +4377,9 @@
4373
4377
  if (updatedPrefs) {
4374
4378
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4375
4379
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
4376
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4380
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
4381
+ if (prefs)
4382
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4377
4383
  }
4378
4384
  }
4379
4385
  _t.label = 4;
@@ -4425,7 +4431,9 @@
4425
4431
  if (updatedPrefs) {
4426
4432
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4427
4433
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
4428
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4434
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
4435
+ if (prefs)
4436
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4429
4437
  }
4430
4438
  _t.label = 9;
4431
4439
  case 9:
@@ -5406,6 +5414,7 @@
5406
5414
  ExportFileName: [{ type: i0.Input }],
5407
5415
  TableClass: [{ type: i0.Input }],
5408
5416
  ExportFunction: [{ type: i0.Input }],
5417
+ ExportOnlyVisibleColumns: [{ type: i0.Input }],
5409
5418
  HasHeaderGroup: [{ type: i0.Input }],
5410
5419
  HasSecondaryHeaderGroup: [{ type: i0.Input }],
5411
5420
  HeaderHidden: [{ type: i0.Input }],
@@ -5755,7 +5764,6 @@
5755
5764
  localizations.LocalizationModule,
5756
5765
  modal.ModalModule,
5757
5766
  dropdown.BsDropdownModule,
5758
- ngxCsv.CsvModule,
5759
5767
  ngxContextmenu.ContextMenuModule,
5760
5768
  select.MatSelectModule,
5761
5769
  input.MatInputModule,