@element-plus/nightly 0.0.20240312 → 0.0.20240314
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.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +26 -117
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +117 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/tour/index.d.ts +10 -10
- package/es/components/tour/src/step.d.ts +1 -1
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step.vue.d.ts +3 -3
- package/es/components/tour/src/tour.d.ts +1 -1
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +4 -4
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +178 -29
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +29 -178
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -117
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +117 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/tour/index.d.ts +10 -10
- package/lib/components/tour/src/step.d.ts +1 -1
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step.vue.d.ts +3 -3
- package/lib/components/tour/src/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +4 -4
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-list.js +178 -30
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +30 -178
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/src/anchor.scss +2 -3
- package/web-types.json +1 -1
|
@@ -1,123 +1,32 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, ref, computed, watch, onMounted, watchEffect, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot } from 'vue';
|
|
2
|
-
import { useWindowSize, useElementBounding, useEventListener } from '@vueuse/core';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
9
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
10
|
-
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
|
5
|
+
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
11
6
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
width: rootWidth,
|
|
30
|
-
top: rootTop,
|
|
31
|
-
bottom: rootBottom,
|
|
32
|
-
update: updateRoot
|
|
33
|
-
} = useElementBounding(root, { windowScroll: false });
|
|
34
|
-
const targetRect = useElementBounding(target);
|
|
35
|
-
const fixed = ref(false);
|
|
36
|
-
const scrollTop = ref(0);
|
|
37
|
-
const transform = ref(0);
|
|
38
|
-
const rootStyle = computed(() => {
|
|
39
|
-
return {
|
|
40
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
41
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
const affixStyle = computed(() => {
|
|
45
|
-
if (!fixed.value)
|
|
46
|
-
return {};
|
|
47
|
-
const offset = props.offset ? addUnit(props.offset) : 0;
|
|
48
|
-
return {
|
|
49
|
-
height: `${rootHeight.value}px`,
|
|
50
|
-
width: `${rootWidth.value}px`,
|
|
51
|
-
top: props.position === "top" ? offset : "",
|
|
52
|
-
bottom: props.position === "bottom" ? offset : "",
|
|
53
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
54
|
-
zIndex: props.zIndex
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
const update = () => {
|
|
58
|
-
if (!scrollContainer.value)
|
|
59
|
-
return;
|
|
60
|
-
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
61
|
-
if (props.position === "top") {
|
|
62
|
-
if (props.target) {
|
|
63
|
-
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
64
|
-
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
65
|
-
transform.value = difference < 0 ? difference : 0;
|
|
66
|
-
} else {
|
|
67
|
-
fixed.value = props.offset > rootTop.value;
|
|
68
|
-
}
|
|
69
|
-
} else if (props.target) {
|
|
70
|
-
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
71
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
72
|
-
transform.value = difference < 0 ? -difference : 0;
|
|
73
|
-
} else {
|
|
74
|
-
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const handleScroll = () => {
|
|
78
|
-
updateRoot();
|
|
79
|
-
emit("scroll", {
|
|
80
|
-
scrollTop: scrollTop.value,
|
|
81
|
-
fixed: fixed.value
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
watch(fixed, (val) => emit("change", val));
|
|
85
|
-
onMounted(() => {
|
|
86
|
-
var _a;
|
|
87
|
-
if (props.target) {
|
|
88
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
89
|
-
if (!target.value)
|
|
90
|
-
throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
91
|
-
} else {
|
|
92
|
-
target.value = document.documentElement;
|
|
93
|
-
}
|
|
94
|
-
scrollContainer.value = getScrollContainer(root.value, true);
|
|
95
|
-
updateRoot();
|
|
96
|
-
});
|
|
97
|
-
useEventListener(scrollContainer, "scroll", handleScroll);
|
|
98
|
-
watchEffect(update);
|
|
99
|
-
expose({
|
|
100
|
-
update,
|
|
101
|
-
updateRoot
|
|
102
|
-
});
|
|
103
|
-
return (_ctx, _cache) => {
|
|
104
|
-
return openBlock(), createElementBlock("div", {
|
|
105
|
-
ref_key: "root",
|
|
106
|
-
ref: root,
|
|
107
|
-
class: normalizeClass(unref(ns).b()),
|
|
108
|
-
style: normalizeStyle(unref(rootStyle))
|
|
109
|
-
}, [
|
|
110
|
-
createElementVNode("div", {
|
|
111
|
-
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
|
112
|
-
style: normalizeStyle(unref(affixStyle))
|
|
113
|
-
}, [
|
|
114
|
-
renderSlot(_ctx.$slots, "default")
|
|
115
|
-
], 6)
|
|
116
|
-
], 6);
|
|
117
|
-
};
|
|
7
|
+
const affixProps = buildProps({
|
|
8
|
+
zIndex: {
|
|
9
|
+
type: definePropType([Number, String]),
|
|
10
|
+
default: 100
|
|
11
|
+
},
|
|
12
|
+
target: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
offset: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 0
|
|
19
|
+
},
|
|
20
|
+
position: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: ["top", "bottom"],
|
|
23
|
+
default: "top"
|
|
118
24
|
}
|
|
119
25
|
});
|
|
120
|
-
|
|
26
|
+
const affixEmits = {
|
|
27
|
+
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
|
28
|
+
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
|
29
|
+
};
|
|
121
30
|
|
|
122
|
-
export {
|
|
31
|
+
export { affixEmits, affixProps };
|
|
123
32
|
//# sourceMappingURL=affix.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":[],"mappings":";;;;;;AAOY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
|
|
@@ -1,32 +1,123 @@
|
|
|
1
|
+
import { defineComponent, shallowRef, ref, computed, watch, onMounted, watchEffect, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot } from 'vue';
|
|
2
|
+
import { useWindowSize, useElementBounding, useEventListener } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import '../../../
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { affixProps, affixEmits } from './affix.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
9
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
10
|
+
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
|
6
11
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const COMPONENT_NAME = "ElAffix";
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: COMPONENT_NAME
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: affixProps,
|
|
19
|
+
emits: affixEmits,
|
|
20
|
+
setup(__props, { expose, emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = useNamespace("affix");
|
|
23
|
+
const target = shallowRef();
|
|
24
|
+
const root = shallowRef();
|
|
25
|
+
const scrollContainer = shallowRef();
|
|
26
|
+
const { height: windowHeight } = useWindowSize();
|
|
27
|
+
const {
|
|
28
|
+
height: rootHeight,
|
|
29
|
+
width: rootWidth,
|
|
30
|
+
top: rootTop,
|
|
31
|
+
bottom: rootBottom,
|
|
32
|
+
update: updateRoot
|
|
33
|
+
} = useElementBounding(root, { windowScroll: false });
|
|
34
|
+
const targetRect = useElementBounding(target);
|
|
35
|
+
const fixed = ref(false);
|
|
36
|
+
const scrollTop = ref(0);
|
|
37
|
+
const transform = ref(0);
|
|
38
|
+
const rootStyle = computed(() => {
|
|
39
|
+
return {
|
|
40
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
41
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
const affixStyle = computed(() => {
|
|
45
|
+
if (!fixed.value)
|
|
46
|
+
return {};
|
|
47
|
+
const offset = props.offset ? addUnit(props.offset) : 0;
|
|
48
|
+
return {
|
|
49
|
+
height: `${rootHeight.value}px`,
|
|
50
|
+
width: `${rootWidth.value}px`,
|
|
51
|
+
top: props.position === "top" ? offset : "",
|
|
52
|
+
bottom: props.position === "bottom" ? offset : "",
|
|
53
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
54
|
+
zIndex: props.zIndex
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const update = () => {
|
|
58
|
+
if (!scrollContainer.value)
|
|
59
|
+
return;
|
|
60
|
+
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
|
61
|
+
if (props.position === "top") {
|
|
62
|
+
if (props.target) {
|
|
63
|
+
const difference = targetRect.bottom.value - props.offset - rootHeight.value;
|
|
64
|
+
fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
|
|
65
|
+
transform.value = difference < 0 ? difference : 0;
|
|
66
|
+
} else {
|
|
67
|
+
fixed.value = props.offset > rootTop.value;
|
|
68
|
+
}
|
|
69
|
+
} else if (props.target) {
|
|
70
|
+
const difference = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
|
|
71
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
|
72
|
+
transform.value = difference < 0 ? -difference : 0;
|
|
73
|
+
} else {
|
|
74
|
+
fixed.value = windowHeight.value - props.offset < rootBottom.value;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleScroll = () => {
|
|
78
|
+
updateRoot();
|
|
79
|
+
emit("scroll", {
|
|
80
|
+
scrollTop: scrollTop.value,
|
|
81
|
+
fixed: fixed.value
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
watch(fixed, (val) => emit("change", val));
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
var _a;
|
|
87
|
+
if (props.target) {
|
|
88
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
89
|
+
if (!target.value)
|
|
90
|
+
throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
91
|
+
} else {
|
|
92
|
+
target.value = document.documentElement;
|
|
93
|
+
}
|
|
94
|
+
scrollContainer.value = getScrollContainer(root.value, true);
|
|
95
|
+
updateRoot();
|
|
96
|
+
});
|
|
97
|
+
useEventListener(scrollContainer, "scroll", handleScroll);
|
|
98
|
+
watchEffect(update);
|
|
99
|
+
expose({
|
|
100
|
+
update,
|
|
101
|
+
updateRoot
|
|
102
|
+
});
|
|
103
|
+
return (_ctx, _cache) => {
|
|
104
|
+
return openBlock(), createElementBlock("div", {
|
|
105
|
+
ref_key: "root",
|
|
106
|
+
ref: root,
|
|
107
|
+
class: normalizeClass(unref(ns).b()),
|
|
108
|
+
style: normalizeStyle(unref(rootStyle))
|
|
109
|
+
}, [
|
|
110
|
+
createElementVNode("div", {
|
|
111
|
+
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
|
112
|
+
style: normalizeStyle(unref(affixStyle))
|
|
113
|
+
}, [
|
|
114
|
+
renderSlot(_ctx.$slots, "default")
|
|
115
|
+
], 6)
|
|
116
|
+
], 6);
|
|
117
|
+
};
|
|
24
118
|
}
|
|
25
119
|
});
|
|
26
|
-
|
|
27
|
-
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
|
28
|
-
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
|
29
|
-
};
|
|
120
|
+
var Affix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "affix.vue"]]);
|
|
30
121
|
|
|
31
|
-
export {
|
|
122
|
+
export { Affix as default };
|
|
32
123
|
//# sourceMappingURL=affix2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n updateRoot()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAAS,UAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAO,UAA2B,EAAA,CAAA;AACxC,IAAA,MAAM,kBAAkB,UAAiC,EAAA,CAAA;AACzD,IAAM,MAAA,EAAE,MAAQ,EAAA,YAAA,EAAA,GAAiB,aAAc,EAAA,CAAA;AAC/C,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,SAAA;AAAA,MAC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,YAAA,CAAA,CAAA;AAElB,IAAa,WAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -78,7 +78,7 @@ export { ElMessage } from './message/index.mjs';
|
|
|
78
78
|
export { ElMessageBox } from './message-box/index.mjs';
|
|
79
79
|
export { ElNotification } from './notification/index.mjs';
|
|
80
80
|
export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
|
81
|
-
export { affixEmits, affixProps } from './affix/src/
|
|
81
|
+
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
|
82
82
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
|
83
83
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
|
84
84
|
export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
|
|
@@ -201,7 +201,7 @@ export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
|
|
201
201
|
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
|
|
202
202
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
|
|
203
203
|
export { uploadContentProps } from './upload/src/upload-content.mjs';
|
|
204
|
-
export { uploadListEmits, uploadListProps } from './upload/src/upload-
|
|
204
|
+
export { uploadListEmits, uploadListProps } from './upload/src/upload-list2.mjs';
|
|
205
205
|
export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-dragger.mjs';
|
|
206
206
|
export { uploadContextKey } from './upload/src/constants.mjs';
|
|
207
207
|
export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
|
|
@@ -31,7 +31,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
31
31
|
block: string;
|
|
32
32
|
}, boolean>;
|
|
33
33
|
type: {
|
|
34
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
34
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
35
35
|
readonly required: false;
|
|
36
36
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
37
37
|
__epPropKey: true;
|
|
@@ -73,7 +73,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
73
73
|
block: string;
|
|
74
74
|
}, boolean>;
|
|
75
75
|
type: {
|
|
76
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
76
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
77
77
|
readonly required: false;
|
|
78
78
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
79
|
__epPropKey: true;
|
|
@@ -122,7 +122,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
122
122
|
} | undefined>;
|
|
123
123
|
mergedShowArrow: import("vue").ComputedRef<import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
|
|
124
124
|
mergedScrollIntoViewOptions: import("vue").ComputedRef<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>>;
|
|
125
|
-
mergedType: import("vue").ComputedRef<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
125
|
+
mergedType: import("vue").ComputedRef<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown> | undefined>;
|
|
126
126
|
nextZIndex: () => number;
|
|
127
127
|
nowZIndex: number;
|
|
128
128
|
mergedZIndex: import("vue").ComputedRef<number>;
|
|
@@ -362,7 +362,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
362
362
|
block: string;
|
|
363
363
|
}, boolean>;
|
|
364
364
|
type: {
|
|
365
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
365
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
366
366
|
readonly required: false;
|
|
367
367
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
368
368
|
__epPropKey: true;
|
|
@@ -428,7 +428,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
428
428
|
};
|
|
429
429
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
430
430
|
type: {
|
|
431
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
431
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
432
432
|
readonly required: false;
|
|
433
433
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
434
434
|
__epPropKey: true;
|
|
@@ -473,7 +473,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
473
473
|
};
|
|
474
474
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
475
475
|
type: {
|
|
476
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
476
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
477
477
|
readonly required: false;
|
|
478
478
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
479
479
|
__epPropKey: true;
|
|
@@ -893,7 +893,7 @@ export declare const ElTour: import("@element-plus/nightly/es/utils").SFCWithIns
|
|
|
893
893
|
};
|
|
894
894
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
895
895
|
type: {
|
|
896
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
896
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
897
897
|
readonly required: false;
|
|
898
898
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
899
899
|
__epPropKey: true;
|
|
@@ -947,7 +947,7 @@ export declare const ElTourStep: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
947
947
|
};
|
|
948
948
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
949
949
|
type: {
|
|
950
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
950
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
951
951
|
readonly required: false;
|
|
952
952
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
953
953
|
__epPropKey: true;
|
|
@@ -992,7 +992,7 @@ export declare const ElTourStep: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
992
992
|
};
|
|
993
993
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
994
994
|
type: {
|
|
995
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
995
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
996
996
|
readonly required: false;
|
|
997
997
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
998
998
|
__epPropKey: true;
|
|
@@ -1412,7 +1412,7 @@ export declare const ElTourStep: import("@element-plus/nightly/es/utils").SFCWit
|
|
|
1412
1412
|
};
|
|
1413
1413
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
1414
1414
|
type: {
|
|
1415
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
1415
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
1416
1416
|
readonly required: false;
|
|
1417
1417
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
1418
1418
|
__epPropKey: true;
|
|
@@ -39,7 +39,7 @@ export declare const tourStepProps: {
|
|
|
39
39
|
};
|
|
40
40
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
41
41
|
type: {
|
|
42
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
42
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
43
43
|
readonly required: false;
|
|
44
44
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
45
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.mjs","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TourBtnProps, TourMask } from './types'\n\nexport const tourStepProps = buildProps({\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target: {\n type: definePropType<\n string | HTMLElement | (() => HTMLElement | null) | null\n >([String, Object, Function]),\n },\n /**\n * @description the title of the tour content\n */\n title: String,\n /**\n * @description description\n */\n description: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description properties of the previous button\n */\n prevButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description properties of the Next button\n */\n nextButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'
|
|
1
|
+
{"version":3,"file":"step.mjs","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TourBtnProps, TourMask } from './types'\n\nexport const tourStepProps = buildProps({\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target: {\n type: definePropType<\n string | HTMLElement | (() => HTMLElement | null) | null\n >([String, Object, Function]),\n },\n /**\n * @description the title of the tour content\n */\n title: String,\n /**\n * @description description\n */\n description: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description properties of the previous button\n */\n prevButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description properties of the Next button\n */\n nextButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n})\n\nexport type TourStepProps = ExtractPropTypes<typeof tourStepProps>\n\nexport const tourStepEmits = {\n close: () => true,\n}\nexport type TourStepEmits = typeof tourStepEmits\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpD,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
|
|
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
};
|
|
39
39
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
40
40
|
type: {
|
|
41
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
41
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
42
42
|
readonly required: false;
|
|
43
43
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
44
44
|
__epPropKey: true;
|
|
@@ -83,7 +83,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
83
|
};
|
|
84
84
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
85
85
|
type: {
|
|
86
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
86
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
87
87
|
readonly required: false;
|
|
88
88
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
89
|
__epPropKey: true;
|
|
@@ -503,7 +503,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
503
503
|
};
|
|
504
504
|
scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
|
|
505
505
|
type: {
|
|
506
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
506
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
507
507
|
readonly required: false;
|
|
508
508
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
509
509
|
__epPropKey: true;
|
|
@@ -34,7 +34,7 @@ export declare const tourProps: {
|
|
|
34
34
|
block: string;
|
|
35
35
|
}, boolean>;
|
|
36
36
|
type: {
|
|
37
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("
|
|
37
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary") | ((new (...args: any[]) => ("default" | "primary") & {}) | (() => "default" | "primary"))[], unknown, unknown>>;
|
|
38
38
|
readonly required: false;
|
|
39
39
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
40
40
|
__epPropKey: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'
|
|
1
|
+
{"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type TourProps = ExtractPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour>\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,MAAM,EAAE,CAAC;AACf,MAAM,MAAM,EAAE,CAAC;AACf,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,QAAQ;AACrB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI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