@aws-amplify/ui-react-storage 3.8.0 → 3.8.2

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 (20) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/{createAmplifyAuthAdapter-BcJMLIum.js → createAmplifyAuthAdapter-PkK_GXRs.js} +90 -25
  3. package/dist/esm/components/FileUploader/FileUploader.mjs +1 -1
  4. package/dist/esm/components/StorageBrowser/StorageBrowserAmplify.mjs +4 -4
  5. package/dist/esm/components/StorageBrowser/useAction/useAction.mjs +2 -2
  6. package/dist/esm/components/StorageBrowser/views/LocationDetailView/LocationDetailViewProvider.mjs +2 -0
  7. package/dist/esm/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/constants.mjs +6 -6
  8. package/dist/esm/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getFileRowContent.mjs +1 -1
  9. package/dist/esm/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getFolderRowContent.mjs +1 -1
  10. package/dist/esm/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getHeaders.mjs +68 -0
  11. package/dist/esm/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getLocationDetailViewTableData.mjs +13 -15
  12. package/dist/esm/version.mjs +1 -1
  13. package/dist/index.js +6 -6
  14. package/dist/types/components/FileUploader/FileUploader.d.ts +1 -1
  15. package/dist/types/components/StorageBrowser/StorageBrowserAmplify.d.ts +1 -1
  16. package/dist/types/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/constants.d.ts +2 -2
  17. package/dist/types/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getHeaders.d.ts +11 -0
  18. package/dist/types/components/StorageBrowser/views/LocationDetailView/getLocationDetailViewTableData/getLocationDetailViewTableData.d.ts +3 -1
  19. package/dist/types/version.d.ts +1 -1
  20. package/package.json +4 -4
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-BcJMLIum.js');
5
+ var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-PkK_GXRs.js');
6
6
  var internals = require('@aws-amplify/storage/internals');
7
7
  require('@aws-amplify/ui');
8
8
  require('aws-amplify/storage');
