完全跑通1.0版本
This commit is contained in:
13
frontend/node_modules/element-plus/es/components/splitter/index.d.ts
generated
vendored
Normal file
13
frontend/node_modules/element-plus/es/components/splitter/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import { SplitterEmits, SplitterInstance, SplitterProps, SplitterPropsPublic, splitterEmits, splitterProps } from "./src/splitter.js";
|
||||
import _default from "./src/splitter.vue.js";
|
||||
import { SplitterPanelEmits, SplitterPanelInstance, SplitterPanelProps, SplitterPanelPropsPublic, splitterPanelEmits, splitterPanelProps } from "./src/split-panel.js";
|
||||
import _default$1 from "./src/split-panel.vue.js";
|
||||
|
||||
//#region ../../packages/components/splitter/index.d.ts
|
||||
declare const ElSplitter: SFCWithInstall<typeof _default> & {
|
||||
SplitPanel: typeof _default$1;
|
||||
};
|
||||
declare const ElSplitterPanel: SFCWithInstall<typeof _default$1>;
|
||||
//#endregion
|
||||
export { ElSplitter, ElSplitter as default, ElSplitterPanel, SplitterEmits, SplitterInstance, SplitterPanelEmits, SplitterPanelInstance, SplitterPanelProps, SplitterPanelPropsPublic, SplitterProps, SplitterPropsPublic, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps };
|
||||
12
frontend/node_modules/element-plus/es/components/splitter/index.mjs
generated
vendored
Normal file
12
frontend/node_modules/element-plus/es/components/splitter/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { withInstall, withNoopInstall } from "../../utils/vue/install.mjs";
|
||||
import { splitterEmits, splitterProps } from "./src/splitter.mjs";
|
||||
import splitter_default from "./src/splitter2.mjs";
|
||||
import { splitterPanelEmits, splitterPanelProps } from "./src/split-panel.mjs";
|
||||
import split_panel_default from "./src/split-panel2.mjs";
|
||||
//#region ../../packages/components/splitter/index.ts
|
||||
const ElSplitter = withInstall(splitter_default, { SplitPanel: split_panel_default });
|
||||
const ElSplitterPanel = withNoopInstall(split_panel_default);
|
||||
//#endregion
|
||||
export { ElSplitter, ElSplitter as default, ElSplitterPanel, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps };
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["Splitter","SplitPanel"],"sources":["../../../../../packages/components/splitter/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Splitter from './src/splitter.vue'\nimport SplitPanel from './src/split-panel.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElSplitter: SFCWithInstall<typeof Splitter> & {\n SplitPanel: typeof SplitPanel\n} = withInstall(Splitter, {\n SplitPanel,\n})\nexport default ElSplitter\n\nexport const ElSplitterPanel: SFCWithInstall<typeof SplitPanel> =\n withNoopInstall(SplitPanel)\n\nexport * from './src/splitter'\nexport * from './src/split-panel'\n"],"mappings":";;;;;;AAMA,MAAa,aAET,YAAYA,kBAAU,EACxB,YAAA,qBACD,CAAC;AAGF,MAAa,kBACX,gBAAgBC,oBAAW"}
|
||||
4
frontend/node_modules/element-plus/es/components/splitter/src/hooks/index.d.ts
generated
vendored
Normal file
4
frontend/node_modules/element-plus/es/components/splitter/src/hooks/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { useContainer } from "./useContainer.js";
|
||||
import { useResize } from "./useResize.js";
|
||||
import { getPct, getPx, isPct, isPx, useSize } from "./useSize.js";
|
||||
export { getPct, getPx, isPct, isPx, useContainer, useResize, useSize };
|
||||
4
frontend/node_modules/element-plus/es/components/splitter/src/hooks/index.mjs
generated
vendored
Normal file
4
frontend/node_modules/element-plus/es/components/splitter/src/hooks/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { useContainer } from "./useContainer.mjs";
|
||||
import { getPct, getPx, isPct, isPx, useSize } from "./useSize.mjs";
|
||||
import { useResize } from "./useResize.mjs";
|
||||
export { getPct, getPx, isPct, isPx, useContainer, useResize, useSize };
|
||||
10
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.d.ts
generated
vendored
Normal file
10
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as _$vue from "vue";
|
||||
import { Ref } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/hooks/useContainer.d.ts
|
||||
declare function useContainer(layout: Ref<'horizontal' | 'vertical'>): {
|
||||
containerEl: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
||||
containerSize: _$vue.ComputedRef<number>;
|
||||
};
|
||||
//#endregion
|
||||
export { useContainer };
|
||||
17
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
generated
vendored
Normal file
17
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { useElementSize } from "@vueuse/core";
|
||||
import { computed, ref } from "vue";
|
||||
//#region ../../packages/components/splitter/src/hooks/useContainer.ts
|
||||
function useContainer(layout) {
|
||||
const containerEl = ref();
|
||||
const { width, height } = useElementSize(containerEl);
|
||||
return {
|
||||
containerEl,
|
||||
containerSize: computed(() => {
|
||||
return layout.value === "horizontal" ? width.value : height.value;
|
||||
})
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { useContainer };
|
||||
|
||||
//# sourceMappingURL=useContainer.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"useContainer.mjs","names":[],"sources":["../../../../../../../packages/components/splitter/src/hooks/useContainer.ts"],"sourcesContent":["import { computed, ref } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nimport type { Ref } from 'vue'\n\nexport function useContainer(layout: Ref<'horizontal' | 'vertical'>) {\n const containerEl = ref<HTMLDivElement>()\n const { width, height } = useElementSize(containerEl)\n\n const containerSize = computed(() => {\n return layout.value === 'horizontal' ? width.value : height.value\n })\n\n return { containerEl, containerSize }\n}\n"],"mappings":";;;AAKA,SAAgB,aAAa,QAAwC;CACnE,MAAM,cAAc,KAAqB;CACzC,MAAM,EAAE,OAAO,WAAW,eAAe,YAAY;CAMrD,OAAO;EAAE;EAAa,eAJA,eAAe;GACnC,OAAO,OAAO,UAAU,eAAe,MAAM,QAAQ,OAAO;IAG3B;EAAE"}
|
||||
13
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.d.ts
generated
vendored
Normal file
13
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { PanelItemState } from "../type.js";
|
||||
|
||||
//#region ../../packages/components/splitter/src/hooks/usePanel.d.ts
|
||||
declare function getCollapsible(collapsible: boolean | {
|
||||
start?: boolean;
|
||||
end?: boolean;
|
||||
}): {
|
||||
start?: boolean;
|
||||
end?: boolean;
|
||||
};
|
||||
declare function isCollapsible(panel: PanelItemState | null | undefined, size: number, nextPanel: PanelItemState | null | undefined, nextSize: number): boolean;
|
||||
//#endregion
|
||||
export { getCollapsible, isCollapsible };
|
||||
18
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
generated
vendored
Normal file
18
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { isObject } from "../../../../utils/types.mjs";
|
||||
//#region ../../packages/components/splitter/src/hooks/usePanel.ts
|
||||
function getCollapsible(collapsible) {
|
||||
if (collapsible && isObject(collapsible)) return collapsible;
|
||||
return {
|
||||
start: !!collapsible,
|
||||
end: !!collapsible
|
||||
};
|
||||
}
|
||||
function isCollapsible(panel, size, nextPanel, nextSize) {
|
||||
if (panel?.collapsible.end && size > 0) return true;
|
||||
if (nextPanel?.collapsible.start && nextSize === 0 && size > 0) return true;
|
||||
return false;
|
||||
}
|
||||
//#endregion
|
||||
export { getCollapsible, isCollapsible };
|
||||
|
||||
//# sourceMappingURL=usePanel.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"usePanel.mjs","names":[],"sources":["../../../../../../../packages/components/splitter/src/hooks/usePanel.ts"],"sourcesContent":["import { isObject } from '@element-plus/utils'\n\nimport type { PanelItemState } from '../type'\n\nexport function getCollapsible(\n collapsible: boolean | { start?: boolean; end?: boolean }\n) {\n if (collapsible && isObject(collapsible)) {\n return collapsible\n }\n return {\n start: !!collapsible,\n end: !!collapsible,\n }\n}\n\nexport function isCollapsible(\n panel: PanelItemState | null | undefined,\n size: number,\n nextPanel: PanelItemState | null | undefined,\n nextSize: number\n) {\n // If the current panel is collapsible and has size, then it can be collapsed\n if (panel?.collapsible.end && size > 0) {\n return true\n }\n\n // If the next panel is collapsible and has no size, but the current panel has size, then it can be collapsed\n if (nextPanel?.collapsible.start && nextSize === 0 && size > 0) {\n return true\n }\n\n return false\n}\n"],"mappings":";;AAIA,SAAgB,eACd,aACA;CACA,IAAI,eAAe,SAAS,YAAY,EACtC,OAAO;CAET,OAAO;EACL,OAAO,CAAC,CAAC;EACT,KAAK,CAAC,CAAC;EACR;;AAGH,SAAgB,cACd,OACA,MACA,WACA,UACA;CAEA,IAAI,OAAO,YAAY,OAAO,OAAO,GACnC,OAAO;CAIT,IAAI,WAAW,YAAY,SAAS,aAAa,KAAK,OAAO,GAC3D,OAAO;CAGT,OAAO"}
|
||||
23
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.d.ts
generated
vendored
Normal file
23
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { PanelItemState } from "../type.js";
|
||||
import { ComputedRef, Ref } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/hooks/useResize.d.ts
|
||||
declare function useResize(panels: Ref<PanelItemState[]>, containerSize: ComputedRef<number>, pxSizes: ComputedRef<number[]>, lazy: Ref<boolean>): {
|
||||
lazyOffset: Ref<number, number>;
|
||||
onMoveStart: (index: number) => void;
|
||||
onMoving: (index: number, offset: number) => void;
|
||||
onMoveEnd: () => void;
|
||||
movingIndex: Ref<{
|
||||
index: number;
|
||||
confirmed: boolean;
|
||||
} | null, {
|
||||
index: number;
|
||||
confirmed: boolean;
|
||||
} | {
|
||||
index: number;
|
||||
confirmed: boolean;
|
||||
} | null>;
|
||||
onCollapse: (index: number, type: "start" | "end") => void;
|
||||
};
|
||||
//#endregion
|
||||
export { useResize };
|
||||
114
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
generated
vendored
Normal file
114
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
import { NOOP } from "../../../../utils/functions.mjs";
|
||||
import { getPct, getPx, isPct, isPx } from "./useSize.mjs";
|
||||
import { clamp } from "lodash-unified";
|
||||
import { computed, ref, watch } from "vue";
|
||||
//#region ../../packages/components/splitter/src/hooks/useResize.ts
|
||||
function useResize(panels, containerSize, pxSizes, lazy) {
|
||||
const ptg2px = (ptg) => ptg * containerSize.value || 0;
|
||||
function getLimitSize(str, defaultLimit) {
|
||||
if (isPct(str)) return ptg2px(getPct(str));
|
||||
else if (isPx(str)) return getPx(str);
|
||||
return str ?? defaultLimit;
|
||||
}
|
||||
const lazyOffset = ref(0);
|
||||
const movingIndex = ref(null);
|
||||
let cachePxSizes = [];
|
||||
let updatePanelSizes = NOOP;
|
||||
const limitSizes = computed(() => panels.value.map((item) => [item.min, item.max]));
|
||||
watch(lazy, () => {
|
||||
if (lazyOffset.value) {
|
||||
const mouseup = new MouseEvent("mouseup", { bubbles: true });
|
||||
window.dispatchEvent(mouseup);
|
||||
}
|
||||
});
|
||||
const onMoveStart = (index) => {
|
||||
lazyOffset.value = 0;
|
||||
movingIndex.value = {
|
||||
index,
|
||||
confirmed: false
|
||||
};
|
||||
cachePxSizes = pxSizes.value;
|
||||
};
|
||||
const onMoving = (index, offset) => {
|
||||
let confirmedIndex = null;
|
||||
if ((!movingIndex.value || !movingIndex.value.confirmed) && offset !== 0) {
|
||||
if (offset > 0) {
|
||||
confirmedIndex = index;
|
||||
movingIndex.value = {
|
||||
index,
|
||||
confirmed: true
|
||||
};
|
||||
} else for (let i = index; i >= 0; i -= 1) if (cachePxSizes[i] > 0) {
|
||||
confirmedIndex = i;
|
||||
movingIndex.value = {
|
||||
index: i,
|
||||
confirmed: true
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
const mergedIndex = confirmedIndex ?? movingIndex.value?.index ?? index;
|
||||
const numSizes = [...cachePxSizes];
|
||||
const nextIndex = mergedIndex + 1;
|
||||
const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0);
|
||||
const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0);
|
||||
const startMaxSize = getLimitSize(limitSizes.value[mergedIndex][1], containerSize.value || 0);
|
||||
const endMaxSize = getLimitSize(limitSizes.value[nextIndex][1], containerSize.value || 0);
|
||||
let mergedOffset = offset;
|
||||
if (numSizes[mergedIndex] + mergedOffset < startMinSize) mergedOffset = startMinSize - numSizes[mergedIndex];
|
||||
if (numSizes[nextIndex] - mergedOffset < endMinSize) mergedOffset = numSizes[nextIndex] - endMinSize;
|
||||
if (numSizes[mergedIndex] + mergedOffset > startMaxSize) mergedOffset = startMaxSize - numSizes[mergedIndex];
|
||||
if (numSizes[nextIndex] - mergedOffset > endMaxSize) mergedOffset = numSizes[nextIndex] - endMaxSize;
|
||||
numSizes[mergedIndex] += mergedOffset;
|
||||
numSizes[nextIndex] -= mergedOffset;
|
||||
lazyOffset.value = mergedOffset;
|
||||
updatePanelSizes = () => {
|
||||
panels.value.forEach((panel, index) => {
|
||||
panel.size = numSizes[index];
|
||||
});
|
||||
updatePanelSizes = NOOP;
|
||||
};
|
||||
if (!lazy.value) updatePanelSizes();
|
||||
};
|
||||
const onMoveEnd = () => {
|
||||
if (lazy.value) updatePanelSizes();
|
||||
lazyOffset.value = 0;
|
||||
movingIndex.value = null;
|
||||
cachePxSizes = [];
|
||||
};
|
||||
const cacheCollapsedSize = [];
|
||||
const onCollapse = (index, type) => {
|
||||
if (!cacheCollapsedSize.length) cacheCollapsedSize.push(...pxSizes.value.map((size, i) => size <= 0 ? getLimitSize(limitSizes.value[i]?.[0], 0) : size));
|
||||
const currentSizes = pxSizes.value;
|
||||
const currentIndex = type === "start" ? index : index + 1;
|
||||
const targetIndex = type === "start" ? index + 1 : index;
|
||||
const currentSize = currentSizes[currentIndex];
|
||||
const targetSize = currentSizes[targetIndex];
|
||||
if (currentSize !== 0 && targetSize !== 0) {
|
||||
currentSizes[currentIndex] = 0;
|
||||
currentSizes[targetIndex] += currentSize;
|
||||
cacheCollapsedSize[index] = currentSize;
|
||||
} else {
|
||||
const totalSize = currentSize + targetSize;
|
||||
const targetCacheCollapsedSize = clamp(cacheCollapsedSize[index], 0, totalSize);
|
||||
const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
|
||||
currentSizes[targetIndex] = targetCacheCollapsedSize;
|
||||
currentSizes[currentIndex] = currentCacheCollapsedSize;
|
||||
}
|
||||
panels.value.forEach((panel, index) => {
|
||||
panel.size = currentSizes[index];
|
||||
});
|
||||
};
|
||||
return {
|
||||
lazyOffset,
|
||||
onMoveStart,
|
||||
onMoving,
|
||||
onMoveEnd,
|
||||
movingIndex,
|
||||
onCollapse
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { useResize };
|
||||
|
||||
//# sourceMappingURL=useResize.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.d.ts
generated
vendored
Normal file
14
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { PanelItemState } from "../type.js";
|
||||
import { ComputedRef, Ref } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/hooks/useSize.d.ts
|
||||
declare function getPct(str: string): number;
|
||||
declare function getPx(str: string): number;
|
||||
declare function isPct(itemSize: string | number | undefined): itemSize is string;
|
||||
declare function isPx(itemSize: string | number | undefined): itemSize is string;
|
||||
declare function useSize(panels: Ref<PanelItemState[]>, containerSize: ComputedRef<number>): {
|
||||
percentSizes: Ref<number[], number[]>;
|
||||
pxSizes: ComputedRef<number[]>;
|
||||
};
|
||||
//#endregion
|
||||
export { getPct, getPx, isPct, isPx, useSize };
|
||||
58
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
generated
vendored
Normal file
58
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
import { isString } from "../../../../utils/types.mjs";
|
||||
import { computed, ref, watch } from "vue";
|
||||
//#region ../../packages/components/splitter/src/hooks/useSize.ts
|
||||
function getPct(str) {
|
||||
return Number(str.slice(0, -1)) / 100;
|
||||
}
|
||||
function getPx(str) {
|
||||
return Number(str.slice(0, -2));
|
||||
}
|
||||
function isPct(itemSize) {
|
||||
return isString(itemSize) && itemSize.endsWith("%");
|
||||
}
|
||||
function isPx(itemSize) {
|
||||
return isString(itemSize) && itemSize.endsWith("px");
|
||||
}
|
||||
function useSize(panels, containerSize) {
|
||||
const propSizes = computed(() => panels.value.map((i) => i.size));
|
||||
const panelCounts = computed(() => panels.value.length);
|
||||
const percentSizes = ref([]);
|
||||
watch([
|
||||
propSizes,
|
||||
panelCounts,
|
||||
containerSize
|
||||
], () => {
|
||||
let ptgList = [];
|
||||
let emptyCount = 0;
|
||||
for (let i = 0; i < panelCounts.value; i += 1) {
|
||||
const itemSize = panels.value[i]?.size;
|
||||
if (isPct(itemSize)) ptgList[i] = getPct(itemSize);
|
||||
else if (isPx(itemSize)) ptgList[i] = getPx(itemSize) / containerSize.value;
|
||||
else if (itemSize || itemSize === 0) {
|
||||
const num = Number(itemSize);
|
||||
if (!Number.isNaN(num)) ptgList[i] = num / containerSize.value;
|
||||
} else {
|
||||
emptyCount += 1;
|
||||
ptgList[i] = void 0;
|
||||
}
|
||||
}
|
||||
const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
|
||||
if (totalPtg > 1 || !emptyCount) {
|
||||
const scale = 1 / totalPtg;
|
||||
ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale);
|
||||
} else {
|
||||
const avgRest = (1 - totalPtg) / emptyCount;
|
||||
ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg);
|
||||
}
|
||||
percentSizes.value = ptgList;
|
||||
});
|
||||
const ptg2px = (ptg) => ptg * containerSize.value;
|
||||
return {
|
||||
percentSizes,
|
||||
pxSizes: computed(() => percentSizes.value.map(ptg2px))
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { getPct, getPx, isPct, isPx, useSize };
|
||||
|
||||
//# sourceMappingURL=useSize.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"useSize.mjs","names":[],"sources":["../../../../../../../packages/components/splitter/src/hooks/useSize.ts"],"sourcesContent":["import { computed, ref, watch } from 'vue'\nimport { isString } from '@element-plus/utils'\n\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PanelItemState } from '../type'\n\nexport function getPct(str: string) {\n return Number(str.slice(0, -1)) / 100\n}\n\nexport function getPx(str: string) {\n return Number(str.slice(0, -2))\n}\n\nexport function isPct(\n itemSize: string | number | undefined\n): itemSize is string {\n return isString(itemSize) && itemSize.endsWith('%')\n}\n\nexport function isPx(\n itemSize: string | number | undefined\n): itemSize is string {\n return isString(itemSize) && itemSize.endsWith('px')\n}\n\nexport function useSize(\n panels: Ref<PanelItemState[]>,\n containerSize: ComputedRef<number>\n) {\n const propSizes = computed(() => panels.value.map((i) => i.size))\n\n const panelCounts = computed(() => panels.value.length)\n\n const percentSizes = ref<number[]>([])\n\n watch([propSizes, panelCounts, containerSize], () => {\n let ptgList: (number | undefined)[] = []\n let emptyCount = 0\n\n // Convert the passed props size to a percentage\n for (let i = 0; i < panelCounts.value; i += 1) {\n const itemSize = panels.value[i]?.size\n\n if (isPct(itemSize)) {\n ptgList[i] = getPct(itemSize)\n } else if (isPx(itemSize)) {\n ptgList[i] = getPx(itemSize) / containerSize.value\n } else if (itemSize || itemSize === 0) {\n const num = Number(itemSize)\n\n if (!Number.isNaN(num)) {\n ptgList[i] = num / containerSize.value\n }\n } else {\n emptyCount += 1\n ptgList[i] = undefined\n }\n }\n\n const totalPtg = ptgList.reduce<number>((acc, ptg) => acc + (ptg || 0), 0)\n\n if (totalPtg > 1 || !emptyCount) {\n // If it is greater than 1, the scaling ratio\n const scale = 1 / totalPtg\n ptgList = ptgList.map((ptg) => (ptg === undefined ? 0 : ptg * scale))\n } else {\n // If it is less than 1, the filling ratio\n const avgRest = (1 - totalPtg) / emptyCount\n ptgList = ptgList.map((ptg) => (ptg === undefined ? avgRest : ptg))\n }\n\n percentSizes.value = ptgList as number[]\n })\n\n const ptg2px = (ptg: number) => ptg * containerSize.value\n const pxSizes = computed(() => percentSizes.value.map(ptg2px))\n\n return { percentSizes, pxSizes }\n}\n"],"mappings":";;;AAMA,SAAgB,OAAO,KAAa;CAClC,OAAO,OAAO,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG;;AAGpC,SAAgB,MAAM,KAAa;CACjC,OAAO,OAAO,IAAI,MAAM,GAAG,GAAG,CAAC;;AAGjC,SAAgB,MACd,UACoB;CACpB,OAAO,SAAS,SAAS,IAAI,SAAS,SAAS,IAAI;;AAGrD,SAAgB,KACd,UACoB;CACpB,OAAO,SAAS,SAAS,IAAI,SAAS,SAAS,KAAK;;AAGtD,SAAgB,QACd,QACA,eACA;CACA,MAAM,YAAY,eAAe,OAAO,MAAM,KAAK,MAAM,EAAE,KAAK,CAAC;CAEjE,MAAM,cAAc,eAAe,OAAO,MAAM,OAAO;CAEvD,MAAM,eAAe,IAAc,EAAE,CAAC;CAEtC,MAAM;EAAC;EAAW;EAAa;EAAc,QAAQ;EACnD,IAAI,UAAkC,EAAE;EACxC,IAAI,aAAa;EAGjB,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,OAAO,KAAK,GAAG;GAC7C,MAAM,WAAW,OAAO,MAAM,IAAI;GAElC,IAAI,MAAM,SAAS,EACjB,QAAQ,KAAK,OAAO,SAAS;QACxB,IAAI,KAAK,SAAS,EACvB,QAAQ,KAAK,MAAM,SAAS,GAAG,cAAc;QACxC,IAAI,YAAY,aAAa,GAAG;IACrC,MAAM,MAAM,OAAO,SAAS;IAE5B,IAAI,CAAC,OAAO,MAAM,IAAI,EACpB,QAAQ,KAAK,MAAM,cAAc;UAE9B;IACL,cAAc;IACd,QAAQ,KAAK,KAAA;;;EAIjB,MAAM,WAAW,QAAQ,QAAgB,KAAK,QAAQ,OAAO,OAAO,IAAI,EAAE;EAE1E,IAAI,WAAW,KAAK,CAAC,YAAY;GAE/B,MAAM,QAAQ,IAAI;GAClB,UAAU,QAAQ,KAAK,QAAS,QAAQ,KAAA,IAAY,IAAI,MAAM,MAAO;SAChE;GAEL,MAAM,WAAW,IAAI,YAAY;GACjC,UAAU,QAAQ,KAAK,QAAS,QAAQ,KAAA,IAAY,UAAU,IAAK;;EAGrE,aAAa,QAAQ;GACrB;CAEF,MAAM,UAAU,QAAgB,MAAM,cAAc;CAGpD,OAAO;EAAE;EAAc,SAFP,eAAe,aAAa,MAAM,IAAI,OAAO,CAE/B;EAAE"}
|
||||
7
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import split_bar_vue_vue_type_script_setup_true_lang_default from "./split-bar.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/splitter/src/split-bar.vue
|
||||
var split_bar_default = split_bar_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { split_bar_default as default };
|
||||
|
||||
//# sourceMappingURL=split-bar.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"split-bar.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/split-bar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport {\n ArrowDown,\n ArrowLeft,\n ArrowRight,\n ArrowUp,\n} from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nconst ns = useNamespace('splitter-bar')\n\ndefineOptions({\n name: 'ElSplitterBar',\n})\n\nconst props = defineProps({\n index: {\n type: Number,\n required: true,\n },\n layout: {\n type: String,\n values: ['horizontal', 'vertical'] as const,\n default: 'horizontal',\n },\n resizable: {\n type: Boolean,\n default: true,\n },\n lazy: Boolean,\n startCollapsible: Boolean,\n endCollapsible: Boolean,\n})\n\nconst emit = defineEmits(['moveStart', 'moving', 'moveEnd', 'collapse'])\n\nconst isHorizontal = computed(() => props.layout === 'horizontal')\n\nconst barWrapStyles = computed(() => {\n if (isHorizontal.value) {\n return { width: 0 }\n }\n return { height: 0 }\n})\n\nconst draggerStyles = computed(() => {\n return {\n width: isHorizontal.value ? '16px' : '100%',\n height: isHorizontal.value ? '100%' : '16px',\n cursor: !props.resizable\n ? 'auto'\n : isHorizontal.value\n ? 'ew-resize'\n : 'ns-resize',\n touchAction: 'none',\n }\n})\n\nconst draggerPseudoClass = computed(() => {\n const prefix = ns.e('dragger')\n return {\n [`${prefix}-horizontal`]: isHorizontal.value,\n [`${prefix}-vertical`]: !isHorizontal.value,\n [`${prefix}-active`]: !!startPos.value,\n }\n})\n\nconst startPos = ref<[x: number, y: number] | null>(null)\n\n// Start dragging\nconst onMousedown = (e: MouseEvent) => {\n if (!props.resizable) return\n startPos.value = [e.pageX, e.pageY]\n emit('moveStart', props.index)\n window.addEventListener('mouseup', onMouseUp)\n window.addEventListener('mousemove', onMouseMove)\n}\n\nconst onTouchStart = (e: TouchEvent) => {\n if (props.resizable && e.touches.length === 1) {\n e.preventDefault()\n const touch = e.touches[0]\n startPos.value = [touch.pageX, touch.pageY]\n emit('moveStart', props.index)\n window.addEventListener('touchend', onTouchEnd)\n window.addEventListener('touchmove', onTouchMove)\n }\n}\n\n// During dragging\nconst onMouseMove = (e: MouseEvent) => {\n const { pageX, pageY } = e\n const offsetX = pageX - startPos.value![0]\n const offsetY = pageY - startPos.value![1]\n const offset = isHorizontal.value ? offsetX : offsetY\n emit('moving', props.index, offset)\n}\n\nconst onTouchMove = (e: TouchEvent) => {\n if (e.touches.length === 1) {\n e.preventDefault()\n const touch = e.touches[0]\n const offsetX = touch.pageX - startPos.value![0]\n const offsetY = touch.pageY - startPos.value![1]\n const offset = isHorizontal.value ? offsetX : offsetY\n emit('moving', props.index, offset)\n }\n}\n\n// End dragging\nconst onMouseUp = () => {\n startPos.value = null\n window.removeEventListener('mouseup', onMouseUp)\n window.removeEventListener('mousemove', onMouseMove)\n emit('moveEnd', props.index)\n}\n\nconst onTouchEnd = () => {\n startPos.value = null\n window.removeEventListener('touchend', onTouchEnd)\n window.removeEventListener('touchmove', onTouchMove)\n emit('moveEnd', props.index)\n}\n\nconst StartIcon = computed(() => (isHorizontal.value ? ArrowLeft : ArrowUp))\nconst EndIcon = computed(() => (isHorizontal.value ? ArrowRight : ArrowDown))\n</script>\n\n<template>\n <div :class=\"[ns.b()]\" :style=\"barWrapStyles\">\n <div\n v-if=\"startCollapsible\"\n :class=\"[ns.e('collapse-icon'), ns.e(`${layout}-collapse-icon-start`)]\"\n @click=\"emit('collapse', index, 'start')\"\n >\n <slot name=\"start-collapsible\">\n <component :is=\"StartIcon\" style=\"width: 12px; height: 12px\" />\n </slot>\n </div>\n\n <div\n :class=\"[\n ns.e('dragger'),\n draggerPseudoClass,\n ns.is('disabled', !resizable),\n ns.is('lazy', resizable && lazy),\n ]\"\n :style=\"draggerStyles\"\n @mousedown=\"onMousedown\"\n @touchstart=\"onTouchStart\"\n />\n <div\n v-if=\"endCollapsible\"\n :class=\"[ns.e('collapse-icon'), ns.e(`${layout}-collapse-icon-end`)]\"\n @click=\"emit('collapse', index, 'end')\"\n >\n <slot name=\"end-collapsible\">\n <component :is=\"EndIcon\" style=\"width: 12px; height: 12px\" />\n </slot>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
||||
69
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue.d.ts
generated
vendored
Normal file
69
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/split-bar.vue.d.ts
|
||||
declare var __VLS_1: {}, __VLS_8: {};
|
||||
type __VLS_Slots = {} & {
|
||||
'start-collapsible'?: (props: typeof __VLS_1) => any;
|
||||
} & {
|
||||
'end-collapsible'?: (props: typeof __VLS_8) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
index: {
|
||||
type: NumberConstructor;
|
||||
required: true;
|
||||
};
|
||||
layout: {
|
||||
type: StringConstructor;
|
||||
values: readonly ["horizontal", "vertical"];
|
||||
default: string;
|
||||
};
|
||||
resizable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
lazy: BooleanConstructor;
|
||||
startCollapsible: BooleanConstructor;
|
||||
endCollapsible: BooleanConstructor;
|
||||
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
collapse: (...args: any[]) => void;
|
||||
moveStart: (...args: any[]) => void;
|
||||
moving: (...args: any[]) => void;
|
||||
moveEnd: (...args: any[]) => void;
|
||||
}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
index: {
|
||||
type: NumberConstructor;
|
||||
required: true;
|
||||
};
|
||||
layout: {
|
||||
type: StringConstructor;
|
||||
values: readonly ["horizontal", "vertical"];
|
||||
default: string;
|
||||
};
|
||||
resizable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
lazy: BooleanConstructor;
|
||||
startCollapsible: BooleanConstructor;
|
||||
endCollapsible: BooleanConstructor;
|
||||
}>> & Readonly<{
|
||||
onCollapse?: ((...args: any[]) => any) | undefined;
|
||||
onMoveStart?: ((...args: any[]) => any) | undefined;
|
||||
onMoving?: ((...args: any[]) => any) | undefined;
|
||||
onMoveEnd?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
layout: string;
|
||||
lazy: boolean;
|
||||
resizable: boolean;
|
||||
startCollapsible: boolean;
|
||||
endCollapsible: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
145
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
145
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp } from "@element-plus/icons-vue";
|
||||
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, unref } from "vue";
|
||||
//#region ../../packages/components/splitter/src/split-bar.vue?vue&type=script&setup=true&lang.ts
|
||||
var split_bar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElSplitterBar",
|
||||
__name: "split-bar",
|
||||
props: {
|
||||
index: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
values: ["horizontal", "vertical"],
|
||||
default: "horizontal"
|
||||
},
|
||||
resizable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
lazy: Boolean,
|
||||
startCollapsible: Boolean,
|
||||
endCollapsible: Boolean
|
||||
},
|
||||
emits: [
|
||||
"moveStart",
|
||||
"moving",
|
||||
"moveEnd",
|
||||
"collapse"
|
||||
],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const ns = useNamespace("splitter-bar");
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const isHorizontal = computed(() => props.layout === "horizontal");
|
||||
const barWrapStyles = computed(() => {
|
||||
if (isHorizontal.value) return { width: 0 };
|
||||
return { height: 0 };
|
||||
});
|
||||
const draggerStyles = computed(() => {
|
||||
return {
|
||||
width: isHorizontal.value ? "16px" : "100%",
|
||||
height: isHorizontal.value ? "100%" : "16px",
|
||||
cursor: !props.resizable ? "auto" : isHorizontal.value ? "ew-resize" : "ns-resize",
|
||||
touchAction: "none"
|
||||
};
|
||||
});
|
||||
const draggerPseudoClass = computed(() => {
|
||||
const prefix = ns.e("dragger");
|
||||
return {
|
||||
[`${prefix}-horizontal`]: isHorizontal.value,
|
||||
[`${prefix}-vertical`]: !isHorizontal.value,
|
||||
[`${prefix}-active`]: !!startPos.value
|
||||
};
|
||||
});
|
||||
const startPos = ref(null);
|
||||
const onMousedown = (e) => {
|
||||
if (!props.resizable) return;
|
||||
startPos.value = [e.pageX, e.pageY];
|
||||
emit("moveStart", props.index);
|
||||
window.addEventListener("mouseup", onMouseUp);
|
||||
window.addEventListener("mousemove", onMouseMove);
|
||||
};
|
||||
const onTouchStart = (e) => {
|
||||
if (props.resizable && e.touches.length === 1) {
|
||||
e.preventDefault();
|
||||
const touch = e.touches[0];
|
||||
startPos.value = [touch.pageX, touch.pageY];
|
||||
emit("moveStart", props.index);
|
||||
window.addEventListener("touchend", onTouchEnd);
|
||||
window.addEventListener("touchmove", onTouchMove);
|
||||
}
|
||||
};
|
||||
const onMouseMove = (e) => {
|
||||
const { pageX, pageY } = e;
|
||||
const offsetX = pageX - startPos.value[0];
|
||||
const offsetY = pageY - startPos.value[1];
|
||||
const offset = isHorizontal.value ? offsetX : offsetY;
|
||||
emit("moving", props.index, offset);
|
||||
};
|
||||
const onTouchMove = (e) => {
|
||||
if (e.touches.length === 1) {
|
||||
e.preventDefault();
|
||||
const touch = e.touches[0];
|
||||
const offsetX = touch.pageX - startPos.value[0];
|
||||
const offsetY = touch.pageY - startPos.value[1];
|
||||
const offset = isHorizontal.value ? offsetX : offsetY;
|
||||
emit("moving", props.index, offset);
|
||||
}
|
||||
};
|
||||
const onMouseUp = () => {
|
||||
startPos.value = null;
|
||||
window.removeEventListener("mouseup", onMouseUp);
|
||||
window.removeEventListener("mousemove", onMouseMove);
|
||||
emit("moveEnd", props.index);
|
||||
};
|
||||
const onTouchEnd = () => {
|
||||
startPos.value = null;
|
||||
window.removeEventListener("touchend", onTouchEnd);
|
||||
window.removeEventListener("touchmove", onTouchMove);
|
||||
emit("moveEnd", props.index);
|
||||
};
|
||||
const StartIcon = computed(() => isHorizontal.value ? ArrowLeft : ArrowUp);
|
||||
const EndIcon = computed(() => isHorizontal.value ? ArrowRight : ArrowDown);
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass([unref(ns).b()]),
|
||||
style: normalizeStyle(barWrapStyles.value)
|
||||
}, [
|
||||
__props.startCollapsible ? (openBlock(), createElementBlock("div", {
|
||||
key: 0,
|
||||
class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]),
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => emit("collapse", __props.index, "start"))
|
||||
}, [renderSlot(_ctx.$slots, "start-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(StartIcon.value), { style: {
|
||||
"width": "12px",
|
||||
"height": "12px"
|
||||
} }))])], 2)) : createCommentVNode("v-if", true),
|
||||
createElementVNode("div", {
|
||||
class: normalizeClass([
|
||||
unref(ns).e("dragger"),
|
||||
draggerPseudoClass.value,
|
||||
unref(ns).is("disabled", !__props.resizable),
|
||||
unref(ns).is("lazy", __props.resizable && __props.lazy)
|
||||
]),
|
||||
style: normalizeStyle(draggerStyles.value),
|
||||
onMousedown,
|
||||
onTouchstart: onTouchStart
|
||||
}, null, 38),
|
||||
__props.endCollapsible ? (openBlock(), createElementBlock("div", {
|
||||
key: 1,
|
||||
class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]),
|
||||
onClick: _cache[1] || (_cache[1] = ($event) => emit("collapse", __props.index, "end"))
|
||||
}, [renderSlot(_ctx.$slots, "end-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(EndIcon.value), { style: {
|
||||
"width": "12px",
|
||||
"height": "12px"
|
||||
} }))])], 2)) : createCommentVNode("v-if", true)
|
||||
], 6);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { split_bar_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=split-bar.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
49
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.d.ts
generated
vendored
Normal file
49
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import _default from "./split-panel.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/split-panel.d.ts
|
||||
interface SplitterPanelProps {
|
||||
min?: string | number;
|
||||
max?: string | number;
|
||||
size?: string | number;
|
||||
resizable?: boolean;
|
||||
collapsible?: boolean;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
|
||||
*/
|
||||
declare const splitterPanelProps: {
|
||||
readonly min: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly max: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly resizable: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly collapsible: BooleanConstructor;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
|
||||
*/
|
||||
type SplitterPanelPropsPublic = ExtractPublicPropTypes<typeof splitterPanelProps>;
|
||||
type SplitterPanelInstance = InstanceType<typeof _default> & unknown;
|
||||
declare const splitterPanelEmits: {
|
||||
'update:size': (value: number | string) => boolean;
|
||||
};
|
||||
type SplitterPanelEmits = typeof splitterPanelEmits;
|
||||
//#endregion
|
||||
export { SplitterPanelEmits, SplitterPanelInstance, SplitterPanelProps, SplitterPanelPropsPublic, splitterPanelEmits, splitterPanelProps };
|
||||
20
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.mjs
generated
vendored
Normal file
20
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
||||
//#region ../../packages/components/splitter/src/split-panel.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
|
||||
*/
|
||||
const splitterPanelProps = buildProps({
|
||||
min: { type: [String, Number] },
|
||||
max: { type: [String, Number] },
|
||||
size: { type: [String, Number] },
|
||||
resizable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
collapsible: Boolean
|
||||
});
|
||||
const splitterPanelEmits = { "update:size": (value) => typeof value === "number" || typeof value === "string" };
|
||||
//#endregion
|
||||
export { splitterPanelEmits, splitterPanelProps };
|
||||
|
||||
//# sourceMappingURL=split-panel.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"split-panel.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/split-panel.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type SplitterPanel from './split-panel.vue'\n\nexport interface SplitterPanelProps {\n min?: string | number\n max?: string | number\n size?: string | number\n resizable?: boolean\n collapsible?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.\n */\nexport const splitterPanelProps = buildProps({\n min: {\n type: [String, Number],\n },\n max: {\n type: [String, Number],\n },\n size: {\n type: [String, Number],\n },\n resizable: {\n type: Boolean,\n default: true,\n },\n collapsible: Boolean,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.\n */\nexport type SplitterPanelPropsPublic = ExtractPublicPropTypes<\n typeof splitterPanelProps\n>\nexport type SplitterPanelInstance = InstanceType<typeof SplitterPanel> & unknown\n\nexport const splitterPanelEmits = {\n 'update:size': (value: number | string) =>\n typeof value === 'number' || typeof value === 'string',\n}\n\nexport type SplitterPanelEmits = typeof splitterPanelEmits\n"],"mappings":";;;;;AAgBA,MAAa,qBAAqB,WAAW;CAC3C,KAAK,EACH,MAAM,CAAC,QAAQ,OAAO,EACvB;CACD,KAAK,EACH,MAAM,CAAC,QAAQ,OAAO,EACvB;CACD,MAAM,EACJ,MAAM,CAAC,QAAQ,OAAO,EACvB;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,aAAa;CACd,CAAU;AAUX,MAAa,qBAAqB,EAChC,gBAAgB,UACd,OAAO,UAAU,YAAY,OAAO,UAAU,UACjD"}
|
||||
30
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue.d.ts
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { SplitterPanelProps } from "./split-panel.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/split-panel.vue.d.ts
|
||||
declare var __VLS_1: {}, __VLS_15: {}, __VLS_18: {};
|
||||
type __VLS_Slots = {} & {
|
||||
default?: (props: typeof __VLS_1) => any;
|
||||
} & {
|
||||
'start-collapsible'?: (props: typeof __VLS_15) => any;
|
||||
} & {
|
||||
'end-collapsible'?: (props: typeof __VLS_18) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<SplitterPanelProps, {
|
||||
/** @description splitter-panel html element */splitterPanelRef: _$vue.Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
"update:size": (value: string | number) => void;
|
||||
}, string, _$vue.PublicProps, Readonly<SplitterPanelProps> & Readonly<{
|
||||
"onUpdate:size"?: ((value: string | number) => any) | undefined;
|
||||
}>, {
|
||||
resizable: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
136
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
136
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
import { throwError } from "../../../utils/error.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { getPct, getPx, isPct, isPx } from "./hooks/useSize.mjs";
|
||||
import { splitterRootContextKey } from "./type.mjs";
|
||||
import { splitterPanelEmits, splitterPanelProps } from "./split-panel.mjs";
|
||||
import { getCollapsible, isCollapsible } from "./hooks/usePanel.mjs";
|
||||
import split_bar_default from "./split-bar.mjs";
|
||||
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, inject, mergeProps, nextTick, onBeforeUnmount, openBlock, reactive, ref, renderSlot, toRefs, unref, watch, withCtx } from "vue";
|
||||
//#region ../../packages/components/splitter/src/split-panel.vue?vue&type=script&setup=true&lang.ts
|
||||
const COMPONENT_NAME = "ElSplitterPanel";
|
||||
var split_panel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: COMPONENT_NAME,
|
||||
__name: "split-panel",
|
||||
props: splitterPanelProps,
|
||||
emits: splitterPanelEmits,
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const ns = useNamespace("splitter-panel");
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const splitterContext = inject(splitterRootContextKey);
|
||||
if (!splitterContext) throwError(COMPONENT_NAME, "usage: <el-splitter><el-splitter-panel /></el-splitter/>");
|
||||
const { panels, layout, lazy, containerSize, pxSizes } = toRefs(splitterContext);
|
||||
const { registerPanel, unregisterPanel, onCollapse, onMoveEnd, onMoveStart, onMoving } = splitterContext;
|
||||
const panelEl = ref();
|
||||
const instance = getCurrentInstance();
|
||||
const uid = instance.uid;
|
||||
const index = ref(0);
|
||||
const panel = computed(() => panels.value[index.value]);
|
||||
const setIndex = (val) => {
|
||||
index.value = val;
|
||||
};
|
||||
const panelSize = computed(() => {
|
||||
if (!panel.value) return 0;
|
||||
return pxSizes.value[index.value] ?? 0;
|
||||
});
|
||||
const nextSize = computed(() => {
|
||||
if (!panel.value) return 0;
|
||||
return pxSizes.value[index.value + 1] ?? 0;
|
||||
});
|
||||
const nextPanel = computed(() => {
|
||||
if (panel.value) return panels.value[index.value + 1];
|
||||
return null;
|
||||
});
|
||||
const isResizable = computed(() => {
|
||||
if (!nextPanel.value) return false;
|
||||
return props.resizable && nextPanel.value?.resizable && (panelSize.value !== 0 || !props.min) && (nextSize.value !== 0 || !nextPanel.value.min);
|
||||
});
|
||||
const isShowBar = computed(() => {
|
||||
if (!panel.value) return false;
|
||||
return index.value !== panels.value.length - 1;
|
||||
});
|
||||
const startCollapsible = computed(() => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value));
|
||||
const endCollapsible = computed(() => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value));
|
||||
function sizeToPx(str) {
|
||||
if (isPct(str)) return getPct(str) * containerSize.value || 0;
|
||||
else if (isPx(str)) return getPx(str);
|
||||
return str ?? 0;
|
||||
}
|
||||
let isSizeUpdating = false;
|
||||
watch(() => props.size, () => {
|
||||
if (!isSizeUpdating && panel.value) {
|
||||
if (!containerSize.value) {
|
||||
panel.value.size = props.size;
|
||||
return;
|
||||
}
|
||||
const size = sizeToPx(props.size);
|
||||
const maxSize = sizeToPx(props.max);
|
||||
const minSize = sizeToPx(props.min);
|
||||
const finalSize = Math.min(Math.max(size, minSize || 0), maxSize || size);
|
||||
if (finalSize !== size) emits("update:size", finalSize);
|
||||
panel.value.size = finalSize;
|
||||
}
|
||||
});
|
||||
watch(() => panel.value?.size, (val) => {
|
||||
if (val !== props.size) {
|
||||
isSizeUpdating = true;
|
||||
emits("update:size", val);
|
||||
nextTick(() => isSizeUpdating = false);
|
||||
}
|
||||
});
|
||||
watch(() => props.resizable, (val) => {
|
||||
if (panel.value) panel.value.resizable = val;
|
||||
});
|
||||
const _panel = reactive({
|
||||
uid,
|
||||
getVnode: () => instance.vnode,
|
||||
setIndex,
|
||||
...props,
|
||||
collapsible: computed(() => getCollapsible(props.collapsible))
|
||||
});
|
||||
registerPanel(_panel);
|
||||
onBeforeUnmount(() => unregisterPanel(_panel));
|
||||
__expose({
|
||||
/** @description splitter-panel html element */
|
||||
splitterPanelRef: panelEl });
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", mergeProps({
|
||||
ref_key: "panelEl",
|
||||
ref: panelEl,
|
||||
class: [unref(ns).b()],
|
||||
style: { flexBasis: `${panelSize.value}px` }
|
||||
}, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16), isShowBar.value ? (openBlock(), createBlock(split_bar_default, {
|
||||
key: 0,
|
||||
index: index.value,
|
||||
layout: unref(layout),
|
||||
lazy: unref(lazy),
|
||||
resizable: isResizable.value,
|
||||
"start-collapsible": startCollapsible.value,
|
||||
"end-collapsible": endCollapsible.value,
|
||||
onMoveStart: unref(onMoveStart),
|
||||
onMoving: unref(onMoving),
|
||||
onMoveEnd: unref(onMoveEnd),
|
||||
onCollapse: unref(onCollapse)
|
||||
}, {
|
||||
"start-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "start-collapsible")]),
|
||||
"end-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "end-collapsible")]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"index",
|
||||
"layout",
|
||||
"lazy",
|
||||
"resizable",
|
||||
"start-collapsible",
|
||||
"end-collapsible",
|
||||
"onMoveStart",
|
||||
"onMoving",
|
||||
"onMoveEnd",
|
||||
"onCollapse"
|
||||
])) : createCommentVNode("v-if", true)], 64);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { split_panel_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=split-panel.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import split_panel_vue_vue_type_script_setup_true_lang_default from "./split-panel.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/splitter/src/split-panel.vue
|
||||
var split_panel_default = split_panel_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { split_panel_default as default };
|
||||
|
||||
//# sourceMappingURL=split-panel2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/split-panel2.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
31
frontend/node_modules/element-plus/es/components/splitter/src/splitter.d.ts
generated
vendored
Normal file
31
frontend/node_modules/element-plus/es/components/splitter/src/splitter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { EpPropFinalized } from "../../../utils/vue/props/types.js";
|
||||
import { Layout } from "./type.js";
|
||||
import _default from "./splitter.vue.js";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/splitter.d.ts
|
||||
interface SplitterProps {
|
||||
layout?: Layout;
|
||||
lazy?: boolean;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
|
||||
*/
|
||||
declare const splitterProps: {
|
||||
readonly layout: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
|
||||
readonly lazy: BooleanConstructor;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
|
||||
*/
|
||||
type SplitterPropsPublic = ExtractPublicPropTypes<typeof splitterProps>;
|
||||
type SplitterInstance = InstanceType<typeof _default> & unknown;
|
||||
declare const splitterEmits: {
|
||||
resizeStart: (index: number, sizes: number[]) => boolean;
|
||||
resize: (index: number, sizes: number[]) => boolean;
|
||||
resizeEnd: (index: number, sizes: number[]) => boolean;
|
||||
collapse: (index: number, type: "start" | "end", sizes: number[]) => boolean;
|
||||
};
|
||||
type SplitterEmits = typeof splitterEmits;
|
||||
//#endregion
|
||||
export { SplitterEmits, SplitterInstance, SplitterProps, SplitterPropsPublic, splitterEmits, splitterProps };
|
||||
23
frontend/node_modules/element-plus/es/components/splitter/src/splitter.mjs
generated
vendored
Normal file
23
frontend/node_modules/element-plus/es/components/splitter/src/splitter.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
||||
//#region ../../packages/components/splitter/src/splitter.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
|
||||
*/
|
||||
const splitterProps = buildProps({
|
||||
layout: {
|
||||
type: String,
|
||||
default: "horizontal",
|
||||
values: ["horizontal", "vertical"]
|
||||
},
|
||||
lazy: Boolean
|
||||
});
|
||||
const splitterEmits = {
|
||||
resizeStart: (index, sizes) => true,
|
||||
resize: (index, sizes) => true,
|
||||
resizeEnd: (index, sizes) => true,
|
||||
collapse: (index, type, sizes) => true
|
||||
};
|
||||
//#endregion
|
||||
export { splitterEmits, splitterProps };
|
||||
|
||||
//# sourceMappingURL=splitter.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"splitter.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/splitter.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type Splitter from './splitter.vue'\nimport type { Layout } from './type'\n\nexport interface SplitterProps {\n layout?: Layout\n lazy?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `SplitterProps` instead.\n */\nexport const splitterProps = buildProps({\n layout: {\n type: String,\n default: 'horizontal',\n values: ['horizontal', 'vertical'] as const,\n },\n lazy: Boolean,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `SplitterProps` instead.\n */\nexport type SplitterPropsPublic = ExtractPublicPropTypes<typeof splitterProps>\nexport type SplitterInstance = InstanceType<typeof Splitter> & unknown\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport const splitterEmits = {\n resizeStart: (index: number, sizes: number[]) => true,\n resize: (index: number, sizes: number[]) => true,\n resizeEnd: (index: number, sizes: number[]) => true,\n collapse: (index: number, type: 'start' | 'end', sizes: number[]) => true,\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\nexport type SplitterEmits = typeof splitterEmits\n"],"mappings":";;;;;AAcA,MAAa,gBAAgB,WAAW;CACtC,QAAQ;EACN,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,cAAc,WAAW;EACnC;CACD,MAAM;CACP,CAAU;AASX,MAAa,gBAAgB;CAC3B,cAAc,OAAe,UAAoB;CACjD,SAAS,OAAe,UAAoB;CAC5C,YAAY,OAAe,UAAoB;CAC/C,WAAW,OAAe,MAAuB,UAAoB;CACtE"}
|
||||
31
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue.d.ts
generated
vendored
Normal file
31
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Layout } from "./type.js";
|
||||
import { SplitterProps } from "./splitter.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/splitter.vue.d.ts
|
||||
declare var __VLS_1: {};
|
||||
type __VLS_Slots = {} & {
|
||||
default?: (props: typeof __VLS_1) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<SplitterProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
resize: (index: number, sizes: number[]) => void;
|
||||
collapse: (index: number, type: "end" | "start", sizes: number[]) => void;
|
||||
resizeStart: (index: number, sizes: number[]) => void;
|
||||
resizeEnd: (index: number, sizes: number[]) => void;
|
||||
}, string, _$vue.PublicProps, Readonly<SplitterProps> & Readonly<{
|
||||
onResize?: ((index: number, sizes: number[]) => any) | undefined;
|
||||
onCollapse?: ((index: number, type: "end" | "start", sizes: number[]) => any) | undefined;
|
||||
onResizeStart?: ((index: number, sizes: number[]) => any) | undefined;
|
||||
onResizeEnd?: ((index: number, sizes: number[]) => any) | undefined;
|
||||
}>, {
|
||||
layout: Layout;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
87
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
87
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { useOrderedChildren } from "../../../hooks/use-ordered-children/index.mjs";
|
||||
import { splitterEmits, splitterProps } from "./splitter.mjs";
|
||||
import { useContainer } from "./hooks/useContainer.mjs";
|
||||
import { useSize } from "./hooks/useSize.mjs";
|
||||
import { useResize } from "./hooks/useResize.mjs";
|
||||
import { splitterRootContextKey } from "./type.mjs";
|
||||
import { computed, createCommentVNode, createElementBlock, createVNode, defineComponent, getCurrentInstance, nextTick, normalizeClass, normalizeStyle, openBlock, provide, reactive, renderSlot, toRef, unref, watch } from "vue";
|
||||
//#region ../../packages/components/splitter/src/splitter.vue?vue&type=script&setup=true&lang.ts
|
||||
var splitter_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElSplitter",
|
||||
__name: "splitter",
|
||||
props: splitterProps,
|
||||
emits: splitterEmits,
|
||||
setup(__props, { emit: __emit }) {
|
||||
const ns = useNamespace("splitter");
|
||||
const emits = __emit;
|
||||
const props = __props;
|
||||
const layout = toRef(props, "layout");
|
||||
const lazy = toRef(props, "lazy");
|
||||
const { containerEl, containerSize } = useContainer(layout);
|
||||
const { removeChild: unregisterPanel, children: panels, addChild: registerPanel, ChildrenSorter: PanelsSorter } = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
|
||||
watch(panels, () => {
|
||||
movingIndex.value = null;
|
||||
panels.value.forEach((instance, index) => {
|
||||
instance.setIndex(index);
|
||||
});
|
||||
});
|
||||
const { percentSizes, pxSizes } = useSize(panels, containerSize);
|
||||
const { lazyOffset, movingIndex, onMoveStart, onMoving, onMoveEnd, onCollapse } = useResize(panels, containerSize, pxSizes, lazy);
|
||||
const splitterStyles = computed(() => {
|
||||
return { [ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0 };
|
||||
});
|
||||
const onResizeStart = (index) => {
|
||||
onMoveStart(index);
|
||||
emits("resizeStart", index, pxSizes.value);
|
||||
};
|
||||
const onResize = (index, offset) => {
|
||||
onMoving(index, offset);
|
||||
if (!lazy.value) emits("resize", index, pxSizes.value);
|
||||
};
|
||||
const onResizeEnd = async (index) => {
|
||||
onMoveEnd();
|
||||
await nextTick();
|
||||
emits("resizeEnd", index, pxSizes.value);
|
||||
};
|
||||
const onCollapsible = (index, type) => {
|
||||
onCollapse(index, type);
|
||||
emits("collapse", index, type, pxSizes.value);
|
||||
};
|
||||
provide(splitterRootContextKey, reactive({
|
||||
panels,
|
||||
percentSizes,
|
||||
pxSizes,
|
||||
layout,
|
||||
lazy,
|
||||
movingIndex,
|
||||
containerSize,
|
||||
onMoveStart: onResizeStart,
|
||||
onMoving: onResize,
|
||||
onMoveEnd: onResizeEnd,
|
||||
onCollapse: onCollapsible,
|
||||
registerPanel,
|
||||
unregisterPanel
|
||||
}));
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
ref_key: "containerEl",
|
||||
ref: containerEl,
|
||||
class: normalizeClass([unref(ns).b(), unref(ns).e(layout.value)]),
|
||||
style: normalizeStyle(splitterStyles.value)
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "default"),
|
||||
createVNode(unref(PanelsSorter)),
|
||||
createCommentVNode(" Prevent iframe touch events from breaking "),
|
||||
unref(movingIndex) ? (openBlock(), createElementBlock("div", {
|
||||
key: 0,
|
||||
class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout.value}`)])
|
||||
}, null, 2)) : createCommentVNode("v-if", true)
|
||||
], 6);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { splitter_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=splitter.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"splitter.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/splitter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n nextTick,\n provide,\n reactive,\n toRef,\n watch,\n} from 'vue'\nimport { useNamespace, useOrderedChildren } from '@element-plus/hooks'\nimport { useContainer, useResize, useSize } from './hooks'\nimport { splitterEmits } from './splitter'\nimport { splitterRootContextKey } from './type'\n\nimport type { PanelItemState } from './type'\nimport type { SplitterProps } from './splitter'\n\nconst ns = useNamespace('splitter')\n\ndefineOptions({\n name: 'ElSplitter',\n})\n\nconst emits = defineEmits(splitterEmits)\n\nconst props = withDefaults(defineProps<SplitterProps>(), {\n layout: 'horizontal',\n})\nconst layout = toRef(props, 'layout')\nconst lazy = toRef(props, 'lazy')\n\nconst { containerEl, containerSize } = useContainer(layout)\n\nconst {\n removeChild: unregisterPanel,\n children: panels,\n addChild: registerPanel,\n ChildrenSorter: PanelsSorter,\n} = useOrderedChildren<PanelItemState>(getCurrentInstance()!, 'ElSplitterPanel')\n\nwatch(panels, () => {\n movingIndex.value = null\n panels.value.forEach((instance: PanelItemState, index: number) => {\n instance.setIndex(index)\n })\n})\n\nconst { percentSizes, pxSizes } = useSize(panels, containerSize)\n\nconst {\n lazyOffset,\n movingIndex,\n onMoveStart,\n onMoving,\n onMoveEnd,\n onCollapse,\n} = useResize(panels, containerSize, pxSizes, lazy)\n\nconst splitterStyles = computed(() => {\n return {\n [ns.cssVarBlockName('bar-offset')]: lazy.value\n ? `${lazyOffset.value}px`\n : undefined,\n }\n})\n\nconst onResizeStart = (index: number) => {\n onMoveStart(index)\n emits('resizeStart', index, pxSizes.value)\n}\n\nconst onResize = (index: number, offset: number) => {\n onMoving(index, offset)\n\n if (!lazy.value) {\n emits('resize', index, pxSizes.value)\n }\n}\n\nconst onResizeEnd = async (index: number) => {\n onMoveEnd()\n await nextTick()\n emits('resizeEnd', index, pxSizes.value)\n}\n\nconst onCollapsible = (index: number, type: 'start' | 'end') => {\n onCollapse(index, type)\n emits('collapse', index, type, pxSizes.value)\n}\n\nprovide(\n splitterRootContextKey,\n reactive({\n panels,\n percentSizes,\n pxSizes,\n layout,\n lazy,\n movingIndex,\n containerSize,\n onMoveStart: onResizeStart,\n onMoving: onResize,\n onMoveEnd: onResizeEnd,\n onCollapse: onCollapsible,\n registerPanel,\n unregisterPanel,\n })\n)\n</script>\n\n<template>\n <div\n ref=\"containerEl\"\n :class=\"[ns.b(), ns.e(layout)]\"\n :style=\"splitterStyles\"\n >\n <slot />\n <panels-sorter />\n <!-- Prevent iframe touch events from breaking -->\n <div v-if=\"movingIndex\" :class=\"[ns.e('mask'), ns.e(`mask-${layout}`)]\" />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAkBA,MAAM,KAAK,aAAa,WAAU;EAMlC,MAAM,QAAQ;EAEd,MAAM,QAAQ;EAGd,MAAM,SAAS,MAAM,OAAO,SAAQ;EACpC,MAAM,OAAO,MAAM,OAAO,OAAM;EAEhC,MAAM,EAAE,aAAa,kBAAkB,aAAa,OAAM;EAE1D,MAAM,EACJ,aAAa,iBACb,UAAU,QACV,UAAU,eACV,gBAAgB,iBACd,mBAAmC,oBAAoB,EAAG,kBAAiB;EAE/E,MAAM,cAAc;GAClB,YAAY,QAAQ;GACpB,OAAO,MAAM,SAAS,UAA0B,UAAkB;IAChE,SAAS,SAAS,MAAK;KACxB;IACF;EAED,MAAM,EAAE,cAAc,YAAY,QAAQ,QAAQ,cAAa;EAE/D,MAAM,EACJ,YACA,aACA,aACA,UACA,WACA,eACE,UAAU,QAAQ,eAAe,SAAS,KAAI;EAElD,MAAM,iBAAiB,eAAe;GACpC,OAAO,GACJ,GAAG,gBAAgB,aAAa,GAAG,KAAK,QACrC,GAAG,WAAW,MAAM,MACpB,KAAA,GACN;IACD;EAED,MAAM,iBAAiB,UAAkB;GACvC,YAAY,MAAK;GACjB,MAAM,eAAe,OAAO,QAAQ,MAAK;;EAG3C,MAAM,YAAY,OAAe,WAAmB;GAClD,SAAS,OAAO,OAAM;GAEtB,IAAI,CAAC,KAAK,OACR,MAAM,UAAU,OAAO,QAAQ,MAAK;;EAIxC,MAAM,cAAc,OAAO,UAAkB;GAC3C,WAAU;GACV,MAAM,UAAS;GACf,MAAM,aAAa,OAAO,QAAQ,MAAK;;EAGzC,MAAM,iBAAiB,OAAe,SAA0B;GAC9D,WAAW,OAAO,KAAI;GACtB,MAAM,YAAY,OAAO,MAAM,QAAQ,MAAK;;EAG9C,QACE,wBACA,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA,aAAa;GACb,UAAU;GACV,WAAW;GACX,YAAY;GACZ;GACA;GACD,CAAA,CACH;;uBAIE,mBASM,OAAA;aARA;IAAJ,KAAI;IACH,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,GAAC,EAAI,MAAA,GAAE,CAAC,EAAE,OAAA,MAAM,CAAA,CAAA;IAC3B,OAAK,eAAE,eAAA,MAAc;;IAEtB,WAAQ,KAAA,QAAA,UAAA;IACR,YAAiB,MAAA,aAAA,CAAA;IACjB,mBAAA,8CAAkD;IACvC,MAAA,YAAW,IAAA,WAAA,EAAtB,mBAA0E,OAAA;;KAAjD,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,EAAC,OAAA,EAAU,MAAA,GAAE,CAAC,EAAC,QAAS,OAAA,QAAM,CAAA,CAAA"}
|
||||
7
frontend/node_modules/element-plus/es/components/splitter/src/splitter2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/splitter/src/splitter2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import splitter_vue_vue_type_script_setup_true_lang_default from "./splitter.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/splitter/src/splitter.vue
|
||||
var splitter_default = splitter_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { splitter_default as default };
|
||||
|
||||
//# sourceMappingURL=splitter2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/splitter2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"splitter2.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/splitter.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n nextTick,\n provide,\n reactive,\n toRef,\n watch,\n} from 'vue'\nimport { useNamespace, useOrderedChildren } from '@element-plus/hooks'\nimport { useContainer, useResize, useSize } from './hooks'\nimport { splitterEmits } from './splitter'\nimport { splitterRootContextKey } from './type'\n\nimport type { PanelItemState } from './type'\nimport type { SplitterProps } from './splitter'\n\nconst ns = useNamespace('splitter')\n\ndefineOptions({\n name: 'ElSplitter',\n})\n\nconst emits = defineEmits(splitterEmits)\n\nconst props = withDefaults(defineProps<SplitterProps>(), {\n layout: 'horizontal',\n})\nconst layout = toRef(props, 'layout')\nconst lazy = toRef(props, 'lazy')\n\nconst { containerEl, containerSize } = useContainer(layout)\n\nconst {\n removeChild: unregisterPanel,\n children: panels,\n addChild: registerPanel,\n ChildrenSorter: PanelsSorter,\n} = useOrderedChildren<PanelItemState>(getCurrentInstance()!, 'ElSplitterPanel')\n\nwatch(panels, () => {\n movingIndex.value = null\n panels.value.forEach((instance: PanelItemState, index: number) => {\n instance.setIndex(index)\n })\n})\n\nconst { percentSizes, pxSizes } = useSize(panels, containerSize)\n\nconst {\n lazyOffset,\n movingIndex,\n onMoveStart,\n onMoving,\n onMoveEnd,\n onCollapse,\n} = useResize(panels, containerSize, pxSizes, lazy)\n\nconst splitterStyles = computed(() => {\n return {\n [ns.cssVarBlockName('bar-offset')]: lazy.value\n ? `${lazyOffset.value}px`\n : undefined,\n }\n})\n\nconst onResizeStart = (index: number) => {\n onMoveStart(index)\n emits('resizeStart', index, pxSizes.value)\n}\n\nconst onResize = (index: number, offset: number) => {\n onMoving(index, offset)\n\n if (!lazy.value) {\n emits('resize', index, pxSizes.value)\n }\n}\n\nconst onResizeEnd = async (index: number) => {\n onMoveEnd()\n await nextTick()\n emits('resizeEnd', index, pxSizes.value)\n}\n\nconst onCollapsible = (index: number, type: 'start' | 'end') => {\n onCollapse(index, type)\n emits('collapse', index, type, pxSizes.value)\n}\n\nprovide(\n splitterRootContextKey,\n reactive({\n panels,\n percentSizes,\n pxSizes,\n layout,\n lazy,\n movingIndex,\n containerSize,\n onMoveStart: onResizeStart,\n onMoving: onResize,\n onMoveEnd: onResizeEnd,\n onCollapse: onCollapsible,\n registerPanel,\n unregisterPanel,\n })\n)\n</script>\n\n<template>\n <div\n ref=\"containerEl\"\n :class=\"[ns.b(), ns.e(layout)]\"\n :style=\"splitterStyles\"\n >\n <slot />\n <panels-sorter />\n <!-- Prevent iframe touch events from breaking -->\n <div v-if=\"movingIndex\" :class=\"[ns.e('mask'), ns.e(`mask-${layout}`)]\" />\n </div>\n</template>\n"],"mappings":""}
|
||||
38
frontend/node_modules/element-plus/es/components/splitter/src/type.d.ts
generated
vendored
Normal file
38
frontend/node_modules/element-plus/es/components/splitter/src/type.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { InjectionKey, UnwrapRef, VNode } from "vue";
|
||||
|
||||
//#region ../../packages/components/splitter/src/type.d.ts
|
||||
type Layout = 'horizontal' | 'vertical';
|
||||
type PanelItemState = UnwrapRef<{
|
||||
uid: number;
|
||||
getVnode: () => VNode;
|
||||
collapsible: {
|
||||
start?: boolean;
|
||||
end?: boolean;
|
||||
};
|
||||
max?: number | string;
|
||||
min?: number | string;
|
||||
resizable: boolean;
|
||||
size?: number | string;
|
||||
setIndex: (val: number) => void;
|
||||
}>;
|
||||
interface SplitterRootContext {
|
||||
panels: PanelItemState[];
|
||||
layout: Layout;
|
||||
lazy: boolean;
|
||||
containerSize: number;
|
||||
movingIndex: {
|
||||
index: number;
|
||||
confirmed: boolean;
|
||||
} | null;
|
||||
percentSizes: number[];
|
||||
pxSizes: number[];
|
||||
registerPanel: (pane: PanelItemState) => void;
|
||||
unregisterPanel: (pane: PanelItemState) => void;
|
||||
onCollapse: (index: number, type: 'start' | 'end') => void;
|
||||
onMoveEnd: (index: number) => Promise<void>;
|
||||
onMoveStart: (index: number) => void;
|
||||
onMoving: (index: number, offset: number) => void;
|
||||
}
|
||||
declare const splitterRootContextKey: InjectionKey<SplitterRootContext>;
|
||||
//#endregion
|
||||
export { Layout, PanelItemState, SplitterRootContext, splitterRootContextKey };
|
||||
6
frontend/node_modules/element-plus/es/components/splitter/src/type.mjs
generated
vendored
Normal file
6
frontend/node_modules/element-plus/es/components/splitter/src/type.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
//#region ../../packages/components/splitter/src/type.ts
|
||||
const splitterRootContextKey = Symbol("splitterRootContextKey");
|
||||
//#endregion
|
||||
export { splitterRootContextKey };
|
||||
|
||||
//# sourceMappingURL=type.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/splitter/src/type.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/splitter/src/type.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"type.mjs","names":[],"sources":["../../../../../../packages/components/splitter/src/type.ts"],"sourcesContent":["import type { InjectionKey, UnwrapRef, VNode } from 'vue'\n\nexport type Layout = 'horizontal' | 'vertical'\n\nexport type PanelItemState = UnwrapRef<{\n uid: number\n getVnode: () => VNode\n collapsible: { start?: boolean; end?: boolean }\n max?: number | string\n min?: number | string\n resizable: boolean\n size?: number | string\n setIndex: (val: number) => void\n}>\n\nexport interface SplitterRootContext {\n panels: PanelItemState[]\n layout: Layout\n lazy: boolean\n containerSize: number\n movingIndex: { index: number; confirmed: boolean } | null\n percentSizes: number[]\n pxSizes: number[]\n registerPanel: (pane: PanelItemState) => void\n unregisterPanel: (pane: PanelItemState) => void\n onCollapse: (index: number, type: 'start' | 'end') => void\n onMoveEnd: (index: number) => Promise<void>\n onMoveStart: (index: number) => void\n onMoving: (index: number, offset: number) => void\n}\n\nexport const splitterRootContextKey: InjectionKey<SplitterRootContext> = Symbol(\n 'splitterRootContextKey'\n)\n"],"mappings":";AA+BA,MAAa,yBAA4D,OACvE,yBACD"}
|
||||
2
frontend/node_modules/element-plus/es/components/splitter/style/css.mjs
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/splitter/style/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../base/style/css.mjs";
|
||||
import "element-plus/theme-chalk/el-splitter.css";
|
||||
2
frontend/node_modules/element-plus/es/components/splitter/style/index.mjs
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/splitter/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../base/style/index.mjs";
|
||||
import "element-plus/theme-chalk/src/splitter.scss";
|
||||
Reference in New Issue
Block a user