eco-vue-js 0.10.87 → 0.10.88

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.
Files changed (23) hide show
  1. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +3 -6
  2. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  3. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts +8 -12
  4. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts.map +1 -1
  5. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +35 -20
  6. package/dist/components/InfiniteList/components/{InfiniteListWrapper.vue.d.ts → InfiniteListHeaderHeight.vue.d.ts} +9 -9
  7. package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue.d.ts.map +1 -0
  8. package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue.js +42 -0
  9. package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue2.js +5 -0
  10. package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.d.ts +22 -0
  11. package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.d.ts.map +1 -0
  12. package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.js +31 -0
  13. package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue2.js +5 -0
  14. package/dist/components/InfiniteList/types.d.ts +6 -0
  15. package/dist/components/InfiniteList/types.d.ts.map +1 -0
  16. package/dist/components/List/WList.vue.js +2 -2
  17. package/package.json +4 -1
  18. package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.d.ts.map +0 -1
  19. package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.js +0 -38
  20. package/dist/components/InfiniteList/components/InfiniteListWrapper.vue2.js +0 -5
  21. package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +0 -10
  22. package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts.map +0 -1
  23. package/dist/components/InfiniteList/use/useInfiniteListHeader.js +0 -37
@@ -1,3 +1,4 @@
1
+ import { InfiniteListHeaderScope } from './types';
1
2
  import { ApiError } from '../../utils/api';
2
3
  declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
@@ -45,9 +46,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
45
46
  position: number;
46
47
  value: Model;
47
48
  }) => void;
