@progress/kendo-react-upload 13.3.0 → 13.4.0-develop.1
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/ExternalDropZone.d.ts +91 -0
- package/ExternalDropZone.mjs +3 -3
- package/Upload.d.ts +162 -0
- package/UploadActionButtons.d.ts +33 -0
- package/UploadActionButtons.js +1 -1
- package/UploadActionButtons.mjs +9 -9
- package/UploadAddButton.d.ts +45 -0
- package/UploadAddButton.js +1 -1
- package/UploadAddButton.mjs +7 -8
- package/UploadDropZone.d.ts +43 -0
- package/UploadInput.d.ts +34 -0
- package/UploadInput.mjs +1 -1
- package/UploadList.d.ts +33 -0
- package/UploadListActionButton.d.ts +47 -0
- package/UploadListActionButton.js +1 -1
- package/UploadListActionButton.mjs +4 -6
- package/UploadListGroup.d.ts +35 -0
- package/UploadListMultiItem.d.ts +28 -0
- package/UploadListSingleItem.d.ts +35 -0
- package/UploadNavigation.d.ts +35 -0
- package/UploadStatus.d.ts +22 -0
- package/UploadUI.d.ts +111 -0
- package/UploadUI.mjs +3 -3
- package/dist/cdn/js/kendo-react-upload.js +1 -1
- package/index.d.mts +34 -1212
- package/index.d.ts +34 -1212
- package/interfaces/BaseUploadEvent.d.ts +16 -0
- package/interfaces/FileGroup.d.ts +14 -0
- package/interfaces/UploadActionsLayout.d.ts +11 -0
- package/interfaces/UploadAdditionalData.d.ts +13 -0
- package/interfaces/UploadAsyncProps.d.ts +89 -0
- package/interfaces/UploadFileInfo.d.ts +48 -0
- package/interfaces/UploadFileRestrictions.d.ts +26 -0
- package/interfaces/UploadFileStatus.d.ts +40 -0
- package/interfaces/UploadHttpHeaders.d.ts +13 -0
- package/interfaces/UploadListItemProps.d.ts +38 -0
- package/interfaces/UploadOnAddEvent.d.ts +23 -0
- package/interfaces/UploadOnBeforeRemoveEvent.d.ts +29 -0
- package/interfaces/UploadOnBeforeUploadEvent.d.ts +29 -0
- package/interfaces/UploadOnCancelEvent.d.ts +18 -0
- package/interfaces/UploadOnProgressEvent.d.ts +23 -0
- package/interfaces/UploadOnRemoveEvent.d.ts +28 -0
- package/interfaces/UploadOnStatusChangeEvent.d.ts +28 -0
- package/interfaces/UploadProps.d.ts +242 -0
- package/interfaces/UploadResponse.d.ts +32 -0
- package/interfaces/UploadSelectMessageProps.d.ts +16 -0
- package/messages/index.d.ts +122 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +6 -6
- package/utils/connectionUtils.d.ts +21 -0
- package/utils/stateUtils.d.ts +30 -0
- package/utils/utils.d.ts +21 -0
- package/utils/validationUtils.d.ts +11 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the properties of the [ExternalDropZone](https://www.telerik.com/kendo-react-ui/components/upload/api/externaldropzone) component.
|
|
11
|
+
*/
|
|
12
|
+
export interface ExternalDropZoneProps {
|
|
13
|
+
/**
|
|
14
|
+
* Sets the `id` property of the top div element of the ExternalDropZone.
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Sets additional CSS styles to the ExternalDropZone.
|
|
19
|
+
*/
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/**
|
|
22
|
+
* Sets additional classes to the ExternalDropZone.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the `tabIndex` attribute.
|
|
27
|
+
*/
|
|
28
|
+
tabIndex?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Represents the ref of the linked Upload.
|
|
31
|
+
*/
|
|
32
|
+
uploadRef: any;
|
|
33
|
+
/**
|
|
34
|
+
* Determines the disabled mode of the ExternalDropZone.
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Sets different hint node.
|
|
39
|
+
*/
|
|
40
|
+
customHint?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Sets different note node.
|
|
43
|
+
*/
|
|
44
|
+
customNote?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Triggered after a file is dropped into the ExternalDropZone area.
|
|
47
|
+
*/
|
|
48
|
+
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Triggered after a file is dragged inside the ExternalDropZone area.
|
|
51
|
+
*/
|
|
52
|
+
onElementDragEnter?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Triggered after a file dragging is over.
|
|
55
|
+
*/
|
|
56
|
+
onElementDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Represents the target(element and props) of the ExternalDropZoneEvent.
|
|
60
|
+
*/
|
|
61
|
+
export interface ExternalDropZoneHandle {
|
|
62
|
+
/**
|
|
63
|
+
* The current element or `null` if there is no one.
|
|
64
|
+
*/
|
|
65
|
+
element: HTMLDivElement | null;
|
|
66
|
+
/**
|
|
67
|
+
* The props value of the ExternalDropZone.
|
|
68
|
+
*/
|
|
69
|
+
props: ExternalDropZoneProps;
|
|
70
|
+
/**
|
|
71
|
+
* The focus event callback.
|
|
72
|
+
*/
|
|
73
|
+
focus: () => void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Represents the return type of the ExternalDropZone.
|
|
77
|
+
*/
|
|
78
|
+
export interface ExternalDropZoneEvent {
|
|
79
|
+
/**
|
|
80
|
+
* The target of the ExternalDropZoneEvent from ExternalDropZoneHandle.
|
|
81
|
+
*/
|
|
82
|
+
target: ExternalDropZoneHandle;
|
|
83
|
+
/**
|
|
84
|
+
* The event of the ExternalDropZoneEvent.
|
|
85
|
+
*/
|
|
86
|
+
syntheticEvent: React.SyntheticEvent<any>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Represents the ExternalDropZone component.
|
|
90
|
+
*/
|
|
91
|
+
export declare const ExternalDropZone: React.ForwardRefExoticComponent<ExternalDropZoneProps & React.RefAttributes<ExternalDropZoneHandle | null>>;
|
package/ExternalDropZone.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import a from "prop-types";
|
|
10
|
-
import { validatePackage as M, getLicenseMessage as A,
|
|
10
|
+
import { validatePackage as M, getLicenseMessage as A, getTabIndex as W, classNames as _, IconWrap as K, WatermarkOverlay as P } from "@progress/kendo-react-common";
|
|
11
11
|
import { uploadIcon as F } from "@progress/kendo-svg-icons";
|
|
12
12
|
import { IntlService as G, useLocalization as U } from "@progress/kendo-react-intl";
|
|
13
13
|
import { dropZoneHint as v, messages as m, dropZoneNote as p, restrictionsDropZoneNote as b } from "./messages/index.mjs";
|
|
@@ -64,7 +64,7 @@ const k = 100, R = e.forwardRef((n, O) => {
|
|
|
64
64
|
{
|
|
65
65
|
ref: l,
|
|
66
66
|
id: n.id,
|
|
67
|
-
className:
|
|
67
|
+
className: _(
|
|
68
68
|
"k-external-dropzone",
|
|
69
69
|
{
|
|
70
70
|
"k-external-dropzone-hover": z,
|
|
@@ -72,7 +72,7 @@ const k = 100, R = e.forwardRef((n, O) => {
|
|
|
72
72
|
},
|
|
73
73
|
n.className
|
|
74
74
|
),
|
|
75
|
-
tabIndex:
|
|
75
|
+
tabIndex: W(n.tabIndex, n.disabled, void 0),
|
|
76
76
|
onDrop: L,
|
|
77
77
|
onDragEnter: S,
|
|
78
78
|
onDragOver: H
|
package/Upload.d.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as PropTypes } from 'prop-types';
|
|
9
|
+
import { GroupedFiles } from './interfaces/FileGroup.js';
|
|
10
|
+
import { UploadFileInfo } from './interfaces/UploadFileInfo.js';
|
|
11
|
+
import { UploadFileStatus } from './interfaces/UploadFileStatus.js';
|
|
12
|
+
import { AxiosResponse, AxiosProgressEvent } from 'axios';
|
|
13
|
+
import { UploadProps } from './interfaces/UploadProps.js';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
interface UploadState {
|
|
19
|
+
files: Array<UploadFileInfo>;
|
|
20
|
+
}
|
|
21
|
+
export declare class Upload extends React.Component<UploadProps, UploadState> {
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
static defaultProps: UploadProps;
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
static propTypes: {
|
|
30
|
+
autoUpload: PropTypes.Requireable<boolean>;
|
|
31
|
+
batch: PropTypes.Requireable<boolean>;
|
|
32
|
+
withCredentials: PropTypes.Requireable<boolean>;
|
|
33
|
+
saveField: PropTypes.Requireable<string>;
|
|
34
|
+
saveHeaders: PropTypes.Requireable<object>;
|
|
35
|
+
saveMethod: PropTypes.Requireable<string>;
|
|
36
|
+
saveUrl: PropTypes.Requireable<NonNullable<string | ((...args: any[]) => any) | null | undefined>>;
|
|
37
|
+
responseType: PropTypes.Requireable<string>;
|
|
38
|
+
removeField: PropTypes.Requireable<string>;
|
|
39
|
+
removeHeaders: PropTypes.Requireable<object>;
|
|
40
|
+
removeMethod: PropTypes.Requireable<string>;
|
|
41
|
+
removeUrl: PropTypes.Requireable<NonNullable<string | ((...args: any[]) => any) | null | undefined>>;
|
|
42
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
43
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
44
|
+
showFileList: PropTypes.Requireable<boolean>;
|
|
45
|
+
showActionButtons: PropTypes.Requireable<boolean>;
|
|
46
|
+
actionsLayout: PropTypes.Requireable<string>;
|
|
47
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
48
|
+
accept: PropTypes.Requireable<string>;
|
|
49
|
+
listItemUI: PropTypes.Requireable<NonNullable<string | ((...args: any[]) => any) | PropTypes.InferProps<{
|
|
50
|
+
render: PropTypes.Validator<(...args: any[]) => any>;
|
|
51
|
+
}> | null | undefined>>;
|
|
52
|
+
restrictions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
53
|
+
allowedExtensions: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
54
|
+
maxFileSize: PropTypes.Requireable<number>;
|
|
55
|
+
minFileSize: PropTypes.Requireable<number>;
|
|
56
|
+
}>>;
|
|
57
|
+
files: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
58
|
+
uid: PropTypes.Requireable<string>;
|
|
59
|
+
name: PropTypes.Requireable<string>;
|
|
60
|
+
extension: PropTypes.Requireable<string>;
|
|
61
|
+
size: PropTypes.Requireable<number>;
|
|
62
|
+
validationErrors: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
63
|
+
status: PropTypes.Requireable<UploadFileStatus>;
|
|
64
|
+
progress: PropTypes.Requireable<number>;
|
|
65
|
+
getRawFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
|
+
}> | null | undefined)[]>;
|
|
67
|
+
defaultFiles: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
68
|
+
uid: PropTypes.Requireable<string>;
|
|
69
|
+
name: PropTypes.Requireable<string>;
|
|
70
|
+
extension: PropTypes.Requireable<string>;
|
|
71
|
+
size: PropTypes.Requireable<number>;
|
|
72
|
+
validationErrors: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
73
|
+
status: PropTypes.Requireable<UploadFileStatus>;
|
|
74
|
+
progress: PropTypes.Requireable<number>;
|
|
75
|
+
getRawFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
+
}> | null | undefined)[]>;
|
|
77
|
+
};
|
|
78
|
+
private _httpSubscriptions;
|
|
79
|
+
private get async();
|
|
80
|
+
private _uploadNavigation;
|
|
81
|
+
private get files();
|
|
82
|
+
private get isControlled();
|
|
83
|
+
private get isCustomSave();
|
|
84
|
+
private get isCustomRemove();
|
|
85
|
+
private get fileStateCopy();
|
|
86
|
+
private readonly showLicenseWatermark;
|
|
87
|
+
private readonly licenseMessage?;
|
|
88
|
+
constructor(props: UploadProps);
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
get actionElement(): HTMLInputElement | null | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* @hidden
|
|
95
|
+
*/
|
|
96
|
+
focus: () => void;
|
|
97
|
+
/**
|
|
98
|
+
* Upload the selected files. Usable when the upload action is triggered by external code.
|
|
99
|
+
*/
|
|
100
|
+
triggerUpload: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
*/
|
|
104
|
+
uploadFiles: (filesForUpload: GroupedFiles) => void;
|
|
105
|
+
/**
|
|
106
|
+
* @hidden
|
|
107
|
+
*/
|
|
108
|
+
removeFiles: (filesForRemove: GroupedFiles) => void;
|
|
109
|
+
/**
|
|
110
|
+
* @hidden
|
|
111
|
+
*/
|
|
112
|
+
onUpload: () => void;
|
|
113
|
+
/**
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
onAdd: (files: FileList) => void;
|
|
117
|
+
/**
|
|
118
|
+
* @hidden
|
|
119
|
+
*/
|
|
120
|
+
setFilesProgress(filesWithProgress: UploadFileInfo[], percentComplete: number): void;
|
|
121
|
+
/**
|
|
122
|
+
* @hidden
|
|
123
|
+
*/
|
|
124
|
+
onUploadProgress: (uid: string, event: ProgressEvent | AxiosProgressEvent) => void;
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
onUploadSuccess: (uid: string, event?: AxiosResponse) => void;
|
|
129
|
+
/**
|
|
130
|
+
* @hidden
|
|
131
|
+
*/
|
|
132
|
+
onUploadError: (uid: string, event?: AxiosResponse) => void;
|
|
133
|
+
/**
|
|
134
|
+
* @hidden
|
|
135
|
+
*/
|
|
136
|
+
onRemove: (uid: string) => void;
|
|
137
|
+
/**
|
|
138
|
+
* @hidden
|
|
139
|
+
*/
|
|
140
|
+
onRemoveSuccess: (uid: string, event?: AxiosResponse) => void;
|
|
141
|
+
/**
|
|
142
|
+
* @hidden
|
|
143
|
+
*/
|
|
144
|
+
onRemoveError: (uid: string, event?: AxiosResponse) => void;
|
|
145
|
+
/**
|
|
146
|
+
* @hidden
|
|
147
|
+
*/
|
|
148
|
+
onRetry: (uid: string) => void;
|
|
149
|
+
/**
|
|
150
|
+
* @hidden
|
|
151
|
+
*/
|
|
152
|
+
onCancel: (uid: string) => void;
|
|
153
|
+
/**
|
|
154
|
+
* @hidden
|
|
155
|
+
*/
|
|
156
|
+
onClear: () => void;
|
|
157
|
+
/**
|
|
158
|
+
* @hidden
|
|
159
|
+
*/
|
|
160
|
+
render(): React.JSX.Element;
|
|
161
|
+
}
|
|
162
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface UploadActionButtonsProps {
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
navigationIndex?: number;
|
|
15
|
+
clearButtonIndex: number;
|
|
16
|
+
uploadButtonIndex: number;
|
|
17
|
+
actionsLayout: string;
|
|
18
|
+
onUpload: () => void;
|
|
19
|
+
onClear: () => void;
|
|
20
|
+
onClick: (navIndex: number | undefined) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export declare class UploadActionButtons extends React.Component<UploadActionButtonsProps, {}> {
|
|
26
|
+
private _uploadElement;
|
|
27
|
+
private _clearElement;
|
|
28
|
+
componentDidUpdate(prevProps: UploadActionButtonsProps): void;
|
|
29
|
+
onClearClick: () => void;
|
|
30
|
+
checkEnterKey: (e: React.KeyboardEvent) => boolean;
|
|
31
|
+
onUploadClick: () => void;
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
}
|
package/UploadActionButtons.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),i=require("@progress/kendo-react-common"),u=require("@progress/kendo-react-intl"),a=require("./messages/index.js");function f(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const c=f(b);class p extends c.Component{constructor(){super(...arguments),this._uploadElement=null,this._clearElement=null,this.onClearClick=()=>{this.props.disabled||this.props.onClear&&this.props.onClear.call(void 0)},this.checkEnterKey=t=>t.keyCode===i.Keys.enter,this.onUploadClick=()=>{this.props.disabled||(this.props.onClick.call(void 0,this.props.uploadButtonIndex),this.props.onUpload&&this.props.onUpload.call(void 0))}}componentDidUpdate(t){const{navigationIndex:e,clearButtonIndex:s,uploadButtonIndex:r}=this.props;e!==t.navigationIndex&&(e===s&&this._clearElement&&this._clearElement.focus(),e===r&&this._uploadElement&&this._uploadElement.focus())}render(){const{disabled:t,navigationIndex:e,clearButtonIndex:s,uploadButtonIndex:r,actionsLayout:l}=this.props,d=u.provideLocalizationService(this),k=i.classNames("k-actions","k-hstack",{"k-justify-content-start":l==="start","k-justify-content-center":l==="center","k-justify-content-end":l==="end","k-justify-content-stretch":l==="stretched"}),m=i.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),i=require("@progress/kendo-react-common"),u=require("@progress/kendo-react-intl"),a=require("./messages/index.js");function f(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const c=f(b);class p extends c.Component{constructor(){super(...arguments),this._uploadElement=null,this._clearElement=null,this.onClearClick=()=>{this.props.disabled||this.props.onClear&&this.props.onClear.call(void 0)},this.checkEnterKey=t=>t.keyCode===i.Keys.enter,this.onUploadClick=()=>{this.props.disabled||(this.props.onClick.call(void 0,this.props.uploadButtonIndex),this.props.onUpload&&this.props.onUpload.call(void 0))}}componentDidUpdate(t){const{navigationIndex:e,clearButtonIndex:s,uploadButtonIndex:r}=this.props;e!==t.navigationIndex&&(e===s&&this._clearElement&&this._clearElement.focus(),e===r&&this._uploadElement&&this._uploadElement.focus())}render(){const{disabled:t,navigationIndex:e,clearButtonIndex:s,uploadButtonIndex:r,actionsLayout:l}=this.props,d=u.provideLocalizationService(this),k=i.classNames("k-actions","k-hstack",{"k-justify-content-start":l==="start","k-justify-content-center":l==="center","k-justify-content-end":l==="end","k-justify-content-stretch":l==="stretched"}),m=i.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-base","k-clear-selected",t?"k-disabled":"",e===s?"k-focus":""),h=i.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-primary","k-primary","k-upload-selected",t?"k-disabled":"",e===r?"k-focus":"");return c.createElement("div",{className:k},c.createElement("button",{ref:n=>{this._clearElement=n},type:"button",className:m,tabIndex:0,onClick:this.onClearClick,onKeyDown:n=>this.checkEnterKey(n)&&this.onClearClick()},d.toLanguageString(a.clearSelectedFiles,a.messages[a.clearSelectedFiles])),c.createElement("button",{ref:n=>{this._uploadElement=n},type:"button",className:h,tabIndex:0,onClick:this.onUploadClick,onKeyDown:n=>this.checkEnterKey(n)&&this.onUploadClick()},d.toLanguageString(a.uploadSelectedFiles,a.messages[a.uploadSelectedFiles])))}}u.registerForLocalization(p);exports.UploadActionButtons=p;
|
package/UploadActionButtons.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as s from "react";
|
|
9
|
-
import { Keys as m, classNames as
|
|
9
|
+
import { Keys as m, classNames as l } from "@progress/kendo-react-common";
|
|
10
10
|
import { provideLocalizationService as f, registerForLocalization as b } from "@progress/kendo-react-intl";
|
|
11
11
|
import { clearSelectedFiles as c, messages as d, uploadSelectedFiles as p } from "./messages/index.mjs";
|
|
12
12
|
class C extends s.Component {
|
|
@@ -18,26 +18,26 @@ class C extends s.Component {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
componentDidUpdate(e) {
|
|
21
|
-
const { navigationIndex: o, clearButtonIndex: i, uploadButtonIndex:
|
|
22
|
-
o !== e.navigationIndex && (o === i && this._clearElement && this._clearElement.focus(), o ===
|
|
21
|
+
const { navigationIndex: o, clearButtonIndex: i, uploadButtonIndex: a } = this.props;
|
|
22
|
+
o !== e.navigationIndex && (o === i && this._clearElement && this._clearElement.focus(), o === a && this._uploadElement && this._uploadElement.focus());
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
const { disabled: e, navigationIndex: o, clearButtonIndex: i, uploadButtonIndex:
|
|
25
|
+
const { disabled: e, navigationIndex: o, clearButtonIndex: i, uploadButtonIndex: a, actionsLayout: n } = this.props, r = f(this), u = l("k-actions", "k-hstack", {
|
|
26
26
|
"k-justify-content-start": n === "start",
|
|
27
27
|
"k-justify-content-center": n === "center",
|
|
28
28
|
"k-justify-content-end": n === "end",
|
|
29
29
|
"k-justify-content-stretch": n === "stretched"
|
|
30
|
-
}), k =
|
|
31
|
-
"k-button k-button-md k-rounded-md k-button-solid k-button-
|
|
30
|
+
}), k = l(
|
|
31
|
+
"k-button k-button-md k-rounded-md k-button-solid k-button-base",
|
|
32
32
|
"k-clear-selected",
|
|
33
33
|
e ? "k-disabled" : "",
|
|
34
34
|
o === i ? "k-focus" : ""
|
|
35
|
-
), h =
|
|
36
|
-
"k-button k-button-md k-rounded-md k-button-solid k-button-
|
|
35
|
+
), h = l(
|
|
36
|
+
"k-button k-button-md k-rounded-md k-button-solid k-button-primary",
|
|
37
37
|
"k-primary",
|
|
38
38
|
"k-upload-selected",
|
|
39
39
|
e ? "k-disabled" : "",
|
|
40
|
-
o ===
|
|
40
|
+
o === a ? "k-focus" : ""
|
|
41
41
|
);
|
|
42
42
|
return /* @__PURE__ */ s.createElement("div", { className: u }, /* @__PURE__ */ s.createElement(
|
|
43
43
|
"button",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { UploadAsyncProps } from './interfaces/UploadAsyncProps.js';
|
|
9
|
+
import { UploadSelectMessageProps } from './interfaces/UploadSelectMessageProps.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface UploadAddButtonProps {
|
|
15
|
+
addButtonIndex: number;
|
|
16
|
+
navigationIndex: number | undefined;
|
|
17
|
+
notFocusedIndex: number | undefined;
|
|
18
|
+
tabIndex?: number;
|
|
19
|
+
async: UploadAsyncProps;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
accept?: string;
|
|
23
|
+
id?: string;
|
|
24
|
+
ariaLabelledBy?: string;
|
|
25
|
+
ariaDescribedBy?: string;
|
|
26
|
+
ariaControls?: string;
|
|
27
|
+
ariaExpanded?: boolean;
|
|
28
|
+
hasFiles?: boolean;
|
|
29
|
+
onAdd: (files: FileList) => void;
|
|
30
|
+
onClick: (navIndex: number | undefined) => void;
|
|
31
|
+
selectMessageUI?: React.ComponentType<UploadSelectMessageProps>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export declare class UploadAddButton extends React.Component<UploadAddButtonProps, {}> {
|
|
37
|
+
private _element;
|
|
38
|
+
private _uploadInput;
|
|
39
|
+
get actionElement(): HTMLInputElement | null | undefined;
|
|
40
|
+
componentDidUpdate(prevProps: UploadAddButtonProps): void;
|
|
41
|
+
focus: () => void;
|
|
42
|
+
onClick: () => void;
|
|
43
|
+
onInputMouseDown: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
|
+
}
|
package/UploadAddButton.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),b=require("@progress/kendo-react-common"),r=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-buttons"),i=require("./messages/index.js"),x=require("./UploadInput.js");function k(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const a=k(I),v=n=>a.createElement("span",{"aria-hidden":!0},n.message);class u extends a.Component{constructor(){super(...arguments),this._element=null,this._uploadInput=null,this.focus=()=>{this._element&&this._element.focus()},this.onClick=()=>{this.actionElement&&this.actionElement.click(),this.props.onClick.call(void 0,this.props.addButtonIndex)},this.onInputMouseDown=e=>{this._element&&(e.preventDefault(),this._element.focus())}}get actionElement(){if(this._uploadInput)return this._uploadInput.actionElement}componentDidUpdate(e){const{navigationIndex:t,addButtonIndex:o,notFocusedIndex:s}=this.props;t!==e.navigationIndex&&e.navigationIndex!==s&&t===o&&this._element&&this._element.focus()}render(){const{navigationIndex:e,addButtonIndex:t,tabIndex:o,id:s,ariaControls:d,disabled:p,ariaExpanded:m,selectMessageUI:l,...
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),b=require("@progress/kendo-react-common"),r=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-buttons"),i=require("./messages/index.js"),x=require("./UploadInput.js");function k(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const a=k(I),v=n=>a.createElement("span",{"aria-hidden":!0},n.message);class u extends a.Component{constructor(){super(...arguments),this._element=null,this._uploadInput=null,this.focus=()=>{this._element&&this._element.focus()},this.onClick=()=>{this.actionElement&&this.actionElement.click(),this.props.onClick.call(void 0,this.props.addButtonIndex)},this.onInputMouseDown=e=>{this._element&&(e.preventDefault(),this._element.focus())}}get actionElement(){if(this._uploadInput)return this._uploadInput.actionElement}componentDidUpdate(e){const{navigationIndex:t,addButtonIndex:o,notFocusedIndex:s}=this.props;t!==e.navigationIndex&&e.navigationIndex!==s&&t===o&&this._element&&this._element.focus()}render(){const{navigationIndex:e,addButtonIndex:t,tabIndex:o,id:s,ariaControls:d,disabled:p,ariaExpanded:m,selectMessageUI:l,...f}=this.props,c=r.provideLocalizationService(this).toLanguageString(i.select,i.messages[i.select]),h=l||v;return a.createElement("div",{className:"k-upload-button-wrap"},a.createElement(_.Button,{type:"button",id:s?`${s}-select-button`:"select-button",className:b.classNames("k-upload-button",e===t?"k-focus":""),tabIndex:o,onClick:this.onClick,"aria-label":c,"aria-controls":d,"aria-disabled":p,"aria-expanded":m},a.createElement(h,{message:c})),a.createElement(x.UploadInput,{id:s?`${s}-files`:"files",...f,onMouseDown:this.onInputMouseDown,ref:g=>{this._uploadInput=g}}))}}r.registerForLocalization(u);exports.UploadAddButton=u;
|
package/UploadAddButton.mjs
CHANGED
|
@@ -10,9 +10,9 @@ import { classNames as f } from "@progress/kendo-react-common";
|
|
|
10
10
|
import { provideLocalizationService as I, registerForLocalization as g } from "@progress/kendo-react-intl";
|
|
11
11
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
12
12
|
import { select as r, messages as _ } from "./messages/index.mjs";
|
|
13
|
-
import { UploadInput as
|
|
14
|
-
const
|
|
15
|
-
class
|
|
13
|
+
import { UploadInput as v } from "./UploadInput.mjs";
|
|
14
|
+
const E = (i) => /* @__PURE__ */ n.createElement("span", { "aria-hidden": !0 }, i.message);
|
|
15
|
+
class b extends n.Component {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this._element = null, this._uploadInput = null, this.focus = () => {
|
|
18
18
|
this._element && this._element.focus();
|
|
@@ -41,14 +41,13 @@ class E extends n.Component {
|
|
|
41
41
|
ariaExpanded: u,
|
|
42
42
|
selectMessageUI: a,
|
|
43
43
|
...p
|
|
44
|
-
} = this.props, l = I(this).toLanguageString(r, _[r]), m = a ||
|
|
44
|
+
} = this.props, l = I(this).toLanguageString(r, _[r]), m = a || E;
|
|
45
45
|
return /* @__PURE__ */ n.createElement("div", { className: "k-upload-button-wrap" }, /* @__PURE__ */ n.createElement(
|
|
46
46
|
x,
|
|
47
47
|
{
|
|
48
48
|
type: "button",
|
|
49
49
|
id: t ? `${t}-select-button` : "select-button",
|
|
50
50
|
className: f("k-upload-button", e === o ? "k-focus" : ""),
|
|
51
|
-
themeColor: "base",
|
|
52
51
|
tabIndex: s,
|
|
53
52
|
onClick: this.onClick,
|
|
54
53
|
"aria-label": l,
|
|
@@ -58,7 +57,7 @@ class E extends n.Component {
|
|
|
58
57
|
},
|
|
59
58
|
/* @__PURE__ */ n.createElement(m, { message: l })
|
|
60
59
|
), /* @__PURE__ */ n.createElement(
|
|
61
|
-
|
|
60
|
+
v,
|
|
62
61
|
{
|
|
63
62
|
id: t ? `${t}-files` : "files",
|
|
64
63
|
...p,
|
|
@@ -70,7 +69,7 @@ class E extends n.Component {
|
|
|
70
69
|
));
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
|
-
g(
|
|
72
|
+
g(b);
|
|
74
73
|
export {
|
|
75
|
-
|
|
74
|
+
b as UploadAddButton
|
|
76
75
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { GroupedFiles } from './interfaces/FileGroup.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface UploadDropZoneProps {
|
|
14
|
+
addButtonComponent: any;
|
|
15
|
+
fileGroup: GroupedFiles;
|
|
16
|
+
disabled: boolean | undefined;
|
|
17
|
+
multiple: boolean;
|
|
18
|
+
onAdd: (files: FileList) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare class UploadDropZone extends React.Component<UploadDropZoneProps, {}> {
|
|
24
|
+
private _documentInterval;
|
|
25
|
+
private _elementInterval;
|
|
26
|
+
private _lastDocumentDragOver;
|
|
27
|
+
private _lastElementDragOver;
|
|
28
|
+
private _documentActive;
|
|
29
|
+
private _elementActive;
|
|
30
|
+
private get documentActive();
|
|
31
|
+
private set documentActive(value);
|
|
32
|
+
private get elementActive();
|
|
33
|
+
private set elementActive(value);
|
|
34
|
+
componentDidMount(): void;
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
onDocumentDragEnter: () => void;
|
|
37
|
+
onDocumentDragOver: () => void;
|
|
38
|
+
onElementDragEnter: () => void;
|
|
39
|
+
onElementDragOver: (event: any) => void;
|
|
40
|
+
onDrop: (event: any) => void;
|
|
41
|
+
isDragOver: (prevDate: Date | null) => boolean;
|
|
42
|
+
render(): React.JSX.Element;
|
|
43
|
+
}
|
package/UploadInput.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { UploadAsyncProps } from './interfaces/UploadAsyncProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface UploadInputProps {
|
|
14
|
+
async: UploadAsyncProps;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
accept?: string;
|
|
18
|
+
hasFiles?: boolean;
|
|
19
|
+
ariaLabelledBy?: string;
|
|
20
|
+
ariaDescribedBy?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
onAdd?: (files: FileList) => void;
|
|
23
|
+
onMouseDown?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export declare class UploadInput extends React.Component<UploadInputProps, {}> {
|
|
29
|
+
private _input;
|
|
30
|
+
get actionElement(): HTMLInputElement | null;
|
|
31
|
+
onMouseDown: (e: any) => void;
|
|
32
|
+
onAdd: () => void;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
}
|
package/UploadInput.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { provideLocalizationService as f, registerForLocalization as b } from "@progress/kendo-react-intl";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { selectTitle as v, selectNoFilesTitle as w, messages as a, select as r } from "./messages/index.mjs";
|
|
11
11
|
const y = /(chrome)[ \/]([\w.]+)/i, A = /(webkit)[ \/]([\w.]+)/i;
|
|
12
12
|
class E extends n.Component {
|
|
13
13
|
constructor() {
|
package/UploadList.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { GroupedFiles } from './interfaces/FileGroup.js';
|
|
9
|
+
import { UploadAsyncProps } from './interfaces/UploadAsyncProps.js';
|
|
10
|
+
import { UploadListItemProps } from './interfaces/UploadListItemProps.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export interface UploadListProps {
|
|
16
|
+
groupedFiles: GroupedFiles;
|
|
17
|
+
async: UploadAsyncProps;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
navigationIndex?: number;
|
|
20
|
+
listId?: string;
|
|
21
|
+
listItemUI?: React.ComponentType<UploadListItemProps>;
|
|
22
|
+
onCancel: (uid: string) => void;
|
|
23
|
+
onRemove: (uid: string) => void;
|
|
24
|
+
onRetry: (uid: string) => void;
|
|
25
|
+
onClick: (navIndex: number | undefined) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export declare class UploadList extends React.Component<UploadListProps, {}> {
|
|
31
|
+
mapListGroups(): React.JSX.Element[];
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { UploadFileStatus } from './interfaces/UploadFileStatus.js';
|
|
9
|
+
import { UploadAsyncProps } from './interfaces/UploadAsyncProps.js';
|
|
10
|
+
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export interface UploadListActionButtonProps {
|
|
16
|
+
progress: number;
|
|
17
|
+
uid: string;
|
|
18
|
+
status: UploadFileStatus;
|
|
19
|
+
async: UploadAsyncProps;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
onCancel: (uid: string) => void;
|
|
22
|
+
onRemove: (uid: string) => void;
|
|
23
|
+
onRetry: (uid: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export interface UploadListActionButtonState {
|
|
29
|
+
retryFocused: boolean;
|
|
30
|
+
actionFocused: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare class UploadListActionButton extends React.Component<UploadListActionButtonProps, UploadListActionButtonState> {
|
|
36
|
+
constructor(props: UploadListActionButtonProps);
|
|
37
|
+
actionButtonTitle(status: UploadFileStatus, localizationService: LocalizationService): string;
|
|
38
|
+
retryButtonTitle(localizationService: LocalizationService): string;
|
|
39
|
+
buttonClassNames: (type: string) => string;
|
|
40
|
+
onRetryFocus: () => void;
|
|
41
|
+
onRetryBlur: () => void;
|
|
42
|
+
onActionFocus: () => void;
|
|
43
|
+
onActionBlur: () => void;
|
|
44
|
+
onActionClick: () => void;
|
|
45
|
+
onRetryClick: () => void;
|
|
46
|
+
render(): React.JSX.Element;
|
|
47
|
+
}
|