@element-plus/nightly 0.0.20240424 → 0.0.20240425
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/README.md +5 -0
- package/attributes.json +1 -1
- package/dist/index.full.js +31 -21
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +23 -22
- 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/src/affix2.mjs +1 -1
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +70 -8
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +8 -70
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +1 -0
- package/es/components/descriptions/index.mjs +1 -0
- package/es/components/descriptions/index.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/descriptions/src/description-item.mjs +1 -1
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +17 -35
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +35 -17
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/form/index.mjs +1 -1
- package/es/components/form/src/form.d.ts +1 -2
- package/es/components/form/src/form.mjs +1 -1
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/index.mjs +8 -4
- package/es/components/index.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +269 -90
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +90 -269
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -11
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +11 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/option-group.mjs +17 -13
- package/es/components/select/src/option-group.mjs.map +1 -1
- package/es/components/space/index.mjs +1 -1
- package/es/components/space/src/item.d.ts +1 -1
- package/es/components/space/src/item.mjs +1 -1
- package/es/components/space/src/item.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +1 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +8 -8
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/arrow.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/index.d.ts +2 -0
- package/es/components/tour/index.mjs +2 -0
- package/es/components/tour/index.mjs.map +1 -1
- package/es/components/tour/src/content.d.ts +2 -0
- package/es/components/tour/src/content.mjs +1 -1
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/index.mjs +8 -4
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix2.js +1 -1
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +70 -8
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +8 -70
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +1 -0
- package/lib/components/descriptions/index.js +1 -0
- package/lib/components/descriptions/index.js.map +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.js +1 -0
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +17 -35
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +35 -17
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/form/index.js +1 -0
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/form/src/form.d.ts +1 -2
- package/lib/components/form/src/form.js +1 -0
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/index.js +18 -5
- package/lib/components/index.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +268 -90
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +90 -268
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -11
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +11 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/option-group.js +17 -13
- package/lib/components/select/src/option-group.js.map +1 -1
- package/lib/components/space/index.js +2 -1
- package/lib/components/space/index.js.map +1 -1
- package/lib/components/space/src/item.d.ts +1 -1
- package/lib/components/space/src/item.js +1 -0
- package/lib/components/space/src/item.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +1 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +8 -8
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/arrow.js +37 -23
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +23 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/index.d.ts +2 -0
- package/lib/components/tour/index.js +11 -3
- package/lib/components/tour/index.js.map +1 -1
- package/lib/components/tour/src/content.d.ts +2 -0
- package/lib/components/tour/src/content.js +2 -0
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/index.js +18 -5
- package/lib/index.js.map +1 -1
- 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/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.js","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
|
|
1
|
+
{"version":3,"file":"affix2.js","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 does not exist: ${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":["useNamespace","shallowRef","useWindowSize","useElementBounding","ref","computed","addUnit","watch","onMounted","throwError","getScrollContainer","useEventListener","watchEffect"],"mappings":";;;;;;;;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAASC,cAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAOA,cAA2B,EAAA,CAAA;AACxC,IAAA,MAAM,kBAAkBA,cAAiC,EAAA,CAAA;AACzD,IAAM,MAAA,EAAE,MAAQ,EAAA,YAAA,EAAA,GAAiBC,kBAAc,EAAA,CAAA;AAC/C,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,SAAA;AAAA,MACP,GAAK,EAAA,OAAA;AAAA,MACL,MAAQ,EAAA,UAAA;AAAA,MACR,MAAQ,EAAA,UAAA;AAAA,KAAA,GACNC,uBAAmB,CAAA,IAAA,EAAM,EAAE,YAAA,EAAc,OAAO,CAAA,CAAA;AACpD,IAAM,MAAA,UAAA,GAAaA,wBAAmB,MAAM,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQC,QAAI,KAAK,CAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAYA,QAAI,CAAC,CAAA,CA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A,CAAA;AACX,MAAA,IAAA,CAAK,QAAU,EAAA;AAAA,QACb,WAAW,SAAU,CAAA,KAAA;AAAA,QACrB,OAAO,KAAM,CAAA,KAAA;AAAA,OACd,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAAC,SAAA,CAAM,OAAO,CAAC,GAAA,KAAQ,IAAK,CAAA,QAAA,EAAU,GAAG,CAAC,CAAA,CAAA;AAEzC,IAAAC,aAAA,CAAU,MAAM;AACd,MAAA,IAAI;AACF,MAAA,IAAA,KAAO,CACL,MAAA,EAAA;AACF,QAAA,MAAY,CAAA,KAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,aAAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACV,QAAW,IAAA,CAAA,MAAA,CAAA,KAAA;AAAwD,UAChEC,gBAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACL,OAAA,MAAA;AAAwB,QAC1B,MAAA,CAAA,KAAA,GAAA,QAAA,CAAA,eAAA,CAAA;AACA,OAAA;AACA,MAAW,eAAA,CAAA,KAAA,GAAAC,yBAAA,CAAA,IAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAA,MACZ,UAAA,EAAA,CAAA;AAED,KAAiB,CAAA,CAAA;AACjB,IAAAC,qBAAkB,CAAA,eAAA,EAAA,QAAA,EAAA,YAAA,CAAA,CAAA;AAElB,IAAaC,eAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var carousel$1 = require('./src/carousel2.js');
|
|
7
|
-
var carouselItem$1 = require('./src/carousel-
|
|
7
|
+
var carouselItem$1 = require('./src/carousel-item.js');
|
|
8
8
|
var carousel = require('./src/carousel.js');
|
|
9
|
-
var carouselItem = require('./src/carousel-
|
|
9
|
+
var carouselItem = require('./src/carousel-item2.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
12
12
|
|
|
@@ -2,16 +2,78 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var carouselItem = require('./carousel-item2.js');
|
|
8
|
+
var useCarouselItem = require('./use-carousel-item.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
11
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const COMPONENT_NAME = "ElCarouselItem";
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElCarouselItem"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: carouselItem.carouselItemProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const ns = index.useNamespace("carousel");
|
|
22
|
+
const {
|
|
23
|
+
carouselItemRef,
|
|
24
|
+
active,
|
|
25
|
+
animating,
|
|
26
|
+
hover,
|
|
27
|
+
inStage,
|
|
28
|
+
isVertical,
|
|
29
|
+
translate,
|
|
30
|
+
isCardType,
|
|
31
|
+
scale,
|
|
32
|
+
ready,
|
|
33
|
+
handleItemClick
|
|
34
|
+
} = useCarouselItem.useCarouselItem(props, COMPONENT_NAME);
|
|
35
|
+
const itemKls = vue.computed(() => [
|
|
36
|
+
ns.e("item"),
|
|
37
|
+
ns.is("active", active.value),
|
|
38
|
+
ns.is("in-stage", inStage.value),
|
|
39
|
+
ns.is("hover", hover.value),
|
|
40
|
+
ns.is("animating", animating.value),
|
|
41
|
+
{
|
|
42
|
+
[ns.em("item", "card")]: isCardType.value,
|
|
43
|
+
[ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
|
|
44
|
+
}
|
|
45
|
+
]);
|
|
46
|
+
const itemStyle = vue.computed(() => {
|
|
47
|
+
const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
|
|
48
|
+
const _translate = `${translateType}(${vue.unref(translate)}px)`;
|
|
49
|
+
const _scale = `scale(${vue.unref(scale)})`;
|
|
50
|
+
const transform = [_translate, _scale].join(" ");
|
|
51
|
+
return {
|
|
52
|
+
transform
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
57
|
+
ref_key: "carouselItemRef",
|
|
58
|
+
ref: carouselItemRef,
|
|
59
|
+
class: vue.normalizeClass(vue.unref(itemKls)),
|
|
60
|
+
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
|
61
|
+
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
|
|
62
|
+
}, [
|
|
63
|
+
vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: vue.normalizeClass(vue.unref(ns).e("mask"))
|
|
66
|
+
}, null, 2)), [
|
|
67
|
+
[vue.vShow, !vue.unref(active)]
|
|
68
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
69
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
70
|
+
], 6)), [
|
|
71
|
+
[vue.vShow, vue.unref(ready)]
|
|
72
|
+
]);
|
|
73
|
+
};
|
|
13
74
|
}
|
|
14
75
|
});
|
|
76
|
+
var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
|
|
15
77
|
|
|
16
|
-
exports
|
|
78
|
+
exports["default"] = CarouselItem;
|
|
17
79
|
//# sourceMappingURL=carousel-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.
|
|
1
|
+
{"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join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AAC5D,MAAA,MAAM,UAAa,GAAA,CAAA,EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,78 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('../../../
|
|
7
|
-
var carouselItem = require('./carousel-item.js');
|
|
8
|
-
var useCarouselItem = require('./use-carousel-item.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
7
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...__default__,
|
|
18
|
-
props: carouselItem.carouselItemProps,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const ns = index.useNamespace("carousel");
|
|
22
|
-
const {
|
|
23
|
-
carouselItemRef,
|
|
24
|
-
active,
|
|
25
|
-
animating,
|
|
26
|
-
hover,
|
|
27
|
-
inStage,
|
|
28
|
-
isVertical,
|
|
29
|
-
translate,
|
|
30
|
-
isCardType,
|
|
31
|
-
scale,
|
|
32
|
-
ready,
|
|
33
|
-
handleItemClick
|
|
34
|
-
} = useCarouselItem.useCarouselItem(props, COMPONENT_NAME);
|
|
35
|
-
const itemKls = vue.computed(() => [
|
|
36
|
-
ns.e("item"),
|
|
37
|
-
ns.is("active", active.value),
|
|
38
|
-
ns.is("in-stage", inStage.value),
|
|
39
|
-
ns.is("hover", hover.value),
|
|
40
|
-
ns.is("animating", animating.value),
|
|
41
|
-
{
|
|
42
|
-
[ns.em("item", "card")]: isCardType.value,
|
|
43
|
-
[ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
|
|
44
|
-
}
|
|
45
|
-
]);
|
|
46
|
-
const itemStyle = vue.computed(() => {
|
|
47
|
-
const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
|
|
48
|
-
const _translate = `${translateType}(${vue.unref(translate)}px)`;
|
|
49
|
-
const _scale = `scale(${vue.unref(scale)})`;
|
|
50
|
-
const transform = [_translate, _scale].join(" ");
|
|
51
|
-
return {
|
|
52
|
-
transform
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
57
|
-
ref_key: "carouselItemRef",
|
|
58
|
-
ref: carouselItemRef,
|
|
59
|
-
class: vue.normalizeClass(vue.unref(itemKls)),
|
|
60
|
-
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
|
61
|
-
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
|
|
62
|
-
}, [
|
|
63
|
-
vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
64
|
-
key: 0,
|
|
65
|
-
class: vue.normalizeClass(vue.unref(ns).e("mask"))
|
|
66
|
-
}, null, 2)), [
|
|
67
|
-
[vue.vShow, !vue.unref(active)]
|
|
68
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
69
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
70
|
-
], 6)), [
|
|
71
|
-
[vue.vShow, vue.unref(ready)]
|
|
72
|
-
]);
|
|
73
|
-
};
|
|
8
|
+
const carouselItemProps = runtime.buildProps({
|
|
9
|
+
name: { type: String, default: "" },
|
|
10
|
+
label: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
74
13
|
}
|
|
75
14
|
});
|
|
76
|
-
var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
|
|
77
15
|
|
|
78
|
-
exports
|
|
16
|
+
exports.carouselItemProps = carouselItemProps;
|
|
79
17
|
//# sourceMappingURL=carousel-item2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.
|
|
1
|
+
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n name: { type: String, default: '' },\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
@@ -13,6 +13,7 @@ const ElDescriptions = install.withInstall(description$1["default"], {
|
|
|
13
13
|
});
|
|
14
14
|
const ElDescriptionsItem = install.withNoopInstall(descriptionItem["default"]);
|
|
15
15
|
|
|
16
|
+
exports.descriptionItemProps = descriptionItem.descriptionItemProps;
|
|
16
17
|
exports.descriptionProps = description.descriptionProps;
|
|
17
18
|
exports.ElDescriptions = ElDescriptions;
|
|
18
19
|
exports.ElDescriptionsItem = ElDescriptionsItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\nexport * from './src/description-item'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Slot, VNode } from 'vue';
|
|
2
|
-
declare const descriptionItemProps: {
|
|
2
|
+
export declare const descriptionItemProps: {
|
|
3
3
|
label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
4
4
|
span: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
5
5
|
width: import("@element-plus/nightly/es/utils").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\
|
|
1
|
+
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nexport const descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\ntype DescriptionItemProps = ExtractPropTypes<typeof descriptionItemProps>\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial<DescriptionItemProps> | null\n}\n"],"names":["buildProps","defineComponent"],"mappings":";;;;;;;;AAEY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACE,MAAC,eAAe,GAAGC,mBAAe,CAAC;AACxC,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var divider$1 = require('./src/
|
|
7
|
-
var divider = require('./src/
|
|
6
|
+
var divider$1 = require('./src/divider2.js');
|
|
7
|
+
var divider = require('./src/divider.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElDivider = install.withInstall(divider$1["default"]);
|
|
@@ -2,43 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('../../../
|
|
7
|
-
var divider = require('./divider2.js');
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return (_ctx, _cache) => {
|
|
26
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
27
|
-
class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
|
|
28
|
-
style: vue.normalizeStyle(vue.unref(dividerStyle)),
|
|
29
|
-
role: "separator"
|
|
30
|
-
}, [
|
|
31
|
-
_ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
|
|
34
|
-
}, [
|
|
35
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
36
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
|
37
|
-
], 6);
|
|
38
|
-
};
|
|
8
|
+
const dividerProps = runtime.buildProps({
|
|
9
|
+
direction: {
|
|
10
|
+
type: String,
|
|
11
|
+
values: ["horizontal", "vertical"],
|
|
12
|
+
default: "horizontal"
|
|
13
|
+
},
|
|
14
|
+
contentPosition: {
|
|
15
|
+
type: String,
|
|
16
|
+
values: ["left", "center", "right"],
|
|
17
|
+
default: "center"
|
|
18
|
+
},
|
|
19
|
+
borderStyle: {
|
|
20
|
+
type: runtime.definePropType(String),
|
|
21
|
+
default: "solid"
|
|
39
22
|
}
|
|
40
23
|
});
|
|
41
|
-
var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "divider.vue"]]);
|
|
42
24
|
|
|
43
|
-
exports
|
|
25
|
+
exports.dividerProps = dividerProps;
|
|
44
26
|
//# sourceMappingURL=divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../../../../../packages/components/divider/src/divider.
|
|
1
|
+
{"version":3,"file":"divider.js","sources":["../../../../../../packages/components/divider/src/divider.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n /**\n * @description Set divider's direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Set the style of divider\n */\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n /**\n * @description the position of the customized content on the divider line\n */\n borderStyle: {\n type: definePropType<BorderStyle>(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes<typeof dividerProps>\n\nexport type DividerInstance = InstanceType<typeof Divider>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AACvC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,25 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var divider = require('./divider.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "ElDivider"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: divider.dividerProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const ns = index.useNamespace("divider");
|
|
20
|
+
const dividerStyle = vue.computed(() => {
|
|
21
|
+
return ns.cssVar({
|
|
22
|
+
"border-style": props.borderStyle
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
27
|
+
class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
|
|
28
|
+
style: vue.normalizeStyle(vue.unref(dividerStyle)),
|
|
29
|
+
role: "separator"
|
|
30
|
+
}, [
|
|
31
|
+
_ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
|
|
34
|
+
}, [
|
|
35
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
36
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
37
|
+
], 6);
|
|
38
|
+
};
|
|
22
39
|
}
|
|
23
40
|
});
|
|
41
|
+
var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "divider.vue"]]);
|
|
24
42
|
|
|
25
|
-
exports
|
|
43
|
+
exports["default"] = Divider;
|
|
26
44
|
//# sourceMappingURL=divider2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider2.js","sources":["../../../../../../packages/components/divider/src/divider.
|
|
1
|
+
{"version":3,"file":"divider2.js","sources":["../../../../../../packages/components/divider/src/divider.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), ns.m(direction)]\"\n :style=\"dividerStyle\"\n role=\"separator\"\n >\n <div\n v-if=\"$slots.default && direction !== 'vertical'\"\n :class=\"[ns.e('text'), ns.is(contentPosition)]\"\n >\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { dividerProps } from './divider'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElDivider',\n})\nconst props = defineProps(dividerProps)\nconst ns = useNamespace('divider')\nconst dividerStyle = computed(() => {\n return ns.cssVar({\n 'border-style': props.borderStyle,\n }) as CSSProperties\n})\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAM,MAAA,EAAA,GAAKA,mBAAa,SAAS,CAAA,CAAA;AACjC,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,OAAO,GAAG,MAAO,CAAA;AAAA,QACf,gBAAgB,KAAM,CAAA,WAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,6 +20,7 @@ const ElForm = install.withInstall(form$1["default"], {
|
|
|
20
20
|
const ElFormItem = install.withNoopInstall(formItem$1["default"]);
|
|
21
21
|
|
|
22
22
|
exports.formEmits = form.formEmits;
|
|
23
|
+
exports.formMetaProps = form.formMetaProps;
|
|
23
24
|
exports.formProps = form.formProps;
|
|
24
25
|
exports.formItemProps = formItem.formItemProps;
|
|
25
26
|
exports.formItemValidateStates = formItem.formItemValidateStates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { FormItemProp } from './form-item';
|
|
3
|
-
declare const formMetaProps: {
|
|
3
|
+
export declare const formMetaProps: {
|
|
4
4
|
readonly size: {
|
|
5
5
|
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
|
|
6
6
|
readonly required: false;
|
|
@@ -48,4 +48,3 @@ export declare const formEmits: {
|
|
|
48
48
|
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
49
49
|
};
|
|
50
50
|
export declare type FormEmits = typeof formEmits;
|
|
51
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\
|
|
1
|
+
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":["buildProps","componentSizes","definePropType","isArray","isString","isBoolean"],"mappings":";;;;;;;;;;;AAQY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,SAAS,GAAGD,kBAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEE,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE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