@scality/data-browser-library 1.0.0-preview.9 → 1.0.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.
Files changed (285) hide show
  1. package/dist/components/DataBrowserUI.d.ts +12 -0
  2. package/dist/components/DataBrowserUI.js +99 -0
  3. package/dist/components/Editor.d.ts +1 -1
  4. package/dist/components/Editor.js +3 -3
  5. package/dist/components/__tests__/BucketAccessor.test.js +214 -0
  6. package/dist/components/__tests__/BucketCorsPage.test.d.ts +1 -0
  7. package/dist/components/__tests__/BucketCorsPage.test.js +263 -0
  8. package/dist/components/__tests__/BucketCreate.test.js +271 -105
  9. package/dist/components/__tests__/BucketDetails.test.d.ts +1 -0
  10. package/dist/components/__tests__/BucketDetails.test.js +421 -0
  11. package/dist/components/__tests__/BucketLifecycleFormPage.test.d.ts +13 -0
  12. package/dist/components/__tests__/BucketLifecycleFormPage.test.js +178 -178
  13. package/dist/components/__tests__/BucketLifecycleList.test.js +85 -85
  14. package/dist/components/__tests__/BucketList.test.js +463 -239
  15. package/dist/components/__tests__/BucketNotificationFormPage.test.d.ts +1 -0
  16. package/dist/components/__tests__/BucketNotificationFormPage.test.js +348 -0
  17. package/dist/components/__tests__/BucketNotificationList.test.d.ts +1 -0
  18. package/dist/components/__tests__/BucketNotificationList.test.js +379 -0
  19. package/dist/components/__tests__/BucketOverview.test.js +281 -266
  20. package/dist/components/__tests__/BucketPolicyPage.test.js +151 -99
  21. package/dist/components/__tests__/BucketReplicationFormPage.test.d.ts +15 -0
  22. package/dist/components/__tests__/BucketReplicationFormPage.test.js +544 -544
  23. package/dist/components/__tests__/BucketReplicationList.test.js +106 -106
  24. package/dist/components/__tests__/CreateFolderButton.test.js +56 -56
  25. package/dist/components/__tests__/DeleteBucketButton.test.js +64 -64
  26. package/dist/components/__tests__/DeleteBucketConfigRuleButton.test.js +47 -47
  27. package/dist/components/__tests__/DeleteObjectButton.test.js +64 -64
  28. package/dist/components/__tests__/EmptyBucketButton.test.js +59 -59
  29. package/dist/components/__tests__/MetadataSearch.test.js +65 -65
  30. package/dist/components/__tests__/ObjectList.test.js +741 -240
  31. package/dist/components/__tests__/UploadButton.test.js +45 -45
  32. package/dist/components/breadcrumb/Breadcrumb.d.ts +6 -0
  33. package/dist/components/breadcrumb/Breadcrumb.js +37 -0
  34. package/dist/components/breadcrumb/DataBrowserBreadcrumb.d.ts +1 -0
  35. package/dist/components/breadcrumb/DataBrowserBreadcrumb.js +10 -0
  36. package/dist/components/breadcrumb/__tests__/Breadcrumb.test.d.ts +1 -0
  37. package/dist/components/breadcrumb/__tests__/Breadcrumb.test.js +196 -0
  38. package/dist/components/breadcrumb/__tests__/DataBrowserBreadcrumb.test.d.ts +1 -0
  39. package/dist/components/breadcrumb/__tests__/DataBrowserBreadcrumb.test.js +153 -0
  40. package/dist/components/breadcrumb/__tests__/useBreadcrumbPaths.test.d.ts +1 -0
  41. package/dist/components/breadcrumb/__tests__/useBreadcrumbPaths.test.js +134 -0
  42. package/dist/components/breadcrumb/index.d.ts +8 -0
  43. package/dist/components/breadcrumb/index.js +4 -0
  44. package/dist/components/breadcrumb/useBreadcrumbPaths.d.ts +2 -0
  45. package/dist/components/breadcrumb/useBreadcrumbPaths.js +82 -0
  46. package/dist/components/buckets/BucketAccessor.d.ts +2 -0
  47. package/dist/components/buckets/BucketAccessor.js +125 -0
  48. package/dist/components/buckets/BucketConfigEditButton.d.ts +8 -0
  49. package/dist/components/buckets/{BucketPolicyButton.js → BucketConfigEditButton.js} +9 -5
  50. package/dist/components/buckets/BucketCorsPage.d.ts +1 -0
  51. package/dist/components/buckets/BucketCorsPage.js +234 -0
  52. package/dist/components/buckets/BucketCreate.d.ts +3 -2
  53. package/dist/components/buckets/BucketCreate.js +89 -47
  54. package/dist/components/buckets/BucketDetails.d.ts +42 -0
  55. package/dist/components/buckets/BucketDetails.js +249 -85
  56. package/dist/components/buckets/BucketLifecycleFormPage.js +206 -190
  57. package/dist/components/buckets/BucketLifecycleList.d.ts +2 -2
  58. package/dist/components/buckets/BucketLifecycleList.js +47 -47
  59. package/dist/components/buckets/BucketList.d.ts +7 -8
  60. package/dist/components/buckets/BucketList.js +158 -101
  61. package/dist/components/buckets/BucketLocation.js +4 -4
  62. package/dist/components/buckets/BucketOverview.d.ts +22 -2
  63. package/dist/components/buckets/BucketOverview.js +394 -187
  64. package/dist/components/buckets/BucketPage.js +43 -21
  65. package/dist/components/buckets/BucketPolicyPage.js +155 -127
  66. package/dist/components/buckets/BucketReplicationFormPage.js +134 -133
  67. package/dist/components/buckets/BucketReplicationList.d.ts +2 -2
  68. package/dist/components/buckets/BucketReplicationList.js +42 -42
  69. package/dist/components/buckets/BucketVersioning.d.ts +4 -0
  70. package/dist/components/buckets/BucketVersioning.js +76 -0
  71. package/dist/components/buckets/DeleteBucketButton.js +8 -8
  72. package/dist/components/buckets/DeleteBucketConfigRuleButton.d.ts +2 -2
  73. package/dist/components/buckets/DeleteBucketConfigRuleButton.js +2 -2
  74. package/dist/components/buckets/EmptyBucketButton.js +24 -24
  75. package/dist/components/buckets/EmptyBucketSummary.d.ts +2 -2
  76. package/dist/components/buckets/EmptyBucketSummary.js +1 -1
  77. package/dist/components/buckets/EmptyBucketSummaryList.d.ts +1 -1
  78. package/dist/components/buckets/EmptyBucketSummaryList.js +22 -22
  79. package/dist/components/buckets/__tests__/BucketVersioning.test.d.ts +1 -0
  80. package/dist/components/buckets/__tests__/BucketVersioning.test.js +163 -0
  81. package/dist/components/buckets/notifications/BucketNotificationFormPage.d.ts +1 -0
  82. package/dist/components/buckets/notifications/BucketNotificationFormPage.js +316 -0
  83. package/dist/components/buckets/notifications/BucketNotificationList.d.ts +10 -0
  84. package/dist/components/buckets/notifications/BucketNotificationList.js +267 -0
  85. package/dist/components/buckets/notifications/EventsSection.js +145 -29
  86. package/dist/components/buckets/notifications/__tests__/events.test.d.ts +1 -0
  87. package/dist/components/buckets/notifications/__tests__/events.test.js +56 -0
  88. package/dist/components/buckets/notifications/events.d.ts +71 -7
  89. package/dist/components/buckets/notifications/events.js +98 -16
  90. package/dist/components/index.d.ts +27 -20
  91. package/dist/components/index.js +17 -10
  92. package/dist/components/layouts/ArrowNavigation.d.ts +3 -0
  93. package/dist/components/layouts/ArrowNavigation.js +28 -0
  94. package/dist/components/layouts/BrowserPageLayout.d.ts +5 -1
  95. package/dist/components/layouts/BrowserPageLayout.js +10 -5
  96. package/dist/components/objects/CreateFolderButton.d.ts +2 -2
  97. package/dist/components/objects/CreateFolderButton.js +12 -12
  98. package/dist/components/objects/DeleteObjectButton.d.ts +1 -1
  99. package/dist/components/objects/DeleteObjectButton.js +19 -21
  100. package/dist/components/objects/GetPresignedUrlButton.d.ts +7 -0
  101. package/dist/components/objects/GetPresignedUrlButton.js +255 -0
  102. package/dist/components/objects/ObjectDetails/ObjectMetadata.d.ts +2 -2
  103. package/dist/components/objects/ObjectDetails/ObjectMetadata.js +263 -230
  104. package/dist/components/objects/ObjectDetails/ObjectSummary.d.ts +2 -2
  105. package/dist/components/objects/ObjectDetails/ObjectSummary.js +540 -138
  106. package/dist/components/objects/ObjectDetails/ObjectTags.d.ts +2 -2
  107. package/dist/components/objects/ObjectDetails/ObjectTags.js +95 -123
  108. package/dist/components/objects/ObjectDetails/__tests__/ObjectDetails.test.d.ts +1 -0
  109. package/dist/components/objects/ObjectDetails/__tests__/ObjectDetails.test.js +516 -0
  110. package/dist/components/objects/ObjectDetails/__tests__/ObjectSummary.test.d.ts +1 -0
  111. package/dist/components/objects/ObjectDetails/__tests__/ObjectSummary.test.js +1064 -0
  112. package/dist/components/objects/ObjectDetails/index.d.ts +18 -2
  113. package/dist/components/objects/ObjectDetails/index.js +152 -40
  114. package/dist/components/objects/ObjectList.d.ts +12 -10
  115. package/dist/components/objects/ObjectList.js +590 -263
  116. package/dist/components/objects/ObjectLock/EditRetentionButton.js +4 -4
  117. package/dist/components/objects/ObjectLock/ObjectLockRetentionSettings.js +15 -15
  118. package/dist/components/objects/ObjectLock/ObjectLockSettings.d.ts +1 -1
  119. package/dist/components/objects/ObjectLock/ObjectLockSettings.js +32 -31
  120. package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.d.ts +1 -1
  121. package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.js +6 -6
  122. package/dist/components/objects/ObjectLock/__tests__/EditRetentionButton.test.js +51 -51
  123. package/dist/components/objects/ObjectLock/__tests__/ObjectLockSettings.test.js +78 -78
  124. package/dist/components/objects/ObjectPage.js +12 -8
  125. package/dist/components/objects/UploadButton.d.ts +3 -3
  126. package/dist/components/objects/UploadButton.js +10 -10
  127. package/dist/components/objects/__tests__/GetPresignedUrlButton.test.d.ts +1 -0
  128. package/dist/components/objects/__tests__/GetPresignedUrlButton.test.js +531 -0
  129. package/dist/components/providers/DataBrowserProvider.d.ts +23 -12
  130. package/dist/components/providers/DataBrowserProvider.js +60 -38
  131. package/dist/components/providers/QueryProvider.d.ts +9 -0
  132. package/dist/components/providers/QueryProvider.js +21 -0
  133. package/dist/components/search/MetadataSearch.js +29 -28
  134. package/dist/components/search/SearchHints.js +1 -1
  135. package/dist/components/ui/ArrayFieldActions.js +12 -7
  136. package/dist/components/ui/ConfirmDeleteRuleModal.d.ts +2 -2
  137. package/dist/components/ui/ConfirmDeleteRuleModal.js +6 -1
  138. package/dist/components/ui/DeleteObjectModalContent.d.ts +1 -1
  139. package/dist/components/ui/DeleteObjectModalContent.js +12 -12
  140. package/dist/components/ui/FilterFormSection.d.ts +2 -2
  141. package/dist/components/ui/FilterFormSection.js +29 -29
  142. package/dist/components/ui/Search.elements.d.ts +2 -2
  143. package/dist/components/ui/Search.elements.js +7 -7
  144. package/dist/components/ui/Table.elements.d.ts +2 -1
  145. package/dist/components/ui/Table.elements.js +18 -12
  146. package/dist/config/__tests__/factory.test.d.ts +1 -0
  147. package/dist/config/__tests__/factory.test.js +311 -0
  148. package/dist/config/factory.d.ts +10 -56
  149. package/dist/config/factory.js +23 -71
  150. package/dist/config/types.d.ts +212 -34
  151. package/dist/contexts/DataBrowserUICustomizationContext.d.ts +27 -0
  152. package/dist/contexts/DataBrowserUICustomizationContext.js +13 -0
  153. package/dist/hooks/__tests__/useAccessibleBuckets.test.d.ts +1 -0
  154. package/dist/hooks/__tests__/useAccessibleBuckets.test.js +145 -0
  155. package/dist/hooks/__tests__/useISVBucketDetection.test.js +45 -45
  156. package/dist/hooks/__tests__/useIsBucketEmpty.test.js +27 -27
  157. package/dist/hooks/__tests__/useLoginMutation.test.d.ts +1 -0
  158. package/dist/hooks/__tests__/useLoginMutation.test.js +194 -0
  159. package/dist/hooks/bucketConfiguration.d.ts +8 -1
  160. package/dist/hooks/bucketConfiguration.js +52 -51
  161. package/dist/hooks/bucketOperations.d.ts +10 -1
  162. package/dist/hooks/bucketOperations.js +10 -9
  163. package/dist/hooks/factories/__tests__/useCreateS3FunctionMutationHook.test.js +80 -80
  164. package/dist/hooks/factories/__tests__/useCreateS3InfiniteQueryHook.test.js +80 -80
  165. package/dist/hooks/factories/__tests__/useCreateS3LoginHook.test.js +44 -44
  166. package/dist/hooks/factories/__tests__/useCreateS3MutationHook.test.js +63 -63
  167. package/dist/hooks/factories/__tests__/useCreateS3QueryHook.test.js +65 -65
  168. package/dist/hooks/factories/index.d.ts +4 -4
  169. package/dist/hooks/factories/index.js +2 -2
  170. package/dist/hooks/factories/useCreateS3InfiniteQueryHook.d.ts +2 -2
  171. package/dist/hooks/factories/useCreateS3InfiniteQueryHook.js +16 -13
  172. package/dist/hooks/factories/useCreateS3LoginHook.d.ts +2 -2
  173. package/dist/hooks/factories/useCreateS3LoginHook.js +1 -1
  174. package/dist/hooks/factories/useCreateS3MutationHook.d.ts +3 -3
  175. package/dist/hooks/factories/useCreateS3MutationHook.js +7 -2
  176. package/dist/hooks/factories/useCreateS3QueryHook.d.ts +2 -2
  177. package/dist/hooks/factories/useCreateS3QueryHook.js +11 -6
  178. package/dist/hooks/index.d.ts +19 -12
  179. package/dist/hooks/index.js +16 -9
  180. package/dist/hooks/loginOperations.d.ts +1 -1
  181. package/dist/hooks/loginOperations.js +1 -1
  182. package/dist/hooks/objectOperations.d.ts +2 -2
  183. package/dist/hooks/objectOperations.js +50 -49
  184. package/dist/hooks/presignedOperations.d.ts +4 -4
  185. package/dist/hooks/presignedOperations.js +5 -5
  186. package/dist/hooks/useAccessibleBuckets.d.ts +11 -0
  187. package/dist/hooks/useAccessibleBuckets.js +115 -0
  188. package/dist/hooks/useBatchObjectLegalHold.d.ts +11 -0
  189. package/dist/hooks/useBatchObjectLegalHold.js +48 -0
  190. package/dist/hooks/useBucketConfigEditor.d.ts +31 -0
  191. package/dist/hooks/useBucketConfigEditor.js +82 -0
  192. package/dist/hooks/useDataBrowserNavigate.d.ts +28 -0
  193. package/dist/hooks/useDataBrowserNavigate.js +24 -0
  194. package/dist/hooks/useDeleteBucketConfigRule.d.ts +2 -2
  195. package/dist/hooks/useDeleteBucketConfigRule.js +4 -4
  196. package/dist/hooks/useEmptyBucket.js +11 -11
  197. package/dist/hooks/useFeatures.d.ts +7 -0
  198. package/dist/hooks/useFeatures.js +8 -0
  199. package/dist/hooks/useISVBucketDetection.js +6 -6
  200. package/dist/hooks/useIsBucketEmpty.js +4 -4
  201. package/dist/hooks/useLimitedAccessFlow.d.ts +48 -0
  202. package/dist/hooks/useLimitedAccessFlow.js +23 -0
  203. package/dist/hooks/useS3Client.d.ts +6 -0
  204. package/dist/hooks/useS3Client.js +3 -2
  205. package/dist/hooks/useS3ConfigSwitch.d.ts +11 -0
  206. package/dist/hooks/useS3ConfigSwitch.js +37 -0
  207. package/dist/hooks/useSupportedNotificationEvents.d.ts +6 -0
  208. package/dist/hooks/useSupportedNotificationEvents.js +8 -0
  209. package/dist/index.d.ts +6 -6
  210. package/dist/index.js +2 -2
  211. package/dist/schemas/bucketPolicySchema.json +3 -13
  212. package/dist/test/msw/handlers/deleteBucket.d.ts +1 -1
  213. package/dist/test/msw/handlers/deleteBucket.js +20 -10
  214. package/dist/test/msw/handlers/getBucketAcl.d.ts +1 -1
  215. package/dist/test/msw/handlers/getBucketAcl.js +29 -17
  216. package/dist/test/msw/handlers/getBucketLocation.d.ts +1 -1
  217. package/dist/test/msw/handlers/getBucketLocation.js +29 -15
  218. package/dist/test/msw/handlers/getBucketPolicy.d.ts +1 -1
  219. package/dist/test/msw/handlers/getBucketPolicy.js +52 -32
  220. package/dist/test/msw/handlers/headObject.d.ts +1 -1
  221. package/dist/test/msw/handlers/headObject.js +31 -13
  222. package/dist/test/msw/handlers/listBuckets.d.ts +1 -1
  223. package/dist/test/msw/handlers/listBuckets.js +5 -3
  224. package/dist/test/msw/handlers/listObjectVersions.d.ts +1 -1
  225. package/dist/test/msw/handlers/listObjectVersions.js +38 -26
  226. package/dist/test/msw/handlers/listObjects.d.ts +1 -1
  227. package/dist/test/msw/handlers/listObjects.js +35 -23
  228. package/dist/test/msw/handlers/objectLegalHold.d.ts +1 -1
  229. package/dist/test/msw/handlers/objectLegalHold.js +32 -17
  230. package/dist/test/msw/handlers/objectRetention.d.ts +1 -1
  231. package/dist/test/msw/handlers/objectRetention.js +31 -17
  232. package/dist/test/msw/handlers/putBucketAcl.d.ts +1 -1
  233. package/dist/test/msw/handlers/putBucketAcl.js +29 -14
  234. package/dist/test/msw/handlers/putObject.d.ts +1 -1
  235. package/dist/test/msw/handlers/putObject.js +27 -12
  236. package/dist/test/msw/handlers.d.ts +3 -3
  237. package/dist/test/msw/handlers.js +77 -54
  238. package/dist/test/msw/index.d.ts +2 -2
  239. package/dist/test/msw/index.js +1 -1
  240. package/dist/test/msw/server.d.ts +1 -1
  241. package/dist/test/msw/server.js +1 -1
  242. package/dist/test/msw/utils.js +2 -2
  243. package/dist/test/setup.d.ts +1 -1
  244. package/dist/test/setup.js +13 -30
  245. package/dist/test/testUtils.d.ts +85 -33
  246. package/dist/test/testUtils.js +176 -111
  247. package/dist/test/utils/errorHandling.test.js +119 -119
  248. package/dist/types/index.d.ts +49 -36
  249. package/dist/types/monaco.d.ts +13 -0
  250. package/dist/types/monaco.js +0 -0
  251. package/dist/utils/__tests__/proxyMiddleware.test.d.ts +1 -0
  252. package/dist/utils/__tests__/proxyMiddleware.test.js +579 -0
  253. package/dist/utils/__tests__/s3Client.test.d.ts +1 -0
  254. package/dist/utils/__tests__/s3Client.test.js +340 -0
  255. package/dist/utils/__tests__/s3ConfigIdentifier.test.d.ts +1 -0
  256. package/dist/utils/__tests__/s3ConfigIdentifier.test.js +437 -0
  257. package/dist/utils/constants.d.ts +10 -0
  258. package/dist/utils/constants.js +19 -9
  259. package/dist/utils/deletion/index.d.ts +2 -2
  260. package/dist/utils/deletion/index.js +1 -1
  261. package/dist/utils/deletion/messages.d.ts +1 -1
  262. package/dist/utils/deletion/messages.js +4 -4
  263. package/dist/utils/errorHandling.d.ts +3 -3
  264. package/dist/utils/errorHandling.js +6 -6
  265. package/dist/utils/hooks.js +8 -8
  266. package/dist/utils/index.d.ts +5 -4
  267. package/dist/utils/index.js +4 -2
  268. package/dist/utils/proxyMiddleware.d.ts +32 -13
  269. package/dist/utils/proxyMiddleware.js +90 -36
  270. package/dist/utils/s3Client.d.ts +14 -4
  271. package/dist/utils/s3Client.js +5 -26
  272. package/dist/utils/s3ConfigIdentifier.d.ts +79 -0
  273. package/dist/utils/s3ConfigIdentifier.js +57 -0
  274. package/dist/utils/s3RuleUtils.d.ts +5 -5
  275. package/dist/utils/s3RuleUtils.js +17 -17
  276. package/package.json +10 -8
  277. package/dist/components/__tests__/BucketNotificationCreatePage.test.js +0 -316
  278. package/dist/components/buckets/BucketPolicyButton.d.ts +0 -7
  279. package/dist/components/buckets/notifications/BucketNotificationCreatePage.d.ts +0 -1
  280. package/dist/components/buckets/notifications/BucketNotificationCreatePage.js +0 -234
  281. package/dist/hooks/useLoginMutation.d.ts +0 -21
  282. package/dist/hooks/useLoginMutation.js +0 -9
  283. package/dist/utils/useFeatures.d.ts +0 -1
  284. package/dist/utils/useFeatures.js +0 -7
  285. /package/dist/components/__tests__/{BucketNotificationCreatePage.test.d.ts → BucketAccessor.test.d.ts} +0 -0
