@ifhover/leaf-ui 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser/modules/config-provider/component-defaults.cjs.map +1 -1
- package/dist/cjs/browser/modules/index.cjs +3 -0
- package/dist/cjs/browser/modules/locales/en-US.cjs +1 -1
- package/dist/cjs/browser/modules/locales/ja-JP.cjs +1 -1
- package/dist/cjs/browser/modules/locales/ko-KR.cjs +1 -1
- package/dist/cjs/browser/modules/locales/zh-CN.cjs +1 -1
- package/dist/cjs/browser/modules/locales/zh-TW.cjs +1 -1
- package/dist/cjs/browser/modules/upload/index.cjs +3 -0
- package/dist/cjs/browser/modules/upload/upload.cjs +89 -16
- package/dist/cjs/browser/modules/upload/upload.cjs.map +1 -1
- package/dist/cjs/config-provider/component-defaults.cjs.map +1 -1
- package/dist/cjs/config-provider/component-defaults.d.cts +3 -1
- package/dist/cjs/config-provider/component-defaults.d.cts.map +1 -1
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.d.cts +2 -2
- package/dist/cjs/index.d.cts.map +1 -1
- package/dist/cjs/locales/en-US.cjs +1 -1
- package/dist/cjs/locales/ja-JP.cjs +1 -1
- package/dist/cjs/locales/ko-KR.cjs +1 -1
- package/dist/cjs/locales/messages.d.cts +2 -0
- package/dist/cjs/locales/messages.d.cts.map +1 -1
- package/dist/cjs/locales/zh-CN.cjs +1 -1
- package/dist/cjs/locales/zh-TW.cjs +1 -1
- package/dist/cjs/styles/components/upload.css +1 -1
- package/dist/cjs/styles/index.css +100 -1
- package/dist/cjs/styles/index.css.map +1 -1
- package/dist/cjs/styles/upload.css +1 -1
- package/dist/cjs/upload/index.cjs +3 -0
- package/dist/cjs/upload/index.d.cts +2 -2
- package/dist/cjs/upload/index.d.cts.map +1 -1
- package/dist/cjs/upload/upload.cjs +89 -16
- package/dist/cjs/upload/upload.cjs.map +1 -1
- package/dist/cjs/upload/upload.d.cts +5 -2
- package/dist/cjs/upload/upload.d.cts.map +1 -1
- package/dist/esm/browser/modules/config-provider/component-defaults.js.map +1 -1
- package/dist/esm/browser/modules/index.js +1 -1
- package/dist/esm/browser/modules/locales/en-US.js +1 -1
- package/dist/esm/browser/modules/locales/ja-JP.js +1 -1
- package/dist/esm/browser/modules/locales/ko-KR.js +1 -1
- package/dist/esm/browser/modules/locales/zh-CN.js +1 -1
- package/dist/esm/browser/modules/locales/zh-TW.js +1 -1
- package/dist/esm/browser/modules/upload/index.js +1 -1
- package/dist/esm/browser/modules/upload/upload.js +89 -19
- package/dist/esm/browser/modules/upload/upload.js.map +1 -1
- package/dist/esm/config-provider/component-defaults.d.ts +3 -1
- package/dist/esm/config-provider/component-defaults.d.ts.map +1 -1
- package/dist/esm/config-provider/component-defaults.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US.js +1 -1
- package/dist/esm/locales/ja-JP.js +1 -1
- package/dist/esm/locales/ko-KR.js +1 -1
- package/dist/esm/locales/messages.d.ts +2 -0
- package/dist/esm/locales/messages.d.ts.map +1 -1
- package/dist/esm/locales/zh-CN.js +1 -1
- package/dist/esm/locales/zh-TW.js +1 -1
- package/dist/esm/styles/components/upload.css +1 -1
- package/dist/esm/styles/index.css +100 -1
- package/dist/esm/styles/index.css.map +1 -1
- package/dist/esm/styles/upload.css +1 -1
- package/dist/esm/upload/index.d.ts +2 -2
- package/dist/esm/upload/index.d.ts.map +1 -1
- package/dist/esm/upload/index.js +1 -1
- package/dist/esm/upload/upload.d.ts +5 -2
- package/dist/esm/upload/upload.d.ts.map +1 -1
- package/dist/esm/upload/upload.js +89 -19
- package/dist/esm/upload/upload.js.map +1 -1
- package/dist/locales/en-US.json +2 -0
- package/dist/locales/ja-JP.json +2 -0
- package/dist/locales/ko-KR.json +2 -0
- package/dist/locales/schema.json +8 -0
- package/dist/locales/zh-CN.json +2 -0
- package/dist/locales/zh-TW.json +2 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload/upload.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../src/upload/upload.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CloudUpload, RotateCw, Upload as UploadIcon, X } from 'lucide-react';\nimport {\n forwardRef,\n type HTMLAttributes,\n type ReactNode,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { ButtonControl } from '../button/button';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport type { FileItem } from '../filelist';\nimport { FileListControl as FileList } from '../filelist/filelist';\nimport { fileName } from '../filelist/model';\nimport { FieldScope, useFormField } from '../form/form';\nimport { classes } from '../shared/classes';\nimport { FormValue } from '../shared/field';\nimport { useFormattedText } from '../shared/use-formatted-text';\nimport { useText } from '../shared/use-text';\nimport { acceptsFile, type UploadRequest, type UploadResult, uploadRequest } from './request';\n\nexport interface UploadFile extends FileItem {\n uid: string;\n response?: unknown;\n}\nexport interface UploadChangeInfo {\n file?: UploadFile;\n reason: 'add' | 'progress' | 'success' | 'error' | 'remove' | 'cancel';\n}\nexport interface UploadRejection {\n file: File;\n reason: 'type' | 'size' | 'count' | 'validation';\n message: string;\n}\nexport interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n fileList?: readonly UploadFile[];\n defaultFileList?: readonly UploadFile[];\n onChange?: (files: UploadFile[], info: UploadChangeInfo) => void;\n accept?: string;\n multiple?: boolean;\n disabled?: boolean;\n drag?: boolean;\n maxCount?: number;\n maxSize?: number;\n beforeUpload?: (file: File) => boolean | File | Promise<boolean | File>;\n onReject?: (rejections: readonly UploadRejection[]) => void;\n action?: string | ((file: File) => string | Promise<string>);\n method?: 'POST' | 'PUT';\n headers?: Readonly<Record<string, string>>;\n data?: Readonly<Record<string, string | Blob>>;\n withCredentials?: boolean;\n fieldName?: string;\n // biome-ignore lint/suspicious/noConfusingVoidType: Custom transports may finish via callbacks without returning a result.\n customRequest?: (request: UploadRequest) => Promise<UploadResult | void>;\n onRemove?: (file: UploadFile) => boolean | void | Promise<boolean> | Promise<void>;\n showFileList?: boolean;\n hint?: ReactNode;\n children?: ReactNode;\n name?: string;\n form?: string;\n required?: boolean;\n autoUpload?: boolean;\n concurrency?: number;\n directory?: boolean;\n paste?: boolean;\n listType?: 'text' | 'picture' | 'picture-card';\n}\nexport interface UploadHandle {\n upload: (uid?: string) => void;\n abort: (uid?: string) => void;\n focus: () => void;\n}\nexport const Upload = forwardRef<UploadHandle, UploadProps>(function Upload(\n rawProps: UploadProps,\n ref,\n) {\n const {\n fileList,\n defaultFileList = [],\n onChange,\n accept,\n multiple = false,\n disabled: disabledProp,\n drag = false,\n maxCount,\n maxSize,\n beforeUpload,\n onReject,\n action,\n method = 'POST',\n headers,\n data,\n withCredentials = false,\n fieldName = 'file',\n customRequest,\n onRemove,\n showFileList = true,\n hint,\n children,\n name,\n form,\n required,\n autoUpload = true,\n concurrency = 3,\n directory,\n paste,\n listType = 'text',\n id: idProp,\n className,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n ...props\n } = useComponentProps('Upload', rawProps);\n const field = useFormField();\n const disabled = disabledProp || field?.disabled;\n const t = useText();\n const format = useFormattedText();\n const id = useId();\n const count = useRef(0);\n const input = useRef<HTMLInputElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const waiting = useRef(new Map<string, UploadFile>());\n const generation = useRef(0);\n const [internal, setInternal] = useState<readonly UploadFile[]>(defaultFileList);\n const [dragging, setDragging] = useState(false);\n const [validating, setValidating] = useState(false);\n const [errors, setErrors] = useState<readonly UploadRejection[]>([]);\n const current = fileList ?? internal;\n // biome-ignore lint/correctness/useExhaustiveDependencies: The form prop can reassign the input to another native form.\n useEffect(() => {\n const owner = input.current?.form;\n const reset = (event: Event) =>\n queueMicrotask(() => {\n if (event.defaultPrevented) return;\n generation.current++;\n for (const job of jobs.current.values()) job.abort();\n jobs.current.clear();\n waiting.current.clear();\n if (fileList === undefined) {\n setInternal(defaultFileList);\n latest.current.current = defaultFileList;\n }\n setErrors([]);\n setValidating(false);\n });\n const serialize = (event: FormDataEvent) => {\n if (!name || disabled) return;\n for (const file of latest.current.current) {\n if (file.originFile) event.formData.append(name, file.originFile, file.name);\n else if (file.url) event.formData.append(name, file.url);\n }\n };\n owner?.addEventListener('reset', reset);\n owner?.addEventListener('formdata', serialize);\n return () => {\n owner?.removeEventListener('reset', reset);\n owner?.removeEventListener('formdata', serialize);\n };\n }, [fileList, defaultFileList, form, name, disabled]);\n const latest = useRef({\n current,\n fileList,\n onChange,\n action,\n customRequest,\n method,\n headers,\n data,\n withCredentials,\n fieldName,\n });\n latest.current = {\n current,\n fileList,\n onChange,\n action,\n customRequest,\n method,\n headers,\n data,\n withCredentials,\n fieldName,\n };\n const jobs = useRef(new Map<string, AbortController>());\n const urls = useRef(new Map<string, string>());\n const mounted = useRef(true);\n const serial = useRef(Promise.resolve());\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n for (const job of jobs.current.values()) job.abort();\n jobs.current.clear();\n for (const url of urls.current.values()) URL.revokeObjectURL(url);\n urls.current.clear();\n };\n }, []);\n useEffect(() => {\n const present = new Set(current.map((file) => file.uid));\n for (const [uid, job] of jobs.current)\n if (!present.has(uid)) {\n job.abort();\n jobs.current.delete(uid);\n }\n for (const [uid, url] of urls.current)\n if (!present.has(uid)) {\n URL.revokeObjectURL(url);\n urls.current.delete(uid);\n }\n }, [current]);\n const commit = (next: UploadFile[], info: UploadChangeInfo) => {\n if (!mounted.current) return;\n latest.current.current = next;\n if (latest.current.fileList === undefined) setInternal(next);\n latest.current.onChange?.(next, info);\n };\n const update = (uid: string, values: Partial<UploadFile>, reason: UploadChangeInfo['reason']) => {\n const file = latest.current.current.find((file) => file.uid === uid);\n if (!file) return;\n const next = { ...file, ...values };\n commit(\n latest.current.current.map((file) => (file.uid === uid ? next : file)),\n { file: next, reason },\n );\n };\n const start = async (file: UploadFile) => {\n if (\n disabled ||\n !file.originFile ||\n jobs.current.has(file.uid) ||\n !mounted.current ||\n !latest.current.current.some((item) => item.uid === file.uid)\n )\n return;\n if (jobs.current.size >= Math.max(1, Math.floor(concurrency))) {\n waiting.current.set(file.uid, file);\n return;\n }\n waiting.current.delete(file.uid);\n const config = latest.current;\n if (!config.action && !config.customRequest) return;\n const request = new AbortController();\n jobs.current.set(file.uid, request);\n update(file.uid, { status: 'uploading', percent: 0, error: undefined }, 'progress');\n const progress = (percent: number) => {\n if (\n !request.signal.aborted &&\n jobs.current.get(file.uid) === request &&\n Number.isFinite(percent)\n )\n update(file.uid, { percent: Math.max(0, Math.min(99, percent)) }, 'progress');\n };\n try {\n let result: UploadResult | undefined;\n if (config.customRequest)\n result =\n (await config.customRequest({\n file: file.originFile,\n signal: request.signal,\n onProgress: progress,\n })) || undefined;\n else {\n const address =\n typeof config.action === 'function'\n ? await config.action(file.originFile)\n : config.action;\n if (request.signal.aborted) return;\n if (!address) throw new Error(t('upload.uploadUrlCannotBeEmpty'));\n result = await uploadRequest({\n file: file.originFile,\n signal: request.signal,\n onProgress: progress,\n action: address,\n method: config.method,\n headers: config.headers,\n data: config.data,\n withCredentials: config.withCredentials,\n fieldName: config.fieldName,\n });\n }\n if (!request.signal.aborted && jobs.current.get(file.uid) === request)\n update(\n file.uid,\n {\n status: 'done',\n percent: 100,\n response: result?.response,\n ...(result?.url ? { url: result.url } : {}),\n ...(result?.name ? { name: result.name } : {}),\n },\n 'success',\n );\n } catch (reason) {\n if (!request.signal.aborted && jobs.current.get(file.uid) === request)\n update(\n file.uid,\n {\n status: 'error',\n error: reason instanceof Error ? reason.message : t('upload.uploadFailed'),\n },\n 'error',\n );\n } finally {\n if (jobs.current.get(file.uid) === request) jobs.current.delete(file.uid);\n const next = waiting.current.values().next().value;\n if (next) void start(next);\n }\n };\n useImperativeHandle(ref, () => ({\n upload: (uid) => {\n for (const file of latest.current.current)\n if (\n (!uid || file.uid === uid) &&\n ['ready', 'error', 'cancelled'].includes(file.status ?? 'ready')\n )\n void start(file);\n },\n abort: (uid) => {\n for (const [key, job] of jobs.current)\n if (!uid || key === uid) {\n job.abort();\n jobs.current.delete(key);\n update(key, { status: 'cancelled' }, 'cancel');\n }\n if (uid) waiting.current.delete(uid);\n else waiting.current.clear();\n },\n focus: () => trigger.current?.focus(),\n }));\n const addFiles = (files: readonly File[]) => {\n if (disabled || !files.length) return;\n const batchGeneration = generation.current;\n serial.current = serial.current\n .then(async () => {\n if (!mounted.current || batchGeneration !== generation.current) return;\n setValidating(true);\n setErrors([]);\n const rejected: UploadRejection[] = [];\n const accepted: UploadFile[] = [];\n for (const original of files) {\n let file = original;\n const reject = (reason: UploadRejection['reason'], message: string) =>\n rejected.push({ file: original, reason, message });\n if (!multiple && accepted.length > 0) {\n reject('count', t('upload.chooseOneFileAtATime'));\n continue;\n }\n if (!acceptsFile(file, accept)) {\n reject('type', t('upload.fileTypeIsNotAccepted'));\n continue;\n }\n if (maxSize !== undefined && file.size > maxSize) {\n reject('size', t('upload.fileExceedsTheSizeLimit'));\n continue;\n }\n if (\n maxCount !== undefined &&\n latest.current.current.length + accepted.length >= maxCount\n ) {\n reject('count', t('upload.fileCountLimitReached'));\n continue;\n }\n try {\n const result = await beforeUpload?.(file);\n if (!mounted.current || batchGeneration !== generation.current) return;\n if (result === false) {\n reject('validation', t('upload.fileValidationFailed'));\n continue;\n }\n if (result instanceof File) file = result;\n } catch (reason) {\n reject(\n 'validation',\n reason instanceof Error ? reason.message : t('upload.fileValidationFailed'),\n );\n continue;\n }\n if (!mounted.current || batchGeneration !== generation.current) return;\n const uid = `${id}-${++count.current}`;\n let url: string | undefined;\n if (/^(image|video|audio)\\//.test(file.type)) {\n url = URL.createObjectURL(file);\n urls.current.set(uid, url);\n }\n accepted.push({\n uid,\n name: file.name,\n size: file.size,\n type: file.type,\n originFile: file,\n status: 'ready',\n url,\n });\n }\n if (!mounted.current || batchGeneration !== generation.current) return;\n if (accepted.length) {\n commit([...latest.current.current, ...accepted], {\n file: accepted.at(-1),\n reason: 'add',\n });\n if (autoUpload) for (const file of accepted) void start(file);\n }\n setErrors(rejected);\n setValidating(false);\n if (rejected.length) onReject?.(rejected);\n })\n .catch((reason) => {\n if (mounted.current) {\n setValidating(false);\n setErrors([{ file: files[0] as File, reason: 'validation', message: String(reason) }]);\n }\n });\n };\n const remove = async (file: FileItem) => {\n if (disabled) return;\n const entry = latest.current.current.find((item) => item.uid === file.uid);\n if (!entry || (await onRemove?.(entry)) === false || !mounted.current) return;\n jobs.current.get(entry.uid)?.abort();\n jobs.current.delete(entry.uid);\n waiting.current.delete(entry.uid);\n const url = urls.current.get(entry.uid);\n if (url) {\n URL.revokeObjectURL(url);\n urls.current.delete(entry.uid);\n }\n commit(\n latest.current.current.filter((item) => item.uid !== entry.uid),\n { file: entry, reason: 'remove' },\n );\n };\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: Drop handling augments the keyboard-accessible choose-file button inside this surface.\n <div\n {...props}\n className={classes(\n 'leaf-upload',\n drag && 'leaf-upload--drag',\n `leaf-upload--${listType}`,\n className,\n )}\n data-disabled={disabled || undefined}\n data-dragging={dragging || undefined}\n onPaste={(event) => {\n props.onPaste?.(event);\n if (paste && !event.defaultPrevented && !disabled && event.clipboardData.files.length) {\n event.preventDefault();\n addFiles([...event.clipboardData.files]);\n }\n }}\n onDragEnter={(event) => {\n onDragEnter?.(event);\n if (!event.defaultPrevented && !disabled) {\n event.preventDefault();\n setDragging(true);\n }\n }}\n onDragOver={(event) => {\n onDragOver?.(event);\n if (!event.defaultPrevented && !disabled) {\n event.preventDefault();\n event.dataTransfer.dropEffect = 'copy';\n }\n }}\n onDragLeave={(event) => {\n onDragLeave?.(event);\n if (!event.currentTarget.contains(event.relatedTarget as Node)) setDragging(false);\n }}\n onDrop={(event) => {\n onDrop?.(event);\n setDragging(false);\n if (event.defaultPrevented) return;\n event.preventDefault();\n if (!disabled) addFiles([...event.dataTransfer.files]);\n }}\n >\n <input\n ref={input}\n form={form}\n {...(directory ? { webkitdirectory: '', directory: '' } : {})}\n hidden\n type=\"file\"\n className=\"leaf-upload__input\"\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n tabIndex={-1}\n aria-label={t('upload.chooseFiles')}\n onChange={(event) => {\n addFiles([...(event.target.files ?? [])]);\n event.target.value = '';\n }}\n />\n {drag ? (\n <button\n ref={trigger}\n id={idProp ?? field?.id}\n type=\"button\"\n className=\"leaf-upload__dropzone\"\n disabled={disabled || validating}\n onClick={() => input.current?.click()}\n >\n <span className=\"leaf-upload__symbol\">\n <CloudUpload size={28} aria-hidden=\"true\" />\n </span>\n <span className=\"leaf-upload__title\">{children ?? t('upload.dropHint')}</span>\n <span className=\"leaf-upload__hint\">{hint ?? t('upload.dropDescription')}</span>\n </button>\n ) : (\n <div className=\"leaf-upload__trigger\">\n <ButtonControl\n ref={trigger}\n id={idProp ?? field?.id}\n variant=\"outline\"\n disabled={disabled}\n loading={validating}\n startIcon={<UploadIcon size={16} />}\n onClick={() => input.current?.click()}\n >\n {children ?? t('upload.chooseFiles')}\n </ButtonControl>\n {hint && <span className=\"leaf-upload__hint\">{hint}</span>}\n </div>\n )}\n <FormValue\n value={current.length ? 'selected' : ''}\n required={required ?? field?.required}\n form={form}\n disabled={disabled}\n triggerRef={trigger}\n />\n {errors.length > 0 && (\n <ul className=\"leaf-upload__errors\" role=\"alert\">\n {errors.map((error) => (\n <li key={`${error.file.name}-${error.file.lastModified}-${error.reason}`}>\n {error.file.name}: {error.message}\n </li>\n ))}\n </ul>\n )}\n {showFileList && current.length > 0 && (\n <FieldScope>\n <FileList\n items={current}\n listType={listType}\n disabled={disabled}\n removable\n onRemove={remove}\n renderActions={(file, actions) => (\n <>\n {file.status === 'uploading' && (\n <ButtonControl\n variant=\"text\"\n size=\"sm\"\n disabled={disabled}\n startIcon={<X size={15} />}\n aria-label={format('upload.cancelUpload', { name: fileName(file) })}\n onClick={() => {\n if (!file.uid) return;\n jobs.current.get(file.uid)?.abort();\n jobs.current.delete(file.uid);\n update(file.uid, { status: 'cancelled' }, 'cancel');\n }}\n />\n )}\n {['error', 'cancelled', 'ready'].includes(file.status ?? '') &&\n (action || customRequest) &&\n file.originFile && (\n <ButtonControl\n variant=\"text\"\n size=\"sm\"\n disabled={disabled}\n startIcon={<RotateCw size={15} />}\n aria-label={format('upload.retryUpload', { name: fileName(file) })}\n onClick={() => void start(file as UploadFile)}\n />\n )}\n {actions}\n </>\n )}\n />\n </FieldScope>\n )}\n </div>\n );\n});\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","Upload","forwardRef","rawProps","ref","fileList","defaultFileList","onChange","accept","multiple","disabledProp","drag","maxCount","maxSize","beforeUpload","onReject","action","method","headers","data","withCredentials","fieldName","customRequest","onRemove","showFileList","hint","children","name","form","required","autoUpload","concurrency","directory","paste","listType","idProp","className","onDragEnter","onDragLeave","onDragOver","onDrop","props","useComponentProps","field","useFormField","disabled","t","useText","format","useFormattedText","id","useId","count","useRef","input","trigger","waiting","Map","generation","internal","setInternal","useState","dragging","setDragging","validating","setValidating","errors","setErrors","current","useEffect","owner","reset","event","queueMicrotask","job","jobs","undefined","latest","serialize","file","urls","mounted","serial","Promise","url","URL","present","Set","uid","commit","next","info","update","reason","start","item","Math","config","request","AbortController","progress","percent","Number","result","address","Error","uploadRequest","useImperativeHandle","addFiles","files","batchGeneration","rejected","accepted","original","reject","message","acceptsFile","File","String","remove","entry","classes","CloudUpload","ButtonControl","UploadIcon","FormValue","error","FieldScope","FileList","actions","X","fileName","RotateCw"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;;;;ACoEO,MAAMI,gBAASC,AAAA,WAAHD,GAAGC,IAAAA,+BAAAA,UAAAA,AAAAA,EAAsC,SAC1DC,QAAqB,EACrBC,GAAG;IAEH,MAAM,EACJC,QAAQ,EACRC,kBAAkB,EAAE,EACpBC,QAAQ,EACRC,MAAM,EACNC,WAAW,KAAK,EAChB,UAAUC,YAAY,EACtBC,OAAO,KAAK,EACZC,QAAQ,EACRC,OAAO,EACPC,YAAY,EACZC,QAAQ,EACRC,MAAM,EACNC,SAAS,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pB,cAAYlF,OAAO,uBAAuB;wCAAE,MAAMmF,AAAAA,IAAAA,0BAAAA,QAAAA,AAAAA,EAASpD;oCAAM;oCACjE,SAAS;wCACP,IAAI,CAACA,KAAK,GAAG,EAAE;wCACfJ,KAAK,OAAO,CAAC,GAAG,CAACI,KAAK,GAAG,GAAG;wCAC5BJ,KAAK,OAAO,CAAC,MAAM,CAACI,KAAK,GAAG;wCAC5Ba,OAAOb,KAAK,GAAG,EAAE;4CAAE,QAAQ;wCAAY,GAAG;oCAC5C;;gCAGH;oCAAC;oCAAS;oCAAa;iCAAQ,CAAC,QAAQ,CAACA,KAAK,MAAM,IAAI,OACtD/D,CAAAA,UAAUM,aAAY,KACvByD,KAAK,UAAU,IACb,AADiB,WAAJ,GACb,qCAAC4C,2BAAAA,aAAaA,EAAAA;oCACZ,SAAQ;oCACR,MAAK;oCACL,UAAU9E;oCACV,WAAW,AAAX,cAAW,qCAACuF,sCAAAA,QAAQA,EAAAA;wCAAC,MAAM;;oCAC3B,cAAYpF,OAAO,sBAAsB;wCAAE,MAAMmF,AAAAA,IAAAA,0BAAAA,QAAAA,AAAAA,EAASpD;oCAAM;oCAChE,SAAS,IAAM,KAAKe,MAAMf;;gCAG/BkD;;;;;;;AAQjB"}
|
|
1
|
+
{"version":3,"file":"upload/upload.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../src/upload/upload.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CloudUpload, LoaderCircle, Plus, RotateCw, Upload as UploadIcon, X } from 'lucide-react';\nimport {\n forwardRef,\n type HTMLAttributes,\n type ReactNode,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { ButtonControl } from '../button/button';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport type { FileItem } from '../filelist';\nimport { FileListControl as FileList } from '../filelist/filelist';\nimport { fileName, safeFileUrl } from '../filelist/model';\nimport { FieldScope, useFormField } from '../form/form';\nimport { classes } from '../shared/classes';\nimport { FormValue } from '../shared/field';\nimport { useFormattedText } from '../shared/use-formatted-text';\nimport { useText } from '../shared/use-text';\nimport { acceptsFile, type UploadRequest, type UploadResult, uploadRequest } from './request';\n\nexport interface UploadFile extends FileItem {\n uid: string;\n response?: unknown;\n}\nexport interface UploadChangeInfo {\n file?: UploadFile;\n reason: 'add' | 'progress' | 'success' | 'error' | 'remove' | 'cancel';\n}\nexport interface UploadRejection {\n file: File;\n reason: 'type' | 'size' | 'count' | 'validation';\n message: string;\n}\nexport interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n fileList?: readonly UploadFile[];\n defaultFileList?: readonly UploadFile[];\n onChange?: (files: UploadFile[], info: UploadChangeInfo) => void;\n accept?: string;\n multiple?: boolean;\n disabled?: boolean;\n drag?: boolean;\n maxCount?: number;\n maxSize?: number;\n beforeUpload?: (file: File) => boolean | File | Promise<boolean | File>;\n onReject?: (rejections: readonly UploadRejection[]) => void;\n action?: string | ((file: File) => string | Promise<string>);\n method?: 'POST' | 'PUT';\n headers?: Readonly<Record<string, string>>;\n data?: Readonly<Record<string, string | Blob>>;\n withCredentials?: boolean;\n fieldName?: string;\n // biome-ignore lint/suspicious/noConfusingVoidType: Custom transports may finish via callbacks without returning a result.\n customRequest?: (request: UploadRequest) => Promise<UploadResult | void>;\n onRemove?: (file: UploadFile) => boolean | void | Promise<boolean> | Promise<void>;\n showFileList?: boolean;\n hint?: ReactNode;\n children?: ReactNode;\n name?: string;\n form?: string;\n required?: boolean;\n autoUpload?: boolean;\n concurrency?: number;\n directory?: boolean;\n listType?: 'text' | 'picture';\n}\nexport interface AvatarUploadProps\n extends Omit<\n UploadProps,\n | 'multiple'\n | 'maxCount'\n | 'drag'\n | 'directory'\n | 'showFileList'\n | 'listType'\n | 'autoUpload'\n | 'concurrency'\n | 'onRemove'\n > {\n reuploadText?: string;\n}\nexport interface UploadHandle {\n upload: (uid?: string) => void;\n abort: (uid?: string) => void;\n focus: () => void;\n}\nexport const Upload = forwardRef<UploadHandle, UploadProps>(function Upload(\n rawProps: UploadProps,\n ref,\n) {\n return <UploadControl {...useComponentProps('Upload', rawProps)} ref={ref} />;\n});\n\nexport const AvatarUpload = forwardRef<UploadHandle, AvatarUploadProps>(\n function AvatarUpload(rawProps, ref) {\n const { accept = 'image/*', ...props } = useComponentProps('AvatarUpload', rawProps);\n return (\n <UploadControl\n {...props}\n ref={ref}\n accept={accept}\n avatar\n multiple={false}\n drag={false}\n directory={false}\n showFileList={false}\n autoUpload\n concurrency={1}\n />\n );\n },\n);\n\ninterface UploadControlProps extends UploadProps {\n avatar?: boolean;\n reuploadText?: string;\n}\nconst UploadControl = forwardRef<UploadHandle, UploadControlProps>(function UploadControl(\n rawProps: UploadControlProps,\n ref,\n) {\n const {\n fileList,\n defaultFileList = [],\n onChange,\n accept,\n multiple = false,\n disabled: disabledProp,\n drag = false,\n maxCount,\n maxSize,\n beforeUpload,\n onReject,\n action,\n method = 'POST',\n headers,\n data,\n withCredentials = false,\n fieldName = 'file',\n customRequest,\n onRemove,\n showFileList = true,\n hint,\n children,\n name,\n form,\n required,\n autoUpload = true,\n concurrency = 3,\n directory,\n listType = 'text',\n avatar = false,\n reuploadText,\n id: idProp,\n className,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n ...props\n } = rawProps;\n const field = useFormField();\n const disabled = disabledProp || field?.disabled;\n const t = useText();\n const format = useFormattedText();\n const id = useId();\n const count = useRef(0);\n const input = useRef<HTMLInputElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const waiting = useRef(new Map<string, UploadFile>());\n const generation = useRef(0);\n const [internal, setInternal] = useState<readonly UploadFile[]>(defaultFileList);\n const [dragging, setDragging] = useState(false);\n const [validating, setValidating] = useState(false);\n const [errors, setErrors] = useState<readonly UploadRejection[]>([]);\n const current = fileList ?? internal;\n const avatarFile = current.at(-1);\n const avatarBusy = avatar && (validating || avatarFile?.status === 'uploading');\n const avatarUrl =\n avatarFile && (!avatarFile.status || avatarFile.status === 'done')\n ? safeFileUrl(avatarFile.url)\n : undefined;\n const [failedAvatarUrl, setFailedAvatarUrl] = useState<string>();\n const avatarPreview = avatarUrl && avatarUrl !== failedAvatarUrl ? avatarUrl : undefined;\n const avatarLabel = avatarPreview\n ? (reuploadText ?? t('upload.reuploadAvatar'))\n : t('upload.uploadAvatar');\n // biome-ignore lint/correctness/useExhaustiveDependencies: The form prop can reassign the input to another native form.\n useEffect(() => {\n const owner = input.current?.form;\n const reset = (event: Event) =>\n queueMicrotask(() => {\n if (event.defaultPrevented) return;\n generation.current++;\n for (const job of jobs.current.values()) job.abort();\n jobs.current.clear();\n waiting.current.clear();\n if (fileList === undefined) {\n setInternal(defaultFileList);\n latest.current.current = defaultFileList;\n }\n setErrors([]);\n setValidating(false);\n });\n const serialize = (event: FormDataEvent) => {\n if (!name || disabled) return;\n for (const file of latest.current.current) {\n if (file.originFile) event.formData.append(name, file.originFile, file.name);\n else if (file.url) event.formData.append(name, file.url);\n }\n };\n owner?.addEventListener('reset', reset);\n owner?.addEventListener('formdata', serialize);\n return () => {\n owner?.removeEventListener('reset', reset);\n owner?.removeEventListener('formdata', serialize);\n };\n }, [fileList, defaultFileList, form, name, disabled]);\n const latest = useRef({\n current,\n fileList,\n onChange,\n action,\n customRequest,\n method,\n headers,\n data,\n withCredentials,\n fieldName,\n });\n latest.current = {\n current,\n fileList,\n onChange,\n action,\n customRequest,\n method,\n headers,\n data,\n withCredentials,\n fieldName,\n };\n const jobs = useRef(new Map<string, AbortController>());\n const urls = useRef(new Map<string, string>());\n const mounted = useRef(true);\n const serial = useRef(Promise.resolve());\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n for (const job of jobs.current.values()) job.abort();\n jobs.current.clear();\n for (const url of urls.current.values()) URL.revokeObjectURL(url);\n urls.current.clear();\n };\n }, []);\n useEffect(() => {\n const present = new Set(current.map((file) => file.uid));\n for (const [uid, job] of jobs.current)\n if (!present.has(uid)) {\n job.abort();\n jobs.current.delete(uid);\n }\n for (const [uid, url] of urls.current)\n if (!present.has(uid)) {\n URL.revokeObjectURL(url);\n urls.current.delete(uid);\n }\n }, [current]);\n const commit = (next: UploadFile[], info: UploadChangeInfo) => {\n if (!mounted.current) return;\n latest.current.current = next;\n if (latest.current.fileList === undefined) setInternal(next);\n latest.current.onChange?.(next, info);\n };\n const update = (uid: string, values: Partial<UploadFile>, reason: UploadChangeInfo['reason']) => {\n const file = latest.current.current.find((file) => file.uid === uid);\n if (!file) return;\n const next = { ...file, ...values };\n commit(\n latest.current.current.map((file) => (file.uid === uid ? next : file)),\n { file: next, reason },\n );\n };\n const start = async (file: UploadFile) => {\n if (\n disabled ||\n !file.originFile ||\n jobs.current.has(file.uid) ||\n !mounted.current ||\n !latest.current.current.some((item) => item.uid === file.uid)\n )\n return;\n if (jobs.current.size >= Math.max(1, Math.floor(concurrency))) {\n waiting.current.set(file.uid, file);\n return;\n }\n waiting.current.delete(file.uid);\n const config = latest.current;\n if (!config.action && !config.customRequest) return;\n const request = new AbortController();\n jobs.current.set(file.uid, request);\n update(file.uid, { status: 'uploading', percent: 0, error: undefined }, 'progress');\n const progress = (percent: number) => {\n if (\n !request.signal.aborted &&\n jobs.current.get(file.uid) === request &&\n Number.isFinite(percent)\n )\n update(file.uid, { percent: Math.max(0, Math.min(99, percent)) }, 'progress');\n };\n try {\n let result: UploadResult | undefined;\n if (config.customRequest)\n result =\n (await config.customRequest({\n file: file.originFile,\n signal: request.signal,\n onProgress: progress,\n })) || undefined;\n else {\n const address =\n typeof config.action === 'function'\n ? await config.action(file.originFile)\n : config.action;\n if (request.signal.aborted) return;\n if (!address) throw new Error(t('upload.uploadUrlCannotBeEmpty'));\n result = await uploadRequest({\n file: file.originFile,\n signal: request.signal,\n onProgress: progress,\n action: address,\n method: config.method,\n headers: config.headers,\n data: config.data,\n withCredentials: config.withCredentials,\n fieldName: config.fieldName,\n });\n }\n if (!request.signal.aborted && jobs.current.get(file.uid) === request)\n update(\n file.uid,\n {\n status: 'done',\n percent: 100,\n response: result?.response,\n ...(result?.url ? { url: result.url } : {}),\n ...(result?.name ? { name: result.name } : {}),\n },\n 'success',\n );\n } catch (reason) {\n if (!request.signal.aborted && jobs.current.get(file.uid) === request)\n update(\n file.uid,\n {\n status: 'error',\n error: reason instanceof Error ? reason.message : t('upload.uploadFailed'),\n },\n 'error',\n );\n } finally {\n if (jobs.current.get(file.uid) === request) jobs.current.delete(file.uid);\n const next = waiting.current.values().next().value;\n if (next) void start(next);\n }\n };\n useImperativeHandle(ref, () => ({\n upload: (uid) => {\n for (const file of latest.current.current)\n if (\n (!uid || file.uid === uid) &&\n ['ready', 'error', 'cancelled'].includes(file.status ?? 'ready')\n )\n void start(file);\n },\n abort: (uid) => {\n for (const [key, job] of jobs.current)\n if (!uid || key === uid) {\n job.abort();\n jobs.current.delete(key);\n update(key, { status: 'cancelled' }, 'cancel');\n }\n if (uid) waiting.current.delete(uid);\n else waiting.current.clear();\n },\n focus: () => trigger.current?.focus(),\n }));\n const addFiles = (files: readonly File[]) => {\n if (disabled || avatarBusy || !files.length) return;\n const batchGeneration = generation.current;\n serial.current = serial.current\n .then(async () => {\n if (!mounted.current || batchGeneration !== generation.current) return;\n setValidating(true);\n setErrors([]);\n const rejected: UploadRejection[] = [];\n const accepted: UploadFile[] = [];\n for (const original of files) {\n let file = original;\n const reject = (reason: UploadRejection['reason'], message: string) =>\n rejected.push({ file: original, reason, message });\n if (!multiple && accepted.length > 0) {\n reject('count', t('upload.chooseOneFileAtATime'));\n continue;\n }\n if (!acceptsFile(file, accept)) {\n reject('type', t('upload.fileTypeIsNotAccepted'));\n continue;\n }\n if (maxSize !== undefined && file.size > maxSize) {\n reject('size', t('upload.fileExceedsTheSizeLimit'));\n continue;\n }\n if (\n !avatar &&\n maxCount !== undefined &&\n latest.current.current.length + accepted.length >= maxCount\n ) {\n reject('count', t('upload.fileCountLimitReached'));\n continue;\n }\n try {\n const result = await beforeUpload?.(file);\n if (!mounted.current || batchGeneration !== generation.current) return;\n if (result === false) {\n reject('validation', t('upload.fileValidationFailed'));\n continue;\n }\n if (result instanceof File) file = result;\n } catch (reason) {\n reject(\n 'validation',\n reason instanceof Error ? reason.message : t('upload.fileValidationFailed'),\n );\n continue;\n }\n if (!mounted.current || batchGeneration !== generation.current) return;\n const uid = `${id}-${++count.current}`;\n let url: string | undefined;\n if (/^(image|video|audio)\\//.test(file.type)) {\n url = URL.createObjectURL(file);\n urls.current.set(uid, url);\n }\n accepted.push({\n uid,\n name: file.name,\n size: file.size,\n type: file.type,\n originFile: file,\n status: 'ready',\n url,\n });\n }\n if (!mounted.current || batchGeneration !== generation.current) return;\n if (accepted.length) {\n if (avatar) {\n setFailedAvatarUrl(undefined);\n for (const job of jobs.current.values()) job.abort();\n jobs.current.clear();\n waiting.current.clear();\n }\n commit(avatar ? accepted : [...latest.current.current, ...accepted], {\n file: accepted.at(-1),\n reason: 'add',\n });\n if (autoUpload) for (const file of accepted) void start(file);\n }\n setErrors(rejected);\n setValidating(false);\n if (rejected.length) onReject?.(rejected);\n })\n .catch((reason) => {\n if (mounted.current) {\n setValidating(false);\n setErrors([{ file: files[0] as File, reason: 'validation', message: String(reason) }]);\n }\n });\n };\n const remove = async (file: FileItem) => {\n if (disabled) return;\n const entry = latest.current.current.find((item) => item.uid === file.uid);\n if (!entry || (await onRemove?.(entry)) === false || !mounted.current) return;\n jobs.current.get(entry.uid)?.abort();\n jobs.current.delete(entry.uid);\n waiting.current.delete(entry.uid);\n const url = urls.current.get(entry.uid);\n if (url) {\n URL.revokeObjectURL(url);\n urls.current.delete(entry.uid);\n }\n commit(\n latest.current.current.filter((item) => item.uid !== entry.uid),\n { file: entry, reason: 'remove' },\n );\n };\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: Drop handling augments the keyboard-accessible choose-file button inside this surface.\n <div\n {...props}\n className={classes(\n 'leaf-upload',\n avatar && 'leaf-upload--avatar',\n drag && 'leaf-upload--drag',\n `leaf-upload--${listType}`,\n className,\n )}\n data-disabled={disabled || undefined}\n data-dragging={dragging || undefined}\n onDragEnter={(event) => {\n onDragEnter?.(event);\n if (!event.defaultPrevented && !disabled) {\n event.preventDefault();\n setDragging(true);\n }\n }}\n onDragOver={(event) => {\n onDragOver?.(event);\n if (!event.defaultPrevented && !disabled) {\n event.preventDefault();\n event.dataTransfer.dropEffect = 'copy';\n }\n }}\n onDragLeave={(event) => {\n onDragLeave?.(event);\n if (!event.currentTarget.contains(event.relatedTarget as Node)) setDragging(false);\n }}\n onDrop={(event) => {\n onDrop?.(event);\n setDragging(false);\n if (event.defaultPrevented) return;\n event.preventDefault();\n if (!disabled) addFiles([...event.dataTransfer.files]);\n }}\n >\n <input\n ref={input}\n form={form}\n {...(directory ? { webkitdirectory: '', directory: '' } : {})}\n hidden\n type=\"file\"\n className=\"leaf-upload__input\"\n accept={accept}\n multiple={multiple}\n disabled={disabled || avatarBusy}\n tabIndex={-1}\n aria-label={t('upload.chooseFiles')}\n onChange={(event) => {\n addFiles([...(event.target.files ?? [])]);\n event.target.value = '';\n }}\n />\n {avatar ? (\n <button\n ref={trigger}\n id={idProp ?? field?.id}\n type=\"button\"\n className=\"leaf-upload__avatar\"\n data-filled={(!!avatarPreview && !avatarBusy) || undefined}\n disabled={disabled || avatarBusy}\n aria-busy={avatarBusy}\n aria-label={avatarBusy ? t('common.loading') : avatarLabel}\n onClick={() => input.current?.click()}\n >\n {avatarPreview && !avatarBusy ? (\n <>\n <img src={avatarPreview} alt=\"\" onError={() => setFailedAvatarUrl(avatarPreview)} />\n <span className=\"leaf-upload__avatar-overlay\">{avatarLabel}</span>\n </>\n ) : (\n <>\n {avatarBusy ? (\n <LoaderCircle\n className=\"leaf-upload__avatar-spinner\"\n size={20}\n aria-hidden=\"true\"\n />\n ) : (\n <Plus size={20} aria-hidden=\"true\" />\n )}\n <span>{children ?? t('upload.uploadAvatar')}</span>\n </>\n )}\n </button>\n ) : drag ? (\n <button\n ref={trigger}\n id={idProp ?? field?.id}\n type=\"button\"\n className=\"leaf-upload__dropzone\"\n disabled={disabled || validating}\n onClick={() => input.current?.click()}\n >\n <span className=\"leaf-upload__symbol\">\n <CloudUpload size={28} aria-hidden=\"true\" />\n </span>\n <span className=\"leaf-upload__title\">{children ?? t('upload.dropHint')}</span>\n <span className=\"leaf-upload__hint\">{hint ?? t('upload.dropDescription')}</span>\n </button>\n ) : (\n <div className=\"leaf-upload__trigger\">\n <ButtonControl\n ref={trigger}\n id={idProp ?? field?.id}\n variant=\"outline\"\n disabled={disabled}\n loading={validating}\n startIcon={<UploadIcon size={16} />}\n onClick={() => input.current?.click()}\n >\n {children ?? t('upload.chooseFiles')}\n </ButtonControl>\n {hint && <span className=\"leaf-upload__hint\">{hint}</span>}\n </div>\n )}\n <FormValue\n value={current.length ? 'selected' : ''}\n required={required ?? field?.required}\n form={form}\n disabled={disabled}\n triggerRef={trigger}\n />\n {avatar && hint && <div className=\"leaf-upload__hint\">{hint}</div>}\n {avatar && avatarFile?.status === 'error' && (\n <div className=\"leaf-upload__errors\" role=\"alert\">\n {avatarFile.error ?? t('upload.uploadFailed')}\n </div>\n )}\n {errors.length > 0 && (\n <ul className=\"leaf-upload__errors\" role=\"alert\">\n {errors.map((error) => (\n <li key={`${error.file.name}-${error.file.lastModified}-${error.reason}`}>\n {error.file.name}: {error.message}\n </li>\n ))}\n </ul>\n )}\n {showFileList && current.length > 0 && (\n <FieldScope>\n <FileList\n items={current}\n listType={listType}\n disabled={disabled}\n removable\n onRemove={remove}\n renderActions={(file, actions) => (\n <>\n {file.status === 'uploading' && (\n <ButtonControl\n variant=\"text\"\n size=\"sm\"\n disabled={disabled}\n startIcon={<X size={15} />}\n aria-label={format('upload.cancelUpload', { name: fileName(file) })}\n onClick={() => {\n if (!file.uid) return;\n jobs.current.get(file.uid)?.abort();\n jobs.current.delete(file.uid);\n update(file.uid, { status: 'cancelled' }, 'cancel');\n }}\n />\n )}\n {['error', 'cancelled', 'ready'].includes(file.status ?? '') &&\n (action || customRequest) &&\n file.originFile && (\n <ButtonControl\n variant=\"text\"\n size=\"sm\"\n disabled={disabled}\n startIcon={<RotateCw size={15} />}\n aria-label={format('upload.retryUpload', { name: fileName(file) })}\n onClick={() => void start(file as UploadFile)}\n />\n )}\n {actions}\n </>\n )}\n />\n </FieldScope>\n )}\n </div>\n );\n});\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","Upload","forwardRef","rawProps","ref","UploadControl","useComponentProps","AvatarUpload","accept","props","fileList","defaultFileList","onChange","multiple","disabledProp","drag","maxCount","maxSize","beforeUpload","onReject","action","method","headers","data","withCredentials","fieldName","customRequest","onRemove","showFileList","hint","children","name","form","required","autoUpload","concurrency","directory","listType","avatar","reuploadText","idProp","className","onDragEnter","onDragLeave","onDragOver","onDrop","field","useFormField","disabled","t","useText","format","useFormattedText","id","useId","count","useRef","input","trigger","waiting","Map","generation","internal","setInternal","useState","dragging","setDragging","validating","setValidating","errors","setErrors","current","avatarFile","avatarBusy","avatarUrl","safeFileUrl","undefined","failedAvatarUrl","setFailedAvatarUrl","avatarPreview","avatarLabel","useEffect","owner","reset","event","queueMicrotask","job","jobs","latest","serialize","file","urls","mounted","serial","Promise","url","URL","present","Set","uid","commit","next","info","update","reason","start","item","Math","config","request","AbortController","progress","percent","Number","result","address","Error","uploadRequest","useImperativeHandle","addFiles","files","batchGeneration","rejected","accepted","original","reject","message","acceptsFile","File","String","remove","entry","classes","LoaderCircle","Plus","CloudUpload","ButtonControl","UploadIcon","FormValue","error","FieldScope","FileList","actions","X","fileName","RotateCw"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;;;;;ACkFO,MAAMI,gBAASC,AAAA,WAAHD,GAAGC,IAAAA,+BAAAA,UAAAA,AAAAA,EAAsC,SAC1DC,QAAqB,EACrBC,GAAG;IAEH,OAAO,WAAP,GAAO,qCAACC,sBAAaA;QAAE,GAAGC,AAAAA,IAAAA,uCAAAA,iBAAAA,AAAAA,EAAkB,UAAUH,SAAS;QAAE,KAAKC;;AACxE;AAEO,MAAMG,sBAAeL,AAAA,WAAHK,GAAGL,IAAAA,+BAAAA,UAAAA,AAAAA,EAC1B,SAAsBC,QAAQ,EAAEC,GAAG;IAC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AQA,EAAAA;wCAAC,MAAM;;oCAC3B,cAAY9F,OAAO,sBAAsB;wCAAE,MAAM6F,AAAAA,IAAAA,0BAAAA,QAAAA,AAAAA,EAAStD;oCAAM;oCAChE,SAAS,IAAM,KAAKe,MAAMf;;gCAG/BoD;;;;;;;AAQjB"}
|
|
@@ -43,8 +43,10 @@ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
|
|
|
43
43
|
autoUpload?: boolean;
|
|
44
44
|
concurrency?: number;
|
|
45
45
|
directory?: boolean;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
listType?: 'text' | 'picture';
|
|
47
|
+
}
|
|
48
|
+
export interface AvatarUploadProps extends Omit<UploadProps, 'multiple' | 'maxCount' | 'drag' | 'directory' | 'showFileList' | 'listType' | 'autoUpload' | 'concurrency' | 'onRemove'> {
|
|
49
|
+
reuploadText?: string;
|
|
48
50
|
}
|
|
49
51
|
export interface UploadHandle {
|
|
50
52
|
upload: (uid?: string) => void;
|
|
@@ -52,4 +54,5 @@ export interface UploadHandle {
|
|
|
52
54
|
focus: () => void;
|
|
53
55
|
}
|
|
54
56
|
export declare const Upload: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<UploadHandle>>;
|
|
57
|
+
export declare const AvatarUpload: import("react").ForwardRefExoticComponent<AvatarUploadProps & import("react").RefAttributes<UploadHandle>>;
|
|
55
58
|
//# sourceMappingURL=upload.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.cts","sourceRoot":"","sources":["../../../src/upload/upload.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQ5C,OAAO,EAAe,KAAK,aAAa,EAAE,KAAK,YAAY,EAAiB,MAAM,WAAW,CAAC;AAE9F,MAAM,WAAW,UAAW,SAAQ,QAAQ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,IAAI,CAAC;CACnB;AACD,eAAO,MAAM,MAAM,sGAKjB,CAAC;AAEH,eAAO,MAAM,YAAY,4GAkBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-provider/component-defaults.js","sources":["../../../../../src/config-provider/component-defaults.ts"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport { createContext, useContext } from 'react';\nimport type { AlertProps } from '../alert/alert';\nimport type { AffixProps, AnchorProps } from '../anchor/anchor';\nimport type { AutoCompleteProps } from '../autocomplete/autocomplete';\nimport type { AvatarProps } from '../avatar/avatar';\nimport type { AvatarGroupProps } from '../avatar/group';\nimport type { BackTopProps } from '../backtop/backtop';\nimport type { BadgeProps } from '../badge/badge';\nimport type { BreadcrumbProps } from '../breadcrumb/breadcrumb';\nimport type { ButtonProps } from '../button/button';\nimport type { ButtonGroupProps, SplitButtonProps } from '../button/group';\nimport type { CalendarProps } from '../calendar/calendar';\nimport type { CardProps } from '../card/card';\nimport type { CardTitleProps } from '../card/title';\nimport type { CarouselProps } from '../carousel/carousel';\nimport type { CascaderProps } from '../cascader/cascader';\nimport type { CheckboxProps } from '../checkbox/checkbox';\nimport type { CheckboxGroupProps } from '../checkbox/group';\nimport type { CollapseProps } from '../collapse/collapse';\nimport type { ColorPickerProps } from '../colorpicker/colorpicker';\nimport type { ConfirmOptions } from '../confirm/confirm';\nimport type { DatePickerProps } from '../datepicker/datepicker';\nimport type { DateRangePickerProps } from '../daterangepicker/daterangepicker';\nimport type { DescriptionsProps } from '../descriptions/descriptions';\nimport type { DividerProps } from '../divider/divider';\nimport type { DrawerProps } from '../drawer/drawer';\nimport type { DropdownProps } from '../dropdown/dropdown';\nimport type { EmptyProps } from '../empty/empty';\nimport type { ErrorBoundaryProps } from '../errorboundary/errorboundary';\nimport type { FileListProps } from '../filelist/filelist';\nimport type { FlexProps } from '../flex/flex';\nimport type { FloatButtonGroupProps, FloatButtonProps } from '../floatbutton/floatbutton';\nimport type {\n FormErrorSummaryProps,\n FormFieldProps,\n FormGroupProps,\n FormProps,\n} from '../form/form';\nimport type { FormListProps } from '../form/list';\nimport type { ColProps, GridProps, RowProps } from '../grid/grid';\nimport type { ImagePreviewOptions } from '../image/types';\nimport type { InfiniteScrollProps } from '../infinitescroll/infinitescroll';\nimport type { InputGroupProps, InputSearchProps } from '../input/group';\nimport type { InputProps } from '../input/input';\nimport type { InputMaskProps } from '../inputmask/inputmask';\nimport type { InputNumberProps } from '../inputnumber/inputnumber';\nimport type { InputOTPProps } from '../inputotp/inputotp';\nimport type { LayoutProps, LayoutSiderProps } from '../layout/layout';\nimport type { LoadingProps } from '../loading/loading';\nimport type { LoadingBarProps } from '../loadingbar/loadingbar';\nimport type { MasonryProps } from '../masonry/masonry';\nimport type { MentionsProps } from '../mentions/mentions';\nimport type { MenuGroupProps, MenuProps } from '../menu/menu';\nimport type { MessageOptions, MessageProps } from '../message/message';\nimport type { ModalProps } from '../modal/modal';\nimport type { NotificationOptions, NotificationProps } from '../notification/notification';\nimport type { PaginationProps } from '../pagination/pagination';\nimport type { PopconfirmProps } from '../popconfirm/popconfirm';\nimport type { PopoverProps } from '../popover/popover';\nimport type { ProgressProps } from '../progress/progress';\nimport type { QRCodeProps } from '../qrcode/qrcode';\nimport type { RadioGroupProps, RadioProps } from '../radio/radio';\nimport type { RateProps } from '../rate/rate';\nimport type { ResultProps } from '../result/result';\nimport type { ScrollAreaProps } from '../scrollarea/scrollarea';\nimport type { ScrollbarProps } from '../scrollbar/scrollbar';\nimport type { SelectProps } from '../select/select';\nimport type { SkeletonProps } from '../skeleton/skeleton';\nimport type { SliderProps } from '../slider/slider';\nimport type { SpaceProps } from '../space/space';\nimport type { SplitterProps } from '../splitter/splitter';\nimport type { CountdownProps, StatisticProps } from '../statistic/statistic';\nimport type { StepsProps } from '../steps/steps';\nimport type { SwitchProps } from '../switch/switch';\nimport type { DataTablePresentationProps } from '../tabletanstack/defaults';\nimport type { TabsProps } from '../tabs/tabs';\nimport type { CheckableTagProps, TagGroupProps } from '../tag/group';\nimport type { TagProps } from '../tag/tag';\nimport type { TextareaProps } from '../textarea/textarea';\nimport type { TimelineProps } from '../timeline/timeline';\nimport type { TooltipProps } from '../tooltip/tooltip';\nimport type { TourProps } from '../tour/tour';\nimport type { TransferProps } from '../transfer/transfer';\nimport type { TreeProps } from '../tree/tree';\nimport type { TreeSelectProps } from '../treeselect/treeselect';\nimport type {\n LinkProps,\n ParagraphProps,\n TextProps,\n TitleProps,\n TypographyProps,\n} from '../typography/typography';\nimport type { UploadProps } from '../upload/upload';\nimport type { VirtualListProps } from '../virtuallist/virtuallist';\n\n/** Only props independent of the caller's item type can cross a generic component boundary. */\ntype GenericComponentName = 'FormList' | 'VirtualList' | 'DataTable';\n\n/** Full public props keep each hook key tied to its component, including Select's union. */\ninterface ComponentPropsMap {\n Affix: AffixProps;\n Alert: AlertProps;\n Anchor: AnchorProps;\n AutoComplete: AutoCompleteProps;\n Avatar: AvatarProps;\n AvatarGroup: AvatarGroupProps;\n BackTop: BackTopProps;\n Badge: BadgeProps;\n Breadcrumb: BreadcrumbProps;\n Button: ButtonProps;\n ButtonGroup: ButtonGroupProps;\n Calendar: CalendarProps;\n Card: CardProps;\n CardTitle: CardTitleProps;\n Carousel: CarouselProps;\n Cascader: CascaderProps;\n CheckableTag: CheckableTagProps;\n Checkbox: CheckboxProps;\n CheckboxGroup: CheckboxGroupProps;\n Col: ColProps;\n Collapse: CollapseProps;\n ColorPicker: ColorPickerProps;\n Confirm: ConfirmOptions;\n Countdown: CountdownProps;\n DatePicker: DatePickerProps;\n DateRangePicker: DateRangePickerProps;\n Descriptions: DescriptionsProps;\n Divider: DividerProps;\n Drawer: DrawerProps;\n Dropdown: DropdownProps;\n Empty: EmptyProps;\n ErrorBoundary: ErrorBoundaryProps;\n FileList: FileListProps;\n Flex: FlexProps;\n FloatButton: FloatButtonProps;\n FloatButtonGroup: FloatButtonGroupProps;\n Form: FormProps;\n FormErrorSummary: FormErrorSummaryProps;\n FormField: FormFieldProps;\n FormGroup: FormGroupProps;\n Grid: GridProps;\n ImagePreview: ImagePreviewOptions;\n InfiniteScroll: InfiniteScrollProps;\n Input: InputProps;\n InputGroup: InputGroupProps;\n InputMask: InputMaskProps;\n InputNumber: InputNumberProps;\n InputOTP: InputOTPProps;\n InputSearch: InputSearchProps;\n Layout: LayoutProps;\n LayoutContent: HTMLAttributes<HTMLElement>;\n LayoutFooter: HTMLAttributes<HTMLElement>;\n LayoutHeader: HTMLAttributes<HTMLElement>;\n LayoutSider: LayoutSiderProps;\n Link: LinkProps;\n Loading: LoadingProps;\n LoadingBar: LoadingBarProps;\n Masonry: MasonryProps;\n Mentions: MentionsProps;\n Menu: MenuProps;\n MenuGroup: MenuGroupProps;\n Message: MessageProps;\n Modal: ModalProps;\n Notification: NotificationProps;\n Pagination: PaginationProps;\n Paragraph: ParagraphProps;\n Popconfirm: PopconfirmProps;\n Popover: PopoverProps;\n Progress: ProgressProps;\n QRCode: QRCodeProps;\n Radio: RadioProps;\n RadioGroup: RadioGroupProps;\n Rate: RateProps;\n Result: ResultProps;\n Row: RowProps;\n ScrollArea: ScrollAreaProps;\n Scrollbar: ScrollbarProps;\n Select: SelectProps;\n Skeleton: SkeletonProps;\n Slider: SliderProps;\n Space: SpaceProps;\n SplitButton: SplitButtonProps;\n Splitter: SplitterProps;\n Statistic: StatisticProps;\n Steps: StepsProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n Tag: TagProps;\n TagGroup: TagGroupProps;\n Text: TextProps;\n Textarea: TextareaProps;\n Timeline: TimelineProps;\n Title: TitleProps;\n Tooltip: TooltipProps;\n Tour: TourProps;\n Transfer: TransferProps;\n Tree: TreeProps;\n TreeSelect: TreeSelectProps;\n Typography: TypographyProps;\n Upload: UploadProps;\n}\n\n/** Default props for supported components; null clears that component's inherited defaults. */\nexport interface LeafComponentDefaults {\n Affix?: Partial<Omit<AffixProps, 'key' | 'ref'>> | null;\n Alert?: Partial<Omit<AlertProps, 'key' | 'ref' | 'title'>> | null;\n Anchor?: Partial<Omit<AnchorProps, 'key' | 'ref' | 'items'>> | null;\n AutoComplete?: Partial<Omit<AutoCompleteProps, 'key' | 'ref' | 'options'>> | null;\n Avatar?: Partial<Omit<AvatarProps, 'key' | 'ref'>> | null;\n AvatarGroup?: Partial<Omit<AvatarGroupProps, 'key' | 'ref'>> | null;\n BackTop?: Partial<Omit<BackTopProps, 'key' | 'ref'>> | null;\n Badge?: Partial<Omit<BadgeProps, 'key' | 'ref'>> | null;\n Breadcrumb?: Partial<Omit<BreadcrumbProps, 'key' | 'ref' | 'items'>> | null;\n Button?: Partial<Omit<ButtonProps, 'key' | 'ref'>> | null;\n ButtonGroup?: Partial<Omit<ButtonGroupProps, 'key' | 'ref'>> | null;\n Calendar?: Partial<Omit<CalendarProps, 'key' | 'ref'>> | null;\n Card?: Partial<Omit<CardProps, 'key' | 'ref'>> | null;\n CardTitle?: Partial<Omit<CardTitleProps, 'key' | 'ref'>> | null;\n Carousel?: Partial<Omit<CarouselProps, 'key' | 'ref'>> | null;\n Cascader?: Partial<\n Omit<\n CascaderProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n CheckableTag?: Partial<Omit<CheckableTagProps, 'key' | 'ref'>> | null;\n Checkbox?: Partial<Omit<CheckboxProps, 'key' | 'ref'>> | null;\n CheckboxGroup?: Partial<Omit<CheckboxGroupProps, 'key' | 'ref' | 'options'>> | null;\n Col?: Partial<Omit<ColProps, 'key' | 'ref'>> | null;\n Collapse?: Partial<Omit<CollapseProps, 'key' | 'ref' | 'items'>> | null;\n ColorPicker?: Partial<Omit<ColorPickerProps, 'key' | 'ref'>> | null;\n Confirm?: Partial<Omit<ConfirmOptions, 'key' | 'ref'>> | null;\n Countdown?: Partial<Omit<CountdownProps, 'key' | 'ref' | 'value'>> | null;\n DataTable?: Partial<Omit<DataTablePresentationProps, 'tableRef'>> | null;\n DatePicker?: Partial<\n Omit<DatePickerProps, 'key' | 'ref' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n DateRangePicker?: Partial<Omit<DateRangePickerProps, 'key' | 'ref'>> | null;\n Descriptions?: Partial<Omit<DescriptionsProps, 'key' | 'ref' | 'items'>> | null;\n Divider?: Partial<Omit<DividerProps, 'key' | 'ref'>> | null;\n Drawer?: Partial<Omit<DrawerProps, 'key' | 'ref' | 'open'>> | null;\n Dropdown?: Partial<Omit<DropdownProps, 'key' | 'ref' | 'items' | 'children'>> | null;\n Empty?: Partial<Omit<EmptyProps, 'key' | 'ref'>> | null;\n ErrorBoundary?: Partial<Omit<ErrorBoundaryProps, 'key' | 'ref'>> | null;\n FileList?: Partial<Omit<FileListProps, 'key' | 'ref' | 'items'>> | null;\n Flex?: Partial<Omit<FlexProps, 'key' | 'ref'>> | null;\n FloatButton?: Partial<Omit<FloatButtonProps, 'key' | 'ref'>> | null;\n FloatButtonGroup?: Partial<Omit<FloatButtonGroupProps, 'key' | 'ref' | 'actions'>> | null;\n Form?: Partial<Omit<FormProps, 'key' | 'ref'>> | null;\n FormErrorSummary?: Partial<Omit<FormErrorSummaryProps, 'key' | 'ref'>> | null;\n FormField?: Partial<Omit<FormFieldProps, 'key' | 'ref'>> | null;\n FormGroup?: Partial<Omit<FormGroupProps, 'key' | 'ref'>> | null;\n FormList?: Partial<\n Omit<\n FormListProps<unknown>,\n 'name' | 'children' | 'value' | 'defaultValue' | 'onChange' | 'itemKey'\n >\n > | null;\n Grid?: Partial<Omit<GridProps, 'key' | 'ref'>> | null;\n ImagePreview?: Omit<ImagePreviewOptions, 'onClose'> | null;\n InfiniteScroll?: Partial<\n Omit<InfiniteScrollProps, 'key' | 'ref' | 'dataLength' | 'hasMore' | 'onLoadMore'>\n > | null;\n Input?: Partial<Omit<InputProps, 'key' | 'ref'>> | null;\n InputGroup?: Partial<Omit<InputGroupProps, 'key' | 'ref'>> | null;\n InputMask?: Partial<Omit<InputMaskProps, 'key' | 'ref' | 'mask'>> | null;\n InputNumber?: Partial<\n Omit<\n InputNumberProps,\n 'key' | 'ref' | 'stringMode' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'\n >\n > | null;\n InputOTP?: Partial<Omit<InputOTPProps, 'key' | 'ref'>> | null;\n InputSearch?: Partial<Omit<InputSearchProps, 'key' | 'ref'>> | null;\n Layout?: Partial<Omit<LayoutProps, 'key' | 'ref'>> | null;\n LayoutContent?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutFooter?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutHeader?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutSider?: Partial<Omit<LayoutSiderProps, 'key' | 'ref'>> | null;\n Link?: Partial<Omit<LinkProps, 'key' | 'ref'>> | null;\n Loading?: Partial<Omit<LoadingProps, 'key' | 'ref'>> | null;\n LoadingBar?: Partial<Omit<LoadingBarProps, 'key' | 'ref' | 'active' | 'progress'>> | null;\n Masonry?: Partial<Omit<MasonryProps, 'key' | 'ref'>> | null;\n Mentions?: Partial<Omit<MentionsProps, 'key' | 'ref' | 'options'>> | null;\n Menu?: Partial<Omit<MenuProps, 'key' | 'ref' | 'items'>> | null;\n MenuGroup?: Partial<Omit<MenuGroupProps, 'key' | 'ref' | 'title'>> | null;\n Message?: Partial<Omit<MessageOptions, 'key' | 'content'>> | null;\n Modal?: Partial<Omit<ModalProps, 'key' | 'ref' | 'open'>> | null;\n Notification?: Partial<Omit<NotificationOptions, 'key' | 'title'>> | null;\n Pagination?: Partial<Omit<PaginationProps, 'key' | 'ref' | 'total'>> | null;\n Paragraph?: Partial<Omit<ParagraphProps, 'key' | 'ref'>> | null;\n Popconfirm?: Partial<Omit<PopconfirmProps, 'key' | 'ref' | 'children' | 'title'>> | null;\n Popover?: Partial<Omit<PopoverProps, 'key' | 'ref' | 'children' | 'content'>> | null;\n Progress?: Partial<Omit<ProgressProps, 'key' | 'ref'>> | null;\n QRCode?: Partial<Omit<QRCodeProps, 'key' | 'ref' | 'value'>> | null;\n Radio?: Partial<Omit<RadioProps, 'key' | 'ref'>> | null;\n RadioGroup?: Partial<Omit<RadioGroupProps, 'key' | 'ref' | 'options'>> | null;\n Rate?: Partial<Omit<RateProps, 'key' | 'ref'>> | null;\n Result?: Partial<Omit<ResultProps, 'key' | 'ref'>> | null;\n Row?: Partial<Omit<RowProps, 'key' | 'ref'>> | null;\n ScrollArea?: Partial<Omit<ScrollAreaProps, 'key' | 'ref'>> | null;\n Scrollbar?: Partial<Omit<ScrollbarProps, 'key' | 'ref'>> | null;\n /** Required data, mode-dependent values and callbacks belong on each Select. */\n Select?: Partial<\n Omit<\n SelectProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n Skeleton?: Partial<Omit<SkeletonProps, 'key' | 'ref'>> | null;\n Slider?: Partial<\n Omit<SliderProps, 'key' | 'ref' | 'range' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n Space?: Partial<Omit<SpaceProps, 'key' | 'ref'>> | null;\n SplitButton?: Partial<Omit<SplitButtonProps, 'key' | 'ref' | 'items'>> | null;\n Splitter?: Partial<Omit<SplitterProps, 'key' | 'ref' | 'panels'>> | null;\n Statistic?: Partial<Omit<StatisticProps, 'key' | 'ref' | 'value'>> | null;\n Steps?: Partial<Omit<StepsProps, 'key' | 'ref' | 'items'>> | null;\n Switch?: Partial<Omit<SwitchProps, 'key' | 'ref'>> | null;\n Tabs?: Partial<Omit<TabsProps, 'key' | 'ref' | 'items'>> | null;\n Tag?: Partial<Omit<TagProps, 'key' | 'ref'>> | null;\n TagGroup?: Partial<Omit<TagGroupProps, 'key' | 'ref' | 'options'>> | null;\n Text?: Partial<Omit<TextProps, 'key' | 'ref'>> | null;\n Textarea?: Partial<Omit<TextareaProps, 'key' | 'ref'>> | null;\n Timeline?: Partial<Omit<TimelineProps, 'key' | 'ref' | 'items'>> | null;\n Title?: Partial<Omit<TitleProps, 'key' | 'ref'>> | null;\n Tooltip?: Partial<Omit<TooltipProps, 'key' | 'ref' | 'content' | 'children'>> | null;\n Tour?: Partial<Omit<TourProps, 'key' | 'ref' | 'open' | 'steps'>> | null;\n Transfer?: Partial<Omit<TransferProps, 'key' | 'ref' | 'items'>> | null;\n Tree?: Partial<Omit<TreeProps, 'key' | 'ref' | 'data'>> | null;\n TreeSelect?: Partial<\n Omit<\n TreeSelectProps,\n | 'key'\n | 'ref'\n | 'options'\n | 'multiple'\n | 'treeCheckable'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >\n > | null;\n Typography?: Partial<Omit<TypographyProps, 'key' | 'ref'>> | null;\n Upload?: Partial<Omit<UploadProps, 'key' | 'ref'>> | null;\n VirtualList?:\n | (Partial<\n Omit<VirtualListProps<unknown>, 'items' | 'itemKey' | 'renderItem' | 'estimateSize'>\n > & { estimateSize?: number })\n | null;\n}\n\nexport const ComponentDefaultsContext = createContext<LeafComponentDefaults>({});\n\n/** Supplement missing props without copying unless a defined default is used. */\nexport function mergeComponentProps<Props extends object>(\n defaults: Partial<Props> | null | undefined,\n props: Props,\n): Props {\n if (!defaults) return props;\n let resolved = props;\n for (const key of Object.keys(defaults) as (keyof Props)[]) {\n const value = defaults[key];\n if (value !== undefined && props[key] === undefined) {\n if (resolved === props) resolved = { ...props };\n resolved[key] = value as Props[typeof key];\n }\n }\n return resolved;\n}\n\n/** Merge scopes by component and prop; nested prop values are replaced as a whole. */\nexport function mergeComponentDefaults(\n parent: LeafComponentDefaults,\n overrides: LeafComponentDefaults | undefined,\n): LeafComponentDefaults {\n if (!overrides) return parent;\n let merged = parent;\n for (const name of Object.keys(overrides) as (keyof LeafComponentDefaults)[]) {\n const incoming = overrides[name];\n if (incoming === undefined) continue;\n const inherited = parent[name] ?? undefined;\n if (incoming === null) {\n if (inherited == null) continue;\n if (merged === parent) merged = { ...parent };\n delete merged[name];\n continue;\n }\n let entry = inherited;\n for (const key of Object.keys(incoming)) {\n const value = (incoming as Record<string, unknown>)[key];\n if (\n value === undefined ||\n value === (inherited as Record<string, unknown> | undefined)?.[key]\n )\n continue;\n if (entry === inherited) entry = { ...inherited };\n (entry as Record<string, unknown>)[key] = value;\n }\n if (entry !== inherited) {\n if (merged === parent) merged = { ...parent };\n // Each entry remains the same component's props; only the dynamic key loses that relation.\n (merged as Record<string, object | undefined>)[name] = entry;\n }\n }\n return merged;\n}\n\nexport function useComponentProps<Name extends keyof ComponentPropsMap>(\n name: Name,\n props: ComponentPropsMap[Name],\n): ComponentPropsMap[Name] {\n const defaults = useContext(ComponentDefaultsContext)[name];\n return mergeComponentProps(\n defaults as Partial<ComponentPropsMap[Name]> | null | undefined,\n props,\n );\n}\n\n/** Generic owners merge this type-independent projection into their own complete props. */\nexport function useGenericComponentDefaults<Name extends GenericComponentName>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n\n/** Read defaults for an API request without invoking hooks from the request callback. */\nexport function useComponentDefaults<Name extends keyof LeafComponentDefaults>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n"],"names":["ComponentDefaultsContext","createContext","mergeComponentProps","defaults","props","resolved","key","Object","value","undefined","mergeComponentDefaults","parent","overrides","merged","name","incoming","inherited","entry","useComponentProps","useContext","useGenericComponentDefaults","useComponentDefaults"],"mappings":";;AAiWO,MAAMA,2BAA2BC,cAAqC,CAAC;AAGvE,SAASC,oBACdC,QAA2C,EAC3CC,KAAY;IAEZ,IAAI,CAACD,UAAU,OAAOC;IACtB,IAAIC,WAAWD;IACf,KAAK,MAAME,OAAOC,OAAO,IAAI,CAACJ,UAA8B;QAC1D,MAAMK,QAAQL,QAAQ,CAACG,IAAI;QAC3B,IAAIE,AAAUC,WAAVD,SAAuBJ,AAAeK,WAAfL,KAAK,CAACE,IAAI,EAAgB;YACnD,IAAID,aAAaD,OAAOC,WAAW;gBAAE,GAAGD,KAAK;YAAC;YAC9CC,QAAQ,CAACC,IAAI,GAAGE;QAClB;IACF;IACA,OAAOH;AACT;AAGO,SAASK,uBACdC,MAA6B,EAC7BC,SAA4C;IAE5C,IAAI,CAACA,WAAW,OAAOD;IACvB,IAAIE,SAASF;IACb,KAAK,MAAMG,QAAQP,OAAO,IAAI,CAACK,WAA+C;QAC5E,MAAMG,WAAWH,SAAS,CAACE,KAAK;QAChC,IAAIC,AAAaN,WAAbM,UAAwB;QAC5B,MAAMC,YAAYL,MAAM,CAACG,KAAK,IAAIL;QAClC,IAAIM,AAAa,SAAbA,UAAmB;YACrB,IAAIC,AAAa,QAAbA,WAAmB;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAC5C,OAAOE,MAAM,CAACC,KAAK;YACnB;QACF;QACA,IAAIG,QAAQD;QACZ,KAAK,MAAMV,OAAOC,OAAO,IAAI,CAACQ,UAAW;YACvC,MAAMP,QAASO,QAAoC,CAACT,IAAI;YACxD,IACEE,AAAUC,WAAVD,SACAA,UAAWQ,WAAmD,CAACV,IAAI;gBAGrE,IAAIW,UAAUD,WAAWC,QAAQ;oBAAE,GAAGD,SAAS;gBAAC;gBAC/CC,KAAiC,CAACX,IAAI,GAAGE;;QAC5C;QACA,IAAIS,UAAUD,WAAW;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAE3CE,MAA6C,CAACC,KAAK,GAAGG;QACzD;IACF;IACA,OAAOJ;AACT;AAEO,SAASK,kBACdJ,IAAU,EACVV,KAA8B;IAE9B,MAAMD,WAAWgB,WAAWnB,yBAAyB,CAACc,KAAK;IAC3D,OAAOZ,oBACLC,UACAC;AAEJ;AAGO,SAASgB,4BAA+DN,IAAU;IACvF,OAAOK,WAAWnB,yBAAyB,CAACc,KAAK;AACnD;AAGO,SAASO,qBAA+DP,IAAU;IACvF,OAAOK,WAAWnB,yBAAyB,CAACc,KAAK;AACnD"}
|
|
1
|
+
{"version":3,"file":"config-provider/component-defaults.js","sources":["../../../../../src/config-provider/component-defaults.ts"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport { createContext, useContext } from 'react';\nimport type { AlertProps } from '../alert/alert';\nimport type { AffixProps, AnchorProps } from '../anchor/anchor';\nimport type { AutoCompleteProps } from '../autocomplete/autocomplete';\nimport type { AvatarProps } from '../avatar/avatar';\nimport type { AvatarGroupProps } from '../avatar/group';\nimport type { BackTopProps } from '../backtop/backtop';\nimport type { BadgeProps } from '../badge/badge';\nimport type { BreadcrumbProps } from '../breadcrumb/breadcrumb';\nimport type { ButtonProps } from '../button/button';\nimport type { ButtonGroupProps, SplitButtonProps } from '../button/group';\nimport type { CalendarProps } from '../calendar/calendar';\nimport type { CardProps } from '../card/card';\nimport type { CardTitleProps } from '../card/title';\nimport type { CarouselProps } from '../carousel/carousel';\nimport type { CascaderProps } from '../cascader/cascader';\nimport type { CheckboxProps } from '../checkbox/checkbox';\nimport type { CheckboxGroupProps } from '../checkbox/group';\nimport type { CollapseProps } from '../collapse/collapse';\nimport type { ColorPickerProps } from '../colorpicker/colorpicker';\nimport type { ConfirmOptions } from '../confirm/confirm';\nimport type { DatePickerProps } from '../datepicker/datepicker';\nimport type { DateRangePickerProps } from '../daterangepicker/daterangepicker';\nimport type { DescriptionsProps } from '../descriptions/descriptions';\nimport type { DividerProps } from '../divider/divider';\nimport type { DrawerProps } from '../drawer/drawer';\nimport type { DropdownProps } from '../dropdown/dropdown';\nimport type { EmptyProps } from '../empty/empty';\nimport type { ErrorBoundaryProps } from '../errorboundary/errorboundary';\nimport type { FileListProps } from '../filelist/filelist';\nimport type { FlexProps } from '../flex/flex';\nimport type { FloatButtonGroupProps, FloatButtonProps } from '../floatbutton/floatbutton';\nimport type {\n FormErrorSummaryProps,\n FormFieldProps,\n FormGroupProps,\n FormProps,\n} from '../form/form';\nimport type { FormListProps } from '../form/list';\nimport type { ColProps, GridProps, RowProps } from '../grid/grid';\nimport type { ImagePreviewOptions } from '../image/types';\nimport type { InfiniteScrollProps } from '../infinitescroll/infinitescroll';\nimport type { InputGroupProps, InputSearchProps } from '../input/group';\nimport type { InputProps } from '../input/input';\nimport type { InputMaskProps } from '../inputmask/inputmask';\nimport type { InputNumberProps } from '../inputnumber/inputnumber';\nimport type { InputOTPProps } from '../inputotp/inputotp';\nimport type { LayoutProps, LayoutSiderProps } from '../layout/layout';\nimport type { LoadingProps } from '../loading/loading';\nimport type { LoadingBarProps } from '../loadingbar/loadingbar';\nimport type { MasonryProps } from '../masonry/masonry';\nimport type { MentionsProps } from '../mentions/mentions';\nimport type { MenuGroupProps, MenuProps } from '../menu/menu';\nimport type { MessageOptions, MessageProps } from '../message/message';\nimport type { ModalProps } from '../modal/modal';\nimport type { NotificationOptions, NotificationProps } from '../notification/notification';\nimport type { PaginationProps } from '../pagination/pagination';\nimport type { PopconfirmProps } from '../popconfirm/popconfirm';\nimport type { PopoverProps } from '../popover/popover';\nimport type { ProgressProps } from '../progress/progress';\nimport type { QRCodeProps } from '../qrcode/qrcode';\nimport type { RadioGroupProps, RadioProps } from '../radio/radio';\nimport type { RateProps } from '../rate/rate';\nimport type { ResultProps } from '../result/result';\nimport type { ScrollAreaProps } from '../scrollarea/scrollarea';\nimport type { ScrollbarProps } from '../scrollbar/scrollbar';\nimport type { SelectProps } from '../select/select';\nimport type { SkeletonProps } from '../skeleton/skeleton';\nimport type { SliderProps } from '../slider/slider';\nimport type { SpaceProps } from '../space/space';\nimport type { SplitterProps } from '../splitter/splitter';\nimport type { CountdownProps, StatisticProps } from '../statistic/statistic';\nimport type { StepsProps } from '../steps/steps';\nimport type { SwitchProps } from '../switch/switch';\nimport type { DataTablePresentationProps } from '../tabletanstack/defaults';\nimport type { TabsProps } from '../tabs/tabs';\nimport type { CheckableTagProps, TagGroupProps } from '../tag/group';\nimport type { TagProps } from '../tag/tag';\nimport type { TextareaProps } from '../textarea/textarea';\nimport type { TimelineProps } from '../timeline/timeline';\nimport type { TooltipProps } from '../tooltip/tooltip';\nimport type { TourProps } from '../tour/tour';\nimport type { TransferProps } from '../transfer/transfer';\nimport type { TreeProps } from '../tree/tree';\nimport type { TreeSelectProps } from '../treeselect/treeselect';\nimport type {\n LinkProps,\n ParagraphProps,\n TextProps,\n TitleProps,\n TypographyProps,\n} from '../typography/typography';\nimport type { AvatarUploadProps, UploadProps } from '../upload/upload';\nimport type { VirtualListProps } from '../virtuallist/virtuallist';\n\n/** Only props independent of the caller's item type can cross a generic component boundary. */\ntype GenericComponentName = 'FormList' | 'VirtualList' | 'DataTable';\n\n/** Full public props keep each hook key tied to its component, including Select's union. */\ninterface ComponentPropsMap {\n AvatarUpload: AvatarUploadProps;\n Affix: AffixProps;\n Alert: AlertProps;\n Anchor: AnchorProps;\n AutoComplete: AutoCompleteProps;\n Avatar: AvatarProps;\n AvatarGroup: AvatarGroupProps;\n BackTop: BackTopProps;\n Badge: BadgeProps;\n Breadcrumb: BreadcrumbProps;\n Button: ButtonProps;\n ButtonGroup: ButtonGroupProps;\n Calendar: CalendarProps;\n Card: CardProps;\n CardTitle: CardTitleProps;\n Carousel: CarouselProps;\n Cascader: CascaderProps;\n CheckableTag: CheckableTagProps;\n Checkbox: CheckboxProps;\n CheckboxGroup: CheckboxGroupProps;\n Col: ColProps;\n Collapse: CollapseProps;\n ColorPicker: ColorPickerProps;\n Confirm: ConfirmOptions;\n Countdown: CountdownProps;\n DatePicker: DatePickerProps;\n DateRangePicker: DateRangePickerProps;\n Descriptions: DescriptionsProps;\n Divider: DividerProps;\n Drawer: DrawerProps;\n Dropdown: DropdownProps;\n Empty: EmptyProps;\n ErrorBoundary: ErrorBoundaryProps;\n FileList: FileListProps;\n Flex: FlexProps;\n FloatButton: FloatButtonProps;\n FloatButtonGroup: FloatButtonGroupProps;\n Form: FormProps;\n FormErrorSummary: FormErrorSummaryProps;\n FormField: FormFieldProps;\n FormGroup: FormGroupProps;\n Grid: GridProps;\n ImagePreview: ImagePreviewOptions;\n InfiniteScroll: InfiniteScrollProps;\n Input: InputProps;\n InputGroup: InputGroupProps;\n InputMask: InputMaskProps;\n InputNumber: InputNumberProps;\n InputOTP: InputOTPProps;\n InputSearch: InputSearchProps;\n Layout: LayoutProps;\n LayoutContent: HTMLAttributes<HTMLElement>;\n LayoutFooter: HTMLAttributes<HTMLElement>;\n LayoutHeader: HTMLAttributes<HTMLElement>;\n LayoutSider: LayoutSiderProps;\n Link: LinkProps;\n Loading: LoadingProps;\n LoadingBar: LoadingBarProps;\n Masonry: MasonryProps;\n Mentions: MentionsProps;\n Menu: MenuProps;\n MenuGroup: MenuGroupProps;\n Message: MessageProps;\n Modal: ModalProps;\n Notification: NotificationProps;\n Pagination: PaginationProps;\n Paragraph: ParagraphProps;\n Popconfirm: PopconfirmProps;\n Popover: PopoverProps;\n Progress: ProgressProps;\n QRCode: QRCodeProps;\n Radio: RadioProps;\n RadioGroup: RadioGroupProps;\n Rate: RateProps;\n Result: ResultProps;\n Row: RowProps;\n ScrollArea: ScrollAreaProps;\n Scrollbar: ScrollbarProps;\n Select: SelectProps;\n Skeleton: SkeletonProps;\n Slider: SliderProps;\n Space: SpaceProps;\n SplitButton: SplitButtonProps;\n Splitter: SplitterProps;\n Statistic: StatisticProps;\n Steps: StepsProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n Tag: TagProps;\n TagGroup: TagGroupProps;\n Text: TextProps;\n Textarea: TextareaProps;\n Timeline: TimelineProps;\n Title: TitleProps;\n Tooltip: TooltipProps;\n Tour: TourProps;\n Transfer: TransferProps;\n Tree: TreeProps;\n TreeSelect: TreeSelectProps;\n Typography: TypographyProps;\n Upload: UploadProps;\n}\n\n/** Default props for supported components; null clears that component's inherited defaults. */\nexport interface LeafComponentDefaults {\n AvatarUpload?: Partial<Omit<AvatarUploadProps, 'key' | 'ref'>> | null;\n Affix?: Partial<Omit<AffixProps, 'key' | 'ref'>> | null;\n Alert?: Partial<Omit<AlertProps, 'key' | 'ref' | 'title'>> | null;\n Anchor?: Partial<Omit<AnchorProps, 'key' | 'ref' | 'items'>> | null;\n AutoComplete?: Partial<Omit<AutoCompleteProps, 'key' | 'ref' | 'options'>> | null;\n Avatar?: Partial<Omit<AvatarProps, 'key' | 'ref'>> | null;\n AvatarGroup?: Partial<Omit<AvatarGroupProps, 'key' | 'ref'>> | null;\n BackTop?: Partial<Omit<BackTopProps, 'key' | 'ref'>> | null;\n Badge?: Partial<Omit<BadgeProps, 'key' | 'ref'>> | null;\n Breadcrumb?: Partial<Omit<BreadcrumbProps, 'key' | 'ref' | 'items'>> | null;\n Button?: Partial<Omit<ButtonProps, 'key' | 'ref'>> | null;\n ButtonGroup?: Partial<Omit<ButtonGroupProps, 'key' | 'ref'>> | null;\n Calendar?: Partial<Omit<CalendarProps, 'key' | 'ref'>> | null;\n Card?: Partial<Omit<CardProps, 'key' | 'ref'>> | null;\n CardTitle?: Partial<Omit<CardTitleProps, 'key' | 'ref'>> | null;\n Carousel?: Partial<Omit<CarouselProps, 'key' | 'ref'>> | null;\n Cascader?: Partial<\n Omit<\n CascaderProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n CheckableTag?: Partial<Omit<CheckableTagProps, 'key' | 'ref'>> | null;\n Checkbox?: Partial<Omit<CheckboxProps, 'key' | 'ref'>> | null;\n CheckboxGroup?: Partial<Omit<CheckboxGroupProps, 'key' | 'ref' | 'options'>> | null;\n Col?: Partial<Omit<ColProps, 'key' | 'ref'>> | null;\n Collapse?: Partial<Omit<CollapseProps, 'key' | 'ref' | 'items'>> | null;\n ColorPicker?: Partial<Omit<ColorPickerProps, 'key' | 'ref'>> | null;\n Confirm?: Partial<Omit<ConfirmOptions, 'key' | 'ref'>> | null;\n Countdown?: Partial<Omit<CountdownProps, 'key' | 'ref' | 'value'>> | null;\n DataTable?: Partial<Omit<DataTablePresentationProps, 'tableRef'>> | null;\n DatePicker?: Partial<\n Omit<DatePickerProps, 'key' | 'ref' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n DateRangePicker?: Partial<Omit<DateRangePickerProps, 'key' | 'ref'>> | null;\n Descriptions?: Partial<Omit<DescriptionsProps, 'key' | 'ref' | 'items'>> | null;\n Divider?: Partial<Omit<DividerProps, 'key' | 'ref'>> | null;\n Drawer?: Partial<Omit<DrawerProps, 'key' | 'ref' | 'open'>> | null;\n Dropdown?: Partial<Omit<DropdownProps, 'key' | 'ref' | 'items' | 'children'>> | null;\n Empty?: Partial<Omit<EmptyProps, 'key' | 'ref'>> | null;\n ErrorBoundary?: Partial<Omit<ErrorBoundaryProps, 'key' | 'ref'>> | null;\n FileList?: Partial<Omit<FileListProps, 'key' | 'ref' | 'items'>> | null;\n Flex?: Partial<Omit<FlexProps, 'key' | 'ref'>> | null;\n FloatButton?: Partial<Omit<FloatButtonProps, 'key' | 'ref'>> | null;\n FloatButtonGroup?: Partial<Omit<FloatButtonGroupProps, 'key' | 'ref' | 'actions'>> | null;\n Form?: Partial<Omit<FormProps, 'key' | 'ref'>> | null;\n FormErrorSummary?: Partial<Omit<FormErrorSummaryProps, 'key' | 'ref'>> | null;\n FormField?: Partial<Omit<FormFieldProps, 'key' | 'ref'>> | null;\n FormGroup?: Partial<Omit<FormGroupProps, 'key' | 'ref'>> | null;\n FormList?: Partial<\n Omit<\n FormListProps<unknown>,\n 'name' | 'children' | 'value' | 'defaultValue' | 'onChange' | 'itemKey'\n >\n > | null;\n Grid?: Partial<Omit<GridProps, 'key' | 'ref'>> | null;\n ImagePreview?: Omit<ImagePreviewOptions, 'onClose'> | null;\n InfiniteScroll?: Partial<\n Omit<InfiniteScrollProps, 'key' | 'ref' | 'dataLength' | 'hasMore' | 'onLoadMore'>\n > | null;\n Input?: Partial<Omit<InputProps, 'key' | 'ref'>> | null;\n InputGroup?: Partial<Omit<InputGroupProps, 'key' | 'ref'>> | null;\n InputMask?: Partial<Omit<InputMaskProps, 'key' | 'ref' | 'mask'>> | null;\n InputNumber?: Partial<\n Omit<\n InputNumberProps,\n 'key' | 'ref' | 'stringMode' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'\n >\n > | null;\n InputOTP?: Partial<Omit<InputOTPProps, 'key' | 'ref'>> | null;\n InputSearch?: Partial<Omit<InputSearchProps, 'key' | 'ref'>> | null;\n Layout?: Partial<Omit<LayoutProps, 'key' | 'ref'>> | null;\n LayoutContent?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutFooter?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutHeader?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutSider?: Partial<Omit<LayoutSiderProps, 'key' | 'ref'>> | null;\n Link?: Partial<Omit<LinkProps, 'key' | 'ref'>> | null;\n Loading?: Partial<Omit<LoadingProps, 'key' | 'ref'>> | null;\n LoadingBar?: Partial<Omit<LoadingBarProps, 'key' | 'ref' | 'active' | 'progress'>> | null;\n Masonry?: Partial<Omit<MasonryProps, 'key' | 'ref'>> | null;\n Mentions?: Partial<Omit<MentionsProps, 'key' | 'ref' | 'options'>> | null;\n Menu?: Partial<Omit<MenuProps, 'key' | 'ref' | 'items'>> | null;\n MenuGroup?: Partial<Omit<MenuGroupProps, 'key' | 'ref' | 'title'>> | null;\n Message?: Partial<Omit<MessageOptions, 'key' | 'content'>> | null;\n Modal?: Partial<Omit<ModalProps, 'key' | 'ref' | 'open'>> | null;\n Notification?: Partial<Omit<NotificationOptions, 'key' | 'title'>> | null;\n Pagination?: Partial<Omit<PaginationProps, 'key' | 'ref' | 'total'>> | null;\n Paragraph?: Partial<Omit<ParagraphProps, 'key' | 'ref'>> | null;\n Popconfirm?: Partial<Omit<PopconfirmProps, 'key' | 'ref' | 'children' | 'title'>> | null;\n Popover?: Partial<Omit<PopoverProps, 'key' | 'ref' | 'children' | 'content'>> | null;\n Progress?: Partial<Omit<ProgressProps, 'key' | 'ref'>> | null;\n QRCode?: Partial<Omit<QRCodeProps, 'key' | 'ref' | 'value'>> | null;\n Radio?: Partial<Omit<RadioProps, 'key' | 'ref'>> | null;\n RadioGroup?: Partial<Omit<RadioGroupProps, 'key' | 'ref' | 'options'>> | null;\n Rate?: Partial<Omit<RateProps, 'key' | 'ref'>> | null;\n Result?: Partial<Omit<ResultProps, 'key' | 'ref'>> | null;\n Row?: Partial<Omit<RowProps, 'key' | 'ref'>> | null;\n ScrollArea?: Partial<Omit<ScrollAreaProps, 'key' | 'ref'>> | null;\n Scrollbar?: Partial<Omit<ScrollbarProps, 'key' | 'ref'>> | null;\n /** Required data, mode-dependent values and callbacks belong on each Select. */\n Select?: Partial<\n Omit<\n SelectProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n Skeleton?: Partial<Omit<SkeletonProps, 'key' | 'ref'>> | null;\n Slider?: Partial<\n Omit<SliderProps, 'key' | 'ref' | 'range' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n Space?: Partial<Omit<SpaceProps, 'key' | 'ref'>> | null;\n SplitButton?: Partial<Omit<SplitButtonProps, 'key' | 'ref' | 'items'>> | null;\n Splitter?: Partial<Omit<SplitterProps, 'key' | 'ref' | 'panels'>> | null;\n Statistic?: Partial<Omit<StatisticProps, 'key' | 'ref' | 'value'>> | null;\n Steps?: Partial<Omit<StepsProps, 'key' | 'ref' | 'items'>> | null;\n Switch?: Partial<Omit<SwitchProps, 'key' | 'ref'>> | null;\n Tabs?: Partial<Omit<TabsProps, 'key' | 'ref' | 'items'>> | null;\n Tag?: Partial<Omit<TagProps, 'key' | 'ref'>> | null;\n TagGroup?: Partial<Omit<TagGroupProps, 'key' | 'ref' | 'options'>> | null;\n Text?: Partial<Omit<TextProps, 'key' | 'ref'>> | null;\n Textarea?: Partial<Omit<TextareaProps, 'key' | 'ref'>> | null;\n Timeline?: Partial<Omit<TimelineProps, 'key' | 'ref' | 'items'>> | null;\n Title?: Partial<Omit<TitleProps, 'key' | 'ref'>> | null;\n Tooltip?: Partial<Omit<TooltipProps, 'key' | 'ref' | 'content' | 'children'>> | null;\n Tour?: Partial<Omit<TourProps, 'key' | 'ref' | 'open' | 'steps'>> | null;\n Transfer?: Partial<Omit<TransferProps, 'key' | 'ref' | 'items'>> | null;\n Tree?: Partial<Omit<TreeProps, 'key' | 'ref' | 'data'>> | null;\n TreeSelect?: Partial<\n Omit<\n TreeSelectProps,\n | 'key'\n | 'ref'\n | 'options'\n | 'multiple'\n | 'treeCheckable'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >\n > | null;\n Typography?: Partial<Omit<TypographyProps, 'key' | 'ref'>> | null;\n Upload?: Partial<Omit<UploadProps, 'key' | 'ref'>> | null;\n VirtualList?:\n | (Partial<\n Omit<VirtualListProps<unknown>, 'items' | 'itemKey' | 'renderItem' | 'estimateSize'>\n > & { estimateSize?: number })\n | null;\n}\n\nexport const ComponentDefaultsContext = createContext<LeafComponentDefaults>({});\n\n/** Supplement missing props without copying unless a defined default is used. */\nexport function mergeComponentProps<Props extends object>(\n defaults: Partial<Props> | null | undefined,\n props: Props,\n): Props {\n if (!defaults) return props;\n let resolved = props;\n for (const key of Object.keys(defaults) as (keyof Props)[]) {\n const value = defaults[key];\n if (value !== undefined && props[key] === undefined) {\n if (resolved === props) resolved = { ...props };\n resolved[key] = value as Props[typeof key];\n }\n }\n return resolved;\n}\n\n/** Merge scopes by component and prop; nested prop values are replaced as a whole. */\nexport function mergeComponentDefaults(\n parent: LeafComponentDefaults,\n overrides: LeafComponentDefaults | undefined,\n): LeafComponentDefaults {\n if (!overrides) return parent;\n let merged = parent;\n for (const name of Object.keys(overrides) as (keyof LeafComponentDefaults)[]) {\n const incoming = overrides[name];\n if (incoming === undefined) continue;\n const inherited = parent[name] ?? undefined;\n if (incoming === null) {\n if (inherited == null) continue;\n if (merged === parent) merged = { ...parent };\n delete merged[name];\n continue;\n }\n let entry = inherited;\n for (const key of Object.keys(incoming)) {\n const value = (incoming as Record<string, unknown>)[key];\n if (\n value === undefined ||\n value === (inherited as Record<string, unknown> | undefined)?.[key]\n )\n continue;\n if (entry === inherited) entry = { ...inherited };\n (entry as Record<string, unknown>)[key] = value;\n }\n if (entry !== inherited) {\n if (merged === parent) merged = { ...parent };\n // Each entry remains the same component's props; only the dynamic key loses that relation.\n (merged as Record<string, object | undefined>)[name] = entry;\n }\n }\n return merged;\n}\n\nexport function useComponentProps<Name extends keyof ComponentPropsMap>(\n name: Name,\n props: ComponentPropsMap[Name],\n): ComponentPropsMap[Name] {\n const defaults = useContext(ComponentDefaultsContext)[name];\n return mergeComponentProps(\n defaults as Partial<ComponentPropsMap[Name]> | null | undefined,\n props,\n );\n}\n\n/** Generic owners merge this type-independent projection into their own complete props. */\nexport function useGenericComponentDefaults<Name extends GenericComponentName>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n\n/** Read defaults for an API request without invoking hooks from the request callback. */\nexport function useComponentDefaults<Name extends keyof LeafComponentDefaults>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n"],"names":["ComponentDefaultsContext","createContext","mergeComponentProps","defaults","props","resolved","key","Object","value","undefined","mergeComponentDefaults","parent","overrides","merged","name","incoming","inherited","entry","useComponentProps","useContext","useGenericComponentDefaults","useComponentDefaults"],"mappings":";;AAmWO,MAAMA,2BAA2BC,cAAqC,CAAC;AAGvE,SAASC,oBACdC,QAA2C,EAC3CC,KAAY;IAEZ,IAAI,CAACD,UAAU,OAAOC;IACtB,IAAIC,WAAWD;IACf,KAAK,MAAME,OAAOC,OAAO,IAAI,CAACJ,UAA8B;QAC1D,MAAMK,QAAQL,QAAQ,CAACG,IAAI;QAC3B,IAAIE,AAAUC,WAAVD,SAAuBJ,AAAeK,WAAfL,KAAK,CAACE,IAAI,EAAgB;YACnD,IAAID,aAAaD,OAAOC,WAAW;gBAAE,GAAGD,KAAK;YAAC;YAC9CC,QAAQ,CAACC,IAAI,GAAGE;QAClB;IACF;IACA,OAAOH;AACT;AAGO,SAASK,uBACdC,MAA6B,EAC7BC,SAA4C;IAE5C,IAAI,CAACA,WAAW,OAAOD;IACvB,IAAIE,SAASF;IACb,KAAK,MAAMG,QAAQP,OAAO,IAAI,CAACK,WAA+C;QAC5E,MAAMG,WAAWH,SAAS,CAACE,KAAK;QAChC,IAAIC,AAAaN,WAAbM,UAAwB;QAC5B,MAAMC,YAAYL,MAAM,CAACG,KAAK,IAAIL;QAClC,IAAIM,AAAa,SAAbA,UAAmB;YACrB,IAAIC,AAAa,QAAbA,WAAmB;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAC5C,OAAOE,MAAM,CAACC,KAAK;YACnB;QACF;QACA,IAAIG,QAAQD;QACZ,KAAK,MAAMV,OAAOC,OAAO,IAAI,CAACQ,UAAW;YACvC,MAAMP,QAASO,QAAoC,CAACT,IAAI;YACxD,IACEE,AAAUC,WAAVD,SACAA,UAAWQ,WAAmD,CAACV,IAAI;gBAGrE,IAAIW,UAAUD,WAAWC,QAAQ;oBAAE,GAAGD,SAAS;gBAAC;gBAC/CC,KAAiC,CAACX,IAAI,GAAGE;;QAC5C;QACA,IAAIS,UAAUD,WAAW;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAE3CE,MAA6C,CAACC,KAAK,GAAGG;QACzD;IACF;IACA,OAAOJ;AACT;AAEO,SAASK,kBACdJ,IAAU,EACVV,KAA8B;IAE9B,MAAMD,WAAWgB,WAAWnB,yBAAyB,CAACc,KAAK;IAC3D,OAAOZ,oBACLC,UACAC;AAEJ;AAGO,SAASgB,4BAA+DN,IAAU;IACvF,OAAOK,WAAWnB,yBAAyB,CAACc,KAAK;AACnD;AAGO,SAASO,qBAA+DP,IAAU;IACvF,OAAOK,WAAWnB,yBAAyB,CAACc,KAAK;AACnD"}
|
|
@@ -74,5 +74,5 @@ export { Transfer } from "./transfer/index.js";
|
|
|
74
74
|
export { Tree, moveTreeNode } from "./tree/index.js";
|
|
75
75
|
export { TreeSelect } from "./treeselect/index.js";
|
|
76
76
|
export { Link, Paragraph, Text, Title, Typography } from "./typography/index.js";
|
|
77
|
-
export { Upload } from "./upload/index.js";
|
|
77
|
+
export { AvatarUpload, Upload } from "./upload/index.js";
|
|
78
78
|
export { VirtualList } from "./virtuallist/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {"select":{"placeholder":"Please select","empty":"No options","clear":"Clear selection","create":"Create “{label}”"},"autoComplete":{"empty":"No suggestions","suggestions":"{label} suggestions"},"datePicker":{"placeholder":"Select a date","clear":"Clear date","label":"Choose a date","selectDate":"Choose date","presets":"Presets"},"timePicker":{"placeholder":"Select a time","clear":"Clear time","label":"Choose a time","hours":"Hours","minutes":"Minutes","seconds":"Seconds","period":"Period","am":"AM","pm":"PM","now":"Now","selectTime":"Choose time"},"dateTimePicker":{"placeholder":"Select date and time"},"dateRangePicker":{"placeholder":"Select a date range","clear":"Clear range"},"cascader":{"clear":"Clear selection","level":"Level {level}","placeholder":"Please select","empty":"No options"},"calendar":{"previousMonth":"Previous month","nextMonth":"Next month","previousYear":"Previous year","nextYear":"Next year","previousYears":"Previous years","nextYears":"Next years","weekdays":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"year":"Year","month":"Month","week":"Week","today":"Today","label":"Calendar"},"common":{"confirm":"OK","next":"Next","cancel":"Cancel","close":"Close","start":"Start","end":"End","remove":"Remove","search":"Search options","noData":"No data","retry":"Retry","preview":"Preview","download":"Download","loading":"Loading","searchAction":"Search"},"form":{"required":"Please fill out this field","invalid":"Please check this field","errorSummary":"Please check the following fields"},"breadcrumb":{"label":"Breadcrumb"},"pagination":{"label":"Pagination","previousPage":"Previous page","nextPage":"Next page","page":"Page","pageSize":"Page size","jumpTo":"Go to","pageBack":"Jump back 5 pages","pageForward":"Jump forward 5 pages","pageLabel":"Page {page}","pageSizeOption":"{count} / page","total":"Total {total} items"},"input":{"showPassword":"Show password","hidePassword":"Hide password","clear":"Clear input"},"inputNumber":{"increase":"Increase value","decrease":"Decrease value","invalid":"Enter a valid number within the allowed range"},"progress":{"label":"Progress"},"avatar":{"label":"Avatar","moreMembers":"More members","showMore":"Show {count, plural, one {# more member} other {# more members}}"},"rate":{"label":"Rating"},"result":{"success":"Success","warning":"Attention needed","error":"Something went wrong","info":"Information"},"colorPicker":{"label":"Choose a color","clear":"Clear color","saturation":"Saturation","brightness":"Brightness","hue":"Hue","alpha":"Opacity","value":"Color value","invalid":"Enter a valid color","presets":"Preset colors","gradient":"Gradient","colorStop":"Color stop {index}","addColorStop":"Add color stop","removeColorStop":"Remove color stop","color":"Color","position":"Position","colorStopPosition":"Color stop position","angle":"Angle","gradientAngle":"Gradient angle"},"tree":{"label":"Tree","expand":"Expand","reorderInstructions":"Press Space to pick up, Up/Down to choose a target, Left/Right to place before/after it, Space to drop, and Escape to cancel.","moveNode":"Move node {label}","expandNode":"Expand {label}","collapseNode":"Collapse {label}"},"collapse":{"label":"Collapsible panels"},"slider":{"label":"Slider"},"tabs":{"moreTabs":"More tabs","scrollLeft":"Scroll tabs left","scrollRight":"Scroll tabs right","addTab":"Add tab","reorder":"Reorder tab {label}","closeLabel":"Close tab {label}"},"backTop":{"backToTop":"Back to top"},"button":{"moreActions":"More actions"},"carousel":{"carousel":"Carousel","previousSlide":"Previous slide","nextSlide":"Next slide","goTo":"Go to {index}","slide":"slide","role":"carousel"},"errorBoundary":{"title":"This content could not be displayed","description":"Please retry or come back later."},"fileList":{"fileType":"FILE","uploading":"Uploading","uploadFailed":"Upload failed","cancelled":"Cancelled","uploadComplete":"Upload complete","ready":"Ready","uploadProgress":"Upload progress {name}","noFiles":"No files","preview":"Preview {name}","download":"Download {name}","remove":"Remove {name}"},"floatButton":{"quickActions":"Quick actions"},"image":{"previewImage":"Preview image{alt}","imageUnavailable":"Image unavailable","imagePreview":"Image preview","downloadImage":"Download image","exitFullscreen":"Exit fullscreen","enterFullscreen":"Enter fullscreen","closePreview":"Close preview","previousImage":"Previous image","nextImage":"Next image","downloadFailedOpenTheOriginalImageToSaveIt":"Download failed. Open the original image to save it.","openOriginal":"Open original","zoomOut":"Zoom out","zoomLevel":"Zoom level","resetZoom":"Reset zoom","zoomIn":"Zoom in","showThumbnails":"Show thumbnails","scrollThumbnailsBackward":"Scroll thumbnails backward","imageList":"Image list","scrollThumbnailsForward":"Scroll thumbnails forward","image":"Image","position":"{index} of {total}","viewImage":"View image {index}{alt}","noImage":"No image","actualSize":"Actual size (1:1)","fitToWindow":"Fit to window","rotateCounterclockwise":"Rotate counterclockwise","rotateClockwise":"Rotate clockwise","resetImage":"Reset image","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical"},"infiniteScroll":{"loadingFailedRetry":"Loading failed. Retry","allItemsLoaded":"All items loaded","loadMore":"Load more"},"inputOTP":{"verificationCode":"Verification code"},"layout":{"expandSidebar":"Expand sidebar","collapseSidebar":"Collapse sidebar"},"loadingBar":{"pageLoadingProgress":"Page loading progress"},"menu":{"navigationMenu":"Navigation menu"},"popconfirm":{"actionFailedPleaseRetry":"Action failed. Please retry."},"qrCode":{"qrCode":"QR code","refreshCode":"Refresh code"},"scrollbar":{"verticalScrollbar":"Vertical scrollbar","horizontalScrollbar":"Horizontal scrollbar"},"splitter":{"resizePanel":"Resize panel {index}","togglePanel":"Toggle panel"},"table":{"table":"Table","scrollArea":"Scroll area","loadError":"Unable to load data. Please try again."},"dataTable":{"resizeColumn":"Resize column: {label}","selectRows":"Select rows","selectAllRowsOnThisPage":"Select all rows on this page","selectRow":"Select row: {label}","collapseRow":"Collapse row: {label}","expandRow":"Expand row: {label}","expandRows":"Expand rows","expandDetails":"Expand details","collapseDetails":"Collapse details","sortAscending":"Sort ascending","sortDescending":"Sort descending","clearSorting":"Clear sorting"},"timeRangePicker":{"placeholder":"Start time ~ End time","label":"Choose time range","clear":"Clear time range"},"tour":{"previous":"Previous","finish":"Finish","next":"Next"},"transfer":{"selectAllVisibleItems":"Select all visible items","available":"Available","selected":"Selected","searchAvailableItems":"Search available items","searchSelectedItems":"Search selected items","noItems":"No items","moveToSelected":"Move to selected","moveToAvailable":"Move to available"},"typography":{"editText":"Edit text","collapse":"Collapse","expand":"Expand","copyText":"Copy text"},"upload":{"uploadUrlCannotBeEmpty":"Upload URL cannot be empty","uploadFailed":"Upload failed","chooseOneFileAtATime":"Choose one file at a time","fileTypeIsNotAccepted":"File type is not accepted","fileExceedsTheSizeLimit":"File exceeds the size limit","fileCountLimitReached":"File count limit reached","fileValidationFailed":"File validation failed","chooseFiles":"Choose files","dropHint":"Click or drop files here","dropDescription":"Choose files or drag them into this area","cancelUpload":"Cancel upload {name}","retryUpload":"Retry upload {name}"},"treeSelect":{"placeholder":"Please select","clear":"Clear selection","empty":"No options"},"drag":{"instructions":"Press Space to start, arrow keys to move, Space to drop, and Escape to cancel.","pickedUp":"Picked up {label}","moved":"Move to {label}","dropped":"Dropped {label}","cancelled":"Reordering cancelled","outside":"No drop target"}};
|
|
1
|
+
export default {"select":{"placeholder":"Please select","empty":"No options","clear":"Clear selection","create":"Create “{label}”"},"autoComplete":{"empty":"No suggestions","suggestions":"{label} suggestions"},"datePicker":{"placeholder":"Select a date","clear":"Clear date","label":"Choose a date","selectDate":"Choose date","presets":"Presets"},"timePicker":{"placeholder":"Select a time","clear":"Clear time","label":"Choose a time","hours":"Hours","minutes":"Minutes","seconds":"Seconds","period":"Period","am":"AM","pm":"PM","now":"Now","selectTime":"Choose time"},"dateTimePicker":{"placeholder":"Select date and time"},"dateRangePicker":{"placeholder":"Select a date range","clear":"Clear range"},"cascader":{"clear":"Clear selection","level":"Level {level}","placeholder":"Please select","empty":"No options"},"calendar":{"previousMonth":"Previous month","nextMonth":"Next month","previousYear":"Previous year","nextYear":"Next year","previousYears":"Previous years","nextYears":"Next years","weekdays":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"year":"Year","month":"Month","week":"Week","today":"Today","label":"Calendar"},"common":{"confirm":"OK","next":"Next","cancel":"Cancel","close":"Close","start":"Start","end":"End","remove":"Remove","search":"Search options","noData":"No data","retry":"Retry","preview":"Preview","download":"Download","loading":"Loading","searchAction":"Search"},"form":{"required":"Please fill out this field","invalid":"Please check this field","errorSummary":"Please check the following fields"},"breadcrumb":{"label":"Breadcrumb"},"pagination":{"label":"Pagination","previousPage":"Previous page","nextPage":"Next page","page":"Page","pageSize":"Page size","jumpTo":"Go to","pageBack":"Jump back 5 pages","pageForward":"Jump forward 5 pages","pageLabel":"Page {page}","pageSizeOption":"{count} / page","total":"Total {total} items"},"input":{"showPassword":"Show password","hidePassword":"Hide password","clear":"Clear input"},"inputNumber":{"increase":"Increase value","decrease":"Decrease value","invalid":"Enter a valid number within the allowed range"},"progress":{"label":"Progress"},"avatar":{"label":"Avatar","moreMembers":"More members","showMore":"Show {count, plural, one {# more member} other {# more members}}"},"rate":{"label":"Rating"},"result":{"success":"Success","warning":"Attention needed","error":"Something went wrong","info":"Information"},"colorPicker":{"label":"Choose a color","clear":"Clear color","saturation":"Saturation","brightness":"Brightness","hue":"Hue","alpha":"Opacity","value":"Color value","invalid":"Enter a valid color","presets":"Preset colors","gradient":"Gradient","colorStop":"Color stop {index}","addColorStop":"Add color stop","removeColorStop":"Remove color stop","color":"Color","position":"Position","colorStopPosition":"Color stop position","angle":"Angle","gradientAngle":"Gradient angle"},"tree":{"label":"Tree","expand":"Expand","reorderInstructions":"Press Space to pick up, Up/Down to choose a target, Left/Right to place before/after it, Space to drop, and Escape to cancel.","moveNode":"Move node {label}","expandNode":"Expand {label}","collapseNode":"Collapse {label}"},"collapse":{"label":"Collapsible panels"},"slider":{"label":"Slider"},"tabs":{"moreTabs":"More tabs","scrollLeft":"Scroll tabs left","scrollRight":"Scroll tabs right","addTab":"Add tab","reorder":"Reorder tab {label}","closeLabel":"Close tab {label}"},"backTop":{"backToTop":"Back to top"},"button":{"moreActions":"More actions"},"carousel":{"carousel":"Carousel","previousSlide":"Previous slide","nextSlide":"Next slide","goTo":"Go to {index}","slide":"slide","role":"carousel"},"errorBoundary":{"title":"This content could not be displayed","description":"Please retry or come back later."},"fileList":{"fileType":"FILE","uploading":"Uploading","uploadFailed":"Upload failed","cancelled":"Cancelled","uploadComplete":"Upload complete","ready":"Ready","uploadProgress":"Upload progress {name}","noFiles":"No files","preview":"Preview {name}","download":"Download {name}","remove":"Remove {name}"},"floatButton":{"quickActions":"Quick actions"},"image":{"previewImage":"Preview image{alt}","imageUnavailable":"Image unavailable","imagePreview":"Image preview","downloadImage":"Download image","exitFullscreen":"Exit fullscreen","enterFullscreen":"Enter fullscreen","closePreview":"Close preview","previousImage":"Previous image","nextImage":"Next image","downloadFailedOpenTheOriginalImageToSaveIt":"Download failed. Open the original image to save it.","openOriginal":"Open original","zoomOut":"Zoom out","zoomLevel":"Zoom level","resetZoom":"Reset zoom","zoomIn":"Zoom in","showThumbnails":"Show thumbnails","scrollThumbnailsBackward":"Scroll thumbnails backward","imageList":"Image list","scrollThumbnailsForward":"Scroll thumbnails forward","image":"Image","position":"{index} of {total}","viewImage":"View image {index}{alt}","noImage":"No image","actualSize":"Actual size (1:1)","fitToWindow":"Fit to window","rotateCounterclockwise":"Rotate counterclockwise","rotateClockwise":"Rotate clockwise","resetImage":"Reset image","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical"},"infiniteScroll":{"loadingFailedRetry":"Loading failed. Retry","allItemsLoaded":"All items loaded","loadMore":"Load more"},"inputOTP":{"verificationCode":"Verification code"},"layout":{"expandSidebar":"Expand sidebar","collapseSidebar":"Collapse sidebar"},"loadingBar":{"pageLoadingProgress":"Page loading progress"},"menu":{"navigationMenu":"Navigation menu"},"popconfirm":{"actionFailedPleaseRetry":"Action failed. Please retry."},"qrCode":{"qrCode":"QR code","refreshCode":"Refresh code"},"scrollbar":{"verticalScrollbar":"Vertical scrollbar","horizontalScrollbar":"Horizontal scrollbar"},"splitter":{"resizePanel":"Resize panel {index}","togglePanel":"Toggle panel"},"table":{"table":"Table","scrollArea":"Scroll area","loadError":"Unable to load data. Please try again."},"dataTable":{"resizeColumn":"Resize column: {label}","selectRows":"Select rows","selectAllRowsOnThisPage":"Select all rows on this page","selectRow":"Select row: {label}","collapseRow":"Collapse row: {label}","expandRow":"Expand row: {label}","expandRows":"Expand rows","expandDetails":"Expand details","collapseDetails":"Collapse details","sortAscending":"Sort ascending","sortDescending":"Sort descending","clearSorting":"Clear sorting"},"timeRangePicker":{"placeholder":"Start time ~ End time","label":"Choose time range","clear":"Clear time range"},"tour":{"previous":"Previous","finish":"Finish","next":"Next"},"transfer":{"selectAllVisibleItems":"Select all visible items","available":"Available","selected":"Selected","searchAvailableItems":"Search available items","searchSelectedItems":"Search selected items","noItems":"No items","moveToSelected":"Move to selected","moveToAvailable":"Move to available"},"typography":{"editText":"Edit text","collapse":"Collapse","expand":"Expand","copyText":"Copy text"},"upload":{"uploadUrlCannotBeEmpty":"Upload URL cannot be empty","uploadAvatar":"Upload","reuploadAvatar":"Upload again","uploadFailed":"Upload failed","chooseOneFileAtATime":"Choose one file at a time","fileTypeIsNotAccepted":"File type is not accepted","fileExceedsTheSizeLimit":"File exceeds the size limit","fileCountLimitReached":"File count limit reached","fileValidationFailed":"File validation failed","chooseFiles":"Choose files","dropHint":"Click or drop files here","dropDescription":"Choose files or drag them into this area","cancelUpload":"Cancel upload {name}","retryUpload":"Retry upload {name}"},"treeSelect":{"placeholder":"Please select","clear":"Clear selection","empty":"No options"},"drag":{"instructions":"Press Space to start, arrow keys to move, Space to drop, and Escape to cancel.","pickedUp":"Picked up {label}","moved":"Move to {label}","dropped":"Dropped {label}","cancelled":"Reordering cancelled","outside":"No drop target"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {"select":{"placeholder":"選択してください","empty":"選択肢がありません","clear":"選択をクリア","create":"「{label}」を作成"},"autoComplete":{"empty":"候補がありません","suggestions":"{label}の候補"},"datePicker":{"placeholder":"日付を選択","clear":"日付をクリア","label":"日付を選択","selectDate":"日付を選択","presets":"プリセット"},"timePicker":{"placeholder":"時刻を選択","clear":"時刻をクリア","label":"時刻を選択","hours":"時","minutes":"分","seconds":"秒","period":"午前・午後","am":"午前","pm":"午後","now":"現在時刻","selectTime":"時刻を選択"},"dateTimePicker":{"placeholder":"日時を選択"},"dateRangePicker":{"placeholder":"日付の範囲を選択","clear":"範囲をクリア"},"cascader":{"clear":"選択をクリア","level":"階層 {level}","placeholder":"選択してください","empty":"選択肢がありません"},"calendar":{"previousMonth":"前の月","nextMonth":"次の月","previousYear":"前の年","nextYear":"次の年","previousYears":"前の年の範囲","nextYears":"次の年の範囲","weekdays":["月","火","水","木","金","土","日"],"year":"年","month":"月","week":"週","today":"今日","label":"カレンダー"},"common":{"confirm":"確認","next":"次へ","cancel":"キャンセル","close":"閉じる","start":"開始","end":"終了","remove":"削除","search":"選択肢を検索","noData":"データがありません","retry":"再試行","preview":"プレビュー","download":"ダウンロード","loading":"読み込み中","searchAction":"検索"},"form":{"required":"この項目を入力してください","invalid":"この項目を確認してください","errorSummary":"次の項目を確認してください"},"breadcrumb":{"label":"パンくずリスト"},"pagination":{"label":"ページ切り替え","previousPage":"前のページ","nextPage":"次のページ","page":"ページ","pageSize":"表示件数","jumpTo":"移動先","pageBack":"5ページ前に移動","pageForward":"5ページ先に移動","pageLabel":"ページ {page}","pageSizeOption":"{count}件 / ページ","total":"全 {total} 件"},"input":{"showPassword":"パスワードを表示","hidePassword":"パスワードを隠す","clear":"入力をクリア"},"inputNumber":{"increase":"値を増やす","decrease":"値を減らす","invalid":"指定された範囲内の数値を入力してください"},"progress":{"label":"進行状況"},"avatar":{"label":"アバター","moreMembers":"その他のメンバー","showMore":"他{count}人のメンバーを表示"},"rate":{"label":"評価"},"result":{"success":"成功","warning":"確認が必要です","error":"エラーが発生しました","info":"お知らせ"},"colorPicker":{"label":"色を選択","clear":"色をクリア","saturation":"彩度","brightness":"明度","hue":"色相","alpha":"不透明度","value":"色の値","invalid":"有効な色を入力してください","presets":"プリセットカラー","gradient":"グラデーション","colorStop":"カラーストップ {index}","addColorStop":"カラーストップを追加","removeColorStop":"カラーストップを削除","color":"色","position":"位置","colorStopPosition":"カラーストップの位置","angle":"角度","gradientAngle":"グラデーションの角度"},"tree":{"label":"ツリー","expand":"展開","reorderInstructions":"Space キーで項目を選び、上下キーで移動先を選択します。左右キーで前後を指定し、Space キーで移動、Escape キーでキャンセルします。","moveNode":"{label}を移動","expandNode":"{label}を展開","collapseNode":"{label}を折りたたむ"},"collapse":{"label":"折りたたみパネル"},"slider":{"label":"スライダー"},"tabs":{"moreTabs":"その他のタブ","scrollLeft":"タブを左にスクロール","scrollRight":"タブを右にスクロール","addTab":"タブを追加","reorder":"タブ「{label}」を並べ替え","closeLabel":"タブ「{label}」を閉じる"},"backTop":{"backToTop":"ページの先頭へ"},"button":{"moreActions":"その他の操作"},"carousel":{"carousel":"カルーセル","previousSlide":"前のスライド","nextSlide":"次のスライド","goTo":"{index}枚目に移動","slide":"スライド","role":"カルーセル"},"errorBoundary":{"title":"このコンテンツを表示できませんでした","description":"再試行するか、しばらくしてからもう一度お試しください。"},"fileList":{"fileType":"ファイル","uploading":"アップロード中","uploadFailed":"アップロードに失敗しました","cancelled":"キャンセル済み","uploadComplete":"アップロード完了","ready":"準備完了","uploadProgress":"{name}のアップロード状況","noFiles":"ファイルがありません","preview":"{name}をプレビュー","download":"{name}をダウンロード","remove":"{name}を削除"},"floatButton":{"quickActions":"クイック操作"},"image":{"previewImage":"画像をプレビュー{alt}","imageUnavailable":"画像を表示できません","imagePreview":"画像プレビュー","downloadImage":"画像をダウンロード","exitFullscreen":"全画面表示を終了","enterFullscreen":"全画面表示","closePreview":"プレビューを閉じる","previousImage":"前の画像","nextImage":"次の画像","downloadFailedOpenTheOriginalImageToSaveIt":"ダウンロードに失敗しました。元の画像を開いて保存してください。","openOriginal":"元の画像を開く","zoomOut":"縮小","zoomLevel":"ズーム倍率","resetZoom":"拡大率をリセット","zoomIn":"拡大","showThumbnails":"サムネイルを表示","scrollThumbnailsBackward":"サムネイルを前へスクロール","imageList":"画像一覧","scrollThumbnailsForward":"サムネイルを次へスクロール","image":"画像","position":"{total}枚中{index}枚目","viewImage":"画像{index}を表示{alt}","noImage":"画像なし","actualSize":"実際のサイズ(1:1)","fitToWindow":"画面に合わせる","rotateCounterclockwise":"反時計回りに回転","rotateClockwise":"時計回りに回転","resetImage":"画像をリセット","flipHorizontal":"左右反転","flipVertical":"上下反転"},"infiniteScroll":{"loadingFailedRetry":"読み込みに失敗しました。再試行","allItemsLoaded":"すべて読み込みました","loadMore":"さらに読み込む"},"inputOTP":{"verificationCode":"認証コード"},"layout":{"expandSidebar":"サイドバーを展開","collapseSidebar":"サイドバーを折りたたむ"},"loadingBar":{"pageLoadingProgress":"ページの読み込み状況"},"menu":{"navigationMenu":"ナビゲーションメニュー"},"popconfirm":{"actionFailedPleaseRetry":"操作に失敗しました。もう一度お試しください。"},"qrCode":{"qrCode":"QRコード","refreshCode":"コードを更新"},"scrollbar":{"verticalScrollbar":"縦スクロールバー","horizontalScrollbar":"横スクロールバー"},"splitter":{"resizePanel":"パネル{index}のサイズを変更","togglePanel":"パネルを開閉"},"table":{"table":"表","scrollArea":"スクロール領域","loadError":"データを読み込めませんでした。もう一度お試しください。"},"dataTable":{"resizeColumn":"列「{label}」の幅を変更","selectRows":"行を選択","selectAllRowsOnThisPage":"このページのすべての行を選択","selectRow":"行「{label}」を選択","collapseRow":"行「{label}」を折りたたむ","expandRow":"行「{label}」を展開","expandRows":"行を展開","expandDetails":"詳細を展開","collapseDetails":"詳細を折りたたむ","sortAscending":"昇順に並べ替え","sortDescending":"降順に並べ替え","clearSorting":"並べ替えを解除"},"timeRangePicker":{"placeholder":"開始時刻 ~ 終了時刻","label":"時刻の範囲を選択","clear":"時刻の範囲をクリア"},"tour":{"previous":"前へ","finish":"完了","next":"次へ"},"transfer":{"selectAllVisibleItems":"表示中の項目をすべて選択","available":"選択可能","selected":"選択済み","searchAvailableItems":"選択可能な項目を検索","searchSelectedItems":"選択済みの項目を検索","noItems":"項目がありません","moveToSelected":"選択済みに移動","moveToAvailable":"選択可能に戻す"},"typography":{"editText":"テキストを編集","collapse":"折りたたむ","expand":"展開","copyText":"テキストをコピー"},"upload":{"uploadUrlCannotBeEmpty":"アップロード先のURLを指定してください","uploadFailed":"アップロードに失敗しました","chooseOneFileAtATime":"ファイルを1つずつ選択してください","fileTypeIsNotAccepted":"対応していないファイル形式です","fileExceedsTheSizeLimit":"ファイルサイズの上限を超えています","fileCountLimitReached":"ファイル数の上限に達しました","fileValidationFailed":"ファイルの検証に失敗しました","chooseFiles":"ファイルを選択","dropHint":"クリックするか、ここにファイルをドロップ","dropDescription":"ファイルを選択するか、この領域にドラッグしてください","cancelUpload":"{name}のアップロードをキャンセル","retryUpload":"{name}のアップロードを再試行"},"treeSelect":{"placeholder":"選択してください","clear":"選択をクリア","empty":"選択肢がありません"},"drag":{"instructions":"Space キーで開始し、矢印キーで移動します。Space キーで確定、Escape キーでキャンセルします。","pickedUp":"{label}を選びました","moved":"{label}に移動","dropped":"{label}を配置しました","cancelled":"並べ替えをキャンセルしました","outside":"移動先がありません"}};
|
|
1
|
+
export default {"select":{"placeholder":"選択してください","empty":"選択肢がありません","clear":"選択をクリア","create":"「{label}」を作成"},"autoComplete":{"empty":"候補がありません","suggestions":"{label}の候補"},"datePicker":{"placeholder":"日付を選択","clear":"日付をクリア","label":"日付を選択","selectDate":"日付を選択","presets":"プリセット"},"timePicker":{"placeholder":"時刻を選択","clear":"時刻をクリア","label":"時刻を選択","hours":"時","minutes":"分","seconds":"秒","period":"午前・午後","am":"午前","pm":"午後","now":"現在時刻","selectTime":"時刻を選択"},"dateTimePicker":{"placeholder":"日時を選択"},"dateRangePicker":{"placeholder":"日付の範囲を選択","clear":"範囲をクリア"},"cascader":{"clear":"選択をクリア","level":"階層 {level}","placeholder":"選択してください","empty":"選択肢がありません"},"calendar":{"previousMonth":"前の月","nextMonth":"次の月","previousYear":"前の年","nextYear":"次の年","previousYears":"前の年の範囲","nextYears":"次の年の範囲","weekdays":["月","火","水","木","金","土","日"],"year":"年","month":"月","week":"週","today":"今日","label":"カレンダー"},"common":{"confirm":"確認","next":"次へ","cancel":"キャンセル","close":"閉じる","start":"開始","end":"終了","remove":"削除","search":"選択肢を検索","noData":"データがありません","retry":"再試行","preview":"プレビュー","download":"ダウンロード","loading":"読み込み中","searchAction":"検索"},"form":{"required":"この項目を入力してください","invalid":"この項目を確認してください","errorSummary":"次の項目を確認してください"},"breadcrumb":{"label":"パンくずリスト"},"pagination":{"label":"ページ切り替え","previousPage":"前のページ","nextPage":"次のページ","page":"ページ","pageSize":"表示件数","jumpTo":"移動先","pageBack":"5ページ前に移動","pageForward":"5ページ先に移動","pageLabel":"ページ {page}","pageSizeOption":"{count}件 / ページ","total":"全 {total} 件"},"input":{"showPassword":"パスワードを表示","hidePassword":"パスワードを隠す","clear":"入力をクリア"},"inputNumber":{"increase":"値を増やす","decrease":"値を減らす","invalid":"指定された範囲内の数値を入力してください"},"progress":{"label":"進行状況"},"avatar":{"label":"アバター","moreMembers":"その他のメンバー","showMore":"他{count}人のメンバーを表示"},"rate":{"label":"評価"},"result":{"success":"成功","warning":"確認が必要です","error":"エラーが発生しました","info":"お知らせ"},"colorPicker":{"label":"色を選択","clear":"色をクリア","saturation":"彩度","brightness":"明度","hue":"色相","alpha":"不透明度","value":"色の値","invalid":"有効な色を入力してください","presets":"プリセットカラー","gradient":"グラデーション","colorStop":"カラーストップ {index}","addColorStop":"カラーストップを追加","removeColorStop":"カラーストップを削除","color":"色","position":"位置","colorStopPosition":"カラーストップの位置","angle":"角度","gradientAngle":"グラデーションの角度"},"tree":{"label":"ツリー","expand":"展開","reorderInstructions":"Space キーで項目を選び、上下キーで移動先を選択します。左右キーで前後を指定し、Space キーで移動、Escape キーでキャンセルします。","moveNode":"{label}を移動","expandNode":"{label}を展開","collapseNode":"{label}を折りたたむ"},"collapse":{"label":"折りたたみパネル"},"slider":{"label":"スライダー"},"tabs":{"moreTabs":"その他のタブ","scrollLeft":"タブを左にスクロール","scrollRight":"タブを右にスクロール","addTab":"タブを追加","reorder":"タブ「{label}」を並べ替え","closeLabel":"タブ「{label}」を閉じる"},"backTop":{"backToTop":"ページの先頭へ"},"button":{"moreActions":"その他の操作"},"carousel":{"carousel":"カルーセル","previousSlide":"前のスライド","nextSlide":"次のスライド","goTo":"{index}枚目に移動","slide":"スライド","role":"カルーセル"},"errorBoundary":{"title":"このコンテンツを表示できませんでした","description":"再試行するか、しばらくしてからもう一度お試しください。"},"fileList":{"fileType":"ファイル","uploading":"アップロード中","uploadFailed":"アップロードに失敗しました","cancelled":"キャンセル済み","uploadComplete":"アップロード完了","ready":"準備完了","uploadProgress":"{name}のアップロード状況","noFiles":"ファイルがありません","preview":"{name}をプレビュー","download":"{name}をダウンロード","remove":"{name}を削除"},"floatButton":{"quickActions":"クイック操作"},"image":{"previewImage":"画像をプレビュー{alt}","imageUnavailable":"画像を表示できません","imagePreview":"画像プレビュー","downloadImage":"画像をダウンロード","exitFullscreen":"全画面表示を終了","enterFullscreen":"全画面表示","closePreview":"プレビューを閉じる","previousImage":"前の画像","nextImage":"次の画像","downloadFailedOpenTheOriginalImageToSaveIt":"ダウンロードに失敗しました。元の画像を開いて保存してください。","openOriginal":"元の画像を開く","zoomOut":"縮小","zoomLevel":"ズーム倍率","resetZoom":"拡大率をリセット","zoomIn":"拡大","showThumbnails":"サムネイルを表示","scrollThumbnailsBackward":"サムネイルを前へスクロール","imageList":"画像一覧","scrollThumbnailsForward":"サムネイルを次へスクロール","image":"画像","position":"{total}枚中{index}枚目","viewImage":"画像{index}を表示{alt}","noImage":"画像なし","actualSize":"実際のサイズ(1:1)","fitToWindow":"画面に合わせる","rotateCounterclockwise":"反時計回りに回転","rotateClockwise":"時計回りに回転","resetImage":"画像をリセット","flipHorizontal":"左右反転","flipVertical":"上下反転"},"infiniteScroll":{"loadingFailedRetry":"読み込みに失敗しました。再試行","allItemsLoaded":"すべて読み込みました","loadMore":"さらに読み込む"},"inputOTP":{"verificationCode":"認証コード"},"layout":{"expandSidebar":"サイドバーを展開","collapseSidebar":"サイドバーを折りたたむ"},"loadingBar":{"pageLoadingProgress":"ページの読み込み状況"},"menu":{"navigationMenu":"ナビゲーションメニュー"},"popconfirm":{"actionFailedPleaseRetry":"操作に失敗しました。もう一度お試しください。"},"qrCode":{"qrCode":"QRコード","refreshCode":"コードを更新"},"scrollbar":{"verticalScrollbar":"縦スクロールバー","horizontalScrollbar":"横スクロールバー"},"splitter":{"resizePanel":"パネル{index}のサイズを変更","togglePanel":"パネルを開閉"},"table":{"table":"表","scrollArea":"スクロール領域","loadError":"データを読み込めませんでした。もう一度お試しください。"},"dataTable":{"resizeColumn":"列「{label}」の幅を変更","selectRows":"行を選択","selectAllRowsOnThisPage":"このページのすべての行を選択","selectRow":"行「{label}」を選択","collapseRow":"行「{label}」を折りたたむ","expandRow":"行「{label}」を展開","expandRows":"行を展開","expandDetails":"詳細を展開","collapseDetails":"詳細を折りたたむ","sortAscending":"昇順に並べ替え","sortDescending":"降順に並べ替え","clearSorting":"並べ替えを解除"},"timeRangePicker":{"placeholder":"開始時刻 ~ 終了時刻","label":"時刻の範囲を選択","clear":"時刻の範囲をクリア"},"tour":{"previous":"前へ","finish":"完了","next":"次へ"},"transfer":{"selectAllVisibleItems":"表示中の項目をすべて選択","available":"選択可能","selected":"選択済み","searchAvailableItems":"選択可能な項目を検索","searchSelectedItems":"選択済みの項目を検索","noItems":"項目がありません","moveToSelected":"選択済みに移動","moveToAvailable":"選択可能に戻す"},"typography":{"editText":"テキストを編集","collapse":"折りたたむ","expand":"展開","copyText":"テキストをコピー"},"upload":{"uploadUrlCannotBeEmpty":"アップロード先のURLを指定してください","uploadAvatar":"アップロード","reuploadAvatar":"再アップロード","uploadFailed":"アップロードに失敗しました","chooseOneFileAtATime":"ファイルを1つずつ選択してください","fileTypeIsNotAccepted":"対応していないファイル形式です","fileExceedsTheSizeLimit":"ファイルサイズの上限を超えています","fileCountLimitReached":"ファイル数の上限に達しました","fileValidationFailed":"ファイルの検証に失敗しました","chooseFiles":"ファイルを選択","dropHint":"クリックするか、ここにファイルをドロップ","dropDescription":"ファイルを選択するか、この領域にドラッグしてください","cancelUpload":"{name}のアップロードをキャンセル","retryUpload":"{name}のアップロードを再試行"},"treeSelect":{"placeholder":"選択してください","clear":"選択をクリア","empty":"選択肢がありません"},"drag":{"instructions":"Space キーで開始し、矢印キーで移動します。Space キーで確定、Escape キーでキャンセルします。","pickedUp":"{label}を選びました","moved":"{label}に移動","dropped":"{label}を配置しました","cancelled":"並べ替えをキャンセルしました","outside":"移動先がありません"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {"select":{"placeholder":"선택해 주세요","empty":"선택 항목 없음","clear":"선택 지우기","create":"“{label}” 만들기"},"autoComplete":{"empty":"추천 항목 없음","suggestions":"{label} 추천 항목"},"datePicker":{"placeholder":"날짜 선택","clear":"날짜 지우기","label":"날짜 선택","selectDate":"날짜 선택","presets":"프리셋"},"timePicker":{"placeholder":"시간 선택","clear":"시간 지우기","label":"시간 선택","hours":"시","minutes":"분","seconds":"초","period":"오전/오후","am":"오전","pm":"오후","now":"현재 시간","selectTime":"시간 선택"},"dateTimePicker":{"placeholder":"날짜 및 시간 선택"},"dateRangePicker":{"placeholder":"날짜 범위 선택","clear":"범위 지우기"},"cascader":{"clear":"선택 지우기","level":"{level}단계","placeholder":"선택해 주세요","empty":"선택 항목 없음"},"calendar":{"previousMonth":"이전 달","nextMonth":"다음 달","previousYear":"이전 해","nextYear":"다음 해","previousYears":"이전 연도 범위","nextYears":"다음 연도 범위","weekdays":["월","화","수","목","금","토","일"],"year":"연도","month":"월","week":"주","today":"오늘","label":"달력"},"common":{"confirm":"확인","next":"다음","cancel":"취소","close":"닫기","start":"시작","end":"종료","remove":"삭제","search":"선택 항목 검색","noData":"데이터 없음","retry":"다시 시도","preview":"미리 보기","download":"다운로드","loading":"불러오는 중","searchAction":"검색"},"form":{"required":"이 항목을 입력해 주세요","invalid":"이 항목을 확인해 주세요","errorSummary":"다음 항목을 확인해 주세요"},"breadcrumb":{"label":"이동 경로"},"pagination":{"label":"페이지 탐색","previousPage":"이전 페이지","nextPage":"다음 페이지","page":"페이지","pageSize":"페이지당 항목 수","jumpTo":"이동할 페이지","pageBack":"5페이지 이전으로 이동","pageForward":"5페이지 다음으로 이동","pageLabel":"{page}페이지","pageSizeOption":"페이지당 {count}개","total":"총 {total}개"},"input":{"showPassword":"비밀번호 표시","hidePassword":"비밀번호 숨기기","clear":"입력 지우기"},"inputNumber":{"increase":"값 증가","decrease":"값 감소","invalid":"허용 범위 내의 유효한 숫자를 입력해 주세요"},"progress":{"label":"진행 상태"},"avatar":{"label":"아바타","moreMembers":"다른 멤버","showMore":"멤버 {count}명 더 보기"},"rate":{"label":"평점"},"result":{"success":"성공","warning":"확인이 필요합니다","error":"오류가 발생했습니다","info":"안내"},"colorPicker":{"label":"색상 선택","clear":"색상 지우기","saturation":"채도","brightness":"명도","hue":"색조","alpha":"불투명도","value":"색상 값","invalid":"유효한 색상을 입력해 주세요","presets":"기본 색상","gradient":"그라데이션","colorStop":"색상 정지점 {index}","addColorStop":"색상 정지점 추가","removeColorStop":"색상 정지점 삭제","color":"색상","position":"위치","colorStopPosition":"색상 정지점 위치","angle":"각도","gradientAngle":"그라데이션 각도"},"tree":{"label":"트리","expand":"펼치기","reorderInstructions":"스페이스 키로 항목을 선택하고 위아래 방향키로 이동할 대상을 고르세요. 좌우 방향키로 대상의 앞뒤를 지정하고 스페이스 키로 놓거나 Esc 키로 취소하세요.","moveNode":"{label} 노드 이동","expandNode":"{label} 펼치기","collapseNode":"{label} 접기"},"collapse":{"label":"접이식 패널"},"slider":{"label":"슬라이더"},"tabs":{"moreTabs":"다른 탭","scrollLeft":"탭을 왼쪽으로 스크롤","scrollRight":"탭을 오른쪽으로 스크롤","addTab":"탭 추가","reorder":"{label} 탭 순서 변경","closeLabel":"{label} 탭 닫기"},"backTop":{"backToTop":"맨 위로"},"button":{"moreActions":"추가 작업"},"carousel":{"carousel":"캐러셀","previousSlide":"이전 슬라이드","nextSlide":"다음 슬라이드","goTo":"{index}번째 슬라이드로 이동","slide":"슬라이드","role":"캐러셀"},"errorBoundary":{"title":"이 콘텐츠를 표시할 수 없습니다","description":"다시 시도하거나 잠시 후에 다시 방문해 주세요."},"fileList":{"fileType":"파일","uploading":"업로드 중","uploadFailed":"업로드 실패","cancelled":"취소됨","uploadComplete":"업로드 완료","ready":"준비됨","uploadProgress":"{name} 업로드 진행 상태","noFiles":"파일 없음","preview":"{name} 미리 보기","download":"{name} 다운로드","remove":"{name} 삭제"},"floatButton":{"quickActions":"빠른 작업"},"image":{"previewImage":"이미지 미리 보기{alt}","imageUnavailable":"이미지를 표시할 수 없습니다","imagePreview":"이미지 미리 보기","downloadImage":"이미지 다운로드","exitFullscreen":"전체 화면 종료","enterFullscreen":"전체 화면으로 보기","closePreview":"미리 보기 닫기","previousImage":"이전 이미지","nextImage":"다음 이미지","downloadFailedOpenTheOriginalImageToSaveIt":"다운로드에 실패했습니다. 원본 이미지를 열어 저장해 주세요.","openOriginal":"원본 열기","zoomOut":"축소","zoomLevel":"확대 비율","resetZoom":"확대/축소 초기화","zoomIn":"확대","showThumbnails":"썸네일 표시","scrollThumbnailsBackward":"이전 썸네일로 스크롤","imageList":"이미지 목록","scrollThumbnailsForward":"다음 썸네일로 스크롤","image":"이미지","position":"{total}개 중 {index}번째","viewImage":"{index}번째 이미지 보기{alt}","noImage":"이미지 없음","actualSize":"실제 크기 (1:1)","fitToWindow":"화면에 맞추기","rotateCounterclockwise":"시계 반대 방향으로 회전","rotateClockwise":"시계 방향으로 회전","resetImage":"이미지 초기화","flipHorizontal":"좌우 반전","flipVertical":"상하 반전"},"infiniteScroll":{"loadingFailedRetry":"불러오기 실패. 다시 시도","allItemsLoaded":"모든 항목을 불러왔습니다","loadMore":"더 불러오기"},"inputOTP":{"verificationCode":"인증 코드"},"layout":{"expandSidebar":"사이드바 펼치기","collapseSidebar":"사이드바 접기"},"loadingBar":{"pageLoadingProgress":"페이지 로딩 진행 상태"},"menu":{"navigationMenu":"탐색 메뉴"},"popconfirm":{"actionFailedPleaseRetry":"작업에 실패했습니다. 다시 시도해 주세요."},"qrCode":{"qrCode":"QR 코드","refreshCode":"코드 새로 고침"},"scrollbar":{"verticalScrollbar":"세로 스크롤바","horizontalScrollbar":"가로 스크롤바"},"splitter":{"resizePanel":"{index}번 패널 크기 조절","togglePanel":"패널 열기/닫기"},"table":{"table":"표","scrollArea":"스크롤 영역","loadError":"데이터를 불러올 수 없습니다. 다시 시도해 주세요."},"dataTable":{"resizeColumn":"{label} 열 너비 조절","selectRows":"행 선택","selectAllRowsOnThisPage":"이 페이지의 모든 행 선택","selectRow":"{label} 행 선택","collapseRow":"{label} 행 접기","expandRow":"{label} 행 펼치기","expandRows":"행 펼치기","expandDetails":"상세 펼치기","collapseDetails":"상세 접기","sortAscending":"오름차순 정렬","sortDescending":"내림차순 정렬","clearSorting":"정렬 해제"},"timeRangePicker":{"placeholder":"시작 시간 ~ 종료 시간","label":"시간 범위 선택","clear":"시간 범위 지우기"},"tour":{"previous":"이전","finish":"완료","next":"다음"},"transfer":{"selectAllVisibleItems":"표시된 항목 모두 선택","available":"선택 가능","selected":"선택됨","searchAvailableItems":"선택 가능한 항목 검색","searchSelectedItems":"선택된 항목 검색","noItems":"항목 없음","moveToSelected":"선택됨으로 이동","moveToAvailable":"선택 가능으로 이동"},"typography":{"editText":"텍스트 편집","collapse":"접기","expand":"펼치기","copyText":"텍스트 복사"},"upload":{"uploadUrlCannotBeEmpty":"업로드 URL을 입력해 주세요","uploadFailed":"업로드 실패","chooseOneFileAtATime":"파일을 한 번에 하나씩 선택해 주세요","fileTypeIsNotAccepted":"지원하지 않는 파일 형식입니다","fileExceedsTheSizeLimit":"파일 크기 제한을 초과했습니다","fileCountLimitReached":"파일 개수 제한에 도달했습니다","fileValidationFailed":"파일 유효성 검사 실패","chooseFiles":"파일 선택","dropHint":"클릭하거나 파일을 여기에 놓으세요","dropDescription":"파일을 선택하거나 이 영역으로 끌어오세요","cancelUpload":"{name} 업로드 취소","retryUpload":"{name} 업로드 다시 시도"},"treeSelect":{"placeholder":"선택해 주세요","clear":"선택 지우기","empty":"선택 항목 없음"},"drag":{"instructions":"스페이스 키로 시작하고 방향키로 이동하세요. 스페이스 키로 놓거나 Esc 키로 취소하세요.","pickedUp":"{label} 선택됨","moved":"{label}(으)로 이동","dropped":"{label} 놓음","cancelled":"순서 변경이 취소되었습니다","outside":"놓을 위치 없음"}};
|
|
1
|
+
export default {"select":{"placeholder":"선택해 주세요","empty":"선택 항목 없음","clear":"선택 지우기","create":"“{label}” 만들기"},"autoComplete":{"empty":"추천 항목 없음","suggestions":"{label} 추천 항목"},"datePicker":{"placeholder":"날짜 선택","clear":"날짜 지우기","label":"날짜 선택","selectDate":"날짜 선택","presets":"프리셋"},"timePicker":{"placeholder":"시간 선택","clear":"시간 지우기","label":"시간 선택","hours":"시","minutes":"분","seconds":"초","period":"오전/오후","am":"오전","pm":"오후","now":"현재 시간","selectTime":"시간 선택"},"dateTimePicker":{"placeholder":"날짜 및 시간 선택"},"dateRangePicker":{"placeholder":"날짜 범위 선택","clear":"범위 지우기"},"cascader":{"clear":"선택 지우기","level":"{level}단계","placeholder":"선택해 주세요","empty":"선택 항목 없음"},"calendar":{"previousMonth":"이전 달","nextMonth":"다음 달","previousYear":"이전 해","nextYear":"다음 해","previousYears":"이전 연도 범위","nextYears":"다음 연도 범위","weekdays":["월","화","수","목","금","토","일"],"year":"연도","month":"월","week":"주","today":"오늘","label":"달력"},"common":{"confirm":"확인","next":"다음","cancel":"취소","close":"닫기","start":"시작","end":"종료","remove":"삭제","search":"선택 항목 검색","noData":"데이터 없음","retry":"다시 시도","preview":"미리 보기","download":"다운로드","loading":"불러오는 중","searchAction":"검색"},"form":{"required":"이 항목을 입력해 주세요","invalid":"이 항목을 확인해 주세요","errorSummary":"다음 항목을 확인해 주세요"},"breadcrumb":{"label":"이동 경로"},"pagination":{"label":"페이지 탐색","previousPage":"이전 페이지","nextPage":"다음 페이지","page":"페이지","pageSize":"페이지당 항목 수","jumpTo":"이동할 페이지","pageBack":"5페이지 이전으로 이동","pageForward":"5페이지 다음으로 이동","pageLabel":"{page}페이지","pageSizeOption":"페이지당 {count}개","total":"총 {total}개"},"input":{"showPassword":"비밀번호 표시","hidePassword":"비밀번호 숨기기","clear":"입력 지우기"},"inputNumber":{"increase":"값 증가","decrease":"값 감소","invalid":"허용 범위 내의 유효한 숫자를 입력해 주세요"},"progress":{"label":"진행 상태"},"avatar":{"label":"아바타","moreMembers":"다른 멤버","showMore":"멤버 {count}명 더 보기"},"rate":{"label":"평점"},"result":{"success":"성공","warning":"확인이 필요합니다","error":"오류가 발생했습니다","info":"안내"},"colorPicker":{"label":"색상 선택","clear":"색상 지우기","saturation":"채도","brightness":"명도","hue":"색조","alpha":"불투명도","value":"색상 값","invalid":"유효한 색상을 입력해 주세요","presets":"기본 색상","gradient":"그라데이션","colorStop":"색상 정지점 {index}","addColorStop":"색상 정지점 추가","removeColorStop":"색상 정지점 삭제","color":"색상","position":"위치","colorStopPosition":"색상 정지점 위치","angle":"각도","gradientAngle":"그라데이션 각도"},"tree":{"label":"트리","expand":"펼치기","reorderInstructions":"스페이스 키로 항목을 선택하고 위아래 방향키로 이동할 대상을 고르세요. 좌우 방향키로 대상의 앞뒤를 지정하고 스페이스 키로 놓거나 Esc 키로 취소하세요.","moveNode":"{label} 노드 이동","expandNode":"{label} 펼치기","collapseNode":"{label} 접기"},"collapse":{"label":"접이식 패널"},"slider":{"label":"슬라이더"},"tabs":{"moreTabs":"다른 탭","scrollLeft":"탭을 왼쪽으로 스크롤","scrollRight":"탭을 오른쪽으로 스크롤","addTab":"탭 추가","reorder":"{label} 탭 순서 변경","closeLabel":"{label} 탭 닫기"},"backTop":{"backToTop":"맨 위로"},"button":{"moreActions":"추가 작업"},"carousel":{"carousel":"캐러셀","previousSlide":"이전 슬라이드","nextSlide":"다음 슬라이드","goTo":"{index}번째 슬라이드로 이동","slide":"슬라이드","role":"캐러셀"},"errorBoundary":{"title":"이 콘텐츠를 표시할 수 없습니다","description":"다시 시도하거나 잠시 후에 다시 방문해 주세요."},"fileList":{"fileType":"파일","uploading":"업로드 중","uploadFailed":"업로드 실패","cancelled":"취소됨","uploadComplete":"업로드 완료","ready":"준비됨","uploadProgress":"{name} 업로드 진행 상태","noFiles":"파일 없음","preview":"{name} 미리 보기","download":"{name} 다운로드","remove":"{name} 삭제"},"floatButton":{"quickActions":"빠른 작업"},"image":{"previewImage":"이미지 미리 보기{alt}","imageUnavailable":"이미지를 표시할 수 없습니다","imagePreview":"이미지 미리 보기","downloadImage":"이미지 다운로드","exitFullscreen":"전체 화면 종료","enterFullscreen":"전체 화면으로 보기","closePreview":"미리 보기 닫기","previousImage":"이전 이미지","nextImage":"다음 이미지","downloadFailedOpenTheOriginalImageToSaveIt":"다운로드에 실패했습니다. 원본 이미지를 열어 저장해 주세요.","openOriginal":"원본 열기","zoomOut":"축소","zoomLevel":"확대 비율","resetZoom":"확대/축소 초기화","zoomIn":"확대","showThumbnails":"썸네일 표시","scrollThumbnailsBackward":"이전 썸네일로 스크롤","imageList":"이미지 목록","scrollThumbnailsForward":"다음 썸네일로 스크롤","image":"이미지","position":"{total}개 중 {index}번째","viewImage":"{index}번째 이미지 보기{alt}","noImage":"이미지 없음","actualSize":"실제 크기 (1:1)","fitToWindow":"화면에 맞추기","rotateCounterclockwise":"시계 반대 방향으로 회전","rotateClockwise":"시계 방향으로 회전","resetImage":"이미지 초기화","flipHorizontal":"좌우 반전","flipVertical":"상하 반전"},"infiniteScroll":{"loadingFailedRetry":"불러오기 실패. 다시 시도","allItemsLoaded":"모든 항목을 불러왔습니다","loadMore":"더 불러오기"},"inputOTP":{"verificationCode":"인증 코드"},"layout":{"expandSidebar":"사이드바 펼치기","collapseSidebar":"사이드바 접기"},"loadingBar":{"pageLoadingProgress":"페이지 로딩 진행 상태"},"menu":{"navigationMenu":"탐색 메뉴"},"popconfirm":{"actionFailedPleaseRetry":"작업에 실패했습니다. 다시 시도해 주세요."},"qrCode":{"qrCode":"QR 코드","refreshCode":"코드 새로 고침"},"scrollbar":{"verticalScrollbar":"세로 스크롤바","horizontalScrollbar":"가로 스크롤바"},"splitter":{"resizePanel":"{index}번 패널 크기 조절","togglePanel":"패널 열기/닫기"},"table":{"table":"표","scrollArea":"스크롤 영역","loadError":"데이터를 불러올 수 없습니다. 다시 시도해 주세요."},"dataTable":{"resizeColumn":"{label} 열 너비 조절","selectRows":"행 선택","selectAllRowsOnThisPage":"이 페이지의 모든 행 선택","selectRow":"{label} 행 선택","collapseRow":"{label} 행 접기","expandRow":"{label} 행 펼치기","expandRows":"행 펼치기","expandDetails":"상세 펼치기","collapseDetails":"상세 접기","sortAscending":"오름차순 정렬","sortDescending":"내림차순 정렬","clearSorting":"정렬 해제"},"timeRangePicker":{"placeholder":"시작 시간 ~ 종료 시간","label":"시간 범위 선택","clear":"시간 범위 지우기"},"tour":{"previous":"이전","finish":"완료","next":"다음"},"transfer":{"selectAllVisibleItems":"표시된 항목 모두 선택","available":"선택 가능","selected":"선택됨","searchAvailableItems":"선택 가능한 항목 검색","searchSelectedItems":"선택된 항목 검색","noItems":"항목 없음","moveToSelected":"선택됨으로 이동","moveToAvailable":"선택 가능으로 이동"},"typography":{"editText":"텍스트 편집","collapse":"접기","expand":"펼치기","copyText":"텍스트 복사"},"upload":{"uploadUrlCannotBeEmpty":"업로드 URL을 입력해 주세요","uploadAvatar":"업로드","reuploadAvatar":"다시 업로드","uploadFailed":"업로드 실패","chooseOneFileAtATime":"파일을 한 번에 하나씩 선택해 주세요","fileTypeIsNotAccepted":"지원하지 않는 파일 형식입니다","fileExceedsTheSizeLimit":"파일 크기 제한을 초과했습니다","fileCountLimitReached":"파일 개수 제한에 도달했습니다","fileValidationFailed":"파일 유효성 검사 실패","chooseFiles":"파일 선택","dropHint":"클릭하거나 파일을 여기에 놓으세요","dropDescription":"파일을 선택하거나 이 영역으로 끌어오세요","cancelUpload":"{name} 업로드 취소","retryUpload":"{name} 업로드 다시 시도"},"treeSelect":{"placeholder":"선택해 주세요","clear":"선택 지우기","empty":"선택 항목 없음"},"drag":{"instructions":"스페이스 키로 시작하고 방향키로 이동하세요. 스페이스 키로 놓거나 Esc 키로 취소하세요.","pickedUp":"{label} 선택됨","moved":"{label}(으)로 이동","dropped":"{label} 놓음","cancelled":"순서 변경이 취소되었습니다","outside":"놓을 위치 없음"}};
|