@salesforce/lds-bindings 1.363.0 → 1.365.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.
- package/dist/ldsBindings.js +22 -5
- package/dist/types/wireAdapter.d.ts +1 -1
- package/package.json +5 -2
package/dist/ldsBindings.js
CHANGED
|
@@ -373,6 +373,10 @@ function createWireAdapterConstructor$1(adapter, name, luvio) {
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
376
|
+
constructor(adapter, name, luvio, callback, sourceContext, paginationConfigParamNames) {
|
|
377
|
+
super(adapter, name, luvio, callback, sourceContext);
|
|
378
|
+
this.paginationConfigParamNames = paginationConfigParamNames;
|
|
379
|
+
}
|
|
376
380
|
/**
|
|
377
381
|
* Called when the component associated with the wire adapter is connected.
|
|
378
382
|
*/
|
|
@@ -395,6 +399,19 @@ class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
|
395
399
|
*/
|
|
396
400
|
update(config, context) {
|
|
397
401
|
if (this.connectTimestamp) {
|
|
402
|
+
// compare the incoming config with the current config.
|
|
403
|
+
// if any non-pagination config params have changed, we need to reset the connectTimestamp
|
|
404
|
+
const currentConfig = this.config;
|
|
405
|
+
// Check if any non-pagination parameters have changed
|
|
406
|
+
const hasNonPaginationParamChanged = Object.keys(config).some((paramName) => {
|
|
407
|
+
var _a;
|
|
408
|
+
// If this is not a pagination param and its value has changed
|
|
409
|
+
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]));
|
|
411
|
+
});
|
|
412
|
+
if (hasNonPaginationParamChanged) {
|
|
413
|
+
this.connectTimestamp = Date.now();
|
|
414
|
+
}
|
|
398
415
|
const adapterRequestContext = this.generateAdapterRequestContext(context);
|
|
399
416
|
super.unsubscribe();
|
|
400
417
|
this.config = sanitize(config);
|
|
@@ -430,9 +447,9 @@ class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
|
430
447
|
}
|
|
431
448
|
}
|
|
432
449
|
}
|
|
433
|
-
function createInfiniteScrollingWireAdapterConstructor$1(adapter, name, luvio) {
|
|
450
|
+
function createInfiniteScrollingWireAdapterConstructor$1(adapter, name, luvio, paginationConfigParamNames) {
|
|
434
451
|
const constructor = function (callback, sourceContext) {
|
|
435
|
-
const delegate = new LWCInfinteScrollingLuvioWireAdapter(adapter, name, luvio, callback, sourceContext);
|
|
452
|
+
const delegate = new LWCInfinteScrollingLuvioWireAdapter(adapter, name, luvio, callback, sourceContext, paginationConfigParamNames);
|
|
436
453
|
this.connect = () => delegate.connect();
|
|
437
454
|
this.disconnect = () => delegate.disconnect();
|
|
438
455
|
this.update = (config, context) => delegate.update(config, context);
|
|
@@ -945,9 +962,9 @@ function createWireAdapterConstructor(luvio, adapter, metadata) {
|
|
|
945
962
|
const { apiFamily, name } = metadata;
|
|
946
963
|
return createWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio);
|
|
947
964
|
}
|
|
948
|
-
function createInfiniteScrollingWireAdapterConstructor(luvio, adapter, metadata) {
|
|
965
|
+
function createInfiniteScrollingWireAdapterConstructor(luvio, adapter, metadata, paginationConfigParamNames) {
|
|
949
966
|
const { apiFamily, name } = metadata;
|
|
950
|
-
return createInfiniteScrollingWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio);
|
|
967
|
+
return createInfiniteScrollingWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, paginationConfigParamNames);
|
|
951
968
|
}
|
|
952
969
|
function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolver) {
|
|
953
970
|
const { apiFamily, name } = metadata;
|
|
@@ -955,4 +972,4 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
955
972
|
}
|
|
956
973
|
|
|
957
974
|
export { ADAPTER_UNFULFILLED_ERROR, REFRESH_ADAPTER_EVENT, bindWireRefresh, createGraphQLImperativeAdapter, createGraphQLWireAdapterConstructor, createImperativeAdapter, createInfiniteScrollingWireAdapterConstructor, createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, instrument, refresh };
|
|
958
|
-
// version: 1.
|
|
975
|
+
// version: 1.365.0-eec7b6223e
|
|
@@ -3,5 +3,5 @@ import type { WireAdapterConstructor } from '@lwc/engine-core';
|
|
|
3
3
|
import type { AdapterMetadata } from './ldsAdapter';
|
|
4
4
|
import type { AstResolver } from '@luvio/graphql-parser';
|
|
5
5
|
export declare function createWireAdapterConstructor<C, D>(luvio: Luvio, adapter: Adapter<C, D>, metadata: AdapterMetadata): WireAdapterConstructor;
|
|
6
|
-
export declare function createInfiniteScrollingWireAdapterConstructor<C, D>(luvio: Luvio, adapter: Adapter<C, D>, metadata: AdapterMetadata): WireAdapterConstructor;
|
|
6
|
+
export declare function createInfiniteScrollingWireAdapterConstructor<C, D>(luvio: Luvio, adapter: Adapter<C, D>, metadata: AdapterMetadata, paginationConfigParamNames?: string[]): WireAdapterConstructor;
|
|
7
7
|
export declare function createGraphQLWireAdapterConstructor<C, D>(luvio: Luvio, adapter: Adapter<C, D>, metadata: AdapterMetadata, astResolver: AstResolver): WireAdapterConstructor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-bindings",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.365.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS Bindings for SFDC",
|
|
6
6
|
"main": "dist/ldsBindings.js",
|
|
@@ -31,9 +31,12 @@
|
|
|
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.
|
|
34
|
+
"@salesforce/lds-graphql-parser": "^1.365.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@lwc/engine-core": "2.42.0"
|
|
38
|
+
},
|
|
39
|
+
"volta": {
|
|
40
|
+
"extends": "../../package.json"
|
|
38
41
|
}
|
|
39
42
|
}
|