@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.
Files changed (212) hide show
  1. package/dist/components/DataBrowserUI.d.ts +6 -14
  2. package/dist/components/DataBrowserUI.js +79 -55
  3. package/dist/components/Editor.d.ts +1 -1
  4. package/dist/components/Editor.js +3 -3
  5. package/dist/components/__tests__/BucketCreate.test.js +102 -102
  6. package/dist/components/__tests__/BucketDetails.test.js +122 -123
  7. package/dist/components/__tests__/BucketLifecycleFormPage.test.js +177 -177
  8. package/dist/components/__tests__/BucketLifecycleList.test.js +85 -85
  9. package/dist/components/__tests__/BucketList.test.js +175 -176
  10. package/dist/components/__tests__/BucketNotificationCreatePage.test.js +84 -84
  11. package/dist/components/__tests__/BucketOverview.test.js +257 -201
  12. package/dist/components/__tests__/BucketPolicyPage.test.js +62 -62
  13. package/dist/components/__tests__/BucketReplicationFormPage.test.js +542 -542
  14. package/dist/components/__tests__/BucketReplicationList.test.js +106 -106
  15. package/dist/components/__tests__/CreateFolderButton.test.js +56 -56
  16. package/dist/components/__tests__/DeleteBucketButton.test.js +62 -62
  17. package/dist/components/__tests__/DeleteBucketConfigRuleButton.test.js +47 -47
  18. package/dist/components/__tests__/DeleteObjectButton.test.js +63 -63
  19. package/dist/components/__tests__/EmptyBucketButton.test.js +56 -56
  20. package/dist/components/__tests__/MetadataSearch.test.js +65 -65
  21. package/dist/components/__tests__/ObjectList.test.js +252 -251
  22. package/dist/components/__tests__/UploadButton.test.js +45 -45
  23. package/dist/components/buckets/BucketCreate.d.ts +2 -2
  24. package/dist/components/buckets/BucketCreate.js +41 -41
  25. package/dist/components/buckets/BucketDetails.d.ts +2 -2
  26. package/dist/components/buckets/BucketDetails.js +48 -36
  27. package/dist/components/buckets/BucketLifecycleFormPage.js +161 -160
  28. package/dist/components/buckets/BucketLifecycleList.d.ts +2 -2
  29. package/dist/components/buckets/BucketLifecycleList.js +46 -46
  30. package/dist/components/buckets/BucketList.d.ts +2 -2
  31. package/dist/components/buckets/BucketList.js +28 -27
  32. package/dist/components/buckets/BucketLocation.js +3 -3
  33. package/dist/components/buckets/BucketOverview.d.ts +1 -1
  34. package/dist/components/buckets/BucketOverview.js +64 -65
  35. package/dist/components/buckets/BucketPage.js +19 -11
  36. package/dist/components/buckets/BucketPolicyButton.js +2 -2
  37. package/dist/components/buckets/BucketPolicyPage.js +27 -25
  38. package/dist/components/buckets/BucketReplicationFormPage.js +133 -132
  39. package/dist/components/buckets/BucketReplicationList.d.ts +2 -2
  40. package/dist/components/buckets/BucketReplicationList.js +41 -41
  41. package/dist/components/buckets/BucketVersioning.js +11 -11
  42. package/dist/components/buckets/DeleteBucketButton.js +5 -5
  43. package/dist/components/buckets/DeleteBucketConfigRuleButton.d.ts +2 -2
  44. package/dist/components/buckets/DeleteBucketConfigRuleButton.js +1 -1
  45. package/dist/components/buckets/EmptyBucketButton.js +19 -19
  46. package/dist/components/buckets/EmptyBucketSummary.d.ts +1 -1
  47. package/dist/components/buckets/EmptyBucketSummary.js +1 -1
  48. package/dist/components/buckets/EmptyBucketSummaryList.js +22 -22
  49. package/dist/components/buckets/__tests__/BucketVersioning.test.js +45 -45
  50. package/dist/components/buckets/notifications/BucketNotificationCreatePage.js +34 -33
  51. package/dist/components/buckets/notifications/EventsSection.js +144 -28
  52. package/dist/components/buckets/notifications/__tests__/events.test.d.ts +1 -0
  53. package/dist/components/buckets/notifications/__tests__/events.test.js +56 -0
  54. package/dist/components/buckets/notifications/events.d.ts +71 -7
  55. package/dist/components/buckets/notifications/events.js +98 -16
  56. package/dist/components/index.d.ts +24 -22
  57. package/dist/components/index.js +5 -3
  58. package/dist/components/layouts/ArrowNavigation.d.ts +1 -2
  59. package/dist/components/layouts/ArrowNavigation.js +3 -3
  60. package/dist/components/layouts/BrowserPageLayout.d.ts +2 -3
  61. package/dist/components/layouts/BrowserPageLayout.js +1 -1
  62. package/dist/components/objects/CreateFolderButton.d.ts +2 -2
  63. package/dist/components/objects/CreateFolderButton.js +9 -9
  64. package/dist/components/objects/DeleteObjectButton.d.ts +1 -1
  65. package/dist/components/objects/DeleteObjectButton.js +20 -20
  66. package/dist/components/objects/ObjectDetails/ObjectMetadata.d.ts +1 -1
  67. package/dist/components/objects/ObjectDetails/ObjectMetadata.js +56 -56
  68. package/dist/components/objects/ObjectDetails/ObjectSummary.d.ts +1 -1
  69. package/dist/components/objects/ObjectDetails/ObjectSummary.js +39 -39
  70. package/dist/components/objects/ObjectDetails/ObjectTags.d.ts +1 -1
  71. package/dist/components/objects/ObjectDetails/ObjectTags.js +25 -25
  72. package/dist/components/objects/ObjectDetails/__tests__/ObjectDetails.test.js +119 -119
  73. package/dist/components/objects/ObjectDetails/__tests__/ObjectSummary.test.js +211 -211
  74. package/dist/components/objects/ObjectDetails/index.d.ts +1 -1
  75. package/dist/components/objects/ObjectDetails/index.js +30 -30
  76. package/dist/components/objects/ObjectList.d.ts +5 -5
  77. package/dist/components/objects/ObjectList.js +113 -112
  78. package/dist/components/objects/ObjectLock/EditRetentionButton.js +3 -3
  79. package/dist/components/objects/ObjectLock/ObjectLockRetentionSettings.js +14 -14
  80. package/dist/components/objects/ObjectLock/ObjectLockSettings.d.ts +1 -1
  81. package/dist/components/objects/ObjectLock/ObjectLockSettings.js +29 -28
  82. package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.d.ts +1 -1
  83. package/dist/components/objects/ObjectLock/ObjectLockSettingsUtils.js +6 -6
  84. package/dist/components/objects/ObjectLock/__tests__/EditRetentionButton.test.js +50 -50
  85. package/dist/components/objects/ObjectLock/__tests__/ObjectLockSettings.test.js +77 -77
  86. package/dist/components/objects/ObjectPage.js +5 -4
  87. package/dist/components/objects/UploadButton.d.ts +3 -3
  88. package/dist/components/objects/UploadButton.js +5 -5
  89. package/dist/components/providers/DataBrowserProvider.d.ts +23 -12
  90. package/dist/components/providers/DataBrowserProvider.js +60 -38
  91. package/dist/components/providers/QueryProvider.d.ts +9 -0
  92. package/dist/components/providers/QueryProvider.js +22 -0
  93. package/dist/components/search/MetadataSearch.js +26 -25
  94. package/dist/components/search/SearchHints.js +1 -1
  95. package/dist/components/ui/ArrayFieldActions.js +4 -4
  96. package/dist/components/ui/ConfirmDeleteRuleModal.d.ts +1 -1
  97. package/dist/components/ui/ConfirmDeleteRuleModal.js +1 -1
  98. package/dist/components/ui/DeleteObjectModalContent.d.ts +1 -1
  99. package/dist/components/ui/DeleteObjectModalContent.js +12 -12
  100. package/dist/components/ui/FilterFormSection.d.ts +2 -2
  101. package/dist/components/ui/FilterFormSection.js +29 -29
  102. package/dist/components/ui/Search.elements.d.ts +1 -1
  103. package/dist/components/ui/Search.elements.js +7 -7
  104. package/dist/components/ui/Table.elements.js +5 -5
  105. package/dist/config/factory.d.ts +23 -10
  106. package/dist/config/factory.js +22 -7
  107. package/dist/config/types.d.ts +20 -3
  108. package/dist/contexts/DataBrowserUICustomizationContext.d.ts +2 -2
  109. package/dist/hooks/__tests__/useISVBucketDetection.test.js +42 -42
  110. package/dist/hooks/__tests__/useIsBucketEmpty.test.js +25 -25
  111. package/dist/hooks/bucketConfiguration.d.ts +1 -1
  112. package/dist/hooks/bucketConfiguration.js +48 -48
  113. package/dist/hooks/bucketOperations.d.ts +1 -1
  114. package/dist/hooks/bucketOperations.js +6 -6
  115. package/dist/hooks/factories/__tests__/useCreateS3FunctionMutationHook.test.js +78 -78
  116. package/dist/hooks/factories/__tests__/useCreateS3InfiniteQueryHook.test.js +78 -78
  117. package/dist/hooks/factories/__tests__/useCreateS3LoginHook.test.js +42 -42
  118. package/dist/hooks/factories/__tests__/useCreateS3MutationHook.test.js +61 -61
  119. package/dist/hooks/factories/__tests__/useCreateS3QueryHook.test.js +63 -63
  120. package/dist/hooks/factories/index.d.ts +4 -4
  121. package/dist/hooks/factories/useCreateS3InfiniteQueryHook.d.ts +2 -2
  122. package/dist/hooks/factories/useCreateS3InfiniteQueryHook.js +15 -12
  123. package/dist/hooks/factories/useCreateS3LoginHook.d.ts +2 -2
  124. package/dist/hooks/factories/useCreateS3MutationHook.d.ts +3 -3
  125. package/dist/hooks/factories/useCreateS3MutationHook.js +6 -1
  126. package/dist/hooks/factories/useCreateS3QueryHook.d.ts +2 -2
  127. package/dist/hooks/factories/useCreateS3QueryHook.js +8 -5
  128. package/dist/hooks/index.d.ts +16 -13
  129. package/dist/hooks/index.js +4 -1
  130. package/dist/hooks/loginOperations.d.ts +1 -1
  131. package/dist/hooks/loginOperations.js +1 -1
  132. package/dist/hooks/objectOperations.d.ts +2 -2
  133. package/dist/hooks/objectOperations.js +49 -49
  134. package/dist/hooks/presignedOperations.d.ts +2 -2
  135. package/dist/hooks/presignedOperations.js +3 -3
  136. package/dist/hooks/useBatchObjectLegalHold.js +7 -4
  137. package/dist/hooks/useDataBrowserNavigate.d.ts +28 -0
  138. package/dist/hooks/useDataBrowserNavigate.js +24 -0
  139. package/dist/hooks/useDeleteBucketConfigRule.d.ts +2 -2
  140. package/dist/hooks/useDeleteBucketConfigRule.js +4 -4
  141. package/dist/hooks/useEmptyBucket.js +10 -10
  142. package/dist/hooks/useFeatures.d.ts +7 -0
  143. package/dist/hooks/useFeatures.js +8 -0
  144. package/dist/hooks/useISVBucketDetection.js +5 -5
  145. package/dist/hooks/useIsBucketEmpty.js +4 -4
  146. package/dist/hooks/useLoginMutation.d.ts +1 -1
  147. package/dist/hooks/useLoginMutation.js +1 -1
  148. package/dist/hooks/useS3Client.d.ts +6 -0
  149. package/dist/hooks/useS3Client.js +3 -2
  150. package/dist/hooks/useS3ConfigSwitch.d.ts +11 -0
  151. package/dist/hooks/useS3ConfigSwitch.js +37 -0
  152. package/dist/hooks/useSupportedNotificationEvents.d.ts +6 -0
  153. package/dist/hooks/useSupportedNotificationEvents.js +8 -0
  154. package/dist/index.d.ts +6 -6
  155. package/dist/test/msw/handlers/deleteBucket.d.ts +1 -1
  156. package/dist/test/msw/handlers/deleteBucket.js +20 -10
  157. package/dist/test/msw/handlers/getBucketAcl.d.ts +1 -1
  158. package/dist/test/msw/handlers/getBucketAcl.js +29 -17
  159. package/dist/test/msw/handlers/getBucketLocation.d.ts +1 -1
  160. package/dist/test/msw/handlers/getBucketLocation.js +29 -15
  161. package/dist/test/msw/handlers/getBucketPolicy.d.ts +1 -1
  162. package/dist/test/msw/handlers/getBucketPolicy.js +52 -32
  163. package/dist/test/msw/handlers/headObject.d.ts +1 -1
  164. package/dist/test/msw/handlers/headObject.js +31 -13
  165. package/dist/test/msw/handlers/listBuckets.d.ts +1 -1
  166. package/dist/test/msw/handlers/listBuckets.js +5 -3
  167. package/dist/test/msw/handlers/listObjectVersions.d.ts +1 -1
  168. package/dist/test/msw/handlers/listObjectVersions.js +38 -26
  169. package/dist/test/msw/handlers/listObjects.d.ts +1 -1
  170. package/dist/test/msw/handlers/listObjects.js +35 -23
  171. package/dist/test/msw/handlers/objectLegalHold.d.ts +1 -1
  172. package/dist/test/msw/handlers/objectLegalHold.js +31 -16
  173. package/dist/test/msw/handlers/objectRetention.d.ts +1 -1
  174. package/dist/test/msw/handlers/objectRetention.js +31 -17
  175. package/dist/test/msw/handlers/putBucketAcl.d.ts +1 -1
  176. package/dist/test/msw/handlers/putBucketAcl.js +29 -14
  177. package/dist/test/msw/handlers/putObject.d.ts +1 -1
  178. package/dist/test/msw/handlers/putObject.js +27 -12
  179. package/dist/test/msw/handlers.d.ts +3 -3
  180. package/dist/test/msw/handlers.js +72 -49
  181. package/dist/test/msw/index.d.ts +2 -2
  182. package/dist/test/msw/server.d.ts +1 -1
  183. package/dist/test/msw/server.js +1 -1
  184. package/dist/test/msw/utils.js +2 -2
  185. package/dist/test/setup.d.ts +1 -1
  186. package/dist/test/setup.js +19 -19
  187. package/dist/test/testUtils.d.ts +9 -15
  188. package/dist/test/testUtils.js +73 -91
  189. package/dist/test/utils/errorHandling.test.js +119 -119
  190. package/dist/types/index.d.ts +6 -31
  191. package/dist/utils/__tests__/s3ConfigIdentifier.test.d.ts +1 -0
  192. package/dist/utils/__tests__/s3ConfigIdentifier.test.js +429 -0
  193. package/dist/utils/constants.js +8 -8
  194. package/dist/utils/deletion/index.d.ts +2 -2
  195. package/dist/utils/deletion/messages.d.ts +1 -1
  196. package/dist/utils/deletion/messages.js +4 -4
  197. package/dist/utils/errorHandling.d.ts +3 -3
  198. package/dist/utils/errorHandling.js +6 -6
  199. package/dist/utils/hooks.js +8 -8
  200. package/dist/utils/index.d.ts +5 -4
  201. package/dist/utils/index.js +2 -0
  202. package/dist/utils/proxyMiddleware.d.ts +1 -1
  203. package/dist/utils/proxyMiddleware.js +6 -11
  204. package/dist/utils/s3Client.d.ts +2 -2
  205. package/dist/utils/s3Client.js +1 -1
  206. package/dist/utils/s3ConfigIdentifier.d.ts +68 -0
  207. package/dist/utils/s3ConfigIdentifier.js +55 -0
  208. package/dist/utils/s3RuleUtils.d.ts +5 -5
  209. package/dist/utils/s3RuleUtils.js +17 -17
  210. package/package.json +2 -2
  211. package/dist/utils/useFeatures.d.ts +0 -1
  212. package/dist/utils/useFeatures.js +0 -7
