@progress/kendo-react-upload 13.2.1-develop.1 → 13.3.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.js +1 -1
- package/ExternalDropZone.mjs +1 -1
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/Upload.js +1 -1
- package/Upload.mjs +1 -1
- package/UploadActionButtons.js +1 -1
- package/UploadActionButtons.mjs +1 -1
- package/UploadAddButton.js +1 -1
- package/UploadAddButton.mjs +1 -1
- package/UploadDropZone.js +1 -1
- package/UploadDropZone.mjs +1 -1
- package/UploadInput.js +1 -1
- package/UploadInput.mjs +1 -1
- package/UploadList.js +1 -1
- package/UploadList.mjs +1 -1
- package/UploadListActionButton.js +1 -1
- package/UploadListActionButton.mjs +1 -1
- package/UploadListGroup.js +1 -1
- package/UploadListGroup.mjs +1 -1
- package/UploadListMultiItem.js +1 -1
- package/UploadListMultiItem.mjs +1 -1
- package/UploadListSingleItem.js +1 -1
- package/UploadListSingleItem.mjs +1 -1
- package/UploadNavigation.js +1 -1
- package/UploadNavigation.mjs +1 -1
- package/UploadStatus.js +1 -1
- package/UploadStatus.mjs +1 -1
- package/UploadUI.js +1 -1
- package/UploadUI.mjs +1 -1
- package/dist/cdn/js/kendo-react-upload.js +3 -3
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/interfaces/UploadFileStatus.js +1 -1
- package/interfaces/UploadFileStatus.mjs +1 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +1 -1
- package/package-metadata.js +2 -2
- package/package-metadata.mjs +3 -3
- package/package.json +6 -6
- package/utils/connectionUtils.js +1 -1
- package/utils/connectionUtils.mjs +1 -1
- package/utils/stateUtils.js +1 -1
- package/utils/stateUtils.mjs +1 -1
- package/utils/utils.js +1 -1
- package/utils/utils.mjs +1 -1
- package/utils/validationUtils.js +1 -1
- package/utils/validationUtils.mjs +1 -1
package/ExternalDropZone.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/ExternalDropZone.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/LICENSE.md
CHANGED
|
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**End User Lic
|
|
|
8
8
|
|
|
9
9
|
All available KendoReact commercial licenses may be obtained at the [KendoReact website](https://www.telerik.com/kendo-react-ui/pricing).
|
|
10
10
|
|
|
11
|
-
*Copyright ©
|
|
11
|
+
*Copyright © 2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
package/README.md
CHANGED
|
@@ -73,6 +73,6 @@ High-level component overview pages
|
|
|
73
73
|
- [React External Drop Zone Component](https://www.telerik.com/kendo-react-ui/external-drop-zone)
|
|
74
74
|
- [React Upload Component](https://www.telerik.com/kendo-react-ui/upload)
|
|
75
75
|
|
|
76
|
-
_Copyright ©
|
|
76
|
+
_Copyright © 2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
77
77
|
|
|
78
78
|
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
package/Upload.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/Upload.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadActionButtons.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadActionButtons.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadAddButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadAddButton.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadDropZone.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadDropZone.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadInput.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadList.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadList.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListGroup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListGroup.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListMultiItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListMultiItem.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListSingleItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadListSingleItem.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadNavigation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadNavigation.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadStatus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadStatus.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadUI.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/UploadUI.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
*-------------------------------------------------------------------------------------------
|
|
11
|
-
* Copyright ©
|
|
11
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-progressbars"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("prop-types"),require("axios")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-progressbars","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-svg-icons","prop-types","axios"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactUpload={},e.React,e.KendoReactCommon,e.KendoReactProgressbars,e.KendoReactIntl,e.KendoReactButtons,e.KendoSvgIcons,e.PropTypes,e.axios)}(this,(function(e,t,s,o,n,i,a,l,r){"use strict";function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var c=d(t),p=(e=>(e[e.UploadFailed=0]="UploadFailed",e[e.Initial=1]="Initial",e[e.Selected=2]="Selected",e[e.Uploading=3]="Uploading",e[e.Uploaded=4]="Uploaded",e[e.RemoveFailed=5]="RemoveFailed",e[e.Removing=6]="Removing",e))(p||{});const u="upload.cancel",h="upload.clearSelectedFiles",m="upload.dropFilesHere",g="upload.headerStatusUploaded",v="upload.headerStatusUploading",f="upload.invalidMaxFileSize",y="upload.remove",E="upload.retry",k="upload.select",b="upload.selectTitle",F="upload.selectNoFilesTitle",C="upload.uploadSelectedFiles",U="upload.total",I="upload.files",S="upload.statusUploaded",x="upload.statusUploadFailed",D="upload.dropZoneHint",R="upload.defaultDropZoneNote",w="upload.dropZoneNote",_={[u]:"Cancel",[h]:"Clear",[m]:"Drop files here to upload",[g]:"Done",[v]:"Uploading...","upload.invalidFileExtension":"File type not allowed.","upload.invalidFiles":"Invalid file(s). Please check file upload requirements.",[f]:"File size too large.","upload.invalidMinFileSize":"File size too small.",[y]:"Remove",[E]:"Retry",[k]:"Select files...",[b]:"Press to select more files",[F]:"No files selected",[C]:"Upload",[U]:"Total",[I]:"files",[S]:"File(s) successfully uploaded.",[x]:"File(s) failed to upload.",[D]:"Drag and drop files here to upload.",[R]:"",[w]:"Only {0} files are allowed."},N=/&/g,B=/</g,A=/"/g,O=/'/g,L=/>/g,z=e=>(""+e).replace(N,"&").replace(B,"<").replace(L,">").replace(A,""").replace(O,"'"),T=e=>{const t=e.match(/\.([^\.]+)$/);return t?t[0]:""},M=e=>{const t=e.name,s=e.size;return{extension:T(t),name:z(t),getRawFile:()=>e,size:s,status:p.Selected,progress:0,uid:""}},K=e=>!!(e.validationErrors&&e.validationErrors.length>0),j={fileHasValidationErrors:K,filesHaveValidationErrors:e=>{for(const t of e)if(K(t))return!0;return!1},getTotalFilesSizeMessage:e=>{let t,s=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(s+=e[t].size||0);return s/=1024,s<1024?s.toFixed(2)+" KB":(s/1024).toFixed(2)+" MB"},getAllFileInfo:e=>{const t=new Array;let s;for(s=0;s<e.length;s++)t.push(M(e[s]));return t},getFileInfo:M,getFileExtension:T,htmlEncode:z,assignGuidToFiles:(e,t)=>{const o=s.guid();return e.map((e=>(e.uid=t?o:s.guid(),e)))},getFileStatus:e=>{let t=!1,s=!1,o=!1,n=!1;const i=e=>{e.forEach((e=>{e.status===p.Uploading&&(t=!0),e.status===p.Uploaded&&(s=!0),e.status===p.UploadFailed&&(o=!0),K(e)&&(n=!0)}))};return Array.isArray(e)?i(e):Object.keys(e).forEach((t=>{i(e[t])})),[t,s,o,n]}};let H=class extends c.Component{constructor(e){super(e),this.buttonClassNames=e=>{const{actionFocused:t,retryFocused:o}=this.state;return s.classNames("k-icon-button k-upload-action",this.props.disabled?"k-disabled":"",t&&"action"===e||o&&"retry"===e?"k-focus":"")},this.onRetryFocus=()=>{this.setState({retryFocused:!0})},this.onRetryBlur=()=>{this.setState({retryFocused:!1})},this.onActionFocus=()=>{this.setState({actionFocused:!0})},this.onActionBlur=()=>{this.setState({actionFocused:!1})},this.onActionClick=()=>{const{status:e,uid:t,disabled:s,onCancel:o,onRemove:n}=this.props;s||e===p.Removing||(e===p.Uploading?o.call(void 0,t):n.call(void 0,t))},this.onRetryClick=()=>{const{uid:e,disabled:t,onRetry:s}=this.props;t||s.call(void 0,e)},this.state={retryFocused:!1,actionFocused:!1}}actionButtonTitle(e,t){return e===p.Uploading?t.toLanguageString(u,_[u]):t.toLanguageString(y,_[y])}retryButtonTitle(e){return e.toLanguageString(E,_[E])}render(){const{status:e,progress:t}=this.props,s=e===p.UploadFailed,o=e===p.Uploading,l=(e===p.Uploaded||e===p.Initial)&&!this.props.async.removeUrl,r=n.provideLocalizationService(this);return c.createElement("span",{className:"k-upload-actions"},o?c.createElement("span",{className:"k-upload-pct"},t,"%"):void 0,s?c.createElement(i.Button,{type:"button",themeColor:"base",fillMode:"flat",tabIndex:-1,className:this.buttonClassNames("retry"),onFocus:this.onRetryFocus,onBlur:this.onRetryBlur,onClick:this.onRetryClick,"aria-label":this.retryButtonTitle(r),title:this.retryButtonTitle(r),icon:"arrow-rotate-cw-small",svgIcon:a.arrowRotateCwSmallIcon}):void 0,l?void 0:c.createElement(i.Button,{type:"button",themeColor:"base",fillMode:"flat",tabIndex:-1,className:this.buttonClassNames("action"),onFocus:this.onActionFocus,onBlur:this.onActionBlur,onClick:this.onActionClick,"aria-label":this.actionButtonTitle(e,r),"aria-hidden":!0,title:this.actionButtonTitle(e,r),icon:e===p.Uploading?"cancel":"x",svgIcon:e===p.Uploading?a.cancelIcon:a.xIcon}))}};n.registerForLocalization(H);let P=class extends c.Component{getFileExtension(e){return e.extension?e.extension.substring(1):""}getFileValidationMessage(e,t){const s=n.provideLocalizationService(this);let o="";if(t)o=s.toLanguageString(x,_[x]);else if(e.validationErrors&&e.validationErrors.length>0){const t=`upload.${e.validationErrors[0]}`;o=s.toLanguageString(t,_[t])}return o}renderValidationError(e,t){return c.createElement("span",{className:"k-file-info",key:"2"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},this.getFileValidationMessage(e,t)))}renderFileDetails(e){const t=n.provideLocalizationService(this).toLanguageString(S,_[S]);return c.createElement("span",{className:"k-file-info",key:"2"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),100!==e.progress?c.createElement("span",{className:"k-file-size"},j.getTotalFilesSizeMessage([e])):c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},t))}render(){const{files:e,...t}=this.props,n=e[0],[,i,a,l]=j.getFileStatus([n]),r=!l&&!i&&!a;return c.createElement("div",{className:s.classNames("k-file-single")},r&&c.createElement(o.ProgressBar,{value:n.progress||0,tabIndex:-1}),c.createElement("span",{className:"k-file-icon-wrapper",key:"1"},c.createElement(s.IconWrap,{className:"k-file-icon",...s.getFileExtensionIcon(n.extension),size:"xxlarge"}),c.createElement("span",{className:"k-file-state"})),l||a?this.renderValidationError(n,a):this.renderFileDetails(n),c.createElement(H,{uid:n.uid,status:n.status,progress:n.progress,...t}))}};n.registerForLocalization(P);class $ extends c.Component{constructor(){super(...arguments),this.mapFiles=()=>{const{files:e}=this.props;return e.map((e=>c.createElement("span",{key:e.name,className:"k-file-info"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),j.fileHasValidationErrors(e)?c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},this.getFileValidationMessage(e)):c.createElement("span",{key:`${e.name}-size`,className:"k-file-size"},j.getTotalFilesSizeMessage([e])))))},this.progress=()=>{const{files:e}=this.props;let t=0;return e.forEach((e=>{t+=e.progress||0})),t/e.length}}getFileValidationMessage(e){const t=n.provideLocalizationService(this);let s="";if(e.validationErrors&&e.validationErrors.length>0){const o=`upload.${e.validationErrors[0]}`;s=t.toLanguageString(o,_[o])}return s}render(){const{files:e,...t}=this.props,[,i,l,r]=j.getFileStatus(e),d=n.provideLocalizationService(this),p=d.toLanguageString(U,_[U]),u=d.toLanguageString(I,_[I]),h=d.toLanguageString(x,_[x]),m=d.toLanguageString(S,_[S]),g=this.progress();return c.createElement("div",{className:s.classNames("k-file-multiple")},!r&&!i&&!l&&c.createElement(o.ProgressBar,{value:g||0}),c.createElement("span",{className:"k-file-icon-wrapper"},c.createElement(s.IconWrap,{className:"k-file-icon",name:"copy",icon:a.copyIcon,size:"xxlarge"})),c.createElement("span",{className:"k-multiple-files-wrapper"},this.mapFiles(),l?c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},`${e.length} ${h}`):100!==g?c.createElement("span",{className:"k-file-summary"},`${p}: ${e.length} ${u}, ${j.getTotalFilesSizeMessage(e)}`):c.createElement("span",{className:"k-file-summary k-text-success"},`${e.length} ${m}`)),c.createElement(H,{uid:e[0].uid,status:e[0].status,progress:g,...t}))}}n.registerForLocalization($);class q extends c.Component{constructor(){super(...arguments),this._element=null,this.onClick=()=>{this.props.onClick.call(void 0,this.props.index)}}componentDidUpdate(){const{navigationIndex:e,index:t}=this.props,o=s.getActiveElement(document);e===t&&this._element&&o!==this._element&&this._element.focus()}render(){const{files:e,async:t,disabled:o,navigationIndex:n,index:i,listItemUI:a,onCancel:l,onRemove:r,onRetry:d}=this.props,u=e[0],h=u.status===p.Uploaded||u.status===p.Initial,m=s.classNames("k-file",j.filesHaveValidationErrors(e)?"k-file-error k-file-invalid":"",u.status===p.UploadFailed||u.status===p.RemoveFailed?"k-file-error":"",u.status===p.Uploading?"k-file-progress":"",h?"k-file-success":"",n===i?"k-focus":""),g={async:t,disabled:o,onCancel:l,onRemove:r,onRetry:d},v=a||(1===e.length?P:$);return c.createElement("li",{ref:e=>{this._element=e},className:m,"data-uid":u.uid,onClick:this.onClick,role:"listitem"},c.createElement(v,{files:e,...g}))}}let G=class extends c.Component{mapListGroups(){const{groupedFiles:e,navigationIndex:t,...s}=this.props;return Object.keys(e).map(((o,n)=>{const i=e[o];return c.createElement(q,{key:o,files:i,index:n,navigationIndex:t,...s})}))}render(){const e=s.classNames("k-upload-files");return c.createElement("ul",{className:e,role:"list",id:this.props.listId},this.mapListGroups())}};const V=/(chrome)[ \/]([\w.]+)/i,W=/(webkit)[ \/]([\w.]+)/i;let Z=class extends c.Component{constructor(){super(...arguments),this._input=null,this.onMouseDown=e=>{this.props.onMouseDown&&this.props.onMouseDown(e)},this.onAdd=()=>{const e=navigator.userAgent,t=this._input;t&&(this.props.onAdd&&t.files&&this.props.onAdd.call(void 0,t.files),!e.match(V)&&e.match(W)||(t.type="",t.type="file"))}}get actionElement(){return this._input}render(){const{multiple:e,async:t,disabled:s,accept:o,hasFiles:i,ariaLabelledBy:a,ariaDescribedBy:l,id:r}=this.props,d=n.provideLocalizationService(this),p=i?b:F,u=d.toLanguageString(p,_[p]),h=d.toLanguageString(k,_[k]);return c.createElement("input",{id:r,ref:e=>{this._input=e},className:"k-hidden",autoComplete:"off",name:t.saveField,accept:o,type:"file",multiple:e,disabled:s,onChange:this.onAdd,onMouseDown:this.onMouseDown,title:u,tabIndex:-1,"data-testid":"upload-input-testid","aria-label":void 0!==a?void 0:h,"aria-labelledby":a,"aria-describedby":l,"aria-hidden":!0})}};n.registerForLocalization(Z);const J=e=>c.createElement("span",{"aria-hidden":!0},e.message);let Q=class extends c.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:s,notFocusedIndex:o}=this.props;t!==e.navigationIndex&&e.navigationIndex!==o&&t===s&&this._element&&this._element.focus()}render(){const{navigationIndex:e,addButtonIndex:t,tabIndex:o,id:a,ariaControls:l,disabled:r,ariaExpanded:d,selectMessageUI:p,...u}=this.props,h=n.provideLocalizationService(this).toLanguageString(k,_[k]),m=p||J;return c.createElement("div",{className:"k-upload-button-wrap"},c.createElement(i.Button,{type:"button",id:a?`${a}-select-button`:"select-button",className:s.classNames("k-upload-button",e===t?"k-focus":""),themeColor:"base",tabIndex:o,onClick:this.onClick,"aria-label":h,"aria-controls":l,"aria-disabled":r,"aria-expanded":d},c.createElement(m,{message:h})),c.createElement(Z,{id:a?`${a}-files`:"files",...u,onMouseDown:this.onInputMouseDown,ref:e=>{this._uploadInput=e}}))}};n.registerForLocalization(Q);let X=class 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=e=>e.keyCode===s.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(e){const{navigationIndex:t,clearButtonIndex:s,uploadButtonIndex:o}=this.props;t!==e.navigationIndex&&(t===s&&this._clearElement&&this._clearElement.focus(),t===o&&this._uploadElement&&this._uploadElement.focus())}render(){const{disabled:e,navigationIndex:t,clearButtonIndex:o,uploadButtonIndex:i,actionsLayout:a}=this.props,l=n.provideLocalizationService(this),r=s.classNames("k-actions","k-hstack",{"k-justify-content-start":"start"===a,"k-justify-content-center":"center"===a,"k-justify-content-end":"end"===a,"k-justify-content-stretch":"stretched"===a}),d=s.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-solid-base","k-clear-selected",e?"k-disabled":"",t===o?"k-focus":""),p=s.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary","k-primary","k-upload-selected",e?"k-disabled":"",t===i?"k-focus":"");return c.createElement("div",{className:r},c.createElement("button",{ref:e=>{this._clearElement=e},type:"button",className:d,tabIndex:0,onClick:this.onClearClick,onKeyDown:e=>this.checkEnterKey(e)&&this.onClearClick()},l.toLanguageString(h,_[h])),c.createElement("button",{ref:e=>{this._uploadElement=e},type:"button",className:p,tabIndex:0,onClick:this.onUploadClick,onKeyDown:e=>this.checkEnterKey(e)&&this.onUploadClick()},l.toLanguageString(C,_[C])))}};n.registerForLocalization(X);let Y=class extends c.Component{render(){const{isUploading:e,isUploaded:t,isUploadFailed:o}=this.props,i=s.classNames("k-upload-status"),l=e||o||!t?!e&&o?"exclamation-circle":e?"upload":"":"check",r=e||o||!t?!e&&o?{icon:a.exclamationCircleIcon}:e?{icon:a.uploadIcon}:{}:{icon:a.checkIcon};let d="";const p=n.provideLocalizationService(this);return e?d=p.toLanguageString(v,_[v]):(t||o)&&(d=p.toLanguageString(g,_[g])),c.createElement("div",{className:i},c.createElement(s.IconWrap,{name:l,...r}),d)}};n.registerForLocalization(Y);class ee extends c.Component{constructor(){super(...arguments),this._lastDocumentDragOver=null,this._lastElementDragOver=null,this._documentActive=!1,this._elementActive=!1,this.onDocumentDragEnter=()=>{if(!this.documentActive){this.documentActive=!0;const e=()=>{this.isDragOver(this._lastDocumentDragOver)&&(this.documentActive=!1,clearInterval(this._documentInterval),this._documentInterval=null,this._lastDocumentDragOver=null)};this._documentInterval=setInterval(e,100)}},this.onDocumentDragOver=()=>{this._lastDocumentDragOver=new Date},this.onElementDragEnter=()=>{if(!this.elementActive){this.elementActive=!0;const e=()=>{this.isDragOver(this._lastElementDragOver)&&(this.elementActive=!1,clearInterval(this._elementInterval),this._elementInterval=null,this._lastElementDragOver=null)};this._elementInterval=setInterval(e,100)}},this.onElementDragOver=e=>{e.preventDefault(),this._lastElementDragOver=new Date},this.onDrop=e=>{e.preventDefault();const t=e.dataTransfer.files;t.length>0&&!this.props.disabled&&this.props.onAdd&&(this.props.multiple||t.length<=1)&&this.props.onAdd.call(void 0,t)},this.isDragOver=e=>(new Date).getTime()-(e||new Date).getTime()>100}get documentActive(){return this._documentActive}set documentActive(e){const t=this.documentActive;this._documentActive=e,e!==t&&this.forceUpdate()}get elementActive(){return this._elementActive}set elementActive(e){const t=this._elementActive;this._elementActive=e,e!==t&&this.setState({})}componentDidMount(){document.addEventListener("dragenter",this.onDocumentDragEnter),document.addEventListener("dragover",this.onDocumentDragOver)}componentWillUnmount(){document.removeEventListener("dragenter",this.onDocumentDragEnter),document.removeEventListener("dragover",this.onDocumentDragOver)}render(){const{addButtonComponent:e,fileGroup:t}=this.props,o=n.provideLocalizationService(this).toLanguageString(m,_[m]),i=s.classNames("k-dropzone k-upload-dropzone",this.documentActive?"k-dropzone-active":"",this.elementActive?"k-dropzone-hovered":""),[a,l,r,d]=j.getFileStatus(t),p=s.classNames("k-dropzone-hint",{});return c.createElement("div",{className:i,onDrop:this.onDrop,onDragEnter:this.onElementDragEnter,onDragOver:this.onElementDragOver},e,a||l||r||d?c.createElement(Y,{isUploading:a,isUploaded:l,isUploadFailed:r}):c.createElement("div",{className:p},o))}}n.registerForLocalization(ee);const te=class extends c.Component{constructor(){super(...arguments),this._container=null,this._uploadAddButton=null,this.focus=()=>{if(this._uploadAddButton)return this._uploadAddButton.focus()},this.onAdd=e=>{this.props.onAdd&&this.props.onAdd.call(void 0,e)},this.onRetry=e=>{this.props.onRetry&&this.props.onRetry.call(void 0,e)},this.onCancel=e=>{this.props.onCancel&&this.props.onCancel.call(void 0,e)},this.onClear=()=>{this.props.onClear&&this.props.onClear.call(void 0)},this.onUpload=()=>{this.props.onUpload&&this.props.onUpload.call(void 0)},this.onRemove=e=>{this.props.onRemove&&this.props.onRemove.call(void 0,e)},this.onKeyDown=e=>{this.props.onKeyDown&&this.props.onKeyDown.call(void 0,e,this.isRtl)},this.onFocus=e=>{this.props.onFocus&&this.props.onFocus.call(void 0,e)},this.onBlur=e=>{this.props.onBlur&&this.props.onBlur.call(void 0,e)},this.onClick=e=>{this.props.onClick&&this.props.onClick.call(void 0,e)}}get async(){const{autoUpload:e,batch:t,withCredentials:s,saveField:o,saveHeaders:n,saveMethod:i,saveUrl:a,responseType:l,removeField:r,removeHeaders:d,removeMethod:c,removeUrl:p}=this.props;return{autoUpload:e,batch:t,withCredentials:s,saveField:o,saveHeaders:n,saveMethod:i,saveUrl:a,responseType:l,removeField:r,removeHeaders:d,removeMethod:c,removeUrl:p}}get groupsCount(){return Object.keys(this.props.groupedFiles).length}get lastGroupIndex(){return this.groupsCount-1}get addButtonIndex(){return-1}get clearButtonIndex(){return this.lastGroupIndex+1}get uploadButtonIndex(){return this.lastGroupIndex+2}get isRtl(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1}get actionElement(){if(this._uploadAddButton)return this._uploadAddButton.actionElement}render(){const{multiple:e,disabled:t,tabIndex:o,accept:n,showFileList:i,groupedFiles:a,navigationIndex:l,showActionButtons:r,actionsLayout:d,notFocusedIndex:p,listItemUI:u,id:h,ariaLabelledBy:m,ariaDescribedBy:g,selectMessageUI:v}=this.props,f=s.classNames("k-upload",{"k-upload-empty":0===Object.keys(a).length},this.props.className,t?"k-disabled":""),y=`${h}-list`,E=c.createElement(Q,{id:h,ariaLabelledBy:m,ariaDescribedBy:g,ref:e=>{this._uploadAddButton=e},accept:n,async:this.async,addButtonIndex:this.addButtonIndex,navigationIndex:l,notFocusedIndex:p,tabIndex:o,multiple:e,disabled:t,hasFiles:!!a&&Object.keys(a).length>0,selectMessageUI:v,onAdd:this.onAdd,onClick:this.onClick,ariaControls:y,ariaExpanded:i});return c.createElement("div",{ref:e=>{this._container=e},className:f,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur},c.createElement(ee,{addButtonComponent:E,fileGroup:a,disabled:t,multiple:e,onAdd:this.onAdd}),i?c.createElement(G,{groupedFiles:a,disabled:t,async:this.async,navigationIndex:l,listItemUI:u,onCancel:this.onCancel,onRemove:this.onRemove,onRetry:this.onRetry,onClick:this.onClick,listId:y}):void 0,r?c.createElement(X,{disabled:t,navigationIndex:l,clearButtonIndex:this.clearButtonIndex,uploadButtonIndex:this.uploadButtonIndex,actionsLayout:d,onUpload:this.onUpload,onClear:this.onClear,onClick:this.onClick}):void 0)}};te.defaultProps={disabled:!1,groupedFiles:{},multiple:!0,actionsLayout:"end"};let se=te;const oe=s.withIdHOC(se);oe.displayName="KendoReactUploadUI";const ne=-2,ie=-1;class ae extends c.Component{constructor(e){super(e),this._uploadUI=null,this.focus=()=>{this._uploadUI&&this._uploadUI.focus()},this.onKeyDown=(e,t)=>{const o=this.navIndex,n=Object.keys(this.props.groupedFiles),i=n.length-1,a=this.props.autoUpload||0===n.length?i:i+1,l=i+1,r=l+1,d=o===ne?ie:o;let c=o;switch(e.keyCode){case s.Keys.up:o>-1&&(c=d-1);break;case s.Keys.down:o<a&&(c=d+1);break;case s.Keys.left:t?o===l&&(c=d+1):o===r&&(c=d-1);break;case s.Keys.right:t?o===r&&(c=d-1):o===l&&(c=d+1);break;case s.Keys.enter:if(o===ie||o===ne){const e=s.getActiveElement(document);this.actionElement&&s.canUseDOM&&-1===(null==e?void 0:e.className.indexOf("k-upload-button"))&&-1===(null==e?void 0:e.className.indexOf("k-upload-selected"))&&-1===(null==e?void 0:e.className.indexOf("k-clear-selected"))&&this.actionElement.click()}o>=0&&o<=i&&this.onRetry(n[o]);break;case s.Keys.space:(o===ie||o===ne)&&this.actionElement&&this.actionElement.click(),e.preventDefault();break;case s.Keys.tab:c=ne;break;case s.Keys.delete:o>=0&&o<=i&&(c=d-1,this.onRemove(n[o]));break;case s.Keys.esc:o>=0&&o<=i&&(c=d-1,this.onCancel(n[o]))}this.navIndex=c},this.onCancel=e=>{this.props.onCancel&&this.props.onCancel.call(void 0,e)},this.onClear=()=>{this.navIndex=ie,this.props.onClear&&this.props.onClear.call(void 0)},this.onUpload=()=>{this.navIndex=ie,this.props.onUpload&&this.props.onUpload.call(void 0)},this.onRetry=e=>{this.props.onRetry&&this.props.onRetry.call(void 0,e)},this.onRemove=e=>{this.navIndex=this.navIndex>ie?this.navIndex-1:ie,this.props.onRemove&&this.props.onRemove.call(void 0,e)},this.onAdd=e=>{this.navIndex=ie,this.props.onAdd&&this.props.onAdd.call(void 0,e)},this.onClick=e=>{this.navIndex=e},this.onFocus=()=>{this._blurTimeout&&(clearTimeout(this._blurTimeout),this._blurTimeout=void 0)},this.onBlurTimeout=()=>{this.navIndex=ne,this._blurTimeout=void 0},this.onBlur=()=>{clearTimeout(this._blurTimeout),this._blurTimeout=window.setTimeout(this.onBlurTimeout)},this._navIndex=ne}get navIndex(){return this._navIndex}set navIndex(e){const t=this.navIndex;this._navIndex=e,e!==t&&this.forceUpdate()}get actionElement(){if(this._uploadUI)return this._uploadUI.actionElement}componentDidUpdate(e){const t=Object.keys(e.groupedFiles).length,s=Object.keys(this.props.groupedFiles).length;t>s&&this.navIndex>ie&&(this.navIndex=this.navIndex-(t-s))}render(){const{onClear:e,onRemove:t,onRetry:s,onCancel:o,onUpload:n,onAdd:i,...a}=this.props;return c.createElement(oe,{ref:e=>{this._uploadUI=e},className:this.props.className,onKeyDown:this.onKeyDown,navigationIndex:this.navIndex,notFocusedIndex:ne,onAdd:this.onAdd,onClear:this.onClear,onUpload:this.onUpload,onRemove:this.onRemove,onRetry:this.onRetry,onCancel:this.onCancel,onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur,...a})}}const le=(e,t)=>{t.push(e)},re=(e,t)=>{Object.keys(e).forEach((s=>{t(e[s],s)}))},de={copyState:e=>(e||[]).map((e=>({...e}))),addMany:(e,t)=>{e.forEach((e=>le(e,t)))},add:le,groupFilesByUid:e=>{const t={};return e.forEach((e=>{t[e.uid]?t[e.uid].push(e):t[e.uid]=[e]})),t},filesForUpload:e=>{const t={};return re(e,((e,s)=>{let o=!0;e.forEach((e=>{(e.status!==p.Selected||e.validationErrors&&e.validationErrors.length>0)&&(o=!1)})),o&&(t[s]=e)})),t},setFilesStatus:(e,t)=>{re(e,(e=>{e.forEach((e=>{e.status=t}))}))},flatFileGroup:e=>{const t=[];return re(e,(e=>{t.push.apply(t,e)})),t},groupForEach:re},ce=(e,t)=>{Object.keys(t).forEach((s=>{e.append(s,t[s])}))},pe=(e,t,s)=>{const o=new FormData;return ce(o,s),e.forEach((e=>{const s=e.getRawFile?e.getRawFile():"";s?o.append(t,s,e.name):o.append(t,s)})),o},ue=(e,t,s)=>{const o=new FormData;return ce(o,s),e.forEach((e=>{o.append(t,e)})),o},he=(e,t)=>({headers:e,responseType:t.responseType,withCredentials:t.withCredentials}),me=e=>{const t={};return Object.keys(e).forEach((s=>{t[s]=e[s]})),t},ge=e=>{const{data:t,config:s,...o}=e;return{response:t,...o}},ve="invalidMaxFileSize",fe="invalidMinFileSize",ye="invalidFileExtension",Ee=(e,t)=>{t.length>0&&t.indexOf((e.extension||"").toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(ye)<0&&e.validationErrors.push(ye))},ke=(e,t,s)=>{0!==t&&(e.size||0)<t&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(fe)<0&&e.validationErrors.push(fe)),0!==s&&(e.size||0)>s&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(ve)<0&&e.validationErrors.push(ve))},be=(e,t)=>{const s=(e=>e.map((e=>("."===e.substring(0,1)?e:"."+e).toLowerCase())))(t.allowedExtensions||[]),o=t.maxFileSize||0,n=t.minFileSize||0;let i;for(i=0;i<e.length;i++)Ee(e[i],s),ke(e[i],n,o)},Fe=Object.freeze({name:"@progress/kendo-react-upload",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.2.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),Ce=class extends c.Component{constructor(e){super(e),this._httpSubscriptions={},this._uploadNavigation=null,this.showLicenseWatermark=!1,this.focus=()=>{this._uploadNavigation&&this._uploadNavigation.focus()},this.triggerUpload=()=>{this.onUpload()},this.uploadFiles=e=>{const t=this.async;de.setFilesStatus(e,p.Uploading),de.groupForEach(e,((e,s)=>{const o={target:this,files:e,headers:me(t.saveHeaders||{}),additionalData:{}};this.props.onBeforeUpload&&this.props.onBeforeUpload.call(void 0,o);const n=he(o.headers,this.async),i=pe(e,t.saveField,o.additionalData);if(this.isCustomSave)this.props.saveUrl(e,{formData:i,requestOptions:n},this.onUploadProgress).then((e=>this.onUploadSuccess(e.uid))).catch((e=>this.onUploadError(e.uid)));else{const e=r.CancelToken.source();this._httpSubscriptions[s]=e,r({method:t.saveMethod,url:t.saveUrl,data:i,cancelToken:e.token,...n,onUploadProgress:e=>this.onUploadProgress(s,e)}).then((e=>this.onUploadSuccess(s,e))).catch((e=>this.onUploadError(s,e)))}}))},this.removeFiles=e=>{const t=this.async;de.groupForEach(e,((e,s)=>{const o={target:this,files:e,headers:me(t.removeHeaders||{}),additionalData:{}};this.props.onBeforeRemove&&this.props.onBeforeRemove.call(void 0,o);const n=e.map((e=>e.name)),i=he(o.headers,this.async),a=ue(n,t.removeField,o.additionalData);this.isCustomRemove?this.props.removeUrl(e,{formData:a,requestOptions:i}).then((e=>this.onRemoveSuccess(e.uid))).catch((e=>this.onRemoveError(e.uid))):r({method:t.removeMethod,url:t.removeUrl,data:a,...i}).then((e=>this.onRemoveSuccess(s,e))).catch((e=>this.onRemoveError(s,e)))}))},this.onUpload=()=>{const e=this.fileStateCopy,t=de.groupFilesByUid(e),s=de.filesForUpload(t);this.uploadFiles(s);const o=()=>{if(this.props.onStatusChange){const t={target:this,newState:e,affectedFiles:de.flatFileGroup(s)};this.props.onStatusChange.call(void 0,t)}};this.isControlled?o():this.setState({files:e},o)},this.onAdd=e=>{let t,s=j.getAllFileInfo(e);if(s=j.assignGuidToFiles(s,this.async.batch),be(s,this.props.restrictions),t=this.props.multiple?this.fileStateCopy:[],de.addMany(s,t),this.async.autoUpload){const e=de.groupFilesByUid(t);this.uploadFiles(de.filesForUpload(e))}const o=()=>{if(this.props.onAdd){const e={target:this,newState:t,affectedFiles:s};this.props.onAdd.call(void 0,e)}};this.isControlled?o():this.setState({files:t},o)},this.onUploadProgress=(e,t)=>{const s=Math.round(100*t.loaded/(t.total||0))||0,o=()=>{if(this.props.onProgress){const t=this.fileStateCopy,o=t.filter((t=>t.uid===e));this.setFilesProgress(t,s);const n={target:this,newState:t,affectedFiles:o};this.props.onProgress.call(void 0,n)}};this.isControlled?o():this.setState((t=>{const o=t.files,n=o.filter((t=>t.uid===e));if(this.setFilesProgress(n,s),n.length)return{files:o}}),o)},this.onUploadSuccess=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));o.forEach((e=>{e.status=p.Uploaded,e.progress=100})),delete this._httpSubscriptions[e];const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onUploadError=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));if(o.forEach((e=>{e.status=p.UploadFailed})),delete this._httpSubscriptions[e],!o.length)return;const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onRemove=e=>{const t=this.fileStateCopy,s=t.filter((t=>t.uid===e)),o=t.filter((t=>t.uid!==e));if([p.Uploaded,p.Initial,p.RemoveFailed].indexOf(s[0].status)>-1){const o={[e]:s};de.setFilesStatus(o,p.Removing),this.removeFiles(o);const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:t,affectedFiles:s};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:t},n)}else{const e=()=>{if(this.props.onRemove){const e={target:this,newState:o,affectedFiles:s};this.props.onRemove.call(void 0,e)}};this.isControlled?e():this.setState({files:o},e)}},this.onRemoveSuccess=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e)),n=s.filter((t=>t.uid!==e)),i=()=>{if(this.props.onRemove){const e={target:this,newState:n,affectedFiles:o,response:t?ge(t):void 0};this.props.onRemove.call(void 0,e)}};this.isControlled?i():this.setState({files:n},i)},this.onRemoveError=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));o.forEach((e=>{e.status=p.RemoveFailed}));const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onRetry=e=>{const t=this.fileStateCopy,s=de.groupFilesByUid(t.filter((t=>t.uid===e)));de.setFilesStatus(s,p.Uploading),this.uploadFiles(s);const o=()=>{if(this.props.onStatusChange){const e={target:this,newState:t,affectedFiles:de.flatFileGroup(s)};this.props.onStatusChange.call(void 0,e)}};this.isControlled?o():this.setState({files:t},o)},this.onCancel=e=>{const t=this.fileStateCopy,s=t.filter((t=>t.uid!==e)),o=t.filter((t=>t.uid===e));if(this._httpSubscriptions[e]&&(this._httpSubscriptions[e].cancel(),delete this._httpSubscriptions[e]),this.props.onCancel){const t={target:this,uid:e};this.props.onCancel.call(void 0,t)}const n=()=>{if(this.props.onRemove){const e={target:this,newState:s,affectedFiles:o};this.props.onRemove.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onClear=()=>{if(!this.files.length)return;Object.keys(this._httpSubscriptions).forEach((e=>{this._httpSubscriptions[e].cancel()})),this._httpSubscriptions={};const e=()=>{if(this.props.onRemove){const e={target:this,newState:[],affectedFiles:this.fileStateCopy};this.props.onRemove.call(void 0,e)}};this.isControlled?e():this.setState({files:[]},e)},this.showLicenseWatermark=!s.validatePackage(Fe,{component:"Upload"}),this.licenseMessage=s.getLicenseMessage(Fe),this.state={files:e.defaultFiles||[]}}get async(){const{autoUpload:e,batch:t,removeField:s,removeHeaders:o,removeMethod:n,removeUrl:i,responseType:a,saveField:l,saveHeaders:r,saveMethod:d,saveUrl:c,withCredentials:p}=this.props;return{autoUpload:e,batch:t,removeField:s,removeHeaders:o,removeMethod:n,removeUrl:i,responseType:a,saveField:l,saveHeaders:r,saveMethod:d,saveUrl:c,withCredentials:p}}get files(){return(this.isControlled?this.props.files:this.state.files)||[]}get isControlled(){return!this.props.defaultFiles}get isCustomSave(){return this.props.saveUrl&&"function"==typeof this.props.saveUrl}get isCustomRemove(){return this.props.removeUrl&&"function"==typeof this.props.removeUrl}get fileStateCopy(){return this.isControlled?de.copyState(this.props.files):de.copyState(this.state.files)}get actionElement(){if(this._uploadNavigation)return this._uploadNavigation.actionElement}setFilesProgress(e,t){e.forEach((e=>{e.progress=t,e.status===p.Uploading&&100===t&&(e.status=p.Uploaded)}))}render(){var e;const{showFileList:t,onAdd:o,onRemove:n,onCancel:i,autoUpload:a,showActionButtons:l,actionsLayout:r,tabIndex:d,disabled:p,...u}=this.props,h=de.groupFilesByUid(this.files),m=de.filesForUpload(h);return c.createElement(c.Fragment,null,c.createElement(ae,{groupedFiles:h,className:this.props.className,showFileList:t&&!!Object.keys(h).length,showActionButtons:l&&!a&&(!!Object.keys(m).length||!(null==(e=this.props.defaultFiles)||!e.length)),actionsLayout:r,autoUpload:a,disabled:p,onAdd:this.onAdd,onRemove:this.onRemove,onClear:this.onClear,onUpload:this.onUpload,onRetry:this.onRetry,onCancel:this.onCancel,tabIndex:s.getTabIndex(d,p),ref:e=>{this._uploadNavigation=e},...u}),this.showLicenseWatermark&&c.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}};Ce.defaultProps={autoUpload:!0,batch:!1,removeField:"fileNames",removeHeaders:{},removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:{},saveMethod:"POST",saveUrl:"",withCredentials:!0,restrictions:{allowedExtensions:[],maxFileSize:0,minFileSize:0},multiple:!0,showFileList:!0,showActionButtons:!0,actionsLayout:"end",disabled:!1},Ce.propTypes={autoUpload:l.bool,batch:l.bool,withCredentials:l.bool,saveField:l.string,saveHeaders:l.object,saveMethod:l.string,saveUrl:l.oneOfType([l.string,l.func]),responseType:l.oneOf(["arraybuffer","blob","json","text"]),removeField:l.string,removeHeaders:l.object,removeMethod:l.string,removeUrl:l.oneOfType([l.string,l.func]),multiple:l.bool,disabled:l.bool,showFileList:l.bool,showActionButtons:l.bool,actionsLayout:l.oneOf(["start","center","end","stretched"]),tabIndex:l.number,accept:l.string,listItemUI:l.oneOfType([l.func,l.string,l.shape({render:l.func.isRequired})]),restrictions:l.shape({allowedExtensions:l.arrayOf(l.string),maxFileSize:l.number,minFileSize:l.number}),files:l.arrayOf(l.shape({uid:l.string,name:l.string,extension:l.string,size:l.number,validationErrors:l.arrayOf(l.string),status:l.oneOf([p.Initial,p.RemoveFailed,p.Removing,p.Selected,p.UploadFailed,p.Uploaded,p.Uploading]),progress:l.number,getRawFile:l.func})),defaultFiles:l.arrayOf(l.shape({uid:l.string,name:l.string,extension:l.string,size:l.number,validationErrors:l.arrayOf(l.string),status:l.oneOf([p.Initial,p.RemoveFailed,p.Removing,p.Selected,p.UploadFailed,p.Uploaded,p.Uploading]),progress:l.number,getRawFile:l.func}))};let Ue=Ce;const Ie=c.forwardRef(((e,t)=>{const o=!s.validatePackage(Fe,{component:"ExternalDropZone"}),i=s.getLicenseMessage(Fe),l=c.useRef(null),r=c.useRef(null),d=c.useRef(null),p=c.useRef(!1),u=c.useRef(null),{uploadRef:h}=e,m=h.current,[g,v]=c.useState(!1),f=c.useMemo((()=>new n.IntlService("en")),[]),y=n.useLocalization(),E=y.toLanguageString(D,_[D]),[k,b]=c.useState(y.toLanguageString(R,_[R])),F=e.customHint||c.createElement("span",null,E),C=e.customNote||c.createElement("span",null,k),U=c.useCallback((()=>{r.current&&r.current.focus()}),[r]);c.useImperativeHandle(l,(()=>({element:r.current,focus:U,props:e}))),c.useImperativeHandle(t,(()=>l.current)),c.useEffect((()=>{if(m){const e=m.props.restrictions.allowedExtensions;if(e&&e.length){const t=f.format(y.toLanguageString(w,_[w]),[e]);b(t)}}}),[m,y,f]);const I=c.useCallback((e=>(new Date).getTime()-(e||new Date).getTime()>100),[]),S=c.useCallback((t=>{t.preventDefault();const s=t.dataTransfer.files;s.length>0&&!e.disabled&&h&&h.current&&(h.current.onAdd&&(t.preventDefault(),h.current.onAdd(s)),e.onDrop&&e.onDrop.call(void 0,t))}),[e.disabled,h,e.onDrop]),x=c.useCallback((t=>{if(p){p.current=!0;const e=()=>{I(u.current)&&(v(!1),p.current=!1,clearInterval(d.current),d.current=null,u.current=null)};d.current=setInterval(e,100)}e.onElementDragEnter&&e.onElementDragEnter.call(void 0,t)}),[p,d,u,I,e.onElementDragEnter]),N=c.useCallback((t=>{t.preventDefault(),u.current=new Date,v(!0),e.onElementDragOver&&e.onElementDragOver.call(void 0,t)}),[u,e.onElementDragOver]);return c.createElement("div",{ref:r,id:e.id,className:s.classNames("k-external-dropzone",{"k-external-dropzone-hover":g,"k-disabled":e.disabled},e.className),tabIndex:s.getTabIndex(e.tabIndex,e.disabled,void 0),onDrop:S,onDragEnter:x,onDragOver:N},c.createElement("div",{style:e.style,className:"k-dropzone-inner"},c.createElement(s.IconWrap,{name:"upload",icon:a.uploadIcon,className:"k-dropzone-icon",size:"xxxlarge"}),c.createElement("span",{className:"k-dropzone-hint"},F),c.createElement("span",{className:"k-dropzone-note"},C)),o&&c.createElement(s.WatermarkOverlay,{message:i}))})),Se={id:l.string,tabIndex:l.number,editorRef:l.oneOfType([l.func,l.shape({current:l.any})]),disabled:l.bool,onDrop:l.func,onElementDragEnter:l.func,onElementDragOver:l.func};Ie.displayName="KendoReactExternalDropZone",Ie.propTypes=Se,e.ExternalDropZone=Ie,e.Upload=Ue,e.UploadActionButtons=X,e.UploadAddButton=Q,e.UploadDropZone=ee,e.UploadFileStatus=p,e.UploadInput=Z,e.UploadList=G,e.UploadListActionButton=H,e.UploadListGroup=q,e.UploadListMultiItem=$,e.UploadListSingleItem=P,e.UploadStatus=Y,e.UploadUI=oe,e.headerStatusUploaded=g,e.headerStatusUploading=v,e.invalidMaxFileSize=f,e.uploadMessages=_,e.uploadSelect=k,e.uploadUtils=j}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-progressbars"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("prop-types"),require("axios")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-progressbars","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-svg-icons","prop-types","axios"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactUpload={},e.React,e.KendoReactCommon,e.KendoReactProgressbars,e.KendoReactIntl,e.KendoReactButtons,e.KendoSvgIcons,e.PropTypes,e.axios)}(this,(function(e,t,s,o,n,i,a,l,r){"use strict";function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var c=d(t),p=(e=>(e[e.UploadFailed=0]="UploadFailed",e[e.Initial=1]="Initial",e[e.Selected=2]="Selected",e[e.Uploading=3]="Uploading",e[e.Uploaded=4]="Uploaded",e[e.RemoveFailed=5]="RemoveFailed",e[e.Removing=6]="Removing",e))(p||{});const u="upload.cancel",h="upload.clearSelectedFiles",m="upload.dropFilesHere",g="upload.headerStatusUploaded",v="upload.headerStatusUploading",f="upload.invalidMaxFileSize",y="upload.remove",E="upload.retry",k="upload.select",b="upload.selectTitle",F="upload.selectNoFilesTitle",C="upload.uploadSelectedFiles",U="upload.total",I="upload.files",S="upload.statusUploaded",x="upload.statusUploadFailed",D="upload.dropZoneHint",R="upload.defaultDropZoneNote",w="upload.dropZoneNote",_={[u]:"Cancel",[h]:"Clear",[m]:"Drop files here to upload",[g]:"Done",[v]:"Uploading...","upload.invalidFileExtension":"File type not allowed.","upload.invalidFiles":"Invalid file(s). Please check file upload requirements.",[f]:"File size too large.","upload.invalidMinFileSize":"File size too small.",[y]:"Remove",[E]:"Retry",[k]:"Select files...",[b]:"Press to select more files",[F]:"No files selected",[C]:"Upload",[U]:"Total",[I]:"files",[S]:"File(s) successfully uploaded.",[x]:"File(s) failed to upload.",[D]:"Drag and drop files here to upload.",[R]:"",[w]:"Only {0} files are allowed."},N=/&/g,B=/</g,A=/"/g,O=/'/g,L=/>/g,z=e=>(""+e).replace(N,"&").replace(B,"<").replace(L,">").replace(A,""").replace(O,"'"),T=e=>{const t=e.match(/\.([^\.]+)$/);return t?t[0]:""},M=e=>{const t=e.name,s=e.size;return{extension:T(t),name:z(t),getRawFile:()=>e,size:s,status:p.Selected,progress:0,uid:""}},K=e=>!!(e.validationErrors&&e.validationErrors.length>0),j={fileHasValidationErrors:K,filesHaveValidationErrors:e=>{for(const t of e)if(K(t))return!0;return!1},getTotalFilesSizeMessage:e=>{let t,s=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(s+=e[t].size||0);return s/=1024,s<1024?s.toFixed(2)+" KB":(s/1024).toFixed(2)+" MB"},getAllFileInfo:e=>{const t=new Array;let s;for(s=0;s<e.length;s++)t.push(M(e[s]));return t},getFileInfo:M,getFileExtension:T,htmlEncode:z,assignGuidToFiles:(e,t)=>{const o=s.guid();return e.map((e=>(e.uid=t?o:s.guid(),e)))},getFileStatus:e=>{let t=!1,s=!1,o=!1,n=!1;const i=e=>{e.forEach((e=>{e.status===p.Uploading&&(t=!0),e.status===p.Uploaded&&(s=!0),e.status===p.UploadFailed&&(o=!0),K(e)&&(n=!0)}))};return Array.isArray(e)?i(e):Object.keys(e).forEach((t=>{i(e[t])})),[t,s,o,n]}};let H=class extends c.Component{constructor(e){super(e),this.buttonClassNames=e=>{const{actionFocused:t,retryFocused:o}=this.state;return s.classNames("k-icon-button k-upload-action",this.props.disabled?"k-disabled":"",t&&"action"===e||o&&"retry"===e?"k-focus":"")},this.onRetryFocus=()=>{this.setState({retryFocused:!0})},this.onRetryBlur=()=>{this.setState({retryFocused:!1})},this.onActionFocus=()=>{this.setState({actionFocused:!0})},this.onActionBlur=()=>{this.setState({actionFocused:!1})},this.onActionClick=()=>{const{status:e,uid:t,disabled:s,onCancel:o,onRemove:n}=this.props;s||e===p.Removing||(e===p.Uploading?o.call(void 0,t):n.call(void 0,t))},this.onRetryClick=()=>{const{uid:e,disabled:t,onRetry:s}=this.props;t||s.call(void 0,e)},this.state={retryFocused:!1,actionFocused:!1}}actionButtonTitle(e,t){return e===p.Uploading?t.toLanguageString(u,_[u]):t.toLanguageString(y,_[y])}retryButtonTitle(e){return e.toLanguageString(E,_[E])}render(){const{status:e,progress:t}=this.props,s=e===p.UploadFailed,o=e===p.Uploading,l=(e===p.Uploaded||e===p.Initial)&&!this.props.async.removeUrl,r=n.provideLocalizationService(this);return c.createElement("span",{className:"k-upload-actions"},o?c.createElement("span",{className:"k-upload-pct"},t,"%"):void 0,s?c.createElement(i.Button,{type:"button",themeColor:"base",fillMode:"flat",tabIndex:-1,className:this.buttonClassNames("retry"),onFocus:this.onRetryFocus,onBlur:this.onRetryBlur,onClick:this.onRetryClick,"aria-label":this.retryButtonTitle(r),title:this.retryButtonTitle(r),icon:"arrow-rotate-cw-small",svgIcon:a.arrowRotateCwSmallIcon}):void 0,l?void 0:c.createElement(i.Button,{type:"button",themeColor:"base",fillMode:"flat",tabIndex:-1,className:this.buttonClassNames("action"),onFocus:this.onActionFocus,onBlur:this.onActionBlur,onClick:this.onActionClick,"aria-label":this.actionButtonTitle(e,r),"aria-hidden":!0,title:this.actionButtonTitle(e,r),icon:e===p.Uploading?"cancel":"x",svgIcon:e===p.Uploading?a.cancelIcon:a.xIcon}))}};n.registerForLocalization(H);let P=class extends c.Component{getFileExtension(e){return e.extension?e.extension.substring(1):""}getFileValidationMessage(e,t){const s=n.provideLocalizationService(this);let o="";if(t)o=s.toLanguageString(x,_[x]);else if(e.validationErrors&&e.validationErrors.length>0){const t=`upload.${e.validationErrors[0]}`;o=s.toLanguageString(t,_[t])}return o}renderValidationError(e,t){return c.createElement("span",{className:"k-file-info",key:"2"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},this.getFileValidationMessage(e,t)))}renderFileDetails(e){const t=n.provideLocalizationService(this).toLanguageString(S,_[S]);return c.createElement("span",{className:"k-file-info",key:"2"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),100!==e.progress?c.createElement("span",{className:"k-file-size"},j.getTotalFilesSizeMessage([e])):c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},t))}render(){const{files:e,...t}=this.props,n=e[0],[,i,a,l]=j.getFileStatus([n]),r=!l&&!i&&!a;return c.createElement("div",{className:s.classNames("k-file-single")},r&&c.createElement(o.ProgressBar,{value:n.progress||0,tabIndex:-1}),c.createElement("span",{className:"k-file-icon-wrapper",key:"1"},c.createElement(s.IconWrap,{className:"k-file-icon",...s.getFileExtensionIcon(n.extension),size:"xxlarge"}),c.createElement("span",{className:"k-file-state"})),l||a?this.renderValidationError(n,a):this.renderFileDetails(n),c.createElement(H,{uid:n.uid,status:n.status,progress:n.progress,...t}))}};n.registerForLocalization(P);class $ extends c.Component{constructor(){super(...arguments),this.mapFiles=()=>{const{files:e}=this.props;return e.map((e=>c.createElement("span",{key:e.name,className:"k-file-info"},c.createElement("span",{className:"k-file-name",title:e.name},e.name),j.fileHasValidationErrors(e)?c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},this.getFileValidationMessage(e)):c.createElement("span",{key:`${e.name}-size`,className:"k-file-size"},j.getTotalFilesSizeMessage([e])))))},this.progress=()=>{const{files:e}=this.props;let t=0;return e.forEach((e=>{t+=e.progress||0})),t/e.length}}getFileValidationMessage(e){const t=n.provideLocalizationService(this);let s="";if(e.validationErrors&&e.validationErrors.length>0){const o=`upload.${e.validationErrors[0]}`;s=t.toLanguageString(o,_[o])}return s}render(){const{files:e,...t}=this.props,[,i,l,r]=j.getFileStatus(e),d=n.provideLocalizationService(this),p=d.toLanguageString(U,_[U]),u=d.toLanguageString(I,_[I]),h=d.toLanguageString(x,_[x]),m=d.toLanguageString(S,_[S]),g=this.progress();return c.createElement("div",{className:s.classNames("k-file-multiple")},!r&&!i&&!l&&c.createElement(o.ProgressBar,{value:g||0}),c.createElement("span",{className:"k-file-icon-wrapper"},c.createElement(s.IconWrap,{className:"k-file-icon",name:"copy",icon:a.copyIcon,size:"xxlarge"})),c.createElement("span",{className:"k-multiple-files-wrapper"},this.mapFiles(),l?c.createElement("span",{className:"k-file-validation-message","aria-live":"polite"},`${e.length} ${h}`):100!==g?c.createElement("span",{className:"k-file-summary"},`${p}: ${e.length} ${u}, ${j.getTotalFilesSizeMessage(e)}`):c.createElement("span",{className:"k-file-summary k-text-success"},`${e.length} ${m}`)),c.createElement(H,{uid:e[0].uid,status:e[0].status,progress:g,...t}))}}n.registerForLocalization($);class q extends c.Component{constructor(){super(...arguments),this._element=null,this.onClick=()=>{this.props.onClick.call(void 0,this.props.index)}}componentDidUpdate(){const{navigationIndex:e,index:t}=this.props,o=s.getActiveElement(document);e===t&&this._element&&o!==this._element&&this._element.focus()}render(){const{files:e,async:t,disabled:o,navigationIndex:n,index:i,listItemUI:a,onCancel:l,onRemove:r,onRetry:d}=this.props,u=e[0],h=u.status===p.Uploaded||u.status===p.Initial,m=s.classNames("k-file",j.filesHaveValidationErrors(e)?"k-file-error k-file-invalid":"",u.status===p.UploadFailed||u.status===p.RemoveFailed?"k-file-error":"",u.status===p.Uploading?"k-file-progress":"",h?"k-file-success":"",n===i?"k-focus":""),g={async:t,disabled:o,onCancel:l,onRemove:r,onRetry:d},v=a||(1===e.length?P:$);return c.createElement("li",{ref:e=>{this._element=e},className:m,"data-uid":u.uid,onClick:this.onClick,role:"listitem"},c.createElement(v,{files:e,...g}))}}let G=class extends c.Component{mapListGroups(){const{groupedFiles:e,navigationIndex:t,...s}=this.props;return Object.keys(e).map(((o,n)=>{const i=e[o];return c.createElement(q,{key:o,files:i,index:n,navigationIndex:t,...s})}))}render(){const e=s.classNames("k-upload-files");return c.createElement("ul",{className:e,role:"list",id:this.props.listId},this.mapListGroups())}};const V=/(chrome)[ \/]([\w.]+)/i,W=/(webkit)[ \/]([\w.]+)/i;let Z=class extends c.Component{constructor(){super(...arguments),this._input=null,this.onMouseDown=e=>{this.props.onMouseDown&&this.props.onMouseDown(e)},this.onAdd=()=>{const e=navigator.userAgent,t=this._input;t&&(this.props.onAdd&&t.files&&this.props.onAdd.call(void 0,t.files),!e.match(V)&&e.match(W)||(t.type="",t.type="file"))}}get actionElement(){return this._input}render(){const{multiple:e,async:t,disabled:s,accept:o,hasFiles:i,ariaLabelledBy:a,ariaDescribedBy:l,id:r}=this.props,d=n.provideLocalizationService(this),p=i?b:F,u=d.toLanguageString(p,_[p]),h=d.toLanguageString(k,_[k]);return c.createElement("input",{id:r,ref:e=>{this._input=e},className:"k-hidden",autoComplete:"off",name:t.saveField,accept:o,type:"file",multiple:e,disabled:s,onChange:this.onAdd,onMouseDown:this.onMouseDown,title:u,tabIndex:-1,"data-testid":"upload-input-testid","aria-label":void 0!==a?void 0:h,"aria-labelledby":a,"aria-describedby":l,"aria-hidden":!0})}};n.registerForLocalization(Z);const J=e=>c.createElement("span",{"aria-hidden":!0},e.message);let Q=class extends c.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:s,notFocusedIndex:o}=this.props;t!==e.navigationIndex&&e.navigationIndex!==o&&t===s&&this._element&&this._element.focus()}render(){const{navigationIndex:e,addButtonIndex:t,tabIndex:o,id:a,ariaControls:l,disabled:r,ariaExpanded:d,selectMessageUI:p,...u}=this.props,h=n.provideLocalizationService(this).toLanguageString(k,_[k]),m=p||J;return c.createElement("div",{className:"k-upload-button-wrap"},c.createElement(i.Button,{type:"button",id:a?`${a}-select-button`:"select-button",className:s.classNames("k-upload-button",e===t?"k-focus":""),themeColor:"base",tabIndex:o,onClick:this.onClick,"aria-label":h,"aria-controls":l,"aria-disabled":r,"aria-expanded":d},c.createElement(m,{message:h})),c.createElement(Z,{id:a?`${a}-files`:"files",...u,onMouseDown:this.onInputMouseDown,ref:e=>{this._uploadInput=e}}))}};n.registerForLocalization(Q);let X=class 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=e=>e.keyCode===s.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(e){const{navigationIndex:t,clearButtonIndex:s,uploadButtonIndex:o}=this.props;t!==e.navigationIndex&&(t===s&&this._clearElement&&this._clearElement.focus(),t===o&&this._uploadElement&&this._uploadElement.focus())}render(){const{disabled:e,navigationIndex:t,clearButtonIndex:o,uploadButtonIndex:i,actionsLayout:a}=this.props,l=n.provideLocalizationService(this),r=s.classNames("k-actions","k-hstack",{"k-justify-content-start":"start"===a,"k-justify-content-center":"center"===a,"k-justify-content-end":"end"===a,"k-justify-content-stretch":"stretched"===a}),d=s.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-solid-base","k-clear-selected",e?"k-disabled":"",t===o?"k-focus":""),p=s.classNames("k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary","k-primary","k-upload-selected",e?"k-disabled":"",t===i?"k-focus":"");return c.createElement("div",{className:r},c.createElement("button",{ref:e=>{this._clearElement=e},type:"button",className:d,tabIndex:0,onClick:this.onClearClick,onKeyDown:e=>this.checkEnterKey(e)&&this.onClearClick()},l.toLanguageString(h,_[h])),c.createElement("button",{ref:e=>{this._uploadElement=e},type:"button",className:p,tabIndex:0,onClick:this.onUploadClick,onKeyDown:e=>this.checkEnterKey(e)&&this.onUploadClick()},l.toLanguageString(C,_[C])))}};n.registerForLocalization(X);let Y=class extends c.Component{render(){const{isUploading:e,isUploaded:t,isUploadFailed:o}=this.props,i=s.classNames("k-upload-status"),l=e||o||!t?!e&&o?"exclamation-circle":e?"upload":"":"check",r=e||o||!t?!e&&o?{icon:a.exclamationCircleIcon}:e?{icon:a.uploadIcon}:{}:{icon:a.checkIcon};let d="";const p=n.provideLocalizationService(this);return e?d=p.toLanguageString(v,_[v]):(t||o)&&(d=p.toLanguageString(g,_[g])),c.createElement("div",{className:i},c.createElement(s.IconWrap,{name:l,...r}),d)}};n.registerForLocalization(Y);class ee extends c.Component{constructor(){super(...arguments),this._lastDocumentDragOver=null,this._lastElementDragOver=null,this._documentActive=!1,this._elementActive=!1,this.onDocumentDragEnter=()=>{if(!this.documentActive){this.documentActive=!0;const e=()=>{this.isDragOver(this._lastDocumentDragOver)&&(this.documentActive=!1,clearInterval(this._documentInterval),this._documentInterval=null,this._lastDocumentDragOver=null)};this._documentInterval=setInterval(e,100)}},this.onDocumentDragOver=()=>{this._lastDocumentDragOver=new Date},this.onElementDragEnter=()=>{if(!this.elementActive){this.elementActive=!0;const e=()=>{this.isDragOver(this._lastElementDragOver)&&(this.elementActive=!1,clearInterval(this._elementInterval),this._elementInterval=null,this._lastElementDragOver=null)};this._elementInterval=setInterval(e,100)}},this.onElementDragOver=e=>{e.preventDefault(),this._lastElementDragOver=new Date},this.onDrop=e=>{e.preventDefault();const t=e.dataTransfer.files;t.length>0&&!this.props.disabled&&this.props.onAdd&&(this.props.multiple||t.length<=1)&&this.props.onAdd.call(void 0,t)},this.isDragOver=e=>(new Date).getTime()-(e||new Date).getTime()>100}get documentActive(){return this._documentActive}set documentActive(e){const t=this.documentActive;this._documentActive=e,e!==t&&this.forceUpdate()}get elementActive(){return this._elementActive}set elementActive(e){const t=this._elementActive;this._elementActive=e,e!==t&&this.setState({})}componentDidMount(){document.addEventListener("dragenter",this.onDocumentDragEnter),document.addEventListener("dragover",this.onDocumentDragOver)}componentWillUnmount(){document.removeEventListener("dragenter",this.onDocumentDragEnter),document.removeEventListener("dragover",this.onDocumentDragOver)}render(){const{addButtonComponent:e,fileGroup:t}=this.props,o=n.provideLocalizationService(this).toLanguageString(m,_[m]),i=s.classNames("k-dropzone k-upload-dropzone",this.documentActive?"k-dropzone-active":"",this.elementActive?"k-dropzone-hovered":""),[a,l,r,d]=j.getFileStatus(t),p=s.classNames("k-dropzone-hint",{});return c.createElement("div",{className:i,onDrop:this.onDrop,onDragEnter:this.onElementDragEnter,onDragOver:this.onElementDragOver},e,a||l||r||d?c.createElement(Y,{isUploading:a,isUploaded:l,isUploadFailed:r}):c.createElement("div",{className:p},o))}}n.registerForLocalization(ee);const te=class extends c.Component{constructor(){super(...arguments),this._container=null,this._uploadAddButton=null,this.focus=()=>{if(this._uploadAddButton)return this._uploadAddButton.focus()},this.onAdd=e=>{this.props.onAdd&&this.props.onAdd.call(void 0,e)},this.onRetry=e=>{this.props.onRetry&&this.props.onRetry.call(void 0,e)},this.onCancel=e=>{this.props.onCancel&&this.props.onCancel.call(void 0,e)},this.onClear=()=>{this.props.onClear&&this.props.onClear.call(void 0)},this.onUpload=()=>{this.props.onUpload&&this.props.onUpload.call(void 0)},this.onRemove=e=>{this.props.onRemove&&this.props.onRemove.call(void 0,e)},this.onKeyDown=e=>{this.props.onKeyDown&&this.props.onKeyDown.call(void 0,e,this.isRtl)},this.onFocus=e=>{this.props.onFocus&&this.props.onFocus.call(void 0,e)},this.onBlur=e=>{this.props.onBlur&&this.props.onBlur.call(void 0,e)},this.onClick=e=>{this.props.onClick&&this.props.onClick.call(void 0,e)}}get async(){const{autoUpload:e,batch:t,withCredentials:s,saveField:o,saveHeaders:n,saveMethod:i,saveUrl:a,responseType:l,removeField:r,removeHeaders:d,removeMethod:c,removeUrl:p}=this.props;return{autoUpload:e,batch:t,withCredentials:s,saveField:o,saveHeaders:n,saveMethod:i,saveUrl:a,responseType:l,removeField:r,removeHeaders:d,removeMethod:c,removeUrl:p}}get groupsCount(){return Object.keys(this.props.groupedFiles).length}get lastGroupIndex(){return this.groupsCount-1}get addButtonIndex(){return-1}get clearButtonIndex(){return this.lastGroupIndex+1}get uploadButtonIndex(){return this.lastGroupIndex+2}get isRtl(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1}get actionElement(){if(this._uploadAddButton)return this._uploadAddButton.actionElement}render(){const{multiple:e,disabled:t,tabIndex:o,accept:n,showFileList:i,groupedFiles:a,navigationIndex:l,showActionButtons:r,actionsLayout:d,notFocusedIndex:p,listItemUI:u,id:h,ariaLabelledBy:m,ariaDescribedBy:g,selectMessageUI:v}=this.props,f=s.classNames("k-upload",{"k-upload-empty":0===Object.keys(a).length},this.props.className,t?"k-disabled":""),y=`${h}-list`,E=c.createElement(Q,{id:h,ariaLabelledBy:m,ariaDescribedBy:g,ref:e=>{this._uploadAddButton=e},accept:n,async:this.async,addButtonIndex:this.addButtonIndex,navigationIndex:l,notFocusedIndex:p,tabIndex:o,multiple:e,disabled:t,hasFiles:!!a&&Object.keys(a).length>0,selectMessageUI:v,onAdd:this.onAdd,onClick:this.onClick,ariaControls:y,ariaExpanded:i});return c.createElement("div",{ref:e=>{this._container=e},className:f,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur},c.createElement(ee,{addButtonComponent:E,fileGroup:a,disabled:t,multiple:e,onAdd:this.onAdd}),i?c.createElement(G,{groupedFiles:a,disabled:t,async:this.async,navigationIndex:l,listItemUI:u,onCancel:this.onCancel,onRemove:this.onRemove,onRetry:this.onRetry,onClick:this.onClick,listId:y}):void 0,r?c.createElement(X,{disabled:t,navigationIndex:l,clearButtonIndex:this.clearButtonIndex,uploadButtonIndex:this.uploadButtonIndex,actionsLayout:d,onUpload:this.onUpload,onClear:this.onClear,onClick:this.onClick}):void 0)}};te.defaultProps={disabled:!1,groupedFiles:{},multiple:!0,actionsLayout:"end"};let se=te;const oe=s.withIdHOC(se);oe.displayName="KendoReactUploadUI";const ne=-2,ie=-1;class ae extends c.Component{constructor(e){super(e),this._uploadUI=null,this.focus=()=>{this._uploadUI&&this._uploadUI.focus()},this.onKeyDown=(e,t)=>{const o=this.navIndex,n=Object.keys(this.props.groupedFiles),i=n.length-1,a=this.props.autoUpload||0===n.length?i:i+1,l=i+1,r=l+1,d=o===ne?ie:o;let c=o;switch(e.keyCode){case s.Keys.up:o>-1&&(c=d-1);break;case s.Keys.down:o<a&&(c=d+1);break;case s.Keys.left:t?o===l&&(c=d+1):o===r&&(c=d-1);break;case s.Keys.right:t?o===r&&(c=d-1):o===l&&(c=d+1);break;case s.Keys.enter:if(o===ie||o===ne){const e=s.getActiveElement(document);this.actionElement&&s.canUseDOM&&-1===(null==e?void 0:e.className.indexOf("k-upload-button"))&&-1===(null==e?void 0:e.className.indexOf("k-upload-selected"))&&-1===(null==e?void 0:e.className.indexOf("k-clear-selected"))&&this.actionElement.click()}o>=0&&o<=i&&this.onRetry(n[o]);break;case s.Keys.space:(o===ie||o===ne)&&this.actionElement&&this.actionElement.click(),e.preventDefault();break;case s.Keys.tab:c=ne;break;case s.Keys.delete:o>=0&&o<=i&&(c=d-1,this.onRemove(n[o]));break;case s.Keys.esc:o>=0&&o<=i&&(c=d-1,this.onCancel(n[o]))}this.navIndex=c},this.onCancel=e=>{this.props.onCancel&&this.props.onCancel.call(void 0,e)},this.onClear=()=>{this.navIndex=ie,this.props.onClear&&this.props.onClear.call(void 0)},this.onUpload=()=>{this.navIndex=ie,this.props.onUpload&&this.props.onUpload.call(void 0)},this.onRetry=e=>{this.props.onRetry&&this.props.onRetry.call(void 0,e)},this.onRemove=e=>{this.navIndex=this.navIndex>ie?this.navIndex-1:ie,this.props.onRemove&&this.props.onRemove.call(void 0,e)},this.onAdd=e=>{this.navIndex=ie,this.props.onAdd&&this.props.onAdd.call(void 0,e)},this.onClick=e=>{this.navIndex=e},this.onFocus=()=>{this._blurTimeout&&(clearTimeout(this._blurTimeout),this._blurTimeout=void 0)},this.onBlurTimeout=()=>{this.navIndex=ne,this._blurTimeout=void 0},this.onBlur=()=>{clearTimeout(this._blurTimeout),this._blurTimeout=window.setTimeout(this.onBlurTimeout)},this._navIndex=ne}get navIndex(){return this._navIndex}set navIndex(e){const t=this.navIndex;this._navIndex=e,e!==t&&this.forceUpdate()}get actionElement(){if(this._uploadUI)return this._uploadUI.actionElement}componentDidUpdate(e){const t=Object.keys(e.groupedFiles).length,s=Object.keys(this.props.groupedFiles).length;t>s&&this.navIndex>ie&&(this.navIndex=this.navIndex-(t-s))}render(){const{onClear:e,onRemove:t,onRetry:s,onCancel:o,onUpload:n,onAdd:i,...a}=this.props;return c.createElement(oe,{ref:e=>{this._uploadUI=e},className:this.props.className,onKeyDown:this.onKeyDown,navigationIndex:this.navIndex,notFocusedIndex:ne,onAdd:this.onAdd,onClear:this.onClear,onUpload:this.onUpload,onRemove:this.onRemove,onRetry:this.onRetry,onCancel:this.onCancel,onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur,...a})}}const le=(e,t)=>{t.push(e)},re=(e,t)=>{Object.keys(e).forEach((s=>{t(e[s],s)}))},de={copyState:e=>(e||[]).map((e=>({...e}))),addMany:(e,t)=>{e.forEach((e=>le(e,t)))},add:le,groupFilesByUid:e=>{const t={};return e.forEach((e=>{t[e.uid]?t[e.uid].push(e):t[e.uid]=[e]})),t},filesForUpload:e=>{const t={};return re(e,((e,s)=>{let o=!0;e.forEach((e=>{(e.status!==p.Selected||e.validationErrors&&e.validationErrors.length>0)&&(o=!1)})),o&&(t[s]=e)})),t},setFilesStatus:(e,t)=>{re(e,(e=>{e.forEach((e=>{e.status=t}))}))},flatFileGroup:e=>{const t=[];return re(e,(e=>{t.push.apply(t,e)})),t},groupForEach:re},ce=(e,t)=>{Object.keys(t).forEach((s=>{e.append(s,t[s])}))},pe=(e,t,s)=>{const o=new FormData;return ce(o,s),e.forEach((e=>{const s=e.getRawFile?e.getRawFile():"";s?o.append(t,s,e.name):o.append(t,s)})),o},ue=(e,t,s)=>{const o=new FormData;return ce(o,s),e.forEach((e=>{o.append(t,e)})),o},he=(e,t)=>({headers:e,responseType:t.responseType,withCredentials:t.withCredentials}),me=e=>{const t={};return Object.keys(e).forEach((s=>{t[s]=e[s]})),t},ge=e=>{const{data:t,config:s,...o}=e;return{response:t,...o}},ve="invalidMaxFileSize",fe="invalidMinFileSize",ye="invalidFileExtension",Ee=(e,t)=>{t.length>0&&t.indexOf((e.extension||"").toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(ye)<0&&e.validationErrors.push(ye))},ke=(e,t,s)=>{0!==t&&(e.size||0)<t&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(fe)<0&&e.validationErrors.push(fe)),0!==s&&(e.size||0)>s&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(ve)<0&&e.validationErrors.push(ve))},be=(e,t)=>{const s=(e=>e.map((e=>("."===e.substring(0,1)?e:"."+e).toLowerCase())))(t.allowedExtensions||[]),o=t.maxFileSize||0,n=t.minFileSize||0;let i;for(i=0;i<e.length;i++)Ee(e[i],s),ke(e[i],n,o)},Fe=Object.freeze({name:"@progress/kendo-react-upload",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.3.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),Ce=class extends c.Component{constructor(e){super(e),this._httpSubscriptions={},this._uploadNavigation=null,this.showLicenseWatermark=!1,this.focus=()=>{this._uploadNavigation&&this._uploadNavigation.focus()},this.triggerUpload=()=>{this.onUpload()},this.uploadFiles=e=>{const t=this.async;de.setFilesStatus(e,p.Uploading),de.groupForEach(e,((e,s)=>{const o={target:this,files:e,headers:me(t.saveHeaders||{}),additionalData:{}};this.props.onBeforeUpload&&this.props.onBeforeUpload.call(void 0,o);const n=he(o.headers,this.async),i=pe(e,t.saveField,o.additionalData);if(this.isCustomSave)this.props.saveUrl(e,{formData:i,requestOptions:n},this.onUploadProgress).then((e=>this.onUploadSuccess(e.uid))).catch((e=>this.onUploadError(e.uid)));else{const e=r.CancelToken.source();this._httpSubscriptions[s]=e,r({method:t.saveMethod,url:t.saveUrl,data:i,cancelToken:e.token,...n,onUploadProgress:e=>this.onUploadProgress(s,e)}).then((e=>this.onUploadSuccess(s,e))).catch((e=>this.onUploadError(s,e)))}}))},this.removeFiles=e=>{const t=this.async;de.groupForEach(e,((e,s)=>{const o={target:this,files:e,headers:me(t.removeHeaders||{}),additionalData:{}};this.props.onBeforeRemove&&this.props.onBeforeRemove.call(void 0,o);const n=e.map((e=>e.name)),i=he(o.headers,this.async),a=ue(n,t.removeField,o.additionalData);this.isCustomRemove?this.props.removeUrl(e,{formData:a,requestOptions:i}).then((e=>this.onRemoveSuccess(e.uid))).catch((e=>this.onRemoveError(e.uid))):r({method:t.removeMethod,url:t.removeUrl,data:a,...i}).then((e=>this.onRemoveSuccess(s,e))).catch((e=>this.onRemoveError(s,e)))}))},this.onUpload=()=>{const e=this.fileStateCopy,t=de.groupFilesByUid(e),s=de.filesForUpload(t);this.uploadFiles(s);const o=()=>{if(this.props.onStatusChange){const t={target:this,newState:e,affectedFiles:de.flatFileGroup(s)};this.props.onStatusChange.call(void 0,t)}};this.isControlled?o():this.setState({files:e},o)},this.onAdd=e=>{let t,s=j.getAllFileInfo(e);if(s=j.assignGuidToFiles(s,this.async.batch),be(s,this.props.restrictions),t=this.props.multiple?this.fileStateCopy:[],de.addMany(s,t),this.async.autoUpload){const e=de.groupFilesByUid(t);this.uploadFiles(de.filesForUpload(e))}const o=()=>{if(this.props.onAdd){const e={target:this,newState:t,affectedFiles:s};this.props.onAdd.call(void 0,e)}};this.isControlled?o():this.setState({files:t},o)},this.onUploadProgress=(e,t)=>{const s=Math.round(100*t.loaded/(t.total||0))||0,o=()=>{if(this.props.onProgress){const t=this.fileStateCopy,o=t.filter((t=>t.uid===e));this.setFilesProgress(t,s);const n={target:this,newState:t,affectedFiles:o};this.props.onProgress.call(void 0,n)}};this.isControlled?o():this.setState((t=>{const o=t.files,n=o.filter((t=>t.uid===e));if(this.setFilesProgress(n,s),n.length)return{files:o}}),o)},this.onUploadSuccess=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));o.forEach((e=>{e.status=p.Uploaded,e.progress=100})),delete this._httpSubscriptions[e];const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onUploadError=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));if(o.forEach((e=>{e.status=p.UploadFailed})),delete this._httpSubscriptions[e],!o.length)return;const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onRemove=e=>{const t=this.fileStateCopy,s=t.filter((t=>t.uid===e)),o=t.filter((t=>t.uid!==e));if([p.Uploaded,p.Initial,p.RemoveFailed].indexOf(s[0].status)>-1){const o={[e]:s};de.setFilesStatus(o,p.Removing),this.removeFiles(o);const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:t,affectedFiles:s};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:t},n)}else{const e=()=>{if(this.props.onRemove){const e={target:this,newState:o,affectedFiles:s};this.props.onRemove.call(void 0,e)}};this.isControlled?e():this.setState({files:o},e)}},this.onRemoveSuccess=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e)),n=s.filter((t=>t.uid!==e)),i=()=>{if(this.props.onRemove){const e={target:this,newState:n,affectedFiles:o,response:t?ge(t):void 0};this.props.onRemove.call(void 0,e)}};this.isControlled?i():this.setState({files:n},i)},this.onRemoveError=(e,t)=>{const s=this.fileStateCopy,o=s.filter((t=>t.uid===e));o.forEach((e=>{e.status=p.RemoveFailed}));const n=()=>{if(this.props.onStatusChange){const e={target:this,newState:s,affectedFiles:o,response:t?ge(t):void 0};this.props.onStatusChange.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onRetry=e=>{const t=this.fileStateCopy,s=de.groupFilesByUid(t.filter((t=>t.uid===e)));de.setFilesStatus(s,p.Uploading),this.uploadFiles(s);const o=()=>{if(this.props.onStatusChange){const e={target:this,newState:t,affectedFiles:de.flatFileGroup(s)};this.props.onStatusChange.call(void 0,e)}};this.isControlled?o():this.setState({files:t},o)},this.onCancel=e=>{const t=this.fileStateCopy,s=t.filter((t=>t.uid!==e)),o=t.filter((t=>t.uid===e));if(this._httpSubscriptions[e]&&(this._httpSubscriptions[e].cancel(),delete this._httpSubscriptions[e]),this.props.onCancel){const t={target:this,uid:e};this.props.onCancel.call(void 0,t)}const n=()=>{if(this.props.onRemove){const e={target:this,newState:s,affectedFiles:o};this.props.onRemove.call(void 0,e)}};this.isControlled?n():this.setState({files:s},n)},this.onClear=()=>{if(!this.files.length)return;Object.keys(this._httpSubscriptions).forEach((e=>{this._httpSubscriptions[e].cancel()})),this._httpSubscriptions={};const e=()=>{if(this.props.onRemove){const e={target:this,newState:[],affectedFiles:this.fileStateCopy};this.props.onRemove.call(void 0,e)}};this.isControlled?e():this.setState({files:[]},e)},this.showLicenseWatermark=!s.validatePackage(Fe,{component:"Upload"}),this.licenseMessage=s.getLicenseMessage(Fe),this.state={files:e.defaultFiles||[]}}get async(){const{autoUpload:e,batch:t,removeField:s,removeHeaders:o,removeMethod:n,removeUrl:i,responseType:a,saveField:l,saveHeaders:r,saveMethod:d,saveUrl:c,withCredentials:p}=this.props;return{autoUpload:e,batch:t,removeField:s,removeHeaders:o,removeMethod:n,removeUrl:i,responseType:a,saveField:l,saveHeaders:r,saveMethod:d,saveUrl:c,withCredentials:p}}get files(){return(this.isControlled?this.props.files:this.state.files)||[]}get isControlled(){return!this.props.defaultFiles}get isCustomSave(){return this.props.saveUrl&&"function"==typeof this.props.saveUrl}get isCustomRemove(){return this.props.removeUrl&&"function"==typeof this.props.removeUrl}get fileStateCopy(){return this.isControlled?de.copyState(this.props.files):de.copyState(this.state.files)}get actionElement(){if(this._uploadNavigation)return this._uploadNavigation.actionElement}setFilesProgress(e,t){e.forEach((e=>{e.progress=t,e.status===p.Uploading&&100===t&&(e.status=p.Uploaded)}))}render(){var e;const{showFileList:t,onAdd:o,onRemove:n,onCancel:i,autoUpload:a,showActionButtons:l,actionsLayout:r,tabIndex:d,disabled:p,...u}=this.props,h=de.groupFilesByUid(this.files),m=de.filesForUpload(h);return c.createElement(c.Fragment,null,c.createElement(ae,{groupedFiles:h,className:this.props.className,showFileList:t&&!!Object.keys(h).length,showActionButtons:l&&!a&&(!!Object.keys(m).length||!(null==(e=this.props.defaultFiles)||!e.length)),actionsLayout:r,autoUpload:a,disabled:p,onAdd:this.onAdd,onRemove:this.onRemove,onClear:this.onClear,onUpload:this.onUpload,onRetry:this.onRetry,onCancel:this.onCancel,tabIndex:s.getTabIndex(d,p),ref:e=>{this._uploadNavigation=e},...u}),this.showLicenseWatermark&&c.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}};Ce.defaultProps={autoUpload:!0,batch:!1,removeField:"fileNames",removeHeaders:{},removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:{},saveMethod:"POST",saveUrl:"",withCredentials:!0,restrictions:{allowedExtensions:[],maxFileSize:0,minFileSize:0},multiple:!0,showFileList:!0,showActionButtons:!0,actionsLayout:"end",disabled:!1},Ce.propTypes={autoUpload:l.bool,batch:l.bool,withCredentials:l.bool,saveField:l.string,saveHeaders:l.object,saveMethod:l.string,saveUrl:l.oneOfType([l.string,l.func]),responseType:l.oneOf(["arraybuffer","blob","json","text"]),removeField:l.string,removeHeaders:l.object,removeMethod:l.string,removeUrl:l.oneOfType([l.string,l.func]),multiple:l.bool,disabled:l.bool,showFileList:l.bool,showActionButtons:l.bool,actionsLayout:l.oneOf(["start","center","end","stretched"]),tabIndex:l.number,accept:l.string,listItemUI:l.oneOfType([l.func,l.string,l.shape({render:l.func.isRequired})]),restrictions:l.shape({allowedExtensions:l.arrayOf(l.string),maxFileSize:l.number,minFileSize:l.number}),files:l.arrayOf(l.shape({uid:l.string,name:l.string,extension:l.string,size:l.number,validationErrors:l.arrayOf(l.string),status:l.oneOf([p.Initial,p.RemoveFailed,p.Removing,p.Selected,p.UploadFailed,p.Uploaded,p.Uploading]),progress:l.number,getRawFile:l.func})),defaultFiles:l.arrayOf(l.shape({uid:l.string,name:l.string,extension:l.string,size:l.number,validationErrors:l.arrayOf(l.string),status:l.oneOf([p.Initial,p.RemoveFailed,p.Removing,p.Selected,p.UploadFailed,p.Uploaded,p.Uploading]),progress:l.number,getRawFile:l.func}))};let Ue=Ce;const Ie=c.forwardRef(((e,t)=>{const o=!s.validatePackage(Fe,{component:"ExternalDropZone"}),i=s.getLicenseMessage(Fe),l=c.useRef(null),r=c.useRef(null),d=c.useRef(null),p=c.useRef(!1),u=c.useRef(null),{uploadRef:h}=e,m=h.current,[g,v]=c.useState(!1),f=c.useMemo((()=>new n.IntlService("en")),[]),y=n.useLocalization(),E=y.toLanguageString(D,_[D]),[k,b]=c.useState(y.toLanguageString(R,_[R])),F=e.customHint||c.createElement("span",null,E),C=e.customNote||c.createElement("span",null,k),U=c.useCallback((()=>{r.current&&r.current.focus()}),[r]);c.useImperativeHandle(l,(()=>({element:r.current,focus:U,props:e}))),c.useImperativeHandle(t,(()=>l.current)),c.useEffect((()=>{if(m){const e=m.props.restrictions.allowedExtensions;if(e&&e.length){const t=f.format(y.toLanguageString(w,_[w]),[e]);b(t)}}}),[m,y,f]);const I=c.useCallback((e=>(new Date).getTime()-(e||new Date).getTime()>100),[]),S=c.useCallback((t=>{t.preventDefault();const s=t.dataTransfer.files;s.length>0&&!e.disabled&&h&&h.current&&(h.current.onAdd&&(t.preventDefault(),h.current.onAdd(s)),e.onDrop&&e.onDrop.call(void 0,t))}),[e.disabled,h,e.onDrop]),x=c.useCallback((t=>{if(p){p.current=!0;const e=()=>{I(u.current)&&(v(!1),p.current=!1,clearInterval(d.current),d.current=null,u.current=null)};d.current=setInterval(e,100)}e.onElementDragEnter&&e.onElementDragEnter.call(void 0,t)}),[p,d,u,I,e.onElementDragEnter]),N=c.useCallback((t=>{t.preventDefault(),u.current=new Date,v(!0),e.onElementDragOver&&e.onElementDragOver.call(void 0,t)}),[u,e.onElementDragOver]);return c.createElement("div",{ref:r,id:e.id,className:s.classNames("k-external-dropzone",{"k-external-dropzone-hover":g,"k-disabled":e.disabled},e.className),tabIndex:s.getTabIndex(e.tabIndex,e.disabled,void 0),onDrop:S,onDragEnter:x,onDragOver:N},c.createElement("div",{style:e.style,className:"k-dropzone-inner"},c.createElement(s.IconWrap,{name:"upload",icon:a.uploadIcon,className:"k-dropzone-icon",size:"xxxlarge"}),c.createElement("span",{className:"k-dropzone-hint"},F),c.createElement("span",{className:"k-dropzone-note"},C)),o&&c.createElement(s.WatermarkOverlay,{message:i}))})),Se={id:l.string,tabIndex:l.number,editorRef:l.oneOfType([l.func,l.shape({current:l.any})]),disabled:l.bool,onDrop:l.func,onElementDragEnter:l.func,onElementDragOver:l.func};Ie.displayName="KendoReactExternalDropZone",Ie.propTypes=Se,e.ExternalDropZone=Ie,e.Upload=Ue,e.UploadActionButtons=X,e.UploadAddButton=Q,e.UploadDropZone=ee,e.UploadFileStatus=p,e.UploadInput=Z,e.UploadList=G,e.UploadListActionButton=H,e.UploadListGroup=q,e.UploadListMultiItem=$,e.UploadListSingleItem=P,e.UploadStatus=Y,e.UploadUI=oe,e.headerStatusUploaded=g,e.headerStatusUploading=v,e.invalidMaxFileSize=f,e.uploadMessages=_,e.uploadSelect=k,e.uploadUtils=j}));
|
package/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/messages/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/messages/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/package-metadata.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
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 e=Object.freeze({name:"@progress/kendo-react-upload",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-upload",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1767620323,version:"13.3.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "13.
|
|
13
|
+
publishDate: 1767620323,
|
|
14
|
+
version: "13.3.0-develop.1",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-upload",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0-develop.1",
|
|
4
4
|
"description": "React Upload component helps users transfer files from their file systems to dedicated server handlers. KendoReact Upload package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-buttons": "13.
|
|
30
|
-
"@progress/kendo-react-common": "13.
|
|
31
|
-
"@progress/kendo-react-intl": "13.
|
|
32
|
-
"@progress/kendo-react-progressbars": "13.
|
|
29
|
+
"@progress/kendo-react-buttons": "13.3.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-common": "13.3.0-develop.1",
|
|
31
|
+
"@progress/kendo-react-intl": "13.3.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-progressbars": "13.3.0-develop.1",
|
|
33
33
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
34
34
|
"axios": "^1.13.2",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package": {
|
|
57
57
|
"productName": "KendoReact",
|
|
58
58
|
"productCode": "KENDOUIREACT",
|
|
59
|
-
"publishDate":
|
|
59
|
+
"publishDate": 1767620323,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|
package/utils/connectionUtils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/utils/stateUtils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/utils/stateUtils.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/utils/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/utils/utils.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/utils/validationUtils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|