@katlux/providers 0.1.1-alpha.118 → 0.1.1-alpha.120

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.
package/dist/index.cjs CHANGED
@@ -4296,7 +4296,8 @@ class AEncryptedClientProvider extends ADataProvider {
4296
4296
  if (!this.isEncryptionEnabled || !rows || rows.length === 0) {
4297
4297
  return { rows, decrypted: false };
4298
4298
  }
4299
- return await decryptPageRows(rows, this.encryption, void 0, this.idKey);
4299
+ const url = this.apiUrl || void 0;
4300
+ return await decryptPageRows(rows, this.encryption, url, this.idKey);
4300
4301
  }
4301
4302
  async setDataChunked(data, options) {
4302
4303
  const ret = this.setData(data);
@@ -4645,6 +4646,11 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4645
4646
  this._sortDirty = true;
4646
4647
  super.setSortList(sortList, immediate);
4647
4648
  }
4649
+ clearEncryption() {
4650
+ super.clearEncryption();
4651
+ this._filterDirty = true;
4652
+ this._sortDirty = true;
4653
+ }
4648
4654
  /**
4649
4655
  * Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
4650
4656
  */
@@ -4675,7 +4681,7 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4675
4681
  if (this.sortList.length > 0) {
4676
4682
  this._sortDirty = true;
4677
4683
  } else {
4678
- this._rowMap = this.filteredData;
4684
+ this._rowMap = this.isEncryptionEnabled ? [...this.filteredData] : this.filteredData;
4679
4685
  this._sortDirty = false;
4680
4686
  }
4681
4687
  }
@@ -4683,7 +4689,7 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4683
4689
  if (this.sortList.length > 0) {
4684
4690
  this._rowMap = sortData(this.sortList, this.filteredData);
4685
4691
  } else {
4686
- this._rowMap = this.filteredData;
4692
+ this._rowMap = this.isEncryptionEnabled ? [...this.filteredData] : this.filteredData;
4687
4693
  }
4688
4694
  this._sortDirty = false;
4689
4695
  }
@@ -4730,8 +4736,9 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4730
4736
  const { rows, decrypted } = await this.decryptRows(this.pageData);
4731
4737
  if (decrypted) {
4732
4738
  this.pageData = rows;
4733
- if (this.pageSize <= 0) {
4734
- this._rowMap = rows;
4739
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
4740
+ for (let i = 0; i < rows.length; i++) {
4741
+ this._rowMap[startIndex + i] = rows[i];
4735
4742
  }
4736
4743
  }
4737
4744
  }
