eco-vue-js 0.3.83 → 0.3.84

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
18
18
  allowPageSelection?: boolean | undefined;
19
19
  minHeight?: boolean | undefined;
20
20
  pageClass?: string | undefined;
21
+ refetchInterval?: number | false | undefined;
21
22
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
22
23
  skipScrollTarget?: boolean | undefined;
23
24
  pageLength?: number | undefined;
@@ -84,6 +85,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
84
85
  allowPageSelection?: boolean | undefined;
85
86
  minHeight?: boolean | undefined;
86
87
  pageClass?: string | undefined;
88
+ refetchInterval?: number | false | undefined;
87
89
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
88
90
  skipScrollTarget?: boolean | undefined;
89
91
  pageLength?: number | undefined;
@@ -154,6 +156,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
154
156
  allowPageSelection?: boolean | undefined;
155
157
  minHeight?: boolean | undefined;
156
158
  pageClass?: string | undefined;
159
+ refetchInterval?: number | false | undefined;
157
160
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
158
161
  skipScrollTarget?: boolean | undefined;
159
162
  pageLength?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"AA2DA;;;;;iBAqQiB,WAAW;;;;;;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;WA6BvC,GAAG;;;;oDA9LkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;;oDATL,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IA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,CAAC,KAAK,IAAI;;;;oDATL,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;YAvD3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,uBAAuB,SAAS,MAAM,GAAG,IAAI;YAC7C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;;;;;;;yBA8M/B,WAAW;;;;;;;mCADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;aA6ByB,IAAI;eACpE,GAAG;;;;wDAhMkC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;8BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;;wDATL,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;8BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;gBAvD3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;gBAC/C,uBAAuB,SAAS,MAAM,GAAG,IAAI;gBAC7C,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;AAnDhD,wBAmS2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -27,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  reverseSelection: { type: Boolean },
28
28
  allowPageSelection: { type: Boolean },
29
29
  pageClass: { default: void 0 },
30
- maxPages: { default: void 0 }
30
+ maxPages: { default: void 0 },
31
+ refetchInterval: { type: [Number, Boolean], default: void 0 }
31
32
  },
32
33
  emits: ["update:page", "update:header-padding", "update:count", "update:selected"],
33
34
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -98,6 +99,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
99
  "allow-page-selection": _ctx.allowPageSelection,
99
100
  "page-class": _ctx.pageClass,
100
101
  "max-pages": _ctx.maxPages,
102
+ "refetch-interval": _ctx.refetchInterval,
101
103
  "onUpdate:count": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:count", $event)),
102
104
  "onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selected", $event)),
103
105
  "onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event))
@@ -116,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
118
  })
117
119
  ]),
118
120
  _: 3
119
- }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages"])
121
+ }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages", "refetch-interval"])
120
122
  ], 64);
121
123
  };
122
124
  }
@@ -18,6 +18,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
18
18
  allowPageSelection?: boolean | undefined;
19
19
  minHeight?: boolean | undefined;
20
20
  pageClass?: string | undefined;
21
+ refetchInterval?: number | false | undefined;
21
22
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
22
23
  skipScrollTarget?: boolean | undefined;
23
24
  pageLength?: number | undefined;
@@ -80,6 +81,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
80
81
  allowPageSelection?: boolean | undefined;
81
82
  minHeight?: boolean | undefined;
82
83
  pageClass?: string | undefined;
84
+ refetchInterval?: number | false | undefined;
83
85
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
84
86
  skipScrollTarget?: boolean | undefined;
85
87
  pageLength?: number | undefined;
@@ -146,6 +148,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
146
148
  allowPageSelection?: boolean | undefined;
147
149
  minHeight?: boolean | undefined;
148
150
  pageClass?: string | undefined;
151
+ refetchInterval?: number | false | undefined;
149
152
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
150
153
  skipScrollTarget?: boolean | undefined;
