eco-vue-js 0.10.87 → 0.10.89
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/assets/icons/default/IconAdd.svg.js +5 -5
- package/dist/assets/icons/default/IconArrow.svg.js +4 -4
- package/dist/assets/icons/default/IconAvatar.svg.js +3 -3
- package/dist/assets/icons/default/IconBack.svg.js +7 -7
- package/dist/assets/icons/default/IconCancel.svg.js +4 -4
- package/dist/assets/icons/default/IconCheck.svg.js +4 -4
- package/dist/assets/icons/default/IconDanger.svg.js +8 -8
- package/dist/assets/icons/default/IconDojo.svg.js +6 -6
- package/dist/assets/icons/default/IconEdit.svg.js +6 -6
- package/dist/assets/icons/default/IconFalsePositive.svg.js +4 -4
- package/dist/assets/icons/default/IconFeedback.svg.js +10 -10
- package/dist/assets/icons/default/IconFilter.svg.js +5 -5
- package/dist/assets/icons/default/IconInProgress.svg.js +6 -6
- package/dist/assets/icons/default/IconJira.svg.js +3 -3
- package/dist/assets/icons/default/IconLogout.svg.js +3 -3
- package/dist/assets/icons/default/IconMore.svg.js +4 -4
- package/dist/assets/icons/default/IconNotification.svg.js +4 -4
- package/dist/assets/icons/default/IconProfile.svg.js +6 -6
- package/dist/assets/icons/default/IconSearch.svg.js +4 -4
- package/dist/assets/icons/default/IconSettings.svg.js +8 -8
- package/dist/assets/icons/default/IconSort.svg.js +4 -4
- package/dist/assets/icons/default/IconStar.svg.js +4 -4
- package/dist/assets/icons/default/IconSuccess.svg.js +6 -6
- package/dist/assets/icons/default/IconTask.svg.js +9 -9
- package/dist/assets/icons/default/IconTime.svg.js +10 -10
- package/dist/assets/icons/default/IconWarn.svg.js +10 -10
- package/dist/assets/icons/sax/IconAdd.svg.js +4 -4
- package/dist/assets/icons/sax/IconAddCircle.svg.js +4 -4
- package/dist/assets/icons/sax/IconAddSquare.svg.js +4 -4
- package/dist/assets/icons/sax/IconAlarm.svg.js +4 -4
- package/dist/assets/icons/sax/IconArchiveBook.svg.js +6 -6
- package/dist/assets/icons/sax/IconCandle.svg.js +4 -4
- package/dist/assets/icons/sax/IconCelery.svg.js +10 -10
- package/dist/assets/icons/sax/IconChart.svg.js +4 -4
- package/dist/assets/icons/sax/IconCheckCircle.svg.js +6 -6
- package/dist/assets/icons/sax/IconClose.svg.js +4 -4
- package/dist/assets/icons/sax/IconCloseCircle.svg.js +4 -4
- package/dist/assets/icons/sax/IconCopy.svg.js +6 -6
- package/dist/assets/icons/sax/IconCopySuccess.svg.js +8 -8
- package/dist/assets/icons/sax/IconCopyright.svg.js +6 -6
- package/dist/assets/icons/sax/IconDedupe.svg.js +8 -8
- package/dist/assets/icons/sax/IconDojo.svg.js +6 -6
- package/dist/assets/icons/sax/IconDrag.svg.js +4 -4
- package/dist/assets/icons/sax/IconEdit.svg.js +4 -4
- package/dist/assets/icons/sax/IconEditCircle.svg.js +8 -8
- package/dist/assets/icons/sax/IconEditSquare.svg.js +8 -8
- package/dist/assets/icons/sax/IconElement.svg.js +4 -4
- package/dist/assets/icons/sax/IconExport.svg.js +4 -4
- package/dist/assets/icons/sax/IconEye.svg.js +6 -6
- package/dist/assets/icons/sax/IconEyeSlash.svg.js +8 -8
- package/dist/assets/icons/sax/IconFilter.svg.js +4 -4
- package/dist/assets/icons/sax/IconFilterRemove.svg.js +8 -8
- package/dist/assets/icons/sax/IconFinding.svg.js +4 -4
- package/dist/assets/icons/sax/IconFolder.svg.js +4 -4
- package/dist/assets/icons/sax/IconFolderAdd.svg.js +6 -6
- package/dist/assets/icons/sax/IconFolderCross.svg.js +6 -6
- package/dist/assets/icons/sax/IconGrid.svg.js +4 -4
- package/dist/assets/icons/sax/IconJira.svg.js +4 -4
- package/dist/assets/icons/sax/IconKey.svg.js +6 -6
- package/dist/assets/icons/sax/IconKeySquare.svg.js +6 -6
- package/dist/assets/icons/sax/IconLayer.svg.js +8 -8
- package/dist/assets/icons/sax/IconLink.svg.js +6 -6
- package/dist/assets/icons/sax/IconLinkBold.svg.js +4 -4
- package/dist/assets/icons/sax/IconLinkOutline.svg.js +6 -6
- package/dist/assets/icons/sax/IconLinkedIn.svg.js +2 -2
- package/dist/assets/icons/sax/IconLock.svg.js +6 -6
- package/dist/assets/icons/sax/IconLockOff.svg.js +6 -6
- package/dist/assets/icons/sax/IconLogout.svg.js +6 -6
- package/dist/assets/icons/sax/IconMenu.svg.js +4 -4
- package/dist/assets/icons/sax/IconMinusCircle.svg.js +4 -4
- package/dist/assets/icons/sax/IconMoon.svg.js +4 -4
- package/dist/assets/icons/sax/IconNegate.svg.js +6 -6
- package/dist/assets/icons/sax/IconNegativeInfo.svg.js +4 -4
- package/dist/assets/icons/sax/IconNote.svg.js +6 -6
- package/dist/assets/icons/sax/IconPaste.svg.js +8 -8
- package/dist/assets/icons/sax/IconProfile.svg.js +4 -4
- package/dist/assets/icons/sax/IconRadar.svg.js +4 -4
- package/dist/assets/icons/sax/IconRefresh.svg.js +4 -4
- package/dist/assets/icons/sax/IconSearch.svg.js +4 -4
- package/dist/assets/icons/sax/IconSettings.svg.js +6 -6
- package/dist/assets/icons/sax/IconSlash.svg.js +4 -4
- package/dist/assets/icons/sax/IconStar.svg.js +4 -4
- package/dist/assets/icons/sax/IconSummary.svg.js +6 -6
- package/dist/assets/icons/sax/IconSun.svg.js +6 -6
- package/dist/assets/icons/sax/IconTable.svg.js +4 -4
- package/dist/assets/icons/sax/IconTableSettings.svg.js +8 -8
- package/dist/assets/icons/sax/IconTag.svg.js +6 -6
- package/dist/assets/icons/sax/IconTask.svg.js +4 -4
- package/dist/assets/icons/sax/IconTime.svg.js +4 -4
- package/dist/assets/icons/sax/IconTrash.svg.js +4 -4
- package/dist/assets/icons/sax/IconUser.svg.js +4 -4
- package/dist/assets/icons/sax/IconVersionControl.svg.js +4 -4
- package/dist/assets/icons/sax/IconWeight.svg.js +6 -6
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +3 -6
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts +8 -12
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +35 -20
- package/dist/components/InfiniteList/components/{InfiniteListWrapper.vue.d.ts → InfiniteListHeaderHeight.vue.d.ts} +9 -9
- package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue.js +42 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderHeight.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.d.ts +22 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.js +31 -0
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue2.js +5 -0
- package/dist/components/InfiniteList/types.d.ts +6 -0
- package/dist/components/InfiniteList/types.d.ts.map +1 -0
- package/dist/components/List/WList.vue.js +2 -2
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +1 -1
- package/package.json +4 -1
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.d.ts.map +0 -1
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.js +0 -38
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue2.js +0 -5
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +0 -10
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts.map +0 -1
- package/dist/components/InfiniteList/use/useInfiniteListHeader.js +0 -37
@@ -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,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 @@
|
|
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(({
|
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":
|
270
|
+
"onUpdate:header": updateHeader
|
271
271
|
}, {
|
272
272
|
default: withCtx(() => [
|
273
273
|
createVNode(_sfc_main$9, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AAgCA;AAyFA,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAA;yBAM9D,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACzI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;
|
1
|
+
{"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AAgCA;AAyFA,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAA;yBAM9D,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACzI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA2JO,mBAAmB,CAAC;;;;uQAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;iBA7GA,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;iBAA7E,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YA3ClF,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,iBAAiB,SAAS,OAAO,GAAG,IAAI;;EA0J1C,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAtKzE,wBAsK4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
59
|
disabled: _ctx.disabled,
|
60
60
|
readonly: _ctx.readonly,
|
61
61
|
"disable-clear": _ctx.disableClear,
|
62
|
-
skeleton: !unref(data),
|
62
|
+
skeleton: queryEnabled.value && !unref(data),
|
63
63
|
search: void 0,
|
64
64
|
class: normalizeClass({
|
65
65
|
"cursor-pointer": !_ctx.disabled && !_ctx.readonly,
|
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.
|
7
|
+
"version": "0.10.89",
|
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,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 };
|