This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

6
node_modules/element-plus/lib/utils/arrays.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export declare const unique: <T>(arr: T[]) => T[];
export declare const extractFirst: <T>(arr: T | T[]) => T;
type Many<T> = T | ReadonlyArray<T>;
/** like `_.castArray`, except falsy value returns empty array. */
export declare const castArray: <T>(arr: Many<T>) => T[];
export { castArray as ensureArray } from 'lodash-unified';

25
node_modules/element-plus/lib/utils/arrays.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var lodashUnified = require('lodash-unified');
var shared = require('@vue/shared');
const unique = (arr) => [...new Set(arr)];
const extractFirst = (arr) => {
return shared.isArray(arr) ? arr[0] : arr;
};
const castArray = (arr) => {
if (!arr && arr !== 0)
return [];
return shared.isArray(arr) ? arr : [arr];
};
Object.defineProperty(exports, 'ensureArray', {
enumerable: true,
get: function () { return lodashUnified.castArray; }
});
exports.castArray = castArray;
exports.extractFirst = extractFirst;
exports.unique = unique;
//# sourceMappingURL=arrays.js.map

1
node_modules/element-plus/lib/utils/arrays.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"arrays.js","sources":["../../../../packages/utils/arrays.ts"],"sourcesContent":["import { isArray } from './types'\n\nexport const unique = <T>(arr: T[]) => [...new Set(arr)]\n\nexport const extractFirst = <T>(arr: T | T[]): T => {\n return isArray(arr) ? arr[0] : arr\n}\n\ntype Many<T> = T | ReadonlyArray<T>\n// TODO: rename to `ensureArray`\n/** like `_.castArray`, except falsy value returns empty array. */\nexport const castArray = <T>(arr: Many<T>): T[] => {\n if (!arr && (arr as any) !== 0) return []\n return isArray(arr) ? arr : [arr as T]\n}\n\n// TODO: remove import alias\n// avoid naming conflicts\nexport { castArray as ensureArray } from 'lodash-unified'\n"],"names":["isArray"],"mappings":";;;;;;;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;AACrC,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK;AACrC,EAAE,OAAOA,cAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AACrC,EAAE;AACU,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK;AAClC,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AACvB,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,OAAOA,cAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;AACpC;;;;;;;;;;"}

3
node_modules/element-plus/lib/utils/browser.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { isClient, isIOS } from '@vueuse/core';
export declare const isFirefox: () => boolean;
export { isClient, isIOS };

18
node_modules/element-plus/lib/utils/browser.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
const isFirefox = () => core.isClient && /firefox/i.test(window.navigator.userAgent);
Object.defineProperty(exports, 'isClient', {
enumerable: true,
get: function () { return core.isClient; }
});
Object.defineProperty(exports, 'isIOS', {
enumerable: true,
get: function () { return core.isIOS; }
});
exports.isFirefox = isFirefox;
//# sourceMappingURL=browser.js.map

1
node_modules/element-plus/lib/utils/browser.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"browser.js","sources":["../../../../packages/utils/browser.ts"],"sourcesContent":["import { isClient, isIOS } from '@vueuse/core'\n\nexport const isFirefox = (): boolean =>\n isClient && /firefox/i.test(window.navigator.userAgent)\n\nexport { isClient, isIOS }\n"],"names":["isClient"],"mappings":";;;;;;AACY,MAAC,SAAS,GAAG,MAAMA,aAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS;;;;;;;;;;;;"}

25
node_modules/element-plus/lib/utils/dom/aria.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
/**
* Determine if the testing element is visible on screen no matter if its on the viewport or not
*/
export declare const isVisible: (element: HTMLElement) => boolean;
export declare const obtainAllFocusableElements: (element: HTMLElement) => HTMLElement[];
/**
* @desc Determine if target element is focusable
* @param element {HTMLElement}
* @returns {Boolean} true if it is focusable
*/
export declare const isFocusable: (element: HTMLElement) => boolean;
/**
* Trigger an event
* mouseenter, mouseleave, mouseover, keyup, change, click, etc.
* @param {HTMLElement} elm
* @param {String} name
* @param {*} opts
*/
export declare const triggerEvent: (elm: HTMLElement, name: string, ...opts: Array<boolean>) => HTMLElement;
export declare const isLeaf: (el: HTMLElement) => boolean;
export declare const getSibling: (el: HTMLElement, distance: number, elClass: string) => Element | null;
export declare const focusElement: (el?: HTMLElement | {
focus: () => void;
} | null, options?: FocusOptions) => void;
export declare const focusNode: (el: HTMLElement) => void;

