primeng 7.1.2 → 7.1.3

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/components/calendar/calendar.d.ts +8 -2
  3. package/components/calendar/calendar.js +59 -17
  4. package/components/calendar/calendar.js.map +1 -1
  5. package/components/calendar/calendar.metadata.json +1 -1
  6. package/components/common/confirmation.d.ts +1 -1
  7. package/components/confirmdialog/confirmdialog.js +4 -5
  8. package/components/confirmdialog/confirmdialog.js.map +1 -1
  9. package/components/confirmdialog/confirmdialog.metadata.json +1 -1
  10. package/components/dataview/dataview.js +3 -1
  11. package/components/dataview/dataview.js.map +1 -1
  12. package/components/dataview/dataview.metadata.json +1 -1
  13. package/components/dialog/dialog.js +1 -1
  14. package/components/dialog/dialog.js.map +1 -1
  15. package/components/dom/domhandler.d.ts +1 -1
  16. package/components/dom/domhandler.js +22 -13
  17. package/components/dom/domhandler.js.map +1 -1
  18. package/components/dom/domhandler.metadata.json +1 -1
  19. package/components/dynamicdialog/dynamicdialog.js +3 -3
  20. package/components/dynamicdialog/dynamicdialog.js.map +1 -1
  21. package/components/dynamicdialog/dynamicdialog.metadata.json +1 -1
  22. package/components/gmap/gmap.d.ts +1 -0
  23. package/components/gmap/gmap.js +14 -0
  24. package/components/gmap/gmap.js.map +1 -1
  25. package/components/gmap/gmap.metadata.json +1 -1
  26. package/components/inputmask/inputmask.d.ts +1 -1
  27. package/components/inputmask/inputmask.js +2 -2
  28. package/components/inputmask/inputmask.js.map +1 -1
  29. package/components/menu/menu.js +1 -1
  30. package/components/menu/menu.js.map +1 -1
  31. package/components/menu/menu.metadata.json +1 -1
  32. package/components/menubar/menubar.js +2 -2
  33. package/components/menubar/menubar.js.map +1 -1
  34. package/components/multiselect/multiselect.d.ts +1 -0
  35. package/components/multiselect/multiselect.js +5 -1
  36. package/components/multiselect/multiselect.js.map +1 -1
  37. package/components/multiselect/multiselect.metadata.json +1 -1
  38. package/components/spinner/spinner.d.ts +3 -3
  39. package/components/spinner/spinner.js +7 -3
  40. package/components/spinner/spinner.js.map +1 -1
  41. package/components/spinner/spinner.metadata.json +1 -1
  42. package/components/table/table.d.ts +9 -3
  43. package/components/table/table.js +54 -25
  44. package/components/table/table.js.map +1 -1
  45. package/components/table/table.metadata.json +1 -1
  46. package/components/tree/tree.js +7 -1
  47. package/components/tree/tree.js.map +1 -1
  48. package/components/tree/tree.metadata.json +1 -1
  49. package/package.json +1 -1
  50. package/resources/components/dialog/dialog.css +2 -4
  51. package/resources/components/fileupload/fileupload.css +1 -0
  52. package/resources/components/galleria/galleria.css +1 -2
  53. package/resources/components/radiobutton/radiobutton.css +1 -1
  54. package/resources/components/spinner/spinner.css +0 -6
  55. package/resources/primeng.css +591 -599
  56. package/resources/primeng.min.css +1 -1
  57. package/resources/themes/luna-amber/theme.css +6 -0
  58. package/resources/themes/luna-blue/theme.css +6 -0
  59. package/resources/themes/luna-green/theme.css +6 -0
  60. package/resources/themes/luna-pink/theme.css +6 -0
  61. package/resources/themes/nova-colored/theme.css +6 -0
  62. package/resources/themes/nova-dark/theme.css +6 -0
  63. package/resources/themes/nova-light/theme.css +6 -0
  64. package/resources/themes/rhea/theme.css +6 -0
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SPINNER_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":6,"character":13},"useExisting":{"__symbolic":"reference","name":"Spinner"},"multi":true},"Spinner":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"p-spinner","template":"\n <span class=\"ui-spinner ui-widget ui-corner-all\">\n <input #inputfield type=\"number\" [attr.id]=\"inputId\" [value]=\"value === 0 ? '0' : value||null\" [attr.name]=\"name\"\n [attr.size]=\"size\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.placeholder]=\"placeholder\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (keydown)=\"onInputKeydown($event)\" (blur)=\"onInputBlur($event)\" (input)=\"onInput($event)\" (change)=\"onInputChange($event)\" (focus)=\"onInputFocus($event)\"\n [ngStyle]=\"inputStyle\" [class]=\"inputStyleClass\" [ngClass]=\"'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'\">\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" [attr.tabindex]=\"tabindex\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onUpButtonMouseleave($event)\" (mousedown)=\"onUpButtonMousedown($event)\" (mouseup)=\"onUpButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-up ui-clickable\"></span>\n </button>\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" [attr.tabindex]=\"tabindex\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onDownButtonMouseleave($event)\" (mousedown)=\"onDownButtonMousedown($event)\" (mouseup)=\"onDownButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-down ui-clickable\"></span>\n </button>\n </span>\n ","host":{"[class.ui-inputwrapper-filled]":"filled","[class.ui-inputwrapper-focus]":"focus","$quoted$":["[class.ui-inputwrapper-filled]","[class.ui-inputwrapper-focus]"]},"providers":[{"__symbolic":"reference","name":"SPINNER_VALUE_ACCESSOR"}]}]}],"members":{"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":5}}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":5}}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":5}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":5}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":5}}]}],"maxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":5}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":5}}]}],"inputId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":5}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":5}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":5}}]}],"tabindex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":5}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":5}}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":5}}]}],"inputStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":5}}]}],"inputStyleClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":69,"character":5}}]}],"inputfieldViewChild":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":89,"character":5},"arguments":["inputfield"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":91,"character":27}]}],"decimalSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":5}}]}],"thousandSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":5}}]}],"formatInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":5}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":5}}]}],"ngOnInit":[{"__symbolic":"method"}],"repeat":[{"__symbolic":"method"}],"spin":[{"__symbolic":"method"}],"toFixed":[{"__symbolic":"method"}],"onUpButtonMousedown":[{"__symbolic":"method"}],"onUpButtonMouseup":[{"__symbolic":"method"}],"onUpButtonMouseleave":[{"__symbolic":"method"}],"onDownButtonMousedown":[{"__symbolic":"method"}],"onDownButtonMouseup":[{"__symbolic":"method"}],"onDownButtonMouseleave":[{"__symbolic":"method"}],"onInputKeydown":[{"__symbolic":"method"}],"onInputChange":[{"__symbolic":"method"}],"onInput":[{"__symbolic":"method"}],"onInputBlur":[{"__symbolic":"method"}],"onInputFocus":[{"__symbolic":"method"}],"parseValue":[{"__symbolic":"method"}],"clearTimer":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"updateFilledState":[{"__symbolic":"method"}]}},"SpinnerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":293,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":294,"character":14},{"__symbolic":"reference","module":"../inputtext/inputtext","name":"InputTextModule","line":294,"character":27}],"exports":[{"__symbolic":"reference","name":"Spinner"}],"declarations":[{"__symbolic":"reference","name":"Spinner"}]}]}]}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SPINNER_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":6,"character":13},"useExisting":{"__symbolic":"reference","name":"Spinner"},"multi":true},"Spinner":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"p-spinner","template":"\n <span class=\"ui-spinner ui-widget ui-corner-all\">\n <input #inputfield type=\"text\" [attr.id]=\"inputId\" [value]=\"value === 0 ? '0' : value||null\" [attr.name]=\"name\"\n [attr.size]=\"size\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.placeholder]=\"placeholder\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (keydown)=\"onInputKeydown($event)\" (blur)=\"onInputBlur($event)\" (input)=\"onInput($event)\" (change)=\"onInputChange($event)\" (focus)=\"onInputFocus($event)\"\n [ngStyle]=\"inputStyle\" [class]=\"inputStyleClass\" [ngClass]=\"'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'\">\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" [attr.tabindex]=\"tabindex\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onUpButtonMouseleave($event)\" (mousedown)=\"onUpButtonMousedown($event)\" (mouseup)=\"onUpButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-up ui-clickable\"></span>\n </button>\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" [attr.tabindex]=\"tabindex\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onDownButtonMouseleave($event)\" (mousedown)=\"onDownButtonMousedown($event)\" (mouseup)=\"onDownButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-down ui-clickable\"></span>\n </button>\n </span>\n ","host":{"[class.ui-inputwrapper-filled]":"filled","[class.ui-inputwrapper-focus]":"focus","$quoted$":["[class.ui-inputwrapper-filled]","[class.ui-inputwrapper-focus]"]},"providers":[{"__symbolic":"reference","name":"SPINNER_VALUE_ACCESSOR"}]}]}],"members":{"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":5}}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":5}}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":5}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":5}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":5}}]}],"maxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":5}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":5}}]}],"inputId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":5}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":5}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":5}}]}],"tabindex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":5}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":5}}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":5}}]}],"inputStyle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":5}}]}],"inputStyleClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":69,"character":5}}]}],"inputfieldViewChild":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":89,"character":5},"arguments":["inputfield"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":91,"character":27}]}],"decimalSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":5}}]}],"thousandSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":5}}]}],"formatInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":5}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":5}}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"repeat":[{"__symbolic":"method"}],"spin":[{"__symbolic":"method"}],"toFixed":[{"__symbolic":"method"}],"onUpButtonMousedown":[{"__symbolic":"method"}],"onUpButtonMouseup":[{"__symbolic":"method"}],"onUpButtonMouseleave":[{"__symbolic":"method"}],"onDownButtonMousedown":[{"__symbolic":"method"}],"onDownButtonMouseup":[{"__symbolic":"method"}],"onDownButtonMouseleave":[{"__symbolic":"method"}],"onInputKeydown":[{"__symbolic":"method"}],"onInputChange":[{"__symbolic":"method"}],"onInput":[{"__symbolic":"method"}],"onInputBlur":[{"__symbolic":"method"}],"onInputFocus":[{"__symbolic":"method"}],"parseValue":[{"__symbolic":"method"}],"clearTimer":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"updateFilledState":[{"__symbolic":"method"}]}},"SpinnerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":297,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":298,"character":14},{"__symbolic":"reference","module":"../inputtext/inputtext","name":"InputTextModule","line":298,"character":27}],"exports":[{"__symbolic":"reference","name":"Spinner"}],"declarations":[{"__symbolic":"reference","name":"Spinner"}]}]}]}}}]
@@ -1,4 +1,4 @@
1
- import { OnInit, AfterViewInit, AfterViewChecked, AfterContentInit, EventEmitter, ElementRef, TemplateRef, QueryList, NgZone } from '@angular/core';
1
+ import { OnInit, AfterViewInit, AfterViewChecked, AfterContentInit, EventEmitter, ElementRef, TemplateRef, QueryList, NgZone, ChangeDetectorRef } from '@angular/core';
2
2
  import { Column, PrimeTemplate } from '../common/shared';