@@ -7098,8 +7105,13 @@ class CFlatServerDataProvider extends ADataProvider {
7098
7105
  const normalized = normalizeDataResult(result);
7099
7106
  if (normalized) {
7100
7107
  if (requestId !== this.latestRequestId) return;
7108
+ let rows = normalized.rows;
7109
+ if (this.encryption?.enabled && rows && rows.length > 0) {
7110
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7111
+ if (decrypted) rows = decRows;
7112
+ }
7101
7113
  this.batchUpdates(() => {
7102
- this.pageData = normalized.rows;
7114
+ this.pageData = rows;
7103
7115
  this.rowCount = normalized.rowCount;
7104
7116
  this.initialLoad = false;
7105
7117
  });
@@ -7111,8 +7123,13 @@ class CFlatServerDataProvider extends ADataProvider {
7111
7123
  const normalized = normalizeDataResult(result);
7112
7124
  if (normalized) {
7113
7125
  if (requestId !== this.latestRequestId) return;
7126
+ let rows = normalized.rows;
7127
+ if (this.encryption?.enabled && rows && rows.length > 0) {
7128
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7129
+ if (decrypted) rows = decRows;
7130
+ }
7114
7131
  this.batchUpdates(() => {
7115
- this.pageData = normalized.rows;
7132
+ this.pageData = rows;
7116
7133
  this.rowCount = normalized.rowCount;
7117
7134
  this.initialLoad = false;
7118
7135
  });
@@ -7182,10 +7199,15 @@ class CAPIFlatServerDataProvider extends CFlatServerDataProvider {
7182
7199
  this.encryption = options.encryption;
7183
7200
  this.requestProvider.setEncryption(options.encryption);
7184
7201
  }
7185
- this.requestProvider.onDataReceived((data, generation) => {
7202
+ this.requestProvider.onDataReceived(async (data, generation) => {
7186
7203
  if (generation !== void 0 && generation !== this._requestGeneration) return;
7187
7204
  if (data) {
7188
- this.pageData = data.rows || data;
7205
+ let rows = data.rows || data;
7206
+ if (this.encryption?.enabled && Array.isArray(rows) && rows.length > 0) {
7207
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7208
+ if (decrypted) rows = decRows;
7209
+ }
7210
+ this.pageData = rows;
7189
7211
  if (data.rowCount !== void 0) {
7190
7212
  this.rowCount = data.rowCount;
7191
7213
  }
@@ -7740,8 +7762,11 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7740
7762
  const { rows, decrypted } = await this.decryptRows(this.pageData);
7741
7763
  if (decrypted) {
7742
7764
  this.pageData = rows;
7743
- if (this.pageSize <= 0) {
7744
- this._rowMap = rows;
7765
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
7766
+ if (this._allVisibleRowsCache) {
7767
+ for (let i = 0; i < rows.length; i++) {
7768
+ this._allVisibleRowsCache[startIndex + i] = rows[i];
7769
+ }
7745
7770
  }
7746
7771
  }
7747
7772
  }
@@ -7754,6 +7779,13 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7754
7779
  }
7755
7780
  });
7756
7781
  }
7782
+ clearEncryption() {
7783
+ super.clearEncryption();
7784
+ this._filterDirty = true;
7785
+ this._sortDirty = true;
7786
+ this._filteredNodesCache = null;
7787
+ this._allVisibleRowsCache = null;
7788
+ }
7757
7789
  // Public Tree API
7758
7790
  get treeNodes() {
7759
7791
  return this._staticNodes.map((node) => ({
@@ -7794,6 +7826,12 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7794
7826
  ...node,
7795
7827
  __treeNode: node
7796
7828
  }));
7829
+ if (this.isEncryptionEnabled && this.pageData && this.pageData.length > 0) {
7830
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
7831
+ for (let i = 0; i < this.pageData.length; i++) {
7832
+ this._allVisibleRowsCache[startIndex + i] = this.pageData[i];
7833
+ }
7834
+ }
7797
7835
  }
7798
7836
  return this._allVisibleRowsCache;
7799
7837
  }
@@ -8258,8 +8296,13 @@ class CTreeServerDataProvider extends ADataProvider {
8258
8296
  const normalized = normalizeDataResult(result);
8259
8297
  if (normalized) {
8260
8298
  if (requestId !== this.latestRequestId) return;
8299
+ let rows = normalized.rows;
8300
+ if (this.encryption?.enabled && rows && rows.length > 0) {
8301
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8302
+ if (decrypted) rows = decRows;
8303
+ }
8261
8304
  this.batchUpdates(() => {
8262
- this.pageData = normalized.rows;
8305
+ this.pageData = rows;
8263
8306
  this.rowCount = normalized.rowCount;
8264
8307
  this.initialLoad = false;
8265
8308
  });
@@ -8271,8 +8314,13 @@ class CTreeServerDataProvider extends ADataProvider {
8271
8314
  const normalized = normalizeDataResult(result);
8272
8315
  if (normalized) {
8273
8316
  if (requestId !== this.latestRequestId) return;
8317
+ let rows = normalized.rows;
8318
+ if (this.encryption?.enabled && rows && rows.length > 0) {
8319
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8320
+ if (decrypted) rows = decRows;
8321
+ }
8274
8322
  this.batchUpdates(() => {
8275
- this.pageData = normalized.rows;
8323
+ this.pageData = rows;
8276
8324
  this.rowCount = normalized.rowCount;
8277
8325
  this.initialLoad = false;
8278
8326
  });
@@ -8385,14 +8433,18 @@ class CAPITreeServerDataProvider extends CTreeServerDataProvider {
8385
8433
  this.encryption = options.encryption;
8386
8434
  this.requestProvider.setEncryption(options.encryption);
8387
8435
  }
8388
- this.requestProvider.onDataReceived((data, generation) => {
8436
+ this.requestProvider.onDataReceived(async (data, generation) => {
8389
8437
  if (generation !== void 0 && generation !== this._requestGeneration) return;
8390
8438
  if (data) {
8391
- this.pageData = data.rows || data;
8439
+ let rows = data.rows || data;
8440
+ if (this.encryption?.enabled && Array.isArray(rows) && rows.length > 0) {
8441
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8442
+ if (decrypted) rows = decRows;
8443
+ }
8444
+ this.pageData = rows;
8392
8445
  if (data.rowCount !== void 0) {
8393
8446
  this.rowCount = data.rowCount;
8394
8447
  }
8395
- this.notify();
8396
8448
  }
8397
8449
  });
8398
8450
  }
package/dist/index.d.cts CHANGED
@@ -607,7 +607,7 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
607
607
  clearEncryption(): void;
608
608
  protected encryptRows(rows: TRow[]): Promise<TRow[]>;
609
609
  protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
610
- protected decryptRows(rows: TRow[]): Promise<{
610
+ decryptRows(rows: TRow[]): Promise<{
611
611
  rows: TRow[];
612
612
  decrypted: boolean;
613
613
  }>;
@@ -633,6 +633,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
633
633
  protected onSortUpdated(): void;
634
634
  setFilter(filter: IDataFilter | null, immediate?: boolean): void;
635
635
  setSortList(sortList: IDataSort[], immediate?: boolean): void;
636
+ clearEncryption(): void;
636
637
  /**
637
638
  * Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
638
639
  */
@@ -821,6 +822,7 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
821
822
  private paginateNodes;
822
823
  private updatePageData;
823
824
  loadPageData(): Promise<void>;
825
+ clearEncryption(): void;
824
826
  get treeNodes(): ITreeNode<TRow>[];
825
827
  get allVisibleNodes(): ITreeNode<TRow>[];
826
828
  get rowMap(): readonly (TRow & ITreeNode<TRow> & {
package/dist/index.d.mts CHANGED
@@ -607,7 +607,7 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
607
607
  clearEncryption(): void;
608
608
  protected encryptRows(rows: TRow[]): Promise<TRow[]>;
609
609
  protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
610
- protected decryptRows(rows: TRow[]): Promise<{
610
+ decryptRows(rows: TRow[]): Promise<{
611
611
  rows: TRow[];
612
612
  decrypted: boolean;
613
613
  }>;
@@ -633,6 +633,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
633
633
  protected onSortUpdated(): void;
634
634
  setFilter(filter: IDataFilter | null, immediate?: boolean): void;
635
635
  setSortList(sortList: IDataSort[], immediate?: boolean): void;
636
+ clearEncryption(): void;
636
637
  /**
637
638
  * Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
638
639
  */
@@ -821,6 +822,7 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
821
822
  private paginateNodes;
822
823
  private updatePageData;
823
824
  loadPageData(): Promise<void>;
825
+ clearEncryption(): void;
824
826
  get treeNodes(): ITreeNode<TRow>[];
825
827
  get allVisibleNodes(): ITreeNode<TRow>[];
826
828
  get rowMap(): readonly (TRow & ITreeNode<TRow> & {
package/dist/index.d.ts CHANGED
@@ -607,7 +607,7 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
607
607
  clearEncryption(): void;
608
608
  protected encryptRows(rows: TRow[]): Promise<TRow[]>;
609
609
  protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
610
- protected decryptRows(rows: TRow[]): Promise<{
610
+ decryptRows(rows: TRow[]): Promise<{
611
611
  rows: TRow[];
612
612
  decrypted: boolean;
613
613
  }>;
@@ -633,6 +633,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
633
633
  protected onSortUpdated(): void;
634
634
  setFilter(filter: IDataFilter | null, immediate?: boolean): void;
635
635
  setSortList(sortList: IDataSort[], immediate?: boolean): void;
636
+ clearEncryption(): void;
636
637
  /**
637
638
  * Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
638
639
  */
@@ -821,6 +822,7 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
821
822
  private paginateNodes;
822
823
  private updatePageData;
823
824
  loadPageData(): Promise<void>;
825
+ clearEncryption(): void;
824
826
  get treeNodes(): ITreeNode<TRow>[];
825
827
  get allVisibleNodes(): ITreeNode<TRow>[];
826
828
  get rowMap(): readonly (TRow & ITreeNode<TRow> & {
package/dist/index.mjs CHANGED
@@ -4279,7 +4279,8 @@ class AEncryptedClientProvider extends ADataProvider {
4279
4279
  if (!this.isEncryptionEnabled || !rows || rows.length === 0) {
4280
4280
  return { rows, decrypted: false };
4281
4281
  }
4282
- return await decryptPageRows(rows, this.encryption, void 0, this.idKey);
4282
+ const url = this.apiUrl || void 0;
4283
+ return await decryptPageRows(rows, this.encryption, url, this.idKey);
4283
4284
  }
4284
4285
  async setDataChunked(data, options) {
4285
4286
  const ret = this.setData(data);
@@ -4628,6 +4629,11 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4628
4629
  this._sortDirty = true;
4629
4630
  super.setSortList(sortList, immediate);
4630
4631
  }
4632
+ clearEncryption() {
4633
+ super.clearEncryption();
4634
+ this._filterDirty = true;
4635
+ this._sortDirty = true;
4636
+ }
4631
4637
  /**
4632
4638
  * Explicitly rebuilds the reference map array if row properties inside allData were mutated in-place.
4633
4639
  */
@@ -4658,7 +4664,7 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4658
4664
  if (this.sortList.length > 0) {
4659
4665
  this._sortDirty = true;
4660
4666
  } else {
4661
- this._rowMap = this.filteredData;
4667
+ this._rowMap = this.isEncryptionEnabled ? [...this.filteredData] : this.filteredData;
4662
4668
  this._sortDirty = false;
4663
4669
  }
4664
4670
  }
@@ -4666,7 +4672,7 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4666
4672
  if (this.sortList.length > 0) {
4667
4673
  this._rowMap = sortData(this.sortList, this.filteredData);
4668
4674
  } else {
4669
- this._rowMap = this.filteredData;
4675
+ this._rowMap = this.isEncryptionEnabled ? [...this.filteredData] : this.filteredData;
4670
4676
  }
4671
4677
  this._sortDirty = false;
4672
4678
  }
@@ -4713,8 +4719,9 @@ class CFlatClientDataProvider extends AEncryptedClientProvider {
4713
4719
  const { rows, decrypted } = await this.decryptRows(this.pageData);
4714
4720
  if (decrypted) {
4715
4721
  this.pageData = rows;
4716
- if (this.pageSize <= 0) {
4717
- this._rowMap = rows;
4722
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
4723
+ for (let i = 0; i < rows.length; i++) {
4724
+ this._rowMap[startIndex + i] = rows[i];
4718
4725
  }
4719
4726
  }
4720
4727
  }
@@ -7081,8 +7088,13 @@ class CFlatServerDataProvider extends ADataProvider {
7081
7088
  const normalized = normalizeDataResult(result);
7082
7089
  if (normalized) {
7083
7090
  if (requestId !== this.latestRequestId) return;
7091
+ let rows = normalized.rows;
7092
+ if (this.encryption?.enabled && rows && rows.length > 0) {
7093
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7094
+ if (decrypted) rows = decRows;
7095
+ }
7084
7096
  this.batchUpdates(() => {
7085
- this.pageData = normalized.rows;
7097
+ this.pageData = rows;
7086
7098
  this.rowCount = normalized.rowCount;
7087
7099
  this.initialLoad = false;
7088
7100
  });
@@ -7094,8 +7106,13 @@ class CFlatServerDataProvider extends ADataProvider {
7094
7106
  const normalized = normalizeDataResult(result);
7095
7107
  if (normalized) {
7096
7108
  if (requestId !== this.latestRequestId) return;
7109
+ let rows = normalized.rows;
7110
+ if (this.encryption?.enabled && rows && rows.length > 0) {
7111
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7112
+ if (decrypted) rows = decRows;
7113
+ }
7097
7114
  this.batchUpdates(() => {
7098
- this.pageData = normalized.rows;
7115
+ this.pageData = rows;
7099
7116
  this.rowCount = normalized.rowCount;
7100
7117
  this.initialLoad = false;
7101
7118
  });
@@ -7165,10 +7182,15 @@ class CAPIFlatServerDataProvider extends CFlatServerDataProvider {
7165
7182
  this.encryption = options.encryption;
7166
7183
  this.requestProvider.setEncryption(options.encryption);
7167
7184
  }
7168
- this.requestProvider.onDataReceived((data, generation) => {
7185
+ this.requestProvider.onDataReceived(async (data, generation) => {
7169
7186
  if (generation !== void 0 && generation !== this._requestGeneration) return;
7170
7187
  if (data) {
7171
- this.pageData = data.rows || data;
7188
+ let rows = data.rows || data;
7189
+ if (this.encryption?.enabled && Array.isArray(rows) && rows.length > 0) {
7190
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
7191
+ if (decrypted) rows = decRows;
7192
+ }
7193
+ this.pageData = rows;
7172
7194
  if (data.rowCount !== void 0) {
7173
7195
  this.rowCount = data.rowCount;
7174
7196
  }
@@ -7723,8 +7745,11 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7723
7745
  const { rows, decrypted } = await this.decryptRows(this.pageData);
7724
7746
  if (decrypted) {
7725
7747
  this.pageData = rows;
7726
- if (this.pageSize <= 0) {
7727
- this._rowMap = rows;
7748
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
7749
+ if (this._allVisibleRowsCache) {
7750
+ for (let i = 0; i < rows.length; i++) {
7751
+ this._allVisibleRowsCache[startIndex + i] = rows[i];
7752
+ }
7728
7753
  }
7729
7754
  }
7730
7755
  }
@@ -7737,6 +7762,13 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7737
7762
  }
7738
7763
  });
7739
7764
  }
7765
+ clearEncryption() {
7766
+ super.clearEncryption();
7767
+ this._filterDirty = true;
7768
+ this._sortDirty = true;
7769
+ this._filteredNodesCache = null;
7770
+ this._allVisibleRowsCache = null;
7771
+ }
7740
7772
  // Public Tree API
7741
7773
  get treeNodes() {
7742
7774
  return this._staticNodes.map((node) => ({
@@ -7777,6 +7809,12 @@ class CTreeClientDataProvider extends CFlatClientDataProvider {
7777
7809
  ...node,
7778
7810
  __treeNode: node
7779
7811
  }));
7812
+ if (this.isEncryptionEnabled && this.pageData && this.pageData.length > 0) {
7813
+ const startIndex = this.pageSize <= 0 ? 0 : (this.currentPage - 1) * this.pageSize;
7814
+ for (let i = 0; i < this.pageData.length; i++) {
7815
+ this._allVisibleRowsCache[startIndex + i] = this.pageData[i];
7816
+ }
7817
+ }
7780
7818
  }
7781
7819
  return this._allVisibleRowsCache;
7782
7820
  }
@@ -8241,8 +8279,13 @@ class CTreeServerDataProvider extends ADataProvider {
8241
8279
  const normalized = normalizeDataResult(result);
8242
8280
  if (normalized) {
8243
8281
  if (requestId !== this.latestRequestId) return;
8282
+ let rows = normalized.rows;
8283
+ if (this.encryption?.enabled && rows && rows.length > 0) {
8284
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8285
+ if (decrypted) rows = decRows;
8286
+ }
8244
8287
  this.batchUpdates(() => {
8245
- this.pageData = normalized.rows;
8288
+ this.pageData = rows;
8246
8289
  this.rowCount = normalized.rowCount;
8247
8290
  this.initialLoad = false;
8248
8291
  });
@@ -8254,8 +8297,13 @@ class CTreeServerDataProvider extends ADataProvider {
8254
8297
  const normalized = normalizeDataResult(result);
8255
8298
  if (normalized) {
8256
8299
  if (requestId !== this.latestRequestId) return;
8300
+ let rows = normalized.rows;
8301
+ if (this.encryption?.enabled && rows && rows.length > 0) {
8302
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8303
+ if (decrypted) rows = decRows;
8304
+ }
8257
8305
  this.batchUpdates(() => {
8258
- this.pageData = normalized.rows;
8306
+ this.pageData = rows;
8259
8307
  this.rowCount = normalized.rowCount;
8260
8308
  this.initialLoad = false;
8261
8309
  });
@@ -8368,14 +8416,18 @@ class CAPITreeServerDataProvider extends CTreeServerDataProvider {
8368
8416
  this.encryption = options.encryption;
8369
8417
  this.requestProvider.setEncryption(options.encryption);
8370
8418
  }
8371
- this.requestProvider.onDataReceived((data, generation) => {
8419
+ this.requestProvider.onDataReceived(async (data, generation) => {
8372
8420
  if (generation !== void 0 && generation !== this._requestGeneration) return;
8373
8421
  if (data) {
8374
- this.pageData = data.rows || data;
8422
+ let rows = data.rows || data;
8423
+ if (this.encryption?.enabled && Array.isArray(rows) && rows.length > 0) {
8424
+ const { rows: decRows, decrypted } = await decryptPageRows(rows, this.encryption, void 0, this.idKey);
8425
+ if (decrypted) rows = decRows;
8426
+ }
8427
+ this.pageData = rows;
8375
8428
  if (data.rowCount !== void 0) {
8376
8429
  this.rowCount = data.rowCount;
8377
8430
  }
8378
- this.notify();
8379
8431
  }
8380
8432
  });
8381
8433
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/providers",
3
- "version": "0.1.1-alpha.118",
3
+ "version": "0.1.1-alpha.120",
4
4
  "description": "Core data calculation and caching providers for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",