48
- header?: (props: {
49
- updateHeaderHeight: () => void;
50
- } & ((import('vue').ShallowUnwrapRef<{
49
+ header?: (props: InfiniteListHeaderScope & ((import('vue').ShallowUnwrapRef<{
51
50
  resetPage: (page?: number) => Promise<void>;
52
51
  goto: (page?: number, itemIndex?: number) => Promise<void>;
53
52
  isFetching: import('vue').ComputedRef<boolean>;
@@ -111,9 +110,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
111
110
  position: number;
112
111
  value: Model;
113
112
  }) => void;
114
- header?: (props: {
115
- updateHeaderHeight: () => void;
116
- } & ((import('vue').ShallowUnwrapRef<{
113
+ header?: (props: InfiniteListHeaderScope & ((import('vue').ShallowUnwrapRef<{
117
114
  resetPage: (page?: number) => Promise<void>;
118
115
  goto: (page?: number, itemIndex?: number) => Promise<void>;
119
116
  isFetching: import('vue').ComputedRef<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"AAuEA;AA4JA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;yBAWxB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAC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AK,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAsNi7T,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;+FAtNngU,KAAK,IAAI;gBAC7E,MAAM,IAAI;;;YA5Bd,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,cAAc,SAAS,QAAQ,GAAG,IAAI;;EA8NxC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA9QzE,wBA8Q4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,30 +1,26 @@
1
+ import { InfiniteListHeaderScope } from './types';
2
+ import { VNode } from 'vue';
1
3
  type __VLS_Props = {
2
4
  initIsIntersecting?: boolean;
3
5
  noHeaderUpdate?: boolean;
4
6
  };
5
7
  declare function __VLS_template(): {
6
8
  attrs: Partial<{}>;
7
- slots: {
8
- header?(_: {}): any;
9
- header?(_: {
10
- updateHeaderHeight: () => void;
11
- }): any;
12
- default?(_: {}): any;
13
- default?(_: {
14
- headerTop: number;
15
- headerHeight: number;
16
- }): any;
9
+ slots: Readonly<{
10
+ header: (props: InfiniteListHeaderScope) => VNode[];
11
+ default: (props: InfiniteListHeaderScope) => VNode[];
12
+ }> & {
13
+ header: (props: InfiniteListHeaderScope) => VNode[];
14
+ default: (props: InfiniteListHeaderScope) => VNode[];
17
15
  };
18
16
  refs: {
19
17
  indicator: HTMLDivElement;
20
- header: HTMLDivElement;
21
18
  };
22
19
  rootEl: any;
23
20
  };
24
21
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
22
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
23
  indicator: HTMLDivElement;
27
- header: HTMLDivElement;
28
24
  }, any>;
29
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
26
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteListWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/WInfiniteListWrapper.vue"],"names":[],"mappings":"AAkCA;AAoGA,KAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAC;AAwCF,iBAAS,cAAc;WAyET,OAAO,IAA6B;;wBAftB,GAAG;;;YAEH,GAAG;yBADF,GAAG;;;;YAEH,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WInfiniteListWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/WInfiniteListWrapper.vue"],"names":[],"mappings":"AA6CA;AA4GA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAA;AAEpD,OAAO,EAAC,KAAK,KAAK,EAA0D,MAAM,KAAK,CAAA;AAYvF,KAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAC;AA6CF,iBAAS,cAAc;WAwFT,OAAO,IAA6B;;gBA9FxC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;iBAC1C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;;gBAD5C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;iBAC1C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;;;;;;EAkGrD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,8 @@
1
- import { defineComponent, inject, ref, useTemplateRef, onMounted, onBeforeUnmount, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, unref, renderSlot, normalizeStyle, withCtx, normalizeProps, guardReactiveProps } from 'vue';
1
+ import { defineComponent, inject, ref, useTemplateRef, onMounted, onBeforeUnmount, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, normalizeStyle, normalizeClass, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import { wIsModal } from '../Modal/models/injection.js';
3
3
  import { isClientSide, BASE_ZINDEX_DROPDOWN, BASE_ZINDEX_LIST_HEADER } from '../../utils/utils.js';
4
- import _sfc_main$1 from './components/InfiniteListWrapper.vue.js';
4
+ import _sfc_main$1 from './components/InfiniteListHeaderHeight.vue.js';
5
+ import _sfc_main$2 from './components/InfiniteListHeaderPadding.vue.js';
5
6
  import { useHeader } from '../HeaderBar/use/useHeader.js';
6
7
 
7
8
  const _hoisted_1 = {
@@ -46,27 +47,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
47
  return (_ctx, _cache) => {
47
48
  return openBlock(), createElementBlock(Fragment, null, [
48
49
  createElementVNode("div", _hoisted_1, null, 512),
49
- unref(isModal) || _ctx.noHeaderUpdate ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
50
- createElementVNode("div", {
51
- ref: "header",
52
- class: "-top--modal-header-height bg-default dark:bg-default-dark sticky print:hidden",
53
- style: normalizeStyle({ zIndex: isIntersecting.value ? unref(BASE_ZINDEX_DROPDOWN) : unref(BASE_ZINDEX_LIST_HEADER) })
54
- }, [
55
- renderSlot(_ctx.$slots, "header")
56
- ], 4),
57
- renderSlot(_ctx.$slots, "default")
58
- ], 64)) : (openBlock(), createBlock(_sfc_main$1, {
59
- key: 1,
60
- "is-intersecting": isIntersecting.value
61
- }, {
62
- header: withCtx((scope) => [
63
- renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(scope)))
64
- ]),
50
+ createVNode(_sfc_main$1, {
51
+ "is-intersecting": isIntersecting.value,
52
+ class: normalizeClass(["sticky print:hidden", {
53
+ "-top--header-height": !unref(isModal) && !_ctx.noHeaderUpdate,
54
+ "-top--modal-header-height bg-default dark:bg-default-dark": unref(isModal) || _ctx.noHeaderUpdate
55
+ }]),
56
+ style: normalizeStyle({ zIndex: isIntersecting.value ? unref(BASE_ZINDEX_DROPDOWN) : unref(BASE_ZINDEX_LIST_HEADER) })
57
+ }, createSlots({
65
58
  default: withCtx((scope) => [
66
59
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))
67
60
  ]),
68
- _: 3
69
- }, 8, ["is-intersecting"]))
61
+ _: 2
62
+ }, [
63
+ unref(isModal) || _ctx.noHeaderUpdate ? {
64
+ name: "header",
65
+ fn: withCtx((scope) => [
66
+ renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(scope)))
67
+ ]),
68
+ key: "0"
69
+ } : {
70
+ name: "header",
71
+ fn: withCtx((scope) => [
72
+ createVNode(_sfc_main$2, {
73
+ "is-intersecting": isIntersecting.value,
74
+ "header-height": unref(headerHeight)
75
+ }, {
76
+ default: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(scope)))
78
+ ]),
79
+ _: 2
80
+ }, 1032, ["is-intersecting", "header-height"])
81
+ ]),
82
+ key: "1"
83
+ }
84
+ ]), 1032, ["is-intersecting", "class", "style"])
70
85
  ], 64);
71
86
  };
72
87
  }
@@ -1,16 +1,16 @@
1
+ import { InfiniteListHeaderScope } from '../types';
2
+ import { VNode } from 'vue';
1
3
  type __VLS_Props = {
2
4
  isIntersecting: boolean;
3
5
  };
4
6
  declare function __VLS_template(): {
5
7
  attrs: Partial<{}>;
6
- slots: {
7
- header?(_: {
8
- updateHeaderHeight: () => void;
9
- }): any;
10
- default?(_: {
11
- headerTop: number;
12
- headerHeight: number;
13
- }): any;
8
+ slots: Readonly<{
9
+ header: (props: InfiniteListHeaderScope) => VNode[];
10
+ default: (props: InfiniteListHeaderScope) => VNode[];
11
+ }> & {
12
+ header: (props: InfiniteListHeaderScope) => VNode[];
13
+ default: (props: InfiniteListHeaderScope) => VNode[];
14
14
  };
15
15
  refs: {
16
16
  header: HTMLDivElement;
@@ -28,4 +28,4 @@ type __VLS_WithTemplateSlots<T, S> = T & {
28
28
  $slots: S;
29
29
  };
30
30
  };
31
- //# sourceMappingURL=InfiniteListWrapper.vue.d.ts.map
31
+ //# sourceMappingURL=InfiniteListHeaderHeight.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfiniteListHeaderHeight.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListHeaderHeight.vue"],"names":[],"mappings":"AAaA;AA8DA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAA;AAErD,OAAO,EAAC,KAAK,KAAK,EAAgD,MAAM,KAAK,CAAA;AAQ7E,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC;AAoCF,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;gBAlCxC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;iBAC1C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;;gBAD5C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;iBAC1C,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,EAAE;;;;;;EAsCrD;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { defineComponent, useTemplateRef, ref, inject, watch, onMounted, createElementBlock, openBlock, Fragment, createElementVNode, renderSlot, mergeProps, normalizeProps, guardReactiveProps } from 'vue';
2
+ import { useHeader } from '../../HeaderBar/use/useHeader.js';
3
+ import { wModalHeaderHeight } from '../../Modal/models/injection.js';
4
+ import { isClientSide } from '../../../utils/utils.js';
5
+ import { wScrollingElement } from '../models/injection.js';
6
+
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "InfiniteListHeaderHeight",
9
+ props: {
10
+ isIntersecting: { type: Boolean }
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const headerRef = useTemplateRef("header");
15
+ const headerHeight = ref(0);
16
+ const headerTop = ref(0);
17
+ const { headerHeight: headerHeightLayout } = useHeader();
18
+ const modalHeaderHeight = inject(wModalHeaderHeight, void 0);
19
+ const scrollingElement = inject(wScrollingElement, null);
20
+ const updateHeader = () => {
21
+ if (!headerRef.value) return;
22
+ const rect = headerRef.value.getBoundingClientRect();
23
+ headerHeight.value = rect.height;
24
+ headerTop.value = rect.top + (scrollingElement?.value?.scrollTop ?? document.scrollingElement?.scrollTop ?? 0) - (modalHeaderHeight ?? headerHeightLayout.value);
25
+ };
26
+ watch(() => props.isIntersecting, updateHeader);
27
+ onMounted(() => {
28
+ if (!isClientSide) return;
29
+ updateHeader();
30
+ });
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock(Fragment, null, [
33
+ createElementVNode("div", mergeProps({ ref: "header" }, _ctx.$attrs), [
34
+ renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({ headerTop: headerTop.value, headerHeight: headerHeight.value, updateHeader })))
35
+ ], 16),
36
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ headerTop: headerTop.value, headerHeight: headerHeight.value, updateHeader })))
37
+ ], 64);
38
+ };
39
+ }
40
+ });
41
+
42
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './InfiniteListHeaderHeight.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ isIntersecting: boolean;
3
+ headerHeight: number;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: any;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
22
+ //# sourceMappingURL=InfiniteListHeaderPadding.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfiniteListHeaderPadding.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListHeaderPadding.vue"],"names":[],"mappings":"AAGA;AAqCA,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAC;AAsBF,iBAAS,cAAc;WAoBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { defineComponent, watch, onUnmounted, renderSlot } from 'vue';
2
+ import { useHeader } from '../../HeaderBar/use/useHeader.js';
3
+
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "InfiniteListHeaderPadding",
6
+ props: {
7
+ isIntersecting: { type: Boolean },
8
+ headerHeight: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const { updateHeaderPadding } = useHeader();
13
+ const updateHeaderHeight = () => {
14
+ if (!props.isIntersecting && props.headerHeight) {
15
+ updateHeaderPadding(props.headerHeight);
16
+ } else {
17
+ updateHeaderPadding(0);
18
+ }
19
+ };
20
+ watch(() => props.isIntersecting, updateHeaderHeight);
21
+ watch(() => props.headerHeight, updateHeaderHeight);
22
+ onUnmounted(() => {
23
+ updateHeaderPadding(0);
24
+ });
25
+ return (_ctx, _cache) => {
26
+ return renderSlot(_ctx.$slots, "default");
27
+ };
28
+ }
29
+ });
30
+
31
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './InfiniteListHeaderPadding.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,6 @@
1
+ export type InfiniteListHeaderScope = {
2
+ headerTop: number;
3
+ headerHeight: number;
4
+ updateHeader: () => void;
5
+ };
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA"}
@@ -164,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
164
  "onUpdate:count": _cache[4] || (_cache[4] = ($event) => listCount.value = $event),