@@ -6,88 +6,89 @@ import { Box, Button, Input, Select } from "@scality/core-ui/dist/next";
6
6
  import joi from "joi";
7
7
  import { useCallback, useEffect, useMemo, useRef } from "react";
8
8
  import { Controller, FormProvider, useFieldArray, useForm } from "react-hook-form";
9
- import { useNavigate, useParams } from "react-router-dom";
9
+ import { useParams } from "react-router";
10
10
  import { useGetBucketReplication, useSetBucketReplication } from "../../hooks/bucketConfiguration.js";
11
11
  import { useBuckets } from "../../hooks/bucketOperations.js";
12
- import { FilterFormSection, createFilterValidationSchema } from "../ui/FilterFormSection.js";
12
+ import { useDataBrowserNavigate } from "../../hooks/useDataBrowserNavigate.js";
13
13
  import { AWS_RULE_LIMITS, STATUS_OPTIONS, buildS3Filter } from "../../utils/s3RuleUtils.js";
14
+ import { FilterFormSection, createFilterValidationSchema } from "../ui/FilterFormSection.js";
14
15
  const storageClassOptions = [
15
16
  {
16
- value: "",
17
- label: "Same as source"
17
+ value: '',
18
+ label: 'Same as source'
18
19
  },
19
20
  {
20
- value: "GLACIER",
21
- label: "Glacier"
21
+ value: 'GLACIER',
22
+ label: 'Glacier'
22
23
  },
23
24
  {
24
- value: "DEEP_ARCHIVE",
25
- label: "Glacier Deep Archive"
25
+ value: 'DEEP_ARCHIVE',
26
+ label: 'Glacier Deep Archive'
26
27
  },
27
28
  {
28
- value: "STANDARD_IA",
29
- label: "Standard-IA"
29
+ value: 'STANDARD_IA',
30
+ label: 'Standard-IA'
30
31
  },
31
32
  {
32
- value: "ONEZONE_IA",
33
- label: "One Zone-IA"
33
+ value: 'ONEZONE_IA',
34
+ label: 'One Zone-IA'
34
35
  },
35
36
  {
36
- value: "INTELLIGENT_TIERING",
37
- label: "Intelligent-Tiering"
37
+ value: 'INTELLIGENT_TIERING',
38
+ label: 'Intelligent-Tiering'
38
39
  },
39
40
  {
40
- value: "GLACIER_IR",
41
- label: "Glacier Instant Retrieval"
41
+ value: 'GLACIER_IR',
42
+ label: 'Glacier Instant Retrieval'
42
43
  }
43
44
  ];