3
3
  import { SortMeta } from '../common/sortmeta';
4
4
  import { FilterMetadata } from '../common/filtermetadata';
@@ -29,6 +29,7 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
29
29
  el: ElementRef;
30
30
  zone: NgZone;
31
31
  tableService: TableService;
32
+ cd: ChangeDetectorRef;
32
33
  frozenColumns: any[];
33
34
  frozenValue: any[];
34
35
  style: any;
@@ -111,6 +112,8 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
111
112
  onHeaderCheckboxToggle: EventEmitter<any>;
112
113
  sortFunction: EventEmitter<any>;
113
114
  firstChange: EventEmitter<number>;
115
+ onStateSave: EventEmitter<any>;
116
+ onStateRestore: EventEmitter<any>;
114
117
  containerViewChild: ElementRef;
115
118
  resizeHelperViewChild: ElementRef;
116
119
  reorderIndicatorUpViewChild: ElementRef;
@@ -148,6 +151,8 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
148
151
  rowDragging: boolean;
149
152
  dropPosition: number;
150
153
  editingCell: Element;
154
+ editingCellData: any;
155
+ editingCellField: any;
151
156
  editingCellClick: boolean;
152
157
  documentEditListener: any;
153
158
  _multiSortMeta: SortMeta[];
@@ -168,7 +173,7 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
168
173
  columnOrderStateRestored: boolean;
