@canvas-components/list-table 0.3.29 → 0.3.30

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
@@ -34259,7 +34259,7 @@ var ListTablePersistenceController = class {
34259
34259
  this.options.canvasHost.setContentZoom(nextZoom);
34260
34260
  }
34261
34261
  let currentOptions = this.options.getOptions();
34262
- if (stored.scrollbar) {
34262
+ if (stored.scrollbar && !isSameScrollbarOptions(currentOptions.scrollbar, stored.scrollbar)) {
34263
34263
  currentOptions = { ...currentOptions, scrollbar: stored.scrollbar };
34264
34264
  currentOptions.ui?.onScrollbarChange?.(stored.scrollbar);
34265
34265
  }
@@ -34335,6 +34335,22 @@ var ListTablePersistenceController = class {
34335
34335
  );
34336
34336
  }
34337
34337
  };
34338
+ function isSameScrollbarOptions(current, stored) {
34339
+ if (current === stored) return true;
34340
+ if (!current || !stored) return false;
34341
+ const currentEntries = Object.entries(current);
34342
+ if (currentEntries.length !== Object.keys(stored).length) return false;
34343
+ return currentEntries.every(([key, value]) => {
34344
+ const next = stored[key];
34345
+ if (value && typeof value === "object" && next && typeof next === "object") {
34346
+ const entries = Object.entries(value);
34347
+ return entries.length === Object.keys(next).length && entries.every(
34348
+ ([axisKey, axisValue]) => Object.is(axisValue, next[axisKey])
34349
+ );
34350
+ }
34351
+ return Object.is(value, next);
34352
+ });
34353
+ }
34338
34354
 
34339
34355
  // src/services/data-source-service.ts
34340
34356
  function getListTableBaseDisplayData(params) {
package/dist/index.js CHANGED
@@ -34237,7 +34237,7 @@ var ListTablePersistenceController = class {
34237
34237
  this.options.canvasHost.setContentZoom(nextZoom);
34238
34238
  }
34239
34239
  let currentOptions = this.options.getOptions();
34240
- if (stored.scrollbar) {
34240
+ if (stored.scrollbar && !isSameScrollbarOptions(currentOptions.scrollbar, stored.scrollbar)) {
34241
34241
  currentOptions = { ...currentOptions, scrollbar: stored.scrollbar };
34242
34242
  currentOptions.ui?.onScrollbarChange?.(stored.scrollbar);
34243
34243
  }
@@ -34313,6 +34313,22 @@ var ListTablePersistenceController = class {
34313
34313
  );
34314
34314
  }
34315
34315
  };
34316
+ function isSameScrollbarOptions(current, stored) {
34317
+ if (current === stored) return true;
34318
+ if (!current || !stored) return false;
34319
+ const currentEntries = Object.entries(current);
34320
+ if (currentEntries.length !== Object.keys(stored).length) return false;
34321
+ return currentEntries.every(([key, value]) => {
34322
+ const next = stored[key];
34323
+ if (value && typeof value === "object" && next && typeof next === "object") {
34324
+ const entries = Object.entries(value);
34325
+ return entries.length === Object.keys(next).length && entries.every(
34326
+ ([axisKey, axisValue]) => Object.is(axisValue, next[axisKey])
34327
+ );
34328
+ }
34329
+ return Object.is(value, next);
34330
+ });
34331
+ }
34316
34332
 
34317
34333
  // src/services/data-source-service.ts
34318
34334
  function getListTableBaseDisplayData(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canvas-components/list-table",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Framework-agnostic list table core engine.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@ant-design/icons-svg": "4.6.0",
30
- "@canvas-components/barcode": "0.2.2",
31
- "@canvas-components/stats": "0.1.4",
32
- "@canvas-components/utils": "0.2.8",
33
30
  "@canvas-components/qrcode": "0.2.2",
34
- "@canvas-components/chart": "0.3.7"
31
+ "@canvas-components/utils": "0.2.8",
32
+ "@canvas-components/barcode": "0.2.2",
33
+ "@canvas-components/chart": "0.3.7",
34
+ "@canvas-components/stats": "0.1.4"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsup --config tsup.config.ts"