44
45
  const createSchema = (hasExistingRules)=>joi.object({
45
46
  role: hasExistingRules ? joi.string().optional() : joi.string().required().messages({
46
- "string.empty": "Role ARN is required for first replication rule"
47
+ 'string.empty': 'Role ARN is required for first replication rule'
47
48
  }),
48
49
  ruleId: joi.string().required().max(AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH).messages({
49
- "string.empty": "Rule ID is required",
50
- "string.max": `Rule ID must not exceed ${AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH} characters`
50
+ 'string.empty': 'Rule ID is required',
51
+ 'string.max': `Rule ID must not exceed ${AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH} characters`
51
52
  }),
52
53
  status: joi.string().valid(...STATUS_OPTIONS.map((o)=>o.value)).required(),
53
54
  priority: joi.number().integer().min(0).allow(null).optional().messages({
54
- "number.base": "Priority must be a number",
55
- "number.min": "Priority must be at least 0"
55
+ 'number.base': 'Priority must be a number',
56
+ 'number.min': 'Priority must be at least 0'
56
57
  }),
57
58
  ...createFilterValidationSchema(joi),
58
59
  includeEncryptedObjects: joi.boolean(),
59
60
  replicaModifications: joi.boolean(),
60
61
  sameAccount: joi.boolean(),
61
62
  targetBucket: joi.string().required().messages({
62
- "string.empty": "Target bucket is required"
63
+ 'string.empty': 'Target bucket is required'
63
64
  }),
64
- targetAccountId: joi.when("sameAccount", {
65
+ targetAccountId: joi.when('sameAccount', {
65
66
  is: false,
66
67
  then: joi.string().required().messages({
67
- "string.empty": "Target account ID is required for cross-account replication"
68
+ 'string.empty': 'Target account ID is required for cross-account replication'
68
69
  }),
69
- otherwise: joi.string().allow("").optional()
70
+ otherwise: joi.string().allow('').optional()
70
71
  }),
71
- storageClass: joi.string().allow("").optional(),
72
+ storageClass: joi.string().allow('').optional(),
72
73
  encryptReplicatedObjects: joi.boolean().custom((value, helpers)=>{
73
74
  const { includeEncryptedObjects } = helpers.state.ancestors[0];
74
- if (includeEncryptedObjects && !value) return helpers.error("any.invalid", {
75
- message: "Encryption must be enabled when replicating encrypted objects"
75
+ if (includeEncryptedObjects && !value) return helpers.error('any.invalid', {
76
+ message: 'Encryption must be enabled when replicating encrypted objects'
76
77
  });
77
78
  return value;
78
79
  }),
79
- replicaKmsKeyId: joi.when("encryptReplicatedObjects", {
80
+ replicaKmsKeyId: joi.when('encryptReplicatedObjects', {
80
81
  is: true,
81
82
  then: joi.string().required().messages({
82
- "string.empty": "Replica KMS Key ID is required when encrypting replicated objects"
83
+ 'string.empty': 'Replica KMS Key ID is required when encrypting replicated objects'
83
84
  }),
84
- otherwise: joi.string().allow("").optional()
85
+ otherwise: joi.string().allow('').optional()
85
86
  }),
86
87
  enforceRTC: joi.boolean(),
87
- enableRTCNotification: joi.when("enforceRTC", {
88
+ enableRTCNotification: joi.when('enforceRTC', {
88
89
  is: true,
89
90
  then: joi.boolean().valid(true).messages({
90
- "any.only": "Metrics must be enabled when RTC is enabled"
91
+ 'any.only': 'Metrics must be enabled when RTC is enabled'
91
92
  }),
92
93
  otherwise: joi.boolean()
93
94
  }),
@@ -97,71 +98,71 @@ const createSchema = (hasExistingRules)=>joi.object({
97
98
  const ruleToFormValues = (rule, role)=>{
98
99
  const formValues = {
99
100
  role,
100
- ruleId: rule.ID || "",
101
- status: rule.Status || "Enabled",
101
+ ruleId: rule.ID || '',
102
+ status: rule.Status || 'Enabled',
102
103
  priority: rule.Priority ?? null,
103
- filterType: "none",
104
- prefix: "",
104
+ filterType: 'none',
105
+ prefix: '',
105
106
  tags: [],
106
107
  includeEncryptedObjects: false,
107
108
  replicaModifications: false,
108
109
  sameAccount: true,
109
- targetBucket: "",
110
- targetAccountId: "",
111
- storageClass: "",
110
+ targetBucket: '',
111
+ targetAccountId: '',
112
+ storageClass: '',
112
113
  encryptReplicatedObjects: false,
113
- replicaKmsKeyId: "",
114
+ replicaKmsKeyId: '',
114
115
  enforceRTC: false,
115
116
  enableRTCNotification: false,
116
117
  deleteMarkerReplication: false,
117
118
  switchObjectOwnership: false
118
119
  };
119
- if (void 0 !== rule.Prefix && "" !== rule.Prefix) {
120
- formValues.filterType = "prefix";
120
+ if (void 0 !== rule.Prefix && '' !== rule.Prefix) {
121
+ formValues.filterType = 'prefix';
121
122
  formValues.prefix = rule.Prefix;
122
123
  } else if (rule.Filter) {
123
124
  if (rule.Filter.And) {
124
- formValues.filterType = "and";
125
- formValues.prefix = rule.Filter.And.Prefix || "";
125
+ formValues.filterType = 'and';
126
+ formValues.prefix = rule.Filter.And.Prefix || '';
126
127
  formValues.tags = rule.Filter.And.Tags?.map((tag)=>({
127
- key: tag.Key || "",
128
- value: tag.Value || ""
128
+ key: tag.Key || '',
129
+ value: tag.Value || ''
129
130
  })) || [];
130
131
  } else if (void 0 !== rule.Filter.Prefix) {
131
- formValues.filterType = "prefix";
132
+ formValues.filterType = 'prefix';
132
133
  formValues.prefix = rule.Filter.Prefix;
133
134
  } else if (rule.Filter.Tag) {
134
- formValues.filterType = "tags";
135
+ formValues.filterType = 'tags';
135
136
  formValues.tags = [
136
137
  {
137
- key: rule.Filter.Tag.Key || "",
138
- value: rule.Filter.Tag.Value || ""
138
+ key: rule.Filter.Tag.Key || '',
139
+ value: rule.Filter.Tag.Value || ''
139
140
  }
140
141
  ];
141
142
  }
142
143
  }
143
144
  if (rule.SourceSelectionCriteria) {
144
- formValues.includeEncryptedObjects = rule.SourceSelectionCriteria.SseKmsEncryptedObjects?.Status === "Enabled";
145
- formValues.replicaModifications = rule.SourceSelectionCriteria.ReplicaModifications?.Status === "Enabled";
145
+ formValues.includeEncryptedObjects = rule.SourceSelectionCriteria.SseKmsEncryptedObjects?.Status === 'Enabled';
146
+ formValues.replicaModifications = rule.SourceSelectionCriteria.ReplicaModifications?.Status === 'Enabled';
146
147
  }
147
148
  if (rule.Destination) {
148
- const bucketArn = rule.Destination.Bucket || "";
149
- const parts = bucketArn.split(":::");
149
+ const bucketArn = rule.Destination.Bucket || '';
150
+ const parts = bucketArn.split(':::');
150
151
  formValues.targetBucket = parts[parts.length - 1] || bucketArn;
151
152
  if (rule.Destination.Account) {
152
153
  formValues.sameAccount = false;
153
154
  formValues.targetAccountId = rule.Destination.Account;
154
155
  } else formValues.sameAccount = true;
155
- formValues.storageClass = rule.Destination.StorageClass || "";
156
- formValues.switchObjectOwnership = rule.Destination.AccessControlTranslation?.Owner === "Destination";
157
- if (rule.Destination.ReplicationTime) formValues.enforceRTC = "Enabled" === rule.Destination.ReplicationTime.Status;
158
- if (rule.Destination.Metrics) formValues.enableRTCNotification = "Enabled" === rule.Destination.Metrics.Status;
156
+ formValues.storageClass = rule.Destination.StorageClass || '';
157
+ formValues.switchObjectOwnership = rule.Destination.AccessControlTranslation?.Owner === 'Destination';
158
+ if (rule.Destination.ReplicationTime) formValues.enforceRTC = 'Enabled' === rule.Destination.ReplicationTime.Status;
159
+ if (rule.Destination.Metrics) formValues.enableRTCNotification = 'Enabled' === rule.Destination.Metrics.Status;
159
160
  if (rule.Destination.EncryptionConfiguration) {
160
161
  formValues.encryptReplicatedObjects = true;
161
- formValues.replicaKmsKeyId = rule.Destination.EncryptionConfiguration.ReplicaKmsKeyID || "";
162
+ formValues.replicaKmsKeyId = rule.Destination.EncryptionConfiguration.ReplicaKmsKeyID || '';
162
163
  }
163
164
  }
164
- if (rule.DeleteMarkerReplication) formValues.deleteMarkerReplication = "Enabled" === rule.DeleteMarkerReplication.Status;
165
+ if (rule.DeleteMarkerReplication) formValues.deleteMarkerReplication = 'Enabled' === rule.DeleteMarkerReplication.Status;
165
166
  return formValues;
166
167
  };
167
168
  const ToggleFormField = ({ name, label, id, control, labelHelpTooltip })=>/*#__PURE__*/ jsx(FormGroup, {
@@ -175,27 +176,27 @@ const ToggleFormField = ({ name, label, id, control, labelHelpTooltip })=>/*#__P
175
176
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
176
177
  toggle: field.value,
177
178
  onChange: field.onChange,
178
- label: field.value ? "Enabled" : "Disabled"
179
+ label: field.value ? 'Enabled' : 'Disabled'
179
180
  })
180
181
  })
181
182
  });
182
183
  const buildDestination = (data)=>({
183
184
  Bucket: `arn:aws:s3:::${data.targetBucket}`,
184
- ...!data.sameAccount && data.targetAccountId && "" !== data.targetAccountId.trim() && {
185
+ ...!data.sameAccount && data.targetAccountId && '' !== data.targetAccountId.trim() && {
185
186
  Account: data.targetAccountId
186
187
  },
187
- ...data.storageClass && "" !== data.storageClass.trim() && {
188
+ ...data.storageClass && '' !== data.storageClass.trim() && {
188
189
  StorageClass: data.storageClass
189
190
  },
190
191
  ...(data.enforceRTC || data.enableRTCNotification) && {
191
192
  ReplicationTime: {
192
- Status: data.enforceRTC ? "Enabled" : "Disabled",
193
+ Status: data.enforceRTC ? 'Enabled' : 'Disabled',
193
194
  Time: {
194
195
  Minutes: 15
195
196
  }
196
197
  },
197
198
  Metrics: {
198
- Status: "Enabled",
199
+ Status: 'Enabled',
199
200
  ...data.enforceRTC && {
200
201
  EventThreshold: {
201
202
  Minutes: 15
@@ -203,14 +204,14 @@ const buildDestination = (data)=>({
203
204
  }
204
205
  }
205
206
  },
206
- ...data.encryptReplicatedObjects && data.replicaKmsKeyId && "" !== data.replicaKmsKeyId.trim() && {
207
+ ...data.encryptReplicatedObjects && data.replicaKmsKeyId && '' !== data.replicaKmsKeyId.trim() && {
207
208
  EncryptionConfiguration: {
208
209
  ReplicaKmsKeyID: data.replicaKmsKeyId
209
210
  }
210
211
  },
211
- ...!data.sameAccount && data.switchObjectOwnership && data.targetAccountId && "" !== data.targetAccountId.trim() && {
212
+ ...!data.sameAccount && data.switchObjectOwnership && data.targetAccountId && '' !== data.targetAccountId.trim() && {
212
213
  AccessControlTranslation: {
213
- Owner: "Destination"
214
+ Owner: 'Destination'
214
215
  }
215
216
  }
216
217
  });
@@ -218,12 +219,12 @@ const buildSourceSelectionCriteria = (data)=>{
218
219
  if (data.includeEncryptedObjects || data.replicaModifications) return {
219
220
  ...data.includeEncryptedObjects && {
220
221
  SseKmsEncryptedObjects: {
221
- Status: "Enabled"
222
+ Status: 'Enabled'
222
223
  }
223
224
  },
224
225
  ...data.replicaModifications && {
225
226
  ReplicaModifications: {
226
- Status: "Enabled"
227
+ Status: 'Enabled'
227
228
  }
228
229
  }
229
230
  };
@@ -240,13 +241,13 @@ const buildReplicationRule = (data)=>{
240
241
  const sourceSelectionCriteria = buildSourceSelectionCriteria(data);
241
242
  if (sourceSelectionCriteria) rule.SourceSelectionCriteria = sourceSelectionCriteria;
242
243
  rule.DeleteMarkerReplication = {
243
- Status: data.deleteMarkerReplication ? "Enabled" : "Disabled"
244
+ Status: data.deleteMarkerReplication ? 'Enabled' : 'Disabled'
244
245
  };
245
246
  return rule;
246
247
  };
247
248
  function BucketReplicationFormPage() {
248
249
  const { bucketName, ruleId } = useParams();
249
- const navigate = useNavigate();
250
+ const navigate = useDataBrowserNavigate();
250
251
  const { showToast } = useToast();
251
252
  const isEditMode = !!ruleId;
252
253
  const { data: replicationData, status: replicationStatus } = useGetBucketReplication({
@@ -254,7 +255,7 @@ function BucketReplicationFormPage() {
254
255
  });
255
256
  const { data: bucketsData } = useBuckets();
256
257
  const availableBuckets = bucketsData?.Buckets || [];
257
- const existingRole = replicationData?.ReplicationConfiguration?.Role || "";
258
+ const existingRole = replicationData?.ReplicationConfiguration?.Role || '';
258
259
  const hasExistingRules = (replicationData?.ReplicationConfiguration?.Rules || []).length > 0;
259
260
  const existingRule = useMemo(()=>{
260
261
  if (!isEditMode || !replicationData?.ReplicationConfiguration?.Rules || !ruleId) return null;
@@ -280,8 +281,8 @@ function BucketReplicationFormPage() {
280
281
  ]);
281
282
  const dynamicSchema = useMemo(()=>createSchema(hasExistingRules).keys({
282
283
  ruleId: joi.string().required().invalid(...existingRuleIds).messages({
283
- "string.empty": "Rule ID is required",
284
- "any.invalid": "A rule with this ID already exists"
284
+ 'string.empty': 'Rule ID is required',
285
+ 'any.invalid': 'A rule with this ID already exists'
285
286
  })
286
287
  }), [
287
288
  existingRuleIds,
@@ -289,23 +290,23 @@ function BucketReplicationFormPage() {
289
290
  ]);
290
291
  const methods = useForm({
291
292
  resolver: joiResolver(dynamicSchema),
292
- mode: "onChange",
293
+ mode: 'onChange',
293
294
  defaultValues: {
294
- role: "",
295
- ruleId: "",
296
- status: "Enabled",
295
+ role: '',
296
+ ruleId: '',
297
+ status: 'Enabled',
297
298
  priority: null,
298
- filterType: "none",
299
- prefix: "",
299
+ filterType: 'none',
300
+ prefix: '',
300
301
  tags: [],
301
302
  includeEncryptedObjects: false,
302
303
  replicaModifications: false,
303
304
  sameAccount: true,
304
- targetBucket: "",
305
- targetAccountId: "",
306
- storageClass: "",
305
+ targetBucket: '',
306
+ targetAccountId: '',
307
+ storageClass: '',
307
308
  encryptReplicatedObjects: false,
308
- replicaKmsKeyId: "",
309
+ replicaKmsKeyId: '',
309
310
  enforceRTC: false,
310
311
  enableRTCNotification: false,
311
312
  deleteMarkerReplication: false,
@@ -315,14 +316,14 @@ function BucketReplicationFormPage() {
315
316
  const { handleSubmit, register, control, watch, reset, formState: { isValid, isDirty, errors } } = methods;
316
317
  const { fields: tagFields, append: appendTag, remove: removeTag } = useFieldArray({
317
318
  control,
318
- name: "tags"
319
+ name: 'tags'
319
320
  });
320
- const filterType = watch("filterType");
321
- const sameAccount = watch("sameAccount");
322
- const encryptReplicatedObjects = watch("encryptReplicatedObjects");
323
- const includeEncryptedObjects = watch("includeEncryptedObjects");
324
- const deleteMarkerReplication = watch("deleteMarkerReplication");
325
- const enforceRTC = watch("enforceRTC");
321
+ const filterType = watch('filterType');
322
+ const sameAccount = watch('sameAccount');
323
+ const encryptReplicatedObjects = watch('encryptReplicatedObjects');
324
+ const includeEncryptedObjects = watch('includeEncryptedObjects');
325
+ const deleteMarkerReplication = watch('deleteMarkerReplication');
326
+ const enforceRTC = watch('enforceRTC');
326
327
  const { mutate: setReplication, isPending: isSaving } = useSetBucketReplication();
327
328
  const loadedRuleIdRef = useRef(null);
328
329
  useEffect(()=>{
@@ -352,17 +353,17 @@ function BucketReplicationFormPage() {
352
353
  useEffect(()=>{
353
354
  const prevFilterType = prevFilterTypeRef.current;
354
355
  prevFilterTypeRef.current = filterType;
355
- if (("tags" === filterType || "and" === filterType) && 0 === tagFields.length) {
356
+ if (('tags' === filterType || 'and' === filterType) && 0 === tagFields.length) {
356
357
  if (!isEditMode || void 0 !== prevFilterType && prevFilterType !== filterType) appendTag({
357
- key: "",
358
- value: ""
358
+ key: '',
359
+ value: ''
359
360
  });
360
361
  }
361
362
  if (void 0 !== prevFilterType && prevFilterType !== filterType) {
362
- if (("none" === filterType || "prefix" === filterType) && tagFields.length > 0) tagFields.forEach((_, index)=>{
363
+ if (('none' === filterType || 'prefix' === filterType) && tagFields.length > 0) tagFields.forEach((_, index)=>{
363
364
  removeTag(tagFields.length - 1 - index);
364
365
  });
365
- if ("none" === filterType) methods.setValue("prefix", "", {
366
+ if ('none' === filterType) methods.setValue('prefix', '', {
366
367
  shouldDirty: true
367
368
  });
368
369
  }
@@ -375,7 +376,7 @@ function BucketReplicationFormPage() {
375
376
  methods
376
377
  ]);
377
378
  useEffect(()=>{
378
- if (includeEncryptedObjects && !encryptReplicatedObjects) methods.setValue("encryptReplicatedObjects", true, {
379
+ if (includeEncryptedObjects && !encryptReplicatedObjects) methods.setValue('encryptReplicatedObjects', true, {
379
380
  shouldValidate: true
380
381
  });
381
382
  }, [
@@ -384,7 +385,7 @@ function BucketReplicationFormPage() {
384
385
  methods
385
386
  ]);
386
387
  useEffect(()=>{
387
- if (("tags" === filterType || "and" === filterType) && deleteMarkerReplication) methods.setValue("deleteMarkerReplication", false, {
388
+ if (('tags' === filterType || 'and' === filterType) && deleteMarkerReplication) methods.setValue('deleteMarkerReplication', false, {
388
389
  shouldValidate: true
389
390
  });
390
391
  }, [
@@ -393,7 +394,7 @@ function BucketReplicationFormPage() {
393
394
  methods
394
395
  ]);
395
396
  useEffect(()=>{
396
- if (enforceRTC) methods.setValue("enableRTCNotification", true, {
397
+ if (enforceRTC) methods.setValue('enableRTCNotification', true, {
397
398
  shouldValidate: true
398
399
  });
399
400
  }, [
@@ -424,17 +425,17 @@ function BucketReplicationFormPage() {
424
425
  onSuccess: ()=>{
425
426
  showToast({
426
427
  open: true,
427
- message: `Replication rule ${isEditMode ? "updated" : "created"} successfully`,
428
- status: "success"
428
+ message: `Replication rule ${isEditMode ? 'updated' : 'created'} successfully`,
429
+ status: 'success'
429
430
  });
430
431
  navigate(`/buckets/${bucketName}?tab=replication`);
431
432
  },
432
433
  onError: (error)=>{
433
- const errorMessage = error instanceof Error ? error.message : `Failed to ${isEditMode ? "update" : "create"} replication rule`;
434
+ const errorMessage = error instanceof Error ? error.message : `Failed to ${isEditMode ? 'update' : 'create'} replication rule`;
434
435
  showToast({
435
436
  open: true,
436
437
  message: errorMessage,
437
- status: "error"
438
+ status: 'error'
438
439
  });
439
440
  }
440
441
  });
@@ -447,7 +448,7 @@ function BucketReplicationFormPage() {
447
448
  isEditMode,
448
449
  existingRule
449
450
  ]);
450
- if ("pending" === replicationStatus) return /*#__PURE__*/ jsx(Loader, {
451
+ if ('pending' === replicationStatus) return /*#__PURE__*/ jsx(Loader, {
451
452
  centered: true,
452
453
  children: /*#__PURE__*/ jsx(Text, {
453
454
  children: "Loading..."
@@ -464,8 +465,8 @@ function BucketReplicationFormPage() {
464
465
  ...methods,
465
466
  children: /*#__PURE__*/ jsxs(Form, {
466
467
  layout: {
467
- kind: "page",
468
- title: isEditMode ? "Edit Replication Rule" : "Create Replication Rule"
468
+ kind: 'page',
469
+ title: isEditMode ? 'Edit Replication Rule' : 'Create Replication Rule'
469
470
  },
470
471
  requireMode: "partial",
471
472
  onSubmit: handleSubmit(onSubmit),
@@ -481,10 +482,10 @@ function BucketReplicationFormPage() {
481
482
  disabled: isSaving
482
483
  }),
483
484
  /*#__PURE__*/ jsx(Button, {
484
- id: isEditMode ? "save-replication-btn" : "create-replication-btn",
485
+ id: isEditMode ? 'save-replication-btn' : 'create-replication-btn',
485
486
  type: "submit",
486
487
  variant: "primary",
487
- label: isEditMode ? "Save" : "Create",
488
+ label: isEditMode ? 'Save' : 'Create',
488
489
  icon: isEditMode ? /*#__PURE__*/ jsx(Icon, {
489
490
  name: "Save"
490
491
  }) : void 0,
@@ -495,7 +496,7 @@ function BucketReplicationFormPage() {
495
496
  children: [
496
497
  /*#__PURE__*/ jsx(FormSection, {
497
498
  title: {
498
- name: "Role"
499
+ name: 'Role'
499
500
  },
500
501
  forceLabelWidth: convertRemToPixels(15),
501
502
  children: /*#__PURE__*/ jsx(FormGroup, {
@@ -510,7 +511,7 @@ function BucketReplicationFormPage() {
510
511
  gap: "r8",
511
512
  children: [
512
513
  /*#__PURE__*/ jsx(Text, {
513
- children: existingRole || "Not set"
514
+ children: existingRole || 'Not set'
514
515
  }),
515
516
  /*#__PURE__*/ jsx(Text, {
516
517
  color: "textSecondary",
@@ -520,13 +521,13 @@ function BucketReplicationFormPage() {
520
521
  }) : /*#__PURE__*/ jsx(Input, {
521
522
  id: "role",
522
523
  placeholder: "arn:aws:iam::123456789012:role/replication-role",
523
- ...register("role")
524
+ ...register('role')
524
525
  })
525
526
  })
526
527
  }),
527
528
  /*#__PURE__*/ jsxs(FormSection, {
528
529
  title: {
529
- name: "Rule Scope"
530
+ name: 'Rule Scope'
530
531
  },
531
532
  forceLabelWidth: convertRemToPixels(15),
532
533
  children: [
@@ -538,10 +539,10 @@ function BucketReplicationFormPage() {
538
539
  helpErrorPosition: "bottom",
539
540
  required: true,
540
541
  content: isEditMode ? /*#__PURE__*/ jsx(Text, {
541
- children: watch("ruleId")
542
+ children: watch('ruleId')
542
543
  }) : /*#__PURE__*/ jsx(Input, {
543
544
  id: "ruleId",
544
- ...register("ruleId")
545
+ ...register('ruleId')
545
546
  })
546
547
  }),
547
548
  /*#__PURE__*/ jsx(FormGroup, {
@@ -578,9 +579,9 @@ function BucketReplicationFormPage() {
578
579
  type: "number",
579
580
  id: "priority",
580
581
  placeholder: isEditMode ? void 0 : `Auto-assigned: ${nextAvailablePriority}`,
581
- ...register("priority", {
582
+ ...register('priority', {
582
583
  setValueAs: (v)=>{
583
- if ("" === v || null == v) return null;
584
+ if ('' === v || null == v) return null;
584
585
  const parsed = parseInt(v, 10);
585
586
  return isNaN(parsed) ? null : parsed;
586
587
  }
@@ -592,8 +593,8 @@ function BucketReplicationFormPage() {
592
593
  }),
593
594
  /*#__PURE__*/ jsx(FilterFormSection, {
594
595
  filterType: filterType,
595
- onFilterTypeChange: (value)=>methods.setValue("filterType", value),
596
- prefixRegister: register("prefix"),
596
+ onFilterTypeChange: (value)=>methods.setValue('filterType', value),
597
+ prefixRegister: register('prefix'),
597
598
  tagFields: tagFields,
598
599
  tagKeyRegister: (index)=>register(`tags.${index}.key`),
599
600
  tagValueRegister: (index)=>register(`tags.${index}.value`),
@@ -605,7 +606,7 @@ function BucketReplicationFormPage() {
605
606
  }),
606
607
  /*#__PURE__*/ jsxs(FormSection, {
607
608
  title: {
608
- name: "Destination"
609
+ name: 'Destination'
609
610
  },
610
611
  forceLabelWidth: convertRemToPixels(15),
611
612
  children: [
@@ -619,7 +620,7 @@ function BucketReplicationFormPage() {
619
620
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
620
621
  toggle: field.value,
621
622
  onChange: field.onChange,
622
- label: field.value ? "Same account destination" : "Not same account destination"
623
+ label: field.value ? 'Same account destination' : 'Not same account destination'
623
624
  })
624
625
  })
625
626
  }),
@@ -633,7 +634,7 @@ function BucketReplicationFormPage() {
633
634
  content: /*#__PURE__*/ jsx(Input, {
634
635
  id: "targetAccountId",
635
636
  placeholder: "Account ID",
636
- ...register("targetAccountId")
637
+ ...register('targetAccountId')
637
638
  })
638
639
  }),
639
640
  /*#__PURE__*/ jsx(FormGroup, {
@@ -652,14 +653,14 @@ function BucketReplicationFormPage() {
652
653
  onChange: field.onChange,
653
654
  placeholder: "Select a bucket",
654
655
  children: availableBuckets.filter((bucket)=>bucket.Name !== bucketName).map((bucket)=>/*#__PURE__*/ jsx(Select.Option, {
655
- value: bucket.Name || "",
656
+ value: bucket.Name || '',
656
657
  children: bucket.Name
657
658
  }, bucket.Name))
658
659
  })
659
660
  }) : /*#__PURE__*/ jsx(Input, {
660
661
  id: "targetBucket",
661
662
  placeholder: "Bucket name",
662
- ...register("targetBucket")
663
+ ...register('targetBucket')
663
664
  })
664
665
  }),
665
666
  /*#__PURE__*/ jsx(FormGroup, {
@@ -694,7 +695,7 @@ function BucketReplicationFormPage() {
694
695
  }),
695
696
  /*#__PURE__*/ jsxs(FormSection, {
696
697
  title: {
697
- name: "Encryption"
698
+ name: 'Encryption'
698
699
  },
699
700
  forceLabelWidth: convertRemToPixels(15),
700
701
  children: [
@@ -723,7 +724,7 @@ function BucketReplicationFormPage() {
723
724
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
724
725
  toggle: field.value,
725
726
  onChange: field.onChange,
726
- label: field.value ? "Enabled" : "Disabled",
727
+ label: field.value ? 'Enabled' : 'Disabled',
727
728
  disabled: includeEncryptedObjects
728
729
  })
729
730
  }),
@@ -745,14 +746,14 @@ function BucketReplicationFormPage() {
745
746
  content: /*#__PURE__*/ jsx(Input, {
746
747
  id: "replicaKmsKeyId",
747
748
  placeholder: "KMS Key ID or ARN",
748
- ...register("replicaKmsKeyId")
749
+ ...register('replicaKmsKeyId')
749
750
  })
750
751
  }) : /*#__PURE__*/ jsx(Fragment, {})
751
752
  ]
752
753
  }),
753
754
  /*#__PURE__*/ jsxs(FormSection, {
754
755
  title: {
755
- name: "Additional Options"
756
+ name: 'Additional Options'
756
757
  },
757
758
  forceLabelWidth: convertRemToPixels(15),
758
759
  children: [
@@ -779,7 +780,7 @@ function BucketReplicationFormPage() {
779
780
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
780
781
  toggle: field.value,
781
782
  onChange: field.onChange,
782
- label: field.value ? "Enabled" : "Disabled",
783
+ label: field.value ? 'Enabled' : 'Disabled',
783
784
  disabled: enforceRTC
784
785
  })
785
786
  }),
@@ -814,11 +815,11 @@ function BucketReplicationFormPage() {
814
815
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
815
816
  toggle: field.value,
816
817
  onChange: field.onChange,
817
- label: field.value ? "Enabled" : "Disabled",
818
- disabled: "tags" === filterType || "and" === filterType
818
+ label: field.value ? 'Enabled' : 'Disabled',
819
+ disabled: 'tags' === filterType || 'and' === filterType
819
820
  })
820
821
  }),
821
- ("tags" === filterType || "and" === filterType) && /*#__PURE__*/ jsx(Text, {
822
+ ('tags' === filterType || 'and' === filterType) && /*#__PURE__*/ jsx(Text, {
822
823
  color: "textSecondary",
823
824
  children: "Delete marker replication is not supported for tag-based filters"
824
825
  })