@scality/data-browser-library 1.0.0-preview.13 → 1.0.0-preview.16
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/components/DataBrowserUI.d.ts +6 -14
- package/dist/components/DataBrowserUI.js +79 -55
- package/dist/components/Editor.d.ts +1 -1
- package/dist/components/Editor.js +3 -3
- package/dist/components/__tests__/BucketCreate.test.js +102 -102
- package/dist/components/__tests__/BucketDetails.test.js +122 -123
- package/dist/components/__tests__/BucketLifecycleFormPage.test.js +177 -177
- package/dist/components/__tests__/BucketLifecycleList.test.js +85 -85
- package/dist/components/__tests__/BucketList.test.js +175 -176
- package/dist/components/__tests__/BucketNotificationCreatePage.test.js +84 -84
- package/dist/components/__tests__/BucketOverview.test.js +257 -201
- package/dist/components/__tests__/BucketPolicyPage.test.js +62 -62
- package/dist/components/__tests__/BucketReplicationFormPage.test.js +542 -542
- package/dist/components/__tests__/BucketReplicationList.test.js +106 -106
- package/dist/components/__tests__/CreateFolderButton.test.js +56 -56
- package/dist/components/__tests__/DeleteBucketButton.test.js +62 -62
- package/dist/components/__tests__/DeleteBucketConfigRuleButton.test.js +47 -47
- package/dist/components/__tests__/DeleteObjectButton.test.js +63 -63
- package/dist/components/__tests__/EmptyBucketButton.test.js +56 -56
- package/dist/components/__tests__/MetadataSearch.test.js +65 -65
- package/dist/components/__tests__/ObjectList.test.js +252 -251
- package/dist/components/__tests__/UploadButton.test.js +45 -45
- package/dist/components/buckets/BucketCreate.d.ts +2 -2
- package/dist/components/buckets/BucketCreate.js +41 -41
- package/dist/components/buckets/BucketDetails.d.ts +2 -2
- package/dist/components/buckets/BucketDetails.js +48 -36
- package/dist/components/buckets/BucketLifecycleFormPage.js +161 -160
- package/dist/components/buckets/BucketLifecycleList.d.ts +2 -2
- package/dist/components/buckets/BucketLifecycleList.js +46 -46
- package/dist/components/buckets/BucketList.d.ts +2 -2
- package/dist/components/buckets/BucketList.js +28 -27
- package/dist/components/buckets/BucketLocation.js +3 -3
- package/dist/components/buckets/BucketOverview.d.ts +1 -1
- package/dist/components/buckets/BucketOverview.js +64 -65
- package/dist/components/buckets/BucketPage.js +19 -11
- package/dist/components/buckets/BucketPolicyButton.js +2 -2
- package/dist/components/buckets/BucketPolicyPage.js +27 -25
- package/dist/components/buckets/BucketReplicationFormPage.js +133 -132
- package/dist/components/buckets/BucketReplicationList.d.ts +2 -2
- package/dist/components/buckets/BucketReplicationList.js +41 -41
- package/dist/components/buckets/BucketVersioning.js +11 -11
- package/dist/components/buckets/DeleteBucketButton.js +5 -5
- package/dist/components/buckets/DeleteBucketConfigRuleButton.d.ts +2 -2
- package/dist/components/buckets/DeleteBucketConfigRuleButton.js +1 -1
- package/dist/components/buckets/EmptyBucketButton.js +19 -19
- package/dist/components/buckets/EmptyBucketSummary.d.ts +1 -1
- package/dist/components/buckets/EmptyBucketSummary.js +1 -1
- package/dist/components/buckets/EmptyBucketSummaryList.js +22 -22
- package/dist/components/buckets/__tests__/BucketVersioning.test.js +45 -45
- package/dist/components/buckets/notifications/BucketNotificationCreatePage.js +34 -33
- package/dist/components/buckets/notifications/EventsSection.js +144 -28
- package/dist/components/buckets/notifications/__tests__/events.test.d.ts +1 -0
- package/dist/components/buckets/notifications/__tests__/events.test.js +56 -0
- package/dist/components/buckets/notifications/events.d.ts +71 -7
- package/dist/components/buckets/notifications/events.js +98 -16
- package/dist/components/index.d.ts +24 -22
- package/dist/components/index.js +5 -3
- package/dist/components/layouts/ArrowNavigation.d.ts +1 -2
- package/dist/components/layouts/ArrowNavigation.js +3 -3
- package/dist/components/layouts/BrowserPageLayout.d.ts +2 -3
- package/dist/components/layouts/BrowserPageLayout.js +1 -1
- package/dist/components/objects/CreateFolderButton.d.ts +2 -2
- package/dist/components/objects/CreateFolderButton.js +9 -9
- package/dist/components/objects/DeleteObjectButton.d.ts +1 -1
- package/dist/components/objects/DeleteObjectButton.js +20 -20
- package/dist/components/objects/ObjectDetails/ObjectMetadata.d.ts +1 -1
- package/dist/components/objects/ObjectDetails/ObjectMetadata.js +56 -56
- package/dist/components/objects/ObjectDetails/ObjectSummary.d.ts +1 -1
- package/dist/components/objects/ObjectDetails/ObjectSummary.js +39 -39
- package/dist/components/objects/ObjectDetails/ObjectTags.d.ts +1 -1
- package/dist/components/objects/ObjectDetails/ObjectTags.js +25 -25
- package/dist/components/objects/ObjectDetails/__tests__/ObjectDetails.test.js +119 -119
- package/dist/components/objects/ObjectDetails/__tests__/ObjectSummary.test.js +211 -211
- package/dist/components/objects/ObjectDetails/index.d.ts +1 -1
- package/dist/components/objects/ObjectDetails/index.js +30 -30
- package/dist/components/objects/ObjectList.d.ts +5 -5
- package/dist/components/objects/ObjectList.js +113 -112
- package/dist/components/objects/ObjectLock/EditRetentionButton.js +3 -3
- package/dist/components/objects/ObjectLock/ObjectLockRetentionSettings.js +14 -14
- package/dist/components/objects/ObjectLock/ObjectLockSettings.d.ts +1 -1
- package/dist/components/objects/ObjectLock/ObjectLockSettings.js +29 -28
- package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.d.ts +1 -1
- package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.js +6 -6
- package/dist/components/objects/ObjectLock/__tests__/EditRetentionButton.test.js +50 -50
- package/dist/components/objects/ObjectLock/__tests__/ObjectLockSettings.test.js +77 -77
- package/dist/components/objects/ObjectPage.js +5 -4
- package/dist/components/objects/UploadButton.d.ts +3 -3
- package/dist/components/objects/UploadButton.js +5 -5
- package/dist/components/providers/DataBrowserProvider.d.ts +23 -12
- package/dist/components/providers/DataBrowserProvider.js +60 -38
- package/dist/components/providers/QueryProvider.d.ts +9 -0
- package/dist/components/providers/QueryProvider.js +22 -0
- package/dist/components/search/MetadataSearch.js +26 -25
- package/dist/components/search/SearchHints.js +1 -1
- package/dist/components/ui/ArrayFieldActions.js +4 -4
- package/dist/components/ui/ConfirmDeleteRuleModal.d.ts +1 -1
- package/dist/components/ui/ConfirmDeleteRuleModal.js +1 -1
- package/dist/components/ui/DeleteObjectModalContent.d.ts +1 -1
- package/dist/components/ui/DeleteObjectModalContent.js +12 -12
- package/dist/components/ui/FilterFormSection.d.ts +2 -2
- package/dist/components/ui/FilterFormSection.js +29 -29
- package/dist/components/ui/Search.elements.d.ts +1 -1
- package/dist/components/ui/Search.elements.js +7 -7
- package/dist/components/ui/Table.elements.js +5 -5
- package/dist/config/factory.d.ts +23 -10
- package/dist/config/factory.js +22 -7
- package/dist/config/types.d.ts +20 -3
- package/dist/contexts/DataBrowserUICustomizationContext.d.ts +2 -2
- package/dist/hooks/__tests__/useISVBucketDetection.test.js +42 -42
- package/dist/hooks/__tests__/useIsBucketEmpty.test.js +25 -25
- package/dist/hooks/bucketConfiguration.d.ts +1 -1
- package/dist/hooks/bucketConfiguration.js +48 -48
- package/dist/hooks/bucketOperations.d.ts +1 -1
- package/dist/hooks/bucketOperations.js +6 -6
- package/dist/hooks/factories/__tests__/useCreateS3FunctionMutationHook.test.js +78 -78
- package/dist/hooks/factories/__tests__/useCreateS3InfiniteQueryHook.test.js +78 -78
- package/dist/hooks/factories/__tests__/useCreateS3LoginHook.test.js +42 -42
- package/dist/hooks/factories/__tests__/useCreateS3MutationHook.test.js +61 -61
- package/dist/hooks/factories/__tests__/useCreateS3QueryHook.test.js +63 -63
- package/dist/hooks/factories/index.d.ts +4 -4
- package/dist/hooks/factories/useCreateS3InfiniteQueryHook.d.ts +2 -2
- package/dist/hooks/factories/useCreateS3InfiniteQueryHook.js +15 -12
- package/dist/hooks/factories/useCreateS3LoginHook.d.ts +2 -2
- package/dist/hooks/factories/useCreateS3MutationHook.d.ts +3 -3
- package/dist/hooks/factories/useCreateS3MutationHook.js +6 -1
- package/dist/hooks/factories/useCreateS3QueryHook.d.ts +2 -2
- package/dist/hooks/factories/useCreateS3QueryHook.js +8 -5
- package/dist/hooks/index.d.ts +16 -13
- package/dist/hooks/index.js +4 -1
- package/dist/hooks/loginOperations.d.ts +1 -1
- package/dist/hooks/loginOperations.js +1 -1
- package/dist/hooks/objectOperations.d.ts +2 -2
- package/dist/hooks/objectOperations.js +49 -49
- package/dist/hooks/presignedOperations.d.ts +2 -2
- package/dist/hooks/presignedOperations.js +3 -3
- package/dist/hooks/useBatchObjectLegalHold.js +7 -4
- package/dist/hooks/useDataBrowserNavigate.d.ts +28 -0
- package/dist/hooks/useDataBrowserNavigate.js +24 -0
- package/dist/hooks/useDeleteBucketConfigRule.d.ts +2 -2
- package/dist/hooks/useDeleteBucketConfigRule.js +4 -4
- package/dist/hooks/useEmptyBucket.js +10 -10
- package/dist/hooks/useFeatures.d.ts +7 -0
- package/dist/hooks/useFeatures.js +8 -0
- package/dist/hooks/useISVBucketDetection.js +5 -5
- package/dist/hooks/useIsBucketEmpty.js +4 -4
- package/dist/hooks/useLoginMutation.d.ts +1 -1
- package/dist/hooks/useLoginMutation.js +1 -1
- package/dist/hooks/useS3Client.d.ts +6 -0
- package/dist/hooks/useS3Client.js +3 -2
- package/dist/hooks/useS3ConfigSwitch.d.ts +11 -0
- package/dist/hooks/useS3ConfigSwitch.js +37 -0
- package/dist/hooks/useSupportedNotificationEvents.d.ts +6 -0
- package/dist/hooks/useSupportedNotificationEvents.js +8 -0
- package/dist/index.d.ts +6 -6
- package/dist/test/msw/handlers/deleteBucket.d.ts +1 -1
- package/dist/test/msw/handlers/deleteBucket.js +20 -10
- package/dist/test/msw/handlers/getBucketAcl.d.ts +1 -1
- package/dist/test/msw/handlers/getBucketAcl.js +29 -17
- package/dist/test/msw/handlers/getBucketLocation.d.ts +1 -1
- package/dist/test/msw/handlers/getBucketLocation.js +29 -15
- package/dist/test/msw/handlers/getBucketPolicy.d.ts +1 -1
- package/dist/test/msw/handlers/getBucketPolicy.js +52 -32
- package/dist/test/msw/handlers/headObject.d.ts +1 -1
- package/dist/test/msw/handlers/headObject.js +31 -13
- package/dist/test/msw/handlers/listBuckets.d.ts +1 -1
- package/dist/test/msw/handlers/listBuckets.js +5 -3
- package/dist/test/msw/handlers/listObjectVersions.d.ts +1 -1
- package/dist/test/msw/handlers/listObjectVersions.js +38 -26
- package/dist/test/msw/handlers/listObjects.d.ts +1 -1
- package/dist/test/msw/handlers/listObjects.js +35 -23
- package/dist/test/msw/handlers/objectLegalHold.d.ts +1 -1
- package/dist/test/msw/handlers/objectLegalHold.js +31 -16
- package/dist/test/msw/handlers/objectRetention.d.ts +1 -1
- package/dist/test/msw/handlers/objectRetention.js +31 -17
- package/dist/test/msw/handlers/putBucketAcl.d.ts +1 -1
- package/dist/test/msw/handlers/putBucketAcl.js +29 -14
- package/dist/test/msw/handlers/putObject.d.ts +1 -1
- package/dist/test/msw/handlers/putObject.js +27 -12
- package/dist/test/msw/handlers.d.ts +3 -3
- package/dist/test/msw/handlers.js +72 -49
- package/dist/test/msw/index.d.ts +2 -2
- package/dist/test/msw/server.d.ts +1 -1
- package/dist/test/msw/server.js +1 -1
- package/dist/test/msw/utils.js +2 -2
- package/dist/test/setup.d.ts +1 -1
- package/dist/test/setup.js +19 -19
- package/dist/test/testUtils.d.ts +9 -15
- package/dist/test/testUtils.js +73 -91
- package/dist/test/utils/errorHandling.test.js +119 -119
- package/dist/types/index.d.ts +6 -31
- package/dist/utils/__tests__/s3ConfigIdentifier.test.d.ts +1 -0
- package/dist/utils/__tests__/s3ConfigIdentifier.test.js +429 -0
- package/dist/utils/constants.js +8 -8
- package/dist/utils/deletion/index.d.ts +2 -2
- package/dist/utils/deletion/messages.d.ts +1 -1
- package/dist/utils/deletion/messages.js +4 -4
- package/dist/utils/errorHandling.d.ts +3 -3
- package/dist/utils/errorHandling.js +6 -6
- package/dist/utils/hooks.js +8 -8
- package/dist/utils/index.d.ts +5 -4
- package/dist/utils/index.js +2 -0
- package/dist/utils/proxyMiddleware.d.ts +1 -1
- package/dist/utils/proxyMiddleware.js +6 -11
- package/dist/utils/s3Client.d.ts +2 -2
- package/dist/utils/s3Client.js +1 -1
- package/dist/utils/s3ConfigIdentifier.d.ts +68 -0
- package/dist/utils/s3ConfigIdentifier.js +55 -0
- package/dist/utils/s3RuleUtils.d.ts +5 -5
- package/dist/utils/s3RuleUtils.js +17 -17
- package/package.json +2 -2
- package/dist/utils/useFeatures.d.ts +0 -1
- package/dist/utils/useFeatures.js +0 -7
|
@@ -3,10 +3,10 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
|
|
3
3
|
import user_event from "@testing-library/user-event";
|
|
4
4
|
import { createTestWrapper } from "../../test/testUtils.js";
|
|
5
5
|
import { UploadButton } from "../objects/UploadButton.js";
|
|
6
|
-
describe(
|
|
6
|
+
describe('UploadButton - Core Functionality', ()=>{
|
|
7
7
|
const defaultProps = {
|
|
8
|
-
bucket:
|
|
9
|
-
prefix:
|
|
8
|
+
bucket: 'test-bucket',
|
|
9
|
+
prefix: 'test-prefix'
|
|
10
10
|
};
|
|
11
11
|
const renderUploadButton = (props = {})=>{
|
|
12
12
|
const Wrapper = createTestWrapper();
|
|
@@ -17,128 +17,128 @@ describe("UploadButton - Core Functionality", ()=>{
|
|
|
17
17
|
})
|
|
18
18
|
}));
|
|
19
19
|
};
|
|
20
|
-
it(
|
|
20
|
+
it('renders upload button with default label', ()=>{
|
|
21
21
|
renderUploadButton();
|
|
22
|
-
expect(screen.getByRole(
|
|
22
|
+
expect(screen.getByRole('button', {
|
|
23
23
|
name: /upload/i
|
|
24
24
|
})).toBeInTheDocument();
|
|
25
25
|
});
|
|
26
|
-
it(
|
|
26
|
+
it('renders upload button', ()=>{
|
|
27
27
|
renderUploadButton();
|
|
28
|
-
expect(screen.getByRole(
|
|
28
|
+
expect(screen.getByRole('button', {
|
|
29
29
|
name: /upload/i
|
|
30
30
|
})).toBeInTheDocument();
|
|
31
31
|
});
|
|
32
|
-
it(
|
|
32
|
+
it('opens modal when upload button is clicked', async ()=>{
|
|
33
33
|
renderUploadButton();
|
|
34
|
-
const uploadButton = screen.getByRole(
|
|
34
|
+
const uploadButton = screen.getByRole('button', {
|
|
35
35
|
name: /upload/i
|
|
36
36
|
});
|
|
37
37
|
fireEvent.click(uploadButton);
|
|
38
38
|
await waitFor(()=>{
|
|
39
|
-
expect(screen.getByText(
|
|
39
|
+
expect(screen.getByText('Upload Files')).toBeInTheDocument();
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
it(
|
|
42
|
+
it('closes modal when cancel button is clicked', async ()=>{
|
|
43
43
|
renderUploadButton();
|
|
44
|
-
const uploadButton = screen.getByRole(
|
|
44
|
+
const uploadButton = screen.getByRole('button', {
|
|
45
45
|
name: /upload/i
|
|
46
46
|
});
|
|
47
47
|
fireEvent.click(uploadButton);
|
|
48
48
|
await waitFor(()=>{
|
|
49
|
-
expect(screen.getByText(
|
|
49
|
+
expect(screen.getByText('Upload Files')).toBeInTheDocument();
|
|
50
50
|
});
|
|
51
|
-
const cancelButton = screen.getByRole(
|
|
51
|
+
const cancelButton = screen.getByRole('button', {
|
|
52
52
|
name: /cancel/i
|
|
53
53
|
});
|
|
54
54
|
fireEvent.click(cancelButton);
|
|
55
55
|
await waitFor(()=>{
|
|
56
|
-
expect(screen.queryByText(
|
|
56
|
+
expect(screen.queryByText('Upload Files')).not.toBeInTheDocument();
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
-
it(
|
|
59
|
+
it('displays empty state initially', async ()=>{
|
|
60
60
|
renderUploadButton();
|
|
61
|
-
const uploadButton = screen.getByRole(
|
|
61
|
+
const uploadButton = screen.getByRole('button', {
|
|
62
62
|
name: /upload/i
|
|
63
63
|
});
|
|
64
64
|
fireEvent.click(uploadButton);
|
|
65
65
|
await waitFor(()=>{
|
|
66
|
-
expect(screen.getByText(
|
|
67
|
-
expect(screen.getByRole(
|
|
66
|
+
expect(screen.getByText('Drag and drop files and folders here')).toBeInTheDocument();
|
|
67
|
+
expect(screen.getByRole('button', {
|
|
68
68
|
name: /add files/i
|
|
69
69
|
})).toBeInTheDocument();
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
-
it(
|
|
72
|
+
it('can add files and shows upload button enabled', async ()=>{
|
|
73
73
|
const onUploadSuccess = jest.fn();
|
|
74
74
|
renderUploadButton({
|
|
75
75
|
onUploadSuccess
|
|
76
76
|
});
|
|
77
|
-
const uploadButton = screen.getByRole(
|
|
77
|
+
const uploadButton = screen.getByRole('button', {
|
|
78
78
|
name: /upload/i
|
|
79
79
|
});
|
|
80
80
|
fireEvent.click(uploadButton);
|
|
81
81
|
await waitFor(()=>{
|
|
82
|
-
expect(screen.getByText(
|
|
82
|
+
expect(screen.getByText('Upload Files')).toBeInTheDocument();
|
|
83
83
|
});
|
|
84
|
-
const uploadButtons = screen.getAllByRole(
|
|
85
|
-
name:
|
|
84
|
+
const uploadButtons = screen.getAllByRole('button', {
|
|
85
|
+
name: 'Upload'
|
|
86
86
|
});
|
|
87
|
-
const modalUploadButton = uploadButtons.find((button)=>!button.querySelector(
|
|
87
|
+
const modalUploadButton = uploadButtons.find((button)=>!button.querySelector('svg'));
|
|
88
88
|
expect(modalUploadButton).toBeDisabled();
|
|
89
|
-
const fileInput = screen.getByRole(
|
|
89
|
+
const fileInput = screen.getByRole('presentation').querySelector('input[type="file"]');
|
|
90
90
|
const testFile = new File([
|
|
91
|
-
|
|
92
|
-
],
|
|
93
|
-
type:
|
|
91
|
+
'test content'
|
|
92
|
+
], 'test.txt', {
|
|
93
|
+
type: 'text/plain'
|
|
94
94
|
});
|
|
95
95
|
await user_event.upload(fileInput, testFile);
|
|
96
96
|
await waitFor(()=>{
|
|
97
|
-
expect(screen.getByText(
|
|
98
|
-
expect(screen.getByText(
|
|
97
|
+
expect(screen.getByText('test.txt')).toBeInTheDocument();
|
|
98
|
+
expect(screen.getByText('12 B')).toBeInTheDocument();
|
|
99
99
|
});
|
|
100
100
|
expect(modalUploadButton).toBeEnabled();
|
|
101
101
|
});
|
|
102
|
-
it(
|
|
103
|
-
const customBucket =
|
|
104
|
-
const customPrefix =
|
|
102
|
+
it('displays correct bucket and prefix information', ()=>{
|
|
103
|
+
const customBucket = 'custom-bucket';
|
|
104
|
+
const customPrefix = 'custom/prefix';
|
|
105
105
|
renderUploadButton({
|
|
106
106
|
bucket: customBucket,
|
|
107
107
|
prefix: customPrefix
|
|
108
108
|
});
|
|
109
|
-
expect(screen.getByRole(
|
|
109
|
+
expect(screen.getByRole('button', {
|
|
110
110
|
name: /upload/i
|
|
111
111
|
})).toBeInTheDocument();
|
|
112
112
|
});
|
|
113
|
-
it(
|
|
113
|
+
it('handles different button variants', ()=>{
|
|
114
114
|
renderUploadButton({
|
|
115
|
-
variant:
|
|
115
|
+
variant: 'primary'
|
|
116
116
|
});
|
|
117
|
-
const button = screen.getByRole(
|
|
117
|
+
const button = screen.getByRole('button', {
|
|
118
118
|
name: /upload/i
|
|
119
119
|
});
|
|
120
120
|
expect(button).toBeInTheDocument();
|
|
121
121
|
});
|
|
122
|
-
it(
|
|
122
|
+
it('resets state when modal is closed', async ()=>{
|
|
123
123
|
renderUploadButton();
|
|
124
|
-
const uploadButton = screen.getByRole(
|
|
124
|
+
const uploadButton = screen.getByRole('button', {
|
|
125
125
|
name: /upload/i
|
|
126
126
|
});
|
|
127
127
|
fireEvent.click(uploadButton);
|
|
128
128
|
await waitFor(()=>{
|
|
129
|
-
expect(screen.getByText(
|
|
129
|
+
expect(screen.getByText('Upload Files')).toBeInTheDocument();
|
|
130
130
|
});
|
|
131
|
-
const cancelButton = screen.getByRole(
|
|
131
|
+
const cancelButton = screen.getByRole('button', {
|
|
132
132
|
name: /cancel/i
|
|
133
133
|
});
|
|
134
134
|
fireEvent.click(cancelButton);
|
|
135
135
|
await waitFor(()=>{
|
|
136
|
-
expect(screen.queryByText(
|
|
136
|
+
expect(screen.queryByText('Upload Files')).not.toBeInTheDocument();
|
|
137
137
|
});
|
|
138
138
|
fireEvent.click(uploadButton);
|
|
139
139
|
await waitFor(()=>{
|
|
140
|
-
expect(screen.getByText(
|
|
141
|
-
expect(screen.getByText(
|
|
140
|
+
expect(screen.getByText('Upload Files')).toBeInTheDocument();
|
|
141
|
+
expect(screen.getByText('Drag and drop files and folders here')).toBeInTheDocument();
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
144
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Joi from
|
|
2
|
-
import { ObjectLockRetentionMode } from
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { ObjectLockRetentionMode } from '@aws-sdk/client-s3';
|
|
3
3
|
export declare const bucketErrorMessage = "Bucket names can include only lowercase letters, numbers, dots (.), and hyphens (-)";
|
|
4
4
|
export declare const bucketNameValidationSchema: Joi.StringSchema<string>;
|
|
5
5
|
export declare const baseBucketCreateSchema: Joi.ObjectSchema<any>;
|
|
@@ -5,69 +5,69 @@ import { Button, Input } from "@scality/core-ui/dist/next";
|
|
|
5
5
|
import { convertRemToPixels } from "@scality/core-ui/dist/utils";
|
|
6
6
|
import joi from "joi";
|
|
7
7
|
import { FormProvider, useForm } from "react-hook-form";
|
|
8
|
-
import { useNavigate } from "react-router";
|
|
9
8
|
import ObjectLockRetentionSettings from "../objects/ObjectLock/ObjectLockRetentionSettings.js";
|
|
9
|
+
import { useDataBrowserNavigate } from "../../hooks/useDataBrowserNavigate.js";
|
|
10
10
|
import { objectLockRetentionSettingsValidationRules } from "../objects/ObjectLock/ObjectLockSettings.js";
|
|
11
11
|
import { useCreateBucket, useSetBucketObjectLockConfiguration, useSetBucketVersioning } from "../../hooks/index.js";
|
|
12
|
-
const bucketErrorMessage =
|
|
13
|
-
const bucketNameValidationSchema = joi.string().label(
|
|
14
|
-
name:
|
|
12
|
+
const bucketErrorMessage = 'Bucket names can include only lowercase letters, numbers, dots (.), and hyphens (-)';
|
|
13
|
+
const bucketNameValidationSchema = joi.string().label('Bucket Name').required().min(3).max(63).pattern(/^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$/, {
|
|
14
|
+
name: 'bucketName',
|
|
15
15
|
invert: false
|
|
16
16
|
}).messages({
|
|
17
|
-
|
|
17
|
+
'string.pattern.name': bucketErrorMessage
|
|
18
18
|
}).custom((value, helpers)=>{
|
|
19
|
-
if (value.includes(
|
|
20
|
-
custom:
|
|
19
|
+
if (value.includes('..')) return helpers.message({
|
|
20
|
+
custom: 'Bucket names cannot contain two adjacent periods'
|
|
21
21
|
});
|
|
22
22
|
if (/^(\d{1,3}\.){3}\d{1,3}$/.test(value)) return helpers.message({
|
|
23
|
-
custom:
|
|
23
|
+
custom: 'Bucket names must not be formatted as an IP address'
|
|
24
24
|
});
|
|
25
25
|
const forbiddenPrefixes = [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
'xn--',
|
|
27
|
+
'sthree-',
|
|
28
|
+
'amzn-s3-demo-'
|
|
29
29
|
];
|
|
30
30
|
if (forbiddenPrefixes.some((prefix)=>value.startsWith(prefix))) return helpers.message({
|
|
31
|
-
custom: `Bucket names must not start with ${forbiddenPrefixes.join(
|
|
31
|
+
custom: `Bucket names must not start with ${forbiddenPrefixes.join(', ')}`
|
|
32
32
|
});
|
|
33
33
|
const forbiddenSuffixes = [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
'-s3alias',
|
|
35
|
+
'--ol-s3',
|
|
36
|
+
'--x-s3',
|
|
37
|
+
'.mrap'
|
|
38
38
|
];
|
|
39
39
|
if (forbiddenSuffixes.some((suffix)=>value.endsWith(suffix))) return helpers.message({
|
|
40
|
-
custom: `Bucket names must not end with ${forbiddenSuffixes.join(
|
|
40
|
+
custom: `Bucket names must not end with ${forbiddenSuffixes.join(', ')}`
|
|
41
41
|
});
|
|
42
42
|
const existingBuckets = helpers.prefs.context?.existingBuckets;
|
|
43
43
|
if (Array.isArray(existingBuckets)) {
|
|
44
44
|
const isDuplicate = existingBuckets.some((bucketName)=>bucketName.toLowerCase() === value.toLowerCase());
|
|
45
45
|
if (isDuplicate) return helpers.message({
|
|
46
|
-
custom:
|
|
46
|
+
custom: 'A bucket with this name already exists'
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
return value;
|
|
50
|
-
},
|
|
50
|
+
}, 'AWS S3 bucket naming rules');
|
|
51
51
|
const baseBucketCreateSchema = joi.object({
|
|
52
52
|
name: bucketNameValidationSchema,
|
|
53
53
|
isVersioning: joi.boolean(),
|
|
54
54
|
...objectLockRetentionSettingsValidationRules
|
|
55
55
|
});
|
|
56
56
|
const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultValues: customDefaultValues, children, onSubmit: onSubmitProp, onCancel: onCancelProp })=>{
|
|
57
|
-
const navigate =
|
|
57
|
+
const navigate = useDataBrowserNavigate();
|
|
58
58
|
const { showToast } = useToast();
|
|
59
59
|
const baseDefaultValues = {
|
|
60
|
-
name:
|
|
60
|
+
name: '',
|
|
61
61
|
isVersioning: false,
|
|
62
62
|
isObjectLockEnabled: false,
|
|
63
63
|
isDefaultRetentionEnabled: false,
|
|
64
|
-
retentionMode:
|
|
64
|
+
retentionMode: 'GOVERNANCE',
|
|
65
65
|
retentionPeriod: 1,
|
|
66
|
-
retentionPeriodFrequencyChoice:
|
|
66
|
+
retentionPeriodFrequencyChoice: 'DAYS',
|
|
67
67
|
...customDefaultValues
|
|
68
68
|
};
|
|
69
69
|
const useFormMethods = useForm({
|
|
70
|
-
mode:
|
|
70
|
+
mode: 'all',
|
|
71
71
|
resolver: joiResolver(validationSchema || baseBucketCreateSchema, {
|
|
72
72
|
context: validationContext || {}
|
|
73
73
|
}),
|
|
@@ -76,19 +76,19 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
76
76
|
});
|
|
77
77
|
const { register, handleSubmit, formState, watch } = useFormMethods;
|
|
78
78
|
const { isValid, errors } = formState;
|
|
79
|
-
const isObjectLockEnabled = watch(
|
|
79
|
+
const isObjectLockEnabled = watch('isObjectLockEnabled');
|
|
80
80
|
const { mutate: createBucket, isPending: isCreatingBucket } = useCreateBucket();
|
|
81
81
|
const { mutate: setBucketVersioning } = useSetBucketVersioning();
|
|
82
82
|
const { mutate: setObjectLockConfig } = useSetBucketObjectLockConfiguration();
|
|
83
83
|
const handleCancel = ()=>{
|
|
84
84
|
if (onCancelProp) onCancelProp();
|
|
85
|
-
else navigate(
|
|
85
|
+
else navigate('/buckets');
|
|
86
86
|
};
|
|
87
87
|
const handleSuccess = (bucketName)=>{
|
|
88
88
|
showToast({
|
|
89
89
|
open: true,
|
|
90
90
|
message: `Bucket "${bucketName}" created successfully`,
|
|
91
|
-
status:
|
|
91
|
+
status: 'success'
|
|
92
92
|
});
|
|
93
93
|
navigate(`/buckets/${bucketName}`);
|
|
94
94
|
};
|
|
@@ -96,7 +96,7 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
96
96
|
showToast({
|
|
97
97
|
open: true,
|
|
98
98
|
message: error instanceof Error ? error.message : `Failed to ${operation}`,
|
|
99
|
-
status:
|
|
99
|
+
status: 'error'
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
102
|
const onSubmit = (data)=>{
|
|
@@ -112,41 +112,41 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
112
112
|
if (needsExplicitVersioning) setBucketVersioning({
|
|
113
113
|
Bucket: bucketName,
|
|
114
114
|
VersioningConfiguration: {
|
|
115
|
-
Status:
|
|
115
|
+
Status: 'Enabled'
|
|
116
116
|
}
|
|
117
117
|
}, {
|
|
118
118
|
onSuccess: ()=>handleSuccess(bucketName),
|
|
119
|
-
onError: (error)=>handleError(error,
|
|
119
|
+
onError: (error)=>handleError(error, 'enable versioning')
|
|
120
120
|
});
|
|
121
121
|
else if (needsRetentionConfig) {
|
|
122
122
|
const retentionConfig = {
|
|
123
123
|
Bucket: bucketName,
|
|
124
124
|
ObjectLockConfiguration: {
|
|
125
|
-
ObjectLockEnabled:
|
|
125
|
+
ObjectLockEnabled: 'Enabled',
|
|
126
126
|
Rule: {
|
|
127
127
|
DefaultRetention: {
|
|
128
128
|
Mode: data.retentionMode,
|
|
129
|
-
Days:
|
|
130
|
-
Years:
|
|
129
|
+
Days: 'DAYS' === data.retentionPeriodFrequencyChoice ? data.retentionPeriod : void 0,
|
|
130
|
+
Years: 'YEARS' === data.retentionPeriodFrequencyChoice ? data.retentionPeriod : void 0
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
setObjectLockConfig(retentionConfig, {
|
|
136
136
|
onSuccess: ()=>handleSuccess(bucketName),
|
|
137
|
-
onError: (error)=>handleError(error,
|
|
137
|
+
onError: (error)=>handleError(error, 'configure object lock retention')
|
|
138
138
|
});
|
|
139
139
|
} else handleSuccess(bucketName);
|
|
140
140
|
},
|
|
141
|
-
onError: (error)=>handleError(error,
|
|
141
|
+
onError: (error)=>handleError(error, 'create bucket')
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
144
|
return /*#__PURE__*/ jsx(FormProvider, {
|
|
145
145
|
...useFormMethods,
|
|
146
146
|
children: /*#__PURE__*/ jsxs(Form, {
|
|
147
147
|
layout: {
|
|
148
|
-
kind:
|
|
149
|
-
title:
|
|
148
|
+
kind: 'page',
|
|
149
|
+
title: 'Create a New Bucket',
|
|
150
150
|
subTitle
|
|
151
151
|
},
|
|
152
152
|
requireMode: "partial",
|
|
@@ -184,7 +184,7 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
184
184
|
content: /*#__PURE__*/ jsx(Input, {
|
|
185
185
|
id: "name",
|
|
186
186
|
autoFocus: true,
|
|
187
|
-
...register(
|
|
187
|
+
...register('name')
|
|
188
188
|
}),
|
|
189
189
|
labelHelpTooltip: /*#__PURE__*/ jsxs("ul", {
|
|
190
190
|
children: [
|
|
@@ -200,7 +200,7 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
200
200
|
]
|
|
201
201
|
}),
|
|
202
202
|
helpErrorPosition: "bottom",
|
|
203
|
-
error: errors.name ? errors.name?.type ===
|
|
203
|
+
error: errors.name ? errors.name?.type === 'string.pattern.base' ? bucketErrorMessage : errors.name?.message : void 0
|
|
204
204
|
}),
|
|
205
205
|
children,
|
|
206
206
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
@@ -217,12 +217,12 @@ const BucketCreate = ({ subTitle, validationSchema, validationContext, defaultVa
|
|
|
217
217
|
})
|
|
218
218
|
]
|
|
219
219
|
}),
|
|
220
|
-
help: isObjectLockEnabled ?
|
|
220
|
+
help: isObjectLockEnabled ? 'Automatically activated when Object-lock is Enabled' : void 0,
|
|
221
221
|
helpErrorPosition: "bottom",
|
|
222
222
|
content: /*#__PURE__*/ jsx(Checkbox, {
|
|
223
223
|
id: "isVersioning",
|
|
224
224
|
disabled: isObjectLockEnabled,
|
|
225
|
-
...register(
|
|
225
|
+
...register('isVersioning')
|
|
226
226
|
})
|
|
227
227
|
})
|
|
228
228
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useDataBrowserNavigate } from '../../hooks/useDataBrowserNavigate';
|
|
2
2
|
interface BucketDetailsContextValue {
|
|
3
3
|
bucketName: string;
|
|
4
|
-
navigate: ReturnType<typeof
|
|
4
|
+
navigate: ReturnType<typeof useDataBrowserNavigate>;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Context for BucketDetails component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, memo, useCallback, useContext, useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { useParams } from "react-router";
|
|
4
4
|
import { Tabs } from "@scality/core-ui/dist/next";
|
|
5
5
|
import { useDataBrowserUICustomization } from "../../contexts/DataBrowserUICustomizationContext.js";
|
|
6
6
|
import { useGetBucketLifecycle, useGetBucketReplication } from "../../hooks/bucketConfiguration.js";
|
|
@@ -12,20 +12,26 @@ import { BucketReplicationList } from "./BucketReplicationList.js";
|
|
|
12
12
|
import { BucketVersioning } from "./BucketVersioning.js";
|
|
13
13
|
import { DeleteBucketButton } from "./DeleteBucketButton.js";
|
|
14
14
|
import { EmptyBucketButton } from "./EmptyBucketButton.js";
|
|
15
|
+
import { useDataBrowserNavigate } from "../../hooks/useDataBrowserNavigate.js";
|
|
15
16
|
const BucketDetailsContext = /*#__PURE__*/ createContext(null);
|
|
16
17
|
function useBucketDetailsContext() {
|
|
17
18
|
const context = useContext(BucketDetailsContext);
|
|
18
|
-
if (!context) throw new Error(
|
|
19
|
+
if (!context) throw new Error('BucketDetails components must be used within BucketDetails');
|
|
19
20
|
return context;
|
|
20
21
|
}
|
|
21
22
|
const getEffectiveStatus = (status, error)=>{
|
|
22
|
-
if (isNotFoundError(error)) return
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
23
|
+
if (isNotFoundError(error)) return 'success';
|
|
24
|
+
if ('pending' === status) return 'loading';
|
|
25
|
+
if ('error' === status) return 'error';
|
|
26
|
+
return 'success';
|
|
26
27
|
};
|
|
28
|
+
const ExtraSectionContent = /*#__PURE__*/ memo(({ render })=>/*#__PURE__*/ jsx(Fragment, {
|
|
29
|
+
children: render()
|
|
30
|
+
}));
|
|
31
|
+
ExtraSectionContent.displayName = 'BucketDetails.ExtraSectionContent';
|
|
27
32
|
const OverviewTab = /*#__PURE__*/ memo(()=>{
|
|
28
33
|
const { bucketName, navigate } = useBucketDetailsContext();
|
|
34
|
+
const { extraBucketOverviewSections } = useDataBrowserUICustomization();
|
|
29
35
|
const renderDeleteButton = useCallback((name)=>/*#__PURE__*/ jsx(DeleteBucketButton, {
|
|
30
36
|
bucketName: name
|
|
31
37
|
}), []);
|
|
@@ -48,6 +54,12 @@ const OverviewTab = /*#__PURE__*/ memo(()=>{
|
|
|
48
54
|
/*#__PURE__*/ jsx(BucketOverview.GeneralSection, {
|
|
49
55
|
renderVersioning: renderVersioning
|
|
50
56
|
}),
|
|
57
|
+
extraBucketOverviewSections?.map((section)=>/*#__PURE__*/ jsx(BucketOverview.Section, {
|
|
58
|
+
title: section.title,
|
|
59
|
+
children: /*#__PURE__*/ jsx(ExtraSectionContent, {
|
|
60
|
+
render: section.render
|
|
61
|
+
})
|
|
62
|
+
}, section.id)),
|
|
51
63
|
/*#__PURE__*/ jsx(BucketOverview.DataProtectionSection, {}),
|
|
52
64
|
/*#__PURE__*/ jsx(BucketOverview.PermissionsSection, {
|
|
53
65
|
onEditPolicy: handleEditPolicy
|
|
@@ -57,7 +69,7 @@ const OverviewTab = /*#__PURE__*/ memo(()=>{
|
|
|
57
69
|
]
|
|
58
70
|
});
|
|
59
71
|
});
|
|
60
|
-
OverviewTab.displayName =
|
|
72
|
+
OverviewTab.displayName = 'BucketDetails.OverviewTab';
|
|
61
73
|
const LifecycleTab = /*#__PURE__*/ memo(()=>{
|
|
62
74
|
const { bucketName, navigate } = useBucketDetailsContext();
|
|
63
75
|
const { data: lifecycleData, status: lifecycleStatus, error: lifecycleError } = useGetBucketLifecycle({
|
|
@@ -81,14 +93,14 @@ const LifecycleTab = /*#__PURE__*/ memo(()=>{
|
|
|
81
93
|
onEditRule: handleEditRule
|
|
82
94
|
});
|
|
83
95
|
});
|
|
84
|
-
LifecycleTab.displayName =
|
|
96
|
+
LifecycleTab.displayName = 'BucketDetails.LifecycleTab';
|
|
85
97
|
const ReplicationTab = /*#__PURE__*/ memo(()=>{
|
|
86
98
|
const { bucketName, navigate } = useBucketDetailsContext();
|
|
87
99
|
const { data: replicationData, status: replicationStatus, error: replicationError } = useGetBucketReplication({
|
|
88
100
|
Bucket: bucketName
|
|
89
101
|
});
|
|
90
102
|
const replicationRules = replicationData?.ReplicationConfiguration?.Rules || [];
|
|
91
|
-
const replicationRole = replicationData?.ReplicationConfiguration?.Role ||
|
|
103
|
+
const replicationRole = replicationData?.ReplicationConfiguration?.Role || '';
|
|
92
104
|
const effectiveStatus = getEffectiveStatus(replicationStatus, replicationError);
|
|
93
105
|
const handleCreateRule = useCallback(()=>navigate(BUCKET_ROUTES.replicationCreate(bucketName)), [
|
|
94
106
|
navigate,
|
|
@@ -107,64 +119,64 @@ const ReplicationTab = /*#__PURE__*/ memo(()=>{
|
|
|
107
119
|
onEditRule: handleEditRule
|
|
108
120
|
});
|
|
109
121
|
});
|
|
110
|
-
ReplicationTab.displayName =
|
|
122
|
+
ReplicationTab.displayName = 'BucketDetails.ReplicationTab';
|
|
111
123
|
const CustomTab = ({ config })=>/*#__PURE__*/ jsx(Fragment, {
|
|
112
124
|
children: config.render()
|
|
113
125
|
});
|
|
114
|
-
CustomTab.displayName =
|
|
126
|
+
CustomTab.displayName = 'BucketDetails.CustomTab';
|
|
115
127
|
const BucketDetailsRoot = ({ children })=>{
|
|
116
128
|
const { bucketName } = useParams();
|
|
117
|
-
const navigate =
|
|
118
|
-
if (!bucketName) return /*#__PURE__*/ jsx("div", {
|
|
119
|
-
children: "No bucket selected"
|
|
120
|
-
});
|
|
129
|
+
const navigate = useDataBrowserNavigate();
|
|
121
130
|
const contextValue = useMemo(()=>({
|
|
122
|
-
bucketName,
|
|
131
|
+
bucketName: bucketName || '',
|
|
123
132
|
navigate
|
|
124
133
|
}), [
|
|
125
134
|
bucketName,
|
|
126
135
|
navigate
|
|
127
136
|
]);
|
|
137
|
+
if (!bucketName) return /*#__PURE__*/ jsx("div", {
|
|
138
|
+
children: "No bucket selected"
|
|
139
|
+
});
|
|
128
140
|
return /*#__PURE__*/ jsx(BucketDetailsContext.Provider, {
|
|
129
141
|
value: contextValue,
|
|
130
142
|
children: children || /*#__PURE__*/ jsx(DefaultTabs, {})
|
|
131
143
|
});
|
|
132
144
|
};
|
|
133
|
-
BucketDetailsRoot.displayName =
|
|
145
|
+
BucketDetailsRoot.displayName = 'BucketDetails';
|
|
134
146
|
const DefaultTabs = ()=>{
|
|
135
147
|
const { extraBucketTabs } = useDataBrowserUICustomization();
|
|
136
148
|
const defaultTabsMap = useMemo(()=>({
|
|
137
149
|
overview: {
|
|
138
|
-
id:
|
|
139
|
-
label:
|
|
140
|
-
path:
|
|
150
|
+
id: 'overview',
|
|
151
|
+
label: 'Overview',
|
|
152
|
+
path: '',
|
|
141
153
|
withoutPadding: false,
|
|
142
154
|
query: {
|
|
143
|
-
tab:
|
|
155
|
+
tab: ''
|
|
144
156
|
},
|
|
145
|
-
type:
|
|
157
|
+
type: 'default',
|
|
146
158
|
Component: OverviewTab
|
|
147
159
|
},
|
|
148
160
|
lifecycle: {
|
|
149
|
-
id:
|
|
150
|
-
label:
|
|
151
|
-
path:
|
|
161
|
+
id: 'lifecycle',
|
|
162
|
+
label: 'Lifecycle',
|
|
163
|
+
path: '',
|
|
152
164
|
withoutPadding: true,
|
|
153
165
|
query: {
|
|
154
|
-
tab:
|
|
166
|
+
tab: 'lifecycle'
|
|
155
167
|
},
|
|
156
|
-
type:
|
|
168
|
+
type: 'default',
|
|
157
169
|
Component: LifecycleTab
|
|
158
170
|
},
|
|
159
171
|
replication: {
|
|
160
|
-
id:
|
|
161
|
-
label:
|
|
162
|
-
path:
|
|
172
|
+
id: 'replication',
|
|
173
|
+
label: 'Replication',
|
|
174
|
+
path: '',
|
|
163
175
|
withoutPadding: true,
|
|
164
176
|
query: {
|
|
165
|
-
tab:
|
|
177
|
+
tab: 'replication'
|
|
166
178
|
},
|
|
167
|
-
type:
|
|
179
|
+
type: 'default',
|
|
168
180
|
Component: ReplicationTab
|
|
169
181
|
}
|
|
170
182
|
}), []);
|
|
@@ -172,12 +184,12 @@ const DefaultTabs = ()=>{
|
|
|
172
184
|
const customTabConfigs = extraBucketTabs ? extraBucketTabs.map((tabConfig)=>({
|
|
173
185
|
id: tabConfig.id,
|
|
174
186
|
label: tabConfig.title,
|
|
175
|
-
path: tabConfig.path ||
|
|
187
|
+
path: tabConfig.path || '',
|
|
176
188
|
query: {
|
|
177
189
|
tab: tabConfig.id
|
|
178
190
|
},
|
|
179
191
|
withoutPadding: tabConfig.withoutPadding || false,
|
|
180
|
-
type:
|
|
192
|
+
type: 'custom',
|
|
181
193
|
config: tabConfig
|
|
182
194
|
})) : [];
|
|
183
195
|
const overrideIds = new Set(customTabConfigs.filter((t)=>t.id in defaultTabsMap).map((t)=>t.id));
|
|
@@ -196,13 +208,13 @@ const DefaultTabs = ()=>{
|
|
|
196
208
|
path: tab.path,
|
|
197
209
|
query: tab.query,
|
|
198
210
|
withoutPadding: tab.withoutPadding,
|
|
199
|
-
children:
|
|
211
|
+
children: 'default' === tab.type ? /*#__PURE__*/ jsx(tab.Component, {}) : /*#__PURE__*/ jsx(CustomTab, {
|
|
200
212
|
config: tab.config
|
|
201
213
|
})
|
|
202
214
|
}, tab.id))
|
|
203
215
|
});
|
|
204
216
|
};
|
|
205
|
-
DefaultTabs.displayName =
|
|
217
|
+
DefaultTabs.displayName = 'BucketDetails.DefaultTabs';
|
|
206
218
|
function BucketDetails() {
|
|
207
219
|
return /*#__PURE__*/ jsx(BucketDetailsRoot, {});
|
|
208
220
|
}
|