add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

9
node_modules/rc-input/lib/utils/commonUtils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import type React from 'react';
import type { BaseInputProps, InputProps } from '../interface';
export declare function hasAddon(props: BaseInputProps | InputProps): boolean;
export declare function hasPrefixSuffix(props: BaseInputProps | InputProps): boolean;
export declare function resolveOnChange<E extends HTMLInputElement | HTMLTextAreaElement>(target: E, e: React.ChangeEvent<E> | React.MouseEvent<HTMLElement, MouseEvent> | React.CompositionEvent<HTMLElement>, onChange: undefined | ((event: React.ChangeEvent<E>) => void), targetValue?: string): void;
export interface InputFocusOptions extends FocusOptions {
cursor?: 'start' | 'end' | 'all';
}
export declare function triggerFocus(element?: HTMLInputElement | HTMLTextAreaElement, option?: InputFocusOptions): void;

101
node_modules/rc-input/lib/utils/commonUtils.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hasAddon = hasAddon;
exports.hasPrefixSuffix = hasPrefixSuffix;
exports.resolveOnChange = resolveOnChange;
exports.triggerFocus = triggerFocus;
function hasAddon(props) {
return !!(props.addonBefore || props.addonAfter);
}
function hasPrefixSuffix(props) {
return !!(props.prefix || props.suffix || props.allowClear);
}
// TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.
function cloneEvent(event, target, value) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
var newEvent = Object.create(event, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
// Fill data
currentTarget.value = value;
// Fill selection. Some type like `email` not support selection
// https://github.com/ant-design/ant-design/issues/47833
if (typeof target.selectionStart === 'number' && typeof target.selectionEnd === 'number') {
currentTarget.selectionStart = target.selectionStart;
currentTarget.selectionEnd = target.selectionEnd;
}
currentTarget.setSelectionRange = function () {
target.setSelectionRange.apply(target, arguments);
};
return newEvent;
}
function resolveOnChange(target, e, onChange, targetValue) {
if (!onChange) {
return;
}
var event = e;
if (e.type === 'click') {
// Clone a new target for event.
// Avoid the following usage, the setQuery method gets the original value.
//
// const [query, setQuery] = React.useState('');
// <Input
// allowClear
// value={query}
// onChange={(e)=> {
// setQuery((prevStatus) => e.target.value);
// }}
// />
event = cloneEvent(e, target, '');
onChange(event);
return;
}
// Trigger by composition event, this means we need force change the input value
// https://github.com/ant-design/ant-design/issues/45737
// https://github.com/ant-design/ant-design/issues/46598
if (target.type !== 'file' && targetValue !== undefined) {
event = cloneEvent(e, target, targetValue);
onChange(event);
return;
}
onChange(event);
}
function triggerFocus(element, option) {
if (!element) return;
element.focus(option);
// Selection content
var _ref = option || {},
cursor = _ref.cursor;
if (cursor) {
var len = element.value.length;
switch (cursor) {
case 'start':
element.setSelectionRange(0, 0);
break;
case 'end':
element.setSelectionRange(len, len);
break;
default:
element.setSelectionRange(0, len);
}
}
}

2
node_modules/rc-input/lib/utils/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
/** https://github.com/Microsoft/TypeScript/issues/29729 */
export type LiteralUnion<T extends U, U> = T | (U & {});

5
node_modules/rc-input/lib/utils/types.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});