@@ -32,7 +32,7 @@ function _interopNamespace(e) {
32
32
 
33
33
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
34
 
35
- const VERSION = '3.8.0';
35
+ const VERSION = '3.8.2';
36
36
 
37
37
  const constructBucket = ({ bucket: bucketName, region, }) => ({ bucketName, region });
38
38
  const parseAccessGrantLocation = (location) => {
@@ -3067,10 +3067,10 @@ const ERROR_MESSAGE = '`useAction` must be called from within `StorageBrowser.Pr
3067
3067
  const useAction = (key, options) => {
3068
3068
  if (key === 'listLocations' ||
3069
3069
  key === 'listLocationItems') {
3070
- throw new Error(`Value of \`${key}\` cannot be used to index \`useAction\``);
3070
+ throw new Error(`Value of \`${key}\` cannot be provided to \`useAction\``);
3071
3071
  }
3072
3072
  const { handlers } = useActionHandlers({ errorMessage: ERROR_MESSAGE });
3073
- const handler = handlers[key];
3073
+ const handler = handlers?.[key];
3074
3074
  if (!handler) {
3075
3075
  throw new Error(`No handler found for value of \`${key}\` provided to \`useAction\``);
3076
3076
  }
@@ -4190,15 +4190,15 @@ const useLocationDetailView = (options) => {
4190
4190
  };
4191
4191
 
4192
4192
  const LOCATION_DETAIL_VIEW_HEADERS = [
4193
- { key: 'checkbox', type: 'text', content: { text: '' } },
4194
- { key: 'name', type: 'sort', content: { label: 'Name' } },
4195
- { key: 'type', type: 'sort', content: { label: 'Type' } },
4196
- { key: 'last-modified', type: 'sort', content: { label: 'Last modified' } },
4197
- { key: 'size', type: 'sort', content: { label: 'Size' } },
4198
- { key: 'download', type: 'text', content: { text: '' } },
4193
+ 'checkbox',
4194
+ 'name',
4195
+ 'type',
4196
+ 'last-modified',
4197
+ 'size',
4198
+ 'download',
4199
4199
  ];
4200
4200
 
4201
- const getFileRowContent = ({ permissions, isSelected, itemLocationKey, getDateDisplayValue, lastModified, rowId, rowKey, selectFileLabel, size, onDownload, onSelect, }) => LOCATION_DETAIL_VIEW_HEADERS.map(({ key: columnKey }) => {
4201
+ const getFileRowContent = ({ permissions, isSelected, itemLocationKey, getDateDisplayValue, lastModified, rowId, rowKey, selectFileLabel, size, onDownload, onSelect, }) => LOCATION_DETAIL_VIEW_HEADERS.map((columnKey) => {
4202
4202
  const key = `${columnKey}-${rowId}`;
4203
4203
  switch (columnKey) {
4204
4204
  case 'checkbox': {
@@ -4270,7 +4270,7 @@ const getFileRowContent = ({ permissions, isSelected, itemLocationKey, getDateDi
4270
4270
  }
4271
4271
  });
4272
4272
 
4273
- const getFolderRowContent = ({ itemSubPath, rowId, onNavigate, }) => LOCATION_DETAIL_VIEW_HEADERS.map(({ key: columnKey }) => {
4273
+ const getFolderRowContent = ({ itemSubPath, rowId, onNavigate, }) => LOCATION_DETAIL_VIEW_HEADERS.map((columnKey) => {
4274
4274
  const key = `${columnKey}-${rowId}`;
4275
4275
  switch (columnKey) {
4276
4276
  case 'checkbox': {
@@ -4299,20 +4299,83 @@ const getFolderRowContent = ({ itemSubPath, rowId, onNavigate, }) => LOCATION_DE
4299
4299
  }
4300
4300
  });
4301
4301
 
4302
- const getLocationDetailViewTableData = ({ areAllFilesSelected, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }) => {
4303
- const headerCheckbox = {
4304
- key: 'checkbox',
4305
- type: 'checkbox',
4306
- content: {
4307
- checked: areAllFilesSelected,
4308
- label: selectAllFilesLabel,
4309
- onSelect: onSelectAll,
4310
- id: 'header-checkbox',
4311
- },
4312
- };
4313
- const headers = hasFiles
4314
- ? [headerCheckbox, ...LOCATION_DETAIL_VIEW_HEADERS.slice(1)]
4315
- : LOCATION_DETAIL_VIEW_HEADERS;
4302
+ const getHeaders$1 = ({ tableColumnLastModifiedHeader, tableColumnNameHeader, tableColumnSizeHeader, tableColumnTypeHeader, areAllFilesSelected, selectAllFilesLabel, onSelectAll, hasFiles, }) => LOCATION_DETAIL_VIEW_HEADERS.map((key) => {
4303
+ switch (key) {
4304
+ case 'checkbox': {
4305
+ if (hasFiles) {
4306
+ return {
4307
+ key,
4308
+ type: 'checkbox',
4309
+ content: {
4310
+ checked: areAllFilesSelected,
4311
+ label: selectAllFilesLabel,
4312
+ id: 'header-checkbox',
4313
+ onSelect: onSelectAll,
4314
+ },
4315
+ };
4316
+ }
4317
+ else {
4318
+ return {
4319
+ key,
4320
+ type: 'text',
4321
+ content: { text: '' },
4322
+ };
4323
+ }
4324
+ }
4325
+ case 'name': {
4326
+ return {
4327
+ key,
4328
+ type: 'sort',
4329
+ content: {
4330
+ label: tableColumnNameHeader,
4331
+ },
4332
+ };
4333
+ }
4334
+ case 'type': {
4335
+ return {
4336
+ key,
4337
+ type: 'sort',
4338
+ content: {
4339
+ label: tableColumnTypeHeader,
4340
+ },
4341
+ };
4342
+ }
4343
+ case 'last-modified': {
4344
+ return {
4345
+ key,
4346
+ type: 'sort',
4347
+ content: {
4348
+ label: tableColumnLastModifiedHeader,
4349
+ },
4350
+ };
4351
+ }
4352
+ case 'size': {
4353
+ return {
4354
+ key,
4355
+ type: 'sort',
4356
+ content: {
4357
+ label: tableColumnSizeHeader,
4358
+ },
4359
+ };
4360
+ }
4361
+ case 'download': {
4362
+ return { key, type: 'text', content: { text: '' } };
4363
+ }
4364
+ }
4365
+ });
4366
+
4367
+ const getLocationDetailViewTableData = ({ areAllFilesSelected, displayText, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }) => {
4368
+ const { tableColumnLastModifiedHeader, tableColumnNameHeader, tableColumnSizeHeader, tableColumnTypeHeader, } = displayText;
4369
+ const headers = getHeaders$1({
4370
+ areAllFilesSelected,
4371
+ selectAllFilesLabel,
4372
+ hasFiles,
4373
+ onSelectAll,
4374
+ tableColumnLastModifiedHeader,
4375
+ tableColumnNameHeader,
4376
+ tableColumnSizeHeader,
4377
+ tableColumnTypeHeader,
4378
+ });
4316
4379
  const rows = pageItems.map((locationItem) => {
4317
4380
  const { id, key, type } = locationItem;
4318
4381
  switch (type) {
@@ -4368,6 +4431,7 @@ const getLocationDetailViewTableData = ({ areAllFilesSelected, location, fileDat
4368
4431
  };
4369
4432
 
4370
4433
  function LocationDetailViewProvider({ children, ...props }) {
4434
+ const { LocationDetailView: displayText } = useDisplayText();
4371
4435
  const { LocationDetailView: { loadingIndicatorLabel, searchSubfoldersToggleLabel, selectFileLabel, selectAllFilesLabel, searchPlaceholder, searchSubmitLabel, searchClearLabel, getActionListItemLabel, getDateDisplayValue, getTitle, getListItemsResultMessage, }, } = useDisplayText();
4372
4436
  const { actionItems, page, pageItems, hasNextPage, highestPageVisited, isLoading, isSearchSubfoldersEnabled, location, fileDataItems, hasError, hasDownloadError, message, downloadErrorMessage, searchQuery, hasExhaustedSearch, onActionSelect, onDropFiles, onRefresh, onPaginate, onDownload, onNavigate, onNavigateHome, onSelect, onToggleSelectAll, onSearch, onSearchQueryChange, onSearchClear, onToggleSearchSubfolders, } = props;
4373
4437
  const actionsWithDisplayText = actionItems.map((item) => ({
@@ -4407,6 +4471,7 @@ function LocationDetailViewProvider({ children, ...props }) {
4407
4471
  searchQuery,
4408
4472
  tableData: getLocationDetailViewTableData({
4409
4473
  areAllFilesSelected,
4474
+ displayText,
4410
4475
  location,
4411
4476
  fileDataItems,
4412
4477
  getDateDisplayValue,
@@ -21,7 +21,7 @@ import { VERSION } from '../../version.mjs';
21
21
  const logger = getLogger('Storage');
22
22
  const MISSING_REQUIRED_PROPS_MESSAGE = '`FileUploader` requires a `maxFileCount` prop to be provided.';
23
23
  const ACCESS_LEVEL_WITH_PATH_CALLBACK_MESSAGE = '`FileUploader` does not allow usage of a `path` callback prop with an `accessLevel` prop.';
24
- const ACCESS_LEVEL_DEPRECATION_MESSAGE = '`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/FileUploader';
24
+ const ACCESS_LEVEL_DEPRECATION_MESSAGE = '`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader#deprecated-props';
25
25
  const FileUploaderBase = React.forwardRef(function FileUploader({ acceptedFileTypes = [], accessLevel, autoUpload = true, bucket, components, defaultFiles, displayText: overrideDisplayText, isResumable = false, maxFileCount, maxFileSize, onFileRemove, onUploadError, onUploadStart, onUploadSuccess, path, processFile, showThumbnails = true, useAccelerateEndpoint, }, ref) {
26
26
  if (!maxFileCount) {
27
27
  // eslint-disable-next-line no-console
@@ -6,9 +6,9 @@ import '@aws-amplify/ui';
6
6
  import 'aws-amplify/storage';
7
7
  import './actions/configs/context.mjs';
8
8
 
9
- const StorageBrowser = ({ views, displayText, }) => {
10
- const { StorageBrowser } = React__default.useRef(createStorageBrowser({ config: createAmplifyAuthAdapter() })).current;
11
- return React__default.createElement(StorageBrowser, { views: views, displayText: displayText });
12
- };
9
+ function StorageBrowser(props) {
10
+ const { StorageBrowser: StorageBrowserComponent } = React__default.useRef(createStorageBrowser({ config: createAmplifyAuthAdapter() })).current;
11
+ return React__default.createElement(StorageBrowserComponent, { ...props });
12
+ }
13
13
 
14
14
  export { StorageBrowser };
@@ -5,10 +5,10 @@ const ERROR_MESSAGE = '`useAction` must be called from within `StorageBrowser.Pr
5
5
  const useAction = (key, options) => {
6
6
  if (key === 'listLocations' ||
7
7
  key === 'listLocationItems') {
8
- throw new Error(`Value of \`${key}\` cannot be used to index \`useAction\``);
8
+ throw new Error(`Value of \`${key}\` cannot be provided to \`useAction\``);
9
9
  }
10
10
  const { handlers } = useActionHandlers({ errorMessage: ERROR_MESSAGE });
11
- const handler = handlers[key];
11
+ const handler = handlers?.[key];
12
12
  if (!handler) {
13
13
  throw new Error(`No handler found for value of \`${key}\` provided to \`useAction\``);
14
14
  }
@@ -5,6 +5,7 @@ import '@aws-amplify/ui';
5
5
  import { getLocationDetailViewTableData } from './getLocationDetailViewTableData/getLocationDetailViewTableData.mjs';
6
6
 
7
7
  function LocationDetailViewProvider({ children, ...props }) {
8
+ const { LocationDetailView: displayText } = useDisplayText();
8
9
  const { LocationDetailView: { loadingIndicatorLabel, searchSubfoldersToggleLabel, selectFileLabel, selectAllFilesLabel, searchPlaceholder, searchSubmitLabel, searchClearLabel, getActionListItemLabel, getDateDisplayValue, getTitle, getListItemsResultMessage, }, } = useDisplayText();
9
10
  const { actionItems, page, pageItems, hasNextPage, highestPageVisited, isLoading, isSearchSubfoldersEnabled, location, fileDataItems, hasError, hasDownloadError, message, downloadErrorMessage, searchQuery, hasExhaustedSearch, onActionSelect, onDropFiles, onRefresh, onPaginate, onDownload, onNavigate, onNavigateHome, onSelect, onToggleSelectAll, onSearch, onSearchQueryChange, onSearchClear, onToggleSearchSubfolders, } = props;
10
11
  const actionsWithDisplayText = actionItems.map((item) => ({
@@ -44,6 +45,7 @@ function LocationDetailViewProvider({ children, ...props }) {
44
45
  searchQuery,
45
46
  tableData: getLocationDetailViewTableData({
46
47
  areAllFilesSelected,
48
+ displayText,
47
49
  location,
48
50
  fileDataItems,
49
51
  getDateDisplayValue,
@@ -1,10 +1,10 @@
1
1
  const LOCATION_DETAIL_VIEW_HEADERS = [
2
- { key: 'checkbox', type: 'text', content: { text: '' } },
3
- { key: 'name', type: 'sort', content: { label: 'Name' } },
4
- { key: 'type', type: 'sort', content: { label: 'Type' } },
5
- { key: 'last-modified', type: 'sort', content: { label: 'Last modified' } },
6
- { key: 'size', type: 'sort', content: { label: 'Size' } },
7
- { key: 'download', type: 'text', content: { text: '' } },
2
+ 'checkbox',
3
+ 'name',
4
+ 'type',
5
+ 'last-modified',
6
+ 'size',
7
+ 'download',
8
8
  ];
9
9
 
10
10
  export { LOCATION_DETAIL_VIEW_HEADERS };
@@ -1,7 +1,7 @@
1
1
  import { humanFileSize } from '@aws-amplify/ui';
2
2
  import { LOCATION_DETAIL_VIEW_HEADERS } from './constants.mjs';
3
3
 
4
- const getFileRowContent = ({ permissions, isSelected, itemLocationKey, getDateDisplayValue, lastModified, rowId, rowKey, selectFileLabel, size, onDownload, onSelect, }) => LOCATION_DETAIL_VIEW_HEADERS.map(({ key: columnKey }) => {
4
+ const getFileRowContent = ({ permissions, isSelected, itemLocationKey, getDateDisplayValue, lastModified, rowId, rowKey, selectFileLabel, size, onDownload, onSelect, }) => LOCATION_DETAIL_VIEW_HEADERS.map((columnKey) => {
5
5
  const key = `${columnKey}-${rowId}`;
6
6
  switch (columnKey) {
7
7
  case 'checkbox': {
@@ -1,6 +1,6 @@
1
1
  import { LOCATION_DETAIL_VIEW_HEADERS } from './constants.mjs';
2
2
 
3
- const getFolderRowContent = ({ itemSubPath, rowId, onNavigate, }) => LOCATION_DETAIL_VIEW_HEADERS.map(({ key: columnKey }) => {
3
+ const getFolderRowContent = ({ itemSubPath, rowId, onNavigate, }) => LOCATION_DETAIL_VIEW_HEADERS.map((columnKey) => {
4
4
  const key = `${columnKey}-${rowId}`;
5
5
  switch (columnKey) {
6
6
  case 'checkbox': {
@@ -0,0 +1,68 @@
1
+ import { LOCATION_DETAIL_VIEW_HEADERS } from './constants.mjs';
2
+
3
+ const getHeaders = ({ tableColumnLastModifiedHeader, tableColumnNameHeader, tableColumnSizeHeader, tableColumnTypeHeader, areAllFilesSelected, selectAllFilesLabel, onSelectAll, hasFiles, }) => LOCATION_DETAIL_VIEW_HEADERS.map((key) => {
4
+ switch (key) {
5
+ case 'checkbox': {
6
+ if (hasFiles) {
7
+ return {
8
+ key,
9
+ type: 'checkbox',
10
+ content: {
11
+ checked: areAllFilesSelected,
12
+ label: selectAllFilesLabel,
13
+ id: 'header-checkbox',
14
+ onSelect: onSelectAll,
15
+ },
16
+ };
17
+ }
18
+ else {
19
+ return {
20
+ key,
21
+ type: 'text',
22
+ content: { text: '' },
23
+ };
24
+ }
25
+ }
26
+ case 'name': {
27
+ return {
28
+ key,
29
+ type: 'sort',
30
+ content: {
31
+ label: tableColumnNameHeader,
32
+ },
33
+ };
34
+ }
35
+ case 'type': {
36
+ return {
37
+ key,
38
+ type: 'sort',
39
+ content: {
40
+ label: tableColumnTypeHeader,
41
+ },
42
+ };
43
+ }
44
+ case 'last-modified': {
45
+ return {
46
+ key,
47
+ type: 'sort',
48
+ content: {
49
+ label: tableColumnLastModifiedHeader,
50
+ },
51
+ };
52
+ }
53
+ case 'size': {
54
+ return {
55
+ key,
56
+ type: 'sort',
57
+ content: {
58
+ label: tableColumnSizeHeader,
59
+ },
60
+ };
61
+ }
62
+ case 'download': {
63
+ return { key, type: 'text', content: { text: '' } };
64
+ }
65
+ }
66
+ });
67
+
68
+ export { getHeaders };
@@ -5,22 +5,20 @@ import 'aws-amplify/storage';
5
5
  import '../../../actions/configs/context.mjs';
6
6
  import { getFileRowContent } from './getFileRowContent.mjs';
7
7
  import { getFolderRowContent } from './getFolderRowContent.mjs';
8
- import { LOCATION_DETAIL_VIEW_HEADERS } from './constants.mjs';
8
+ import { getHeaders } from './getHeaders.mjs';
9
9
 
10
- const getLocationDetailViewTableData = ({ areAllFilesSelected, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }) => {
11
- const headerCheckbox = {
12
- key: 'checkbox',
13
- type: 'checkbox',
14
- content: {
15
- checked: areAllFilesSelected,
16
- label: selectAllFilesLabel,
17
- onSelect: onSelectAll,
18
- id: 'header-checkbox',
19
- },
20
- };
21
- const headers = hasFiles
22
- ? [headerCheckbox, ...LOCATION_DETAIL_VIEW_HEADERS.slice(1)]
23
- : LOCATION_DETAIL_VIEW_HEADERS;
10
+ const getLocationDetailViewTableData = ({ areAllFilesSelected, displayText, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }) => {
11
+ const { tableColumnLastModifiedHeader, tableColumnNameHeader, tableColumnSizeHeader, tableColumnTypeHeader, } = displayText;
12
+ const headers = getHeaders({
13
+ areAllFilesSelected,
14
+ selectAllFilesLabel,
15
+ hasFiles,
16
+ onSelectAll,
17
+ tableColumnLastModifiedHeader,
18
+ tableColumnNameHeader,
19
+ tableColumnSizeHeader,
20
+ tableColumnTypeHeader,
21
+ });
24
22
  const rows = pageItems.map((locationItem) => {
25
23
  const { id, key, type } = locationItem;
26
24
  switch (type) {
@@ -1,3 +1,3 @@
1
- const VERSION = '3.8.0';
1
+ const VERSION = '3.8.2';
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-BcJMLIum.js');
12
+ var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-PkK_GXRs.js');
13
13
  require('@aws-amplify/storage/internals');
14
14
  require('@aws-amplify/ui-react-core/elements');
15
15
  require('aws-amplify');
@@ -562,7 +562,7 @@ function FilePicker$1({ children, className = ui.ComponentClassName.FileUploader
562
562
  const logger$1 = ui.getLogger('Storage');
563
563
  const MISSING_REQUIRED_PROPS_MESSAGE$1 = '`FileUploader` requires a `maxFileCount` prop to be provided.';
564
564
  const ACCESS_LEVEL_WITH_PATH_CALLBACK_MESSAGE$1 = '`FileUploader` does not allow usage of a `path` callback prop with an `accessLevel` prop.';
565
- const ACCESS_LEVEL_DEPRECATION_MESSAGE$1 = '`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/FileUploader';
565
+ const ACCESS_LEVEL_DEPRECATION_MESSAGE$1 = '`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader#deprecated-props';
566
566
  const FileUploaderBase = React__namespace.forwardRef(function FileUploader({ acceptedFileTypes = [], accessLevel, autoUpload = true, bucket, components, defaultFiles, displayText: overrideDisplayText, isResumable = false, maxFileCount, maxFileSize, onFileRemove, onUploadError, onUploadStart, onUploadSuccess, path, processFile, showThumbnails = true, useAccelerateEndpoint, }, ref) {
567
567
  if (!maxFileCount) {
568
568
  // eslint-disable-next-line no-console
@@ -1071,10 +1071,10 @@ const StorageManager = Object.assign({}, StorageManagerBase, {
1071
1071
  FilePicker,
1072
1072
  });
1073
1073
 
1074
- const StorageBrowser = ({ views, displayText, }) => {
1075
- const { StorageBrowser } = React__namespace["default"].useRef(createAmplifyAuthAdapter.createStorageBrowser({ config: createAmplifyAuthAdapter.createAmplifyAuthAdapter() })).current;
1076
- return React__namespace["default"].createElement(StorageBrowser, { views: views, displayText: displayText });
1077
- };
1074
+ function StorageBrowser(props) {
1075
+ const { StorageBrowser: StorageBrowserComponent } = React__namespace["default"].useRef(createAmplifyAuthAdapter.createStorageBrowser({ config: createAmplifyAuthAdapter.createAmplifyAuthAdapter() })).current;
1076
+ return React__namespace["default"].createElement(StorageBrowserComponent, { ...props });
1077
+ }
1078
1078
 
1079
1079
  exports.FileUploader = FileUploader;
1080
1080
  exports.StorageBrowser = StorageBrowser;
@@ -3,7 +3,7 @@ import { FileUploaderProps, FileUploaderPathProps, FileUploaderHandle } from './
3
3
  import { Container, DropZone, FileList, FileListHeader, FileListFooter, FilePicker } from './ui';
4
4
  export declare const MISSING_REQUIRED_PROPS_MESSAGE = "`FileUploader` requires a `maxFileCount` prop to be provided.";
5
5
  export declare const ACCESS_LEVEL_WITH_PATH_CALLBACK_MESSAGE = "`FileUploader` does not allow usage of a `path` callback prop with an `accessLevel` prop.";
6
- export declare const ACCESS_LEVEL_DEPRECATION_MESSAGE = "`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/FileUploader";
6
+ export declare const ACCESS_LEVEL_DEPRECATION_MESSAGE = "`accessLevel` has been deprecated and will be removed in a future major version. See migration notes at https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader#deprecated-props";
7
7
  declare const FileUploader: React.ForwardRefExoticComponent<(FileUploaderProps | FileUploaderPathProps) & React.RefAttributes<FileUploaderHandle>> & {
8
8
  Container: typeof Container;
9
9
  DropZone: typeof DropZone;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { StorageBrowserProps as StorageBrowserPropsBase } from './types';
3
3
  export interface StorageBrowserProps extends StorageBrowserPropsBase {
4
4
  }
5
- export declare const StorageBrowser: ({ views, displayText, }: StorageBrowserProps) => React.JSX.Element;
5
+ export declare function StorageBrowser(props: StorageBrowserProps): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { LocationDetailViewHeaders } from './types';
2
- export declare const LOCATION_DETAIL_VIEW_HEADERS: LocationDetailViewHeaders;
1
+ import { HeaderKeys } from './types';
2
+ export declare const LOCATION_DETAIL_VIEW_HEADERS: HeaderKeys[];
@@ -0,0 +1,11 @@
1
+ import { LocationDetailViewHeaders } from './types';
2
+ export declare const getHeaders: ({ tableColumnLastModifiedHeader, tableColumnNameHeader, tableColumnSizeHeader, tableColumnTypeHeader, areAllFilesSelected, selectAllFilesLabel, onSelectAll, hasFiles, }: {
3
+ tableColumnLastModifiedHeader: string;
4
+ tableColumnNameHeader: string;
5
+ tableColumnSizeHeader: string;
6
+ tableColumnTypeHeader: string;
7
+ areAllFilesSelected: boolean;
8
+ selectAllFilesLabel: string;
9
+ onSelectAll: () => void;
10
+ hasFiles: boolean;
11
+ }) => LocationDetailViewHeaders;
@@ -1,8 +1,10 @@
1
1
  import { FileData, FileDataItem, LocationItemData, LocationData } from '../../../actions';
2
2
  import { DataTableProps } from '../../../composables/DataTable';
3
+ import { DefaultLocationDetailViewDisplayText } from '../../../displayText/types';
3
4
  import { LocationState } from '../../../providers/store/location';
4
- export declare const getLocationDetailViewTableData: ({ areAllFilesSelected, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }: {
5
+ export declare const getLocationDetailViewTableData: ({ areAllFilesSelected, displayText, location, fileDataItems, hasFiles, pageItems, selectFileLabel, selectAllFilesLabel, getDateDisplayValue, onDownload, onNavigate, onSelect, onSelectAll, }: {
5
6
  areAllFilesSelected: boolean;
7
+ displayText: DefaultLocationDetailViewDisplayText;
6
8
  location: LocationState;
7
9
  fileDataItems?: FileData[] | undefined;
8
10
  hasFiles: boolean;
@@ -1 +1 @@
1
- export declare const VERSION = "3.8.0";
1
+ export declare const VERSION = "3.8.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-storage",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -45,9 +45,9 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@aws-amplify/ui": "6.8.1",
49
- "@aws-amplify/ui-react": "6.9.1",
50
- "@aws-amplify/ui-react-core": "3.3.1",
48
+ "@aws-amplify/ui": "6.9.0",
49
+ "@aws-amplify/ui-react": "6.9.3",
50
+ "@aws-amplify/ui-react-core": "3.3.3",
51
51
  "tslib": "^2.5.2"
52
52
  },
53
53
  "peerDependencies": {