@firestitch/list 13.2.1 → 13.2.2

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.
@@ -3050,12 +3050,6 @@ class DataController {
3050
3050
  this._hasData = false;
3051
3051
  this._destroy$ = new Subject();
3052
3052
  }
3053
- get visibleRows$() {
3054
- return this._visibleRows$;
3055
- }
3056
- get visibleRows() {
3057
- return this._visibleRows$.getValue();
3058
- }
3059
3053
  get visibleRowsData() {
3060
3054
  return this.visibleRows.map((row) => row.data);
3061
3055
  }
@@ -3080,10 +3074,16 @@ class DataController {
3080
3074
  get operation() {
3081
3075
  return this._operation;
3082
3076
  }
3077
+ get visibleRows$() {
3078
+ return this._visibleRows$;
3079
+ }
3083
3080
  set visibleRows(value) {
3084
3081
  this._visibleRows$.next(value);
3085
3082
  this._hasData = this.visibleRows.length > 0;
3086
3083
  }
3084
+ get visibleRows() {
3085
+ return this._visibleRows$.getValue();
3086
+ }
3087
3087
  get visibleRowsCount() {
3088
3088
  return this.visibleRows.length;
3089
3089
  }
@@ -3101,7 +3101,7 @@ class DataController {
3101
3101
  this._footerRowFn = group.footer || (() => false);
3102
3102
  this._initialExpand = group.initialExpand ?? true;
3103
3103
  // group mode enabled by default
3104
- this._groupEnabled = (group.enabled !== void 0)
3104
+ this._groupEnabled = (group.enabled !== undefined)
3105
3105
  ? group.enabled
3106
3106
  : true;
3107
3107
  }
@@ -3169,9 +3169,7 @@ class DataController {
3169
3169
  this._updateVisibleRows();
3170
3170
  return true;
3171
3171
  }
3172
- else {
3173
- return false;
3174
- }
3172
+ return false;
3175
3173
  }
3176
3174
  /**
3177
3175
  * Update data for specified row
@@ -3189,11 +3187,9 @@ class DataController {
3189
3187
  this._updateVisibleRows();
3190
3188
  return updateSuccess;
3191
3189
  }
3192
- else {
3193
- const updated = this.updateRow(rows, trackBy);
3194
- this._updateVisibleRows();
3195
- return updated;
3196
- }
3190
+ const updated = this.updateRow(rows, trackBy);
3191
+ this._updateVisibleRows();
3192
+ return updated;
3197
3193
  }
3198
3194
  /**
3199
3195
  * Remove data for specified row
@@ -3319,7 +3315,7 @@ class DataController {
3319
3315
  const targetIndex = this._rowsStack.findIndex((listRow) => trackBy(listRow.data, targetRow));
3320
3316
  if (targetIndex !== -1) {
3321
3317
  const updateTarget = this._rowsStack[targetIndex];
3322
- const updatedData = Object.assign({}, updateTarget.data, targetRow);
3318
+ const updatedData = { ...updateTarget.data, ...targetRow };
3323
3319
  this._rowsStack[targetIndex] = new Row(updatedData, updateTarget.type, {
3324
3320
  parent: updateTarget.parent,
3325
3321
  initialExpand: updateTarget.expanded,
@@ -3351,7 +3347,7 @@ class DataController {
3351
3347
  if (!this._groupByFn || !this._compareByFn) {
3352
3348
  return rows;
3353
3349
  }
3354
- let groupRows = [];
3350
+ const groupRows = [];
3355
3351
  const footerRows = new Map();
3356
3352
  rows.forEach((row) => {
3357
3353
  const mainGroup = this._groupByFn(row);
@@ -3918,11 +3914,15 @@ class PaginationController {
3918
3914
  // this.pagesArray = Object.assign([], pagesArr);
3919
3915
  // }
3920
3916
  setLoadMore(config) {
3921
- const loadMoreConfig = typeof config === 'boolean' ? {
3922
- enabled: !!config,
3923
- } : config;
3924
- this._loadMoreConfig = {
3917
+ const loadMoreConfig = typeof config === 'boolean' ?
3918
+ {
3919
+ enabled: !!config,
3920
+ } : {
3925
3921
  enabled: true,
3922
+ ...config,
3923
+ };
3924
+ this._loadMoreConfig = {
3925
+ enabled: false,
3926
3926
  label: 'Load More',
3927
3927
  buttonType: 'basic',
3928
3928
  ...loadMoreConfig,