169
174
  columnWidthsState: string;
170
175
  tableWidthState: string;
171
- constructor(el: ElementRef, zone: NgZone, tableService: TableService);
176
+ constructor(el: ElementRef, zone: NgZone, tableService: TableService, cd: ChangeDetectorRef);
172
177
  ngOnInit(): void;
173
178
  ngAfterContentInit(): void;
174
179
  ngAfterViewInit(): void;
@@ -219,7 +224,7 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
219
224
  createLazyLoadMetadata(): any;
220
225
  reset(): void;
221
226
  exportCSV(options?: any): void;
222
- updateEditingCell(cell: any): void;
227
+ updateEditingCell(cell: any, data: any, field: any): void;
223
228
  isEditingCellValid(): boolean;
224
229
  bindDocumentEditListener(): void;
225
230
  unbindDocumentEditListener(): void;
@@ -234,6 +239,7 @@ export declare class Table implements OnInit, AfterViewInit, AfterContentInit, B
234
239
  onColumnResizeBegin(event: any): void;
235
240
  onColumnResize(event: any): void;
236
241
  onColumnResizeEnd(event: any, column: any): void;
242
+ setScrollableItemsWidthOnExpandResize(column: any, newColumnWidth: any, delta: any): void;
237
243
  findParentScrollableView(column: any): any;