@@ -6,35 +6,36 @@ 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 { useGetBucketLifecycle, useSetBucketLifecycle } from "../../hooks/bucketConfiguration.js";
11
+ import { useDataBrowserNavigate } from "../../hooks/useDataBrowserNavigate.js";
11
12
  import { FilterFormSection, createFilterValidationSchema } from "../ui/FilterFormSection.js";
12
13
  import { ArrayFieldActions } from "../ui/ArrayFieldActions.js";
13
14
  import { AWS_RULE_LIMITS, STATUS_OPTIONS, buildS3Filter } from "../../utils/s3RuleUtils.js";
14
15
  const storageClassOptions = [
15
16
  {
16
- value: "GLACIER",
17
- label: "Glacier"
17
+ value: 'GLACIER',
18
+ label: 'Glacier'
18
19
  },
19
20
  {
20
- value: "DEEP_ARCHIVE",
21
- label: "Glacier Deep Archive"
21
+ value: 'DEEP_ARCHIVE',
22
+ label: 'Glacier Deep Archive'
22
23
  },
23
24
  {
24
- value: "STANDARD_IA",
25
- label: "Standard-IA"
25
+ value: 'STANDARD_IA',
26
+ label: 'Standard-IA'
26
27
  },
27
28
  {
28
- value: "ONEZONE_IA",
29
- label: "One Zone-IA"
29
+ value: 'ONEZONE_IA',
30
+ label: 'One Zone-IA'
30
31
  },
31
32
  {
32
- value: "INTELLIGENT_TIERING",
33
- label: "Intelligent-Tiering"
33
+ value: 'INTELLIGENT_TIERING',
34
+ label: 'Intelligent-Tiering'
34
35
  },
35
36
  {
36
- value: "GLACIER_IR",
37
- label: "Glacier Instant Retrieval"
37
+ value: 'GLACIER_IR',
38
+ label: 'Glacier Instant Retrieval'
38
39
  }
39
40
  ];