165
165
  "onUpdate:error": _cache[5] || (_cache[5] = ($event) => _ctx.$emit("update:error", $event))
166
166
  }, createSlots({
167
- header: withCtx(({ updateHeaderHeight, isRefetchingAll, refetchAll }) => [
167
+ header: withCtx(({ updateHeader, isRefetchingAll, refetchAll }) => [
168
168
  renderSlot(_ctx.$slots, "header", { count: listCount.value }),
169
169
  createVNode(_sfc_main$4, {
170
170
  title: _ctx.selectionTitle,
@@ -267,7 +267,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
267
267
  count: _ctx.count ?? listCount.value,
268
268
  selection: unref(selectAllValue),
269
269
  "onToggle:selection": _cache[3] || (_cache[3] = ($event) => $event ? unref(selectAll)() : unref(resetSelection)()),
270
- "onUpdate:header": updateHeaderHeight
270
+ "onUpdate:header": updateHeader
271
271
  }, {
272
272
  default: withCtx(() => [
273
273
  createVNode(_sfc_main$9, {
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.10.87",
7
+ "version": "0.10.88",
8
8
  "dependencies": {
9
9
  "@stylistic/eslint-plugin": "5.2.2",
10
10
  "@tanstack/eslint-plugin-query": "5.81.2",
@@ -290,6 +290,9 @@
290
290
  "./dist/components/InfiniteList/WInfiniteListWrapper.vue": {
291
291
  "import": "./dist/components/InfiniteList/WInfiniteListWrapper.vue.js"
292
292
  },
293
+ "./dist/components/InfiniteList/types": {
294
+ "import": "./dist/components/InfiniteList/types.d.ts"
295
+ },
293
296
  "./dist/components/InfoCard/WInfoCard.vue": {
294
297
  "import": "./dist/components/InfoCard/WInfoCard.vue.js"
295
298
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"InfiniteListWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListWrapper.vue"],"names":[],"mappings":"AAcA;AAkDA,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAC;AAqBF,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;;;YAZtB,GAAG;;;;YACF,GAAG;;;;;;EAgB/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,38 +0,0 @@
1
- import { defineComponent, toRef, watch, onMounted, onUnmounted, createElementBlock, openBlock, Fragment, createElementVNode, renderSlot, normalizeStyle, unref, normalizeProps, guardReactiveProps } from 'vue';
2
- import { isClientSide, BASE_ZINDEX_DROPDOWN, BASE_ZINDEX_LIST_HEADER } from '../../../utils/utils.js';
3
- import { useInfiniteListHeader } from '../use/useInfiniteListHeader.js';
4
-
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "InfiniteListWrapper",
7
- props: {
8
- isIntersecting: { type: Boolean }
9
- },
10
- setup(__props) {
11
- const props = __props;
12
- const isIntersectingRef = toRef(props, "isIntersecting");
13
- const { header, headerTop, headerHeight, updateHeader, updateHeaderHeight, updateHeaderPadding } = useInfiniteListHeader(isIntersectingRef);
14
- watch(isIntersectingRef, updateHeaderHeight);
15
- onMounted(() => {
16
- if (!isClientSide) return;
17
- updateHeader();
18
- });
19
- onUnmounted(() => {
20
- updateHeaderPadding(0);
21
- });
22
- return (_ctx, _cache) => {
23
- return openBlock(), createElementBlock(Fragment, null, [
24
- createElementVNode("div", {
25
- ref_key: "header",
26
- ref: header,
27
- class: "-top--header-height sticky print:hidden",
28
- style: normalizeStyle({ zIndex: _ctx.isIntersecting ? unref(BASE_ZINDEX_DROPDOWN) : unref(BASE_ZINDEX_LIST_HEADER) })
29
- }, [
30
- renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({ updateHeaderHeight: unref(updateHeaderHeight) })))
31
- ], 4),
32
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ headerTop: unref(headerTop), headerHeight: unref(headerHeight) })))
33
- ], 64);
34
- };
35
- }
36
- });
37
-
38
- export { _sfc_main as default };
@@ -1,5 +0,0 @@
1
- import _sfc_main from './InfiniteListWrapper.vue.js';
2
-
3
-
4
-
5
- export { _sfc_main as default };
@@ -1,10 +0,0 @@
1
- import { Ref } from 'vue';
2
- export declare const useInfiniteListHeader: (isIntersecting: Ref<boolean>) => {
3
- header: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
4
- headerHeight: Ref<number, number>;
5
- headerTop: Ref<number, number>;
6
- updateHeader: () => void;
7
- updateHeaderPadding: (value: number) => void;
8
- updateHeaderHeight: () => void;
9
- };
10
- //# sourceMappingURL=useInfiniteListHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInfiniteListHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/use/useInfiniteListHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAc,MAAM,KAAK,CAAA;AAOzC,eAAO,MAAM,qBAAqB,GAAI,gBAAgB,GAAG,CAAC,OAAO,CAAC;;;;;;;CAqCjE,CAAA"}
@@ -1,37 +0,0 @@
1
- import { ref, inject } from 'vue';
2
- import { useHeader } from '../../HeaderBar/use/useHeader.js';
3
- import { wModalHeaderHeight } from '../../Modal/models/injection.js';
4
- import { wScrollingElement } from '../models/injection.js';
5
-
6
- const useInfiniteListHeader = (isIntersecting) => {
7
- const header = ref();
8
- const headerHeight = ref(0);
9
- const headerTop = ref(0);
10
- const { updateHeaderPadding, headerHeight: headerElementHeight } = useHeader();
11
- const modalHeaderHeight = inject(wModalHeaderHeight, void 0);
12
- const scrollingElement = inject(wScrollingElement, null);
13
- const updateHeader = () => {
14
- if (!header.value) return;
15
- const rect = header.value.getBoundingClientRect();
16
- headerHeight.value = rect.height;
17
- headerTop.value = rect.top + (scrollingElement?.value?.scrollTop ?? document.scrollingElement?.scrollTop ?? 0) - (modalHeaderHeight ?? headerElementHeight.value);
18
- };
19
- const updateHeaderHeight = () => {
20
- if (!isIntersecting.value && headerHeight.value) {
21
- updateHeader();
22
- updateHeaderPadding(headerHeight.value);
23
- } else {
24
- updateHeaderPadding(0);
25
- }
26
- };
27
- return {
28
- header,
29
- headerHeight,
30
- headerTop,
31
- updateHeader,
32
- updateHeaderPadding,
33
- updateHeaderHeight
34
- };
35
- };
36
-
37
- export { useInfiniteListHeader };