@universis/ngx-tables 0.7.3 → 0.7.6

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.
@@ -19,9 +19,9 @@ import { ActivatedRoute, Router, NavigationStart, RouterModule } from '@angular/
19
19
  import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap/modal';
20
20
  import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
21
21
  import { GroupByPipe, NgPipesModule } from 'ngx-pipes';
22
- import { __extends, __assign, __awaiter, __generator, __values, __spread } from 'tslib';
22
+ import { __extends, __awaiter, __generator, __values, __assign, __spread } from 'tslib';
23
23
  import { Injectable, Directive, Optional, Input, Pipe, Component, ElementRef, ViewChild, ViewEncapsulation, EventEmitter, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA, defineInjectable, inject, HostListener, ChangeDetectorRef, InjectionToken, Inject, Injector, ChangeDetectionStrategy } from '@angular/core';
24
- import { createFeatureSelector, createSelector, select, Store, StoreModule } from '@ngrx/store';
24
+ import { createFeatureSelector, createSelector, select, Store } from '@ngrx/store';
25
25
  import { first } from 'rxjs/operators';
26
26
 
27
27
  var AdvancedColumnFormatter = /** @class */ (function () {
@@ -1116,6 +1116,13 @@ var AdvancedTableComponent = /** @class */ (function () {
1116
1116
  });
1117
1117
  // get table element
1118
1118
  var tableElement_1 = jQuery(this.table.nativeElement);
1119
+ jQuery(window).on('resize', function () {
1120
+ setTimeout(function () {
1121
+ if (_this.dataTable) {
1122
+ _this.dataTable.columns.adjust();
1123
+ }
1124
+ }, 1);
1125
+ });
1119
1126
  // tslint:disable-next-line: no-shadowed-variable
1120
1127
  tableElement_1.on('processing.dt', function (event, settings, processing) {
1121
1128
  if (processing) {
@@ -1131,6 +1138,7 @@ var AdvancedTableComponent = /** @class */ (function () {
1131
1138
  }, 0);
1132
1139
  }
1133
1140
  });
1141
+ var drawIndex_1 = 1;
1134
1142
  tableElement_1.on('order.dt', function (event) {
1135
1143
  if (_this.dataTable) {
1136
1144
  var order = _this.dataTable.order();
@@ -1143,8 +1151,11 @@ var AdvancedTableComponent = /** @class */ (function () {
1143
1151
  if (_this.dataTable) {
1144
1152
  var info = _this.dataTable.page.info();
1145
1153
  _this.page.emit(info);
1154
+ if (drawIndex_1 > 1)
1155
+ return;
1146
1156
  try {
1147
- _this.dataTable.columns.adjust();
1157
+ drawIndex_1++;
1158
+ setTimeout(function () { _this.dataTable.columns.adjust(); }, 1);
1148
1159
  }
1149
1160
  catch (err) {
1150
1161
  console.error('ERROR', 'An error occurred while adjusting table columns');
@@ -4629,6 +4640,10 @@ var AppendState = /** @class */ (function () {
4629
4640
  }());
4630
4641
 
4631
4642
  var initialState = {};
4643
+ var tableInitialState = {
4644
+ filter: {},
4645
+ order: []
4646
+ };
4632
4647
  function tableReducer(state, action) {
4633
4648
  if (state === void 0) { state = initialState; }
4634
4649
  switch (action.type) {
@@ -4825,8 +4840,7 @@ var TablesModule = /** @class */ (function () {
4825
4840
  SharedModule,
4826
4841
  ModalModule,
4827
4842
  ProgressbarModule,
4828
- NgPipesModule,
4829
- StoreModule.forFeature(featureName, tableReducers)
4843
+ NgPipesModule
4830
4844
  ],
4831
4845
  providers: [DatePipe, TemplatePipe,
4832
4846
  {
@@ -4903,6 +4917,6 @@ var TablesModule = /** @class */ (function () {
4903
4917
  * Generated bundle index. Do not edit.
4904
4918
  */
4905
4919
 
4906
- export { AdvancedSearchState as ɵe, AdvancedTableState as ɵf, featureName as ɵd, tableReducer as ɵa, tableReducers as ɵc, AdvancedListComponent, AdvancedRowActionComponent, AdvancedSearchFormComponent, AdvancedSelectComponent, AdvancedSelectService, AdvancedTableConfigurationResolver, AdvancedSearchConfigurationResolver, AdvancedColumnFormatter, NestedPropertyFormatter, ButtonFormatter, LinkFormatter, ActionLinkFormatter, ActionButtonFormatter, ActionSplitButtonFormatter, SelectRowFormatter, TemplateFormatter, TrueFalseFormatter, TranslationFormatter, DateTimeFormatter, NgClassFormatter, LanguageFormatter, COLUMN_FORMATTERS, AdvancedTableConfiguration, AdvancedTableComponent, AdvancedTableSettingsComponent, AdvancedTableSearchBaseComponent, AdvancedTableSearchComponent, FORMATTERS, AdvancedFilterValueProvider, AdvancedTableModalBaseTemplate, AdvancedTableModalBaseComponent, SimpleHeaderToolsComponent, TableSimpleHeaderComponent, AdvancedTableNotNullError, AdvancedTableEditorDirective, BtnExpDirective, AdvancedAggregatorComponent, AdvancedAggregatorListComponent, AddItemsComponent, AdvancedAggregatorPipe, ParseTitlePipe, AdvancedAggregatorService, TablesModule, ɵ0, ActivatedTableService };
4920
+ export { AdvancedSearchState as ɵa, AdvancedTableState as ɵc, AdvancedListComponent, AdvancedRowActionComponent, AdvancedSearchFormComponent, AdvancedSelectComponent, AdvancedSelectService, AdvancedTableConfigurationResolver, AdvancedSearchConfigurationResolver, AdvancedColumnFormatter, NestedPropertyFormatter, ButtonFormatter, LinkFormatter, ActionLinkFormatter, ActionButtonFormatter, ActionSplitButtonFormatter, SelectRowFormatter, TemplateFormatter, TrueFalseFormatter, TranslationFormatter, DateTimeFormatter, NgClassFormatter, LanguageFormatter, COLUMN_FORMATTERS, AdvancedTableConfiguration, AdvancedTableComponent, AdvancedTableSettingsComponent, AdvancedTableSearchBaseComponent, AdvancedTableSearchComponent, FORMATTERS, AdvancedFilterValueProvider, AdvancedTableModalBaseTemplate, AdvancedTableModalBaseComponent, SimpleHeaderToolsComponent, TableSimpleHeaderComponent, AdvancedTableNotNullError, AdvancedTableEditorDirective, BtnExpDirective, AdvancedAggregatorComponent, AdvancedAggregatorListComponent, AddItemsComponent, AdvancedAggregatorPipe, ParseTitlePipe, AdvancedAggregatorService, TablesModule, ɵ0, ActivatedTableService, initialState, tableInitialState, tableReducer, tableReducers, featureName, getTablesState, selectTable };
4907
4921
 
4908
4922
  //# sourceMappingURL=universis-ngx-tables.js.map