@aws-amplify/ui-react-storage 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/{createAmplifyAuthAdapter-BUDNgORg.js → createAmplifyAuthAdapter-B9FoH-Ir.js} +12 -2
  3. package/dist/esm/components/StorageBrowser/createStorageBrowser.mjs +7 -1
  4. package/dist/esm/components/StorageBrowser/views/LocationActionView/getActionViewTableData.mjs +3 -1
  5. package/dist/esm/version.mjs +1 -1
  6. package/dist/index.js +4 -6
  7. package/dist/types/components/FileUploader/ui/Container/Container.d.ts +1 -1
  8. package/dist/types/components/FileUploader/ui/DropZone/DropZone.d.ts +2 -2
  9. package/dist/types/components/FileUploader/ui/DropZone/types.d.ts +0 -1
  10. package/dist/types/components/FileUploader/ui/FileList/FileControl.d.ts +2 -2
  11. package/dist/types/components/FileUploader/ui/FileList/FileDetails.d.ts +2 -2
  12. package/dist/types/components/FileUploader/ui/FileList/FileList.d.ts +2 -2
  13. package/dist/types/components/FileUploader/ui/FileList/FileRemoveButton.d.ts +2 -2
  14. package/dist/types/components/FileUploader/ui/FileList/FileStatusMessage.d.ts +2 -2
  15. package/dist/types/components/FileUploader/ui/FileList/FileThumbnail.d.ts +2 -2
  16. package/dist/types/components/FileUploader/ui/FileListFooter/FileListFooter.d.ts +2 -2
  17. package/dist/types/components/FileUploader/ui/FileListHeader/FileListHeader.d.ts +2 -2
  18. package/dist/types/components/FileUploader/ui/FilePicker/FilePicker.d.ts +2 -2
  19. package/dist/types/components/StorageBrowser/actions/configs/context.d.ts +0 -1
  20. package/dist/types/components/StorageBrowser/composables/context.d.ts +0 -1
  21. package/dist/types/components/StorageBrowser/composables/types.d.ts +0 -1
  22. package/dist/types/components/StorageBrowser/context/elements/defaults.d.ts +1 -1
  23. package/dist/types/components/StorageBrowser/context/elements/definitions.d.ts +1 -2
  24. package/dist/types/components/StorageBrowser/controls/context.d.ts +0 -1
  25. package/dist/types/components/StorageBrowser/controls/types.d.ts +0 -1
  26. package/dist/types/components/StorageBrowser/providers/store/actionType/types.d.ts +0 -1
  27. package/dist/types/components/StorageBrowser/providers/store/files/types.d.ts +0 -1
  28. package/dist/types/components/StorageBrowser/useAction/context.d.ts +0 -1
  29. package/dist/types/components/StorageBrowser/views/LocationActionView/CopyView/types.d.ts +0 -1
  30. package/dist/types/components/StorageBrowser/views/LocationActionView/CreateFolderView/types.d.ts +0 -1
  31. package/dist/types/components/StorageBrowser/views/LocationActionView/DeleteView/types.d.ts +0 -1
  32. package/dist/types/components/StorageBrowser/views/LocationActionView/UploadView/types.d.ts +0 -1
  33. package/dist/types/components/StorageBrowser/views/LocationActionView/types.d.ts +0 -1
  34. package/dist/types/components/StorageBrowser/views/LocationDetailView/types.d.ts +0 -1
  35. package/dist/types/components/StorageBrowser/views/LocationsView/types.d.ts +0 -1
  36. package/dist/types/components/StorageImage/StorageImage.d.ts +2 -2
  37. package/dist/types/components/StorageManager/ui/Container/Container.d.ts +1 -1
  38. package/dist/types/components/StorageManager/ui/DropZone/DropZone.d.ts +2 -2
  39. package/dist/types/components/StorageManager/ui/DropZone/types.d.ts +0 -1
  40. package/dist/types/components/StorageManager/ui/FileList/FileControl.d.ts +2 -2
  41. package/dist/types/components/StorageManager/ui/FileList/FileDetails.d.ts +2 -2
  42. package/dist/types/components/StorageManager/ui/FileList/FileList.d.ts +2 -2
  43. package/dist/types/components/StorageManager/ui/FileList/FileRemoveButton.d.ts +2 -2
  44. package/dist/types/components/StorageManager/ui/FileList/FileStatusMessage.d.ts +2 -2
  45. package/dist/types/components/StorageManager/ui/FileList/FileThumbnail.d.ts +2 -2
  46. package/dist/types/components/StorageManager/ui/FileListFooter/FileListFooter.d.ts +2 -2
  47. package/dist/types/components/StorageManager/ui/FileListHeader/FileListHeader.d.ts +2 -2
  48. package/dist/types/components/StorageManager/ui/FilePicker/FilePicker.d.ts +2 -2
  49. package/dist/types/version.d.ts +1 -1
  50. package/package.json +8 -8
