@aws-amplify/ui-react-storage 3.8.2 → 3.9.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/dist/browser.js +1 -1
- package/dist/{createAmplifyAuthAdapter-PkK_GXRs.js → createAmplifyAuthAdapter-Cf4yJo1e.js} +28 -34
- package/dist/esm/components/StorageBrowser/createStorageBrowser.mjs +4 -1
- package/dist/esm/components/StorageBrowser/views/LocationActionView/CopyView/CopyViewProvider.mjs +5 -4
- package/dist/esm/components/StorageBrowser/views/LocationActionView/CopyView/utils.mjs +3 -0
- package/dist/esm/components/StorageBrowser/views/LocationActionView/DeleteView/DeleteViewProvider.mjs +3 -2
- package/dist/esm/components/StorageBrowser/views/LocationActionView/DeleteView/useDeleteView.mjs +5 -9
- package/dist/esm/components/StorageBrowser/views/LocationActionView/DeleteView/utils.mjs +3 -0
- package/dist/esm/components/StorageBrowser/views/LocationActionView/UploadView/UploadViewProvider.mjs +2 -0
- package/dist/esm/components/StorageBrowser/views/LocationActionView/UploadView/utils.mjs +5 -0
- package/dist/esm/components/StorageBrowser/views/LocationActionView/getActionViewTableData.mjs +3 -17
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +14 -2
- package/dist/types/components/StorageBrowser/ErrorBoundary/ErrorBoundary.d.ts +3 -5
- package/dist/types/components/StorageBrowser/ErrorBoundary/index.d.ts +1 -1
- package/dist/types/components/StorageBrowser/types.d.ts +6 -0
- package/dist/types/components/StorageBrowser/views/LocationActionView/CopyView/utils.d.ts +3 -0
- package/dist/types/components/StorageBrowser/views/LocationActionView/DeleteView/utils.d.ts +3 -0
- package/dist/types/components/StorageBrowser/views/LocationActionView/UploadView/utils.d.ts +3 -0
- package/dist/types/components/StorageBrowser/views/LocationActionView/getActionViewTableData.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- 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-
|
|
5
|
+
var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-Cf4yJo1e.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.
|
|
35
|
+
const VERSION = '3.9.1';
|
|
36
36
|
|
|
37
37
|
const constructBucket = ({ bucket: bucketName, region, }) => ({ bucketName, region });
|
|
38
38
|
const parseAccessGrantLocation = (location) => {
|
|
@@ -2540,7 +2540,7 @@ const getProgressHeader = (label) => ({
|
|
|
2540
2540
|
type: 'sort',
|
|
2541
2541
|
content: { label },
|
|
2542
2542
|
});
|
|
2543
|
-
const getActionViewTableData = ({ tasks, displayText,
|
|
2543
|
+
const getActionViewTableData = ({ tasks, displayText, getFolderText, isProcessing, shouldDisplayProgress = false, onTaskRemove, }) => {
|
|
2544
2544
|
const headers = [
|
|
2545
2545
|
...getDefaultActionViewHeaders({
|
|
2546
2546
|
displayText,
|
|
@@ -2571,22 +2571,8 @@ const getActionViewTableData = ({ tasks, displayText, isProcessing, locationKey,
|
|
|
2571
2571
|
};
|
|
2572
2572
|
}
|
|
2573
2573
|
case 'folder': {
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
}
|
|
2577
|
-
if (isFileItem(data)) {
|
|
2578
|
-
const { webkitRelativePath } = data.file;
|
|
2579
|
-
return {
|
|
2580
|
-
key,
|
|
2581
|
-
type: 'text',
|
|
2582
|
-
content: {
|
|
2583
|
-
text: webkitRelativePath
|
|
2584
|
-
? webkitRelativePath.slice(0, webkitRelativePath.lastIndexOf('/') + 1)
|
|
2585
|
-
: '-',
|
|
2586
|
-
},
|
|
2587
|
-
};
|
|
2588
|
-
}
|
|
2589
|
-
return { key, type: 'text', content: { text: '/' } };
|
|
2574
|
+
const text = getFolderText?.(task) ?? '/';
|
|
2575
|
+
return { key, type: 'text', content: { text } };
|
|
2590
2576
|
}
|
|
2591
2577
|
case 'type': {
|
|
2592
2578
|
return {
|
|
@@ -2661,6 +2647,10 @@ const getActionViewTableData = ({ tasks, displayText, isProcessing, locationKey,
|
|
|
2661
2647
|
return { headers, rows };
|
|
2662
2648
|
};
|
|
2663
2649
|
|
|
2650
|
+
const getFolderText$2 = ({ data: { file: { webkitRelativePath }, }, }) => webkitRelativePath
|
|
2651
|
+
? webkitRelativePath.slice(0, webkitRelativePath.lastIndexOf('/') + 1)
|
|
2652
|
+
: '-';
|
|
2653
|
+
|
|
2664
2654
|
function UploadViewProvider({ children, ...props }) {
|
|
2665
2655
|
const { UploadView: displayText } = useDisplayText();
|
|
2666
2656
|
const { actionCancelLabel, actionDestinationLabel, actionExitLabel, actionStartLabel, addFilesLabel, addFolderLabel, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, overwriteToggleLabel, title, getActionCompleteMessage, getFilesValidationMessage, } = displayText;
|
|
@@ -2702,6 +2692,7 @@ function UploadViewProvider({ children, ...props }) {
|
|
|
2702
2692
|
statusDisplayFailedLabel,
|
|
2703
2693
|
statusDisplayQueuedLabel,
|
|
2704
2694
|
tableData: getActionViewTableData({
|
|
2695
|
+
getFolderText: getFolderText$2,
|
|
2705
2696
|
tasks,
|
|
2706
2697
|
shouldDisplayProgress: true,
|
|
2707
2698
|
displayText,
|
|
@@ -3485,15 +3476,16 @@ const FoldersTableControl = () => {
|
|
|
3485
3476
|
};
|
|
3486
3477
|
FoldersTableControl.displayName = 'FoldersTable';
|
|
3487
3478
|
|
|
3479
|
+
const getFolderText$1 = ({ data: { fileKey, sourceKey }, }) => sourceKey.slice(0, -fileKey.length);
|
|
3480
|
+
|
|
3488
3481
|
function CopyViewProvider({ children, ...props }) {
|
|
3489
3482
|
const { CopyView: displayText } = useDisplayText();
|
|
3490
|
-
const { actionCancelLabel, actionDestinationLabel, actionExitLabel, actionStartLabel, getActionCompleteMessage, overwriteWarningMessage, searchPlaceholder, searchSubmitLabel, searchClearLabel, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, } = displayText;
|
|
3491
|
-
const { destination, folders, isProcessing, isProcessingComplete,
|
|
3483
|
+
const { actionCancelLabel, actionDestinationLabel, actionExitLabel, actionStartLabel, getActionCompleteMessage, overwriteWarningMessage, searchPlaceholder, searchSubmitLabel, searchClearLabel, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, title, } = displayText;
|
|
3484
|
+
const { destination, folders, isProcessing, isProcessingComplete, statusCounts, tasks, onActionCancel, onActionExit, onActionStart, onSelectDestination, onTaskRemove, } = props;
|
|
3492
3485
|
const { hasNextPage, highestPageVisited, hasError: hasFoldersError, message: foldersErrorMessage, query, hasExhaustedSearch, isLoading, page, pageItems, onPaginate, onQuery, onSearchClear, onSearch, onSelectFolder, } = folders;
|
|
3493
|
-
const { key: locationKey } = location ?? {};
|
|
3494
3486
|
const tableData = getActionViewTableData({
|
|
3487
|
+
getFolderText: getFolderText$1,
|
|
3495
3488
|
tasks,
|
|
3496
|
-
locationKey,
|
|
3497
3489
|
isProcessing,
|
|
3498
3490
|
displayText,
|
|
3499
3491
|
onTaskRemove,
|
|
@@ -3528,6 +3520,7 @@ function CopyViewProvider({ children, ...props }) {
|
|
|
3528
3520
|
statusDisplayFailedLabel,
|
|
3529
3521
|
statusDisplayQueuedLabel,
|
|
3530
3522
|
tableData,
|
|
3523
|
+
title,
|
|
3531
3524
|
}, onActionCancel: onActionCancel, onActionExit: onActionExit, onActionStart: onActionStart, onSearch: onSearch, onSearchClear: onSearchClear, onSearchQueryChange: onQuery, onSelectDestination: onSelectDestination },
|
|
3532
3525
|
React__namespace["default"].createElement(FoldersPaginationProvider, { hasNextPage: hasNextPage, highestPageVisited: highestPageVisited, page: page, onPaginate: onPaginate },
|
|
3533
3526
|
React__namespace["default"].createElement(FoldersTableProvider, { destination: destination, folders: pageItems, onSelectFolder: onSelectFolder },
|
|
@@ -3793,18 +3786,20 @@ CopyView.Statuses = StatusDisplayControl;
|
|
|
3793
3786
|
CopyView.TasksTable = DataTableControl;
|
|
3794
3787
|
CopyView.Title = TitleControl;
|
|
3795
3788
|
|
|
3789
|
+
const getFolderText = ({ data: { fileKey, key }, }) => key.slice(0, -fileKey.length);
|
|
3790
|
+
|
|
3796
3791
|
function DeleteViewProvider({ children, ...props }) {
|
|
3797
3792
|
const { DeleteView: displayText } = useDisplayText();
|
|
3798
3793
|
const { actionCancelLabel, actionExitLabel, actionStartLabel, title, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, getActionCompleteMessage, } = displayText;
|
|
3799
|
-
const { isProcessing, isProcessingComplete,
|
|
3794
|
+
const { isProcessing, isProcessingComplete, statusCounts, tasks, onActionCancel, onActionStart, onActionExit, onTaskRemove, } = props;
|
|
3800
3795
|
const message = isProcessingComplete
|
|
3801
3796
|
? getActionCompleteMessage({ counts: statusCounts })
|
|
3802
3797
|
: undefined;
|
|
3803
3798
|
const tableData = getActionViewTableData({
|
|
3804
3799
|
tasks,
|
|
3805
|
-
locationKey: location.key,
|
|
3806
3800
|
isProcessing,
|
|
3807
3801
|
displayText,
|
|
3802
|
+
getFolderText,
|
|
3808
3803
|
onTaskRemove,
|
|
3809
3804
|
});
|
|
3810
3805
|
return (React__namespace["default"].createElement(ControlsContextProvider, { data: {
|
|
@@ -3825,18 +3820,14 @@ function DeleteViewProvider({ children, ...props }) {
|
|
|
3825
3820
|
}, onActionStart: onActionStart, onActionExit: onActionExit, onActionCancel: onActionCancel }, children));
|
|
3826
3821
|
}
|
|
3827
3822
|
|
|
3823
|
+
// assign to constant to ensure referential equality
|
|
3824
|
+
const EMPTY_ITEMS = [];
|
|
3828
3825
|
const useDeleteView = (options) => {
|
|
3829
3826
|
const { onExit: _onExit } = options ?? {};
|
|
3830
3827
|
const [{ location, locationItems }, dispatchStoreAction] = useStore();
|
|
3831
|
-
const {
|
|
3832
|
-
const {
|
|
3833
|
-
const
|
|
3834
|
-
? []
|
|
3835
|
-
: fileDataItems.map((item) => ({
|
|
3836
|
-
...item,
|
|
3837
|
-
key: `${key}${item.fileKey}`,
|
|
3838
|
-
})), [fileDataItems, key]);
|
|
3839
|
-
const [processState, handleProcess] = useAction('delete', { items: data });
|
|
3828
|
+
const { current } = location;
|
|
3829
|
+
const { fileDataItems: items = EMPTY_ITEMS } = locationItems;
|
|
3830
|
+
const [processState, handleProcess] = useAction('delete', { items });
|
|
3840
3831
|
const { isProcessing, isProcessingComplete, statusCounts, tasks } = processState;
|
|
3841
3832
|
const onActionStart = () => {
|
|
3842
3833
|
if (!current)
|
|
@@ -4918,7 +4909,10 @@ function createStorageBrowser(input) {
|
|
|
4918
4909
|
React__namespace["default"].createElement(ViewsProvider, { actions: actions, views: views },
|
|
4919
4910
|
React__namespace["default"].createElement(ComponentsProvider, { composables: composables, elements: elementsDefault }, children))))))));
|
|
4920
4911
|
}
|
|
4921
|
-
const
|
|
4912
|
+
const ErrorBoundary$1 = input.ErrorBoundary === null
|
|
4913
|
+
? React__namespace["default"].Fragment
|
|
4914
|
+
: input.ErrorBoundary ?? ErrorBoundary;
|
|
4915
|
+
const StorageBrowser = ({ views, displayText }) => (React__namespace["default"].createElement(ErrorBoundary$1, null,
|
|
4922
4916
|
React__namespace["default"].createElement(Provider, { displayText: displayText, views: views },
|
|
4923
4917
|
React__namespace["default"].createElement(StorageBrowserDefault, null))));
|
|
4924
4918
|
StorageBrowser.LocationActionView =
|
|
@@ -86,7 +86,10 @@ function createStorageBrowser(input) {
|
|
|
86
86
|
React__default.createElement(ViewsProvider, { actions: actions, views: views },
|
|
87
87
|
React__default.createElement(ComponentsProvider, { composables: composables, elements: elementsDefault }, children))))))));
|
|
88
88
|
}
|
|
89
|
-
const
|
|
89
|
+
const ErrorBoundary$1 = input.ErrorBoundary === null
|
|
90
|
+
? React__default.Fragment
|
|
91
|
+
: input.ErrorBoundary ?? ErrorBoundary;
|
|
92
|
+
const StorageBrowser = ({ views, displayText }) => (React__default.createElement(ErrorBoundary$1, null,
|
|
90
93
|
React__default.createElement(Provider, { displayText: displayText, views: views },
|
|
91
94
|
React__default.createElement(StorageBrowserDefault, null))));
|
|
92
95
|
StorageBrowser.LocationActionView =
|
package/dist/esm/components/StorageBrowser/views/LocationActionView/CopyView/CopyViewProvider.mjs
CHANGED
|
@@ -6,16 +6,16 @@ import { getActionViewTableData } from '../getActionViewTableData.mjs';
|
|
|
6
6
|
import { FoldersMessageProvider } from './FoldersMessageControl.mjs';
|
|
7
7
|
import { FoldersPaginationProvider } from './FoldersPaginationControl.mjs';
|
|
8
8
|
import { FoldersTableProvider } from './FoldersTableControl.mjs';
|
|
9
|
+
import { getFolderText } from './utils.mjs';
|
|
9
10
|
|
|
10
11
|
function CopyViewProvider({ children, ...props }) {
|
|
11
12
|
const { CopyView: displayText } = useDisplayText();
|
|
12
|
-
const { actionCancelLabel, actionDestinationLabel, actionExitLabel, actionStartLabel, getActionCompleteMessage, overwriteWarningMessage, searchPlaceholder, searchSubmitLabel, searchClearLabel, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, } = displayText;
|
|
13
|
-
const { destination, folders, isProcessing, isProcessingComplete,
|
|
13
|
+
const { actionCancelLabel, actionDestinationLabel, actionExitLabel, actionStartLabel, getActionCompleteMessage, overwriteWarningMessage, searchPlaceholder, searchSubmitLabel, searchClearLabel, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, title, } = displayText;
|
|
14
|
+
const { destination, folders, isProcessing, isProcessingComplete, statusCounts, tasks, onActionCancel, onActionExit, onActionStart, onSelectDestination, onTaskRemove, } = props;
|
|
14
15
|
const { hasNextPage, highestPageVisited, hasError: hasFoldersError, message: foldersErrorMessage, query, hasExhaustedSearch, isLoading, page, pageItems, onPaginate, onQuery, onSearchClear, onSearch, onSelectFolder, } = folders;
|
|
15
|
-
const { key: locationKey } = location ?? {};
|
|
16
16
|
const tableData = getActionViewTableData({
|
|
17
|
+
getFolderText,
|
|
17
18
|
tasks,
|
|
18
|
-
locationKey,
|
|
19
19
|
isProcessing,
|
|
20
20
|
displayText,
|
|
21
21
|
onTaskRemove,
|
|
@@ -50,6 +50,7 @@ function CopyViewProvider({ children, ...props }) {
|
|
|
50
50
|
statusDisplayFailedLabel,
|
|
51
51
|
statusDisplayQueuedLabel,
|
|
52
52
|
tableData,
|
|
53
|
+
title,
|
|
53
54
|
}, onActionCancel: onActionCancel, onActionExit: onActionExit, onActionStart: onActionStart, onSearch: onSearch, onSearchClear: onSearchClear, onSearchQueryChange: onQuery, onSelectDestination: onSelectDestination },
|
|
54
55
|
React__default.createElement(FoldersPaginationProvider, { hasNextPage: hasNextPage, highestPageVisited: highestPageVisited, page: page, onPaginate: onPaginate },
|
|
55
56
|
React__default.createElement(FoldersTableProvider, { destination: destination, folders: pageItems, onSelectFolder: onSelectFolder },
|
|
@@ -3,19 +3,20 @@ import { ControlsContextProvider } from '../../../controls/context.mjs';
|
|
|
3
3
|
import { useDisplayText } from '../../../displayText/context.mjs';
|
|
4
4
|
import '@aws-amplify/ui';
|
|
5
5
|
import { getActionViewTableData } from '../getActionViewTableData.mjs';
|
|
6
|
+
import { getFolderText } from './utils.mjs';
|
|
6
7
|
|
|
7
8
|
function DeleteViewProvider({ children, ...props }) {
|
|
8
9
|
const { DeleteView: displayText } = useDisplayText();
|
|
9
10
|
const { actionCancelLabel, actionExitLabel, actionStartLabel, title, statusDisplayCanceledLabel, statusDisplayCompletedLabel, statusDisplayFailedLabel, statusDisplayQueuedLabel, getActionCompleteMessage, } = displayText;
|
|
10
|
-
const { isProcessing, isProcessingComplete,
|
|
11
|
+
const { isProcessing, isProcessingComplete, statusCounts, tasks, onActionCancel, onActionStart, onActionExit, onTaskRemove, } = props;
|
|
11
12
|
const message = isProcessingComplete
|
|
12
13
|
? getActionCompleteMessage({ counts: statusCounts })
|
|
13
14
|
: undefined;
|
|
14
15
|
const tableData = getActionViewTableData({
|
|
15
16
|
tasks,
|
|
16
|
-
locationKey: location.key,
|
|
17
17
|
isProcessing,
|
|
18
18
|
displayText,
|
|
19
|
+
getFolderText,
|
|
19
20
|
onTaskRemove,
|
|
20
21
|
});
|
|
21
22
|
return (React__default.createElement(ControlsContextProvider, { data: {
|
package/dist/esm/components/StorageBrowser/views/LocationActionView/DeleteView/useDeleteView.mjs
CHANGED
|
@@ -15,18 +15,14 @@ import '@aws-amplify/storage/internals';
|
|
|
15
15
|
import 'aws-amplify/storage';
|
|
16
16
|
import '../../../actions/configs/context.mjs';
|
|
17
17
|
|
|
18
|
+
// assign to constant to ensure referential equality
|
|
19
|
+
const EMPTY_ITEMS = [];
|
|
18
20
|
const useDeleteView = (options) => {
|
|
19
21
|
const { onExit: _onExit } = options ?? {};
|
|
20
22
|
const [{ location, locationItems }, dispatchStoreAction] = useStore();
|
|
21
|
-
const {
|
|
22
|
-
const {
|
|
23
|
-
const
|
|
24
|
-
? []
|
|
25
|
-
: fileDataItems.map((item) => ({
|
|
26
|
-
...item,
|
|
27
|
-
key: `${key}${item.fileKey}`,
|
|
28
|
-
})), [fileDataItems, key]);
|
|
29
|
-
const [processState, handleProcess] = useAction('delete', { items: data });
|
|
23
|
+
const { current } = location;
|
|
24
|
+
const { fileDataItems: items = EMPTY_ITEMS } = locationItems;
|
|
25
|
+
const [processState, handleProcess] = useAction('delete', { items });
|
|
30
26
|
const { isProcessing, isProcessingComplete, statusCounts, tasks } = processState;
|
|
31
27
|
const onActionStart = () => {
|
|
32
28
|
if (!current)
|
|
@@ -3,6 +3,7 @@ import { ControlsContextProvider } from '../../../controls/context.mjs';
|
|
|
3
3
|
import { useDisplayText } from '../../../displayText/context.mjs';
|
|
4
4
|
import '@aws-amplify/ui';
|
|
5
5
|
import { getActionViewTableData } from '../getActionViewTableData.mjs';
|
|
6
|
+
import { getFolderText } from './utils.mjs';
|
|
6
7
|
|
|
7
8
|
function UploadViewProvider({ children, ...props }) {
|
|
8
9
|
const { UploadView: displayText } = useDisplayText();
|
|
@@ -45,6 +46,7 @@ function UploadViewProvider({ children, ...props }) {
|
|
|
45
46
|
statusDisplayFailedLabel,
|
|
46
47
|
statusDisplayQueuedLabel,
|
|
47
48
|
tableData: getActionViewTableData({
|
|
49
|
+
getFolderText,
|
|
48
50
|
tasks,
|
|
49
51
|
shouldDisplayProgress: true,
|
|
50
52
|
displayText,
|
package/dist/esm/components/StorageBrowser/views/LocationActionView/getActionViewTableData.mjs
CHANGED
|
@@ -31,7 +31,7 @@ const getProgressHeader = (label) => ({
|
|
|
31
31
|
type: 'sort',
|
|
32
32
|
content: { label },
|
|
33
33
|
});
|
|
34
|
-
const getActionViewTableData = ({ tasks, displayText,
|
|
34
|
+
const getActionViewTableData = ({ tasks, displayText, getFolderText, isProcessing, shouldDisplayProgress = false, onTaskRemove, }) => {
|
|
35
35
|
const headers = [
|
|
36
36
|
...getDefaultActionViewHeaders({
|
|
37
37
|
displayText,
|
|
@@ -62,22 +62,8 @@ const getActionViewTableData = ({ tasks, displayText, isProcessing, locationKey,
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
case 'folder': {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
if (isFileItem(data)) {
|
|
69
|
-
const { webkitRelativePath } = data.file;
|
|
70
|
-
return {
|
|
71
|
-
key,
|
|
72
|
-
type: 'text',
|
|
73
|
-
content: {
|
|
74
|
-
text: webkitRelativePath
|
|
75
|
-
? webkitRelativePath.slice(0, webkitRelativePath.lastIndexOf('/') + 1)
|
|
76
|
-
: '-',
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
return { key, type: 'text', content: { text: '/' } };
|
|
65
|
+
const text = getFolderText?.(task) ?? '/';
|
|
66
|
+
return { key, type: 'text', content: { text } };
|
|
81
67
|
}
|
|
82
68
|
case 'type': {
|
|
83
69
|
return {
|
package/dist/esm/version.mjs
CHANGED
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-
|
|
12
|
+
var createAmplifyAuthAdapter = require('./createAmplifyAuthAdapter-Cf4yJo1e.js');
|
|
13
13
|
require('@aws-amplify/storage/internals');
|
|
14
14
|
require('@aws-amplify/ui-react-core/elements');
|
|
15
15
|
require('aws-amplify');
|
package/dist/styles.css
CHANGED
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
--amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
|
|
51
51
|
--amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
|
|
52
52
|
--amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
|
|
53
|
-
--amplify-components-ai-conversation-attachment-list-padding
|
|
53
|
+
--amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
|
|
54
|
+
--amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
|
|
54
55
|
--amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
|
|
55
56
|
--amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
|
|
56
57
|
--amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
|
|
@@ -3077,6 +3078,7 @@ strong.amplify-text {
|
|
|
3077
3078
|
-moz-user-select: text;
|
|
3078
3079
|
user-select: text;
|
|
3079
3080
|
white-space: pre-wrap;
|
|
3081
|
+
max-height: 100%;
|
|
3080
3082
|
}
|
|
3081
3083
|
.amplify-textarea:focus {
|
|
3082
3084
|
border-color: var(--amplify-components-fieldcontrol-focus-border-color);
|
|
@@ -5802,6 +5804,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
5802
5804
|
}
|
|
5803
5805
|
|
|
5804
5806
|
.amplify-textareafield {
|
|
5807
|
+
max-height: 100%;
|
|
5805
5808
|
flex-direction: column;
|
|
5806
5809
|
--amplify-components-fieldcontrol-color: var(
|
|
5807
5810
|
--amplify-components-textareafield-color
|
|
@@ -6837,16 +6840,24 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
6837
6840
|
--internal-flex-direction: row;
|
|
6838
6841
|
--internal-body-align-items: flex-start;
|
|
6839
6842
|
}
|
|
6843
|
+
.amplify-ai-conversation__scrollview {
|
|
6844
|
+
flex: 1 0 50%;
|
|
6845
|
+
}
|
|
6840
6846
|
.amplify-ai-conversation__form {
|
|
6841
6847
|
display: flex;
|
|
6842
6848
|
flex-direction: row;
|
|
6843
6849
|
align-items: flex-start;
|
|
6850
|
+
padding: var(--amplify-components-ai-conversation-form-padding);
|
|
6844
6851
|
gap: var(--amplify-components-ai-conversation-form-gap);
|
|
6852
|
+
max-height: 100%;
|
|
6853
|
+
overflow: hidden;
|
|
6845
6854
|
}
|
|
6846
6855
|
.amplify-ai-conversation__form__dropzone {
|
|
6847
6856
|
text-align: initial;
|
|
6848
6857
|
border: none;
|
|
6849
|
-
padding:
|
|
6858
|
+
padding: 0;
|
|
6859
|
+
display: grid;
|
|
6860
|
+
overflow: hidden;
|
|
6850
6861
|
}
|
|
6851
6862
|
.amplify-ai-conversation__form__error {
|
|
6852
6863
|
padding: 0;
|
|
@@ -6871,6 +6882,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
6871
6882
|
flex-direction: row;
|
|
6872
6883
|
flex-wrap: wrap;
|
|
6873
6884
|
gap: var(--amplify-components-ai-conversation-attachment-list-gap);
|
|
6885
|
+
padding: var(--amplify-components-ai-conversation-attachment-list-padding);
|
|
6874
6886
|
padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
|
|
6875
6887
|
}
|
|
6876
6888
|
.amplify-ai-conversation__attachment__image {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface ErrorBoundaryProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
5
2
|
interface ErrorBoundaryState {
|
|
6
3
|
hasError: boolean;
|
|
7
4
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
5
|
+
export type ErrorBoundaryType = React.ComponentType<React.PropsWithChildren>;
|
|
6
|
+
export declare class ErrorBoundary extends React.Component<React.PropsWithChildren, ErrorBoundaryState> {
|
|
7
|
+
constructor(props: React.PropsWithChildren);
|
|
10
8
|
static getDerivedStateFromError(_error: Error): ErrorBoundaryState;
|
|
11
9
|
render(): React.ReactNode;
|
|
12
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ErrorBoundary } from './ErrorBoundary';
|
|
1
|
+
export { ErrorBoundary, ErrorBoundaryType } from './ErrorBoundary';
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { CustomActionConfigs, DefaultActionConfigs, ExtendedActionConfigs, ListLocations } from './actions';
|
|
3
3
|
import { GetLocationCredentials } from './credentials/types';
|
|
4
4
|
import { Components } from './ComponentsProvider';
|
|
5
|
+
import { ErrorBoundaryType } from './ErrorBoundary';
|
|
5
6
|
import { RegisterAuthListener, StoreProviderProps } from './providers';
|
|
6
7
|
import { CopyViewType, CreateFolderViewType, DeleteViewType, UploadViewType, LocationActionViewType, LocationDetailViewType, LocationsViewType, Views, UseView } from './views';
|
|
7
8
|
import { StorageBrowserDisplayText } from './displayText';
|
|
@@ -22,6 +23,11 @@ export interface CreateStorageBrowserInput {
|
|
|
22
23
|
actions?: StorageBrowserActions;
|
|
23
24
|
config: Config;
|
|
24
25
|
components?: Components;
|
|
26
|
+
/**
|
|
27
|
+
* Custom ErrorBoundary class. If omitted, a default ErrorBoundary is provided.
|
|
28
|
+
* To disable ErrorBoundary, set to `null`.
|
|
29
|
+
*/
|
|
30
|
+
ErrorBoundary?: ErrorBoundaryType | null;
|
|
25
31
|
}
|
|
26
32
|
export interface StorageBrowserProps<K = string, V = {}> {
|
|
27
33
|
displayText?: StorageBrowserDisplayText;
|
package/dist/types/components/StorageBrowser/views/LocationActionView/getActionViewTableData.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { DataTableProps } from '../../composables/DataTable';
|
|
|
2
2
|
import { Task } from '../../tasks';
|
|
3
3
|
import { TaskData } from '../../actions';
|
|
4
4
|
import { DefaultActionViewDisplayText } from '../../displayText/types';
|
|
5
|
-
export declare const getActionViewTableData: <T extends TaskData = TaskData>({ tasks, displayText,
|
|
5
|
+
export declare const getActionViewTableData: <T extends TaskData = TaskData>({ tasks, displayText, getFolderText, isProcessing, shouldDisplayProgress, onTaskRemove, }: {
|
|
6
6
|
tasks: Task<T, any>[];
|
|
7
7
|
isProcessing: boolean;
|
|
8
|
-
locationKey?: string | undefined;
|
|
9
8
|
shouldDisplayProgress?: boolean | undefined;
|
|
9
|
+
getFolderText?: ((task: Task<T, any>) => string) | undefined;
|
|
10
10
|
displayText: Omit<DefaultActionViewDisplayText, 'getActionCompleteMessage'> & {
|
|
11
11
|
tableStatusOverwritePreventedLabel?: string;
|
|
12
12
|
};
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.9.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-storage",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
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.9.
|
|
49
|
-
"@aws-amplify/ui-react": "6.9.
|
|
50
|
-
"@aws-amplify/ui-react-core": "3.3.
|
|
48
|
+
"@aws-amplify/ui": "6.9.1",
|
|
49
|
+
"@aws-amplify/ui-react": "6.9.5",
|
|
50
|
+
"@aws-amplify/ui-react-core": "3.3.5",
|
|
51
51
|
"tslib": "^2.5.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|