@salesforce/lds-bindings 1.367.0 → 1.369.0

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.
@@ -372,6 +372,53 @@ function createWireAdapterConstructor$1(adapter, name, luvio) {
372
372
  return constructor;
373
373
  }
374
374
 
375
+ /**
376
+ * Simple deep equality comparison for configuration objects.
377
+ * Handles primitives, arrays, and plain objects.
378
+ */
379
+ function deepEquals(a, b) {
380
+ if (a === b) {
381
+ return true;
382
+ }
383
+ if (a === null || a === undefined || b === null || b === undefined) {
384
+ return a === b;
385
+ }
386
+ if (typeof a !== typeof b) {
387
+ return false;
388
+ }
389
+ if (typeof a !== 'object') {
390
+ return false;
391
+ }
392
+ if (Array.isArray(a) !== Array.isArray(b)) {
393
+ return false;
394
+ }
395
+ if (Array.isArray(a) && Array.isArray(b)) {
396
+ if (a.length !== b.length) {
397
+ return false;
398
+ }
399
+ for (let i = 0; i < a.length; i++) {
400
+ if (!deepEquals(a[i], b[i])) {
401
+ return false;
402
+ }
403
+ }
404
+ return true;
405
+ }
406
+ // Handle plain objects
407
+ const aKeys = Object.keys(a);
408
+ const bKeys = Object.keys(b);
409
+ if (aKeys.length !== bKeys.length) {
410
+ return false;
411
+ }
412
+ for (const key of aKeys) {
413
+ if (!bKeys.includes(key)) {
414
+ return false;
415
+ }
416
+ if (!deepEquals(a[key], b[key])) {
417
+ return false;
418
+ }
419
+ }
420
+ return true;
421
+ }
375
422
  class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
376
423
  constructor(adapter, name, luvio, callback, sourceContext, paginationConfigParamNames) {
377
424
  super(adapter, name, luvio, callback, sourceContext);
@@ -407,7 +454,7 @@ class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
407
454
  var _a;
408
455
  // If this is not a pagination param and its value has changed
409
456
  return (!((_a = this.paginationConfigParamNames) === null || _a === void 0 ? void 0 : _a.includes(paramName)) &&
410
- config[paramName] !== (currentConfig === null || currentConfig === void 0 ? void 0 : currentConfig[paramName]));
457
+ !deepEquals(config[paramName], currentConfig === null || currentConfig === void 0 ? void 0 : currentConfig[paramName]));
411
458
  });
412
459
  if (hasNonPaginationParamChanged) {
413
460
  this.connectTimestamp = Date.now();
@@ -862,12 +909,16 @@ function createGraphQLImperativeAdapter(luvio, adapter, metadata, astResolver) {
862
909
  callback(snapshotToTuple(snapshotOrPromise));
863
910
  return;
864
911
  }
865
- snapshotOrPromise.then((snapshot) => {
912
+ snapshotOrPromise
913
+ .then((snapshot) => {
866
914
  if (snapshot === null) {
867
915
  callback(createInvalidConfigError());
868
916
  return;
869
917
  }
870
918
  callback(snapshotToTuple(snapshot));
919
+ })
920
+ .finally(() => {
921
+ luvio.storeCleanup();
871
922
  });
872
923
  };
873
924
  defineProperty(imperativeAdapterInvoke, 'name', {
@@ -972,4 +1023,4 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
972
1023
  }
973
1024
 
974
1025
  export { ADAPTER_UNFULFILLED_ERROR, REFRESH_ADAPTER_EVENT, bindWireRefresh, createGraphQLImperativeAdapter, createGraphQLWireAdapterConstructor, createImperativeAdapter, createInfiniteScrollingWireAdapterConstructor, createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, instrument, refresh };
975
- // version: 1.367.0-def0c51200
1026
+ // version: 1.369.0-b61b56bd49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-bindings",
3
- "version": "1.367.0",
3
+ "version": "1.369.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS Bindings for SFDC",
6
6
  "main": "dist/ldsBindings.js",
@@ -31,7 +31,7 @@
31
31
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-bindings"
32
32
  },
33
33
  "dependencies": {
34
- "@salesforce/lds-graphql-parser": "^1.367.0"
34
+ "@salesforce/lds-graphql-parser": "^1.369.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@lwc/engine-core": "2.42.0"