jb-infinite-scroll 1.2.2 → 1.2.4
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/README.md +4 -2
- package/dist/Types.d.ts +15 -0
- package/dist/jb-infinite-scroll.cjs.js +2 -2
- package/dist/jb-infinite-scroll.cjs.js.br +0 -0
- package/dist/jb-infinite-scroll.cjs.js.gz +0 -0
- package/dist/jb-infinite-scroll.cjs.js.map +1 -1
- package/dist/jb-infinite-scroll.d.ts +25 -0
- package/dist/jb-infinite-scroll.d.ts.map +1 -0
- package/dist/jb-infinite-scroll.js +2 -2
- package/dist/jb-infinite-scroll.js.br +0 -0
- package/dist/jb-infinite-scroll.js.gz +0 -0
- package/dist/jb-infinite-scroll.js.map +1 -1
- package/dist/jb-infinite-scroll.umd.js +2 -2
- package/dist/jb-infinite-scroll.umd.js.br +0 -0
- package/dist/jb-infinite-scroll.umd.js.gz +0 -0
- package/dist/jb-infinite-scroll.umd.js.map +1 -1
- package/dist/lib/Types.d.ts +14 -0
- package/dist/lib/jb-infinite-scroll.d.ts +24 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/web-component/jb-infinite-scroll/lib/Types.d.ts +3 -0
- package/lib/global.d.ts +15 -0
- package/lib/jb-infinite-scroll.ts +4 -4
- package/lib/types.ts +5 -1
- package/package.json +2 -2
- package/react/dist/JBInfiniteScroll.cjs.js +2 -85
- package/react/dist/JBInfiniteScroll.cjs.js.map +1 -1
- package/react/dist/JBInfiniteScroll.d.ts +25 -0
- package/react/dist/JBInfiniteScroll.js +2 -79
- package/react/dist/JBInfiniteScroll.js.map +1 -1
- package/react/dist/JBInfiniteScroll.umd.js +2 -88
- package/react/dist/JBInfiniteScroll.umd.js.map +1 -1
- package/react/dist/attributes-hook.d.ts +10 -0
- package/react/dist/events-hook.d.ts +18 -0
- package/react/dist/lib/JBInfiniteScroll.d.ts +34 -0
- package/react/dist/lib/events-hook.d.ts +18 -0
- package/react/dist/web-component/jb-infinite-scroll/react/lib/JBInfiniteScroll.d.ts +3 -4
- package/react/dist/web-component/jb-infinite-scroll/react/lib/events-hook.d.ts +18 -0
- package/react/lib/JBInfiniteScroll.tsx +16 -74
- package/react/lib/attributes-hook.ts +63 -0
- package/react/lib/events-hook.ts +26 -0
- package/react/package.json +1 -1
- package/react/tsconfig.json +4 -5
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Elements } from './types.js';
|
|
2
|
+
import "jb-loading";
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export declare class JBInfiniteScrollWebComponent extends HTMLElement {
|
|
5
|
+
#private;
|
|
6
|
+
elements: Elements;
|
|
7
|
+
constructor();
|
|
8
|
+
set stateChangeWaitingBehavior(value: string);
|
|
9
|
+
get stateChangeWaitingBehavior(): string;
|
|
10
|
+
get disableCaptureScroll(): boolean;
|
|
11
|
+
set disableCaptureScroll(value: boolean);
|
|
12
|
+
get isListEnded(): boolean;
|
|
13
|
+
set isListEnded(value: boolean);
|
|
14
|
+
get isLoading(): boolean;
|
|
15
|
+
set isLoading(value: boolean);
|
|
16
|
+
get isListEmpty(): boolean;
|
|
17
|
+
set isListEmpty(value: boolean);
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
callOnLoadEvent(): void;
|
|
20
|
+
callOnInitEvent(): void;
|
|
21
|
+
get canCaptureScroll(): boolean;
|
|
22
|
+
static get observedAttributes(): string[];
|
|
23
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,MAAM,QAAQ,GAAG;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,cAAc,CAAC;IACjC,gBAAgB,EAAE,cAAc,CAAC;IACjC,cAAc,EAAE,cAAc,CAAC;CAClC,CAAA;AAED,oBAAY,0BAA0B;IAElC,SAAS,eAAe;IAExB,MAAM,YAAY;CACrB;AACD,MAAM,MAAM,yBAAyB,CAAC,MAAM,IAAI,mBAAmB,CAAC,MAAM,EAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { EventTypeWithTarget } from 'jb-core';
|
|
2
|
+
import type { JBInfiniteScrollWebComponent } from './jb-infinite-scroll';
|
|
1
3
|
export type Elements = {
|
|
2
4
|
loading: HTMLDivElement;
|
|
3
5
|
contentWrapper: HTMLDivElement;
|
|
@@ -9,3 +11,4 @@ export declare enum StateChangeWaitingBehavior {
|
|
|
9
11
|
forceWait = "FORCE_WAIT",
|
|
10
12
|
noWait = "NO_WAIT"
|
|
11
13
|
}
|
|
14
|
+
export type JBInfiniteScrollEventType<TEvent> = EventTypeWithTarget<TEvent, JBInfiniteScrollWebComponent>;
|
package/lib/global.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FileStringModules = {
|
|
2
|
+
readonly default: string;
|
|
3
|
+
}
|
|
4
|
+
declare module '*.scss' {
|
|
5
|
+
const value: FileStringModules;
|
|
6
|
+
export default value;
|
|
7
|
+
}
|
|
8
|
+
declare module '*.html' {
|
|
9
|
+
const value: FileStringModules;
|
|
10
|
+
export default value.default;
|
|
11
|
+
}
|
|
12
|
+
declare module '*.svg' {
|
|
13
|
+
const value: string;
|
|
14
|
+
export default value;
|
|
15
|
+
}
|
|
@@ -80,7 +80,7 @@ export class JBInfiniteScrollWebComponent extends HTMLElement {
|
|
|
80
80
|
} else {
|
|
81
81
|
this.elements?.loading.classList.remove('--show');
|
|
82
82
|
(this.#internals as any).states?.delete("loading");
|
|
83
|
-
this.#
|
|
83
|
+
this.#updateListDisplayState();
|
|
84
84
|
this.#checkScrollHeight();
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -95,10 +95,10 @@ export class JBInfiniteScrollWebComponent extends HTMLElement {
|
|
|
95
95
|
(this.#internals as any).states?.delete("empty");
|
|
96
96
|
}
|
|
97
97
|
this.#setIsWaitingForStatChange(false);
|
|
98
|
-
this.#
|
|
98
|
+
this.#updateListDisplayState();
|
|
99
99
|
|
|
100
100
|
}
|
|
101
|
-
#
|
|
101
|
+
#updateListDisplayState() {
|
|
102
102
|
if (this.#isListEmpty) {
|
|
103
103
|
this.elements?.emptyListWrapper.classList.add('--show');
|
|
104
104
|
this.elements?.contentWrapper.classList.remove('--show');
|
|
@@ -139,7 +139,7 @@ export class JBInfiniteScrollWebComponent extends HTMLElement {
|
|
|
139
139
|
loadingWrapper: shadowRoot.querySelector('.loading-wrapper')!,
|
|
140
140
|
emptyListWrapper: shadowRoot.querySelector('.empty-list-wrapper')!,
|
|
141
141
|
} as const;
|
|
142
|
-
|
|
142
|
+
this.isLoading = this.hasAttribute('is-loading') ? this.getAttribute('is-loading') === 'true' : this.#isLoading;
|
|
143
143
|
}
|
|
144
144
|
#registerEventListener() {
|
|
145
145
|
this.elements.contentWrapper.addEventListener('scroll', this.#onScroll.bind(this), { passive: true });
|
package/lib/types.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type {EventTypeWithTarget} from 'jb-core';
|
|
2
|
+
import type { JBInfiniteScrollWebComponent } from './jb-infinite-scroll';
|
|
3
|
+
|
|
1
4
|
export type Elements = {
|
|
2
5
|
loading: HTMLDivElement,
|
|
3
6
|
contentWrapper: HTMLDivElement,
|
|
@@ -11,4 +14,5 @@ export enum StateChangeWaitingBehavior {
|
|
|
11
14
|
forceWait = "FORCE_WAIT",
|
|
12
15
|
// when user scroll we dont lock its event listener and developer should handle extra scroll by it self (good for pure js solution)
|
|
13
16
|
noWait = "NO_WAIT",
|
|
14
|
-
}
|
|
17
|
+
}
|
|
18
|
+
export type JBInfiniteScrollEventType<TEvent> = EventTypeWithTarget<TEvent,JBInfiniteScrollWebComponent>;
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"infinite scroll",
|
|
13
13
|
"web component"
|
|
14
14
|
],
|
|
15
|
-
"version": "1.2.
|
|
15
|
+
"version": "1.2.4",
|
|
16
16
|
"bugs": "https://github.com/javadbat/jb-infinite-scroll/issues",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"files": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react/dist/"
|
|
25
25
|
],
|
|
26
26
|
"main": "index.js",
|
|
27
|
-
"types": "./dist/
|
|
27
|
+
"types": "./dist/jb-infinite-scroll.d.ts",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
30
|
"url": "git@github.com:javadbat/jb-infinite-scroll.git"
|
|
@@ -1,85 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var jbInfiniteScroll = require('jb-infinite-scroll');
|
|
5
|
-
|
|
6
|
-
function useBindEvent(ref, event, handler, passive = false) {
|
|
7
|
-
React.useEffect(() => {
|
|
8
|
-
const dom = ref.current;
|
|
9
|
-
if (dom) {
|
|
10
|
-
// initiate the event handler
|
|
11
|
-
dom.addEventListener(event, handler, passive);
|
|
12
|
-
}
|
|
13
|
-
// this will clean up the event every time the component is re-rendered
|
|
14
|
-
return function cleanup() {
|
|
15
|
-
if (dom) {
|
|
16
|
-
dom.removeEventListener(event, handler, passive);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}, [ref, event, handler, passive]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const JBInfiniteScroll = React.forwardRef((props, ref) => {
|
|
23
|
-
const element = React.useRef(null);
|
|
24
|
-
React.useImperativeHandle(ref, () => (element ? element.current : null), [element]);
|
|
25
|
-
const onScrollEnd = React.useCallback((e) => {
|
|
26
|
-
if (typeof props.onScrollEnd == "function") {
|
|
27
|
-
props.onScrollEnd(e);
|
|
28
|
-
}
|
|
29
|
-
}, [props.onScrollEnd]);
|
|
30
|
-
useBindEvent(element, 'scrollEnd', onScrollEnd, true);
|
|
31
|
-
React.useEffect(() => {
|
|
32
|
-
if (element.current && typeof props.isLoading == "boolean") {
|
|
33
|
-
if (props.isLoading) {
|
|
34
|
-
element.current.setAttribute('is-loading', 'true');
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
element.current.setAttribute('is-loading', 'false');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, [element.current, props.isLoading]);
|
|
41
|
-
React.useEffect(() => {
|
|
42
|
-
if (element.current, typeof props.isListEmpty == "boolean") {
|
|
43
|
-
if (props.isListEmpty) {
|
|
44
|
-
element.current.setAttribute('is-list-empty', 'true');
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
element.current.setAttribute('is-list-empty', 'false');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}, [element.current, props.isListEmpty]);
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
if (element.current && typeof props.isListEnded == "boolean") {
|
|
53
|
-
if (props.isListEnded) {
|
|
54
|
-
element.current?.setAttribute('is-list-ended', 'true');
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
element.current?.setAttribute('is-list-ended', 'false');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}, [element.current, props.isListEnded]);
|
|
61
|
-
React.useEffect(() => {
|
|
62
|
-
if (element.current && typeof props.disableCaptureScroll == "boolean") {
|
|
63
|
-
if (props.disableCaptureScroll) {
|
|
64
|
-
element.current?.setAttribute('disable-capture-scroll', 'true');
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
element.current?.setAttribute('disable-capture-scroll', 'false');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, [element.current, props.disableCaptureScroll]);
|
|
71
|
-
React.useEffect(() => {
|
|
72
|
-
if (props.stateChangeWaitingBehavior && element.current) {
|
|
73
|
-
element.current?.setAttribute('state-change-waiting-behavior', props.stateChangeWaitingBehavior);
|
|
74
|
-
}
|
|
75
|
-
}, [element.current, props.stateChangeWaitingBehavior]);
|
|
76
|
-
return (React.createElement("jb-infinite-scroll", { class: props.className, ref: element }, props.children));
|
|
77
|
-
});
|
|
78
|
-
JBInfiniteScroll.displayName = "JBInfiniteScroll";
|
|
79
|
-
|
|
80
|
-
Object.defineProperty(exports, "StateChangeWaitingBehavior", {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () { return jbInfiniteScroll.StateChangeWaitingBehavior; }
|
|
83
|
-
});
|
|
84
|
-
exports.JBInfiniteScroll = JBInfiniteScroll;
|
|
85
|
-
//# sourceMappingURL=JBInfiniteScroll.cjs.js.map
|
|
1
|
+
"use strict";var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,n=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,a=(e,n,a,l)=>{if(n&&"object"==typeof n||"function"==typeof n)for(var u,o=i(n),c=0,f=o.length;c<f;c++)u=o[c],s.call(e,u)||u===a||t(e,u,{get:(e=>n[e]).bind(null,u),enumerable:!(l=r(n,u))||l.enumerable});return e},l=(r,i,s)=>(s=null!=r?e(n(r)):{},a(!i&&r&&r.__esModule?s:t(s,"default",{value:r,enumerable:!0}),r));const u=l(require("react")),o=l(require("jb-infinite-scroll")),c=l(require("jb-core/react")),f=u.default.forwardRef((e,t)=>{let r=(0,u.useRef)(null);return(0,u.useImperativeHandle)(t,()=>r?r.current:void 0,[r]),(0,u.useEffect)(()=>{r.current&&"boolean"==typeof e.isLoading&&(e.isLoading?r.current.setAttribute("is-loading","true"):r.current.setAttribute("is-loading","false"))},[r.current,e.isLoading]),(0,u.useEffect)(()=>{r.current,"boolean"==typeof e.isListEmpty&&(e.isListEmpty?r.current.setAttribute("is-list-empty","true"):r.current.setAttribute("is-list-empty","false"))},[r.current,e.isListEmpty]),(0,u.useEffect)(()=>{r.current&&"boolean"==typeof e.isListEnded&&(e.isListEnded?r.current?.setAttribute("is-list-ended","true"):r.current?.setAttribute("is-list-ended","false"))},[r.current,e.isListEnded]),(0,u.useEffect)(()=>{r.current&&"boolean"==typeof e.disableCaptureScroll&&(e.disableCaptureScroll?r.current?.setAttribute("disable-capture-scroll","true"):r.current?.setAttribute("disable-capture-scroll","false"))},[r.current,e.disableCaptureScroll]),(0,u.useEffect)(()=>{e.stateChangeWaitingBehavior&&r.current&&r.current?.setAttribute("state-change-waiting-behavior",e.stateChangeWaitingBehavior)},[r.current,e.stateChangeWaitingBehavior]),(0,c.useEvent)(r,"load",e.onLoad,!0),(0,c.useEvent)(r,"init",e.onInit,!0),(0,c.useEvent)(r,"scroll",e.onScroll),(0,c.useEvent)(r,"scrollEnd",e.onScrollEnd,!0),u.default.createElement("jb-infinite-scroll",{style:e.style,class:e.className,ref:r},e.children)});f.displayName="JBInfiniteScroll",exports.JBInfiniteScroll=f,exports.StateChangeWaitingBehavior=o.StateChangeWaitingBehavior;
|
|
2
|
+
//# sourceMappingURL=JBInfiniteScroll.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JBInfiniteScroll.cjs.js","sources":["
|
|
1
|
+
{"version":3,"file":"JBInfiniteScroll.cjs.js","names":[],"sources":["../lib/attributes-hook.ts","../lib/events-hook.ts","../lib/JBInfiniteScroll.tsx"],"sourcesContent":["","",""],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,SAAU,6BAA6B,SAAkD,OAAiC;AAC5H,sBAAU,MAAG;AACb,MAAI,QAAQ,kBAAkB,MAAM,aAAa,UAC/C,KAAI,MAAM,UACR,SAAQ,QAAQ,aAAa,cAAc,OAAO;eAC7C,QAAA,aAAA,cAAA,QAAA;KAKP,QAAQ,SAEZ,MAAU;sBAEN,MAAI;cACF,gBAAgB,MAAA,eAAa,UAC/B,KAAA,MAAA,qBAAO,QAAA,aAAA,iBAAA,OAAA;MAGP,SAAA,QAAA,aAAA,iBAAA,QAAA;CAKJ,GAAA,CACE,QAAI,eACF;sBAEA,MAAA;cAAO,kBAAA,MAAA,eAAA,eACL,MAAA,YACF,SAAA,SAAA,aAAA,iBAAA,OAAA;MAGQ,SAAO,SAAQ,aAAa,iBAAA,QAAA;aAKlC,eACF;4BACE;MACF,QAAA,kBAAA,MAAA,wBAAA,UACF,KAAA,MAAA,qBAEU,SAAO,SAAQ,aAAA,0BAAsB,OAAA;MAG3C,SAAM,SAAA,aAA0B,0BAAqB,QAAA;CAG1D,GAAE,CACL,QAAA;;;;;;;;AC1CM,SAAU,UAAU,SAAkD,OAAiB;AAC3F,6BAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,6BAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,6BAAS,SAAS,UAAU,MAAM,SAAS;AAC3C,6BAAS,SAAS,aAAa,MAAM,aAAa,KAAK;AACzD;;;;ACLA,MAAM,iCAAyB,cAAY,WAAqE,CAAE,OAAA,QAAA;CAChH,MAAM,UAAU,kBAAqC,KAAK;AAC1D,gCACE,KACA,MAAG,UAAW,QAAG,UAAe,WAAG,CAIrC,OACA,EAAA;AAEA,8BACE,SAAA,MAAA;AAEF,WAAA,SAAA,MAAA;AASF,sBAAiB,cAAc,cAAA,sBAAkB;EAE1C,OAAE,MAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "jb-infinite-scroll";
|
|
3
|
+
import { JBInfiniteScrollAttributes } from './attributes-hook.js';
|
|
4
|
+
import { JBInfiniteScrollWebComponent, StateChangeWaitingBehavior } from "jb-infinite-scroll";
|
|
5
|
+
import { EventProps } from './events-hook.js';
|
|
6
|
+
declare global {
|
|
7
|
+
namespace JSX {
|
|
8
|
+
interface IntrinsicElements {
|
|
9
|
+
'jb-infinite-scroll': JBInfiniteScrollType;
|
|
10
|
+
}
|
|
11
|
+
interface JBInfiniteScrollType extends React.DetailedHTMLProps<React.HTMLAttributes<JBInfiniteScrollWebComponent>, JBInfiniteScrollWebComponent> {
|
|
12
|
+
"class"?: string;
|
|
13
|
+
"type"?: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare const JBInfiniteScroll: React.ForwardRefExoticComponent<JBInfiniteScrollAttributes & EventProps & JBInfiniteScrollProps & {
|
|
18
|
+
children?: React.ReactNode | undefined;
|
|
19
|
+
} & React.RefAttributes<JBInfiniteScrollWebComponent>>;
|
|
20
|
+
type JBInfiniteScrollProps = {
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
};
|
|
24
|
+
export type Props = JBInfiniteScrollAttributes & EventProps & React.PropsWithChildren<JBInfiniteScrollProps>;
|
|
25
|
+
export { JBInfiniteScroll, StateChangeWaitingBehavior };
|
|
@@ -1,79 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function useBindEvent(ref, event, handler, passive = false) {
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
const dom = ref.current;
|
|
7
|
-
if (dom) {
|
|
8
|
-
// initiate the event handler
|
|
9
|
-
dom.addEventListener(event, handler, passive);
|
|
10
|
-
}
|
|
11
|
-
// this will clean up the event every time the component is re-rendered
|
|
12
|
-
return function cleanup() {
|
|
13
|
-
if (dom) {
|
|
14
|
-
dom.removeEventListener(event, handler, passive);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}, [ref, event, handler, passive]);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const JBInfiniteScroll = React.forwardRef((props, ref) => {
|
|
21
|
-
const element = useRef(null);
|
|
22
|
-
useImperativeHandle(ref, () => (element ? element.current : null), [element]);
|
|
23
|
-
const onScrollEnd = useCallback((e) => {
|
|
24
|
-
if (typeof props.onScrollEnd == "function") {
|
|
25
|
-
props.onScrollEnd(e);
|
|
26
|
-
}
|
|
27
|
-
}, [props.onScrollEnd]);
|
|
28
|
-
useBindEvent(element, 'scrollEnd', onScrollEnd, true);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (element.current && typeof props.isLoading == "boolean") {
|
|
31
|
-
if (props.isLoading) {
|
|
32
|
-
element.current.setAttribute('is-loading', 'true');
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
element.current.setAttribute('is-loading', 'false');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}, [element.current, props.isLoading]);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (element.current, typeof props.isListEmpty == "boolean") {
|
|
41
|
-
if (props.isListEmpty) {
|
|
42
|
-
element.current.setAttribute('is-list-empty', 'true');
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
element.current.setAttribute('is-list-empty', 'false');
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, [element.current, props.isListEmpty]);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (element.current && typeof props.isListEnded == "boolean") {
|
|
51
|
-
if (props.isListEnded) {
|
|
52
|
-
element.current?.setAttribute('is-list-ended', 'true');
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
element.current?.setAttribute('is-list-ended', 'false');
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}, [element.current, props.isListEnded]);
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
if (element.current && typeof props.disableCaptureScroll == "boolean") {
|
|
61
|
-
if (props.disableCaptureScroll) {
|
|
62
|
-
element.current?.setAttribute('disable-capture-scroll', 'true');
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
element.current?.setAttribute('disable-capture-scroll', 'false');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}, [element.current, props.disableCaptureScroll]);
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
if (props.stateChangeWaitingBehavior && element.current) {
|
|
71
|
-
element.current?.setAttribute('state-change-waiting-behavior', props.stateChangeWaitingBehavior);
|
|
72
|
-
}
|
|
73
|
-
}, [element.current, props.stateChangeWaitingBehavior]);
|
|
74
|
-
return (React.createElement("jb-infinite-scroll", { class: props.className, ref: element }, props.children));
|
|
75
|
-
});
|
|
76
|
-
JBInfiniteScroll.displayName = "JBInfiniteScroll";
|
|
77
|
-
|
|
78
|
-
export { JBInfiniteScroll };
|
|
79
|
-
//# sourceMappingURL=JBInfiniteScroll.js.map
|
|
1
|
+
import t,{useEffect as e,useImperativeHandle as r,useRef as i}from"react";import{StateChangeWaitingBehavior as n}from"jb-infinite-scroll";import{useEvent as s}from"jb-core/react";let l=t.forwardRef((n,l)=>{let a=i(null);return r(l,()=>a?a.current:void 0,[a]),e(()=>{a.current&&"boolean"==typeof n.isLoading&&(n.isLoading?a.current.setAttribute("is-loading","true"):a.current.setAttribute("is-loading","false"))},[a.current,n.isLoading]),e(()=>{a.current,"boolean"==typeof n.isListEmpty&&(n.isListEmpty?a.current.setAttribute("is-list-empty","true"):a.current.setAttribute("is-list-empty","false"))},[a.current,n.isListEmpty]),e(()=>{a.current&&"boolean"==typeof n.isListEnded&&(n.isListEnded?a.current?.setAttribute("is-list-ended","true"):a.current?.setAttribute("is-list-ended","false"))},[a.current,n.isListEnded]),e(()=>{a.current&&"boolean"==typeof n.disableCaptureScroll&&(n.disableCaptureScroll?a.current?.setAttribute("disable-capture-scroll","true"):a.current?.setAttribute("disable-capture-scroll","false"))},[a.current,n.disableCaptureScroll]),e(()=>{n.stateChangeWaitingBehavior&&a.current&&a.current?.setAttribute("state-change-waiting-behavior",n.stateChangeWaitingBehavior)},[a.current,n.stateChangeWaitingBehavior]),s(a,"load",n.onLoad,!0),s(a,"init",n.onInit,!0),s(a,"scroll",n.onScroll),s(a,"scrollEnd",n.onScrollEnd,!0),t.createElement("jb-infinite-scroll",{style:n.style,class:n.className,ref:a},n.children)});l.displayName="JBInfiniteScroll";export{l as JBInfiniteScroll,n as StateChangeWaitingBehavior};
|
|
2
|
+
//# sourceMappingURL=JBInfiniteScroll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JBInfiniteScroll.js","sources":["
|
|
1
|
+
{"version":3,"file":"JBInfiniteScroll.js","names":[],"sources":["../lib/attributes-hook.ts","../lib/events-hook.ts","../lib/JBInfiniteScroll.tsx"],"sourcesContent":["","",""],"mappings":";;;;;AAWM,SAAU,6BAA6B,SAAkD,OAAiC;AAC5H,WAAU,MAAG;AACb,MAAI,QAAQ,kBAAkB,MAAM,aAAa,UAC/C,KAAI,MAAM,UACR,SAAQ,QAAQ,aAAa,cAAc,OAAO;eAC7C,QAAA,aAAA,cAAA,QAAA;KAKP,QAAQ,SAEZ,MAAU;WAEN,MAAI;cACF,gBAAgB,MAAA,eAAa,UAC/B,KAAA,MAAA,qBAAO,QAAA,aAAA,iBAAA,OAAA;MAGP,SAAA,QAAA,aAAA,iBAAA,QAAA;CAKJ,GAAA,CACE,QAAI,eACF;WAEA,MAAA;cAAO,kBAAA,MAAA,eAAA,eACL,MAAA,YACF,SAAA,SAAA,aAAA,iBAAA,OAAA;MAGQ,SAAO,SAAQ,aAAa,iBAAA,QAAA;aAKlC,eACF;iBACE;MACF,QAAA,kBAAA,MAAA,wBAAA,UACF,KAAA,MAAA,qBAEU,SAAO,SAAQ,aAAA,0BAAsB,OAAA;MAG3C,SAAM,SAAA,aAA0B,0BAAqB,QAAA;CAG1D,GAAE,CACL,QAAA;;;;;;;;AC1CM,SAAU,UAAU,SAAkD,OAAiB;AAC3F,UAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,UAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,UAAS,SAAS,UAAU,MAAM,SAAS;AAC3C,UAAS,SAAS,aAAa,MAAM,aAAa,KAAK;AACzD;;;;ACLA,MAAM,iCAAyB,MAAY,WAAqE,CAAE,OAAA,QAAA;CAChH,MAAM,UAAU,OAAqC,KAAK;AAC1D,qBACE,KACA,MAAG,UAAW,QAAG,UAAe,WAAG,CAIrC,OACA,EAAA;AAEA,8BACE,SAAA,MAAA;AAEF,WAAA,SAAA,MAAA;AASF,sBAAiB,MAAc,cAAA,sBAAkB;EAE1C,OAAE,MAAA"}
|
|
@@ -1,88 +1,2 @@
|
|
|
1
|
-
(function (
|
|
2
|
-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'jb-infinite-scroll'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JBInfiniteScroll = {}, global.React, global.JBInfiniteScroll));
|
|
5
|
-
})(this, (function (exports, React, jbInfiniteScroll) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function useBindEvent(ref, event, handler, passive = false) {
|
|
8
|
-
React.useEffect(() => {
|
|
9
|
-
const dom = ref.current;
|
|
10
|
-
if (dom) {
|
|
11
|
-
// initiate the event handler
|
|
12
|
-
dom.addEventListener(event, handler, passive);
|
|
13
|
-
}
|
|
14
|
-
// this will clean up the event every time the component is re-rendered
|
|
15
|
-
return function cleanup() {
|
|
16
|
-
if (dom) {
|
|
17
|
-
dom.removeEventListener(event, handler, passive);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}, [ref, event, handler, passive]);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const JBInfiniteScroll = React.forwardRef((props, ref) => {
|
|
24
|
-
const element = React.useRef(null);
|
|
25
|
-
React.useImperativeHandle(ref, () => (element ? element.current : null), [element]);
|
|
26
|
-
const onScrollEnd = React.useCallback((e) => {
|
|
27
|
-
if (typeof props.onScrollEnd == "function") {
|
|
28
|
-
props.onScrollEnd(e);
|
|
29
|
-
}
|
|
30
|
-
}, [props.onScrollEnd]);
|
|
31
|
-
useBindEvent(element, 'scrollEnd', onScrollEnd, true);
|
|
32
|
-
React.useEffect(() => {
|
|
33
|
-
if (element.current && typeof props.isLoading == "boolean") {
|
|
34
|
-
if (props.isLoading) {
|
|
35
|
-
element.current.setAttribute('is-loading', 'true');
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
element.current.setAttribute('is-loading', 'false');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, [element.current, props.isLoading]);
|
|
42
|
-
React.useEffect(() => {
|
|
43
|
-
if (element.current, typeof props.isListEmpty == "boolean") {
|
|
44
|
-
if (props.isListEmpty) {
|
|
45
|
-
element.current.setAttribute('is-list-empty', 'true');
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
element.current.setAttribute('is-list-empty', 'false');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, [element.current, props.isListEmpty]);
|
|
52
|
-
React.useEffect(() => {
|
|
53
|
-
if (element.current && typeof props.isListEnded == "boolean") {
|
|
54
|
-
if (props.isListEnded) {
|
|
55
|
-
element.current?.setAttribute('is-list-ended', 'true');
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
element.current?.setAttribute('is-list-ended', 'false');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, [element.current, props.isListEnded]);
|
|
62
|
-
React.useEffect(() => {
|
|
63
|
-
if (element.current && typeof props.disableCaptureScroll == "boolean") {
|
|
64
|
-
if (props.disableCaptureScroll) {
|
|
65
|
-
element.current?.setAttribute('disable-capture-scroll', 'true');
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
element.current?.setAttribute('disable-capture-scroll', 'false');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}, [element.current, props.disableCaptureScroll]);
|
|
72
|
-
React.useEffect(() => {
|
|
73
|
-
if (props.stateChangeWaitingBehavior && element.current) {
|
|
74
|
-
element.current?.setAttribute('state-change-waiting-behavior', props.stateChangeWaitingBehavior);
|
|
75
|
-
}
|
|
76
|
-
}, [element.current, props.stateChangeWaitingBehavior]);
|
|
77
|
-
return (React.createElement("jb-infinite-scroll", { class: props.className, ref: element }, props.children));
|
|
78
|
-
});
|
|
79
|
-
JBInfiniteScroll.displayName = "JBInfiniteScroll";
|
|
80
|
-
|
|
81
|
-
Object.defineProperty(exports, "StateChangeWaitingBehavior", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: function () { return jbInfiniteScroll.StateChangeWaitingBehavior; }
|
|
84
|
-
});
|
|
85
|
-
exports.JBInfiniteScroll = JBInfiniteScroll;
|
|
86
|
-
|
|
87
|
-
}));
|
|
88
|
-
//# sourceMappingURL=JBInfiniteScroll.umd.js.map
|
|
1
|
+
var e,t;e=this,t=function(e,t,r,i){"use strict";var n=Object.create,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=a(t),u=0,f=o.length;u<f;u++)n=o[u],c.call(e,n)||n===r||l(e,n,{get:(e=>t[e]).bind(null,n),enumerable:!(i=s(t,n))||i.enumerable});return e},f=(e,t,r)=>(r=null!=e?n(o(e)):{},u(!t&&e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e));t=f(t),r=f(r),i=f(i);let d=t.default.forwardRef((e,r)=>{let n=(0,t.useRef)(null);return(0,t.useImperativeHandle)(r,()=>n?n.current:void 0,[n]),(0,t.useEffect)(()=>{n.current&&"boolean"==typeof e.isLoading&&(e.isLoading?n.current.setAttribute("is-loading","true"):n.current.setAttribute("is-loading","false"))},[n.current,e.isLoading]),(0,t.useEffect)(()=>{n.current,"boolean"==typeof e.isListEmpty&&(e.isListEmpty?n.current.setAttribute("is-list-empty","true"):n.current.setAttribute("is-list-empty","false"))},[n.current,e.isListEmpty]),(0,t.useEffect)(()=>{n.current&&"boolean"==typeof e.isListEnded&&(e.isListEnded?n.current?.setAttribute("is-list-ended","true"):n.current?.setAttribute("is-list-ended","false"))},[n.current,e.isListEnded]),(0,t.useEffect)(()=>{n.current&&"boolean"==typeof e.disableCaptureScroll&&(e.disableCaptureScroll?n.current?.setAttribute("disable-capture-scroll","true"):n.current?.setAttribute("disable-capture-scroll","false"))},[n.current,e.disableCaptureScroll]),(0,t.useEffect)(()=>{e.stateChangeWaitingBehavior&&n.current&&n.current?.setAttribute("state-change-waiting-behavior",e.stateChangeWaitingBehavior)},[n.current,e.stateChangeWaitingBehavior]),(0,i.useEvent)(n,"load",e.onLoad,!0),(0,i.useEvent)(n,"init",e.onInit,!0),(0,i.useEvent)(n,"scroll",e.onScroll),(0,i.useEvent)(n,"scrollEnd",e.onScrollEnd,!0),t.default.createElement("jb-infinite-scroll",{style:e.style,class:e.className,ref:n},e.children)});d.displayName="JBInfiniteScroll",e.JBInfiniteScroll=d,e.StateChangeWaitingBehavior=r.StateChangeWaitingBehavior},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("jb-infinite-scroll"),require("jb-core/react")):"function"==typeof define&&define.amd?define(["exports","react","jb-infinite-scroll","jb-core/react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JBInfiniteScrollReact={},e.React,e.JBInfiniteScroll,e.JBCoreReact);
|
|
2
|
+
//# sourceMappingURL=JBInfiniteScroll.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JBInfiniteScroll.umd.js","sources":["
|
|
1
|
+
{"version":3,"file":"JBInfiniteScroll.umd.js","names":[],"sources":["../lib/attributes-hook.ts","../lib/events-hook.ts","../lib/JBInfiniteScroll.tsx"],"sourcesContent":["","",""],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,SAAU,6BAA6B,SAAkD,OAAiC;AAC5H,sBAAU,MAAG;AACb,MAAI,QAAQ,kBAAkB,MAAM,aAAa,UAC/C,KAAI,MAAM,UACR,SAAQ,QAAQ,aAAa,cAAc,OAAO;eAC7C,QAAA,aAAA,cAAA,QAAA;KAKP,QAAQ,SAEZ,MAAU;sBAEN,MAAI;cACF,gBAAgB,MAAA,eAAa,UAC/B,KAAA,MAAA,qBAAO,QAAA,aAAA,iBAAA,OAAA;MAGP,SAAA,QAAA,aAAA,iBAAA,QAAA;CAKJ,GAAA,CACE,QAAI,eACF;sBAEA,MAAA;cAAO,kBAAA,MAAA,eAAA,eACL,MAAA,YACF,SAAA,SAAA,aAAA,iBAAA,OAAA;MAGQ,SAAO,SAAQ,aAAa,iBAAA,QAAA;aAKlC,eACF;4BACE;MACF,QAAA,kBAAA,MAAA,wBAAA,UACF,KAAA,MAAA,qBAEU,SAAO,SAAQ,aAAA,0BAAsB,OAAA;MAG3C,SAAM,SAAA,aAA0B,0BAAqB,QAAA;CAG1D,GAAE,CACL,QAAA;;;;;;;;AC1CM,SAAU,UAAU,SAAkD,OAAiB;AAC3F,6BAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,6BAAS,SAAS,QAAQ,MAAM,QAAQ,KAAK;AAC7C,6BAAS,SAAS,UAAU,MAAM,SAAS;AAC3C,6BAAS,SAAS,aAAa,MAAM,aAAa,KAAK;AACzD;;;;ACLA,MAAM,iCAAyB,cAAY,WAAqE,CAAE,OAAA,QAAA;CAChH,MAAM,UAAU,kBAAqC,KAAK;AAC1D,gCACE,KACA,MAAG,UAAW,QAAG,UAAe,WAAG,CAIrC,OACA,EAAA;AAEA,8BACE,SAAA,MAAA;AAEF,WAAA,SAAA,MAAA;AASF,sBAAiB,cAAc,cAAA,sBAAkB;EAE1C,OAAE,MAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JBInfiniteScrollWebComponent, type StateChangeWaitingBehavior } from "jb-infinite-scroll";
|
|
2
|
+
import { RefObject } from "react";
|
|
3
|
+
export type JBInfiniteScrollAttributes = {
|
|
4
|
+
stateChangeWaitingBehavior?: StateChangeWaitingBehavior;
|
|
5
|
+
disableCaptureScroll?: boolean;
|
|
6
|
+
isListEmpty?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
isListEnded?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function useJBInfiniteScrollAttribute(element: RefObject<JBInfiniteScrollWebComponent>, props: JBInfiniteScrollAttributes): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import type { JBInfiniteScrollEventType, JBInfiniteScrollWebComponent } from 'jb-infinite-scroll';
|
|
3
|
+
export type EventProps = {
|
|
4
|
+
/**
|
|
5
|
+
* when component loaded, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount
|
|
6
|
+
*/
|
|
7
|
+
onLoad?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
8
|
+
/**
|
|
9
|
+
* when all property set and ready to use, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount
|
|
10
|
+
*/
|
|
11
|
+
onInit?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
12
|
+
/**
|
|
13
|
+
* on user scroll to the end
|
|
14
|
+
*/
|
|
15
|
+
onScrollEnd?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
16
|
+
onScroll?: (e: JBInfiniteScrollEventType<Event>) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function useEvents(element: RefObject<JBInfiniteScrollWebComponent>, props: EventProps): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "jb-infinite-scroll";
|
|
3
|
+
import { JBInfiniteScrollWebComponent, StateChangeWaitingBehavior } from "jb-infinite-scroll";
|
|
4
|
+
import { EventProps } from './events-hook.js';
|
|
5
|
+
declare global {
|
|
6
|
+
namespace JSX {
|
|
7
|
+
interface IntrinsicElements {
|
|
8
|
+
'jb-infinite-scroll': JBInfiniteScrollType;
|
|
9
|
+
}
|
|
10
|
+
interface JBInfiniteScrollType extends React.DetailedHTMLProps<React.HTMLAttributes<JBInfiniteScrollWebComponent>, JBInfiniteScrollWebComponent> {
|
|
11
|
+
"class"?: string;
|
|
12
|
+
"type"?: string;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
declare const JBInfiniteScroll: React.ForwardRefExoticComponent<EventProps & {
|
|
17
|
+
stateChangeWaitingBehavior?: StateChangeWaitingBehavior;
|
|
18
|
+
disableCaptureScroll?: boolean;
|
|
19
|
+
isListEmpty?: boolean;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
isListEnded?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
} & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<JBInfiniteScrollWebComponent>>;
|
|
26
|
+
export type Props = EventProps & React.PropsWithChildren<{
|
|
27
|
+
stateChangeWaitingBehavior?: StateChangeWaitingBehavior;
|
|
28
|
+
disableCaptureScroll?: boolean;
|
|
29
|
+
isListEmpty?: boolean;
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
isListEnded?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}>;
|
|
34
|
+
export { JBInfiniteScroll, StateChangeWaitingBehavior };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import type { JBInfiniteScrollEventType, JBInfiniteScrollWebComponent } from 'jb-infinite-scroll';
|
|
3
|
+
export type EventProps = {
|
|
4
|
+
/**
|
|
5
|
+
* when component loaded, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount
|
|
6
|
+
*/
|
|
7
|
+
onLoad?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
8
|
+
/**
|
|
9
|
+
* when all property set and ready to use, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount
|
|
10
|
+
*/
|
|
11
|
+
onInit?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
12
|
+
/**
|
|
13
|
+
* on user scroll to the end
|
|
14
|
+
*/
|
|
15
|
+
onScrollEnd?: (e: JBInfiniteScrollEventType<CustomEvent>) => void;
|
|
16
|
+
onScroll?: (e: JBInfiniteScrollEventType<Event>) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function useEvents(element: RefObject<JBInfiniteScrollWebComponent>, props: EventProps): void;
|