vft 0.0.252 → 0.0.253
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/index.css +1 -1
- package/es/components/carousel/carousel-item.vue.d.ts +1 -4
- package/es/components/carousel/carousel-item.vue2.js +43 -43
- package/es/components/carousel/carousel.vue.d.ts +7 -61
- package/es/components/carousel/carousel.vue2.js +158 -113
- package/es/components/carousel/constants.d.ts +7 -4
- package/es/components/carousel/constants.js +2 -1
- package/es/components/carousel/index.d.ts +69 -117
- package/es/components/carousel/index.js +8 -7
- package/es/components/carousel/types.d.ts +19 -0
- package/es/components/carousel/types.js +1 -0
- package/es/components/carousel/use-carousel-item.d.ts +2 -2
- package/es/components/carousel/use-carousel-item.js +53 -53
- package/es/components/carousel/use-carousel.d.ts +10 -1
- package/es/components/carousel/use-carousel.js +131 -112
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
- package/es/components/date-picker/composables/use-range-picker.d.ts +2 -2
- package/es/components/index.js +55 -54
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +26 -26
- package/es/components/popover/popover.vue2.js +19 -19
- package/es/components/time-picker/composables/use-time-picker.d.ts +4 -4
- package/es/components/upload/use-handlers.d.ts +4 -4
- package/es/hooks/use-ordered-children/index.js +7 -7
- package/es/index.js +72 -71
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/carousel/carousel-item.vue.d.ts +1 -4
- package/lib/components/carousel/carousel-item.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue.d.ts +7 -61
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/carousel/constants.cjs +1 -1
- package/lib/components/carousel/constants.d.ts +7 -4
- package/lib/components/carousel/index.cjs +1 -1
- package/lib/components/carousel/index.d.ts +69 -117
- package/lib/components/carousel/types.cjs +1 -0
- package/lib/components/carousel/types.d.ts +19 -0
- package/lib/components/carousel/use-carousel-item.cjs +1 -1
- package/lib/components/carousel/use-carousel-item.d.ts +2 -2
- package/lib/components/carousel/use-carousel.cjs +1 -1
- package/lib/components/carousel/use-carousel.d.ts +10 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
- package/lib/components/date-picker/composables/use-range-picker.d.ts +2 -2
- package/lib/components/index.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/time-picker/composables/use-time-picker.d.ts +4 -4
- package/lib/components/upload/use-handlers.d.ts +4 -4
- package/lib/hooks/use-ordered-children/index.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/carousel.scss +45 -31
- package/theme-style/vft-carousel.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as S, getCurrentInstance as N, ref as p, computed as g, watchEffect as z, unref as n, onMounted as D, createElementBlock as T, openBlock as x, normalizeStyle as H, normalizeClass as K, createVNode as y, withCtx as
|
|
1
|
+
import { defineComponent as S, getCurrentInstance as N, ref as p, computed as g, watchEffect as z, unref as n, onMounted as D, createElementBlock as T, openBlock as x, normalizeStyle as H, normalizeClass as K, createVNode as y, withCtx as C, Fragment as W, renderList as $, createBlock as F } from "vue";
|
|
2
2
|
import { VftTabs as U, VftTabPane as j } from "../tabs/index.js";
|
|
3
|
-
import "@vueuse/core";
|
|
3
|
+
import { isClient as q } from "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
|
-
import { generateCssVars as
|
|
5
|
+
import { generateCssVars as R } from "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash-es";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as G } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { useRouterHelper as
|
|
12
|
-
import { useMultipleTabStore as
|
|
13
|
-
import { useRefs as
|
|
14
|
-
import
|
|
15
|
-
import { onBeforeRouteLeave as
|
|
16
|
-
import
|
|
17
|
-
import { initAffixTabs as
|
|
11
|
+
import { useRouterHelper as J, getRouterKeyPath as f, listenerRouteChange as O } from "@vft/router";
|
|
12
|
+
import { useMultipleTabStore as Q, useTabs as X } from "@vft/store";
|
|
13
|
+
import { useRefs as Y } from "@vft/use";
|
|
14
|
+
import Z from "hotkeys-js";
|
|
15
|
+
import { onBeforeRouteLeave as ee } from "vue-router";
|
|
16
|
+
import te from "./tab-content.vue2.js";
|
|
17
|
+
import { initAffixTabs as ae, useTabsDrag as ne } from "./use/use-multiple-tabs.js";
|
|
18
18
|
import "../context-menu/context-menu.vue2.js";
|
|
19
19
|
import "../icon/index.js";
|
|
20
|
-
const
|
|
20
|
+
const oe = S({
|
|
21
21
|
name: "vft-multiple-tabs"
|
|
22
|
-
}),
|
|
23
|
-
...
|
|
22
|
+
}), _e = /* @__PURE__ */ S({
|
|
23
|
+
...oe,
|
|
24
24
|
props: {
|
|
25
25
|
tabsStyle: {},
|
|
26
26
|
contextMenuStyle: {},
|
|
@@ -29,15 +29,15 @@ const ne = S({
|
|
|
29
29
|
fixExtraScrollWidth: {}
|
|
30
30
|
},
|
|
31
31
|
setup(m) {
|
|
32
|
-
const _ =
|
|
32
|
+
const _ = G("multiple-tabs"), r = N().appContext.config.globalProperties.$router, s = ae(r), u = Q(), o = p(""), i = p(0), d = p(), { go: b } = J(r), c = g(() => u.getTabList.filter((e) => !e.meta?.hideTab));
|
|
33
33
|
z(() => {
|
|
34
34
|
if (o.value) {
|
|
35
35
|
const e = c.value.findIndex((a) => f(a) === o.value);
|
|
36
36
|
e === -1 ? i.value = c.value?.length - 1 : i.value = e, i.value = i.value < s?.length ? s?.length - 1 : i.value;
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), q && ee(() => {
|
|
39
39
|
d.value = n(r.currentRoute);
|
|
40
|
-
}),
|
|
40
|
+
}), O(({ route: e }) => {
|
|
41
41
|
if (!e || e.meta?.hasTokenToRoot)
|
|
42
42
|
return;
|
|
43
43
|
const { meta: a = {} } = e, { currentActivePath: t, hideTab: l } = a, I = l ? t : null, h = f(e);
|
|
@@ -63,12 +63,12 @@ const ne = S({
|
|
|
63
63
|
function k(e) {
|
|
64
64
|
u.closeTabByKey(e, r);
|
|
65
65
|
}
|
|
66
|
-
const { refs: w, setRefs: M } =
|
|
66
|
+
const { refs: w, setRefs: M } = Y();
|
|
67
67
|
function V(e) {
|
|
68
68
|
const a = e.pane.attrs.index, t = e.event;
|
|
69
69
|
w.value[a].handleContext(t);
|
|
70
70
|
}
|
|
71
|
-
const B = g(() => ({ ...
|
|
71
|
+
const B = g(() => ({ ...R({
|
|
72
72
|
padding: "4px 0 0",
|
|
73
73
|
"border-bottom": "none",
|
|
74
74
|
"header-height": "26px",
|
|
@@ -81,8 +81,8 @@ const ne = S({
|
|
|
81
81
|
"header-margin": "0 0 0 8px",
|
|
82
82
|
"item-border-radius": "5px 5px 0 0",
|
|
83
83
|
"item-border": "none"
|
|
84
|
-
}, "tabs"), ...m.tabsStyle })), { closeCurrent: A } =
|
|
85
|
-
...
|
|
84
|
+
}, "tabs"), ...m.tabsStyle })), { closeCurrent: A } = X(), E = {
|
|
85
|
+
...R(
|
|
86
86
|
{
|
|
87
87
|
"sub-item-height": "40px",
|
|
88
88
|
"item-min-width": "150px"
|
|
@@ -92,7 +92,7 @@ const ne = S({
|
|
|
92
92
|
...m.contextMenuStyle
|
|
93
93
|
};
|
|
94
94
|
return D(() => {
|
|
95
|
-
m.canDrag &&
|
|
95
|
+
m.canDrag && ne(s), Z("command+e, ctrl+e", function() {
|
|
96
96
|
return A(), !1;
|
|
97
97
|
});
|
|
98
98
|
}), (e, a) => (x(), T("div", {
|
|
@@ -109,15 +109,15 @@ const ne = S({
|
|
|
109
109
|
onTabRemove: k,
|
|
110
110
|
onTabContextMenu: V
|
|
111
111
|
}, {
|
|
112
|
-
default:
|
|
112
|
+
default: C(() => [
|
|
113
113
|
(x(!0), T(W, null, $(c.value, (t, l) => (x(), F(n(j), {
|
|
114
114
|
key: n(f)(t) + l,
|
|
115
115
|
closable: !t.meta?.affix,
|
|
116
116
|
index: l,
|
|
117
117
|
name: n(f)(t)
|
|
118
118
|
}, {
|
|
119
|
-
label:
|
|
120
|
-
y(
|
|
119
|
+
label: C(() => [
|
|
120
|
+
y(te, {
|
|
121
121
|
"context-menu-style": E,
|
|
122
122
|
"affix-num": n(s)?.length,
|
|
123
123
|
ref_for: !0,
|
|
@@ -134,5 +134,5 @@ const ne = S({
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
export {
|
|
137
|
-
|
|
137
|
+
_e as default
|
|
138
138
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as m, computed as r, ref as S, unref as l, createBlock as U, openBlock as
|
|
1
|
+
import { defineComponent as m, computed as r, ref as S, unref as l, createBlock as U, openBlock as p, mergeProps as R, withCtx as s, renderSlot as f, createCommentVNode as d, createElementBlock as T, normalizeClass as V, toDisplayString as u, createTextVNode as $ } from "vue";
|
|
2
2
|
import { VftTooltip as N } from "../tooltip/index.js";
|
|
3
|
-
import { EVENT_CODE as
|
|
4
|
-
import "@vueuse/core";
|
|
5
|
-
import { addUnit as
|
|
3
|
+
import { EVENT_CODE as i } from "../../constants/aria.js";
|
|
4
|
+
import { isClient as O } from "@vueuse/core";
|
|
5
|
+
import { addUnit as K } from "@vft/utils";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash-es";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
const
|
|
12
|
+
const H = "onUpdate:visible", L = m({
|
|
13
13
|
name: "vft-popover"
|
|
14
|
-
}),
|
|
15
|
-
...
|
|
14
|
+
}), Y = /* @__PURE__ */ m({
|
|
15
|
+
...L,
|
|
16
16
|
props: {
|
|
17
17
|
trigger: { default: "hover" },
|
|
18
18
|
placement: { default: "bottom" },
|
|
@@ -34,9 +34,9 @@ const D = "onUpdate:visible", H = m({
|
|
|
34
34
|
hideAfter: { default: 200 },
|
|
35
35
|
autoClose: { default: 0 },
|
|
36
36
|
showArrow: { type: Boolean, default: !0 },
|
|
37
|
-
persistent: { type: Boolean, default:
|
|
37
|
+
persistent: { type: Boolean, default: O },
|
|
38
38
|
appendTo: {},
|
|
39
|
-
triggerKeys: { default: () => [
|
|
39
|
+
triggerKeys: { default: () => [i.enter, i.numpadEnter, i.space] },
|
|
40
40
|
"onUpdate:visible": {}
|
|
41
41
|
},
|
|
42
42
|
emits: [
|
|
@@ -47,16 +47,16 @@ const D = "onUpdate:visible", H = m({
|
|
|
47
47
|
"after-leave"
|
|
48
48
|
],
|
|
49
49
|
setup(t, { expose: b, emit: c }) {
|
|
50
|
-
const o = c, a =
|
|
50
|
+
const o = c, a = D("popover"), v = r(() => [H]), n = S(), g = r(() => l(n)?.popperRef), h = r(() => [
|
|
51
51
|
{
|
|
52
|
-
width:
|
|
52
|
+
width: K(t.width)
|
|
53
53
|
},
|
|
54
54
|
t.popperStyle
|
|
55
55
|
]), y = r(() => [a.b(), t.popperClass, { [a.m("plain")]: !!t.content }]), w = r(() => t.transition === `${a.namespace.value}-fade-in-linear`), B = () => {
|
|
56
56
|
n.value?.hide();
|
|
57
|
-
}, k = () => {
|
|
58
|
-
o("before-enter");
|
|
59
57
|
}, C = () => {
|
|
58
|
+
o("before-enter");
|
|
59
|
+
}, k = () => {
|
|
60
60
|
o("before-leave");
|
|
61
61
|
}, A = () => {
|
|
62
62
|
o("after-enter");
|
|
@@ -66,7 +66,7 @@ const D = "onUpdate:visible", H = m({
|
|
|
66
66
|
return b({
|
|
67
67
|
popperRef: g,
|
|
68
68
|
hide: B
|
|
69
|
-
}), (e,
|
|
69
|
+
}), (e, j) => (p(), U(l(N), R({
|
|
70
70
|
ref_key: "tooltipRef",
|
|
71
71
|
ref: n
|
|
72
72
|
}, e.$attrs, {
|
|
@@ -94,13 +94,13 @@ const D = "onUpdate:visible", H = m({
|
|
|
94
94
|
persistent: e.persistent,
|
|
95
95
|
"gpu-acceleration": w.value,
|
|
96
96
|
"onUpdate:visible": v.value,
|
|
97
|
-
onBeforeShow:
|
|
98
|
-
onBeforeHide:
|
|
97
|
+
onBeforeShow: C,
|
|
98
|
+
onBeforeHide: k,
|
|
99
99
|
onShow: A,
|
|
100
100
|
onHide: E
|
|
101
101
|
}), {
|
|
102
102
|
content: s(() => [
|
|
103
|
-
e.title ? (
|
|
103
|
+
e.title ? (p(), T("div", {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: V(l(a).e("title")),
|
|
106
106
|
role: "title"
|
|
@@ -117,5 +117,5 @@ const D = "onUpdate:visible", H = m({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
Y as default
|
|
121
121
|
};
|
|
@@ -29,7 +29,7 @@ export declare const useOldValue: (props: {
|
|
|
29
29
|
(value: number): Dayjs;
|
|
30
30
|
};
|
|
31
31
|
day: {
|
|
32
|
-
():
|
|
32
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
33
|
(value: number): Dayjs;
|
|
34
34
|
};
|
|
35
35
|
hour: {
|
|
@@ -99,7 +99,7 @@ export declare const useOldValue: (props: {
|
|
|
99
99
|
(value: number): Dayjs;
|
|
100
100
|
};
|
|
101
101
|
day: {
|
|
102
|
-
():
|
|
102
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
103
103
|
(value: number): Dayjs;
|
|
104
104
|
};
|
|
105
105
|
hour: {
|
|
@@ -169,7 +169,7 @@ export declare const useOldValue: (props: {
|
|
|
169
169
|
(value: number): Dayjs;
|
|
170
170
|
};
|
|
171
171
|
day: {
|
|
172
|
-
():
|
|
172
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
173
173
|
(value: number): Dayjs;
|
|
174
174
|
};
|
|
175
175
|
hour: {
|
|
@@ -239,7 +239,7 @@ export declare const useOldValue: (props: {
|
|
|
239
239
|
(value: number): Dayjs;
|
|
240
240
|
};
|
|
241
241
|
day: {
|
|
242
|
-
():
|
|
242
|
+
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
243
243
|
(value: number): Dayjs;
|
|
244
244
|
};
|
|
245
245
|
hour: {
|
|
@@ -18,9 +18,9 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
|
|
|
18
18
|
readonly size: number;
|
|
19
19
|
readonly type: string;
|
|
20
20
|
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
21
|
-
bytes: () => Promise<Uint8Array
|
|
21
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
22
22
|
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
23
|
-
stream: () => ReadableStream<Uint8Array
|
|
23
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
24
24
|
text: () => Promise<string>;
|
|
25
25
|
} | undefined;
|
|
26
26
|
}[], {
|
|
@@ -39,9 +39,9 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
|
|
|
39
39
|
readonly size: number;
|
|
40
40
|
readonly type: string;
|
|
41
41
|
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
42
|
-
bytes: () => Promise<Uint8Array
|
|
42
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
43
43
|
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
44
|
-
stream: () => ReadableStream<Uint8Array
|
|
44
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
45
45
|
text: () => Promise<string>;
|
|
46
46
|
} | undefined;
|
|
47
47
|
}[]>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { shallowRef as m, defineComponent as v, h as x, triggerRef as p, onMounted as M, isVNode as O } from "vue";
|
|
1
2
|
import "@vueuse/core";
|
|
2
3
|
import "@vft/utils";
|
|
3
4
|
import "../../utils/ns-cover.js";
|
|
4
5
|
import "lodash-es";
|
|
5
|
-
import { flattedChildren as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(e) => R(e) && e.type?.name === u && !!e.component
|
|
6
|
+
import { flattedChildren as R } from "../../utils/vue/vnode.js";
|
|
7
|
+
const S = (l, u, r) => R(l.subTree).filter(
|
|
8
|
+
(e) => O(e) && e.type?.name === u && !!e.component
|
|
9
9
|
).map((e) => e.component.uid).map((e) => r[e]).filter((e) => !!e), I = (l, u) => {
|
|
10
10
|
const r = m({}), c = m([]), d = /* @__PURE__ */ new WeakMap(), e = (t) => {
|
|
11
|
-
r.value[t.uid] = t, p(r),
|
|
11
|
+
r.value[t.uid] = t, p(r), M(() => {
|
|
12
12
|
const o = t.getVnode().el, n = o.parentNode;
|
|
13
13
|
if (!d.has(n)) {
|
|
14
14
|
d.set(n, []);
|
|
@@ -27,12 +27,12 @@ const S = (l, u, r) => v(l.subTree).filter(
|
|
|
27
27
|
u,
|
|
28
28
|
r.value
|
|
29
29
|
);
|
|
30
|
-
}, g = (t) => t.render(), N =
|
|
30
|
+
}, g = (t) => t.render(), N = v({
|
|
31
31
|
setup(t, { slots: o }) {
|
|
32
32
|
return () => (C(), o.default ? (
|
|
33
33
|
// Create a new `ReactiveEffect` to ensure `ChildrenSorter` doesn't track any extra dependencies
|
|
34
34
|
// @ts-ignore TODO: Remove this after Vue is upgraded
|
|
35
|
-
|
|
35
|
+
x(g, {
|
|
36
36
|
render: o.default
|
|
37
37
|
})
|
|
38
38
|
) : null);
|