eco-vue-js 0.10.73 → 0.10.74
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/components/Button/WButtonSelection.vue.js +1 -1
- package/dist/components/Button/WButtonSelectionAction.vue.js +3 -3
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts +2 -0
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +55 -26
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.d.ts +31 -0
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue.js +38 -0
- package/dist/components/InfiniteList/components/InfiniteListWrapper.vue2.js +5 -0
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +6 -6
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts.map +1 -1
- package/dist/components/InfiniteList/use/useInfiniteListHeader.js +3 -30
- package/dist/components/List/WListCard.vue.js +1 -1
- package/dist/components/List/WListCardField.vue.js +1 -1
- package/package.json +1 -1
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
49
49
|
]),
|
50
50
|
content: withCtx(() => [
|
51
51
|
createVNode(_sfc_main$2, {
|
52
|
-
class: "bg-default dark:bg-default-dark my-2 grid grid-cols-1 overflow-hidden rounded-xl shadow-md dark:outline dark:outline-1 dark:outline-gray-800",
|
52
|
+
class: "bg-default dark:bg-default-dark dropdown my-2 grid grid-cols-1 overflow-hidden rounded-xl shadow-md dark:outline dark:outline-1 dark:outline-gray-800",
|
53
53
|
onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = false)
|
54
54
|
}, {
|
55
55
|
default: withCtx(() => [
|
@@ -5,7 +5,7 @@ import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
|
|
5
5
|
const _hoisted_1 = ["disabled"];
|
6
6
|
const _hoisted_2 = {
|
7
7
|
key: 0,
|
8
|
-
class: "sm-not:hidden whitespace-nowrap font-normal"
|
8
|
+
class: "sm-not:hidden sm-not:[.dropdown_&]:block whitespace-nowrap font-normal"
|
9
9
|
};
|
10
10
|
const _hoisted_3 = { class: "whitespace-nowrap" };
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
23
|
return (_ctx, _cache) => {
|
24
24
|
return openBlock(), createElementBlock("button", {
|
25
25
|
disabled: _ctx.disabled || _ctx.disableMessage !== void 0,
|
26
|
-
class: normalizeClass(["disabled:text-description relative isolate flex select-none items-center
|
26
|
+
class: normalizeClass(["disabled:text-description relative isolate flex select-none items-center bg-none no-underline outline-none disabled:cursor-not-allowed", {
|
27
27
|
"w-ripple w-ripple-hover before:text-primary dark:before:text-primary-dark hover:text-primary dark:hover:text-primary-dark cursor-pointer": !_ctx.disabled && !_ctx.disableMessage && !_ctx.loading,
|
28
28
|
"text-primary dark:text-primary-dark": _ctx.active,
|
29
29
|
"text-accent": !_ctx.active,
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
33
|
onClick: _cache[0] || (_cache[0] = ($event) => !_ctx.disabled && !_ctx.disableMessage && !_ctx.loading && _ctx.$emit("click"))
|
34
34
|
}, [
|
35
35
|
createElementVNode("div", {
|
36
|
-
class: normalizeClass(["-h--w-input-height sm-not:-px--inner-margin z-10 flex items-center
|
36
|
+
class: normalizeClass(["-h--w-input-height sm-not:-px--inner-margin z-10 flex items-center gap-2 px-[--w-list-padding,1rem]", {
|
37
37
|
"opacity-0": _ctx.loading
|
38
38
|
}])
|
39
39
|
}, [
|
@@ -4,9 +4,11 @@ type __VLS_Props = {
|
|
4
4
|
declare function __VLS_template(): {
|
5
5
|
attrs: Partial<{}>;
|
6
6
|
slots: {
|
7
|
+
header?(_: {}): any;
|
7
8
|
header?(_: {
|
8
9
|
updateHeaderHeight: () => void;
|
9
10
|
}): any;
|
11
|
+
default?(_: {}): any;
|
10
12
|
default?(_: {
|
11
13
|
headerTop: number;
|
12
14
|
headerHeight: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInfiniteListWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/WInfiniteListWrapper.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInfiniteListWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/WInfiniteListWrapper.vue"],"names":[],"mappings":"AAkCA;AAmGA,KAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,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,9 +1,15 @@
|
|
1
|
-
import { defineComponent, inject,
|
1
|
+
import { defineComponent, inject, ref, useTemplateRef, onMounted, onBeforeUnmount, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, unref, renderSlot, normalizeStyle, withCtx, normalizeProps, guardReactiveProps } from 'vue';
|
2
2
|
import { wIsModal } from '../Modal/models/injection.js';
|
3
|
-
import { BASE_ZINDEX_DROPDOWN, BASE_ZINDEX_LIST_HEADER } from '../../utils/utils.js';
|
4
|
-
import
|
3
|
+
import { isClientSide, BASE_ZINDEX_DROPDOWN, BASE_ZINDEX_LIST_HEADER } from '../../utils/utils.js';
|
4
|
+
import _sfc_main$1 from './components/InfiniteListWrapper.vue.js';
|
5
|
+
import { useHeader } from '../HeaderBar/use/useHeader.js';
|
5
6
|
|
7
|
+
const _hoisted_1 = {
|
8
|
+
ref: "indicator",
|
9
|
+
class: "print:hidden"
|
10
|
+
};
|
6
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...{ inheritAttrs: false },
|
7
13
|
__name: "WInfiniteListWrapper",
|
8
14
|
props: {
|
9
15
|
initIsIntersecting: { type: Boolean }
|
@@ -11,32 +17,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
17
|
setup(__props) {
|
12
18
|
const props = __props;
|
13
19
|
const isModal = inject(wIsModal, false);
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
const isIntersecting = ref(props.initIsIntersecting);
|
21
|
+
const indicatorRef = useTemplateRef("indicator");
|
22
|
+
const observerCb = (entries) => {
|
23
|
+
isIntersecting.value = entries.some((entry) => {
|
24
|
+
if (entry.target === indicatorRef.value) {
|
25
|
+
return entry.isIntersecting || entry.boundingClientRect.top > window.innerHeight;
|
26
|
+
}
|
19
27
|
});
|
20
|
-
}
|
28
|
+
};
|
29
|
+
let observer = null;
|
30
|
+
const { headerHeight } = useHeader();
|
31
|
+
onMounted(() => {
|
32
|
+
if (!isClientSide) return;
|
33
|
+
if (indicatorRef.value) {
|
34
|
+
observer = new IntersectionObserver(observerCb, {
|
35
|
+
root: null,
|
36
|
+
rootMargin: `-${headerHeight.value}px 100% 0px 0px`,
|
37
|
+
threshold: 1
|
38
|
+
});
|
39
|
+
observer.observe(indicatorRef.value);
|
40
|
+
}
|
41
|
+
});
|
42
|
+
onBeforeUnmount(() => {
|
43
|
+
observer?.disconnect();
|
44
|
+
});
|
21
45
|
return (_ctx, _cache) => {
|
22
46
|
return openBlock(), createElementBlock(Fragment, null, [
|
23
|
-
createElementVNode("div",
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
},
|
37
|
-
|
38
|
-
|
39
|
-
|
47
|
+
createElementVNode("div", _hoisted_1, null, 512),
|
48
|
+
unref(isModal) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
49
|
+
createElementVNode("div", {
|
50
|
+
ref: "header",
|
51
|
+
class: "-top--modal-header-height bg-default dark:bg-default-dark sticky print:hidden",
|
52
|
+
style: normalizeStyle({ zIndex: isIntersecting.value ? unref(BASE_ZINDEX_DROPDOWN) : unref(BASE_ZINDEX_LIST_HEADER) })
|
53
|
+
}, [
|
54
|
+
renderSlot(_ctx.$slots, "header")
|
55
|
+
], 4),
|
56
|
+
renderSlot(_ctx.$slots, "default")
|
57
|
+
], 64)) : (openBlock(), createBlock(_sfc_main$1, {
|
58
|
+
key: 1,
|
59
|
+
"is-intersecting": isIntersecting.value
|
60
|
+
}, {
|
61
|
+
header: withCtx((scope) => [
|
62
|
+
renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(scope)))
|
63
|
+
]),
|
64
|
+
default: withCtx((scope) => [
|
65
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))
|
66
|
+
]),
|
67
|
+
_: 3
|
68
|
+
}, 8, ["is-intersecting"]))
|
40
69
|
], 64);
|
41
70
|
};
|
42
71
|
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
type __VLS_Props = {
|
2
|
+
isIntersecting: boolean;
|
3
|
+
};
|
4
|
+
declare function __VLS_template(): {
|
5
|
+
attrs: Partial<{}>;
|
6
|
+
slots: {
|
7
|
+
header?(_: {
|
8
|
+
updateHeaderHeight: () => void;
|
9
|
+
}): any;
|
10
|
+
default?(_: {
|
11
|
+
headerTop: number;
|
12
|
+
headerHeight: number;
|
13
|
+
}): any;
|
14
|
+
};
|
15
|
+
refs: {
|
16
|
+
header: HTMLDivElement;
|
17
|
+
};
|
18
|
+
rootEl: any;
|
19
|
+
};
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
21
|
+
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, {
|
22
|
+
header: HTMLDivElement;
|
23
|
+
}, any>;
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
25
|
+
export default _default;
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
27
|
+
new (): {
|
28
|
+
$slots: S;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=InfiniteListWrapper.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,38 @@
|
|
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,9 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
header:
|
4
|
-
headerHeight:
|
5
|
-
headerTop:
|
6
|
-
|
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
7
|
updateHeaderPadding: (value: number) => void;
|
8
8
|
updateHeaderHeight: () => void;
|
9
9
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useInfiniteListHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/use/useInfiniteListHeader.ts"],"names":[],"mappings":"
|
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,26 +1,15 @@
|
|
1
|
-
import { ref, inject
|
1
|
+
import { ref, inject } from 'vue';
|
2
2
|
import { useHeader } from '../../HeaderBar/use/useHeader.js';
|
3
3
|
import { wModalHeaderHeight } from '../../Modal/models/injection.js';
|
4
|
-
import { isClientSide } from '../../../utils/utils.js';
|
5
4
|
import { wScrollingElement } from '../models/injection.js';
|
6
5
|
|
7
|
-
const useInfiniteListHeader = (
|
8
|
-
const indicator = ref();
|
6
|
+
const useInfiniteListHeader = (isIntersecting) => {
|
9
7
|
const header = ref();
|
10
8
|
const headerHeight = ref(0);
|
11
9
|
const headerTop = ref(0);
|
12
|
-
const isIntersecting = ref(initIsIntersecting);
|
13
|
-
let observer = null;
|
14
10
|
const { updateHeaderPadding, headerHeight: headerElementHeight } = useHeader();
|
15
11
|
const modalHeaderHeight = inject(wModalHeaderHeight, void 0);
|
16
12
|
const scrollingElement = inject(wScrollingElement, null);
|
17
|
-
const observerCb = (entries) => {
|
18
|
-
isIntersecting.value = entries.some((entry) => {
|
19
|
-
if (entry.target === indicator.value) {
|
20
|
-
return entry.isIntersecting || entry.boundingClientRect.top > window.innerHeight;
|
21
|
-
}
|
22
|
-
});
|
23
|
-
};
|
24
13
|
const updateHeader = () => {
|
25
14
|
if (!header.value) return;
|
26
15
|
const rect = header.value.getBoundingClientRect();
|
@@ -35,27 +24,11 @@ const useInfiniteListHeader = (initIsIntersecting = true) => {
|
|
35
24
|
updateHeaderPadding(0);
|
36
25
|
}
|
37
26
|
};
|
38
|
-
onMounted(() => {
|
39
|
-
if (!isClientSide) return;
|
40
|
-
updateHeader();
|
41
|
-
if (indicator.value) {
|
42
|
-
observer = new IntersectionObserver(observerCb, {
|
43
|
-
root: null,
|
44
|
-
rootMargin: `-${headerElementHeight.value}px 100% 0px 0px`,
|
45
|
-
threshold: 1
|
46
|
-
});
|
47
|
-
observer.observe(indicator.value);
|
48
|
-
}
|
49
|
-
});
|
50
|
-
onBeforeUnmount(() => {
|
51
|
-
observer?.disconnect();
|
52
|
-
});
|
53
27
|
return {
|
54
|
-
indicator,
|
55
28
|
header,
|
56
29
|
headerHeight,
|
57
30
|
headerTop,
|
58
|
-
|
31
|
+
updateHeader,
|
59
32
|
updateHeaderPadding,
|
60
33
|
updateHeaderHeight
|
61
34
|
};
|
@@ -55,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
55
|
isOpen.value = !isOpen.value;
|
56
56
|
};
|
57
57
|
const validate = (...args) => formRef.value?.validate(...args);
|
58
|
-
const isActionShown = computed(() => !props.skeleton && (props.allowOpen || props.to !== void 0 || props.allowSelectHover || props.hasAction || props.selected));
|
58
|
+
const isActionShown = computed(() => !props.skeleton && (props.allowOpen || props.to !== void 0 || props.allowSelectHover || props.hasAction || props.selected || moreRef.value?.isOpen === true));
|
59
59
|
const toggleMenu = (event) => {
|
60
60
|
if (props.disabled || props.disableMore || !containerRef.value || !moreRef.value || event.ctrlKey) return;
|
61
61
|
const containerRect = containerRef.value.getBoundingClientRect();
|
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
13
|
setup(__props) {
|
14
14
|
return (_ctx, _cache) => {
|
15
15
|
return openBlock(), createElementBlock("div", {
|
16
|
-
class: normalizeClass(["list:
|
16
|
+
class: normalizeClass(["list:pr-3 list:first-not:pl-3 grid shrink-0 grid-cols-1", {
|
17
17
|
"pointer-events-none": _ctx.allowOpen
|
18
18
|
}])
|
19
19
|
}, [
|
package/package.json
CHANGED