eco-vue-js 0.10.55 → 0.10.56
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/WButtonTab.vue.js +1 -1
- package/dist/components/List/components/ListFilterSelect.vue.js +1 -1
- package/dist/components/Nav/WNavItem.vue.d.ts +3 -5
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.js +4 -7
- package/dist/components/Nav/WNavItemExpand.vue.d.ts +4 -18
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +33 -35
- package/package.json +1 -1
@@ -108,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
108
108
|
default: withCtx(() => [
|
109
109
|
_ctx.hasChanges ? (openBlock(), createElementBlock("div", {
|
110
110
|
key: 0,
|
111
|
-
class: normalizeClass(["square-2 absolute right-1 top-1 rounded-full transition-colors duration-
|
111
|
+
class: normalizeClass(["square-2 absolute right-1 top-1 rounded-full transition-colors duration-200", {
|
112
112
|
"bg-info dark:bg-info-dark": !_ctx.hasError,
|
113
113
|
"bg-negative dark:bg-negative-dark": _ctx.hasError
|
114
114
|
}])
|
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
20
|
return (_ctx, _cache) => {
|
21
21
|
return openBlock(), createBlock(_sfc_main$1, {
|
22
22
|
"is-open": isOpen.value,
|
23
|
-
"horizontal-align": unref(HorizontalAlign).
|
23
|
+
"horizontal-align": unref(HorizontalAlign).FILL,
|
24
24
|
"max-height": 320,
|
25
25
|
"max-width": 320,
|
26
26
|
teleport: "",
|
@@ -22,11 +22,9 @@ declare function __VLS_template(): {
|
|
22
22
|
rootEl: any;
|
23
23
|
};
|
24
24
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
25
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
26
|
-
|
27
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
28
|
-
"onUpdate:isActive"?: ((value: [string, boolean]) => any) | undefined;
|
29
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
26
|
+
isActive: import('vue').ComputedRef<boolean>;
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
30
28
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
31
29
|
export default _default;
|
32
30
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"AAyFA;
|
1
|
+
{"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"AAyFA;AA4IA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAY5C,UAAU,KAAM,SAAQ,SAAS;IAC/B,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AA6BD,iBAAS,cAAc;WAuKT,OAAO,IAA6B;;sBAXvB,GAAG;uBACF,GAAG;;;;EAe9B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;8OAQnB,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,4 +1,4 @@
|
|
1
|
-
import { defineComponent, computed,
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, unref, normalizeClass, withCtx, createVNode, createElementVNode, Transition, createElementBlock, createCommentVNode, renderSlot, resolveDynamicComponent, createTextVNode, toDisplayString } from 'vue';
|
2
2
|
import { useRoute, useRouter, RouterLink } from 'vue-router';
|
3
3
|
import _sfc_main$1 from '../Counter/WCounter.vue.js';
|
4
4
|
import WSkeleton from '../Skeleton/WSkeleton.vue.js';
|
@@ -35,11 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
35
|
even: { type: Boolean },
|
36
36
|
to: {}
|
37
37
|
},
|
38
|
-
|
39
|
-
setup(__props, { emit: __emit }) {
|
38
|
+
setup(__props, { expose: __expose }) {
|
40
39
|
const EXCLUDE_QUERY_FIELDS = ["ordering", "page"];
|
41
40
|
const props = __props;
|
42
|
-
const emit = __emit;
|
43
41
|
const route = useRoute();
|
44
42
|
const router = useRouter();
|
45
43
|
const routeTo = computed(() => router.resolve(props.to));
|
@@ -49,9 +47,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
49
47
|
return isEqualObj(route.query, routeTo.value.query, EXCLUDE_QUERY_FIELDS, props.queryFields);
|
50
48
|
});
|
51
49
|
const isTextColor = computed(() => props.hasActive ? !props.indent : isActive.value);
|
52
|
-
|
53
|
-
|
54
|
-
emit("update:isActive", [titleLocal.value, false]);
|
50
|
+
__expose({
|
51
|
+
isActive
|
55
52
|
});
|
56
53
|
return (_ctx, _cache) => {
|
57
54
|
return openBlock(), createBlock(unref(RouterLink), {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { LinkProps } from '../../types/types';
|
2
|
-
import { VNode } from 'vue';
|
3
2
|
interface Props extends Partial<LinkProps> {
|
4
3
|
icon?: SVGComponent;
|
5
4
|
title: string;
|
@@ -10,24 +9,11 @@ interface Props extends Partial<LinkProps> {
|
|
10
9
|
queryFields?: string[];
|
11
10
|
even?: boolean;
|
12
11
|
}
|
13
|
-
declare function __VLS_template():
|
14
|
-
attrs: Partial<{}>;
|
15
|
-
slots: Readonly<{
|
16
|
-
default?: () => VNode[];
|
17
|
-
icon?: () => VNode[];
|
18
|
-
}> & {
|
19
|
-
default?: () => VNode[];
|
20
|
-
icon?: () => VNode[];
|
21
|
-
};
|
22
|
-
refs: {};
|
23
|
-
rootEl: HTMLDivElement;
|
24
|
-
};
|
12
|
+
declare function __VLS_template(): any;
|
25
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
26
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
27
|
-
|
28
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
29
|
-
"onUpdate:isActive"?: ((value: [string, boolean]) => any) | undefined;
|
30
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
15
|
+
isActive: import('vue').Ref<boolean, boolean>;
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>;
|
31
17
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
32
18
|
export default _default;
|
33
19
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WNavItemExpand.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemExpand.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WNavItemExpand.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemExpand.vue"],"names":[],"mappings":"AAoFA;AAAA,OAuKO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAgB5C,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AA4DD,iBAAS,cAAc,QA+LtB;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;+OASnB,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,10 +1,10 @@
|
|
1
|
-
import { defineComponent, useSlots, computed,
|
1
|
+
import { defineComponent, useSlots, computed, useTemplateRef, ref, watch, onBeforeUnmount, createElementBlock, openBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, normalizeClass, renderSlot, nextTick } from 'vue';
|
2
2
|
import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
|
3
3
|
import _sfc_main$3 from '../Expansion/WExpansion.vue.js';
|
4
4
|
import IconArrow from '../../assets/icons/default/IconArrow.svg.js';
|
5
5
|
import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
|
6
6
|
import { useIsMobile } from '../../utils/mobile.js';
|
7
|
-
import { unwrapSlots
|
7
|
+
import { unwrapSlots } from '../../utils/utils.js';
|
8
8
|
import _sfc_main$2 from './WNavItem.vue.js';
|
9
9
|
import WNavItemTransition from './WNavItemTransition.vue.js';
|
10
10
|
|
@@ -22,64 +22,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
22
|
even: { type: Boolean },
|
23
23
|
to: {}
|
24
24
|
},
|
25
|
-
|
26
|
-
setup(__props, { emit: __emit }) {
|
27
|
-
const props = __props;
|
25
|
+
setup(__props, { expose: __expose }) {
|
28
26
|
const slots = useSlots();
|
29
27
|
const { isMobile } = useIsMobile();
|
30
28
|
const slotsDefault = computed(() => unwrapSlots(slots.default?.() ?? []));
|
31
|
-
const
|
32
|
-
const
|
33
|
-
const hasActiveCached = ref(false);
|
29
|
+
const componentRef = useTemplateRef("component");
|
30
|
+
const innerRef = useTemplateRef("inner");
|
34
31
|
const isDropdownOpen = ref(false);
|
35
|
-
const
|
36
|
-
const
|
37
|
-
const
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
32
|
+
const hasActive = ref(false);
|
33
|
+
const isActive = computed(() => componentRef.value?.isActive ?? false);
|
34
|
+
const hasInnerActive = computed(() => innerRef.value?.some((item) => item.isActive) ?? false);
|
35
|
+
const updateHasActive = async () => {
|
36
|
+
await nextTick();
|
37
|
+
hasActive.value = componentRef.value?.isActive || (innerRef.value?.some((item) => item.isActive) ?? false);
|
38
|
+
};
|
42
39
|
const showDropdown = () => {
|
43
40
|
isDropdownOpen.value = true;
|
44
41
|
};
|
45
42
|
const hideDropdown = () => {
|
46
43
|
isDropdownOpen.value = false;
|
47
44
|
};
|
48
|
-
watch(
|
45
|
+
watch(hasInnerActive, updateHasActive, { immediate: true });
|
46
|
+
watch(isActive, updateHasActive, { immediate: true });
|
47
|
+
watch(slotsDefault, updateHasActive, { immediate: true });
|
48
|
+
watch(hasActive, () => {
|
49
|
+
isDropdownOpen.value = false;
|
50
|
+
}, { immediate: true });
|
49
51
|
onBeforeUnmount(() => {
|
50
52
|
isDropdownOpen.value = false;
|
51
|
-
|
53
|
+
});
|
54
|
+
__expose({
|
55
|
+
isActive: hasActive
|
52
56
|
});
|
53
57
|
return (_ctx, _cache) => {
|
54
58
|
return openBlock(), createElementBlock("div", null, [
|
55
59
|
createVNode(_sfc_main$1, {
|
56
|
-
"is-open": isDropdownOpen.value && !
|
60
|
+
"is-open": isDropdownOpen.value && !hasActive.value,
|
57
61
|
"max-width": 320,
|
58
62
|
"max-height": 320,
|
59
63
|
"horizontal-align": unref(HorizontalAlign).RIGHT_OUTER
|
60
64
|
}, {
|
61
65
|
toggle: withCtx(() => [
|
62
|
-
createVNode(_sfc_main$2, mergeProps(unref(isMobile) ||
|
66
|
+
createVNode(_sfc_main$2, mergeProps(unref(isMobile) || hasActive.value || _ctx.even ? void 0 : {
|
63
67
|
onmouseenter: showDropdown,
|
64
68
|
onmouseleave: hideDropdown
|
65
69
|
}, {
|
70
|
+
ref: "component",
|
66
71
|
to: _ctx.to ?? slotsDefault.value?.[0]?.props?.to,
|
67
72
|
title: _ctx.title,
|
68
73
|
icon: _ctx.icon,
|
69
74
|
skeleton: _ctx.skeleton,
|
70
75
|
count: _ctx.count,
|
71
76
|
counter: _ctx.counter,
|
72
|
-
"has-active":
|
77
|
+
"has-active": hasActive.value,
|
73
78
|
indent: _ctx.indent,
|
74
79
|
even: _ctx.even,
|
75
80
|
expand: !_ctx.to,
|
76
81
|
"query-fields": _ctx.queryFields,
|
77
|
-
hovered: isDropdownOpen.value && !
|
78
|
-
"onUpdate:isActive": _cache[0] || (_cache[0] = ($event) => {
|
79
|
-
isOpen.value = $event[1];
|
80
|
-
$event[1] && _ctx.$emit("update:isActive", [_ctx.title, $event[1]]);
|
81
|
-
$event[1] && hideDropdown();
|
82
|
-
})
|
82
|
+
hovered: isDropdownOpen.value && !hasActive.value
|
83
83
|
}), {
|
84
84
|
icon: withCtx(() => [
|
85
85
|
renderSlot(_ctx.$slots, "icon")
|
@@ -87,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
87
87
|
right: withCtx(() => [
|
88
88
|
createVNode(unref(IconArrow), {
|
89
89
|
class: normalizeClass(["square-3 transition-transform", {
|
90
|
-
"-rotate-90": !
|
90
|
+
"-rotate-90": !hasActive.value && !_ctx.even
|
91
91
|
}])
|
92
92
|
}, null, 8, ["class"])
|
93
93
|
]),
|
@@ -105,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
105
105
|
return openBlock(), createBlock(resolveDynamicComponent(slot), {
|
106
106
|
key: index,
|
107
107
|
even: "",
|
108
|
-
"onUpdate:isActive": _cache[
|
108
|
+
"onUpdate:isActive": _cache[0] || (_cache[0] = ($event) => $event[1] && hideDropdown())
|
109
109
|
}, null, 32);
|
110
110
|
}), 128))
|
111
111
|
])
|
@@ -114,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
114
114
|
_: 3
|
115
115
|
}, 8, ["is-open", "horizontal-align"]),
|
116
116
|
createVNode(_sfc_main$3, {
|
117
|
-
"is-shown":
|
117
|
+
"is-shown": hasActive.value || _ctx.even
|
118
118
|
}, {
|
119
119
|
default: withCtx(() => [
|
120
120
|
createVNode(WNavItemTransition, null, {
|
@@ -122,13 +122,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
122
122
|
(openBlock(true), createElementBlock(Fragment, null, renderList(slotsDefault.value, (slot, index) => {
|
123
123
|
return openBlock(), createBlock(resolveDynamicComponent(slot), {
|
124
124
|
key: index,
|
125
|
+
ref_for: true,
|
126
|
+
ref: "inner",
|
125
127
|
even: _ctx.even,
|
126
|
-
indent: !_ctx.even
|
127
|
-
|
128
|
-
isActiveChildrenMap[$event[0]] = $event[1];
|
129
|
-
$event[1] && hideDropdown();
|
130
|
-
})
|
131
|
-
}, null, 40, ["even", "indent"]);
|
128
|
+
indent: !_ctx.even
|
129
|
+
}, null, 8, ["even", "indent"]);
|
132
130
|
}), 128))
|
133
131
|
]),
|
134
132
|
_: 1
|
package/package.json
CHANGED