40
41
  const STORAGE_CLASS_MIN_DAYS = {
@@ -51,112 +52,112 @@ const LIFECYCLE_LIMITS = {
51
52
  };
52
53
  const schema = joi.object({
53
54
  ruleId: joi.string().required().max(AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH).messages({
54
- "string.empty": "Rule ID is required",
55
- "string.max": `Rule ID must not exceed ${AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH} characters`
55
+ 'string.empty': 'Rule ID is required',
56
+ 'string.max': `Rule ID must not exceed ${AWS_RULE_LIMITS.RULE_ID_MAX_LENGTH} characters`
56
57
  }),
57
58
  status: joi.string().valid(...STATUS_OPTIONS.map((o)=>o.value)).required(),
58
59
  ...createFilterValidationSchema(joi),
59
60
  transitionsEnabled: joi.boolean(),
60
- transitions: joi.when("transitionsEnabled", {
61
+ transitions: joi.when('transitionsEnabled', {
61
62
  is: true,
62
63
  then: joi.array().items(joi.object({
63
- timeType: joi.string().valid("days", "date").required(),
64
- days: joi.when("timeType", {
65
- is: "days",
64
+ timeType: joi.string().valid('days', 'date').required(),
65
+ days: joi.when('timeType', {
66
+ is: 'days',
66
67
  then: joi.number().integer().min(0).required().messages({
67
- "number.base": "Days must be a number",
68
- "number.min": "Days must be at least 0"
68
+ 'number.base': 'Days must be a number',
69
+ 'number.min': 'Days must be at least 0'
69
70
  }),
70
71
  otherwise: joi.any()
71
72
  }),
72
- date: joi.when("timeType", {
73
- is: "date",
73
+ date: joi.when('timeType', {
74
+ is: 'date',
74
75
  then: joi.string().required().messages({
75
- "string.empty": "Date is required"
76
+ 'string.empty': 'Date is required'
76
77
  }),
77
78
  otherwise: joi.any()
78
79
  }),
79
80
  storageClass: joi.string().valid(...storageClassOptions.map((o)=>o.value)).required().messages({
80
- "string.empty": "Storage class is required"
81
+ 'string.empty': 'Storage class is required'
81
82
  })
82
83
  }).custom((value, helpers)=>{
83
- if ("days" === value.timeType && value.storageClass && value.days < STORAGE_CLASS_MIN_DAYS[value.storageClass]) return helpers.error("any.custom", {
84
+ if ('days' === value.timeType && value.storageClass && value.days < STORAGE_CLASS_MIN_DAYS[value.storageClass]) return helpers.error('any.custom', {
84
85
  message: `${value.storageClass} requires at least ${STORAGE_CLASS_MIN_DAYS[value.storageClass]} days`
85
86
  });
86
87
  return value;
87
88
  })).min(1).messages({
88
- "array.min": "At least one transition is required when enabled"
89
+ 'array.min': 'At least one transition is required when enabled'
89
90
  }),
90
91
  otherwise: joi.any()
91
92
  }),
92
93
  expirationEnabled: joi.boolean(),
93
- expirationType: joi.when("expirationEnabled", {
94
+ expirationType: joi.when('expirationEnabled', {
94
95
  is: true,
95
- then: joi.string().valid("days", "date").required(),
96
+ then: joi.string().valid('days', 'date').required(),
96
97
  otherwise: joi.any()
97
98
  }),
98
- expirationDays: joi.when("expirationType", {
99
- is: "days",
99
+ expirationDays: joi.when('expirationType', {
100
+ is: 'days',
100
101
  then: joi.number().integer().min(1).required().messages({
101
- "number.base": "Days must be a number",
102
- "number.min": "Days must be at least 1"
102
+ 'number.base': 'Days must be a number',
103
+ 'number.min': 'Days must be at least 1'
103
104
  }),
104
105
  otherwise: joi.any()
105
106
  }),
106
- expirationDate: joi.when("expirationType", {
107
- is: "date",
107
+ expirationDate: joi.when('expirationType', {
108
+ is: 'date',
108
109
  then: joi.string().required().messages({
109
- "string.empty": "Date is required"
110
+ 'string.empty': 'Date is required'
110
111
  }),
111
112
  otherwise: joi.any()
112
113
  }),
113
114
  expiredObjectDeleteMarker: joi.boolean(),
114
115
  noncurrentTransitionsEnabled: joi.boolean(),
115
- noncurrentTransitions: joi.when("noncurrentTransitionsEnabled", {
116
+ noncurrentTransitions: joi.when('noncurrentTransitionsEnabled', {
116
117
  is: true,
117
118
  then: joi.array().items(joi.object({
118
119
  noncurrentDays: joi.number().integer().min(LIFECYCLE_LIMITS.NONCURRENT_TRANSITION_MIN_DAYS).required().messages({
119
- "number.base": "Noncurrent days must be a number",
120
- "number.min": `Noncurrent days must be at least ${LIFECYCLE_LIMITS.NONCURRENT_TRANSITION_MIN_DAYS}`
120
+ 'number.base': 'Noncurrent days must be a number',
121
+ 'number.min': `Noncurrent days must be at least ${LIFECYCLE_LIMITS.NONCURRENT_TRANSITION_MIN_DAYS}`
121
122
  }),
122
123
  storageClass: joi.string().valid(...storageClassOptions.map((o)=>o.value)).required().messages({
123
- "string.empty": "Storage class is required"
124
+ 'string.empty': 'Storage class is required'
124
125
  }),
125
- newerNoncurrentVersions: joi.number().integer().min(0).optional().allow(null, "")
126
+ newerNoncurrentVersions: joi.number().integer().min(0).optional().allow(null, '')
126
127
  })).min(1).messages({
127
- "array.min": "At least one noncurrent transition is required when enabled"
128
+ 'array.min': 'At least one noncurrent transition is required when enabled'
128
129
  }),
129
130
  otherwise: joi.any()
130
131
  }),
131
132
  noncurrentExpirationEnabled: joi.boolean(),
132
- noncurrentExpirationDays: joi.when("noncurrentExpirationEnabled", {
133
+ noncurrentExpirationDays: joi.when('noncurrentExpirationEnabled', {
133
134
  is: true,
134
135
  then: joi.number().integer().min(1).required().messages({
135
- "number.base": "Noncurrent days must be a number",
136
- "number.min": "Noncurrent days must be at least 1"
136
+ 'number.base': 'Noncurrent days must be a number',
137
+ 'number.min': 'Noncurrent days must be at least 1'
137
138
  }),
138
139
  otherwise: joi.any()
139
140
  }),
140
- noncurrentNewerVersions: joi.number().integer().min(0).optional().allow(null, ""),
141
+ noncurrentNewerVersions: joi.number().integer().min(0).optional().allow(null, ''),
141
142
  abortMpuEnabled: joi.boolean(),
142
- abortMpuDays: joi.when("abortMpuEnabled", {
143
+ abortMpuDays: joi.when('abortMpuEnabled', {
143
144
  is: true,
144
145
  then: joi.number().integer().min(LIFECYCLE_LIMITS.ABORT_MPU_MIN_DAYS).required().messages({
145
- "number.base": "Days must be a number",
146
- "number.min": `Days must be at least ${LIFECYCLE_LIMITS.ABORT_MPU_MIN_DAYS}`
146
+ 'number.base': 'Days must be a number',
147
+ 'number.min': `Days must be at least ${LIFECYCLE_LIMITS.ABORT_MPU_MIN_DAYS}`
147
148
  }),
148
149
  otherwise: joi.any()
149
150
  })
150
151
  }).custom((value, helpers)=>{
151
152
  const hasAtLeastOneAction = value.transitionsEnabled || value.expirationEnabled || value.expiredObjectDeleteMarker || value.noncurrentTransitionsEnabled || value.noncurrentExpirationEnabled || value.abortMpuEnabled;
152
- if (!hasAtLeastOneAction) return helpers.error("any.custom", {
153
- message: "At least one lifecycle action must be enabled (transition, expiration, or abort multipart upload)"
153
+ if (!hasAtLeastOneAction) return helpers.error('any.custom', {
154
+ message: 'At least one lifecycle action must be enabled (transition, expiration, or abort multipart upload)'
154
155
  });
155
- if (value.expirationEnabled && value.expiredObjectDeleteMarker) return helpers.error("any.custom", {
156
- message: "Expired delete markers removal cannot be combined with Days/Date expiration on the same rule"
156
+ if (value.expirationEnabled && value.expiredObjectDeleteMarker) return helpers.error('any.custom', {
157
+ message: 'Expired delete markers removal cannot be combined with Days/Date expiration on the same rule'
157
158
  });
158
- if (("tags" === value.filterType || "and" === value.filterType) && value.abortMpuEnabled) return helpers.error("any.custom", {
159
- message: "Tag-based filter cannot be used with Abort Incomplete Multipart Upload"
159
+ if (('tags' === value.filterType || 'and' === value.filterType) && value.abortMpuEnabled) return helpers.error('any.custom', {
160
+ message: 'Tag-based filter cannot be used with Abort Incomplete Multipart Upload'
160
161
  });
161
162
  return value;
162
163
  });
@@ -168,17 +169,17 @@ const getArrayFieldError = (errors, fieldName, index, propertyName)=>{
168
169
  };
169
170
  const ruleToFormValues = (rule)=>{
170
171
  const formValues = {
171
- ruleId: rule.ID || "",
172
- status: rule.Status || "Enabled",
173
- filterType: "none",
174
- prefix: "",
172
+ ruleId: rule.ID || '',
173
+ status: rule.Status || 'Enabled',
174
+ filterType: 'none',
175
+ prefix: '',
175
176
  tags: [],
176
177
  transitionsEnabled: false,
177
178
  transitions: [],
178
179
  expirationEnabled: false,
179
- expirationType: "days",
180
+ expirationType: 'days',
180
181
  expirationDays: 30,
181
- expirationDate: "",
182
+ expirationDate: '',
182
183
  expiredObjectDeleteMarker: false,
183
184
  noncurrentTransitionsEnabled: false,
184
185
  noncurrentTransitions: [],
@@ -188,26 +189,26 @@ const ruleToFormValues = (rule)=>{
188
189
  abortMpuEnabled: false,
189
190
  abortMpuDays: 7
190
191
  };
191
- if (void 0 !== rule.Prefix && "" !== rule.Prefix) {
192
- formValues.filterType = "prefix";
192
+ if (void 0 !== rule.Prefix && '' !== rule.Prefix) {
193
+ formValues.filterType = 'prefix';
193
194
  formValues.prefix = rule.Prefix;
194
195
  } else if (rule.Filter) {
195
196
  if (rule.Filter.And) {
196
- formValues.filterType = "and";
197
- formValues.prefix = rule.Filter.And.Prefix || "";
197
+ formValues.filterType = 'and';
198
+ formValues.prefix = rule.Filter.And.Prefix || '';
198
199
  formValues.tags = rule.Filter.And.Tags?.map((tag)=>({
199
- key: tag.Key || "",
200
- value: tag.Value || ""
200
+ key: tag.Key || '',
201
+ value: tag.Value || ''
201
202
  })) || [];
202
203
  } else if (void 0 !== rule.Filter.Prefix) {
203
- formValues.filterType = "prefix";
204
+ formValues.filterType = 'prefix';
204
205
  formValues.prefix = rule.Filter.Prefix;
205
206
  } else if (rule.Filter.Tag) {
206
- formValues.filterType = "tags";
207
+ formValues.filterType = 'tags';
207
208
  formValues.tags = [
208
209
  {
209
- key: rule.Filter.Tag.Key || "",
210
- value: rule.Filter.Tag.Value || ""
210
+ key: rule.Filter.Tag.Key || '',
211
+ value: rule.Filter.Tag.Value || ''
211
212
  }
212
213
  ];
213
214
  }
@@ -215,21 +216,21 @@ const ruleToFormValues = (rule)=>{
215
216
  if (rule.Transitions && rule.Transitions.length > 0) {
216
217
  formValues.transitionsEnabled = true;
217
218
  formValues.transitions = rule.Transitions.map((t)=>({
218
- timeType: void 0 !== t.Days ? "days" : "date",
219
+ timeType: void 0 !== t.Days ? 'days' : 'date',
219
220
  days: t.Days || 30,
220
- date: t.Date ? new Date(t.Date).toISOString().split("T")[0] : "",
221
- storageClass: t.StorageClass || "GLACIER"
221
+ date: t.Date ? new Date(t.Date).toISOString().split('T')[0] : '',
222
+ storageClass: t.StorageClass || 'GLACIER'
222
223
  }));
223
224
  }
224
225
  if (rule.Expiration) {
225
226
  if (rule.Expiration.Days) {
226
227
  formValues.expirationEnabled = true;
227
- formValues.expirationType = "days";
228
+ formValues.expirationType = 'days';
228
229
  formValues.expirationDays = rule.Expiration.Days;
229
230
  } else if (rule.Expiration.Date) {
230
231
  formValues.expirationEnabled = true;
231
- formValues.expirationType = "date";
232
- formValues.expirationDate = new Date(rule.Expiration.Date).toISOString().split("T")[0];
232
+ formValues.expirationType = 'date';
233
+ formValues.expirationDate = new Date(rule.Expiration.Date).toISOString().split('T')[0];
233
234
  }
234
235
  if (rule.Expiration.ExpiredObjectDeleteMarker) formValues.expiredObjectDeleteMarker = true;
235
236
  }
@@ -237,7 +238,7 @@ const ruleToFormValues = (rule)=>{
237
238
  formValues.noncurrentTransitionsEnabled = true;
238
239
  formValues.noncurrentTransitions = rule.NoncurrentVersionTransitions.map((t)=>({
239
240
  noncurrentDays: t.NoncurrentDays || 30,
240
- storageClass: t.StorageClass || "GLACIER",
241
+ storageClass: t.StorageClass || 'GLACIER',
241
242
  newerNoncurrentVersions: t.NewerNoncurrentVersions || 0
242
243
  }));
243
244
  }
@@ -258,11 +259,11 @@ const generateStorageClassHelpText = ()=>{
258
259
  const minDays = STORAGE_CLASS_MIN_DAYS[option.value];
259
260
  if (minDays > 0) hints.push(`<li>${option.label}: min ${minDays} days</li>`);
260
261
  });
261
- return hints.length > 0 ? `Storage class requirements:<ul>${hints.join("")}</ul>` : void 0;
262
+ return hints.length > 0 ? `Storage class requirements:<ul>${hints.join('')}</ul>` : void 0;
262
263
  };
263
264
  function BucketLifecycleFormPage() {
264
265
  const { bucketName, ruleId } = useParams();
265
- const navigate = useNavigate();
266
+ const navigate = useDataBrowserNavigate();
266
267
  const { showToast } = useToast();
267
268
  const isEditMode = !!ruleId;
268
269
  const { data: lifecycleData, status: lifecycleStatus } = useGetBucketLifecycle({
@@ -283,27 +284,27 @@ function BucketLifecycleFormPage() {
283
284
  ]);
284
285
  const dynamicSchema = useMemo(()=>schema.keys({
285
286
  ruleId: joi.string().required().invalid(...existingRuleIds).messages({
286
- "string.empty": "Rule ID is required",
287
- "any.invalid": "A rule with this ID already exists"
287
+ 'string.empty': 'Rule ID is required',
288
+ 'any.invalid': 'A rule with this ID already exists'
288
289
  })
289
290
  }), [
290
291
  existingRuleIds
291
292
  ]);
292
293
  const methods = useForm({
293
294
  resolver: joiResolver(dynamicSchema),
294
- mode: "onChange",
295
+ mode: 'onChange',
295
296
  defaultValues: {
296
- ruleId: "",
297
- status: "Enabled",
298
- filterType: "none",
299
- prefix: "",
297
+ ruleId: '',
298
+ status: 'Enabled',
299
+ filterType: 'none',
300
+ prefix: '',
300
301
  tags: [],
301
302
  transitionsEnabled: false,
302
303
  transitions: [],
303
304
  expirationEnabled: false,
304
- expirationType: "days",
305
+ expirationType: 'days',
305
306
  expirationDays: 30,
306
- expirationDate: "",
307
+ expirationDate: '',
307
308
  expiredObjectDeleteMarker: false,
308
309
  noncurrentTransitionsEnabled: false,
309
310
  noncurrentTransitions: [],
@@ -317,24 +318,24 @@ function BucketLifecycleFormPage() {
317
318
  const { handleSubmit, register, control, watch, reset, formState: { isValid, isDirty, errors } } = methods;
318
319
  const { fields: transitionFields, append: appendTransition, remove: removeTransition } = useFieldArray({
319
320
  control,
320
- name: "transitions"
321
+ name: 'transitions'
321
322
  });
322
323
  const { fields: noncurrentTransitionFields, append: appendNoncurrentTransition, remove: removeNoncurrentTransition } = useFieldArray({
323
324
  control,
324
- name: "noncurrentTransitions"
325
+ name: 'noncurrentTransitions'
325
326
  });
326
327
  const { fields: tagFields, append: appendTag, remove: removeTag } = useFieldArray({
327
328
  control,
328
- name: "tags"
329
+ name: 'tags'
329
330
  });
330
- const filterType = watch("filterType");
331
- const transitionsEnabled = watch("transitionsEnabled");
332
- const expirationEnabled = watch("expirationEnabled");
333
- const expirationType = watch("expirationType");
334
- const expiredObjectDeleteMarker = watch("expiredObjectDeleteMarker");
335
- const noncurrentTransitionsEnabled = watch("noncurrentTransitionsEnabled");
336
- const noncurrentExpirationEnabled = watch("noncurrentExpirationEnabled");
337
- const abortMpuEnabled = watch("abortMpuEnabled");
331
+ const filterType = watch('filterType');
332
+ const transitionsEnabled = watch('transitionsEnabled');
333
+ const expirationEnabled = watch('expirationEnabled');
334
+ const expirationType = watch('expirationType');
335
+ const expiredObjectDeleteMarker = watch('expiredObjectDeleteMarker');
336
+ const noncurrentTransitionsEnabled = watch('noncurrentTransitionsEnabled');
337
+ const noncurrentExpirationEnabled = watch('noncurrentExpirationEnabled');
338
+ const abortMpuEnabled = watch('abortMpuEnabled');
338
339
  const { mutate: setLifecycle, isPending: isSaving } = useSetBucketLifecycle();
339
340
  const transitionsHelpText = useMemo(()=>{
340
341
  if (!transitionsEnabled || 0 === transitionFields.length) return;
@@ -366,10 +367,10 @@ function BucketLifecycleFormPage() {
366
367
  const prevValue = prevTransitionsEnabledRef.current;
367
368
  prevTransitionsEnabledRef.current = transitionsEnabled;
368
369
  if (!isEditMode && null !== prevValue && !prevValue && transitionsEnabled && 0 === transitionFields.length) appendTransition({
369
- timeType: "days",
370
+ timeType: 'days',
370
371
  days: 30,
371
- date: "",
372
- storageClass: "STANDARD_IA"
372
+ date: '',
373
+ storageClass: 'STANDARD_IA'
373
374
  });
374
375
  }, [
375
376
  isEditMode,
@@ -382,7 +383,7 @@ function BucketLifecycleFormPage() {
382
383
  prevNoncurrentTransitionsEnabledRef.current = noncurrentTransitionsEnabled;
383
384
  if (!isEditMode && null !== prevValue && !prevValue && noncurrentTransitionsEnabled && 0 === noncurrentTransitionFields.length) appendNoncurrentTransition({
384
385
  noncurrentDays: 30,
385
- storageClass: "GLACIER",
386
+ storageClass: 'GLACIER',
386
387
  newerNoncurrentVersions: 0
387
388
  });
388
389
  }, [
@@ -395,17 +396,17 @@ function BucketLifecycleFormPage() {
395
396
  useEffect(()=>{
396
397
  const prevFilterType = prevFilterTypeRef.current;
397
398
  prevFilterTypeRef.current = filterType;
398
- if (("tags" === filterType || "and" === filterType) && 0 === tagFields.length) {
399
+ if (('tags' === filterType || 'and' === filterType) && 0 === tagFields.length) {
399
400
  if (!isEditMode || void 0 !== prevFilterType && prevFilterType !== filterType) appendTag({
400
- key: "",
401
- value: ""
401
+ key: '',
402
+ value: ''
402
403
  });
403
404
  }
404
405
  if (void 0 !== prevFilterType && prevFilterType !== filterType) {
405
- if (("none" === filterType || "prefix" === filterType) && tagFields.length > 0) tagFields.forEach((_, index)=>{
406
+ if (('none' === filterType || 'prefix' === filterType) && tagFields.length > 0) tagFields.forEach((_, index)=>{
406
407
  removeTag(tagFields.length - 1 - index);
407
408
  });
408
- if ("none" === filterType) methods.setValue("prefix", "", {
409
+ if ('none' === filterType) methods.setValue('prefix', '', {
409
410
  shouldDirty: true
410
411
  });
411
412
  }
@@ -434,15 +435,15 @@ function BucketLifecycleFormPage() {
434
435
  const t = {
435
436
  StorageClass: transition.storageClass
436
437
  };
437
- if ("days" === transition.timeType) t.Days = transition.days;
438
+ if ('days' === transition.timeType) t.Days = transition.days;
438
439
  else t.Date = new Date(transition.date);
439
440
  return t;
440
441
  });
441
442
  if (data.expirationEnabled || data.expiredObjectDeleteMarker) {
442
443
  rule.Expiration = {};
443
444
  if (data.expirationEnabled) {
444
- if ("days" === data.expirationType) rule.Expiration.Days = data.expirationDays;
445
- else if ("date" === data.expirationType) rule.Expiration.Date = new Date(data.expirationDate);
445
+ if ('days' === data.expirationType) rule.Expiration.Days = data.expirationDays;
446
+ else if ('date' === data.expirationType) rule.Expiration.Date = new Date(data.expirationDate);
446
447
  }
447
448
  if (data.expiredObjectDeleteMarker) rule.Expiration.ExpiredObjectDeleteMarker = true;
448
449
  }
@@ -476,17 +477,17 @@ function BucketLifecycleFormPage() {
476
477
  onSuccess: ()=>{
477
478
  showToast({
478
479
  open: true,
479
- message: `Lifecycle rule ${isEditMode ? "updated" : "created"} successfully`,
480
- status: "success"
480
+ message: `Lifecycle rule ${isEditMode ? 'updated' : 'created'} successfully`,
481
+ status: 'success'
481
482
  });
482
483
  navigate(`/buckets/${bucketName}?tab=lifecycle`);
483
484
  },
484
485
  onError: (error)=>{
485
- const errorMessage = error instanceof Error ? error.message : `Failed to ${isEditMode ? "update" : "create"} lifecycle rule`;
486
+ const errorMessage = error instanceof Error ? error.message : `Failed to ${isEditMode ? 'update' : 'create'} lifecycle rule`;
486
487
  showToast({
487
488
  open: true,
488
489
  message: errorMessage,
489
- status: "error"
490
+ status: 'error'
490
491
  });
491
492
  }
492
493
  });
@@ -499,7 +500,7 @@ function BucketLifecycleFormPage() {
499
500
  isEditMode,
500
501
  existingRule
501
502
  ]);
502
- if ("pending" === lifecycleStatus) return /*#__PURE__*/ jsx(Loader, {
503
+ if ('pending' === lifecycleStatus) return /*#__PURE__*/ jsx(Loader, {
503
504
  centered: true,
504
505
  children: /*#__PURE__*/ jsx(Text, {
505
506
  children: "Loading..."
@@ -516,8 +517,8 @@ function BucketLifecycleFormPage() {
516
517
  ...methods,
517
518
  children: /*#__PURE__*/ jsxs(Form, {
518
519
  layout: {
519
- kind: "page",
520
- title: isEditMode ? "Edit Lifecycle Rule" : "Create Lifecycle Rule"
520
+ kind: 'page',
521
+ title: isEditMode ? 'Edit Lifecycle Rule' : 'Create Lifecycle Rule'
521
522
  },
522
523
  requireMode: "partial",
523
524
  onSubmit: handleSubmit(onSubmit),
@@ -533,10 +534,10 @@ function BucketLifecycleFormPage() {
533
534
  disabled: isSaving
534
535
  }),
535
536
  /*#__PURE__*/ jsx(Button, {
536
- id: isEditMode ? "save-lifecycle-btn" : "create-lifecycle-btn",
537
+ id: isEditMode ? 'save-lifecycle-btn' : 'create-lifecycle-btn',
537
538
  type: "submit",
538
539
  variant: "primary",
539
- label: isEditMode ? "Save" : "Create",
540
+ label: isEditMode ? 'Save' : 'Create',
540
541
  icon: isEditMode ? /*#__PURE__*/ jsx(Icon, {
541
542
  name: "Save"
542
543
  }) : void 0,
@@ -547,7 +548,7 @@ function BucketLifecycleFormPage() {
547
548
  children: [
548
549
  /*#__PURE__*/ jsxs(FormSection, {
549
550
  title: {
550
- name: "Rule Scope"
551
+ name: 'Rule Scope'
551
552
  },
552
553
  forceLabelWidth: convertRemToPixels(15),
553
554
  children: [
@@ -559,10 +560,10 @@ function BucketLifecycleFormPage() {
559
560
  helpErrorPosition: "bottom",
560
561
  required: true,
561
562
  content: isEditMode ? /*#__PURE__*/ jsx(Text, {
562
- children: watch("ruleId")
563
+ children: watch('ruleId')
563
564
  }) : /*#__PURE__*/ jsx(Input, {
564
565
  id: "ruleId",
565
- ...register("ruleId")
566
+ ...register('ruleId')
566
567
  })
567
568
  }),
568
569
  /*#__PURE__*/ jsx(FormGroup, {
@@ -590,8 +591,8 @@ function BucketLifecycleFormPage() {
590
591
  }),
591
592
  /*#__PURE__*/ jsx(FilterFormSection, {
592
593
  filterType: filterType,
593
- onFilterTypeChange: (value)=>methods.setValue("filterType", value),
594
- prefixRegister: register("prefix"),
594
+ onFilterTypeChange: (value)=>methods.setValue('filterType', value),
595
+ prefixRegister: register('prefix'),
595
596
  tagFields: tagFields,
596
597
  tagKeyRegister: (index)=>register(`tags.${index}.key`),
597
598
  tagValueRegister: (index)=>register(`tags.${index}.value`),
@@ -603,7 +604,7 @@ function BucketLifecycleFormPage() {
603
604
  }),
604
605
  /*#__PURE__*/ jsxs(FormSection, {
605
606
  title: {
606
- name: transitionsEnabled || expirationEnabled || noncurrentTransitionsEnabled || noncurrentExpirationEnabled || abortMpuEnabled ? "Lifecycle Rule" : "Lifecycle Rule (At least one action must be enabled)"
607
+ name: transitionsEnabled || expirationEnabled || noncurrentTransitionsEnabled || noncurrentExpirationEnabled || abortMpuEnabled ? 'Lifecycle Rule' : 'Lifecycle Rule (At least one action must be enabled)'
607
608
  },
608
609
  forceLabelWidth: convertRemToPixels(18),
609
610
  children: [
@@ -618,7 +619,7 @@ function BucketLifecycleFormPage() {
618
619
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
619
620
  toggle: field.value,
620
621
  onChange: field.onChange,
621
- label: field.value ? "Enabled" : "Disabled"
622
+ label: field.value ? 'Enabled' : 'Disabled'
622
623
  })
623
624
  })
624
625
  }),
@@ -694,7 +695,7 @@ function BucketLifecycleFormPage() {
694
695
  }),
695
696
  /*#__PURE__*/ jsx(Box, {
696
697
  flex: "1",
697
- children: "days" === watch(`transitions.${index}.timeType`) ? /*#__PURE__*/ jsx(Input, {
698
+ children: 'days' === watch(`transitions.${index}.timeType`) ? /*#__PURE__*/ jsx(Input, {
698
699
  id: `transition-days-${index}`,
699
700
  type: "number",
700
701
  placeholder: "Days",
@@ -731,30 +732,30 @@ function BucketLifecycleFormPage() {
731
732
  showAdd: index === transitionFields.length - 1,
732
733
  onRemove: ()=>removeTransition(index),
733
734
  onAdd: ()=>appendTransition({
734
- timeType: "days",
735
+ timeType: 'days',
735
736
  days: 30,
736
- date: "",
737
- storageClass: "STANDARD_IA"
737
+ date: '',
738
+ storageClass: 'STANDARD_IA'
738
739
  }),
739
740
  canRemove: transitionFields.length > 1
740
741
  })
741
742
  ]
742
743
  }),
743
- getArrayFieldError(errors, "transitions", index) && /*#__PURE__*/ jsx(Text, {
744
+ getArrayFieldError(errors, 'transitions', index) && /*#__PURE__*/ jsx(Text, {
744
745
  color: "statusCritical",
745
- children: getArrayFieldError(errors, "transitions", index)
746
+ children: getArrayFieldError(errors, 'transitions', index)
746
747
  }),
747
- getArrayFieldError(errors, "transitions", index, "days") && /*#__PURE__*/ jsx(Text, {
748
+ getArrayFieldError(errors, 'transitions', index, 'days') && /*#__PURE__*/ jsx(Text, {
748
749
  color: "statusCritical",
749
- children: getArrayFieldError(errors, "transitions", index, "days")
750
+ children: getArrayFieldError(errors, 'transitions', index, 'days')
750
751
  }),
751
- getArrayFieldError(errors, "transitions", index, "storageClass") && /*#__PURE__*/ jsx(Text, {
752
+ getArrayFieldError(errors, 'transitions', index, 'storageClass') && /*#__PURE__*/ jsx(Text, {
752
753
  color: "statusCritical",
753
- children: getArrayFieldError(errors, "transitions", index, "storageClass")
754
+ children: getArrayFieldError(errors, 'transitions', index, 'storageClass')
754
755
  }),
755
- getArrayFieldError(errors, "transitions", index, "date") && /*#__PURE__*/ jsx(Text, {
756
+ getArrayFieldError(errors, 'transitions', index, 'date') && /*#__PURE__*/ jsx(Text, {
756
757
  color: "statusCritical",
757
- children: getArrayFieldError(errors, "transitions", index, "date")
758
+ children: getArrayFieldError(errors, 'transitions', index, 'date')
758
759
  })
759
760
  ]
760
761
  }, field.id))
@@ -773,11 +774,11 @@ function BucketLifecycleFormPage() {
773
774
  toggle: field.value,
774
775
  onChange: (value)=>{
775
776
  field.onChange(value);
776
- if (value && expiredObjectDeleteMarker) methods.setValue("expiredObjectDeleteMarker", false, {
777
+ if (value && expiredObjectDeleteMarker) methods.setValue('expiredObjectDeleteMarker', false, {
777
778
  shouldDirty: true
778
779
  });
779
780
  },
780
- label: field.value ? "Enabled" : "Disabled",
781
+ label: field.value ? 'Enabled' : 'Disabled',
781
782
  disabled: expiredObjectDeleteMarker
782
783
  })
783
784
  })
@@ -808,7 +809,7 @@ function BucketLifecycleFormPage() {
808
809
  })
809
810
  })
810
811
  }),
811
- "days" === expirationType && /*#__PURE__*/ jsx(FormGroup, {
812
+ 'days' === expirationType && /*#__PURE__*/ jsx(FormGroup, {
812
813
  label: "Days",
813
814
  id: "expirationDays",
814
815
  direction: "horizontal",
@@ -819,13 +820,13 @@ function BucketLifecycleFormPage() {
819
820
  children: /*#__PURE__*/ jsx(Input, {
820
821
  type: "number",
821
822
  id: "expirationDays",
822
- ...register("expirationDays", {
823
+ ...register('expirationDays', {
823
824
  valueAsNumber: true
824
825
  })
825
826
  })
826
827
  })
827
828
  }),
828
- "date" === expirationType && /*#__PURE__*/ jsx(FormGroup, {
829
+ 'date' === expirationType && /*#__PURE__*/ jsx(FormGroup, {
829
830
  label: "Date",
830
831
  id: "expirationDate",
831
832
  direction: "horizontal",
@@ -834,7 +835,7 @@ function BucketLifecycleFormPage() {
834
835
  content: /*#__PURE__*/ jsx(Input, {
835
836
  type: "date",
836
837
  id: "expirationDate",
837
- ...register("expirationDate")
838
+ ...register('expirationDate')
838
839
  })
839
840
  })
840
841
  ]
@@ -851,11 +852,11 @@ function BucketLifecycleFormPage() {
851
852
  toggle: field.value,
852
853
  onChange: (value)=>{
853
854
  field.onChange(value);
854
- if (value && expirationEnabled) methods.setValue("expirationEnabled", false, {
855
+ if (value && expirationEnabled) methods.setValue('expirationEnabled', false, {
855
856
  shouldDirty: true
856
857
  });
857
858
  },
858
- label: field.value ? "Enabled" : "Disabled",
859
+ label: field.value ? 'Enabled' : 'Disabled',
859
860
  disabled: expirationEnabled
860
861
  })
861
862
  })
@@ -870,7 +871,7 @@ function BucketLifecycleFormPage() {
870
871
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
871
872
  toggle: field.value,
872
873
  onChange: field.onChange,
873
- label: field.value ? "Enabled" : "Disabled"
874
+ label: field.value ? 'Enabled' : 'Disabled'
874
875
  })
875
876
  })
876
877
  }),
@@ -972,20 +973,20 @@ function BucketLifecycleFormPage() {
972
973
  onRemove: ()=>removeNoncurrentTransition(index),
973
974
  onAdd: ()=>appendNoncurrentTransition({
974
975
  noncurrentDays: 30,
975
- storageClass: "GLACIER",
976
+ storageClass: 'GLACIER',
976
977
  newerNoncurrentVersions: 0
977
978
  }),
978
979
  canRemove: noncurrentTransitionFields.length > 1
979
980
  })
980
981
  ]
981
982
  }),
982
- getArrayFieldError(errors, "noncurrentTransitions", index, "noncurrentDays") && /*#__PURE__*/ jsx(Text, {
983
+ getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays') && /*#__PURE__*/ jsx(Text, {
983
984
  color: "statusCritical",
984
- children: getArrayFieldError(errors, "noncurrentTransitions", index, "noncurrentDays")
985
+ children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays')
985
986
  }),
986
- getArrayFieldError(errors, "noncurrentTransitions", index, "storageClass") && /*#__PURE__*/ jsx(Text, {
987
+ getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass') && /*#__PURE__*/ jsx(Text, {
987
988
  color: "statusCritical",
988
- children: getArrayFieldError(errors, "noncurrentTransitions", index, "storageClass")
989
+ children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass')
989
990
  })
990
991
  ]
991
992
  }, field.id))
@@ -1002,7 +1003,7 @@ function BucketLifecycleFormPage() {
1002
1003
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
1003
1004
  toggle: field.value,
1004
1005
  onChange: field.onChange,
1005
- label: field.value ? "Enabled" : "Disabled"
1006
+ label: field.value ? 'Enabled' : 'Disabled'
1006
1007
  })
1007
1008
  })
1008
1009
  }),
@@ -1019,7 +1020,7 @@ function BucketLifecycleFormPage() {
1019
1020
  children: /*#__PURE__*/ jsx(Input, {
1020
1021
  type: "number",
1021
1022
  id: "noncurrentExpirationDays",
1022
- ...register("noncurrentExpirationDays", {
1023
+ ...register('noncurrentExpirationDays', {
1023
1024
  valueAsNumber: true
1024
1025
  })
1025
1026
  })
@@ -1035,7 +1036,7 @@ function BucketLifecycleFormPage() {
1035
1036
  type: "number",
1036
1037
  id: "noncurrentNewerVersions",
1037
1038
  placeholder: "0",
1038
- ...register("noncurrentNewerVersions", {
1039
+ ...register('noncurrentNewerVersions', {
1039
1040
  valueAsNumber: true
1040
1041
  })
1041
1042
  })
@@ -1047,7 +1048,7 @@ function BucketLifecycleFormPage() {
1047
1048
  label: "Expire incomplete multipart upload",
1048
1049
  id: "abortMpuEnabled",
1049
1050
  direction: "horizontal",
1050
- error: ("tags" === filterType || "and" === filterType) && abortMpuEnabled ? "Tag-based filter cannot be used with Abort Incomplete Multipart Upload" : void 0,
1051
+ error: ('tags' === filterType || 'and' === filterType) && abortMpuEnabled ? 'Tag-based filter cannot be used with Abort Incomplete Multipart Upload' : void 0,
1051
1052
  helpErrorPosition: "bottom",
1052
1053
  content: /*#__PURE__*/ jsx(Controller, {
1053
1054
  name: "abortMpuEnabled",
@@ -1055,7 +1056,7 @@ function BucketLifecycleFormPage() {
1055
1056
  render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
1056
1057
  toggle: field.value,
1057
1058
  onChange: field.onChange,
1058
- label: field.value ? "Enabled" : "Disabled"
1059
+ label: field.value ? 'Enabled' : 'Disabled'
1059
1060
  })
1060
1061
  })
1061
1062
  }),
@@ -1070,7 +1071,7 @@ function BucketLifecycleFormPage() {
1070
1071
  children: /*#__PURE__*/ jsx(Input, {
1071
1072
  type: "number",
1072
1073
  id: "abortMpuDays",
1073
- ...register("abortMpuDays", {
1074
+ ...register('abortMpuDays', {
1074
1075
  valueAsNumber: true
1075
1076
  })
1076
1077
  })