151
154
  pageLength?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AAyEA;;;;;iBAubiB,WAAW;;;;;;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;WA6BvC,GAAG;;;;oDApRkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;;oDARgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;YA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;OAsZuB,IAAI;;;;;qBA3B1D,WAAW;;;;;;;+BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;SA4ByB,IAAI;WACpE,GAAG;;;;oDApRkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;;oDARgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;YA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;;;;;;;yBA2X/B,WAAW;;;;;;;mCADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;aA4ByB,IAAI;eACpE,GAAG;;;;wDApRkC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;;;;wDARgC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;;;gBA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;gBAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;AAjDhD,wBA6c2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AA2EA;;;;;iBA0biB,WAAW;;;;;;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;WA8BvC,GAAG;;;;oDAtRkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;;oDARgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;c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*/ defineComponent({
31
31
  reverseSelection: { type: Boolean },
32
32
  allowPageSelection: { type: Boolean },
33
33
  pageClass: { default: void 0 },
34
- maxPages: { default: 5 }
34
+ maxPages: { default: 5 },
35
+ refetchInterval: { type: [Number, Boolean], default: void 0 }
35
36
  },
36
37
  emits: ["update:page", "update:count", "update:selected"],
37
38
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -177,6 +178,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
177
178
  "allow-page-selection": _ctx.allowPageSelection,
178
179
  "min-height": _ctx.minHeight,
179
180
  "page-class": _ctx.pageClass,
181
+ "refetch-interval": _ctx.refetchInterval,
182
+ "scrolling-element": _ctx.scrollingElement,
180
183
  class: normalizeClass({
181
184
  "last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight
182
185
  }),
@@ -214,7 +217,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
214
217
  })
215
218
  ]),
216
219
  _: 2
217
- }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "class", "onRefetch"]);
220
+ }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "refetch-interval", "scrolling-element", "class", "onRefetch"]);
218
221
  }), 128)),
