@esfaenza/es-table 13.1.13 → 13.1.16

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.
@@ -292,6 +292,8 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
292
292
  UseSelectionCache: any;
293
293
  /** Permette di decidere se, in modalità raggruppamento, mostrare o meno il valore delle colonne di gruppo negli oggetti finali. Di default sono nascosti */
294
294
  ShowItemGroupsColumns: any;
295
+ /** Indica che tutti i campi che definiscono le modalità di modifica campo possono essere modificati in base alle impostazioni */
296
+ UserEdits: boolean;
295
297
  /** Evento che viene richiamato al cambio di oridnamento di una colonna */
296
298
  onOrderChanged: EventEmitter<AppOrdering>;
297
299
  /**
@@ -594,6 +596,16 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
594
596
  * Metodo eventualmente richiamabile anche dal componente esterno che permette di forzare un refresh della tabella
595
597
  */
596
598
  forceRefresh(): void;
599
+ rowDbClickTimer: any;
600
+ cellDbClickTimer: any;
601
+ doubleClickBufferMs: number;
602
+ ensureNoDbClickAndSelect($event: any, item: any, selection: boolean): void;
603
+ private clearRowClickTimer;
604
+ ensureDbClickAndSetupEdit(rowItem: TdElement): void;
605
+ private clearCellClickTimer;
606
+ private handleRowClick;
607
+ setupUserEdit(rowItem: TdElement): void;
608
+ finalizeUserEdit(rowItem: TdElement, item: any): void;
597
609
  static ɵfac: i0.ɵɵFactoryDeclaration<EsTableComponent, [{ optional: true; self: true; }, { optional: true; }, { optional: true; }, { optional: true; }, null, null, null, null, null, null, null]>;
