@luvio/lwc-luvio 0.156.3 → 0.156.4-dev2

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/lwcluvio.js CHANGED
@@ -403,6 +403,18 @@ class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
403
403
  },
404
404
  };
405
405
  }
406
+ subscribe(snapshot) {
407
+ var _a;
408
+ super.subscribe(snapshot);
409
+ // if the snapshot is refreshed we should stop using data from before the refresh
410
+ if (this.connected && ((_a = snapshot.refresh) === null || _a === void 0 ? void 0 : _a.resolve)) {
411
+ const originalResolve = snapshot.refresh.resolve;
412
+ snapshot.refresh.resolve = (config) => {
413
+ this.connectTimestamp = Date.now();
414
+ return originalResolve(config);
415
+ };
416
+ }
417
+ }
406
418
  }
407
419
  function createInfiniteScrollingWireAdapterConstructor(adapter, name, luvio) {
408
420
  const constructor = function (callback, sourceContext) {
@@ -1,4 +1,4 @@
1
- import type { Adapter, AdapterRequestContext, Luvio } from '@luvio/engine';
1
+ import type { Adapter, AdapterRequestContext, Luvio, Snapshot } from '@luvio/engine';
2
2
  import type { WireConfigValue, WireContextValue, WireAdapterConstructor } from '@lwc/engine-core';
3
3
  import { LWCLuvioWireAdapter } from './LWCLuvioWireAdapter';
4
4
  export declare class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
@@ -19,5 +19,6 @@ export declare class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAda
19
19
  */
20
20
  update(config: WireConfigValue, context?: WireContextValue): void;
21
21
  protected generateAdapterRequestContext(context?: WireContextValue): AdapterRequestContext;
22
+ protected subscribe(snapshot: Snapshot<unknown>): void;
22
23
  }
23
24
  export declare function createInfiniteScrollingWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio): WireAdapterConstructor;
@@ -1,4 +1,4 @@
1
- import type { Adapter, AdapterRequestContext, Luvio, Unsubscribe } from '@luvio/engine';
1
+ import type { Adapter, AdapterRequestContext, Luvio, Snapshot, Unsubscribe } from '@luvio/engine';
2
2
  import type { WireConfigValue, WireContextValue, DataCallback, WireAdapter, WireAdapterConstructor } from '@lwc/engine-core';
3
3
  import type { EmittableSnapshot } from './utils/SnapshotState';
4
4
  export type SourceContext = {
@@ -56,7 +56,7 @@ export declare class LWCLuvioWireAdapter implements WireAdapter {
56
56
  * @param snapshot Snapshot
57
57
  * @param subscriptionCallback callback
58
58
  */
59
- private subscribe;
59
+ protected subscribe(snapshot: Snapshot<unknown>): void;
60
60
  /**
61
61
  * Deletes this wire adapter's snapshot subscription (if any).
62
62
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/lwc-luvio",
3
- "version": "0.156.3",
3
+ "version": "0.156.4-dev2",
4
4
  "description": "Lightning Web Component bindings for Luvio",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,12 +29,12 @@
29
29
  "watch": "yarn build --watch"
30
30
  },
31
31
  "dependencies": {
32
- "@luvio/engine": "^0.156.3",
32
+ "@luvio/engine": "0.156.4-dev2",
33
33
  "@lwc/engine-core": "3.1.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@luvio/adapter-test-library": "^0.156.3",
37
- "@luvio/cli": "^0.156.3",
36
+ "@luvio/adapter-test-library": "0.156.4-dev2",
37
+ "@luvio/cli": "0.156.4-dev2",
38
38
  "@lwc/jest-preset": "11.7.1",
39
39
  "jest-environment-jsdom": "^29.5.0"
40
40
  },
@@ -47,7 +47,7 @@
47
47
  "maxSize": {
48
48
  "none": "21 kB",
49
49
  "min": "7.5 kB",
50
- "compressed": "4 kB"
50
+ "compressed": "4.1 kB"
51
51
  }
52
52
  }
53
53
  ],