219
222
  count.value !== 0 && nextPage.value ? (openBlock(), createBlock(_sfc_main$2, {
220
223
  key: 1,
@@ -1,6 +1,7 @@
1
1
  declare const _default: <Data extends DefaultData>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
3
  wrap?: boolean | undefined;
4
+ scrollingElement?: Element | null | undefined;
4
5
  queryParams: QueryParams;
5
6
  "onUpdate:selected"?: ((values: number[]) => any) | undefined;
6
7
  selected?: number[] | undefined;
@@ -28,6 +29,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
28
29
  allowPageSelection?: boolean | undefined;
29
30
  minHeight?: boolean | undefined;
30
31
  pageClass?: string | undefined;
32
+ refetchInterval?: number | false | undefined;
31
33
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
32
34
  attrs: any;
33
35
  slots: Readonly<{
@@ -73,6 +75,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
73
75
  props: {
74
76
  transition?: boolean | undefined;
75
77
  wrap?: boolean | undefined;
78
+ scrollingElement?: Element | null | undefined;
76
79
  queryParams: QueryParams;
77
80
  "onUpdate:selected"?: ((values: number[]) => any) | undefined;
78
81
  selected?: number[] | undefined;
@@ -100,6 +103,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
100
103
  allowPageSelection?: boolean | undefined;
101
104
  minHeight?: boolean | undefined;
102
105
  pageClass?: string | undefined;
106
+ refetchInterval?: number | false | undefined;
103
107
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
104
108
  expose(exposed: import("vue").ShallowUnwrapRef<{
105
109
  getFirst: () => Data | undefined;
@@ -149,6 +153,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
149
153
  props: {
150
154
  transition?: boolean | undefined;
151
155
  wrap?: boolean | undefined;
156
+ scrollingElement?: Element | null | undefined;
152
157
  queryParams: QueryParams;
153
158
  "onUpdate:selected"?: ((values: number[]) => any) | undefined;
154
159
  selected?: number[] | undefined;
@@ -176,6 +181,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
176
181
  allowPageSelection?: boolean | undefined;
177
182
  minHeight?: boolean | undefined;
178
183
  pageClass?: string | undefined;
184
+ refetchInterval?: number | false | undefined;
179
185
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
180
186
  expose(exposed: import("vue").ShallowUnwrapRef<{
181
187
  getFirst: () => Data | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAsHA;;;;iBAibiB,WAAW;;;;;;;;;;;;;;;2BAED,OAAO,KAAK,OAAO;oBAC1B,MAAM;eACX,OAAO;cACR,OAAO;;;;;;;;;;WAqBd,GAAG;;;;oDAhSkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;;oDAPgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YArIN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAClD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;YAC1C,SAAS,GAAG,IAAI;;;;;;OAoZiD,IAAI;;;;qBAzB1D,WAAW;;;;;;;;;;;;;;;+BAED,OAAO,KAAK,OAAO;wBAC1B,MAAM;mBACX,OAAO;kBACR,OAAO;;;;;;;;;;;;;;SAoBkD,IAAI;WACpE,GAAG;;;;oDAhSkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;;oDAPgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YArIN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,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IAAI,GAAG,IAAI;YAClD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;YAC1C,SAAS,GAAG,IAAI;;;;;;;;;;yBA8ZL,WAAW;;;;;;;;;;;;;;;mCAED,OAAO,KAAK,OAAO;4BAC1B,MAAM;uBACX,OAAO;sBACR,OAAO;;;;;;;;;;;;;;;aAsBkD,IAAI;eACpE,GAAG;;;;wDApSkC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;;wDAPgC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;gBAtKN,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAClD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;gBAC1C,SAAS,GAAG,IAAI;;;;AAnDtB,wBAkf2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRef, computed, watch, onMounted, nextTick, openBlock, createElementBlock, unref, Fragment, createElementVNode, normalizeClass, createBlock, createCommentVNode, TransitionGroup, withCtx, renderList, renderSlot, toDisplayString } from 'vue';
1
+ import { defineComponent, ref, toRef, computed, watch, onMounted, nextTick, onBeforeUnmount, openBlock, createElementBlock, unref, Fragment, createElementVNode, normalizeClass, createBlock, createCommentVNode, TransitionGroup, withCtx, renderList, renderSlot, toDisplayString } from 'vue';
2
2
  import _sfc_main$2 from './InfiniteListPageTitle.vue.js';
3
3
  import _sfc_main$1 from './InfiniteListPageSelection.vue.js';
4
4
 
@@ -25,14 +25,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  reverseSelection: { type: Boolean },
26
26
  allowPageSelection: { type: Boolean },
27
27
  minHeight: { type: Boolean },
28
- pageClass: { default: void 0 }
28
+ pageClass: { default: void 0 },
29
+ refetchInterval: { type: [Number, Boolean], default: void 0 },
30
+ scrollingElement: { default: void 0 }
29
31
  },
30
32
  emits: ["update:count", "update:pagesCount", "update:nextPage", "update:previousPage", "update:scroll", "error:invalidPage", "refetch", "update-from-header:scroll", "update:selected", "fetched"],
31
33
  setup(__props, { expose: __expose, emit: __emit }) {
32
34
  const props = __props;
33
35
  const emit = __emit;
34
36
  const element = ref();
35
- const { data, error, setData, refetch, isFetching } = props.useQueryFn(toRef(props, "queryParams"));
37
+ const isIntersecting = ref(false);
38
+ const { data, error, setData, refetch, isFetching } = props.useQueryFn(
39
+ toRef(props, "queryParams"),
40
+ {
41
+ refetchInterval: props.refetchInterval ? computed(() => isIntersecting.value ? props.refetchInterval : void 0) : void 0
42
+ }
43
+ );
36
44
  const count = computed(() => data.value?.count);
37
45
  const pagesCount = computed(() => data.value?.pages_count);
38
46
  const nextPage = computed(() => data.value?.next);
@@ -96,7 +104,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
104
  emit("fetched");
97
105
  });
98
106
  let height = 0;
107
+ let intersectionObserver;
108
+ const observerCb = (entries) => {
109
+ isIntersecting.value = entries.some((entry) => {
110
+ if (entry.target === element.value) {
111
+ return entry.isIntersecting;
112
+ }
113
+ });
114
+ };
99
115
  onMounted(() => {
116
+ if (props.refetchInterval && element.value) {
117
+ intersectionObserver = new IntersectionObserver(
118
+ observerCb,
119
+ {
120
+ root: props.scrollingElement ?? null,
121
+ rootMargin: "0px",
122
+ threshold: 0
123
+ }
124
+ );
125
+ intersectionObserver.observe(element.value);
126
+ }
100
127
  height = element.value?.getBoundingClientRect()?.height ?? 0;
101
128
  if (height === 0)
102
129
  return;
@@ -109,6 +136,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
136
  }
110
137
  emit("update:scroll", height);
111
138
  });
139
+ onBeforeUnmount(() => {
140
+ intersectionObserver?.disconnect();
141
+ intersectionObserver = void 0;
142
+ });
112
143
  watch(data, async (_, oldValue) => {
113
144
  if (oldValue)
114
145
  return;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.3.83",
7
+ "version": "0.3.84",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",