598
- static ɵcmp: i0.ɵɵComponentDeclaration<EsTableComponent, "es-table", never, { "CornerMenuOptions": "CornerMenuOptions"; "ColumnsResizable": "ColumnsResizable"; "ColumnsPinnable": "ColumnsPinnable"; "AutoUpdate": "AutoUpdate"; "UseCustomCells": "UseCustomCells"; "MaxHeight": "MaxHeight"; "ContainerClass": "ContainerClass"; "XLSXExport": "XLSXExport"; "CSVExport": "CSVExport"; "AllSearch": "AllSearch"; "HighCellDensity": "HighCellDensity"; "Selection": "Selection"; "ShowLoadingOnBootstrap": "ShowLoadingOnBootstrap"; "Removal": "Removal"; "RemovalCondition": "RemovalCondition"; "Export": "Export"; "ShiftClick": "ShiftClick"; "CountLabel": "CountLabel"; "HidePaging": "HidePaging"; "HidePagingCount": "HidePagingCount"; "HidePagingButtons": "HidePagingButtons"; "ContextMenu": "ContextMenu"; "ExportFileName": "ExportFileName"; "TableClass": "TableClass"; "ExportFunction": "ExportFunction"; "HasHeaderGroup": "HasHeaderGroup"; "HasSecondaryHeaderGroup": "HasSecondaryHeaderGroup"; "HeaderHidden": "HeaderHidden"; "BodyHidden": "BodyHidden"; "SelectionDisabled": "SelectionDisabled"; "SingleSelection": "SingleSelection"; "RowClassAssigner": "RowClassAssigner"; "OrderByColumn": "OrderByColumn"; "MultipleOrderingDirectives": "MultipleOrderingDirectives"; "HiddenColumns": "HiddenColumns"; "ColumnsOrdering": "ColumnsOrdering"; "SearchView": "SearchView"; "SelectAll": "SelectAll"; "UseArrayModePaging": "UseArrayModePaging"; "DynamicRowColumnsDefinition": "DynamicRowColumnsDefinition"; "DynamicOperations": "DynamicOperations"; "Hierarchy": "Hierarchy"; "ParentKey": "ParentKey"; "OwnKey": "OwnKey"; "StartsExpanded": "StartsExpanded"; "SavePreferences": "SavePreferences"; "PagingStyle": "PagingStyle"; "RowGroupingPagingStyle": "RowGroupingPagingStyle"; "SecondarySource": "SecondarySource"; "TertiarySource": "TertiarySource"; "UseSelectionCache": "UseSelectionCache"; "ShowItemGroupsColumns": "ShowItemGroupsColumns"; "ArraymodeItemsPerPage": "ArraymodeItemsPerPage"; }, { "onOrderChanged": "onOrderChanged"; "onSearchRequest": "onSearchRequest"; "onSelectionChanged": "onSelectionChanged"; "onRemoval": "onRemoval"; "onAbortRemoval": "onAbortRemoval"; "onCornerAction": "onCornerAction"; "onDynamicOperation": "onDynamicOperation"; }, ["bodyRef", "headerRef", "headerGroupRef", "secondaryHeaderGroupRef", "EsTdsDirective", "EsThsDirective"], never>;
610
+ static ɵcmp: i0.ɵɵComponentDeclaration<EsTableComponent, "es-table", never, { "CornerMenuOptions": "CornerMenuOptions"; "ColumnsResizable": "ColumnsResizable"; "ColumnsPinnable": "ColumnsPinnable"; "AutoUpdate": "AutoUpdate"; "UseCustomCells": "UseCustomCells"; "MaxHeight": "MaxHeight"; "ContainerClass": "ContainerClass"; "XLSXExport": "XLSXExport"; "CSVExport": "CSVExport"; "AllSearch": "AllSearch"; "HighCellDensity": "HighCellDensity"; "Selection": "Selection"; "ShowLoadingOnBootstrap": "ShowLoadingOnBootstrap"; "Removal": "Removal"; "RemovalCondition": "RemovalCondition"; "Export": "Export"; "ShiftClick": "ShiftClick"; "CountLabel": "CountLabel"; "HidePaging": "HidePaging"; "HidePagingCount": "HidePagingCount"; "HidePagingButtons": "HidePagingButtons"; "ContextMenu": "ContextMenu"; "ExportFileName": "ExportFileName"; "TableClass": "TableClass"; "ExportFunction": "ExportFunction"; "HasHeaderGroup": "HasHeaderGroup"; "HasSecondaryHeaderGroup": "HasSecondaryHeaderGroup"; "HeaderHidden": "HeaderHidden"; "BodyHidden": "BodyHidden"; "SelectionDisabled": "SelectionDisabled"; "SingleSelection": "SingleSelection"; "RowClassAssigner": "RowClassAssigner"; "OrderByColumn": "OrderByColumn"; "MultipleOrderingDirectives": "MultipleOrderingDirectives"; "HiddenColumns": "HiddenColumns"; "ColumnsOrdering": "ColumnsOrdering"; "SearchView": "SearchView"; "SelectAll": "SelectAll"; "UseArrayModePaging": "UseArrayModePaging"; "DynamicRowColumnsDefinition": "DynamicRowColumnsDefinition"; "DynamicOperations": "DynamicOperations"; "Hierarchy": "Hierarchy"; "ParentKey": "ParentKey"; "OwnKey": "OwnKey"; "StartsExpanded": "StartsExpanded"; "SavePreferences": "SavePreferences"; "PagingStyle": "PagingStyle"; "RowGroupingPagingStyle": "RowGroupingPagingStyle"; "SecondarySource": "SecondarySource"; "TertiarySource": "TertiarySource"; "UseSelectionCache": "UseSelectionCache"; "ShowItemGroupsColumns": "ShowItemGroupsColumns"; "UserEdits": "UserEdits"; "ArraymodeItemsPerPage": "ArraymodeItemsPerPage"; }, { "onOrderChanged": "onOrderChanged"; "onSearchRequest": "onSearchRequest"; "onSelectionChanged": "onSelectionChanged"; "onRemoval": "onRemoval"; "onAbortRemoval": "onAbortRemoval"; "onCornerAction": "onCornerAction"; "onDynamicOperation": "onDynamicOperation"; }, ["bodyRef", "headerRef", "headerGroupRef", "secondaryHeaderGroupRef", "EsTdsDirective", "EsThsDirective"], never>;
599
611
  }