238
244
  resizeColGroup(table: any, resizeColumnIndex: any, newColumnWidth: any, nextColumnWidth: any): void;
239
245
  onColumnDragStart(event: any, columnElement: any): void;
@@ -60,10 +60,11 @@ var TableService = /** @class */ (function () {
60
60
  }());
61
61
  exports.TableService = TableService;
62
62
  var Table = /** @class */ (function () {
63
- function Table(el, zone, tableService) {
63
+ function Table(el, zone, tableService, cd) {
64
64
  this.el = el;
65
65
  this.zone = zone;
66
66
  this.tableService = tableService;
67
+ this.cd = cd;
67
68
  this.pageLinks = 5;
68
69
  this.alwaysShowPaginator = true;
69
70
  this.paginatorPosition = 'bottom';
@@ -110,6 +111,8 @@ var Table = /** @class */ (function () {
110
111
  this.onHeaderCheckboxToggle = new core_1.EventEmitter();
111
112
  this.sortFunction = new core_1.EventEmitter();
112
113
  this.firstChange = new core_1.EventEmitter();
114
+ this.onStateSave = new core_1.EventEmitter();
115
+ this.onStateRestore = new core_1.EventEmitter();
113
116
  this._value = [];
114
117
  this._totalRecords = 0;
115
118
  this._first = 0;
@@ -1032,6 +1035,7 @@ var Table = /** @class */ (function () {
1032
1035
  this.first = 0;
1033
1036
  this.firstChange.emit(this.first);
1034
1037
  }
1038
+ this.cd.detectChanges();
1035
1039
  };
1036
1040
  Table.prototype.hasFilter = function () {
1037
1041
  var empty = true;
@@ -1135,8 +1139,10 @@ var Table = /** @class */ (function () {
1135
1139
  document.body.removeChild(link);
1136
1140
  }
1137
1141
  };
1138
- Table.prototype.updateEditingCell = function (cell) {
1142
+ Table.prototype.updateEditingCell = function (cell, data, field) {
1139
1143
  this.editingCell = cell;
1144
+ this.editingCellData = data;
1145
+ this.editingCellField = field;
1140
1146
  this.bindDocumentEditListener();
1141
1147
  };
1142
1148
  Table.prototype.isEditingCellValid = function () {
@@ -1149,6 +1155,9 @@ var Table = /** @class */ (function () {
1149
1155
  if (_this.editingCell && !_this.editingCellClick && _this.isEditingCellValid()) {
1150
1156
  domhandler_1.DomHandler.removeClass(_this.editingCell, 'ui-editing-cell');
1151
1157
  _this.editingCell = null;
1158
+ _this.onEditComplete.emit({ field: _this.editingCellField, data: _this.editingCellData });
1159
+ _this.editingCellField = null;
1160
+ _this.editingCellData = null;
1152
1161
  _this.unbindDocumentEditListener();
1153
1162
  }
1154
1163
  _this.editingCellClick = false;
@@ -1270,19 +1279,7 @@ var Table = /** @class */ (function () {
1270
1279
  else if (this.columnResizeMode === 'expand') {
1271
1280
  if (newColumnWidth > minWidth) {
1272
1281
  if (this.scrollable) {
1273
- var scrollableView = this.findParentScrollableView(column);
1274
- var scrollableBodyTable = domhandler_1.DomHandler.findSingle(scrollableView, 'table.ui-table-scrollable-body-table');
1275
- var scrollableHeaderTable = domhandler_1.DomHandler.findSingle(scrollableView, 'table.ui-table-scrollable-header-table');
1276
- var scrollableFooterTable = domhandler_1.DomHandler.findSingle(scrollableView, 'table.ui-table-scrollable-footer-table');
1277
- scrollableBodyTable.style.width = scrollableBodyTable.offsetWidth + delta + 'px';
1278
- scrollableHeaderTable.style.width = scrollableHeaderTable.offsetWidth + delta + 'px';
1279
- if (scrollableFooterTable) {
1280
- scrollableFooterTable.style.width = scrollableHeaderTable.offsetWidth + delta + 'px';
1281
- }
1282
- var resizeColumnIndex = domhandler_1.DomHandler.index(column);
1283
- this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, null);
1284
- this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, null);
1285
- this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, null);
1282
+ this.setScrollableItemsWidthOnExpandResize(column, newColumnWidth, delta);
1286
1283
  }
1287
1284
  else {
1288
1285
  this.tableViewChild.nativeElement.style.width = this.tableViewChild.nativeElement.offsetWidth + delta + 'px';
@@ -1303,6 +1300,33 @@ var Table = /** @class */ (function () {
1303
1300
  this.resizeHelperViewChild.nativeElement.style.display = 'none';
1304
1301
  domhandler_1.DomHandler.removeClass(this.containerViewChild.nativeElement, 'ui-unselectable-text');
1305
1302
  };
1303
+ Table.prototype.setScrollableItemsWidthOnExpandResize = function (column, newColumnWidth, delta) {
1304
+ var scrollableView = column ? this.findParentScrollableView(column) : this.containerViewChild.nativeElement;
1305
+ var scrollableBody = domhandler_1.DomHandler.findSingle(scrollableView, '.ui-table-scrollable-body');
1306
+ var scrollableHeader = domhandler_1.DomHandler.findSingle(scrollableView, '.ui-table-scrollable-header');
1307
+ var scrollableFooter = domhandler_1.DomHandler.findSingle(scrollableView, '.ui-table-scrollable-footer');
1308
+ var scrollableBodyTable = domhandler_1.DomHandler.findSingle(scrollableBody, 'table.ui-table-scrollable-body-table');
1309
+ var scrollableHeaderTable = domhandler_1.DomHandler.findSingle(scrollableHeader, 'table.ui-table-scrollable-header-table');
1310
+ var scrollableFooterTable = domhandler_1.DomHandler.findSingle(scrollableFooter, 'table.ui-table-scrollable-footer-table');
1311
+ var scrollableBodyTableWidth = column ? scrollableBodyTable.offsetWidth + delta : newColumnWidth;
1312
+ var scrollableHeaderTableWidth = column ? scrollableHeaderTable.offsetWidth + delta : newColumnWidth;
1313
+ var isContainerInViewport = this.containerViewChild.nativeElement.offsetWidth >= scrollableBodyTableWidth;
1314
+ var setWidth = function (container, table, width, isContainerInViewport) {
1315
+ if (container && table) {
1316
+ container.style.width = isContainerInViewport ? width + domhandler_1.DomHandler.calculateScrollbarWidth(scrollableBody) + 'px' : 'auto';
1317
+ table.style.width = width + 'px';
1318
+ }
1319
+ };
1320
+ setWidth(scrollableBody, scrollableBodyTable, scrollableBodyTableWidth, isContainerInViewport);
1321
+ setWidth(scrollableHeader, scrollableHeaderTable, scrollableHeaderTableWidth, isContainerInViewport);
1322
+ setWidth(scrollableFooter, scrollableFooterTable, scrollableHeaderTableWidth, isContainerInViewport);
1323
+ if (column) {
1324
+ var resizeColumnIndex = domhandler_1.DomHandler.index(column);
1325
+ this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, null);
1326
+ this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, null);
1327
+ this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, null);
1328
+ }
1329
+ };
1306
1330
  Table.prototype.findParentScrollableView = function (column) {
1307
1331
  if (column) {
1308
1332
  var parent_1 = column.parentElement;
@@ -1535,6 +1559,7 @@ var Table = /** @class */ (function () {
1535
1559
  if (Object.keys(state).length) {
1536
1560
  storage.setItem(this.stateKey, JSON.stringify(state));
1537
1561
  }
1562
+ this.onStateSave.emit(state);
1538
1563
  };
1539
1564
  Table.prototype.clearState = function () {
1540
1565
  var storage = this.getStorage();
@@ -1576,6 +1601,7 @@ var Table = /** @class */ (function () {
1576
1601
  this.selection = state.selection;
1577
1602
  }
1578
1603
  this.stateRestored = true;
1604
+ this.onStateRestore.emit(state);
1579
1605
  }
1580
1606
  };
1581
1607
  Table.prototype.saveColumnWidths = function (state) {
@@ -1593,14 +1619,7 @@ var Table = /** @class */ (function () {
1593
1619
  var widths_1 = this.columnWidthsState.split(',');
1594
1620
  if (this.columnResizeMode === 'expand' && this.tableWidthState) {
1595
1621
  if (this.scrollable) {
1596
- var scrollableBodyTable = domhandler_1.DomHandler.findSingle(this.containerViewChild.nativeElement, '.ui-table-scrollable-body-table');
1597
- var scrollableHeaderTable = domhandler_1.DomHandler.findSingle(this.containerViewChild.nativeElement, '.ui-table-scrollable-header-table');
1598
- var scrollableFooterTable = domhandler_1.DomHandler.findSingle(this.containerViewChild.nativeElement, '.ui-table-scrollable-footer-table');
1599
- scrollableBodyTable.style.width = this.tableWidthState;
1600
- scrollableHeaderTable.style.width = this.tableWidthState;
1601
- if (scrollableFooterTable) {
1602
- scrollableFooterTable.style.width = this.tableWidthState;
1603
- }
1622
+ this.setScrollableItemsWidthOnExpandResize(null, this.tableWidthState, 0);
1604
1623
  }
1605
1624
  else {
1606
1625
  this.tableViewChild.nativeElement.style.width = this.tableWidthState;
@@ -1966,6 +1985,14 @@ var Table = /** @class */ (function () {
1966
1985
  core_1.Output(),
1967
1986
  __metadata("design:type", core_1.EventEmitter)
1968
1987
  ], Table.prototype, "firstChange", void 0);
1988
+ __decorate([
1989
+ core_1.Output(),
1990
+ __metadata("design:type", core_1.EventEmitter)
1991
+ ], Table.prototype, "onStateSave", void 0);
1992
+ __decorate([
1993
+ core_1.Output(),
1994
+ __metadata("design:type", core_1.EventEmitter)
1995
+ ], Table.prototype, "onStateRestore", void 0);
1969
1996
  __decorate([
1970
1997
  core_1.ViewChild('container'),
1971
1998
  __metadata("design:type", core_1.ElementRef)
@@ -2036,7 +2063,7 @@ var Table = /** @class */ (function () {
2036
2063
  template: "\n <div #container [ngStyle]=\"style\" [class]=\"styleClass\"\n [ngClass]=\"{'ui-table ui-widget': true, 'ui-table-responsive': responsive, 'ui-table-resizable': resizableColumns,\n 'ui-table-resizable-fit': (resizableColumns && columnResizeMode === 'fit'),\n 'ui-table-hoverable-rows': (rowHover||selectionMode), 'ui-table-auto-layout': autoLayout}\">\n <div class=\"ui-table-loading ui-widget-overlay\" *ngIf=\"loading && showLoader\"></div>\n <div class=\"ui-table-loading-content\" *ngIf=\"loading && showLoader\">\n <i [class]=\"'ui-table-loading-icon pi-spin ' + loadingIcon\"></i>\n </div>\n <div *ngIf=\"captionTemplate\" class=\"ui-table-caption ui-widget-header\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </div>\n <p-paginator [rows]=\"rows\" [first]=\"first\" [totalRecords]=\"totalRecords\" [pageLinkSize]=\"pageLinks\" styleClass=\"ui-paginator-top\" [alwaysShow]=\"alwaysShowPaginator\"\n (onPageChange)=\"onPageChange($event)\" [rowsPerPageOptions]=\"rowsPerPageOptions\" *ngIf=\"paginator && (paginatorPosition === 'top' || paginatorPosition =='both')\"\n [templateLeft]=\"paginatorLeftTemplate\" [templateRight]=\"paginatorRightTemplate\" [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\n [currentPageReportTemplate]=\"currentPageReportTemplate\" [showCurrentPageReport]=\"showCurrentPageReport\"></p-paginator>\n \n <div class=\"ui-table-wrapper\" *ngIf=\"!scrollable\">\n <table #table [ngClass]=\"tableStyleClass\" [ngStyle]=\"tableStyle\">\n <ng-container *ngTemplateOutlet=\"colGroupTemplate; context {$implicit: columns}\"></ng-container>\n <thead class=\"ui-table-thead\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: {$implicit: columns}\"></ng-container>\n </thead>\n <tfoot *ngIf=\"footerTemplate\" class=\"ui-table-tfoot\">\n <ng-container *ngTemplateOutlet=\"footerTemplate; context {$implicit: columns}\"></ng-container>\n </tfoot>\n <tbody class=\"ui-table-tbody\" [pTableBody]=\"columns\" [pTableBodyTemplate]=\"bodyTemplate\"></tbody>\n </table>\n </div>\n\n <div class=\"ui-table-scrollable-wrapper\" *ngIf=\"scrollable\">\n <div class=\"ui-table-scrollable-view ui-table-frozen-view\" *ngIf=\"frozenColumns||frozenBodyTemplate\" [pScrollableView]=\"frozenColumns\" [frozen]=\"true\" [ngStyle]=\"{width: frozenWidth}\" [scrollHeight]=\"scrollHeight\"></div>\n <div class=\"ui-table-scrollable-view\" [pScrollableView]=\"columns\" [frozen]=\"false\" [scrollHeight]=\"scrollHeight\" [ngStyle]=\"{left: frozenWidth, width: 'calc(100% - '+frozenWidth+')'}\"></div>\n </div>\n \n <p-paginator [rows]=\"rows\" [first]=\"first\" [totalRecords]=\"totalRecords\" [pageLinkSize]=\"pageLinks\" styleClass=\"ui-paginator-bottom\" [alwaysShow]=\"alwaysShowPaginator\"\n (onPageChange)=\"onPageChange($event)\" [rowsPerPageOptions]=\"rowsPerPageOptions\" *ngIf=\"paginator && (paginatorPosition === 'bottom' || paginatorPosition =='both')\"\n [templateLeft]=\"paginatorLeftTemplate\" [templateRight]=\"paginatorRightTemplate\" [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\n [currentPageReportTemplate]=\"currentPageReportTemplate\" [showCurrentPageReport]=\"showCurrentPageReport\"></p-paginator>\n \n <div *ngIf=\"summaryTemplate\" class=\"ui-table-summary ui-widget-header\">\n <ng-container *ngTemplateOutlet=\"summaryTemplate\"></ng-container>\n </div>\n\n <div #resizeHelper class=\"ui-column-resizer-helper ui-state-highlight\" style=\"display:none\" *ngIf=\"resizableColumns\"></div>\n\n <span #reorderIndicatorUp class=\"pi pi-arrow-down ui-table-reorder-indicator-up\" style=\"display:none\" *ngIf=\"reorderableColumns\"></span>\n <span #reorderIndicatorDown class=\"pi pi-arrow-up ui-table-reorder-indicator-down\" style=\"display:none\" *ngIf=\"reorderableColumns\"></span>\n </div>\n ",
2037
2064
  providers: [TableService]
2038
2065
  }),
2039
- __metadata("design:paramtypes", [core_1.ElementRef, core_1.NgZone, TableService])
2066
+ __metadata("design:paramtypes", [core_1.ElementRef, core_1.NgZone, TableService, core_1.ChangeDetectorRef])
2040
2067
  ], Table);
2041
2068
  return Table;
2042
2069
  }());
@@ -2994,7 +3021,7 @@ var EditableColumn = /** @class */ (function () {
2994
3021
  };
2995
3022
  EditableColumn.prototype.openCell = function () {
2996
3023
  var _this = this;
2997
- this.dt.updateEditingCell(this.el.nativeElement);
3024
+ this.dt.updateEditingCell(this.el.nativeElement, this.data, this.field);
2998
3025
  domhandler_1.DomHandler.addClass(this.el.nativeElement, 'ui-editing-cell');
2999
3026
  this.dt.onEditInit.emit({ field: this.field, data: this.data });
3000
3027
  this.zone.runOutsideAngular(function () {
@@ -3010,6 +3037,8 @@ var EditableColumn = /** @class */ (function () {
3010
3037
  EditableColumn.prototype.closeEditingCell = function () {
3011
3038
  domhandler_1.DomHandler.removeClass(this.dt.editingCell, 'ui-editing-cell');
3012
3039
  this.dt.editingCell = null;
3040
+ this.dt.editingCellData = null;
3041
+ this.dt.editingCellField = null;
3013
3042
  this.dt.unbindDocumentEditListener();
3014
3043
  };
3015
3044
  EditableColumn.prototype.onKeyDown = function (event) {