93
node_modules/element-plus/lib/utils/dom/aria.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])`;
const isHTMLElement = (e) => {
if (typeof Element === "undefined")
return false;
return e instanceof Element;
};
const isVisible = (element) => {
const computed = getComputedStyle(element);
return computed.position === "fixed" ? false : element.offsetParent !== null;
};
const obtainAllFocusableElements = (element) => {
return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
};
const isFocusable = (element) => {
if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) {
return true;
}
if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") {
return false;
}
switch (element.nodeName) {
case "A": {
return !!element.href && element.rel !== "ignore";
}
case "INPUT": {
return !(element.type === "hidden" || element.type === "file");
}
case "BUTTON":
case "SELECT":
case "TEXTAREA": {
return true;
}
default: {
return false;
}
}
};
const triggerEvent = function(elm, name, ...opts) {
let eventName;
if (name.includes("mouse") || name.includes("click")) {
eventName = "MouseEvents";
} else if (name.includes("key")) {
eventName = "KeyboardEvent";
} else {
eventName = "HTMLEvents";
}
const evt = document.createEvent(eventName);
evt.initEvent(name, ...opts);
elm.dispatchEvent(evt);
return elm;
};
const isLeaf = (el) => !el.getAttribute("aria-owns");
const getSibling = (el, distance, elClass) => {
const { parentNode } = el;
if (!parentNode)
return null;
const siblings = parentNode.querySelectorAll(elClass);
const index = Array.prototype.indexOf.call(siblings, el);
return siblings[index + distance] || null;
};
const focusElement = (el, options) => {
if (!el || !el.focus)
return;
let cleanup = false;
if (isHTMLElement(el) && !isFocusable(el) && !el.getAttribute("tabindex")) {
el.setAttribute("tabindex", "-1");
cleanup = true;
}
el.focus(options);
if (isHTMLElement(el) && cleanup) {
el.removeAttribute("tabindex");
}
};
const focusNode = (el) => {
if (!el)
return;
focusElement(el);
!isLeaf(el) && el.click();
};
exports.focusElement = focusElement;
exports.focusNode = focusNode;
exports.getSibling = getSibling;
exports.isFocusable = isFocusable;
exports.isLeaf = isLeaf;
exports.isVisible = isVisible;
exports.obtainAllFocusableElements = obtainAllFocusableElements;
exports.triggerEvent = triggerEvent;
//# sourceMappingURL=aria.js.map

1
node_modules/element-plus/lib/utils/dom/aria.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

3
node_modules/element-plus/lib/utils/dom/element.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
type GetElement = <T extends string | HTMLElement | Window | null | undefined>(target: T) => T extends string ? HTMLElement | null : T;
export declare const getElement: GetElement;
export {};

22
node_modules/element-plus/lib/utils/dom/element.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
var shared = require('@vue/shared');
const getElement = (target) => {
if (!core.isClient || target === "")
return null;
if (shared.isString(target)) {
try {
return document.querySelector(target);
} catch (e) {
return null;
}
}
return target;
};
exports.getElement = getElement;
//# sourceMappingURL=element.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"element.js","sources":["../../../../../packages/utils/dom/element.ts"],"sourcesContent":["import { isString } from '../types'\nimport { isClient } from '../browser'\n\ntype GetElement = <T extends string | HTMLElement | Window | null | undefined>(\n target: T\n) => T extends string ? HTMLElement | null : T\n\nexport const getElement = ((\n target: string | HTMLElement | Window | null | undefined\n) => {\n if (!isClient || target === '') return null\n if (isString(target)) {\n try {\n return document.querySelector<HTMLElement>(target)\n } catch {\n return null\n }\n }\n return target\n}) as GetElement\n"],"names":["isClient","isString"],"mappings":";;;;;;;AAEY,MAAC,UAAU,GAAG,CAAC,MAAM,KAAK;AACtC,EAAE,IAAI,CAACA,aAAQ,IAAI,MAAM,KAAK,EAAE;AAChC,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,IAAIC,eAAQ,CAAC,MAAM,CAAC,EAAE;AACxB,IAAI,IAAI;AACR,MAAM,OAAO,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC5C,KAAK,CAAC,OAAO,CAAC,EAAE;AAChB,MAAM,OAAO,IAAI,CAAC;AAClB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}

6
node_modules/element-plus/lib/utils/dom/event.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export declare const composeEventHandlers: <E>(theirsHandler?: (event: E) => boolean | void, oursHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
checkForDefaultPrevented?: boolean | undefined;
}) => (event: E) => void;
type WhenMouseHandler = (e: PointerEvent) => any;
export declare const whenMouse: (handler: WhenMouseHandler) => WhenMouseHandler;
export {};

20
node_modules/element-plus/lib/utils/dom/event.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
const handleEvent = (event) => {
const shouldPrevent = theirsHandler == null ? void 0 : theirsHandler(event);
if (checkForDefaultPrevented === false || !shouldPrevent) {
return oursHandler == null ? void 0 : oursHandler(event);
}
};
return handleEvent;
};
const whenMouse = (handler) => {
return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
};
exports.composeEventHandlers = composeEventHandlers;
exports.whenMouse = whenMouse;
//# sourceMappingURL=event.js.map

1
node_modules/element-plus/lib/utils/dom/event.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"event.js","sources":["../../../../../packages/utils/dom/event.ts"],"sourcesContent":["export const composeEventHandlers = <E>(\n theirsHandler?: (event: E) => boolean | void,\n oursHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) => {\n const handleEvent = (event: E) => {\n const shouldPrevent = theirsHandler?.(event)\n\n if (checkForDefaultPrevented === false || !shouldPrevent) {\n return oursHandler?.(event)\n }\n }\n return handleEvent\n}\n\ntype WhenMouseHandler = (e: PointerEvent) => any\nexport const whenMouse = (handler: WhenMouseHandler): WhenMouseHandler => {\n return (e: PointerEvent) =>\n e.pointerType === 'mouse' ? handler(e) : undefined\n}\n"],"names":[],"mappings":";;;;AAAY,MAAC,oBAAoB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,EAAE,wBAAwB,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK;AAC9G,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,MAAM,aAAa,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAChF,IAAI,IAAI,wBAAwB,KAAK,KAAK,IAAI,CAAC,aAAa,EAAE;AAC9D,MAAM,OAAO,WAAW,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO,WAAW,CAAC;AACrB,EAAE;AACU,MAAC,SAAS,GAAG,CAAC,OAAO,KAAK;AACtC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;AAChE;;;;;"}

6
node_modules/element-plus/lib/utils/dom/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export * from './aria';
export * from './event';
export * from './position';
export * from './scroll';
export * from './style';
export * from './element';

44
node_modules/element-plus/lib/utils/dom/index.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var aria = require('./aria.js');
var event = require('./event.js');
var position = require('./position.js');
var scroll = require('./scroll.js');
var style = require('./style.js');
var element = require('./element.js');
exports.focusElement = aria.focusElement;
exports.focusNode = aria.focusNode;
exports.getSibling = aria.getSibling;
exports.isFocusable = aria.isFocusable;
exports.isLeaf = aria.isLeaf;
exports.isVisible = aria.isVisible;
exports.obtainAllFocusableElements = aria.obtainAllFocusableElements;
exports.triggerEvent = aria.triggerEvent;
exports.composeEventHandlers = event.composeEventHandlers;
exports.whenMouse = event.whenMouse;
exports.getClientXY = position.getClientXY;
exports.getOffsetTop = position.getOffsetTop;
exports.getOffsetTopDistance = position.getOffsetTopDistance;
exports.isInContainer = position.isInContainer;
exports.animateScrollTo = scroll.animateScrollTo;
exports.getScrollBarWidth = scroll.getScrollBarWidth;
exports.getScrollContainer = scroll.getScrollContainer;
exports.getScrollElement = scroll.getScrollElement;
exports.getScrollTop = scroll.getScrollTop;
exports.isScroll = scroll.isScroll;
exports.scrollIntoView = scroll.scrollIntoView;
exports.addClass = style.addClass;
exports.addUnit = style.addUnit;
exports.classNameToArray = style.classNameToArray;
exports.getStyle = style.getStyle;
exports.hasClass = style.hasClass;
exports.removeClass = style.removeClass;
exports.removeStyle = style.removeStyle;
exports.setStyle = style.setStyle;
exports.getElement = element.getElement;
//# sourceMappingURL=index.js.map

1
node_modules/element-plus/lib/utils/dom/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,7 @@
export declare const isInContainer: (el?: Element, container?: Element | Window) => boolean;
export declare const getOffsetTop: (el: HTMLElement) => number;
export declare const getOffsetTopDistance: (el: HTMLElement, containerEl: HTMLElement) => number;
export declare const getClientXY: (event: MouseEvent | TouchEvent) => {
clientX: number;
clientY: number;
};

59
node_modules/element-plus/lib/utils/dom/position.js generated vendored Normal file
View File

@@ -0,0 +1,59 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
const isInContainer = (el, container) => {
if (!core.isClient || !el || !container)
return false;
const elRect = el.getBoundingClientRect();
let containerRect;
if (container instanceof Element) {
containerRect = container.getBoundingClientRect();
} else {
containerRect = {
top: 0,
right: window.innerWidth,
bottom: window.innerHeight,
left: 0
};
}
return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
};
const getOffsetTop = (el) => {
let offset = 0;
let parent = el;
while (parent) {
offset += parent.offsetTop;
parent = parent.offsetParent;
}
return offset;
};
const getOffsetTopDistance = (el, containerEl) => {
return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
};
const getClientXY = (event) => {
let clientX;
let clientY;
if (event.type === "touchend") {
clientY = event.changedTouches[0].clientY;
clientX = event.changedTouches[0].clientX;
} else if (event.type.startsWith("touch")) {
clientY = event.touches[0].clientY;
clientX = event.touches[0].clientX;
} else {
clientY = event.clientY;
clientX = event.clientX;
}
return {
clientX,
clientY
};
};
exports.getClientXY = getClientXY;
exports.getOffsetTop = getOffsetTop;
exports.getOffsetTopDistance = getOffsetTopDistance;
exports.isInContainer = isInContainer;
//# sourceMappingURL=position.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"position.js","sources":["../../../../../packages/utils/dom/position.ts"],"sourcesContent":["import { isClient } from '../browser'\n\nexport const isInContainer = (\n el?: Element,\n container?: Element | Window\n): boolean => {\n if (!isClient || !el || !container) return false\n\n const elRect = el.getBoundingClientRect()\n\n let containerRect: Pick<DOMRect, 'top' | 'bottom' | 'left' | 'right'>\n if (container instanceof Element) {\n containerRect = container.getBoundingClientRect()\n } else {\n containerRect = {\n top: 0,\n right: window.innerWidth,\n bottom: window.innerHeight,\n left: 0,\n }\n }\n return (\n elRect.top < containerRect.bottom &&\n elRect.bottom > containerRect.top &&\n elRect.right > containerRect.left &&\n elRect.left < containerRect.right\n )\n}\n\nexport const getOffsetTop = (el: HTMLElement) => {\n let offset = 0\n let parent = el\n\n while (parent) {\n offset += parent.offsetTop\n parent = parent.offsetParent as HTMLElement\n }\n\n return offset\n}\n\nexport const getOffsetTopDistance = (\n el: HTMLElement,\n containerEl: HTMLElement\n) => {\n return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl))\n}\n\nexport const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type === 'touchend') {\n clientY = (event as TouchEvent).changedTouches[0].clientY\n clientX = (event as TouchEvent).changedTouches[0].clientX\n } else if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n}\n"],"names":["isClient"],"mappings":";;;;;;AACY,MAAC,aAAa,GAAG,CAAC,EAAE,EAAE,SAAS,KAAK;AAChD,EAAE,IAAI,CAACA,aAAQ,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,MAAM,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAC5C,EAAE,IAAI,aAAa,CAAC;AACpB,EAAE,IAAI,SAAS,YAAY,OAAO,EAAE;AACpC,IAAI,aAAa,GAAG,SAAS,CAAC,qBAAqB,EAAE,CAAC;AACtD,GAAG,MAAM;AACT,IAAI,aAAa,GAAG;AACpB,MAAM,GAAG,EAAE,CAAC;AACZ,MAAM,KAAK,EAAE,MAAM,CAAC,UAAU;AAC9B,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW;AAChC,MAAM,IAAI,EAAE,CAAC;AACb,KAAK,CAAC;AACN,GAAG;AACH,EAAE,OAAO,MAAM,CAAC,GAAG,GAAG,aAAa,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,aAAa,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC;AAC1J,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,EAAE,KAAK;AACpC,EAAE,IAAI,MAAM,GAAG,CAAC,CAAC;AACjB,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC;AAC/B,IAAI,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;AACjC,GAAG;AACH,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACU,MAAC,oBAAoB,GAAG,CAAC,EAAE,EAAE,WAAW,KAAK;AACzD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;AAChE,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,KAAK,KAAK;AACtC,EAAE,IAAI,OAAO,CAAC;AACd,EAAE,IAAI,OAAO,CAAC;AACd,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;AACjC,IAAI,OAAO,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC9C,IAAI,OAAO,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC9C,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AAC7C,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACvC,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACvC,GAAG,MAAM;AACT,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,GAAG;AACH,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;;;;"}

11
node_modules/element-plus/lib/utils/dom/scroll.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export declare const isScroll: (el: HTMLElement, isVertical?: boolean) => boolean;
export declare const getScrollContainer: (el: HTMLElement, isVertical?: boolean) => Window | HTMLElement | undefined;
export declare const getScrollBarWidth: (namespace: string) => number;
/**
* Scroll with in the container element, positioning the **selected** element at the top
* of the container
*/
export declare function scrollIntoView(container: HTMLElement, selected: HTMLElement): void;
export declare function animateScrollTo(container: HTMLElement | Window, from: number, to: number, duration: number, callback?: unknown): () => void;
export declare const getScrollElement: (target: HTMLElement, container: HTMLElement | Window) => HTMLElement;
export declare const getScrollTop: (container: HTMLElement | Window) => number;

126
node_modules/element-plus/lib/utils/dom/scroll.js generated vendored Normal file
View File

@@ -0,0 +1,126 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
var easings = require('../easings.js');
var types = require('../types.js');
var raf = require('../raf.js');
var style = require('./style.js');
var shared = require('@vue/shared');
const isScroll = (el, isVertical) => {
if (!core.isClient)
return false;
const key = {
undefined: "overflow",
true: "overflow-y",
false: "overflow-x"
}[String(isVertical)];
const overflow = style.getStyle(el, key);
return ["scroll", "auto", "overlay"].some((s) => overflow.includes(s));
};
const getScrollContainer = (el, isVertical) => {
if (!core.isClient)
return;
let parent = el;
while (parent) {
if ([window, document, document.documentElement].includes(parent))
return window;
if (isScroll(parent, isVertical))
return parent;
parent = parent.parentNode;
}
return parent;
};
let scrollBarWidth;
const getScrollBarWidth = (namespace) => {
var _a;
if (!core.isClient)
return 0;
if (scrollBarWidth !== void 0)
return scrollBarWidth;
const outer = document.createElement("div");
outer.className = `${namespace}-scrollbar__wrap`;
outer.style.visibility = "hidden";
outer.style.width = "100px";
outer.style.position = "absolute";
outer.style.top = "-9999px";
document.body.appendChild(outer);
const widthNoScroll = outer.offsetWidth;
outer.style.overflow = "scroll";
const inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);
const widthWithScroll = inner.offsetWidth;
(_a = outer.parentNode) == null ? void 0 : _a.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;
return scrollBarWidth;
};
function scrollIntoView(container, selected) {
if (!core.isClient)
return;
if (!selected) {
container.scrollTop = 0;
return;
}
const offsetParents = [];
let pointer = selected.offsetParent;
while (pointer !== null && container !== pointer && container.contains(pointer)) {
offsetParents.push(pointer);
pointer = pointer.offsetParent;
}
const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
const bottom = top + selected.offsetHeight;
const viewRectTop = container.scrollTop;
const viewRectBottom = viewRectTop + container.clientHeight;
if (top < viewRectTop) {
container.scrollTop = top;
} else if (bottom > viewRectBottom) {
container.scrollTop = bottom - container.clientHeight;
}
}
function animateScrollTo(container, from, to, duration, callback) {
const startTime = Date.now();
let handle;
const scroll = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
const nextScrollTop = easings.easeInOutCubic(time > duration ? duration : time, from, to, duration);
if (types.isWindow(container)) {
container.scrollTo(window.pageXOffset, nextScrollTop);
} else {
container.scrollTop = nextScrollTop;
}
if (time < duration) {
handle = raf.rAF(scroll);
} else if (shared.isFunction(callback)) {
callback();
}
};
scroll();
return () => {
handle && raf.cAF(handle);
};
}
const getScrollElement = (target, container) => {
if (types.isWindow(container)) {
return target.ownerDocument.documentElement;
}
return container;
};
const getScrollTop = (container) => {
if (types.isWindow(container)) {
return window.scrollY;
}
return container.scrollTop;
};
exports.animateScrollTo = animateScrollTo;
exports.getScrollBarWidth = getScrollBarWidth;
exports.getScrollContainer = getScrollContainer;
exports.getScrollElement = getScrollElement;
exports.getScrollTop = getScrollTop;
exports.isScroll = isScroll;
exports.scrollIntoView = scrollIntoView;
//# sourceMappingURL=scroll.js.map

File diff suppressed because one or more lines are too long

9
node_modules/element-plus/lib/utils/dom/style.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import type { CSSProperties } from 'vue';
export declare const classNameToArray: (cls?: string) => string[];
export declare const hasClass: (el: Element, cls: string) => boolean;
export declare const addClass: (el: Element, cls: string) => void;
export declare const removeClass: (el: Element, cls: string) => void;
export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
export declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;

82
node_modules/element-plus/lib/utils/dom/style.js generated vendored Normal file
View File

@@ -0,0 +1,82 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var types = require('../types.js');
var core = require('@vueuse/core');
var shared = require('@vue/shared');
var objects = require('../objects.js');
const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
const hasClass = (el, cls) => {
if (!el || !cls)
return false;
if (cls.includes(" "))
throw new Error("className should not contain space.");
return el.classList.contains(cls);
};
const addClass = (el, cls) => {
if (!el || !cls.trim())
return;
el.classList.add(...classNameToArray(cls));
};
const removeClass = (el, cls) => {
if (!el || !cls.trim())
return;
el.classList.remove(...classNameToArray(cls));
};
const getStyle = (element, styleName) => {
var _a;
if (!core.isClient || !element || !styleName)
return "";
let key = shared.camelize(styleName);
if (key === "float")
key = "cssFloat";
try {
const style = element.style[key];
if (style)
return style;
const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
return computed ? computed[key] : "";
} catch (e) {
return element.style[key];
}
};
const setStyle = (element, styleName, value) => {
if (!element || !styleName)
return;
if (shared.isObject(styleName)) {
objects.entriesOf(styleName).forEach(([prop, value2]) => setStyle(element, prop, value2));
} else {
const key = shared.camelize(styleName);
element.style[key] = value;
}
};
const removeStyle = (element, style) => {
if (!element || !style)
return;
if (shared.isObject(style)) {
objects.keysOf(style).forEach((prop) => removeStyle(element, prop));
} else {
setStyle(element, style, "");
}
};
function addUnit(value, defaultUnit = "px") {
if (!value)
return "";
if (types.isNumber(value) || types.isStringNumber(value)) {
return `${value}${defaultUnit}`;
} else if (shared.isString(value)) {
return value;
}
}
exports.addClass = addClass;
exports.addUnit = addUnit;
exports.classNameToArray = classNameToArray;
exports.getStyle = getStyle;
exports.hasClass = hasClass;
exports.removeClass = removeClass;
exports.removeStyle = removeStyle;
exports.setStyle = setStyle;
//# sourceMappingURL=style.js.map

1
node_modules/element-plus/lib/utils/dom/style.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/element-plus/lib/utils/easings.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function easeInOutCubic(t: number, b: number, c: number, d: number): number;

15
node_modules/element-plus/lib/utils/easings.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function easeInOutCubic(t, b, c, d) {
const cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
exports.easeInOutCubic = easeInOutCubic;
//# sourceMappingURL=easings.js.map

1
node_modules/element-plus/lib/utils/easings.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"easings.js","sources":["../../../../packages/utils/easings.ts"],"sourcesContent":["export function easeInOutCubic(t: number, b: number, c: number, d: number) {\n const cc = c - b\n t /= d / 2\n if (t < 1) {\n return (cc / 2) * t * t * t + b\n }\n return (cc / 2) * ((t -= 2) * t * t + 2) + b\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3C,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AACnB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE;AACb,IAAI,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7C;;;;"}

3
node_modules/element-plus/lib/utils/error.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare function throwError(scope: string, m: string): never;
export declare function debugWarn(err: Error): void;
export declare function debugWarn(scope: string, message: string): void;

19
node_modules/element-plus/lib/utils/error.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
class ElementPlusError extends Error {
constructor(m) {
super(m);
this.name = "ElementPlusError";
}
}
function throwError(scope, m) {
throw new ElementPlusError(`[${scope}] ${m}`);
}
function debugWarn(scope, message) {
}
exports.debugWarn = debugWarn;
exports.throwError = throwError;
//# sourceMappingURL=error.js.map

1
node_modules/element-plus/lib/utils/error.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"error.js","sources":["../../../../packages/utils/error.ts"],"sourcesContent":["import { isString } from './types'\n\nclass ElementPlusError extends Error {\n constructor(m: string) {\n super(m)\n this.name = 'ElementPlusError'\n }\n}\n\nexport function throwError(scope: string, m: string): never {\n throw new ElementPlusError(`[${scope}] ${m}`)\n}\n\nexport function debugWarn(err: Error): void\nexport function debugWarn(scope: string, message: string): void\nexport function debugWarn(scope: string | Error, message?: string): void {\n if (process.env.NODE_ENV !== 'production') {\n const error: Error = isString(scope)\n ? new ElementPlusError(`[${scope}] ${message}`)\n : scope\n // eslint-disable-next-line no-console\n console.warn(error)\n }\n}\n"],"names":[],"mappings":";;;;AACA,MAAM,gBAAgB,SAAS,KAAK,CAAC;AACrC,EAAE,WAAW,CAAC,CAAC,EAAE;AACjB,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACb,IAAI,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;AACnC,GAAG;AACH,CAAC;AACM,SAAS,UAAU,CAAC,KAAK,EAAE,CAAC,EAAE;AACrC,EAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC;AACM,SAAS,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE;AAK1C;;;;;"}

1
node_modules/element-plus/lib/utils/functions.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { NOOP, toRawType } from '@vue/shared';

17
node_modules/element-plus/lib/utils/functions.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
Object.defineProperty(exports, 'NOOP', {
enumerable: true,
get: function () { return shared.NOOP; }
});
Object.defineProperty(exports, 'toRawType', {
enumerable: true,
get: function () { return shared.toRawType; }
});
//# sourceMappingURL=functions.js.map

1
node_modules/element-plus/lib/utils/functions.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"functions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}

1
node_modules/element-plus/lib/utils/i18n.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const isKorean: (text: string) => boolean;

8
node_modules/element-plus/lib/utils/i18n.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
exports.isKorean = isKorean;
//# sourceMappingURL=i18n.js.map

1
node_modules/element-plus/lib/utils/i18n.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"i18n.js","sources":["../../../../packages/utils/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\n"],"names":[],"mappings":";;;;AAAY,MAAC,QAAQ,GAAG,CAAC,IAAI,KAAK,mCAAmC,CAAC,IAAI,CAAC,IAAI;;;;"}

15
node_modules/element-plus/lib/utils/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
export * from './dom';
export * from './vue';
export * from './arrays';
export * from './browser';
export * from './error';
export * from './functions';
export * from './i18n';
export * from './objects';
export * from './raf';
export * from './rand';
export * from './strings';
export * from './types';
export * from './typescript';
export * from './throttleByRaf';
export * from './easings';

192
node_modules/element-plus/lib/utils/index.js generated vendored Normal file
View File

@@ -0,0 +1,192 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var arrays = require('./arrays.js');
var browser = require('./browser.js');
var error = require('./error.js');
var i18n = require('./i18n.js');
var objects = require('./objects.js');
var raf = require('./raf.js');
var rand = require('./rand.js');
var strings = require('./strings.js');
var types = require('./types.js');
var typescript = require('./typescript.js');
var throttleByRaf = require('./throttleByRaf.js');
var easings = require('./easings.js');
var aria = require('./dom/aria.js');
var event = require('./dom/event.js');
var position = require('./dom/position.js');
var scroll = require('./dom/scroll.js');
var style = require('./dom/style.js');
var element = require('./dom/element.js');
var globalNode = require('./vue/global-node.js');
var icon = require('./vue/icon.js');
var install = require('./vue/install.js');
var runtime = require('./vue/props/runtime.js');
var refs = require('./vue/refs.js');
var size = require('./vue/size.js');
var validator = require('./vue/validator.js');
var vnode = require('./vue/vnode.js');
var lodashUnified = require('lodash-unified');
var core = require('@vueuse/core');
var shared = require('@vue/shared');
exports.castArray = arrays.castArray;
exports.extractFirst = arrays.extractFirst;
exports.unique = arrays.unique;
exports.isFirefox = browser.isFirefox;
exports.debugWarn = error.debugWarn;
exports.throwError = error.throwError;
exports.isKorean = i18n.isKorean;
exports.entriesOf = objects.entriesOf;
exports.getProp = objects.getProp;
exports.keysOf = objects.keysOf;
exports.cAF = raf.cAF;
exports.rAF = raf.rAF;
exports.generateId = rand.generateId;
exports.getRandomInt = rand.getRandomInt;
exports.capitalize = strings.capitalize;
exports.escapeStringRegexp = strings.escapeStringRegexp;
exports.kebabCase = strings.kebabCase;
exports.isBoolean = types.isBoolean;
exports.isElement = types.isElement;
exports.isEmpty = types.isEmpty;
exports.isNumber = types.isNumber;
exports.isPropAbsent = types.isPropAbsent;
exports.isStringNumber = types.isStringNumber;
exports.isUndefined = types.isUndefined;
exports.isWindow = types.isWindow;
exports.mutable = typescript.mutable;
exports.throttleByRaf = throttleByRaf.throttleByRaf;
exports.easeInOutCubic = easings.easeInOutCubic;
exports.focusElement = aria.focusElement;
exports.focusNode = aria.focusNode;
exports.getSibling = aria.getSibling;
exports.isFocusable = aria.isFocusable;
exports.isLeaf = aria.isLeaf;
exports.isVisible = aria.isVisible;
exports.obtainAllFocusableElements = aria.obtainAllFocusableElements;
exports.triggerEvent = aria.triggerEvent;
exports.composeEventHandlers = event.composeEventHandlers;
exports.whenMouse = event.whenMouse;
exports.getClientXY = position.getClientXY;
exports.getOffsetTop = position.getOffsetTop;
exports.getOffsetTopDistance = position.getOffsetTopDistance;
exports.isInContainer = position.isInContainer;
exports.animateScrollTo = scroll.animateScrollTo;
exports.getScrollBarWidth = scroll.getScrollBarWidth;
exports.getScrollContainer = scroll.getScrollContainer;
exports.getScrollElement = scroll.getScrollElement;
exports.getScrollTop = scroll.getScrollTop;
exports.isScroll = scroll.isScroll;
exports.scrollIntoView = scroll.scrollIntoView;
exports.addClass = style.addClass;
exports.addUnit = style.addUnit;
exports.classNameToArray = style.classNameToArray;
exports.getStyle = style.getStyle;
exports.hasClass = style.hasClass;
exports.removeClass = style.removeClass;
exports.removeStyle = style.removeStyle;
exports.setStyle = style.setStyle;
exports.getElement = element.getElement;
exports.changeGlobalNodesTarget = globalNode.changeGlobalNodesTarget;
exports.createGlobalNode = globalNode.createGlobalNode;
exports.removeGlobalNode = globalNode.removeGlobalNode;
exports.CloseComponents = icon.CloseComponents;
exports.TypeComponents = icon.TypeComponents;
exports.TypeComponentsMap = icon.TypeComponentsMap;
exports.ValidateComponentsMap = icon.ValidateComponentsMap;
exports.iconPropType = icon.iconPropType;
exports.withInstall = install.withInstall;
exports.withInstallDirective = install.withInstallDirective;
exports.withInstallFunction = install.withInstallFunction;
exports.withNoopInstall = install.withNoopInstall;
exports.buildProp = runtime.buildProp;
exports.buildProps = runtime.buildProps;
exports.definePropType = runtime.definePropType;
exports.epPropKey = runtime.epPropKey;
exports.isEpProp = runtime.isEpProp;
exports.composeRefs = refs.composeRefs;
exports.getComponentSize = size.getComponentSize;
exports.isValidComponentSize = validator.isValidComponentSize;
exports.isValidDatePickType = validator.isValidDatePickType;
exports.PatchFlags = vnode.PatchFlags;
exports.ensureOnlyChild = vnode.ensureOnlyChild;
exports.flattedChildren = vnode.flattedChildren;
exports.getFirstValidNode = vnode.getFirstValidNode;
exports.getNormalizedProps = vnode.getNormalizedProps;
exports.isComment = vnode.isComment;
exports.isFragment = vnode.isFragment;
exports.isTemplate = vnode.isTemplate;
exports.isText = vnode.isText;
exports.isValidElementNode = vnode.isValidElementNode;
exports.renderBlock = vnode.renderBlock;
exports.renderIf = vnode.renderIf;
Object.defineProperty(exports, 'ensureArray', {
enumerable: true,
get: function () { return lodashUnified.castArray; }
});
Object.defineProperty(exports, 'isClient', {
enumerable: true,
get: function () { return core.isClient; }
});
Object.defineProperty(exports, 'isIOS', {
enumerable: true,
get: function () { return core.isIOS; }
});
Object.defineProperty(exports, 'NOOP', {
enumerable: true,
get: function () { return shared.NOOP; }
});
Object.defineProperty(exports, 'camelize', {
enumerable: true,
get: function () { return shared.camelize; }
});
Object.defineProperty(exports, 'hasOwn', {
enumerable: true,
get: function () { return shared.hasOwn; }
});
Object.defineProperty(exports, 'hyphenate', {
enumerable: true,
get: function () { return shared.hyphenate; }
});
Object.defineProperty(exports, 'isArray', {
enumerable: true,
get: function () { return shared.isArray; }
});
Object.defineProperty(exports, 'isDate', {
enumerable: true,
get: function () { return shared.isDate; }
});
Object.defineProperty(exports, 'isFunction', {
enumerable: true,
get: function () { return shared.isFunction; }
});
Object.defineProperty(exports, 'isObject', {
enumerable: true,
get: function () { return shared.isObject; }
});
Object.defineProperty(exports, 'isPlainObject', {
enumerable: true,
get: function () { return shared.isPlainObject; }
});
Object.defineProperty(exports, 'isPromise', {
enumerable: true,
get: function () { return shared.isPromise; }
});
Object.defineProperty(exports, 'isString', {
enumerable: true,
get: function () { return shared.isString; }
});
Object.defineProperty(exports, 'isSymbol', {
enumerable: true,
get: function () { return shared.isSymbol; }
});
Object.defineProperty(exports, 'toRawType', {
enumerable: true,
get: function () { return shared.toRawType; }
});
//# sourceMappingURL=index.js.map

1
node_modules/element-plus/lib/utils/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

8
node_modules/element-plus/lib/utils/objects.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { Entries } from 'type-fest';
import type { Arrayable } from '.';
export declare const keysOf: <T extends object>(arr: T) => Array<keyof T>;
export declare const entriesOf: <T extends object>(arr: T) => Entries<T>;
export { hasOwn } from '@vue/shared';
export declare const getProp: <T = any>(obj: Record<string, any>, path: Arrayable<string>, defaultValue?: any) => {
value: T;
};

28
node_modules/element-plus/lib/utils/objects.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var lodashUnified = require('lodash-unified');
var shared = require('@vue/shared');
const keysOf = (arr) => Object.keys(arr);
const entriesOf = (arr) => Object.entries(arr);
const getProp = (obj, path, defaultValue) => {
return {
get value() {
return lodashUnified.get(obj, path, defaultValue);
},
set value(val) {
lodashUnified.set(obj, path, val);
}
};
};
Object.defineProperty(exports, 'hasOwn', {
enumerable: true,
get: function () { return shared.hasOwn; }
});
exports.entriesOf = entriesOf;
exports.getProp = getProp;
exports.keysOf = keysOf;
//# sourceMappingURL=objects.js.map

1
node_modules/element-plus/lib/utils/objects.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"objects.js","sources":["../../../../packages/utils/objects.ts"],"sourcesContent":["import { get, set } from 'lodash-unified'\n\nimport type { Entries } from 'type-fest'\nimport type { Arrayable } from '.'\n\nexport const keysOf = <T extends object>(arr: T) =>\n Object.keys(arr) as Array<keyof T>\nexport const entriesOf = <T extends object>(arr: T) =>\n Object.entries(arr) as Entries<T>\nexport { hasOwn } from '@vue/shared'\n\nexport const getProp = <T = any>(\n obj: Record<string, any>,\n path: Arrayable<string>,\n defaultValue?: any\n): { value: T } => {\n return {\n get value() {\n return get(obj, path, defaultValue)\n },\n set value(val: any) {\n set(obj, path, val)\n },\n }\n}\n"],"names":["get","set"],"mappings":";;;;;;;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;AACpC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;AAE1C,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,KAAK;AACpD,EAAE,OAAO;AACT,IAAI,IAAI,KAAK,GAAG;AAChB,MAAM,OAAOA,iBAAG,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;AAC1C,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE;AACnB,MAAMC,iBAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1B,KAAK;AACL,GAAG,CAAC;AACJ;;;;;;;;;;"}

2
node_modules/element-plus/lib/utils/raf.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare const rAF: (fn: () => void) => number;
export declare const cAF: (handle: number) => void;

12
node_modules/element-plus/lib/utils/raf.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
const rAF = (fn) => core.isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
const cAF = (handle) => core.isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
exports.cAF = cAF;
exports.rAF = rAF;
//# sourceMappingURL=raf.js.map

1
node_modules/element-plus/lib/utils/raf.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"raf.js","sources":["../../../../packages/utils/raf.ts"],"sourcesContent":["import { isClient } from './browser'\n\nexport const rAF = (fn: () => void) =>\n isClient\n ? window.requestAnimationFrame(fn)\n : (setTimeout(fn, 16) as unknown as number)\n\nexport const cAF = (handle: number) =>\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\n"],"names":["isClient"],"mappings":";;;;;;AACY,MAAC,GAAG,GAAG,CAAC,EAAE,KAAKA,aAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE;AAChF,MAAC,GAAG,GAAG,CAAC,MAAM,KAAKA,aAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM;;;;;"}

12
node_modules/element-plus/lib/utils/rand.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/**
* @deprecated Use `useId` `useIdInjection` instead
* Generate random number in range [0, 1000]
* Maybe replace with [uuid](https://www.npmjs.com/package/uuid)
*/
export declare const generateId: () => number;
/**
* @deprecated
* Generating a random int in range (0, max - 1)
* @param max {number}
*/
export declare const getRandomInt: (max: number) => number;

10
node_modules/element-plus/lib/utils/rand.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const generateId = () => Math.floor(Math.random() * 1e4);
const getRandomInt = (max) => Math.floor(Math.random() * Math.floor(max));
exports.generateId = generateId;
exports.getRandomInt = getRandomInt;
//# sourceMappingURL=rand.js.map

1
node_modules/element-plus/lib/utils/rand.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"rand.js","sources":["../../../../packages/utils/rand.ts"],"sourcesContent":["/**\n * @deprecated Use `useId` `useIdInjection` instead\n * Generate random number in range [0, 1000]\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\n */\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\n\n/**\n * @deprecated\n * Generating a random int in range (0, max - 1)\n * @param max {number}\n */\nexport const getRandomInt = (max: number) =>\n Math.floor(Math.random() * Math.floor(max))\n"],"names":[],"mappings":";;;;AAAY,MAAC,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE;AACpD,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;"}

8
node_modules/element-plus/lib/utils/strings.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { camelize, hyphenate } from '@vue/shared';
export { camelize, hyphenate };
export declare const kebabCase: (str: string) => string;
/**
* fork from {@link https://github.com/sindresorhus/escape-string-regexp}
*/
export declare const escapeStringRegexp: (string?: string) => string;
export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;

22
node_modules/element-plus/lib/utils/strings.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const kebabCase = shared.hyphenate;
const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
const capitalize = (str) => shared.capitalize(str);
Object.defineProperty(exports, 'camelize', {
enumerable: true,
get: function () { return shared.camelize; }
});
Object.defineProperty(exports, 'hyphenate', {
enumerable: true,
get: function () { return shared.hyphenate; }
});
exports.capitalize = capitalize;
exports.escapeStringRegexp = escapeStringRegexp;
exports.kebabCase = kebabCase;
//# sourceMappingURL=strings.js.map

1
node_modules/element-plus/lib/utils/strings.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"strings.js","sources":["../../../../packages/utils/strings.ts"],"sourcesContent":["import { camelize, hyphenate, capitalize as toCapitalize } from '@vue/shared'\n\nexport { camelize, hyphenate }\nexport const kebabCase = hyphenate\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\nexport const capitalize = <T extends string>(str: T) =>\n toCapitalize(str) as Capitalize<T>\n"],"names":["hyphenate","toCapitalize"],"mappings":";;;;;;AAEY,MAAC,SAAS,GAAGA,iBAAU;AACvB,MAAC,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5G,MAAC,UAAU,GAAG,CAAC,GAAG,KAAKC,iBAAY,CAAC,GAAG;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,4 @@
export declare function throttleByRaf(cb: (...args: any[]) => void): {
(...args: any[]): void;
cancel(): void;
};

26
node_modules/element-plus/lib/utils/throttleByRaf.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var raf = require('./raf.js');
function throttleByRaf(cb) {
let timer = 0;
const throttle = (...args) => {
if (timer) {
raf.cAF(timer);
}
timer = raf.rAF(() => {
cb(...args);
timer = 0;
});
};
throttle.cancel = () => {
raf.cAF(timer);
timer = 0;
};
return throttle;
}
exports.throttleByRaf = throttleByRaf;
//# sourceMappingURL=throttleByRaf.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"throttleByRaf.js","sources":["../../../../packages/utils/throttleByRaf.ts"],"sourcesContent":["import { cAF, rAF } from './raf'\n\nexport function throttleByRaf(cb: (...args: any[]) => void) {\n let timer = 0\n\n const throttle = (...args: any[]): void => {\n if (timer) {\n cAF(timer)\n }\n timer = rAF(() => {\n cb(...args)\n timer = 0\n })\n }\n\n throttle.cancel = () => {\n cAF(timer)\n timer = 0\n }\n\n return throttle\n}\n"],"names":["cAF","rAF"],"mappings":";;;;;;AACO,SAAS,aAAa,CAAC,EAAE,EAAE;AAClC,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;AAChB,EAAE,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,KAAK;AAChC,IAAI,IAAI,KAAK,EAAE;AACf,MAAMA,OAAG,CAAC,KAAK,CAAC,CAAC;AACjB,KAAK;AACL,IAAI,KAAK,GAAGC,OAAG,CAAC,MAAM;AACtB,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAClB,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,QAAQ,CAAC,MAAM,GAAG,MAAM;AAC1B,IAAID,OAAG,CAAC,KAAK,CAAC,CAAC;AACf,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC;AAClB;;;;"}

9
node_modules/element-plus/lib/utils/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export { isArray, isFunction, isObject, isString, isDate, isPromise, isSymbol, isPlainObject, } from '@vue/shared';
export declare const isUndefined: (val: any) => val is undefined;
export declare const isBoolean: (val: any) => val is boolean;
export declare const isNumber: (val: any) => val is number;
export declare const isEmpty: (val: unknown) => boolean;
export declare const isElement: (e: unknown) => e is Element;
export declare const isPropAbsent: (prop: unknown) => prop is null | undefined;
export declare const isStringNumber: (val: string) => boolean;
export declare const isWindow: (val: unknown) => val is Window;

66
node_modules/element-plus/lib/utils/types.js generated vendored Normal file
View File

@@ -0,0 +1,66 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
var lodashUnified = require('lodash-unified');
const isUndefined = (val) => val === void 0;
const isBoolean = (val) => typeof val === "boolean";
const isNumber = (val) => typeof val === "number";
const isEmpty = (val) => !val && val !== 0 || shared.isArray(val) && val.length === 0 || shared.isObject(val) && !Object.keys(val).length;
const isElement = (e) => {
if (typeof Element === "undefined")
return false;
return e instanceof Element;
};
const isPropAbsent = (prop) => lodashUnified.isNil(prop);
const isStringNumber = (val) => {
if (!shared.isString(val)) {
return false;
}
return !Number.isNaN(Number(val));
};
const isWindow = (val) => val === window;
Object.defineProperty(exports, 'isArray', {
enumerable: true,
get: function () { return shared.isArray; }
});
Object.defineProperty(exports, 'isDate', {
enumerable: true,
get: function () { return shared.isDate; }
});
Object.defineProperty(exports, 'isFunction', {
enumerable: true,
get: function () { return shared.isFunction; }
});
Object.defineProperty(exports, 'isObject', {
enumerable: true,
get: function () { return shared.isObject; }
});
Object.defineProperty(exports, 'isPlainObject', {
enumerable: true,
get: function () { return shared.isPlainObject; }
});
Object.defineProperty(exports, 'isPromise', {
enumerable: true,
get: function () { return shared.isPromise; }
});
Object.defineProperty(exports, 'isString', {
enumerable: true,
get: function () { return shared.isString; }
});
Object.defineProperty(exports, 'isSymbol', {
enumerable: true,
get: function () { return shared.isSymbol; }
});
exports.isBoolean = isBoolean;
exports.isElement = isElement;
exports.isEmpty = isEmpty;
exports.isNumber = isNumber;
exports.isPropAbsent = isPropAbsent;
exports.isStringNumber = isStringNumber;
exports.isUndefined = isUndefined;
exports.isWindow = isWindow;
//# sourceMappingURL=types.js.map

1
node_modules/element-plus/lib/utils/types.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sources":["../../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol,\n isPlainObject,\n} from '@vue/shared'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isEmpty = (val: unknown) =>\n (!val && val !== 0) ||\n (isArray(val) && val.length === 0) ||\n (isObject(val) && !Object.keys(val).length)\n\nexport const isElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\nexport const isPropAbsent = (prop: unknown): prop is null | undefined =>\n isNil(prop)\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n\nexport const isWindow = (val: unknown): val is Window => val === window\n"],"names":["isArray","isObject","isNil","isString"],"mappings":";;;;;;;AAYY,MAAC,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,KAAK,EAAE;AACvC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,UAAU;AAC/C,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,SAAS;AAC7C,MAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,IAAIA,cAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO;AACvH,MAAC,SAAS,GAAG,CAAC,CAAC,KAAK;AAChC,EAAE,IAAI,OAAO,OAAO,KAAK,WAAW;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,OAAO,CAAC,YAAY,OAAO,CAAC;AAC9B,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAKC,mBAAK,CAAC,IAAI,EAAE;AACtC,MAAC,cAAc,GAAG,CAAC,GAAG,KAAK;AACvC,EAAE,IAAI,CAACC,eAAQ,CAAC,GAAG,CAAC,EAAE;AACtB,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

73
node_modules/element-plus/lib/utils/typescript.d.ts generated vendored Normal file
View File

@@ -0,0 +1,73 @@
export declare const mutable: <T extends readonly any[] | Record<string, unknown>>(val: T) => Mutable<typeof val>;
export type Mutable<T> = {
-readonly [P in keyof T]: T[P];
};
export type HTMLElementCustomized<T> = HTMLElement & T;
/**
* @deprecated stop to use null
* @see {@link https://github.com/sindresorhus/meta/discussions/7}
*/
export type Nullable<T> = T | null;
export type Arrayable<T> = T | T[];
export type Awaitable<T> = Promise<T> | T;
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
type BrowserNativeObject = Date | FileList | File | Blob | RegExp;
/**
* Check whether it is tuple
*
* 检查是否为元组
*
* @example
* IsTuple<[1, 2, 3]> => true
* IsTuple<Array[number]> => false
*/
type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
/**
* Array method key
*
* 数组方法键
*/
type ArrayMethodKey = keyof any[];
/**
* Tuple index key
*
* 元组下标键
*
* @example
* TupleKey<[1, 2, 3]> => '0' | '1' | '2'
*/
type TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>;
/**
* Array index key
*
* 数组下标键
*/
type ArrayKey = number;
/**
* Helper type for recursively constructing paths through a type
*
* 用于通过一个类型递归构建路径的辅助类型
*/
type PathImpl<K extends string | number, V> = V extends Primitive | BrowserNativeObject ? `${K}` : `${K}` | `${K}.${Path<V>}`;
/**
* Type which collects all paths through a type
*
* 通过一个类型收集所有路径的类型
*
* @see {@link FieldPath}
*/
type Path<T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
[K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>;
}[TupleKey<T>] : PathImpl<ArrayKey, V> : {
[K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>;
}[keyof T];
/**
* Type which collects all paths through a type
*
* 通过一个类型收集所有路径的类型
*
* @example
* FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l'
*/
export type FieldPath<T> = T extends object ? Path<T> : never;
export {};

8
node_modules/element-plus/lib/utils/typescript.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const mutable = (val) => val;
exports.mutable = mutable;
//# sourceMappingURL=typescript.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"typescript.js","sources":["../../../../packages/utils/typescript.ts"],"sourcesContent":["export const mutable = <T extends readonly any[] | Record<string, unknown>>(\n val: T\n) => val as Mutable<typeof val>\nexport type Mutable<T> = { -readonly [P in keyof T]: T[P] }\n\nexport type HTMLElementCustomized<T> = HTMLElement & T\n\n/**\n * @deprecated stop to use null\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\n */\nexport type Nullable<T> = T | null\n\nexport type Arrayable<T> = T | T[]\nexport type Awaitable<T> = Promise<T> | T\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint\ntype BrowserNativeObject = Date | FileList | File | Blob | RegExp\n\n/**\n * Check whether it is tuple\n *\n * 检查是否为元组\n *\n * @example\n * IsTuple<[1, 2, 3]> => true\n * IsTuple<Array[number]> => false\n */\ntype IsTuple<T extends ReadonlyArray<any>> = number extends T['length']\n ? false\n : true\n\n/**\n * Array method key\n *\n * 数组方法键\n */\ntype ArrayMethodKey = keyof any[]\n\n/**\n * Tuple index key\n *\n * 元组下标键\n *\n * @example\n * TupleKey<[1, 2, 3]> => '0' | '1' | '2'\n */\ntype TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>\n\n/**\n * Array index key\n *\n * 数组下标键\n */\ntype ArrayKey = number\n\n/**\n * Helper type for recursively constructing paths through a type\n *\n * 用于通过一个类型递归构建路径的辅助类型\n */\ntype PathImpl<K extends string | number, V> = V extends\n | Primitive\n | BrowserNativeObject\n ? `${K}`\n : `${K}` | `${K}.${Path<V>}`\n\n/**\n * Type which collects all paths through a type\n *\n * 通过一个类型收集所有路径的类型\n *\n * @see {@link FieldPath}\n */\ntype Path<T> = T extends ReadonlyArray<infer V>\n ? IsTuple<T> extends true\n ? {\n [K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>\n }[TupleKey<T>] // tuple\n : PathImpl<ArrayKey, V> // array\n : {\n [K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>\n }[keyof T] // object\n\n/**\n * Type which collects all paths through a type\n *\n * 通过一个类型收集所有路径的类型\n *\n * @example\n * FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l'\n */\nexport type FieldPath<T> = T extends object ? Path<T> : never\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG,CAAC,GAAG,KAAK;;;;"}

View File

@@ -0,0 +1,3 @@
export declare function createGlobalNode(id?: string): HTMLDivElement;
export declare function removeGlobalNode(el: HTMLElement): void;
export declare function changeGlobalNodesTarget(el: HTMLElement): void;

38
node_modules/element-plus/lib/utils/vue/global-node.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@vueuse/core');
const globalNodes = [];
let target = !core.isClient ? void 0 : document.body;
function createGlobalNode(id) {
const el = document.createElement("div");
if (id !== void 0) {
el.setAttribute("id", id);
}
if (target) {
target.appendChild(el);
globalNodes.push(el);
}
return el;
}
function removeGlobalNode(el) {
globalNodes.splice(globalNodes.indexOf(el), 1);
el.remove();
}
function changeGlobalNodesTarget(el) {
if (el === target)
return;
target = el;
globalNodes.forEach((el2) => {
if (target && !el2.contains(target)) {
target.appendChild(el2);
}
});
}
exports.changeGlobalNodesTarget = changeGlobalNodesTarget;
exports.createGlobalNode = createGlobalNode;
exports.removeGlobalNode = removeGlobalNode;
//# sourceMappingURL=global-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"global-node.js","sources":["../../../../../packages/utils/vue/global-node.ts"],"sourcesContent":["import { isClient } from '../browser'\n\nconst globalNodes: HTMLElement[] = []\nlet target: HTMLElement | undefined = !isClient ? undefined : document.body\n\nexport function createGlobalNode(id?: string) {\n const el = document.createElement('div')\n if (id !== undefined) {\n el.setAttribute('id', id)\n }\n\n if (target) {\n target.appendChild(el)\n globalNodes.push(el)\n }\n\n return el\n}\n\nexport function removeGlobalNode(el: HTMLElement) {\n globalNodes.splice(globalNodes.indexOf(el), 1)\n el.remove()\n}\n\nexport function changeGlobalNodesTarget(el: HTMLElement) {\n if (el === target) return\n\n target = el\n globalNodes.forEach((el) => {\n if (target && !el.contains(target)) {\n target.appendChild(el)\n }\n })\n}\n"],"names":["isClient"],"mappings":";;;;;;AACA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAI,MAAM,GAAG,CAACA,aAAQ,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AACzC,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3C,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,EAAE;AACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9B,GAAG;AACH,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AAC3B,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC;AACM,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjD,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;AACd,CAAC;AACM,SAAS,uBAAuB,CAAC,EAAE,EAAE;AAC5C,EAAE,IAAI,EAAE,KAAK,MAAM;AACnB,IAAI,OAAO;AACX,EAAE,MAAM,GAAG,EAAE,CAAC;AACd,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC/B,IAAI,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACzC,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;;;"}

24
node_modules/element-plus/lib/utils/vue/icon.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import type { Component } from 'vue';
export declare const iconPropType: import("vue").PropType<string | Component>;
export declare const CloseComponents: {
Close: any;
};
export declare const TypeComponents: {
Close: any;
SuccessFilled: any;
InfoFilled: any;
WarningFilled: any;
CircleCloseFilled: any;
};
export declare const TypeComponentsMap: {
primary: any;
success: any;
warning: any;
error: any;
info: any;
};
export declare const ValidateComponentsMap: {
validating: any;
success: any;
error: any;
};

41
node_modules/element-plus/lib/utils/vue/icon.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var iconsVue = require('@element-plus/icons-vue');
var runtime = require('./props/runtime.js');
const iconPropType = runtime.definePropType([
String,
Object,
Function
]);
const CloseComponents = {
Close: iconsVue.Close
};
const TypeComponents = {
Close: iconsVue.Close,
SuccessFilled: iconsVue.SuccessFilled,
InfoFilled: iconsVue.InfoFilled,
WarningFilled: iconsVue.WarningFilled,
CircleCloseFilled: iconsVue.CircleCloseFilled
};
const TypeComponentsMap = {
primary: iconsVue.InfoFilled,
success: iconsVue.SuccessFilled,
warning: iconsVue.WarningFilled,
error: iconsVue.CircleCloseFilled,
info: iconsVue.InfoFilled
};
const ValidateComponentsMap = {
validating: iconsVue.Loading,
success: iconsVue.CircleCheck,
error: iconsVue.CircleClose
};
exports.CloseComponents = CloseComponents;
exports.TypeComponents = TypeComponents;
exports.TypeComponentsMap = TypeComponentsMap;
exports.ValidateComponentsMap = ValidateComponentsMap;
exports.iconPropType = iconPropType;
//# sourceMappingURL=icon.js.map

1
node_modules/element-plus/lib/utils/vue/icon.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"icon.js","sources":["../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n primary: InfoFilled,\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["definePropType","Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;;;;AAWY,MAAC,YAAY,GAAGA,sBAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEC,cAAK;AACP,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,SAAEA,cAAK;AACP,iBAAEC,sBAAa;AACf,cAAEC,mBAAU;AACZ,iBAAEC,sBAAa;AACf,qBAAEC,0BAAiB;AACnB,EAAE;AACU,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAEF,mBAAU;AACrB,EAAE,OAAO,EAAED,sBAAa;AACxB,EAAE,OAAO,EAAEE,sBAAa;AACxB,EAAE,KAAK,EAAEC,0BAAiB;AAC1B,EAAE,IAAI,EAAEF,mBAAU;AAClB,EAAE;AACU,MAAC,qBAAqB,GAAG;AACrC,EAAE,UAAU,EAAEG,gBAAO;AACrB,EAAE,OAAO,EAAEC,oBAAW;AACtB,EAAE,KAAK,EAAEC,oBAAW;AACpB;;;;;;;;"}

9
node_modules/element-plus/lib/utils/vue/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export * from './global-node';
export * from './icon';
export * from './install';
export * from './props';
export * from './refs';
export * from './size';
export * from './typescript';
export * from './validator';
export * from './vnode';

49
node_modules/element-plus/lib/utils/vue/index.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var globalNode = require('./global-node.js');
var icon = require('./icon.js');
var install = require('./install.js');
var refs = require('./refs.js');
var size = require('./size.js');
var validator = require('./validator.js');
var vnode = require('./vnode.js');
var runtime = require('./props/runtime.js');
exports.changeGlobalNodesTarget = globalNode.changeGlobalNodesTarget;
exports.createGlobalNode = globalNode.createGlobalNode;
exports.removeGlobalNode = globalNode.removeGlobalNode;
exports.CloseComponents = icon.CloseComponents;
exports.TypeComponents = icon.TypeComponents;
exports.TypeComponentsMap = icon.TypeComponentsMap;
exports.ValidateComponentsMap = icon.ValidateComponentsMap;
exports.iconPropType = icon.iconPropType;
exports.withInstall = install.withInstall;
exports.withInstallDirective = install.withInstallDirective;
exports.withInstallFunction = install.withInstallFunction;
exports.withNoopInstall = install.withNoopInstall;
exports.composeRefs = refs.composeRefs;
exports.getComponentSize = size.getComponentSize;
exports.isValidComponentSize = validator.isValidComponentSize;
exports.isValidDatePickType = validator.isValidDatePickType;
exports.PatchFlags = vnode.PatchFlags;
exports.ensureOnlyChild = vnode.ensureOnlyChild;
exports.flattedChildren = vnode.flattedChildren;
exports.getFirstValidNode = vnode.getFirstValidNode;
exports.getNormalizedProps = vnode.getNormalizedProps;
exports.isComment = vnode.isComment;
exports.isFragment = vnode.isFragment;
exports.isTemplate = vnode.isTemplate;
exports.isText = vnode.isText;
exports.isValidElementNode = vnode.isValidElementNode;
exports.renderBlock = vnode.renderBlock;
exports.renderIf = vnode.renderIf;
exports.buildProp = runtime.buildProp;
exports.buildProps = runtime.buildProps;
exports.definePropType = runtime.definePropType;
exports.epPropKey = runtime.epPropKey;
exports.isEpProp = runtime.isEpProp;
//# sourceMappingURL=index.js.map

1
node_modules/element-plus/lib/utils/vue/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

6
node_modules/element-plus/lib/utils/vue/install.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { Directive } from 'vue';
import type { SFCInstallWithContext, SFCWithInstall } from './typescript';
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
export declare const withInstallFunction: <T>(fn: T, name: string) => SFCInstallWithContext<T>;
export declare const withInstallDirective: <T extends Directive>(directive: T, name: string) => SFCWithInstall<T>;
export declare const withNoopInstall: <T>(component: T) => SFCWithInstall<T>;

42
node_modules/element-plus/lib/utils/vue/install.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const withInstall = (main, extra) => {
main.install = (app) => {
for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
app.component(comp.name, comp);
}
};
if (extra) {
for (const [key, comp] of Object.entries(extra)) {
main[key] = comp;
}
}
return main;
};
const withInstallFunction = (fn, name) => {
fn.install = (app) => {
fn._context = app._context;
app.config.globalProperties[name] = fn;
};
return fn;
};
const withInstallDirective = (directive, name) => {
directive.install = (app) => {
app.directive(name, directive);
};
return directive;
};
const withNoopInstall = (component) => {
component.install = shared.NOOP;
return component;
};
exports.withInstall = withInstall;
exports.withInstallDirective = withInstallDirective;
exports.withInstallFunction = withInstallFunction;
exports.withNoopInstall = withNoopInstall;
//# sourceMappingURL=install.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"install.js","sources":["../../../../../packages/utils/vue/install.ts"],"sourcesContent":["import { NOOP } from '../functions'\n\nimport type { App, Directive } from 'vue'\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\n\nexport const withInstall = <T, E extends Record<string, any>>(\n main: T,\n extra?: E\n) => {\n ;(main as SFCWithInstall<T>).install = (app): void => {\n for (const comp of [main, ...Object.values(extra ?? {})]) {\n app.component(comp.name, comp)\n }\n }\n\n if (extra) {\n for (const [key, comp] of Object.entries(extra)) {\n ;(main as any)[key] = comp\n }\n }\n return main as SFCWithInstall<T> & E\n}\n\nexport const withInstallFunction = <T>(fn: T, name: string) => {\n ;(fn as SFCWithInstall<T>).install = (app: App) => {\n ;(fn as SFCInstallWithContext<T>)._context = app._context\n app.config.globalProperties[name] = fn\n }\n\n return fn as SFCInstallWithContext<T>\n}\n\nexport const withInstallDirective = <T extends Directive>(\n directive: T,\n name: string\n) => {\n ;(directive as SFCWithInstall<T>).install = (app: App): void => {\n app.directive(name, directive)\n }\n\n return directive as SFCWithInstall<T>\n}\n\nexport const withNoopInstall = <T>(component: T) => {\n ;(component as SFCWithInstall<T>).install = NOOP\n\n return component as SFCWithInstall<T>\n}\n"],"names":["NOOP"],"mappings":";;;;;;AACY,MAAC,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AAE5C,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AAC1B,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,EAAE;AAC7E,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,IAAI,KAAK,EAAE;AACb,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAErD,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACvB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACU,MAAC,mBAAmB,GAAG,CAAC,EAAE,EAAE,IAAI,KAAK;AAEjD,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AAExB,IAAI,EAAE,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC/B,IAAI,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AAC3C,GAAG,CAAC;AACJ,EAAE,OAAO,EAAE,CAAC;AACZ,EAAE;AACU,MAAC,oBAAoB,GAAG,CAAC,SAAS,EAAE,IAAI,KAAK;AAEzD,EAAE,SAAS,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AAC/B,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACnC,GAAG,CAAC;AACJ,EAAE,OAAO,SAAS,CAAC;AACnB,EAAE;AACU,MAAC,eAAe,GAAG,CAAC,SAAS,KAAK;AAE9C,EAAE,SAAS,CAAC,OAAO,GAAGA,WAAI,CAAC;AAC3B,EAAE,OAAO,SAAS,CAAC;AACnB;;;;;;;"}

View File

@@ -0,0 +1,3 @@
export * from './util';
export * from './types';
export * from './runtime';

14
node_modules/element-plus/lib/utils/vue/props/index.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var runtime = require('./runtime.js');
exports.buildProp = runtime.buildProp;
exports.buildProps = runtime.buildProps;
exports.definePropType = runtime.definePropType;
exports.epPropKey = runtime.epPropKey;
exports.isEpProp = runtime.isEpProp;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}

View File

@@ -0,0 +1,29 @@
import type { PropType } from 'vue';
import type { EpProp, EpPropConvert, EpPropFinalized, EpPropInput, EpPropMergeType, IfEpProp, IfNativePropType, NativePropType } from './types';
export declare const epPropKey = "__epPropKey";
export declare const definePropType: <T>(val: any) => PropType<T>;
export declare const isEpProp: (val: unknown) => val is EpProp<any, any, any>;
/**
* @description Build prop. It can better optimize prop types
* @description 生成 prop能更好地优化类型
* @example
// limited options
// the type will be PropType<'light' | 'dark'>
buildProp({
type: String,
values: ['light', 'dark'],
} as const)
* @example
// limited options and other types
// the type will be PropType<'small' | 'large' | number>
buildProp({
type: [String, Number],
values: ['small', 'large'],
validator: (val: unknown): val is number => typeof val === 'number',
} as const)
@link see more: https://github.com/element-plus/element-plus/pull/3341
*/
export declare const buildProp: <Type = never, Value = never, Validator = never, Default extends EpPropMergeType<Type, Value, Validator> = never, Required extends boolean = false>(prop: EpPropInput<Type, Value, Validator, Default, Required>, key?: string) => EpPropFinalized<Type, Value, Validator, Default, Required>;
export declare const buildProps: <Props extends Record<string, {
[epPropKey]: true;
} | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };

View File

@@ -0,0 +1,54 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var lodashUnified = require('lodash-unified');
var shared = require('@vue/shared');
const epPropKey = "__epPropKey";
const definePropType = (val) => val;
const isEpProp = (val) => shared.isObject(val) && !!val[epPropKey];
const buildProp = (prop, key) => {
if (!shared.isObject(prop) || isEpProp(prop))
return prop;
const { values, required, default: defaultValue, type, validator } = prop;
const _validator = values || validator ? (val) => {
let valid = false;
let allowedValues = [];
if (values) {
allowedValues = Array.from(values);
if (shared.hasOwn(prop, "default")) {
allowedValues.push(defaultValue);
}
valid || (valid = allowedValues.includes(val));
}
if (validator)
valid || (valid = validator(val));
if (!valid && allowedValues.length > 0) {
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
vue.warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
}
return valid;
} : void 0;
const epProp = {
type,
required: !!required,
validator: _validator,
[epPropKey]: true
};
if (shared.hasOwn(prop, "default"))
epProp.default = defaultValue;
return epProp;
};
const buildProps = (props) => lodashUnified.fromPairs(Object.entries(props).map(([key, option]) => [
key,
buildProp(option, key)
]));
exports.buildProp = buildProp;
exports.buildProps = buildProps;
exports.definePropType = definePropType;
exports.epPropKey = epPropKey;
exports.isEpProp = isEpProp;
//# sourceMappingURL=runtime.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,120 @@
import type { epPropKey } from './runtime';
import type { ExtractPropTypes, PropType } from 'vue';
import type { IfNever, UnknownToNever, WritableArray } from './util';
type Value<T> = T[keyof T];
/**
* Extract the type of a single prop
*
* 提取单个 prop 的参数类型
*
* @example
* ExtractPropType<{ type: StringConstructor }> => string | undefined
* ExtractPropType<{ type: StringConstructor, required: true }> => string
* ExtractPropType<{ type: BooleanConstructor }> => boolean
*/
export type ExtractPropType<T extends object> = Value<ExtractPropTypes<{
key: T;
}>>;
/**
* Extracts types via `ExtractPropTypes`, accepting `PropType<T>`, `XXXConstructor`, `never`...
*
* 通过 `ExtractPropTypes` 提取类型,接受 `PropType<T>`、`XXXConstructor`、`never`...
*
* @example
* ResolvePropType<BooleanConstructor> => boolean
* ResolvePropType<PropType<T>> => T
**/
export type ResolvePropType<T> = IfNever<T, never, ExtractPropType<{
type: WritableArray<T>;
required: true;
}>>;
/**
* Merge Type, Value, Validator types
* 合并 Type、Value、Validator 的类型
*
* @example
* EpPropMergeType<StringConstructor, '1', 1> => 1 | "1" // ignores StringConstructor
* EpPropMergeType<StringConstructor, never, number> => string | number
*/
export type EpPropMergeType<Type, Value, Validator> = IfNever<UnknownToNever<Value>, ResolvePropType<Type>, never> | UnknownToNever<Value> | UnknownToNever<Validator>;
/**
* Handling default values for input (constraints)
*
* 处理输入参数的默认值(约束)
*/
export type EpPropInputDefault<Required extends boolean, Default> = Required extends true ? never : Default extends Record<string, unknown> | Array<any> ? () => Default : (() => Default) | Default;
/**
* Native prop types, e.g: `BooleanConstructor`, `StringConstructor`, `null`, `undefined`, etc.
*
* 原生 prop `类型BooleanConstructor`、`StringConstructor`、`null`、`undefined` 等
*/
export type NativePropType = ((...args: any) => any) | {
new (...args: any): any;
} | undefined | null;
export type IfNativePropType<T, Y, N> = [T] extends [NativePropType] ? Y : N;
/**
* input prop `buildProp` or `buildProps` (constraints)
*
* prop 输入参数(约束)
*
* @example
* EpPropInput<StringConstructor, 'a', never, never, true>
* ⬇️
* {
type?: StringConstructor | undefined;
required?: true | undefined;
values?: readonly "a"[] | undefined;
validator?: ((val: any) => boolean) | ((val: any) => val is never) | undefined;
default?: undefined;
}
*/
export type EpPropInput<Type, Value, Validator, Default extends EpPropMergeType<Type, Value, Validator>, Required extends boolean> = {
type?: Type;
required?: Required;
values?: readonly Value[];
validator?: ((val: any) => val is Validator) | ((val: any) => boolean);
default?: EpPropInputDefault<Required, Default>;
};
/**
* output prop `buildProp` or `buildProps`.
*
* prop 输出参数。
*
* @example
* EpProp<'a', 'b', true>
* ⬇️
* {
readonly type: PropType<"a">;
readonly required: true;
readonly validator: ((val: unknown) => boolean) | undefined;
readonly default: "b";
__epPropKey: true;
}
*/
export type EpProp<Type, Default, Required> = {
readonly type: PropType<Type>;
readonly required: [Required] extends [true] ? true : false;
readonly validator: ((val: unknown) => boolean) | undefined;
[epPropKey]: true;
} & IfNever<Default, unknown, {
readonly default: Default;
}>;
/**
* Determine if it is `EpProp`
*/
export type IfEpProp<T, Y, N> = T extends {
[epPropKey]: true;
} ? Y : N;
/**
* Converting input to output.
*
* 将输入转换为输出
*/
export type EpPropConvert<Input> = Input extends EpPropInput<infer Type, infer Value, infer Validator, any, infer Required> ? EpPropFinalized<Type, Value, Validator, Input['default'], Required> : never;
/**
* Finalized conversion output
*
* 最终转换 EpProp
*/
export type EpPropFinalized<Type, Value, Validator, Default, Required> = EpProp<EpPropMergeType<Type, Value, Validator>, UnknownToNever<Default>, Required>;
export {};

View File

@@ -0,0 +1,3 @@
'use strict';
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1,8 @@
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
export type WritableArray<T> = T extends readonly any[] ? Writable<T> : T;
export type IfNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
export type IfUnknown<T, Y, N> = [unknown] extends [T] ? Y : N;
export type UnknownToNever<T> = IfUnknown<T, never, T>;
export {};

View File

@@ -0,0 +1,3 @@
'use strict';
//# sourceMappingURL=util.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"util.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

3
node_modules/element-plus/lib/utils/vue/refs.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { ComponentPublicInstance, Ref } from 'vue';
export type RefSetter = (el: Element | ComponentPublicInstance | undefined) => void;
export declare const composeRefs: (...refs: (Ref<HTMLElement | undefined> | RefSetter)[]) => (el: Element | ComponentPublicInstance | null) => void;

20
node_modules/element-plus/lib/utils/vue/refs.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const composeRefs = (...refs) => {
return (el) => {
refs.forEach((ref) => {
if (shared.isFunction(ref)) {
ref(el);
} else {
ref.value = el;
}
});
};
};
exports.composeRefs = composeRefs;
//# sourceMappingURL=refs.js.map

1
node_modules/element-plus/lib/utils/vue/refs.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"refs.js","sources":["../../../../../packages/utils/vue/refs.ts"],"sourcesContent":["import { isFunction } from '../types'\n\nimport type { ComponentPublicInstance, Ref } from 'vue'\n\nexport type RefSetter = (\n el: Element | ComponentPublicInstance | undefined\n) => void\n\nexport const composeRefs = (\n ...refs: (Ref<HTMLElement | undefined> | RefSetter)[]\n) => {\n return (el: Element | ComponentPublicInstance | null) => {\n refs.forEach((ref) => {\n if (isFunction(ref)) {\n ref(el as Element | ComponentPublicInstance)\n } else {\n ref.value = el as HTMLElement | undefined\n }\n })\n }\n}\n"],"names":["isFunction"],"mappings":";;;;;;AACY,MAAC,WAAW,GAAG,CAAC,GAAG,IAAI,KAAK;AACxC,EAAE,OAAO,CAAC,EAAE,KAAK;AACjB,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1B,MAAM,IAAIA,iBAAU,CAAC,GAAG,CAAC,EAAE;AAC3B,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC;AAChB,OAAO,MAAM;AACb,QAAQ,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC;AACvB,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ;;;;"}

2
node_modules/element-plus/lib/utils/vue/size.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { ComponentSize } from 'element-plus/es/constants';
export declare const getComponentSize: (size?: ComponentSize) => 40 | 32 | 24;

12
node_modules/element-plus/lib/utils/vue/size.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var size = require('../../constants/size.js');
const getComponentSize = (size$1) => {
return size.componentSizeMap[size$1 || "default"];
};
exports.getComponentSize = getComponentSize;
//# sourceMappingURL=size.js.map

1
node_modules/element-plus/lib/utils/vue/size.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"size.js","sources":["../../../../../packages/utils/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from '@element-plus/constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\n\nexport const getComponentSize = (size?: ComponentSize) => {\n return componentSizeMap[size || 'default']\n}\n"],"names":["size","componentSizeMap"],"mappings":";;;;;;AACY,MAAC,gBAAgB,GAAG,CAACA,MAAI,KAAK;AAC1C,EAAE,OAAOC,qBAAgB,CAACD,MAAI,IAAI,SAAS,CAAC,CAAC;AAC7C;;;;"}

View File

@@ -0,0 +1,6 @@
import type { AppContext, EmitsOptions, Plugin, SetupContext } from 'vue';
export type SFCWithInstall<T> = T & Plugin;
export type SFCInstallWithContext<T> = SFCWithInstall<T> & {
_context: AppContext | null;
};
export type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];

View File

@@ -0,0 +1,3 @@
'use strict';
//# sourceMappingURL=typescript.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"typescript.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1,3 @@
import type { ComponentSize, DatePickType } from 'element-plus/es/constants';
export declare const isValidComponentSize: (val: string) => val is ComponentSize | "";
export declare const isValidDatePickType: (val: string) => val is DatePickType;

13
node_modules/element-plus/lib/utils/vue/validator.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var size = require('../../constants/size.js');
var date = require('../../constants/date.js');
const isValidComponentSize = (val) => ["", ...size.componentSizes].includes(val);
const isValidDatePickType = (val) => [...date.datePickTypes].includes(val);
exports.isValidComponentSize = isValidComponentSize;
exports.isValidDatePickType = isValidDatePickType;
//# sourceMappingURL=validator.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validator.js","sources":["../../../../../packages/utils/vue/validator.ts"],"sourcesContent":["import { componentSizes, datePickTypes } from '@element-plus/constants'\n\nimport type { ComponentSize, DatePickType } from '@element-plus/constants'\n\nexport const isValidComponentSize = (val: string): val is ComponentSize | '' =>\n ['', ...componentSizes].includes(val)\n\nexport const isValidDatePickType = (val: string): val is DatePickType =>\n ([...datePickTypes] as string[]).includes(val)\n"],"names":["componentSizes","datePickTypes"],"mappings":";;;;;;;AACY,MAAC,oBAAoB,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,EAAE,GAAGA,mBAAc,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE;AACvE,MAAC,mBAAmB,GAAG,CAAC,GAAG,KAAK,CAAC,GAAGC,kBAAa,CAAC,CAAC,QAAQ,CAAC,GAAG;;;;;"}

51
node_modules/element-plus/lib/utils/vue/vnode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,51 @@
import { createBlock } from 'vue';
import type { VNode, VNodeArrayChildren, VNodeChild, VNodeNormalizedChildren } from 'vue';
export declare enum PatchFlags {
TEXT = 1,
CLASS = 2,
STYLE = 4,
PROPS = 8,
FULL_PROPS = 16,
HYDRATE_EVENTS = 32,
STABLE_FRAGMENT = 64,
KEYED_FRAGMENT = 128,
UNKEYED_FRAGMENT = 256,
NEED_PATCH = 512,
DYNAMIC_SLOTS = 1024,
HOISTED = -1,
BAIL = -2
}
export type VNodeChildAtom = Exclude<VNodeChild, Array<any>>;
export type RawSlots = Exclude<VNodeNormalizedChildren, Array<any> | null | string>;
export declare function isFragment(node: VNode): boolean;
export declare function isFragment(node: unknown): node is VNode;
export declare function isText(node: VNode): boolean;
export declare function isText(node: unknown): node is VNode;
export declare function isComment(node: VNode): boolean;
export declare function isComment(node: unknown): node is VNode;
export declare function isTemplate(node: VNode): boolean;
export declare function isTemplate(node: unknown): node is VNode;
/**
* determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if
* @param node {VNode} node to be tested
*/
export declare function isValidElementNode(node: VNode): boolean;
export declare function isValidElementNode(node: unknown): node is VNode;
export declare const getFirstValidNode: (nodes: VNodeNormalizedChildren, maxDepth?: number) => string | number | boolean | void | VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | VNodeArrayChildren | {
[name: string]: unknown;
$stable?: boolean;
} | null | undefined;
export declare function renderIf(condition: boolean, ...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>;
export declare function renderBlock(...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>;
export declare const getNormalizedProps: (node: VNode) => Record<string, any>;
export declare const ensureOnlyChild: (children: VNodeArrayChildren | undefined) => (string | number | boolean | void | VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | null | undefined) | VNodeArrayChildren;
export type FlattenVNodes = Array<VNodeChildAtom | RawSlots>;
export declare const flattedChildren: (children: FlattenVNodes | VNode | VNodeNormalizedChildren) => FlattenVNodes;

Some files were not shown because too many files have changed in this diff Show More