package/dist/browser.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-BUDNgORg.js');
5
+ var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-B9FoH-Ir.js');
6
6
  var internals = require('@aws-amplify/storage/internals');
7
7
  require('@aws-amplify/ui');
8
8
  require('aws-amplify/storage');
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var internals = require('@aws-amplify/storage/internals');
5
4
  var ui = require('@aws-amplify/ui');
5
+ var internals = require('@aws-amplify/storage/internals');
6
6
  var storage = require('aws-amplify/storage');
7
7
  var uiReactCore = require('@aws-amplify/ui-react-core');
8
8
  var uiReact = require('@aws-amplify/ui-react');
@@ -32,6 +32,8 @@ function _interopNamespace(e) {
32
32
 
33
33
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
34
 
35
+ const VERSION = '3.6.0';
36
+
35
37
  const constructBucket = ({ bucket: bucketName, region, }) => ({ bucketName, region });
36
38
  const parseAccessGrantLocation = (location) => {
37
39
  const { permission, scope, type } = location;
@@ -2618,7 +2620,9 @@ const getActionViewTableData = ({ tasks, displayText, isProcessing, locationKey,
2618
2620
  type: 'number',
2619
2621
  content: {
2620
2622
  value: progress,
2621
- displayValue: `${getPercentValue(progress ?? 0)}%`,
2623
+ displayValue: `${getPercentValue(
2624
+ // Default progress to 100% if progress value is unavailable but status is recognized as complete
2625
+ progress ?? status === 'COMPLETE' ? 1 : 0)}%`,
2622
2626
  },
2623
2627
  };
2624
2628
  }
@@ -4799,6 +4803,11 @@ const useView = (type) => {
4799
4803
  function createStorageBrowser(input) {
4800
4804
  assertRegisterAuthListener(input.config.registerAuthListener);
4801
4805
  const { accountId, customEndpoint, registerAuthListener, getLocationCredentials, region, } = input.config;
4806
+ ui.setUserAgent({
4807
+ componentName: 'StorageBrowser',
4808
+ packageName: 'react-storage',
4809
+ version: VERSION,
4810
+ });
4802
4811
  const actions = {
4803
4812
  default: {
4804
4813
  ...defaultActionConfigs,
@@ -4985,6 +4994,7 @@ const createAmplifyAuthAdapter = () => {
4985
4994
  };
4986
4995
 
4987
4996
  exports.DEFAULT_STORAGE_BROWSER_DISPLAY_TEXT = DEFAULT_STORAGE_BROWSER_DISPLAY_TEXT;
4997
+ exports.VERSION = VERSION;
4988
4998
  exports.componentsDefault = componentsDefault;
4989
4999
  exports.createAmplifyAuthAdapter = createAmplifyAuthAdapter;
4990
5000
  exports.createStorageBrowser = createStorageBrowser;
@@ -1,6 +1,7 @@
1
1
  import React__default from 'react';
2
+ import { setUserAgent } from '@aws-amplify/ui';
3
+ import { VERSION } from '../../version.mjs';
2
4
  import '@aws-amplify/storage/internals';
3
- import '@aws-amplify/ui';
4
5
  import { assertRegisterAuthListener } from './validators/assertRegisterAuthListener.mjs';
5
6
  import 'aws-amplify/storage';
6
7
  import { ActionConfigsProvider } from './actions/configs/context.mjs';
@@ -40,6 +41,11 @@ import { DisplayTextProvider } from './displayText/context.mjs';
40
41
  function createStorageBrowser(input) {
41
42
  assertRegisterAuthListener(input.config.registerAuthListener);
42
43
  const { accountId, customEndpoint, registerAuthListener, getLocationCredentials, region, } = input.config;
44
+ setUserAgent({
45
+ componentName: 'StorageBrowser',
46
+ packageName: 'react-storage',
47
+ version: VERSION,
48
+ });
43
49
  const actions = {
44
50
  default: {
45
51
  ...defaultActionConfigs,
@@ -116,7 +116,9 @@ const getActionViewTableData = ({ tasks, displayText, isProcessing, locationKey,
116
116
  type: 'number',
117
117
  content: {
118
118
  value: progress,
119
- displayValue: `${getPercentValue(progress ?? 0)}%`,
119
+ displayValue: `${getPercentValue(
120
+ // Default progress to 100% if progress value is unavailable but status is recognized as complete
121
+ progress ?? status === 'COMPLETE' ? 1 : 0)}%`,
120
122
  },
121
123
  };
122
124
  }
@@ -1,3 +1,3 @@
1
- const VERSION = '3.5.0';
1
+ const VERSION = '3.6.0';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var uiReactCore = require('@aws-amplify/ui-react-core');
9
9
  var auth = require('aws-amplify/auth');
10
10
  var storage = require('aws-amplify/storage');
11
11
  var internal = require('@aws-amplify/ui-react/internal');
12
- var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-BUDNgORg.js');
12
+ var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-B9FoH-Ir.js');
13
13
  require('@aws-amplify/storage/internals');
14
14
  require('@aws-amplify/ui-react-core/elements');
15
15
  require('aws-amplify');
@@ -551,8 +551,6 @@ function FilePicker$1({ children, className = ui.ComponentClassName.FileUploader
551
551
  return (React__namespace["default"].createElement(uiReact.Button, { ...props, className: className, size: size }, children));
552
552
  }
553
553
 
554
- const VERSION = '3.5.0';
555
-
556
554
  const logger$1 = ui.getLogger('Storage');
557
555
  const MISSING_REQUIRED_PROPS_MESSAGE$1 = '`FileUploader` requires a `maxFileCount` prop to be provided.';
558
556
  const ACCESS_LEVEL_WITH_PATH_CALLBACK_MESSAGE$1 = '`FileUploader` does not allow usage of a `path` callback prop with an `accessLevel` prop.';
@@ -692,7 +690,7 @@ const FileUploaderBase = React__namespace.forwardRef(function FileUploader({ acc
692
690
  uiReactCore.useSetUserAgent({
693
691
  componentName: 'FileUploader',
694
692
  packageName: 'react-storage',
695
- version: VERSION,
693
+ version: createAmplifyAuthAdapter.VERSION,
696
694
  });
697
695
  return (React__namespace.createElement(Components.Container, { className: `${ui.ComponentClassName.FileUploader} ${hasFiles ? ui.ComponentClassName.FileUploaderPreviewer : ''}` },
698
696
  React__namespace.createElement(Components.DropZone, { inDropZone: dragState !== 'inactive', ...dropZoneProps, displayText: displayText },
@@ -747,7 +745,7 @@ const StorageImage = ({ accessLevel, className, fallbackSrc, identityId, imgKey,
747
745
  uiReactCore.useSetUserAgent({
748
746
  componentName: 'StorageImage',
749
747
  packageName: 'react-storage',
750
- version: VERSION,
748
+ version: createAmplifyAuthAdapter.VERSION,
751
749
  });
752
750
  const onError = onGetUrlError ?? onStorageGetError;
753
751
  const input = React__namespace.useMemo(() => ({
@@ -1032,7 +1030,7 @@ const StorageManagerBase = React__namespace.forwardRef(function StorageManager({
1032
1030
  uiReactCore.useSetUserAgent({
1033
1031
  componentName: 'StorageManager',
1034
1032
  packageName: 'react-storage',
1035
- version: VERSION,
1033
+ version: createAmplifyAuthAdapter.VERSION,
1036
1034
  });
1037
1035
  return (React__namespace.createElement(Components.Container, { className: `${ui.ComponentClassName.StorageManager} ${hasFiles ? ui.ComponentClassName.StorageManagerPreviewer : ''}` },
1038
1036
  React__namespace.createElement(Components.DropZone, { inDropZone: dragState !== 'inactive', ...dropZoneProps, displayText: displayText },
@@ -3,4 +3,4 @@ export interface ContainerProps {
3
3
  children: React.ReactNode;
4
4
  className: string;
5
5
  }
6
- export declare function Container({ children, className, }: ContainerProps): JSX.Element;
6
+ export declare function Container({ children, className, }: ContainerProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { DropZoneProps } from './types';
3
- export declare function DropZone({ children, displayText, inDropZone, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, testId, }: DropZoneProps): JSX.Element;
3
+ export declare function DropZone({ children, displayText, inDropZone, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, testId, }: DropZoneProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FileUploaderDisplayText } from '../../utils/displayText';
3
2
  export interface DropZoneProps {
4
3
  children?: React.ReactNode;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileControlProps } from './types';
3
- export declare function FileControl({ onPause, onResume, displayName, errorMessage, isImage, isResumable, loaderIsDeterminate, onRemove, progress, showThumbnails, size, status, displayText, thumbnailUrl, }: FileControlProps): JSX.Element;
3
+ export declare function FileControl({ onPause, onResume, displayName, errorMessage, isImage, isResumable, loaderIsDeterminate, onRemove, progress, showThumbnails, size, status, displayText, thumbnailUrl, }: FileControlProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { UploadDetailsProps } from './types';
3
- export declare const UploadDetails: ({ displayName, fileSize, }: UploadDetailsProps) => JSX.Element;
3
+ export declare const UploadDetails: ({ displayName, fileSize, }: UploadDetailsProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileListProps } from './types';
3
- export declare function FileList({ displayText, files, hasMaxFilesError, isResumable, onCancelUpload, onDeleteUpload, onResume, onPause, showThumbnails, maxFileCount, }: FileListProps): JSX.Element | null;
3
+ export declare function FileList({ displayText, files, hasMaxFilesError, isResumable, onCancelUpload, onDeleteUpload, onResume, onPause, showThumbnails, maxFileCount, }: FileListProps): React.JSX.Element | null;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileRemoveButtonProps } from './types';
3
- export declare const FileRemoveButton: ({ altText, onClick, }: FileRemoveButtonProps) => JSX.Element;
3
+ export declare const FileRemoveButton: ({ altText, onClick, }: FileRemoveButtonProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileStatusMessageProps } from './types';
3
- export declare const FileStatusMessage: ({ errorMessage, getPausedText, getUploadingText, percentage, status, uploadSuccessfulText, }: FileStatusMessageProps) => JSX.Element | null;
3
+ export declare const FileStatusMessage: ({ errorMessage, getPausedText, getUploadingText, percentage, status, uploadSuccessfulText, }: FileStatusMessageProps) => React.JSX.Element | null;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileThumbnailProps } from './types';
3
- export declare const FileThumbnail: ({ fileName, isImage, url, }: FileThumbnailProps) => JSX.Element;
3
+ export declare const FileThumbnail: ({ fileName, isImage, url, }: FileThumbnailProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileUploaderDisplayTextDefault } from '../../utils';
3
3
  export interface FileListFooterProps {
4
4
  remainingFilesCount: number;
@@ -6,4 +6,4 @@ export interface FileListFooterProps {
6
6
  onClearAll: () => void;
7
7
  onUploadAll: () => void;
8
8
  }
9
- export declare function FileListFooter({ displayText, remainingFilesCount, onClearAll, onUploadAll, }: FileListFooterProps): JSX.Element;
9
+ export declare function FileListFooter({ displayText, remainingFilesCount, onClearAll, onUploadAll, }: FileListFooterProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileUploaderDisplayTextDefault } from '../../utils';
3
3
  export interface FileListHeaderProps {
4
4
  allUploadsSuccessful: boolean;
@@ -7,4 +7,4 @@ export interface FileListHeaderProps {
7
7
  remainingFilesCount: number;
8
8
  selectedFilesCount?: number;
9
9
  }
10
- export declare function FileListHeader({ allUploadsSuccessful, displayText, fileCount, remainingFilesCount, selectedFilesCount, }: FileListHeaderProps): JSX.Element;
10
+ export declare function FileListHeader({ allUploadsSuccessful, displayText, fileCount, remainingFilesCount, selectedFilesCount, }: FileListHeaderProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ButtonProps } from '@aws-amplify/ui-react';
3
3
  export type FilePickerProps = ButtonProps;
4
- export declare function FilePicker({ children, className, size, ...props }: FilePickerProps): JSX.Element;
4
+ export declare function FilePicker({ children, className, size, ...props }: FilePickerProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionViewConfigs } from './types';
3
2
  export interface ActionConfigsProviderProps {
4
3
  actionConfigs: ActionViewConfigs;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ComposablesContext } from './types';
3
2
  export declare const useComposables: (params?: {
4
3
  errorMessage?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionCancelProps } from './ActionCancel';
3
2
  import { ActionDestinationProps } from './ActionDestination';
4
3
  import { ActionExitProps } from './ActionExit';
@@ -19,7 +19,7 @@ export declare const elementsDefault: {
19
19
  DescriptionTerm: typeof DescriptionTerm;
20
20
  Input: typeof Input;
21
21
  Label: typeof Label;
22
- Nav: (props: NavElementProps) => JSX.Element;
22
+ Nav: (props: NavElementProps) => React.JSX.Element;
23
23
  Heading: typeof Heading;
24
24
  Span: typeof Span;
25
25
  Table: typeof Table;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IconElement } from './IconElement';
3
2
  export interface StorageBrowserElements {
4
3
  Button: typeof ButtonElement;
@@ -81,7 +80,7 @@ export interface ProgressBarElementProps extends React.ComponentProps<typeof Pro
81
80
  }
82
81
  export declare const ProgressBarElement: import("@aws-amplify/ui-react-core/elements").BaseElement<import("@aws-amplify/ui-react-core/elements").BaseElementProps<never, string, import("react").SVGProps<SVGSVGElement>>>;
83
82
  export type InputElementProps = React.ComponentProps<typeof InputElement>;
84
- export declare const InputElement: import("@aws-amplify/ui-react-core/elements").BaseElement<import("@aws-amplify/ui-react-core/elements").BaseElementProps<"id" | "defaultChecked" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onKeyUp" | "type" | "disabled" | "value" | "checked", string, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>>;
83
+ export declare const InputElement: import("@aws-amplify/ui-react-core/elements").BaseElement<import("@aws-amplify/ui-react-core/elements").BaseElementProps<"id" | "defaultChecked" | "onFocus" | "onBlur" | "onChange" | "onKeyUp" | "type" | "disabled" | "value" | "checked" | "placeholder", string, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>>>;
85
84
  export interface ButtonElementProps extends React.ComponentProps<typeof ButtonElement> {
86
85
  }
87
86
  export declare const ButtonElement: import("@aws-amplify/ui-react-core/elements").BaseElement<import("@aws-amplify/ui-react-core/elements").BaseElementProps<"role" | "onClick" | "type" | "disabled" | "value", ButtonElementVariant, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ControlsContext } from './types';
3
2
  export declare const useControlsContext: (params?: {
4
3
  errorMessage?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocationData } from '../actions';
3
2
  import { ActionListItem } from '../composables/ActionsList';
4
3
  import { DataTableSortHeader, DataTableProps } from '../composables/DataTable';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type ActionTypeAction = {
3
2
  type: 'SET_ACTION_TYPE';
4
3
  actionType: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocationItemType, TaskData } from '../../../actions';
3
2
  /**
4
3
  * native OS file picker type. to restrict selectable file types, define the picker types
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionHandlersContext } from './types';
3
2
  export declare const ActionHandlersProvider: import("react").ComponentType<import("react").PropsWithChildren<ActionHandlersContext>>, useActionHandlers: (params?: {
4
3
  errorMessage?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FolderData, CopyHandlerData, LocationData } from '../../../actions';
3
2
  import { LocationState } from '../../../providers/store/location';
4
3
  import { ActionViewType, ActionViewProps, ActionViewState } from '../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CreateFolderHandlerData, LocationData } from '../../../actions';
3
2
  import { ActionViewType, ActionViewState, ActionViewProps } from '../types';
4
3
  export interface CreateFolderViewState extends Omit<ActionViewState<CreateFolderHandlerData>, 'onActionCancel'> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DeleteHandlerData, LocationData } from '../../../actions';
3
2
  import { ActionViewType, ActionViewProps, ActionViewState } from '../types';
4
3
  export interface DeleteViewState extends ActionViewState<DeleteHandlerData> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocationData, UploadHandlerData } from '../../../actions';
3
2
  import { FileItem, FileItems } from '../../../providers';
4
3
  import { ActionViewType, ActionViewProps, ActionViewState } from '../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocationData, TaskData } from '../../actions';
3
2
  import { LocationState } from '../../providers/store/location';
4
3
  import { StatusCounts, Task, Tasks } from '../../tasks';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FileData, FileDataItem, LocationData, LocationItemData } from '../../actions';
3
2
  import { ActionListItem } from '../../composables/ActionsList';
4
3
  import { LocationState } from '../../providers/store/location';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LocationData } from '../../actions';
3
2
  import { ListViewProps } from '../types';
4
3
  export interface LocationsViewState {
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import type { StorageImageProps, StorageImagePathProps } from './types';
3
3
  export declare const MISSING_REQUIRED_PROP_MESSAGE = "`StorageImage` requires either an `imgKey` or `path` prop.";
4
4
  export declare const HAS_DEPRECATED_PROPS_MESSAGE = "`imgKey`, `accessLevel`, and `identityId` will be replaced with `path` in a future major version. See https://ui.docs.amplify.aws/react/connected-components/storage/storageimage#props";
5
5
  export declare const HAS_PATH_AND_KEY_MESSAGE = "`imgKey` is ignored when both `imgKey` and `path` props are provided.";
6
6
  export declare const HAS_PATH_AND_UNSUPPORTED_OPTIONS_MESSAGE = "`accessLevel` and `identityId` are ignored when the `path` prop is provided.";
7
- export declare const StorageImage: ({ accessLevel, className, fallbackSrc, identityId, imgKey, path, onStorageGetError, onGetUrlError, validateObjectExistence, ...rest }: StorageImageProps | StorageImagePathProps) => JSX.Element;
7
+ export declare const StorageImage: ({ accessLevel, className, fallbackSrc, identityId, imgKey, path, onStorageGetError, onGetUrlError, validateObjectExistence, ...rest }: StorageImageProps | StorageImagePathProps) => React.JSX.Element;
@@ -3,4 +3,4 @@ export interface ContainerProps {
3
3
  children: React.ReactNode;
4
4
  className: string;
5
5
  }
6
- export declare function Container({ children, className, }: ContainerProps): JSX.Element;
6
+ export declare function Container({ children, className, }: ContainerProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { DropZoneProps } from './types';
3
- export declare function DropZone({ children, displayText, inDropZone, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, testId, }: DropZoneProps): JSX.Element;
3
+ export declare function DropZone({ children, displayText, inDropZone, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, testId, }: DropZoneProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FileUploaderDisplayText as StorageManagerDisplayText } from '../../../FileUploader/utils/displayText';
3
2
  export interface DropZoneProps {
4
3
  children?: React.ReactNode;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileControlProps } from './types';
3
- export declare function FileControl({ onPause, onResume, displayName, errorMessage, isImage, isResumable, loaderIsDeterminate, onRemove, progress, showThumbnails, size, status, displayText, thumbnailUrl, }: FileControlProps): JSX.Element;
3
+ export declare function FileControl({ onPause, onResume, displayName, errorMessage, isImage, isResumable, loaderIsDeterminate, onRemove, progress, showThumbnails, size, status, displayText, thumbnailUrl, }: FileControlProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { UploadDetailsProps } from './types';
3
- export declare const UploadDetails: ({ displayName, fileSize, }: UploadDetailsProps) => JSX.Element;
3
+ export declare const UploadDetails: ({ displayName, fileSize, }: UploadDetailsProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileListProps } from './types';
3
- export declare function FileList({ displayText, files, hasMaxFilesError, isResumable, onCancelUpload, onDeleteUpload, onResume, onPause, showThumbnails, maxFileCount, }: FileListProps): JSX.Element | null;
3
+ export declare function FileList({ displayText, files, hasMaxFilesError, isResumable, onCancelUpload, onDeleteUpload, onResume, onPause, showThumbnails, maxFileCount, }: FileListProps): React.JSX.Element | null;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileRemoveButtonProps } from './types';
3
- export declare const FileRemoveButton: ({ altText, onClick, }: FileRemoveButtonProps) => JSX.Element;
3
+ export declare const FileRemoveButton: ({ altText, onClick, }: FileRemoveButtonProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileStatusMessageProps } from './types';
3
- export declare const FileStatusMessage: ({ errorMessage, getPausedText, getUploadingText, percentage, status, uploadSuccessfulText, }: FileStatusMessageProps) => JSX.Element | null;
3
+ export declare const FileStatusMessage: ({ errorMessage, getPausedText, getUploadingText, percentage, status, uploadSuccessfulText, }: FileStatusMessageProps) => React.JSX.Element | null;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileThumbnailProps } from './types';
3
- export declare const FileThumbnail: ({ fileName, isImage, url, }: FileThumbnailProps) => JSX.Element;
3
+ export declare const FileThumbnail: ({ fileName, isImage, url, }: FileThumbnailProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileUploaderDisplayTextDefault as StorageManagerDisplayTextDefault } from '../../../FileUploader/utils';
3
3
  export interface FileListFooterProps {
4
4
  remainingFilesCount: number;
@@ -6,4 +6,4 @@ export interface FileListFooterProps {
6
6
  onClearAll: () => void;
7
7
  onUploadAll: () => void;
8
8
  }
9
- export declare function FileListFooter({ displayText, remainingFilesCount, onClearAll, onUploadAll, }: FileListFooterProps): JSX.Element;
9
+ export declare function FileListFooter({ displayText, remainingFilesCount, onClearAll, onUploadAll, }: FileListFooterProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FileUploaderDisplayTextDefault as StorageManagerDisplayTextDefault } from '../../../FileUploader/utils';
3
3
  export interface FileListHeaderProps {
4
4
  allUploadsSuccessful: boolean;
@@ -7,4 +7,4 @@ export interface FileListHeaderProps {
7
7
  remainingFilesCount: number;
8
8
  selectedFilesCount?: number;
9
9
  }
10
- export declare function FileListHeader({ allUploadsSuccessful, displayText, fileCount, remainingFilesCount, selectedFilesCount, }: FileListHeaderProps): JSX.Element;
10
+ export declare function FileListHeader({ allUploadsSuccessful, displayText, fileCount, remainingFilesCount, selectedFilesCount, }: FileListHeaderProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ButtonProps } from '@aws-amplify/ui-react';
3
3
  export type FilePickerProps = ButtonProps;
4
- export declare function FilePicker({ children, className, size, ...props }: FilePickerProps): JSX.Element;
4
+ export declare function FilePicker({ children, className, size, ...props }: FilePickerProps): React.JSX.Element;
@@ -1 +1 @@
1
- export declare const VERSION = "3.5.0";
1
+ export declare const VERSION = "3.6.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-storage",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -47,15 +47,15 @@
47
47
  "typecheck": "tsc --noEmit"
48
48
  },
49
49
  "dependencies": {
50
- "@aws-amplify/ui": "6.7.1",
51
- "@aws-amplify/ui-react": "6.7.1",
52
- "@aws-amplify/ui-react-core": "3.1.1",
50
+ "@aws-amplify/ui": "6.7.2",
51
+ "@aws-amplify/ui-react": "6.8.0",
52
+ "@aws-amplify/ui-react-core": "3.2.0",
53
53
  "tslib": "^2.5.2"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "aws-amplify": "^6.9.0",
57
- "react": "^16.14.0 || ^17.0 || ^18.0",
58
- "react-dom": "^16.14.0 || ^17.0 || ^18.0"
57
+ "react": "^16.14 || ^17 || ^18 || ^19",
58
+ "react-dom": "^16.14 || ^17 || ^18 || ^19"
59
59
  },
60
60
  "devDependencies": {
61
61
  "jest-tsd": "^0.2.2",
@@ -70,7 +70,7 @@
70
70
  "name": "createStorageBrowser",
71
71
  "path": "dist/esm/browser.mjs",
72
72
  "import": "{ createStorageBrowser }",
73
- "limit": "60 kB",
73
+ "limit": "63 kB",
74
74
  "ignore": [
75
75
  "@aws-amplify/storage"
76
76
  ]
@@ -79,7 +79,7 @@
79
79
  "name": "StorageBrowser",
80
80
  "path": "dist/esm/index.mjs",
81
81
  "import": "{ StorageBrowser }",
82
- "limit": "83 kB"
82
+ "limit": "85.1 kB"
83
83
  },
84
84
  {
85
85
  "name": "FileUploader",