@@ -1,7 +1,6 @@
1
1
  import { CdkDrag, CdkDragDrop } from "@angular/cdk/drag-drop";
2
2
  import { UtilityService } from "@esfaenza/extensions";
3
3
  import { PreferencesService } from "@esfaenza/preferences";
4
- import { EsTd } from "../../components/es-td/es_td.component";
5
4
  import { EsTableComponent } from "../../components/es-table/es_table.component";
6
5
  import { EsTdDirective } from "../../directives/es_td.directive";
7
6
  import { EsThDirective } from "../../directives/es_th.directive";
@@ -33,10 +32,14 @@ export declare class ColumnMetadataHandler {
33
32
  * @param {EsThDirective[]} ths Colonne della tabella
34
33
  */
35
34
  reviewColumnsList(ths: EsThDirective[]): void;
35
+ expandMultiThsAndTds(ths: EsThDirective[], tds: EsTdDirective[], items: any[]): {
36
+ expThs: EsThDirective[];
37
+ expTds: EsTdDirective[];
38
+ };
36
39
  /**
37
40
  * Prende i th e i td in modalità diretive e li ordina in base a se ci sono colonne fixed o meno
38
41
  */
39
- moveFixedColumnsAtTheBeginning(ths: EsThDirective[], tds: EsTd[] | EsTdDirective[]): void;
42
+ moveFixedColumnsAtTheBeginning(ths: EsThDirective[], tds: EsTdDirective[]): void;
40
43
  /** In base alla configurazione delle colonne calcola le dimenioni delle colonne pinnate */
41
44
  evaluatePinnedColumnsWidth(): void;
42
45
  /**
@@ -47,9 +50,9 @@ export declare class ColumnMetadataHandler {
47
50
  */
48
51
  alignColumnsIfLoadedView(view: AppSearch<any>): void;
49
52
  /**
50
- * In base alla visibilità registrata nelle **ColumnsList** questo metodo si occupa di prendere tutti i **EsThs** ed **EsTds** relativi e nasonderli/mostrarli
53
+ * In base alla visibilità registrata nelle **ColumnsList** questo metodo si occupa di prendere tutti i **EsThDirective** ed **EsTdDirective** relativi e nasonderli/mostrarli
51
54
  *
52
- * Costo: 1 scan ColumnsList, 1 scan EsThs, 1 scan EsTds
55
+ * Costo: 1 scan ColumnsList, 1 scan EsThDirectives, 1 scan EsTdDirectives
53
56
  *
54
57
  * @param {EsThDirective[]} ths Header della tabella
55
58
  * @param {EsTdDirective[]} tds Celle della tabella
@@ -86,7 +89,9 @@ export declare class ColumnMetadataHandler {
86
89
  leafs: EsThDirective[];
87
90
  groupingLevel: number;
88
91
  parentsCache: any;
89
- thsCache: any;
92
+ thsCache: {
93
+ [index: string]: EsThDirective;
94
+ };
90
95
  }): void;
91
96
  /**
92
97
  * Calcola il numero di salti da un header foglia all'ultimo parent della catena
@@ -5,6 +5,8 @@ export declare class EsTdDirective {
5
5
  Template: TemplateRef<any>;
6
6
  /** Variabile interna che indica il fatto che questo componente è una direttiva. Serve per disambigualrlo dell'EsTdComponent */
7
7
  _directive: boolean;
8
+ /** Variabile interna che indica il fatto che questo template si riferisce a una proprietà multipla */
9
+ _multi: boolean;
8
10
  /** Indica se la cella è visibile o meno di default */
9
11
  tdVisible: boolean;
10
12
  /** Id della colonna, fa riferimento al **th** padre */
@@ -7,11 +7,18 @@ export declare class EsThDirective {
7
7
  /** Variabile interna all'interno della quale viene raccolta la cache delle aggregazioni specificate in thAggregation */
8
8
  _thAggregations: ThAggregation[];
9
9
  /** Variabile interna contenente in maniera ordinata i template dei padri */
10
- _thParents: TemplateRef<any>[];
10
+ _thParents: {
11
+ tmpl?: TemplateRef<any>;
12
+ content?: string;
13
+ }[];
11
14
  /** Variabile interna che indica il fatto che questo componente è una direttiva. Serve per disambigualrlo dell'EsThComponent */
12
15
  _directive: boolean;
13
16
  /** Variabile interna impostata dall'**EsTable**, per controllare che ci sia almeno un TD che utilizzi quest'header */
14
17
  _referenced: boolean;
18
+ /** Variabile interna che indica il fatto che questo template si riferisce a una proprietà multipla */
19
+ _multi: boolean;
20
+ /** Variabile interna che indica il contenuto dell'header in caso di multi */
21
+ _multi_content: string;
15
22
  /** Id della colonna, dev'essere lo stesso per tutti i **td** relativi */
16
23
  th: string;
17
24
  /** Indica se la colonna è pinnata o no */
@@ -46,10 +53,15 @@ export declare class EsThDirective {
46
53
  thGroup: boolean;
47
54
  /** Indica che bisogna fare una aggregazione su questa colonna, a fronte di almeno un altra con un raggruppamento */
48
55
  thAggregation: string;
49
- /**
50
- * @ignore
51
- */
56
+ /** Impostazioni per la modifica inline di questo campo: la **Property** di riferimento e il **Type** (a scelta fra quelli supportati dal form-adaptive) */
57
+ thUserEdits: {
58
+ Property: string;
59
+ Type: 'string' | 'float' | 'date' | 'number' | 'int' | 'boolean' | 'enum' | 'autocomplete' | 'datetime' | 'time' | 'file' | 'currency';
60
+ };
61
+ /** Indica che questo header deve essere emesso una volta per ogni valore presente nella lista di **EsTableMultiValue** alla proprietà **th** dell'oggetto corrente */
62
+ thMulti: boolean;
63
+ /** @ignore */
52
64
  constructor(Template: TemplateRef<any>);
53
65
  static ɵfac: i0.ɵɵFactoryDeclaration<EsThDirective, never>;
54
- static ɵdir: i0.ɵɵDirectiveDeclaration<EsThDirective, "[th]", never, { "th": "th"; "thPinned": "thPinned"; "thPinnable": "thPinnable"; "thPinnedWidth": "thPinnedWidth"; "thVisible": "thVisible"; "thFixed": "thFixed"; "thParent": "thParent"; "thOrder": "thOrder"; "thOrderable": "thOrderable"; "thWrap": "thWrap"; "thResizable": "thResizable"; "thClass": "thClass"; "thGroupClass": "thGroupClass"; "thIf": "thIf"; "thEmpty": "thEmpty"; "thGroup": "thGroup"; "thAggregation": "thAggregation"; }, {}, never>;
66
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EsThDirective, "[th]", never, { "th": "th"; "thPinned": "thPinned"; "thPinnable": "thPinnable"; "thPinnedWidth": "thPinnedWidth"; "thVisible": "thVisible"; "thFixed": "thFixed"; "thParent": "thParent"; "thOrder": "thOrder"; "thOrderable": "thOrderable"; "thWrap": "thWrap"; "thResizable": "thResizable"; "thClass": "thClass"; "thGroupClass": "thGroupClass"; "thIf": "thIf"; "thEmpty": "thEmpty"; "thGroup": "thGroup"; "thAggregation": "thAggregation"; "thUserEdits": "thUserEdits"; "thMulti": "thMulti"; }, {}, never>;
55
67
  }
@@ -6,5 +6,5 @@ export declare class EsTableModuleConfig {
6
6
  /** Indica se scrivere messaggi di log a console */
7
7
  debugMode?: boolean;
8
8
  /** Eventuali proprietà di default per l'EsTable */
9
- EsTableDefaults?: EsTableDefaultable;
9
+ defaults?: EsTableDefaultable;
10
10
  }
@@ -0,0 +1,22 @@
1
+ /** Classe che definisce un multi-elemento, cioè una proprietà particolare di un oggetto da visualizzare in es-table che genera dinamicamente gruppi di Header e valori sottostanti */
2
+ export declare class EsTableMultiValue {
3
+ value: any;
4
+ header: string;
5
+ header_group: string;
6
+ /**
7
+ * Costruttore
8
+ *
9
+ * @param {string} value Valore di questo elemento
10
+ * @param {string} header Nome di questo header
11
+ * @param {string} header_group Gruppo dell'header, in caso di multipli gruppi innestati usare la sintassi "G1 > G2 > G3" ecc...
12
+ * @param {boolean} exports Indica se questo header con questo valore dev'essere esportato
13
+ * @param {string} export_format Qualora **export** fosse **true** indica il formato per l'esportazione
14
+ */
15
+ constructor(value: any, header: string, header_group: string, exports?: boolean, export_format?: string);
16
+ /** Indica se questo header con questo valore dev'essere esportato */
17
+ exports?: boolean;
18
+ /** Qualora **export** fosse **true** indica il formato per l'esportazione */
19
+ export_format?: string;
20
+ /** Generato automaticamente da **header_group** se passato da costruttore, altrimenti generato da es-table. Contiene la lista di gerarchie degli header groups (cioè **header_group** splittato su ">" e trimmato) */
21
+ _headersHierarchy?: string[];
22
+ }
@@ -9,7 +9,12 @@ export declare class EsTableColumn {
9
9
  pinnable?: boolean;
10
10
  pinnedWidth?: number;
11
11
  template?: TemplateRef<any>;
12
- parentTemplates?: TemplateRef<any>[];
12
+ parentTemplates?: {
13
+ tmpl?: TemplateRef<any>;
14
+ content?: string;
15
+ }[];
16
+ multi?: boolean;
17
+ multiContent?: string;
13
18
  /**
14
19
  * Costruttore
15
20
  *
@@ -20,9 +25,14 @@ export declare class EsTableColumn {
20
25
  * @param {boolean} pinned Indica se è una colonna pinnata
21
26
  * @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
22
27
  * @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
23
- * @param {TemplateRef<any>[]} parentTemplates Indica la lista di template padri collegata a questo header
28
+ * @param {{ tmpl: TemplateRef<any>, content: string }[]} parentTemplates Indica la lista di template padri collegata a questo header, rappresentati come Template o come stringa qualora fosse generato automaticamente (caso **Multi**)
29
+ * @param {boolean} multi Indica che la colonna deriva da una direttiva **Multi**
30
+ * @param {string} multiContent Indica il contenuto della direttiva **Multi** per questa colonna
24
31
  */
25
- constructor(id: string, description: string, visible?: boolean, fixed?: boolean, pinned?: boolean, pinnable?: boolean, pinnedWidth?: number, template?: TemplateRef<any>, parentTemplates?: TemplateRef<any>[]);
32
+ constructor(id: string, description: string, visible?: boolean, fixed?: boolean, pinned?: boolean, pinnable?: boolean, pinnedWidth?: number, template?: TemplateRef<any>, parentTemplates?: {
33
+ tmpl?: TemplateRef<any>;
34
+ content?: string;
35
+ }[], multi?: boolean, multiContent?: string);
26
36
  /** Indice precedente in cui si trovava questa colonna in modo da poterla spinnare in maniera super sexy */
27
37
  prev_index: number;
28
38
  }
@@ -32,4 +32,11 @@ export interface TdElement {
32
32
  Visible?: boolean;
33
33
  /** Indica se la cella deve wrappare o no il contenuto */
34
34
  Wraps?: boolean;
35
+ /** Impostazioni per la modifica inline di questo campo: la **Property** di riferimento e il **Type** (a scelta fra quelli supportati dal form-adaptive) */
36
+ UserEdits?: {
37
+ Property: string;
38
+ Type: string;
39
+ };
40
+ /** Indica che l'oggetto di bindare per questo td è l'elemento all'indice Y della proprietà Z dove Y e Z vengono prese dall'**ID** scritto come Z_Y */
41
+ Multi?: true;
35
42
  }
@@ -18,9 +18,10 @@ import * as i14 from "@esfaenza/ngx-contextmenu";
18
18
  import * as i15 from "@angular/material/select";
19
19
  import * as i16 from "@angular/material/input";
20
20
  import * as i17 from "@angular/cdk/drag-drop";
21
+ import * as i18 from "@esfaenza/forms-and-validations";
21
22
  export declare class EsTableModule {
22
23
  static forRoot(config?: EsTableModuleConfig): ModuleWithProviders<EsTableModule>;
23
24
  static ɵfac: i0.ɵɵFactoryDeclaration<EsTableModule, never>;
24
- static ɵmod: i0.ɵɵNgModuleDeclaration<EsTableModule, [typeof i1.EsTh, typeof i2.EsTd, typeof i3.EsTableComponent, typeof i4.EsTdDirective, typeof i5.EsThDirective, typeof i6.TablePagerComponent], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.RouterModule, typeof i10.LocalizationModule, typeof i11.ModalModule, typeof i12.BsDropdownModule, typeof i13.CsvModule, typeof i14.ContextMenuModule, typeof i15.MatSelectModule, typeof i16.MatInputModule, typeof i17.DragDropModule], [typeof i3.EsTableComponent, typeof i4.EsTdDirective, typeof i5.EsThDirective, typeof i6.TablePagerComponent]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EsTableModule, [typeof i1.EsTh, typeof i2.EsTd, typeof i3.EsTableComponent, typeof i4.EsTdDirective, typeof i5.EsThDirective, typeof i6.TablePagerComponent], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.RouterModule, typeof i10.LocalizationModule, typeof i11.ModalModule, typeof i12.BsDropdownModule, typeof i13.CsvModule, typeof i14.ContextMenuModule, typeof i15.MatSelectModule, typeof i16.MatInputModule, typeof i17.DragDropModule, typeof i18.FormsAndValidationsModule], [typeof i3.EsTableComponent, typeof i4.EsTdDirective, typeof i5.EsThDirective, typeof i6.TablePagerComponent]>;
25
26
  static ɵinj: i0.ɵɵInjectorDeclaration<EsTableModule>;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esfaenza/es-table",
3
- "version": "13.1.13",
3
+ "version": "13.1.16",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -10,6 +10,7 @@
10
10
  "@angular/material": "~13.1.1",
11
11
  "@esfaenza/extensions": "^13.1.3",
12
12
  "@esfaenza/localizations": "^13.1.3",
13
+ "@esfaenza/forms-and-validations": "^13.1.3",
13
14
  "@ctrl/ngx-csv": "5.0.0",
14
15
  "@esfaenza/ngx-contextmenu": "^13.1.3",
15
16
  "@esfaenza/preferences": "^13.1.6",
package/public-api.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './lib/domain/externals/appsearch/GroupAggregation';
16
16
  export * from './lib/domain/externals/appsearch/GroupFilter';
17
17
  export * from './lib/domain/externals/appsearch/GroupOrAggregation';
18
18
  export * from './lib/domain/externals/appsearch/ItemsSelection';
19
+ export * from './lib/domain/externals/appsearch/EsTableMultiValue';
19
20
  export * from './lib/domain/externals/report/ReportColumn';
20
21
  export * from './lib/domain/externals/report/ReportDefinition';
21
22
  export * from './lib/domain/externals/report/ReportOrder';